x-print-designer 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{P as fe,E as Vt,f as ze,F as lt,H as Ra,G as K,q as ee,I as Ne,J as tl,K as jr,L as _e,M as Kr,R as xe,n as Ae,b as ue,Z as Re,g as O,N as al,p as Me,O as Jr,l as Q,Q as rl,h as Y,d as me,S as xr,B as mt,c as dt,T as ht,U as nl,a as Ut,V as vt,r as il,W as Ti,X as oa,Y as ol,_ as ll,j as St,$ as cr,a0 as Qr,a1 as sl,a2 as ul,a3 as Ci,a4 as vl,a5 as Pi,a6 as cl,a7 as kt,i as Ar,a8 as Qe,a9 as Ir,aa as hl,ab as fl,ac as Ct,ad as en,ae as gl,af as we,ag as hr,ah as pl,ai as Ni,aj as dl,m as ya,ak as na,o as yl,al as ml,am as Sl,an as tn,ao as bl,ap as wl,aq as an,ar as qt,as as Dl,at as Fe,C as _l}from"./graphic-Cay9kDL2.js";import{aO as fr,O as bt,aP as zt,aQ as B,b as Ge,aR as U,af as oe,i as la,aS as st,D as Pt,S as Ue,_ as ve,aT as rn,aU as ce,f as ne,aV as ie,aW as nn,ac as ae,aX as sa,aY as Ie,aZ as De,a_ as xl,a$ as Mi,a4 as J,N as Lr,b0 as ma,b1 as Ri,b2 as Sa,b3 as et,b4 as Ee,b5 as Ei,aL as Al,b6 as Vi,b7 as ki,b8 as zi,s as Ce,b9 as wt,w as W,ah as ct,ba as Tr,bb as Il,bc as Cr,bd as Ll,be as Gi,aM as ba,P as Pr,bf as wa,bg as Oi,bh as Tl,bi as Le,I as Bi,bj as Zt,bk as Cl,bl as Pl,bm as Nl,bn as ua,H as Ml,bo as va,bp as Da,M as at,bq as Dt,h as _t,br as Rl,bs as on,bt as El,a as Be,bu as _a,bv as Fi,bw as ln,bx as jt,by as sn,bz as Vl,j as un,bA as kl,bB as zl,bC as Hi,bD as Gl,L as vn,bE as cn,bF as Ol,u as Bl,bG as Wi,bH as Ui,bI as gr,bJ as pr,bK as Fl,k as Hl,x as Ea,bL as Wl,bM as ia,bN as Va,bO as Zi,q as Ul,bP as Zl,bQ as $i,r as $l,bR as hn,bS as Xl,bT as Yl,a0 as fn,Y as gn,bU as ql}from"./Axis-hDyHms34.js";import{c as Ze,p as xa}from"./createSeriesData-DY7MF9QR.js";import{S as Aa,a as Ia,i as Gt,g as Xi,b as Ot,c as jl,s as Kl,d as Jl,e as Ql,M as es,f as ts,h as as,R as La,V as Ta,u as Yi,j as Nr,k as qi,L as ji,l as rs,m as ns,n as is,E as os,o as ls,p as Ki,q as Mr,r as pn,t as ss,v as us,w as vs,x as cs,y as hs}from"./customGraphicKeyframeAnimation-g4tvH6et.js";function Ji(r,t,e,a,n,i,o,l){var s=n-r,u=i-t,v=e-r,c=a-t,h=Math.sqrt(v*v+c*c);v/=h,c/=h;var f=s*v+u*c,g=f/h;g*=h;var p=o[0]=r+g*v,d=o[1]=t+g*c;return Math.sqrt((p-n)*(p-n)+(d-i)*(d-i))}var je=new fe,se=new fe,pe=new fe,Ke=new fe,Ve=new fe,ca=[],ye=new fe;function fs(r,t){if(t<=180&&t>0){t=t/180*Math.PI,je.fromArray(r[0]),se.fromArray(r[1]),pe.fromArray(r[2]),fe.sub(Ke,je,se),fe.sub(Ve,pe,se);var e=Ke.len(),a=Ve.len();if(!(e<.001||a<.001)){Ke.scale(1/e),Ve.scale(1/a);var n=Ke.dot(Ve),i=Math.cos(t);if(i<n){var o=Ji(se.x,se.y,pe.x,pe.y,je.x,je.y,ca);ye.fromArray(ca),ye.scaleAndAdd(Ve,o/Math.tan(Math.PI-t));var l=pe.x!==se.x?(ye.x-se.x)/(pe.x-se.x):(ye.y-se.y)/(pe.y-se.y);if(isNaN(l))return;l<0?fe.copy(ye,se):l>1&&fe.copy(ye,pe),ye.toArray(r[1])}}}}function gs(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,je.fromArray(r[0]),se.fromArray(r[1]),pe.fromArray(r[2]),fe.sub(Ke,se,je),fe.sub(Ve,pe,se);var a=Ke.len(),n=Ve.len();if(!(a<.001||n<.001)){Ke.scale(1/a),Ve.scale(1/n);var i=Ke.dot(t),o=Math.cos(e);if(i<o){var l=Ji(se.x,se.y,pe.x,pe.y,je.x,je.y,ca);ye.fromArray(ca);var s=Math.PI/2,u=Math.acos(Ve.dot(t)),v=s+u-e;if(v>=s)fe.copy(ye,pe);else{ye.scaleAndAdd(Ve,l/Math.tan(Math.PI/2-v));var c=pe.x!==se.x?(ye.x-se.x)/(pe.x-se.x):(ye.y-se.y)/(pe.y-se.y);if(isNaN(c))return;c<0?fe.copy(ye,se):c>1&&fe.copy(ye,pe)}ye.toArray(r[1])}}}}function ka(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var l=a.getModel("lineStyle").getLineStyle();n?r.useStyle(l):i.style=l}function ps(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=lt(a[0],a[1]),i=lt(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,l=Ra([],a[1],a[0],o/n),s=Ra([],a[1],a[2],o/i),u=Ra([],l,s,.5);r.bezierCurveTo(l[0],l[1],l[0],l[1],u[0],u[1]),r.bezierCurveTo(s[0],s[1],s[0],s[1],a[2][0],a[2][1])}else for(var v=1;v<a.length;v++)r.lineTo(a[v][0],a[v][1])}function Qi(r,t,e){var a=r.getTextGuideLine(),n=r.getTextContent();if(!n){a&&r.removeTextGuideLine();return}for(var i=t.normal,o=i.get("show"),l=n.ignore,s=0;s<fr.length;s++){var u=fr[s],v=t[u],c=u==="normal";if(v){var h=v.get("show"),f=c?l:Vt(n.states[u]&&n.states[u].ignore,l);if(f||!Vt(h,o)){var g=c?a:a&&a.states[u];g&&(g.ignore=!0),a&&ka(a,!0,u,v);continue}a||(a=new bt,r.setTextGuideLine(a),!c&&(l||!o)&&ka(a,!0,"normal",t.normal),r.stateProxy&&(a.stateProxy=r.stateProxy)),ka(a,!1,u,v)}}if(a){ze(a.style,e),a.style.fill=null;var p=i.get("showAbove"),d=r.textGuideLineConfig=r.textGuideLineConfig||{};d.showAbove=p||!1,a.buildPath=ps}}function eo(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},a=0;a<zt.length;a++){var n=zt[a];e[n]=r.getModel([n,t])}return e}var ds=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return Ze(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var a=new K,n=Ge("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);a.add(n),n.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),l=i==="none"?"circle":i,s=e.itemHeight*.8,u=Ge(l,(e.itemWidth-s)/2,(e.itemHeight-s)/2,s,s,e.itemStyle.fill);a.add(u),u.setStyle(e.itemStyle);var v=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=v*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),l.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=U.color.neutral00,u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(oe);function to(r,t,e){var a=r.getBaseAxis(),n=r.getOtherAxis(a),i=ys(n,e),o=a.dim,l=n.dim,s=t.mapDimension(l),u=t.mapDimension(o),v=l==="x"||l==="radius"?1:0,c=ee(r.dimensions,function(g){return t.mapDimension(g)}),h=!1,f=t.getCalculationInfo("stackResultDimension");return la(t,c[0])&&(h=!0,c[0]=f),la(t,c[1])&&(h=!0,c[1]=f),{dataDimsForPoint:c,valueStart:i,valueAxisDim:l,baseAxisDim:o,stacked:!!h,valueDim:s,baseDim:u,baseDataOffset:v,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function ys(r,t){var e=0,a=r.scale.getExtent();return t==="start"?e=a[0]:t==="end"?e=a[1]:Ne(t)&&!isNaN(t)?e=t:a[0]>0?e=a[0]:a[1]<0&&(e=a[1]),e}function ao(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function ms(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function Ss(r,t,e,a,n,i,o,l){for(var s=ms(r,t),u=[],v=[],c=[],h=[],f=[],g=[],p=[],d=to(n,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],S=0;S<s.length;S++){var b=s[S],w=!0,D=void 0,_=void 0;switch(b.cmd){case"=":D=b.idx*2,_=b.idx1*2;var x=m[D],P=m[D+1],I=y[_],A=y[_+1];(isNaN(x)||isNaN(P))&&(x=I,P=A),u.push(x,P),v.push(I,A),c.push(e[D],e[D+1]),h.push(a[_],a[_+1]),p.push(t.getRawIndex(b.idx1));break;case"+":var L=b.idx,M=d.dataDimsForPoint,V=n.dataToPoint([t.get(M[0],L),t.get(M[1],L)]);_=L*2,u.push(V[0],V[1]),v.push(y[_],y[_+1]);var N=ao(d,n,t,L);c.push(N[0],N[1]),h.push(a[_],a[_+1]),p.push(t.getRawIndex(L));break;case"-":w=!1}w&&(f.push(b),g.push(g.length))}g.sort(function($,le){return p[$]-p[le]});for(var T=u.length,E=st(T),C=st(T),R=st(T),k=st(T),z=[],S=0;S<g.length;S++){var G=g[S],H=S*2,F=G*2;E[H]=u[F],E[H+1]=u[F+1],C[H]=v[F],C[H+1]=v[F+1],R[H]=c[F],R[H+1]=c[F+1],k[H]=h[F],k[H+1]=h[F+1],z[S]=f[G]}return{current:E,next:C,stackedOnCurrent:R,stackedOnNext:k,status:z}}var Xe=Math.min,Ye=Math.max;function ut(r,t){return isNaN(r)||isNaN(t)}function dr(r,t,e,a,n,i,o,l,s){for(var u,v,c,h,f,g,p=e,d=0;d<a;d++){var m=t[p*2],y=t[p*2+1];if(p>=n||p<0)break;if(ut(m,y)){if(s){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var S=m-u,b=y-v;if(S*S+b*b<.5){p+=i;continue}if(o>0){for(var w=p+i,D=t[w*2],_=t[w*2+1];D===m&&_===y&&d<a;)d++,w+=i,p+=i,D=t[w*2],_=t[w*2+1],m=t[p*2],y=t[p*2+1],S=m-u,b=y-v;var x=d+1;if(s)for(;ut(D,_)&&x<a;)x++,w+=i,D=t[w*2],_=t[w*2+1];var P=.5,I=0,A=0,L=void 0,M=void 0;if(x>=a||ut(D,_))f=m,g=y;else{I=D-u,A=_-v;var V=m-u,N=D-m,T=y-v,E=_-y,C=void 0,R=void 0;if(l==="x"){C=Math.abs(V),R=Math.abs(N);var k=I>0?1:-1;f=m-k*C*o,g=y,L=m+k*R*o,M=y}else if(l==="y"){C=Math.abs(T),R=Math.abs(E);var z=A>0?1:-1;f=m,g=y-z*C*o,L=m,M=y+z*R*o}else C=Math.sqrt(V*V+T*T),R=Math.sqrt(N*N+E*E),P=R/(R+C),f=m-I*o*(1-P),g=y-A*o*(1-P),L=m+I*o*P,M=y+A*o*P,L=Xe(L,Ye(D,m)),M=Xe(M,Ye(_,y)),L=Ye(L,Xe(D,m)),M=Ye(M,Xe(_,y)),I=L-m,A=M-y,f=m-I*C/R,g=y-A*C/R,f=Xe(f,Ye(u,m)),g=Xe(g,Ye(v,y)),f=Ye(f,Xe(u,m)),g=Ye(g,Xe(v,y)),I=m-f,A=y-g,L=m+I*R/C,M=y+A*R/C}r.bezierCurveTo(c,h,f,g,m,y),c=L,h=M}else r.lineTo(m,y)}u=m,v=y,p+=i}return d}var ro=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),bs=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new ro},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&ut(n[o*2-2],n[o*2-1]);o--);for(;i<o&&ut(n[i*2],n[i*2+1]);i++);}for(;i<o;)i+=dr(e,n,i,o,o,1,a.smooth,a.smoothMonotone,a.connectNulls)+1},t.prototype.getPointOn=function(e,a){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,i=n.data,o=tl.CMD,l,s,u=a==="x",v=[],c=0;c<i.length;){var h=i[c++],f=void 0,g=void 0,p=void 0,d=void 0,m=void 0,y=void 0,S=void 0;switch(h){case o.M:l=i[c++],s=i[c++];break;case o.L:if(f=i[c++],g=i[c++],S=u?(e-l)/(f-l):(e-s)/(g-s),S<=1&&S>=0){var b=u?(g-s)*S+s:(f-l)*S+l;return u?[e,b]:[b,e]}l=f,s=g;break;case o.C:f=i[c++],g=i[c++],p=i[c++],d=i[c++],m=i[c++],y=i[c++];var w=u?jr(l,f,p,m,e,v):jr(s,g,d,y,e,v);if(w>0)for(var D=0;D<w;D++){var _=v[D];if(_<=1&&_>=0){var b=u?Kr(s,g,d,y,_):Kr(l,f,p,m,_);return u?[e,b]:[b,e]}}l=m,s=y;break}}},t})(_e),ws=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(ro),no=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new ws},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,l=n.length/2,s=a.smoothMonotone;if(a.connectNulls){for(;l>0&&ut(n[l*2-2],n[l*2-1]);l--);for(;o<l&&ut(n[o*2],n[o*2+1]);o++);}for(;o<l;){var u=dr(e,n,o,l,l,1,a.smooth,s,a.connectNulls);dr(e,i,o+u-1,u,l,-1,a.stackedOnSmooth,s,a.connectNulls),o+=u+1,e.closePath()}},t})(_e);function io(r,t,e,a,n){var i=r.getArea(),o=i.x,l=i.y,s=i.width,u=i.height,v=e.get(["lineStyle","width"])||0;o-=v/2,l-=v/2,s+=v,u+=v,s=Math.ceil(s),o!==Math.floor(o)&&(o=Math.floor(o),s++);var c=new xe({shape:{x:o,y:l,width:s,height:u}});if(t){var h=r.getBaseAxis(),f=h.isHorizontal(),g=h.inverse;f?(g&&(c.shape.x+=s),c.shape.width=0):(g||(c.shape.y+=u),c.shape.height=0);var p=Ae(n)?function(d){n(d,c)}:null;ve(c,{shape:{width:s,height:u,x:o,y:l}},e,null,a,p)}return c}function oo(r,t,e){var a=r.getArea(),n=Pt(a.r0,1),i=Pt(a.r,1),o=new Ue({shape:{cx:Pt(r.cx,1),cy:Pt(r.cy,1),r0:n,r:i,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(t){var l=r.getBaseAxis().dim==="angle";l?o.shape.endAngle=a.startAngle:o.shape.r=n,ve(o,{shape:{endAngle:a.endAngle,r:i}},e)}return o}function $t(r,t,e,a,n){if(r){if(r.type==="polar")return oo(r,t,e);if(r.type==="cartesian2d")return io(r,t,e,a,n)}else return null;return null}function dn(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function yn(r){for(var t=1/0,e=1/0,a=-1/0,n=-1/0,i=0;i<r.length;){var o=r[i++],l=r[i++];isNaN(o)||(t=Math.min(o,t),a=Math.max(o,a)),isNaN(l)||(e=Math.min(l,e),n=Math.max(l,n))}return[[t,e],[a,n]]}function mn(r,t){var e=yn(r),a=e[0],n=e[1],i=yn(t),o=i[0],l=i[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(n[0]-l[0]),Math.abs(n[1]-l[1]))}function Sn(r){return Ne(r)?r:r?.5:0}function Ds(r,t,e){if(!e.valueDim)return[];for(var a=t.count(),n=st(a*2),i=0;i<a;i++){var o=ao(e,r,t,i);n[i*2]=o[0],n[i*2+1]=o[1]}return n}function qe(r,t,e,a,n){var i=e.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,l=[],s=0,u=[],v=[],c=[],h=[];if(n){for(s=0;s<r.length;s+=2){var f=t||r;!isNaN(f[s])&&!isNaN(f[s+1])&&h.push(r[s],r[s+1])}r=h}for(s=0;s<r.length-2;s+=2)switch(c[0]=r[s+2],c[1]=r[s+3],v[0]=r[s],v[1]=r[s+1],l.push(v[0],v[1]),a){case"end":u[o]=c[o],u[1-o]=v[1-o],l.push(u[0],u[1]);break;case"middle":var g=(v[o]+c[o])/2,p=[];u[o]=p[o]=g,u[1-o]=v[1-o],p[1-o]=c[1-o],l.push(u[0],u[1]),l.push(p[0],p[1]);break;default:u[o]=v[o],u[1-o]=c[1-o],l.push(u[0],u[1])}return l.push(r[s++],r[s++]),l}function _s(r,t){var e=[],a=r.length,n,i;function o(v,c,h){var f=v.coord,g=(h-f)/(c.coord-f),p=al(g,[v.color,c.color]);return{coord:h,color:p}}for(var l=0;l<a;l++){var s=r[l],u=s.coord;if(u<0)n=s;else if(u>t){i?e.push(o(i,s,t)):n&&e.push(o(n,s,0),o(n,s,t));break}else n&&(e.push(o(n,s,0)),n=null),e.push(s),i=s}return e}function xs(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var l=r.getDimensionInfo(a[o].dimension);if(n=l&&l.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var s=t.getAxis(n),u=ee(i.stops,function(S){return{coord:s.toGlobalCoord(s.dataToCoord(S.value)),color:S.color}}),v=u.length,c=i.outerColors.slice();v&&u[0].coord>u[v-1].coord&&(u.reverse(),c.reverse());var h=_s(u,n==="x"?e.getWidth():e.getHeight()),f=h.length;if(!f&&v)return u[0].coord<0?c[1]?c[1]:u[v-1].color:c[0]?c[0]:u[0].color;var g=10,p=h[0].coord-g,d=h[f-1].coord+g,m=d-p;if(m<.001)return"transparent";O(h,function(S){S.offset=(S.coord-p)/m}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var y=new Lr(0,0,0,0,h,!0);return y[n]=p,y[n+"2"]=d,y}}}function As(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&Is(i,t))){var o=t.mapDimension(i.dim),l={};return O(i.getViewLabels(),function(s){var u=i.scale.getRawOrdinalNumber(s.tickValue);l[u]=1}),function(s){return!l.hasOwnProperty(t.get(o,s))}}}}function Is(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;o<n;o+=i)if(Ia.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>a)return!1;return!0}function Ls(r,t){return isNaN(r)||isNaN(t)}function Ts(r){for(var t=r.length/2;t>0&&Ls(r[t*2-2],r[t*2-1]);t--);return t-1}function bn(r,t){return[r[t*2],r[t*2+1]]}function Cs(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,l=0,s=-1,u=0;u<a;u++)if(o=r[u*2+n],!(isNaN(o)||isNaN(r[u*2+1-n]))){if(u===0){i=o;continue}if(i<=t&&o>=t||i>=t&&o<=t){s=u;break}l=u,i=o}return{range:[l,s],t:(t-i)/(o-i)}}function lo(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<zt.length;t++)if(r.get([zt[t],"endLabel","show"]))return!0;return!1}function za(r,t,e,a){if(Gt(t,"cartesian2d")){var n=a.getModel("endLabel"),i=n.get("valueAnimation"),o=a.getData(),l={lastFrameIndex:0},s=lo(a)?function(f,g){r._endLabelOnDuring(f,g,o,l,i,n,t)}:null,u=t.getBaseAxis().isHorizontal(),v=io(t,e,a,function(){var f=r._endLabel;f&&e&&l.originalX!=null&&f.attr({x:l.originalX,y:l.originalY})},s);if(!a.get("clip",!0)){var c=v.shape,h=Math.max(c.width,c.height);u?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return s&&s(1,v),v}else return oo(t,e,a)}function Ps(r,t){var e=t.getBaseAxis(),a=e.isHorizontal(),n=e.inverse,i=a?n?"right":"left":"center",o=a?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var Ns=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new K,a=new Aa;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=e,this._changePolyState=ue(this._changePolyState,this)},t.prototype.render=function(e,a,n){var i=e.coordinateSystem,o=this.group,l=e.getData(),s=e.getModel("lineStyle"),u=e.getModel("areaStyle"),v=l.getLayout("points")||[],c=i.type==="polar",h=this._coordSys,f=this._symbolDraw,g=this._polyline,p=this._polygon,d=this._lineGroup,m=!a.ssr&&e.get("animation"),y=!u.isEmpty(),S=u.get("origin"),b=to(i,l,S),w=y&&Ds(i,l,b),D=e.get("showSymbol"),_=e.get("connectNulls"),x=D&&!c&&As(e,l,i),P=this._data;P&&P.eachItemGraphicEl(function($,le){$.__temp&&(o.remove($),P.setItemGraphicEl(le,null))}),D||f.remove(),o.add(d);var I=c?!1:e.get("step"),A;i&&i.getArea&&e.get("clip",!0)&&(A=i.getArea(),A.width!=null?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r+=.5)),this._clipShapeForSymbol=A;var L=xs(l,i,n)||l.getVisual("style")[l.getVisual("drawType")];if(!(g&&h.type===i.type&&I===this._step))D&&f.updateData(l,{isIgnore:x,clipShape:A,disableAnimation:!0,getSymbolPoint:function($){return[v[$*2],v[$*2+1]]}}),m&&this._initSymbolLabelAnimation(l,i,A),I&&(w&&(w=qe(w,v,i,I,_)),v=qe(v,null,i,I,_)),g=this._newPolyline(v),y?p=this._newPolygon(v,w):p&&(d.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,rn(L)),d.setClipPath(za(this,i,!0,e));else{y&&!p?p=this._newPolygon(v,w):p&&!y&&(d.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,rn(L));var M=d.getClipPath();if(M){var V=za(this,i,!1,e);ve(M,{shape:V.shape},e)}else d.setClipPath(za(this,i,!0,e));D&&f.updateData(l,{isIgnore:x,clipShape:A,disableAnimation:!0,getSymbolPoint:function($){return[v[$*2],v[$*2+1]]}}),(!dn(this._stackedOnPoints,w)||!dn(this._points,v))&&(m?this._doUpdateAnimation(l,w,i,n,I,S,_):(I&&(w&&(w=qe(w,v,i,I,_)),v=qe(v,null,i,I,_)),g.setShape({points:v}),p&&p.setShape({points:v,stackedOnPoints:w})))}var N=e.getModel("emphasis"),T=N.get("focus"),E=N.get("blurScope"),C=N.get("disabled");if(g.useStyle(ze(s.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),ce(g,e,"lineStyle"),g.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var R=g.getState("emphasis").style;R.lineWidth=+g.style.lineWidth+1}ne(g).seriesIndex=e.seriesIndex,ie(g,T,E,C);var k=Sn(e.get("smooth")),z=e.get("smoothMonotone");if(g.setShape({smooth:k,smoothMonotone:z,connectNulls:_}),p){var G=l.getCalculationInfo("stackedOnSeries"),H=0;p.useStyle(ze(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),G&&(H=Sn(G.get("smooth"))),p.setShape({smooth:k,stackedOnSmooth:H,smoothMonotone:z,connectNulls:_}),ce(p,e,"areaStyle"),ne(p).seriesIndex=e.seriesIndex,ie(p,T,E,C)}var F=this._changePolyState;l.eachItemGraphicEl(function($){$&&($.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=l,this._coordSys=i,this._stackedOnPoints=w,this._points=v,this._step=I,this._valueOrigin=S,e.get("triggerLineEvent")&&(this.packEventData(e,g),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,a){ne(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),l=nn(o,i);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var s=o.getLayout("points"),u=o.getItemGraphicEl(l);if(!u){var v=s[l*2],c=s[l*2+1];if(isNaN(v)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(v,c))return;var h=e.get("zlevel")||0,f=e.get("z")||0;u=new Ia(o,l),u.x=v,u.y=c,u.setZ(h,f);var g=u.getSymbolPath().getTextContent();g&&(g.zlevel=h,g.z=f,g.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(l,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ae.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),l=nn(o,i);if(this._changePolyState("normal"),l!=null&&l>=0){var s=o.getItemGraphicEl(l);s&&(s.__temp?(o.setItemGraphicEl(l,null),this.group.remove(s)):s.downplay())}else ae.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;sa(this._polyline,e),a&&sa(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new bs({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new no({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,l=a.getBaseAxis(),s=l.inverse;a.type==="cartesian2d"?(i=l.isHorizontal(),o=!1):a.type==="polar"&&(i=l.dim==="angle",o=!0);var u=e.hostModel,v=u.get("animationDuration");Ae(v)&&(v=v(null));var c=u.get("animationDelay")||0,h=Ae(c)?c(null):c;e.eachItemGraphicEl(function(f,g){var p=f;if(p){var d=[f.x,f.y],m=void 0,y=void 0,S=void 0;if(n)if(o){var b=n,w=a.pointToCoord(d);i?(m=b.startAngle,y=b.endAngle,S=-w[1]/180*Math.PI):(m=b.r0,y=b.r,S=w[0])}else{var D=n;i?(m=D.x,y=D.x+D.width,S=f.x):(m=D.y+D.height,y=D.y,S=f.y)}var _=y===m?0:(S-m)/(y-m);s&&(_=1-_);var x=Ae(c)?c(g):v*_+h,P=p.getSymbolPath(),I=P.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:x}),P.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(lo(e)){var o=e.getData(),l=this._polyline,s=o.getLayout("points");if(!s){l.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Re({z2:200}),u.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var v=Ts(s);v>=0&&(Ie(l,De(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:v,defaultText:function(c,h,f){return f!=null?Xi(o,f):Ot(o,c)},enableTextSetter:!0},Ps(i,a)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,l,s){var u=this._endLabel,v=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=n.getLayout("points"),h=n.hostModel,f=h.get("connectNulls"),g=l.get("precision"),p=l.get("distance")||0,d=s.getBaseAxis(),m=d.isHorizontal(),y=d.inverse,S=a.shape,b=y?m?S.x:S.y+S.height:m?S.x+S.width:S.y,w=(m?p:0)*(y?-1:1),D=(m?0:-p)*(y?-1:1),_=m?"x":"y",x=Cs(c,b,_),P=x.range,I=P[1]-P[0],A=void 0;if(I>=1){if(I>1&&!f){var L=bn(c,P[0]);u.attr({x:L[0]+w,y:L[1]+D}),o&&(A=h.getRawValue(P[0]))}else{var L=v.getPointOn(b,_);L&&u.attr({x:L[0]+w,y:L[1]+D});var M=h.getRawValue(P[0]),V=h.getRawValue(P[1]);o&&(A=xl(n,g,M,V,x.t))}i.lastFrameIndex=P[0]}else{var N=e===1||i.lastFrameIndex>0?P[0]:0,L=bn(c,N);o&&(A=h.getRawValue(N)),u.attr({x:L[0]+w,y:L[1]+D})}if(o){var T=Mi(u);typeof T.setLabelText=="function"&&T.setLabelText(A)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,l,s){var u=this._polyline,v=this._polygon,c=e.hostModel,h=Ss(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),f=h.current,g=h.stackedOnCurrent,p=h.next,d=h.stackedOnNext;if(o&&(g=qe(h.stackedOnCurrent,h.current,n,o,s),f=qe(h.current,null,n,o,s),d=qe(h.stackedOnNext,h.next,n,o,s),p=qe(h.next,null,n,o,s)),mn(f,p)>3e3||v&&mn(g,d)>3e3){u.stopAnimation(),u.setShape({points:p}),v&&(v.stopAnimation(),v.setShape({points:p,stackedOnPoints:d}));return}u.shape.__points=h.current,u.shape.points=f;var m={shape:{points:p}};h.current!==f&&(m.shape.__points=h.next),u.stopAnimation(),J(u,m,c),v&&(v.setShape({points:f,stackedOnPoints:g}),v.stopAnimation(),J(v,{shape:{stackedOnPoints:d}},c),u.shape.points!==v.shape.points&&(v.shape.points=u.shape.points));for(var y=[],S=h.status,b=0;b<S.length;b++){var w=S[b].cmd;if(w==="="){var D=e.getItemGraphicEl(S[b].idx1);D&&y.push({el:D,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){v&&v.dirtyShape();for(var _=u.shape.__points,x=0;x<y.length;x++){var P=y[x].el,I=y[x].ptIdx*2;P.x=_[I],P.y=_[I+1],P.markRedraw()}})},t.prototype.remove=function(e){var a=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(i,o){i.__temp&&(a.remove(i),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(ae);function Xt(r,t){return{seriesType:r,plan:ma(),reset:function(e){var a=e.getData(),n=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(n){var l=ee(n.dimensions,function(f){return a.mapDimension(f)}).slice(0,2),s=l.length,u=a.getCalculationInfo("stackResultDimension");la(a,l[0])&&(l[0]=u),la(a,l[1])&&(l[1]=u);var v=a.getStore(),c=a.getDimensionIndex(l[0]),h=a.getDimensionIndex(l[1]);return s&&{progress:function(f,g){for(var p=f.end-f.start,d=o&&st(p*s),m=[],y=[],S=f.start,b=0;S<f.end;S++){var w=void 0;if(s===1){var D=v.get(c,S);w=n.dataToPoint(D,null,y)}else m[0]=v.get(c,S),m[1]=v.get(h,S),w=n.dataToPoint(m,null,y);o?(d[b++]=w[0],d[b++]=w[1]):g.setItemLayout(S,w.slice())}o&&g.setLayout("points",d)}}}}}}var Ms={average:function(r){for(var t=0,e=0,a=0;a<r.length;a++)isNaN(r[a])||(t+=r[a],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},Rs=function(r){return Math.round(r.length/2)};function so(r){return{seriesType:r,reset:function(t,e,a){var n=t.getData(),i=t.get("sampling"),o=t.coordinateSystem,l=n.count();if(l>10&&o.type==="cartesian2d"&&i){var s=o.getBaseAxis(),u=o.getOtherAxis(s),v=s.getExtent(),c=a.getDevicePixelRatio(),h=Math.abs(v[1]-v[0])*(c||1),f=Math.round(l/h);if(isFinite(f)&&f>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/f)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/f));var g=void 0;Me(i)?g=Ms[i]:Ae(i)&&(g=i),g&&t.setData(n.downSample(n.mapDimension(u.dim),1/f,g,Rs))}}}}}function Af(r){r.registerChartView(Ns),r.registerSeriesModel(ds),r.registerLayout(Xt("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,so("line"))}var Bt=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Ze(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),l=i.dataToPoint(o);if(n)O(i.getAxes(),function(h,f){if(h.type==="category"&&a!=null){var g=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),d=o[f],m=a[f]==="x1"||a[f]==="y1";if(m&&!p&&(d+=1),g.length<2)return;if(g.length===2){l[f]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,S=void 0,b=1,w=0;w<g.length;w++){var D=g[w].coord,_=w===g.length-1?g[w-1].tickValue+b:g[w].tickValue;if(_===d){S=D;break}else if(_<d)y=D;else if(y!=null&&_>d){S=(D+y)/2;break}w===1&&(b=_-g[0].tickValue)}S==null&&(y?y&&(S=g[g.length-1].coord):S=g[0].coord),l[f]=h.toGlobalCoord(S)}});else{var s=this.getData(),u=s.getLayout("offset"),v=s.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;l[c]+=u+v/2}return l}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(oe);oe.registerClass(Bt);var Es=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Ze(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ri(Bt.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:U.color.primary,borderWidth:2}},realtimeSort:!1}),t})(Bt),Vs=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),ha=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new Vs},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),l=Math.max(a.r,0),s=(l-o)*.5,u=o+s,v=a.startAngle,c=a.endAngle,h=a.clockwise,f=Math.PI*2,g=h?c-v<f:v-c<f;g||(v=c-(h?f:-f));var p=Math.cos(v),d=Math.sin(v),m=Math.cos(c),y=Math.sin(c);g?(e.moveTo(p*o+n,d*o+i),e.arc(p*u+n,d*u+i,s,-Math.PI+v,v,!h)):e.moveTo(p*l+n,d*l+i),e.arc(n,i,l,v,c,!h),e.arc(m*u+n,y*u+i,s,c-Math.PI*2,c-Math.PI,!h),o!==0&&e.arc(n,i,o,c,v,h)},t})(_e);function ks(r,t){t=t||{};var e=t.isRoundCap;return function(a,n,i){var o=n.position;if(!o||o instanceof Array)return Jr(a,n,i);var l=r(o),s=n.distance!=null?n.distance:5,u=this.shape,v=u.cx,c=u.cy,h=u.r,f=u.r0,g=(h+f)/2,p=u.startAngle,d=u.endAngle,m=(p+d)/2,y=e?Math.abs(h-f)/2:0,S=Math.cos,b=Math.sin,w=v+h*S(p),D=c+h*b(p),_="left",x="top";switch(l){case"startArc":w=v+(f-s)*S(m),D=c+(f-s)*b(m),_="center",x="top";break;case"insideStartArc":w=v+(f+s)*S(m),D=c+(f+s)*b(m),_="center",x="bottom";break;case"startAngle":w=v+g*S(p)+Kt(p,s+y,!1),D=c+g*b(p)+Jt(p,s+y,!1),_="right",x="middle";break;case"insideStartAngle":w=v+g*S(p)+Kt(p,-s+y,!1),D=c+g*b(p)+Jt(p,-s+y,!1),_="left",x="middle";break;case"middle":w=v+g*S(m),D=c+g*b(m),_="center",x="middle";break;case"endArc":w=v+(h+s)*S(m),D=c+(h+s)*b(m),_="center",x="bottom";break;case"insideEndArc":w=v+(h-s)*S(m),D=c+(h-s)*b(m),_="center",x="top";break;case"endAngle":w=v+g*S(d)+Kt(d,s+y,!0),D=c+g*b(d)+Jt(d,s+y,!0),_="left",x="middle";break;case"insideEndAngle":w=v+g*S(d)+Kt(d,-s+y,!0),D=c+g*b(d)+Jt(d,-s+y,!0),_="right",x="middle";break;default:return Jr(a,n,i)}return a=a||{},a.x=w,a.y=D,a.align=_,a.verticalAlign=x,a}}function zs(r,t,e,a){if(Ne(a)){r.setTextConfig({rotation:a});return}else if(Q(t)){r.setTextConfig({rotation:0});return}var n=r.shape,i=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,l=(i+o)/2,s,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":s=l;break;case"startAngle":case"insideStartAngle":s=i;break;case"endAngle":case"insideEndAngle":s=o;break;default:r.setTextConfig({rotation:0});return}var v=Math.PI*1.5-s;u==="middle"&&v>Math.PI/2&&v<Math.PI*1.5&&(v-=Math.PI),r.setTextConfig({rotation:v})}function Kt(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Jt(r,t,e){return t*Math.cos(r)*(e?1:-1)}function ke(r,t,e){var a=r.get("borderRadius");if(a==null)return e?{cornerRadius:0}:null;Q(a)||(a=[a,a,a,a]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:ee(a,function(i){return rl(i,n)})}}var Ga=Math.max,Oa=Math.min;function Gs(r,t){var e=r.getArea&&r.getArea();if(Gt(r,"cartesian2d")){var a=r.getBaseAxis();if(a.type!=="category"||!a.onBand){var n=t.getLayout("bandWidth");a.isHorizontal()?(e.x-=n,e.width+=n*2):(e.y-=n,e.height+=n*2)}}return e}var Os=(function(r){B(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,a,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,a,n):this._renderNormal(e,a,n,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,a){this._progressiveEls=[],this._incrementalRenderLarge(e,a)},t.prototype.eachRendered=function(e){Sa(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e,a,n,i){var o=this.group,l=e.getData(),s=this._data,u=e.coordinateSystem,v=u.getBaseAxis(),c;u.type==="cartesian2d"?c=v.isHorizontal():u.type==="polar"&&(c=v.dim==="angle");var h=e.isAnimationEnabled()?e:null,f=Bs(e,u);f&&this._enableRealtimeSort(f,l,n);var g=e.get("clip",!0)||f,p=Gs(u,l);o.removeClipPath();var d=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),S=y.get("borderRadius")||0,b=[],w=this._backgroundEls,D=i&&i.isInitSort,_=i&&i.type==="changeAxisOrder";function x(A){var L=Qt[u.type](l,A);if(!L)return null;var M=Xs(u,c,L);return M.useStyle(y.getItemStyle()),u.type==="cartesian2d"?M.setShape("r",S):M.setShape("cornerRadius",S),b[A]=M,M}l.diff(s).add(function(A){var L=l.getItemModel(A),M=Qt[u.type](l,A,L);if(M&&(m&&x(A),!(!l.hasValue(A)||!An[u.type](M)))){var V=!1;g&&(V=wn[u.type](p,M));var N=Dn[u.type](e,l,A,M,c,h,v.model,!1,d);f&&(N.forceLabelAnimation=!0),In(N,l,A,L,M,e,c,u.type==="polar"),D?N.attr({shape:M}):f?_n(f,h,N,M,A,c,!1,!1):ve(N,{shape:M},e,A),l.setItemGraphicEl(A,N),o.add(N),N.ignore=V}}).update(function(A,L){var M=l.getItemModel(A),V=Qt[u.type](l,A,M);if(V){if(m){var N=void 0;w.length===0?N=x(L):(N=w[L],N.useStyle(y.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",S):N.setShape("cornerRadius",S),b[A]=N);var T=Qt[u.type](l,A),E=vo(c,T,u);J(N,{shape:E},h,A)}var C=s.getItemGraphicEl(L);if(!l.hasValue(A)||!An[u.type](V)){o.remove(C);return}var R=!1;g&&(R=wn[u.type](p,V),R&&o.remove(C));var k=C&&(C.type==="sector"&&d||C.type==="sausage"&&!d);if(k&&(C&&et(C,e,L),C=null),C?Ee(C):C=Dn[u.type](e,l,A,V,c,h,v.model,!0,d),f&&(C.forceLabelAnimation=!0),_){var z=C.getTextContent();if(z){var G=Mi(z);G.prevValue!=null&&(G.prevValue=G.value)}}else In(C,l,A,M,V,e,c,u.type==="polar");D?C.attr({shape:V}):f?_n(f,h,C,V,A,c,!0,_):J(C,{shape:V},e,A,null),l.setItemGraphicEl(A,C),C.ignore=R,o.add(C)}}).remove(function(A){var L=s.getItemGraphicEl(A);L&&et(L,e,A)}).execute();var P=this._backgroundGroup||(this._backgroundGroup=new K);P.removeAll();for(var I=0;I<b.length;++I)P.add(b[I]);o.add(P),this._backgroundEls=b,this._data=l},t.prototype._renderLarge=function(e,a,n){this._clear(),Tn(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,a){this._removeBackground(),Tn(a,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var a=e.get("clip",!0)&&$t(e.coordinateSystem,!1,e),n=this.group;a?n.setClipPath(a):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,a,n){var i=this;if(a.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(a,e,n),this._isFirstFrame=!1;else{var l=function(s){var u=a.getItemGraphicEl(s),v=u&&u.shape;return v&&Math.abs(o.isHorizontal()?v.height:v.width)||0};this._onRendered=function(){i._updateSortWithinSameData(a,l,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,a,n){var i=[];return e.each(e.mapDimension(a.dim),function(o,l){var s=n(l);s=s??NaN,i.push({dataIndex:l,mappedValue:s,ordinalNumber:o})}),i.sort(function(o,l){return l.mappedValue-o.mappedValue}),{ordinalNumbers:ee(i,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,a,n){for(var i=n.scale,o=e.mapDimension(n.dim),l=Number.MAX_VALUE,s=0,u=i.getOrdinalMeta().categories.length;s<u;++s){var v=e.rawIndexOf(o,i.getRawOrdinalNumber(s)),c=v<0?Number.MIN_VALUE:a(e.indexOfRawIndex(v));if(c>l)return!0;l=c}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),l=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=l;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(l){return e.get(e.mapDimension(a.otherAxis.dim),l)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){et(i,e,ne(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(ae),wn={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=Ga(t.x,r.x),l=Oa(t.x+t.width,n),s=Ga(t.y,r.y),u=Oa(t.y+t.height,i),v=l<o,c=u<s;return t.x=v&&o>n?l:o,t.y=c&&s>i?u:s,t.width=v?0:l-o,t.height=c?0:u-s,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),v||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=Oa(t.r,r.r),i=Ga(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},Dn={cartesian2d:function(r,t,e,a,n,i,o,l,s){var u=new xe({shape:Y({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var v=u.shape,c=n?"height":"width";v[c]=0}return u},polar:function(r,t,e,a,n,i,o,l,s){var u=!n&&s?ha:Ue,v=new u({shape:a,z2:1});v.name="item";var c=uo(n);if(v.calculateTextPosition=ks(c,{isRoundCap:u===ha}),i){var h=v.shape,f=n?"r":"endAngle",g={};h[f]=n?a.r0:a.startAngle,g[f]=a[f],(l?J:ve)(v,{shape:g},i)}return v}};function Bs(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function _n(r,t,e,a,n,i,o,l){var s,u;i?(u={x:a.x,width:a.width},s={y:a.y,height:a.height}):(u={y:a.y,height:a.height},s={x:a.x,width:a.width}),l||(o?J:ve)(e,{shape:s},t,n,null);var v=t?r.baseAxis.model:null;(o?J:ve)(e,{shape:u},v,n)}function xn(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var Fs=["x","y","width","height"],Hs=["cx","cy","r","startAngle","endAngle"],An={cartesian2d:function(r){return!xn(r,Fs)},polar:function(r){return!xn(r,Hs)}},Qt={cartesian2d:function(r,t,e){var a=r.getItemLayout(t);if(!a)return null;var n=e?Us(e,a):0,i=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function Ws(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function uo(r){return(function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}})(r)}function In(r,t,e,a,n,i,o,l){var s=t.getItemVisual(e,"style");if(l){if(!i.get("roundCap")){var v=r.shape,c=ke(a.getModel("itemStyle"),v,!0);Y(v,c),r.setShape(v)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(s);var h=a.getShallow("cursor");h&&r.attr("cursor",h);var f=l?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",g=De(a);Ie(r,g,{labelFetcher:i,labelDataIndex:e,defaultText:Ot(i.getData(),e),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:f});var p=r.getTextContent();if(l&&p){var d=a.get(["label","position"]);r.textConfig.inside=d==="middle"?!0:null,zs(r,d==="outside"?f:d,uo(o),a.get(["label","rotate"]))}Ei(p,g,i.getRawValue(e),function(y){return Xi(t,y)});var m=a.getModel(["emphasis"]);ie(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),ce(r,a),Ws(n)&&(r.style.fill="none",r.style.stroke="none",O(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function Us(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var Zs=(function(){function r(){}return r})(),Ln=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new Zs},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,l=[],s=[],u=this.barWidth,v=0;v<n.length;v+=3)s[i]=u,s[o]=n[v+2],l[i]=n[v+i],l[o]=n[v+o],e.rect(l[0],l[1],s[0],s[1])},t})(_e);function Tn(r,t,e,a){var n=r.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),l=n.getLayout("size"),s=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var v=new Ln({shape:{points:u},incremental:!!a,silent:!0,z2:0});v.baseDimIdx=i,v.largeDataIndices=o,v.barWidth=l,v.useStyle(s.getItemStyle()),t.add(v),e&&e.push(v)}var c=new Ln({shape:{points:n.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=l,t.add(c),c.useStyle(n.getVisual("style")),c.style.stroke=null,ne(c).seriesIndex=r.seriesIndex,r.get("silent")||(c.on("mousedown",Cn),c.on("mousemove",Cn)),e&&e.push(c)}var Cn=Al(function(r){var t=this,e=$s(t,r.offsetX,r.offsetY);ne(t).dataIndex=e>=0?e:null},30,!1);function $s(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,l=[],s=[],u=r.barWidth,v=0,c=i.length/3;v<c;v++){var h=v*3;if(s[a]=u,s[n]=i[h+2],l[a]=i[h+a],l[n]=i[h+n],s[n]<0&&(l[n]+=s[n],s[n]=-s[n]),t>=l[0]&&t<=l[0]+s[0]&&e>=l[1]&&e<=l[1]+s[1])return o[v]}return-1}function vo(r,t,e){if(Gt(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function Xs(r,t,e){var a=r.type==="polar"?Ue:xe;return new a({shape:vo(t,e,r),silent:!0,z2:0})}function If(r){r.registerChartView(Os),r.registerSeriesModel(Es),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,me(Vi,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ki("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,so("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var Pn=Math.PI*2,ea=Math.PI/180;function Ys(r,t,e){t.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=zi(a,e),l=o.cx,s=o.cy,u=o.r,v=o.r0,c=o.viewRect,h=-a.get("startAngle")*ea,f=a.get("endAngle"),g=a.get("padAngle")*ea;f=f==="auto"?h-Pn:-f*ea;var p=a.get("minAngle")*ea,d=p+g,m=0;n.each(i,function(E){!isNaN(E)&&m++});var y=n.getSum(i),S=Math.PI/(y||m)*2,b=a.get("clockwise"),w=a.get("roseType"),D=a.get("stillShowZeroSum"),_=n.getDataExtent(i);_[0]=0;var x=b?1:-1,P=[h,f],I=x*g/2;xr(P,!b),h=P[0],f=P[1];var A=co(a);A.startAngle=h,A.endAngle=f,A.clockwise=b,A.cx=l,A.cy=s,A.r=u,A.r0=v;var L=Math.abs(f-h),M=L,V=0,N=h;if(n.setLayout({viewRect:c,r:u}),n.each(i,function(E,C){var R;if(isNaN(E)){n.setItemLayout(C,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:l,cy:s,r0:v,r:w?NaN:u});return}w!=="area"?R=y===0&&D?S:E*S:R=L/m,R<d?(R=d,M-=d):V+=E;var k=N+x*R,z=0,G=0;g>R?(z=N+x*R/2,G=z):(z=N+I,G=k-I),n.setItemLayout(C,{angle:R,startAngle:z,endAngle:G,clockwise:b,cx:l,cy:s,r0:v,r:w?Ce(E,_,[v,u]):u}),N=k}),M<Pn&&m)if(M<=.001){var T=L/m;n.each(i,function(E,C){if(!isNaN(E)){var R=n.getItemLayout(C);R.angle=T;var k=0,z=0;T<g?(k=h+x*(C+1/2)*T,z=k):(k=h+x*C*T+I,z=h+x*(C+1)*T-I),R.startAngle=k,R.endAngle=z}})}else S=M/V,N=h,n.each(i,function(E,C){if(!isNaN(E)){var R=n.getItemLayout(C),k=R.angle===d?d:E*S,z=0,G=0;k<g?(z=N+x*k/2,G=z):(z=N+I,G=N+x*k-I),R.startAngle=z,R.endAngle=G,N+=x*k}})})}var co=wt();function xt(r){return{seriesType:r,reset:function(t,e){var a=e.findComponents({mainType:"legend"});if(!(!a||!a.length)){var n=t.getData();n.filterSelf(function(i){for(var o=n.getName(i),l=0;l<a.length;l++)if(!a[l].isSelected(o))return!1;return!0})}}}}var qs=Math.PI/180;function Nn(r,t,e,a,n,i,o,l,s,u){if(r.length<2)return;function v(p){for(var d=p.rB,m=d*d,y=0;y<p.list.length;y++){var S=p.list[y],b=Math.abs(S.label.y-e),w=a+S.len,D=w*w,_=Math.sqrt(Math.abs((1-b*b/m)*D)),x=t+(_+S.len2)*n,P=x-S.label.x,I=S.targetTextWidth-P*n;ho(S,I,!0),S.label.x=x}}function c(p){for(var d={list:[],maxY:0},m={list:[],maxY:0},y=0;y<p.length;y++)if(p[y].labelAlignTo==="none"){var S=p[y],b=S.label.y>e?m:d,w=Math.abs(S.label.y-e);if(w>=b.maxY){var D=S.label.x-t-S.len2*n,_=a+S.len,x=Math.abs(D)<_?Math.sqrt(w*w/(1-D*D/_/_)):_;b.rB=x,b.maxY=w}b.list.push(S)}v(d),v(m)}for(var h=r.length,f=0;f<h;f++)if(r[f].position==="outer"&&r[f].labelAlignTo==="labelLine"){var g=r[f].label.x-u;r[f].linePoints[1][0]+=g,r[f].label.x=u}Kl(r,1,s,s+o)&&c(r)}function js(r,t,e,a,n,i,o,l){for(var s=[],u=[],v=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<r.length;h++){var f=r[h].label;Ba(r[h])||(f.x<t?(v=Math.min(v,f.x),s.push(r[h])):(c=Math.max(c,f.x),u.push(r[h])))}for(var h=0;h<r.length;h++){var g=r[h];if(!Ba(g)&&g.linePoints){if(g.labelStyleWidth!=null)continue;var f=g.label,p=g.linePoints,d=void 0;g.labelAlignTo==="edge"?f.x<t?d=p[2][0]-g.labelDistance-o-g.edgeDistance:d=o+n-g.edgeDistance-p[2][0]-g.labelDistance:g.labelAlignTo==="labelLine"?f.x<t?d=v-o-g.bleedMargin:d=o+n-c-g.bleedMargin:f.x<t?d=f.x-o-g.bleedMargin:d=o+n-f.x-g.bleedMargin,g.targetTextWidth=d,ho(g,d,!1)}}Nn(u,t,e,a,1,n,i,o,l,c),Nn(s,t,e,a,-1,n,i,o,l,v);for(var h=0;h<r.length;h++){var g=r[h];if(!Ba(g)&&g.linePoints){var f=g.label,p=g.linePoints,m=g.labelAlignTo==="edge",y=f.style.padding,S=y?y[1]+y[3]:0,b=f.style.backgroundColor?0:S,w=g.rect.width+b,D=p[1][0]-p[2][0];m?f.x<t?p[2][0]=o+g.edgeDistance+w+g.labelDistance:p[2][0]=o+n-g.edgeDistance-w-g.labelDistance:(f.x<t?p[2][0]=f.x+g.labelDistance:p[2][0]=f.x-g.labelDistance,p[1][0]=p[2][0]+D),p[1][1]=p[2][1]=f.y}}}function ho(r,t,e){if(r.labelStyleWidth==null){var a=r.label,n=a.style,i=r.rect,o=n.backgroundColor,l=n.padding,s=l?l[1]+l[3]:0,u=n.overflow,v=i.width+(o?0:s);if(t<v||e){if(u&&u.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",t-s);var c=a.getBoundingRect();a.setStyle("width",Math.ceil(c.width)),a.setStyle("backgroundColor",o)}else{var h=t-s,f=t<v?h:e?h>r.unconstrainedWidth?null:h:null;a.setStyle("width",f)}fo(i,a)}}}function fo(r,t){Mn.rect=r,jl(Mn,t,Ks)}var Ks={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Mn={};function Ba(r){return r.position==="center"}function Js(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*qs,l=t.getLayout("viewRect"),s=t.getLayout("r"),u=l.width,v=l.x,c=l.y,h=l.height;function f(D){D.ignore=!0}function g(D){if(!D.ignore)return!0;for(var _ in D.states)if(D.states[_].ignore===!1)return!0;return!1}t.each(function(D){var _=t.getItemGraphicEl(D),x=_.shape,P=_.getTextContent(),I=_.getTextGuideLine(),A=t.getItemModel(D),L=A.getModel("label"),M=L.get("position")||A.get(["emphasis","label","position"]),V=L.get("distanceToLabelLine"),N=L.get("alignTo"),T=W(L.get("edgeDistance"),u),E=L.get("bleedMargin");E==null&&(E=Math.min(u,h)>200?10:2);var C=A.getModel("labelLine"),R=C.get("length");R=W(R,u);var k=C.get("length2");if(k=W(k,u),Math.abs(x.endAngle-x.startAngle)<o){O(P.states,f),P.ignore=!0,I&&(O(I.states,f),I.ignore=!0);return}if(g(P)){var z=(x.startAngle+x.endAngle)/2,G=Math.cos(z),H=Math.sin(z),F,$,le,Se;a=x.cx,n=x.cy;var X=M==="inside"||M==="inner";if(M==="center")F=x.cx,$=x.cy,Se="center";else{var Z=(X?(x.r+x.r0)/2*G:x.r*G)+a,q=(X?(x.r+x.r0)/2*H:x.r*H)+n;if(F=Z+G*3,$=q+H*3,!X){var j=Z+G*(R+s-x.r),te=q+H*(R+s-x.r),ge=j+(G<0?-1:1)*k,be=te;N==="edge"?F=G<0?v+T:v+u-T:F=ge+(G<0?-V:V),$=be,le=[[Z,q],[j,te],[ge,be]]}Se=X?"center":N==="edge"?G>0?"right":"left":G>0?"left":"right"}var re=Math.PI,he=0,de=L.get("rotate");if(Ne(de))he=de*(re/180);else if(M==="center")he=0;else if(de==="radial"||de===!0){var $e=G<0?-z+re:-z;he=$e}else if(de==="tangential"&&M!=="outside"&&M!=="outer"){var Oe=Math.atan2(G,H);Oe<0&&(Oe=re*2+Oe);var Yt=H>0;Yt&&(Oe=re+Oe),he=Oe-re}if(i=!!he,P.x=F,P.y=$,P.rotation=he,P.setStyle({verticalAlign:"middle"}),X){P.setStyle({align:Se});var Ma=P.states.select;Ma&&(Ma.x+=P.x,Ma.y+=P.y)}else{var Na=new mt(0,0,0,0);fo(Na,P),e.push({label:P,labelLine:I,position:M,len:R,len2:k,minTurnAngle:C.get("minTurnAngle"),maxSurfaceAngle:C.get("maxSurfaceAngle"),surfaceNormal:new fe(G,H),linePoints:le,textAlign:Se,labelDistance:V,labelAlignTo:N,edgeDistance:T,bleedMargin:E,rect:Na,unconstrainedWidth:Na.width,labelStyleWidth:P.style.width})}_.setTextConfig({inside:X})}}),!i&&r.get("avoidLabelOverlap")&&js(e,a,n,s,u,h,v,c);for(var p=0;p<e.length;p++){var d=e[p],m=d.label,y=d.labelLine,S=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:d.textAlign}),S&&(O(m.states,f),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var w=d.linePoints;S||!w?(O(y.states,f),y.ignore=!0):(fs(w,d.minTurnAngle),gs(w,d.surfaceNormal,d.maxSurfaceAngle),y.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new fe(w[0][0],w[0][1])})}}}var Qs=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;i.z2=2;var o=new Re;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,l=e.hostModel,s=e.getItemModel(a),u=s.getModel("emphasis"),v=e.getItemLayout(a),c=Y(ke(s.getModel("itemStyle"),v,!0),v);if(isNaN(c.startAngle)){o.setShape(c);return}if(i){o.setShape(c);var h=l.getShallow("animationType");l.ecModel.ssr?(ve(o,{scaleX:0,scaleY:0},l,{dataIndex:a,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=v.r0,ve(o,{shape:{r:v.r}},l,a)):n!=null?(o.setShape({startAngle:n,endAngle:n}),ve(o,{shape:{startAngle:v.startAngle,endAngle:v.endAngle}},l,a)):(o.shape.endAngle=v.startAngle,J(o,{shape:{endAngle:v.endAngle}},l,a))}else Ee(o),J(o,{shape:c},l,a);o.useStyle(e.getItemVisual(a,"style")),ce(o,s);var f=(v.startAngle+v.endAngle)/2,g=l.get("selectedOffset"),p=Math.cos(f)*g,d=Math.sin(f)*g,m=s.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(l,e,a),o.ensureState("emphasis").shape=Y({r:v.r+(u.get("scale")&&u.get("scaleSize")||0)},ke(u.getModel("itemStyle"),v)),Y(o.ensureState("select"),{x:p,y:d,shape:ke(s.getModel(["select","itemStyle"]),v)}),Y(o.ensureState("blur"),{shape:ke(s.getModel(["blur","itemStyle"]),v)});var y=o.getTextGuideLine(),S=o.getTextContent();y&&Y(y.ensureState("select"),{x:p,y:d}),Y(S.ensureState("select"),{x:p,y:d}),ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this,o=a.getItemModel(n),l=o.getModel("labelLine"),s=a.getItemVisual(n,"style"),u=s&&s.fill,v=s&&s.opacity;Ie(i,De(o),{labelFetcher:a.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:v,defaultText:e.getFormattedLabel(n,"normal")||a.getName(n)});var c=i.getTextContent();i.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=o.get(["label","position"]);if(h!=="outside"&&h!=="outer")i.removeTextGuideLine();else{var f=this.getTextGuideLine();f||(f=new bt,this.setTextGuideLine(f)),Qi(this,eo(o),{stroke:u,opacity:ht(l.get(["lineStyle","opacity"]),v,1)})}},t})(Ue),eu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n,i){var o=e.getData(),l=this._data,s=this.group,u;if(!l&&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&&s.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var h=co(e),f=new Ue({shape:dt(h)});f.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=f,s.add(f)}o.diff(l).add(function(g){var p=new Qs(o,g,u);o.setItemGraphicEl(g,p),s.add(p)}).update(function(g,p){var d=l.getItemGraphicEl(p);d.updateData(o,g,u),d.off("click"),s.add(d),o.setItemGraphicEl(g,d)}).remove(function(g){var p=l.getItemGraphicEl(g);et(p,e,g)}).execute(),Js(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,l=e[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},t.type="pie",t})(ae);function At(r,t,e){t=Q(t)&&{coordDimensions:t}||Y({encodeDefine:r.getEncode()},t);var a=r.getSource(),n=xa(a,t).dimensions,i=new ct(n,r);return i.initData(a,e),i}var It=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r})(),tu=wt(),go=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new It(ue(this.getData,this),ue(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return At(this,{coordDimensions:["value"],encodeDefaulter:me(Tr,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=tu(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(s){o.push(s)}),i=n.seats=Il(o,a.hostModel.get("percentPrecision"))}var l=r.prototype.getDataParams.call(this,e);return l.percent=i[e]||0,l.$vars.push("percent"),l},t.prototype._defaultLabelLine=function(e){Cr(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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"},t})(oe);Ll({fullType:go.type,getCoord2:function(r){return r.getShallow("center")}});function au(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(Ne(o)&&!isNaN(o)&&o<0)})}}}function Lf(r){r.registerChartView(eu),r.registerSeriesModel(go),Gi("pie",r.registerAction),r.registerLayout(me(Ys,"pie")),r.registerProcessor(xt("pie")),r.registerProcessor(au("pie"))}var ru=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Ze(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:U.color.primary}},universalTransition:{divideShape:"clone"}},t})(oe),po=4,nu=(function(){function r(){}return r})(),iu=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new nu},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,l=o.shape,s=e.getContext?e.getContext():e,u=s&&i[0]<po,v=this.softClipShape,c;if(u){this._ctx=s;return}for(this._ctx=null,c=this._off;c<n.length;){var h=n[c++],f=n[c++];isNaN(h)||isNaN(f)||v&&!v.contain(h,f)||(l.x=h-i[0]/2,l.y=f-i[1]/2,l.width=i[0],l.height=i[1],o.buildPath(e,l,!0))}this.incremental&&(this._off=c,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,a=e.points,n=e.size,i=this._ctx,o=this.softClipShape,l;if(i){for(l=this._off;l<a.length;){var s=a[l++],u=a[l++];isNaN(s)||isNaN(u)||o&&!o.contain(s,u)||i.fillRect(s-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=l,this.notClear=!0)}},t.prototype.findDataIndex=function(e,a){for(var n=this.shape,i=n.points,o=n.size,l=Math.max(o[0],4),s=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var v=u*2,c=i[v]-l/2,h=i[v+1]-s/2;if(e>=c&&a>=h&&e<=c+l&&a<=h+s)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],l=i[1],s=1/0,u=1/0,v=-1/0,c=-1/0,h=0;h<n.length;){var f=n[h++],g=n[h++];s=Math.min(f,s),v=Math.max(f,v),u=Math.min(g,u),c=Math.max(g,c)}e=this._rect=new mt(s-o/2,u-l/2,v-s+o,c-u+l)}return e},t})(_e),ou=(function(){function r(){this.group=new K}return r.prototype.updateData=function(t,e){this._clear();var a=this._create();a.setShape({points:t.getLayout("points")}),this._setCommon(a,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var n=(a.endIndex-a.startIndex)*2,i=a.startIndex*4*2;e=new Float32Array(e.buffer,i,n)}a.setShape("points",e),a.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,a){var n=this._newAdded[0],i=e.getLayout("points"),o=n&&n.shape.points;if(o&&o.length<2e4){var l=o.length,s=new Float32Array(l+i.length);s.set(o),s.set(i,l),n.endIndex=t.end,n.setShape({points:s})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,e,a)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new iu({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,a){var n=e.hostModel;a=a||{};var i=e.getVisual("symbolSize");t.setShape("size",i instanceof Array?i:[i,i]),t.softClipShape=a.clipShape||null,t.symbolProxy=Ge(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<po;t.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var l=e.getVisual("style"),s=l&&l.fill;s&&t.setColor(s);var u=ne(t);u.seriesIndex=n.seriesIndex,t.on("mousemove",function(v){u.dataIndex=null;var c=t.hoverDataIdx;c>=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),lu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Xt("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new ou:new Aa,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(ae);function Tf(r){ba(Jl),r.registerSeriesModel(ru),r.registerChartView(lu),r.registerLayout(Xt("scatter"))}function su(r){r.eachSeriesByType("radar",function(t){var e=t.getData(),a=[],n=t.coordinateSystem;if(n){var i=n.getIndicatorAxes();O(i,function(o,l){e.each(e.mapDimension(i[l].dim),function(s,u){a[u]=a[u]||[];var v=n.dataToPoint(s,l);a[u][l]=Rn(v)?v:En(n)})}),e.each(function(o){var l=nl(a[o],function(s){return Rn(s)})||En(n);a[o].push(l.slice()),e.setItemLayout(o,a[o])})}})}function Rn(r){return!isNaN(r[0])&&!isNaN(r[1])}function En(r){return[r.cx,r.cy]}function uu(r){var t=r.polar;if(t){Q(t)||(t=[t]);var e=[];O(t,function(a,n){a.indicator?(a.type&&!a.shape&&(a.shape=a.type),r.radar=r.radar||[],Q(r.radar)||(r.radar=[r.radar]),r.radar.push(a)):e.push(a)}),r.polar=e}O(r.series,function(a){a&&a.type==="radar"&&a.polarIndex&&(a.radarIndex=a.polarIndex)})}var vu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.coordinateSystem,o=this.group,l=e.getData(),s=this._data;function u(h,f){var g=h.getItemVisual(f,"symbol")||"circle";if(g!=="none"){var p=Oi(h.getItemVisual(f,"symbolSize")),d=Ge(g,-1,-1,2,2),m=h.getItemVisual(f,"symbolRotate")||0;return d.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:m*Math.PI/180||0}),d}}function v(h,f,g,p,d,m){g.removeAll();for(var y=0;y<f.length-1;y++){var S=u(p,d);S&&(S.__dimIdx=y,h[y]?(S.setPosition(h[y]),wa[m?"initProps":"updateProps"](S,{x:f[y][0],y:f[y][1]},e,d)):S.setPosition(f[y]),g.add(S))}}function c(h){return ee(h,function(f){return[i.cx,i.cy]})}l.diff(s).add(function(h){var f=l.getItemLayout(h);if(f){var g=new Pr,p=new bt,d={shape:{points:f}};g.shape.points=c(f),p.shape.points=c(f),ve(g,d,e,h),ve(p,d,e,h);var m=new K,y=new K;m.add(p),m.add(g),m.add(y),v(p.shape.points,f,y,l,h,!0),l.setItemGraphicEl(h,m)}}).update(function(h,f){var g=s.getItemGraphicEl(f),p=g.childAt(0),d=g.childAt(1),m=g.childAt(2),y={shape:{points:l.getItemLayout(h)}};y.shape.points&&(v(p.shape.points,y.shape.points,m,l,h,!1),Ee(d),Ee(p),J(p,y,e),J(d,y,e),l.setItemGraphicEl(h,g))}).remove(function(h){o.remove(s.getItemGraphicEl(h))}).execute(),l.eachItemGraphicEl(function(h,f){var g=l.getItemModel(f),p=h.childAt(0),d=h.childAt(1),m=h.childAt(2),y=l.getItemVisual(f,"style"),S=y.fill;o.add(h),p.useStyle(ze(g.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:S})),ce(p,g,"lineStyle"),ce(d,g,"areaStyle");var b=g.getModel("areaStyle"),w=b.isEmpty()&&b.parentModel.isEmpty();d.ignore=w,O(["emphasis","select","blur"],function(_){var x=g.getModel([_,"areaStyle"]),P=x.isEmpty()&&x.parentModel.isEmpty();d.ensureState(_).ignore=P&&w;var I=g.getModel([_,"lineStyle"]).getLineStyle();p.ensureState(_).style=I;var A=x.getAreaStyle();d.ensureState(_).style=A;var L=g.getModel([_,"itemStyle"]).getItemStyle();m.eachChild(function(M){M.ensureState(_).style=dt(L)})}),d.useStyle(ze(g.getModel("areaStyle").getAreaStyle(),{fill:S,opacity:.7,decal:y.decal}));var D=g.getModel("emphasis");m.eachChild(function(_){if(_ instanceof Ut){var x=_.style;_.useStyle(Y({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},y))}else _.useStyle(y),_.setColor(S),_.style.strokeNoScale=!0;var P=l.getStore().get(l.getDimensionIndex(_.__dimIdx),f);(P==null||isNaN(P))&&(P=""),Ie(_,De(g),{labelFetcher:l.hostModel,labelDataIndex:f,labelDimIndex:_.__dimIdx,defaultText:P,inheritColor:S,defaultOpacity:y.opacity})}),ie(h,D.get("focus"),D.get("blurScope"),D.get("disabled"))}),this._data=l},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t})(ae),cu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new It(ue(this.getData,this),ue(this.getRawData,this))},t.prototype.getInitialData=function(e,a){return At(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.coordinateSystem,l=o.getIndicatorAxes(),s=this.getData().getName(e),u=s===""?this.name:s,v=Tl(this,e);return Le("section",{header:u,sortBlocks:!0,blocks:ee(l,function(c){var h=i.get(i.mapDimension(c.dim),e);return Le("nameValue",{markerType:"subItem",markerColor:v,name:c.name,value:h,sortParam:h})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var a=this.getData(),n=this.coordinateSystem,i=a.getValues(ee(n.dimensions,function(u){return a.mapDimension(u)}),e),o=0,l=i.length;o<l;o++)if(!isNaN(i[o])){var s=n.getIndicatorAxes();return n.coordToPoint(s[o].dataToCoord(i[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t})(oe);function Cf(r){ba(Ql),r.registerChartView(vu),r.registerSeriesModel(cu),r.registerLayout(su),r.registerProcessor(xt("radar")),r.registerPreprocessor(uu)}var hu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===e.id){var l=this._mapDraw;l&&o.add(l.group)}else if(e.needsDrawMap){var l=this._mapDraw||new es(n);o.add(l.group),l.draw(e,a,n,this,i),this._mapDraw=l}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&a.getComponent("legend")&&this._renderSymbols(e,a,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,a,n){var i=e.originalData,o=this.group;i.each(i.mapDimension("value"),function(l,s){if(!isNaN(l)){var u=i.getItemLayout(s);if(!(!u||!u.point)){var v=u.point,c=u.offset,h=new Bi({style:{fill:e.getData().getVisual("style").fill},shape:{cx:v[0]+c*9,cy:v[1],r:3},silent:!0,z2:8+(c?0:Zt+1)});if(!c){var f=e.mainSeries.getData(),g=i.getName(s),p=f.indexOfName(g),d=i.getItemModel(s),m=d.getModel("label"),y=f.getItemGraphicEl(p);Ie(h,De(d),{labelFetcher:{getFormattedLabel:function(S,b){return e.getFormattedLabel(p,b)}},defaultText:g}),h.disableLabelAnimation=!0,m.get("position")||h.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(S){sa(h,S)}}o.add(h)}}})},t.type="map",t})(ae),fu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.needsDrawMap=!1,e.seriesGroup=[],e.getTooltipPosition=function(a){if(a!=null){var n=this.getData().getName(a),i=this.coordinateSystem,o=i.getRegion(n);return o&&i.dataToPoint(o.getCenter())}},e}return t.prototype.getInitialData=function(e){for(var a=At(this,{coordDimensions:["value"],encodeDefaulter:me(Tr,this)}),n=vt(),i=[],o=0,l=a.count();o<l;o++){var s=a.getName(o);n.set(s,o)}var u=ts.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return O(u.regions,function(v){var c=v.name,h=n.get(c),f=v.properties&&v.properties.echartsStyle,g;h==null?(g={name:c},i.push(g)):g=a.getRawDataItem(h),f&&il(g,f)}),a.appendData(i),a},t.prototype.getHostGeoModel=function(){if(Cl(this).kind!==Pl.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var a=this.getData();return a.get(a.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var a=this.getData();return a.getItemModel(a.indexOfName(e))},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData(),o=this.getRawValue(e),l=i.getName(e),s=this.seriesGroup,u=[],v=0;v<s.length;v++){var c=s[v].originalData.indexOfName(l),h=i.mapDimension("value");isNaN(s[v].originalData.get(h,c))||u.push(s[v].name)}return Le("section",{header:u.join(", "),noHeader:!u.length,blocks:[Le("nameValue",{name:l,value:o})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var a=e.icon||"roundRect",n=Ge(a,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",a.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill=U.color.neutral00,n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.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:U.color.tertiary},itemStyle:{borderWidth:.5,borderColor:U.color.border,areaColor:U.color.background},emphasis:{label:{show:!0,color:U.color.primary},itemStyle:{areaColor:U.color.highlight}},select:{label:{show:!0,color:U.color.primary},itemStyle:{color:U.color.highlight}},nameProperty:"name"},t})(oe);function gu(r,t){var e={};return O(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);e[o]=e[o]||[],isNaN(n)||e[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,l=1/0,s=-1/0,u=e[i].length,v=0;v<u;v++)l=Math.min(l,e[i][v]),s=Math.max(s,e[i][v]),o+=e[i][v];var c;return t==="min"?c=l:t==="max"?c=s:t==="average"?c=o/u:c=o,u===0?NaN:c})}function pu(r){var t={};r.eachSeriesByType("map",function(e){var a=e.getHostGeoModel(),n=a?"o"+a.id:"i"+e.getMapType();(t[n]=t[n]||[]).push(e)}),O(t,function(e,a){for(var n=gu(ee(e,function(o){return o.getData()}),e[0].get("mapValueCalculation")),i=0;i<e.length;i++)e[i].originalData=e[i].getData();for(var i=0;i<e.length;i++)e[i].seriesGroup=e,e[i].needsDrawMap=i===0&&!e[i].getHostGeoModel(),e[i].setData(n.cloneShallow()),e[i].mainSeries=e[0]})}function du(r){var t={};r.eachSeriesByType("map",function(e){var a=e.getMapType();if(!(e.getHostGeoModel()||t[a])){var n={};O(e.seriesGroup,function(o){var l=o.coordinateSystem,s=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&s.each(s.mapDimension("value"),function(u,v){var c=s.getName(v),h=l.getRegion(c);if(!(!h||isNaN(u))){var f=n[c]||0,g=l.dataToPoint(h.getCenter());n[c]=f+1,s.setItemLayout(v,{point:g,offset:f})}})});var i=e.getData();i.each(function(o){var l=i.getName(o),s=i.getItemLayout(o)||{};s.showLabel=!n[l],i.setItemLayout(o,s)}),t[a]=!0}})}function Pf(r){ba(as),r.registerChartView(hu),r.registerSeriesModel(fu),r.registerLayout(du),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,pu),Gi("map",r.registerAction)}function yu(r){var t=r;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],a,n;a=e.pop();)if(n=a.children,a.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var l=n[o];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(l)}}function mu(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){bu(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=wu(r,n,r.parentNode.hierNode.defaultAncestor||a[0],t)}function Su(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Vn(r){return arguments.length?r:xu}function Nt(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function bu(r){for(var t=r.children,e=t.length,a=0,n=0;--e>=0;){var i=t[e];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function wu(r,t,e,a){if(t){for(var n=r,i=r,o=i.parentNode.children[0],l=t,s=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=l.hierNode.modifier;l=Fa(l),i=Ha(i),l&&i;){n=Fa(n),o=Ha(o),n.hierNode.ancestor=r;var h=l.hierNode.prelim+c-i.hierNode.prelim-u+a(l,i);h>0&&(_u(Du(l,r,e),r,h),u+=h,s+=h),c+=l.hierNode.modifier,u+=i.hierNode.modifier,s+=n.hierNode.modifier,v+=o.hierNode.modifier}l&&!Fa(n)&&(n.hierNode.thread=l,n.hierNode.modifier+=c-s),i&&!Ha(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,e=r)}return e}function Fa(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function Ha(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function Du(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function _u(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function xu(r,t){return r.parentNode===t.parentNode?1:2}var Au=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),Iu=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Au},t.prototype.buildPath=function(e,a){var n=a.childPoints,i=n.length,o=a.parentPoint,l=n[0],s=n[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(l[0],l[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,h=W(a.forkPosition,1),f=[];f[v]=o[v],f[c]=o[c]+(s[c]-o[c])*h,e.moveTo(o[0],o[1]),e.lineTo(f[0],f[1]),e.moveTo(l[0],l[1]),f[v]=l[v],e.lineTo(f[0],f[1]),f[v]=s[v],e.lineTo(f[0],f[1]),e.lineTo(s[0],s[1]);for(var g=1;g<i-1;g++){var p=n[g];e.moveTo(p[0],p[1]),f[v]=p[v],e.lineTo(f[0],f[1])}},t})(_e),Lu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new K,e}return t.prototype.init=function(e,a){this._controller=new La(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,n){var i=e.getData(),o=e.layoutInfo,l=this._mainGroup,s=e.get("layout");s==="radial"?(l.x=o.x+o.width/2,l.y=o.y+o.height/2):(l.x=o.x,l.y=o.y),this._updateViewCoordSys(e,n),this._updateController(e,null,a,n);var u=this._data;i.diff(u).add(function(v){kn(i,v)&&zn(i,v,null,l,e)}).update(function(v,c){var h=u.getItemGraphicEl(c);if(!kn(i,v)){h&&On(u,c,h,l,e);return}zn(i,v,h,l,e)}).remove(function(v){var c=u.getItemGraphicEl(v);c&&On(u,v,c,l,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),e.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,c){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:c})})}),this._data=i},t.prototype._updateViewCoordSys=function(e,a){var n=e.getData(),i=[];n.each(function(c){var h=n.getItemLayout(c);h&&!isNaN(h.x)&&!isNaN(h.y)&&i.push([+h.x,+h.y])});var o=[],l=[];Ti(i,o,l);var s=this._min,u=this._max;l[0]-o[0]===0&&(o[0]=s?s[0]:o[0]-1,l[0]=u?u[0]:l[0]+1),l[1]-o[1]===0&&(o[1]=s?s[1]:o[1]-1,l[1]=u?u[1]:l[1]+1);var v=e.coordinateSystem=new Ta(null,{api:a,ecModel:e.ecModel});v.zoomLimit=e.get("scaleLimit"),v.setBoundingRect(o[0],o[1],l[0]-o[0],l[1]-o[1]),v.setCenter(e.get("center")),v.setZoom(e.get("zoom")),this.group.attr({x:v.x,y:v.y,scaleX:v.scaleX,scaleY:v.scaleY}),this._min=o,this._max=l},t.prototype._updateController=function(e,a,n,i){var o=this;Yi(e,i,this.group,this._controller,this._controllerHost,a),this._controller.on("zoom",function(l){o._updateNodeAndLinkScale(e)})},t.prototype._updateNodeAndLinkScale=function(e){var a=e.getData(),n=this._getNodeGlobalScale(e);a.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var a=e.coordinateSystem;if(a.type!=="view")return 1;var n=this._nodeScaleRatio,i=a.scaleX||1,o=a.getZoom(),l=(o-1)*n+1;return l/i},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t})(ae);function kn(r,t){var e=r.getItemLayout(t);return e&&!isNaN(e.x)&&!isNaN(e.y)}function zn(r,t,e,a,n){var i=!e,o=r.tree.getNodeByDataIndex(t),l=o.getModel(),s=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?s:U.color.neutral00,v=r.tree.root,c=o.parentNode===v?o:o.parentNode||o,h=r.getItemGraphicEl(c.dataIndex),f=c.getLayout(),g=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:f,p=o.getLayout();i?(e=new Ia(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.x=g.x,e.y=g.y):e.updateData(r,t,null,{symbolInnerColor:u,useNameLabel:!0}),e.__radialOldRawX=e.__radialRawX,e.__radialOldRawY=e.__radialRawY,e.__radialRawX=p.rawX,e.__radialRawY=p.rawY,a.add(e),r.setItemGraphicEl(t,e),e.__oldX=e.x,e.__oldY=e.y,J(e,{x:p.x,y:p.y},n);var d=e.getSymbolPath();if(n.get("layout")==="radial"){var m=v.children[0],y=m.getLayout(),S=m.children.length,b=void 0,w=void 0;if(p.x===y.x&&o.isExpand===!0&&m.children.length){var D={x:(m.children[0].getLayout().x+m.children[S-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[S-1].getLayout().y)/2};b=Math.atan2(D.y-y.y,D.x-y.x),b<0&&(b=Math.PI*2+b),w=D.x<y.x,w&&(b=b-Math.PI)}else b=Math.atan2(p.y-y.y,p.x-y.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(w=p.x<y.x,w&&(b=b-Math.PI)):(w=p.x>y.x,w||(b=b-Math.PI));var _=w?"left":"right",x=l.getModel("label"),P=x.get("rotate"),I=P*(Math.PI/180),A=d.getTextContent();A&&(d.setTextConfig({position:x.get("position")||_,rotation:P==null?-b:I,origin:"center"}),A.setStyle("verticalAlign","middle"))}var L=l.get(["emphasis","focus"]),M=L==="relative"?oa(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;M&&(ne(e).focus=M),Tu(n,o,v,e,g,f,p,a),e.__edge&&(e.onHoverStateChange=function(V){if(V!=="blur"){var N=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);N&&N.hoverState===Nl||sa(e.__edge,V)}})}function Tu(r,t,e,a,n,i,o,l){var s=t.getModel(),u=r.get("edgeShape"),v=r.get("layout"),c=r.getOrient(),h=r.get(["lineStyle","curveness"]),f=r.get("edgeForkPosition"),g=s.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=a.__edge=new Ml({shape:yr(v,c,h,n,n)})),J(p,{shape:yr(v,c,h,i,o)},r));else if(u==="polyline"&&v==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var d=t.children,m=[],y=0;y<d.length;y++){var S=d[y].getLayout();m.push([S.x,S.y])}p||(p=a.__edge=new Iu({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:f}})),J(p,{shape:{parentPoint:[o.x,o.y],childPoints:m}},r)}p&&!(u==="polyline"&&!t.isExpand)&&(p.useStyle(ze({strokeNoScale:!0,fill:null},g)),ce(p,s,"lineStyle"),va(p),l.add(p))}function Gn(r,t,e,a,n){var i=t.tree.root,o=yo(i,r),l=o.source,s=o.sourceLayout,u=t.getItemGraphicEl(r.dataIndex);if(u){var v=t.getItemGraphicEl(l.dataIndex),c=v.__edge,h=u.__edge||(l.isExpand===!1||l.children.length===1?c:void 0),f=a.get("edgeShape"),g=a.get("layout"),p=a.get("orient"),d=a.get(["lineStyle","curveness"]);h&&(f==="curve"?ua(h,{shape:yr(g,p,d,s,s),style:{opacity:0}},a,{cb:function(){e.remove(h)},removeOpt:n}):f==="polyline"&&a.get("layout")==="orthogonal"&&ua(h,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},a,{cb:function(){e.remove(h)},removeOpt:n}))}}function yo(r,t){for(var e=t.parentNode===r?t:t.parentNode||t,a;a=e.getLayout(),a==null;)e=e.parentNode===r?e:e.parentNode||e;return{source:e,sourceLayout:a}}function On(r,t,e,a,n){var i=r.tree.getNodeByDataIndex(t),o=r.tree.root,l=yo(o,i).sourceLayout,s={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};ua(e,{x:l.x+1,y:l.y+1},n,{cb:function(){a.remove(e),r.setItemGraphicEl(t,null)},removeOpt:s}),e.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:s}),i.children.forEach(function(u){Gn(u,r,a,n,s)}),Gn(i,r,a,n,s)}function yr(r,t,e,a,n){var i,o,l,s,u,v,c,h;if(r==="radial"){u=a.rawX,c=a.rawY,v=n.rawX,h=n.rawY;var f=Nt(u,c),g=Nt(u,c+(h-c)*e),p=Nt(v,h+(c-h)*e),d=Nt(v,h);return{x1:f.x||0,y1:f.y||0,x2:d.x||0,y2:d.y||0,cpx1:g.x||0,cpy1:g.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=a.x,c=a.y,v=n.x,h=n.y,(t==="LR"||t==="RL")&&(i=u+(v-u)*e,o=c,l=v+(u-v)*e,s=h),(t==="TB"||t==="BT")&&(i=u,o=c+(h-c)*e,l=v,s=h+(c-h)*e);return{x1:u,y1:c,x2:v,y2:h,cpx1:i,cpy1:o,cpx2:l,cpy2:s}}var Pe=wt();function mo(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,So(t,e,r),O(e,function(a){O(t.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,me(Cu,r))})}),t.wrapMethod("cloneShallow",me(Nu,r)),O(t.CHANGABLE_METHODS,function(a){t.wrapMethod(a,me(Pu,r))}),ol(e[t.dataType]===t)}function Cu(r,t){if(Eu(this)){var e=Y({},Pe(this).datas);e[this.dataType]=t,So(t,e,r)}else Rr(t,this.dataType,Pe(this).mainData,r);return t}function Pu(r,t){return r.struct&&r.struct.update(),t}function Nu(r,t){return O(Pe(t).datas,function(e,a){e!==t&&Rr(e.cloneShallow(),a,t,r)}),t}function Mu(r){var t=Pe(this).mainData;return r==null||t==null?t:Pe(t).datas[r]}function Ru(){var r=Pe(this).mainData;return r==null?[{data:r}]:ee(ll(Pe(r).datas),function(t){return{type:t,data:Pe(r).datas[t]}})}function Eu(r){return Pe(r).mainData===r}function So(r,t,e){Pe(r).datas={},O(t,function(a,n){Rr(a,n,r,e)})}function Rr(r,t,e,a){Pe(e).datas[t]=r,Pe(r).mainData=e,r.dataType=t,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=r),r.getLinkedData=Mu,r.getLinkedDataAll=Ru}var Vu=(function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,a){Ae(t)&&(a=e,e=t,t=null),t=t||{},Me(t)&&(t={order:t});var n=t.order||"preorder",i=this[t.attr||"children"],o;n==="preorder"&&(o=e.call(a,this));for(var l=0;!o&&l<i.length;l++)i[l].eachNode(t,e,a);n==="postorder"&&e.call(a,this)},r.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var a=0;a<this.children.length;a++){var n=this.children[a];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e<n;e++){var i=a[e].getNodeById(t);if(i)return i}},r.prototype.contains=function(t){if(t===this)return!0;for(var e=0,a=this.children,n=a.length;e<n;e++){var i=a[e].contains(t);if(i)return i}},r.prototype.getAncestors=function(t){for(var e=[],a=t?this:this.parentNode;a;)e.push(a),a=a.parentNode;return e.reverse(),e},r.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},r.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},r.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},r.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},r.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},r.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},r})(),Er=(function(){function r(t){this.type="tree",this._nodes=[],this.hostModel=t}return r.prototype.eachNode=function(t,e,a){this.root.eachNode(t,e,a)},r.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},r.prototype.getNodeById=function(t){return this.root.getNodeById(t)},r.prototype.update=function(){for(var t=this.data,e=this._nodes,a=0,n=e.length;a<n;a++)e[a].dataIndex=-1;for(var a=0,n=t.count();a<n;a++)e[t.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(t,e,a){var n=new r(e),i=[],o=1;l(t);function l(v,c){var h=v.value;o=Math.max(o,Q(h)?h.length:1),i.push(v);var f=new Vu(Da(v.name,""),n);c?ku(f,c):n.root=f,n._nodes.push(f);var g=v.children;if(g)for(var p=0;p<g.length;p++)l(g[p],f)}n.root.updateDepthAndHeight(0);var s=xa(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new ct(s,e);return u.initData(i),a&&a(u),mo({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r})();function ku(r,t){var e=t.children;r.parentNode!==t&&(e.push(r),r.parentNode=t)}function Ft(r,t,e){if(r&&St(t,r.type)>=0){var a=e.getData().tree.root,n=r.targetNode;if(Me(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function bo(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function Vr(r,t){var e=bo(r);return St(e,t)>=0}function Ca(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var zu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},n=e.leaves||{},i=new at(n,this,this.ecModel),o=Er.createTree(a,this,l);function l(c){c.wrapMethod("getItemModel",function(h,f){var g=o.getNodeByDataIndex(f);return g&&g.children.length&&g.isExpand||(h.parentModel=i),h})}var s=0;o.eachNode("preorder",function(c){c.depth>s&&(s=c.depth)});var u=e.expandAndCollapse,v=u&&e.initialTreeDepth>=0?e.initialTreeDepth:s;return o.root.eachNode("preorder",function(c){var h=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=h&&h.collapsed!=null?!h.collapsed:c.depth<=v}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData().tree,o=i.root.children[0],l=i.getNodeByDataIndex(e),s=l.getValue(),u=l.name;l&&l!==o;)u=l.parentNode.name+"."+u,l=l.parentNode;return Le("nameValue",{name:u,value:s,noValue:isNaN(s)||s==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Ca(n,this),a.collapsed=!n.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:U.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(oe);function Gu(r,t,e){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var l=0;l<o.length;l++)a.push(o[l])}for(;i=n.pop();)t(i,e)}function Lt(r,t){for(var e=[r],a;a=e.pop();)if(t(a),a.isExpand){var n=a.children;if(n.length)for(var i=n.length-1;i>=0;i--)e.push(n[i])}}function Ou(r,t){r.eachSeriesByType("tree",function(e){Bu(e,t)})}function Bu(r,t){var e=Dt(r,t).refContainer,a=_t(r.getBoxLayoutParams(),e);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,l=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,l=Vn(function(b,w){return(b.parentNode===w.parentNode?1:2)/b.depth})):(i=a.width,o=a.height,l=Vn());var s=r.getData().tree.root,u=s.children[0];if(u){yu(s),Gu(u,mu,l),s.hierNode.modifier=-u.hierNode.prelim,Lt(u,Su);var v=u,c=u,h=u;Lt(u,function(b){var w=b.getLayout().x;w<v.getLayout().x&&(v=b),w>c.getLayout().x&&(c=b),b.depth>h.depth&&(h=b)});var f=v===c?1:l(v,c)/2,g=f-v.getLayout().x,p=0,d=0,m=0,y=0;if(n==="radial")p=i/(c.getLayout().x+f+g),d=o/(h.depth-1||1),Lt(u,function(b){m=(b.getLayout().x+g)*p,y=(b.depth-1)*d;var w=Nt(m,y);b.setLayout({x:w.x,y:w.y,rawX:m,rawY:y},!0)});else{var S=r.getOrient();S==="RL"||S==="LR"?(d=o/(c.getLayout().x+f+g),p=i/(h.depth-1||1),Lt(u,function(b){y=(b.getLayout().x+g)*d,m=S==="LR"?(b.depth-1)*p:i-(b.depth-1)*p,b.setLayout({x:m,y},!0)})):(S==="TB"||S==="BT")&&(p=i/(c.getLayout().x+f+g),d=o/(h.depth-1||1),Lt(u,function(b){m=(b.getLayout().x+g)*p,y=S==="TB"?(b.depth-1)*d:o-(b.depth-1)*d,b.setLayout({x:m,y},!0)}))}}}function Fu(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),l=e.ensureUniqueItemVisual(n.dataIndex,"style");Y(l,o)})})}function Hu(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var n=t.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=n.coordinateSystem,o=Nr(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function Nf(r){r.registerChartView(Lu),r.registerSeriesModel(zu),r.registerLayout(Ou),r.registerVisual(Fu),Hu(r)}var Bn=["treemapZoomToNode","treemapRender","treemapMove"];function Wu(r){for(var t=0;t<Bn.length;t++)r.registerAction({type:Bn[t],update:"updateView"},cr);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,a){a.eachComponent({mainType:"series",subType:"treemap",query:e},n);function n(i,o){var l=["treemapZoomToNode","treemapRootToNode"],s=Ft(e,l,i);if(s){var u=i.getViewRoot();u&&(e.direction=Vr(u,s.node)?"rollUp":"drillDown"),i.resetViewRoot(s.node)}}})}function wo(r){var t=r.getData(),e=t.tree,a={};e.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=Rl(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var Uu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};Do(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},l=new at({itemStyle:o},this,a);i=e.levels=Zu(i,a);var s=ee(i||[],function(c){return new at(c,l,a)},this),u=Er.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(h,f){var g=u.getNodeByDataIndex(f),p=g?s[g.depth]:null;return h.parentModel=p||l,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),l=i.getName(e);return Le("nameValue",{name:l,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Ca(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},Y(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=vt(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){wo(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:U.size.l,top:U.size.xxxl,right:U.size.l,bottom:U.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:U.size.m,emptyItemWidth:25,itemStyle:{color:U.color.backgroundShade,textStyle:{color:U.color.secondary}},emphasis:{itemStyle:{color:U.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:U.color.neutral00,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:U.color.neutral00,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:[]},t})(oe);function Do(r){var t=0;O(r.children,function(a){Do(a);var n=a.value;Q(n)&&(n=n[0]),t+=n});var e=r.value;Q(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Q(r.value)?r.value[0]=e:r.value=e}function Zu(r,t){var e=on(t.get("color")),a=on(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;O(r,function(l){var s=new at(l),u=s.get("color"),v=s.get("decal");(s.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(s.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}var $u=8,Fn=8,Wa=5,Xu=(function(){function r(t){this.group=new K,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var l=i.getModel("itemStyle"),s=i.getModel("emphasis"),u=l.getModel("textStyle"),v=s.getModel(["itemStyle","textStyle"]),c=Dt(t,e).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},f={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},g=_t(h,c);this._prepare(a,f,u),this._renderContent(t,f,g,l,s,u,v,n),El(o,h,c)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=Da(n.getModel().get("name"),""),o=a.getTextRect(i),l=Math.max(o.width+$u*2,e.emptyItemWidth);e.totalWidth+=l+Fn,e.renderList.push({node:n,text:i,width:l})}},r.prototype._renderContent=function(t,e,a,n,i,o,l,s){for(var u=0,v=e.emptyItemWidth,c=t.get(["breadcrumb","height"]),h=e.totalWidth,f=e.renderList,g=i.getModel("itemStyle").getItemStyle(),p=f.length-1;p>=0;p--){var d=f[p],m=d.node,y=d.width,S=d.text;h>a.width&&(h-=y-v,y=v,S=null);var b=new Pr({shape:{points:Yu(u,0,y,c,p===f.length-1,p===0)},style:ze(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Re({style:Be(o,{text:S})}),textConfig:{position:"inside"},z2:Zt*1e4,onclick:me(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=Be(l,{text:S}),b.ensureState("emphasis").style=g,ie(b,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(b),qu(b,t,m),u+=y+Fn}},r.prototype.remove=function(){this.group.removeAll()},r})();function Yu(r,t,e,a,n,i){var o=[[n?r:r-Wa,t],[r+e,t],[r+e,t+a],[n?r:r-Wa,t+a]];return!i&&o.splice(2,0,[r+e+Wa,t+a/2]),!n&&o.push([r,t+a/2]),o}function qu(r,t,e){ne(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&Ca(e,t)}}var ju=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._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:a,aborted:a})}return this},r})();function Ku(){return new ju}var mr=K,Hn=xe,Wn=3,Un="label",Zn="upperLabel",Ju=Zt*10,Qu=Zt*2,ev=Zt*3,it=Vl([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),$n=function(r){var t=it(r);return t.stroke=t.fill=t.lineWidth=null,t},fa=wt(),tv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=Tt(),e}return t.prototype.render=function(e,a,n,i){var o=a.findComponents({mainType:"series",subType:"treemap",query:i});if(!(St(o,e)<0)){this.seriesModel=e,this.api=n,this.ecModel=a;var l=["treemapZoomToNode","treemapRootToNode"],s=Ft(i,l,e),u=i&&i.type,v=e.layoutInfo,c=!this._oldTree,h=this._storage,f=u==="treemapRootToNode"&&s&&h?{rootNodeGroup:h.nodeGroup[s.node.getRawIndex()],direction:i.direction}:null,g=this._giveContainerGroup(v),p=e.get("animation"),d=this._doRender(g,e,f);p&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(g,d,e,f):d.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,s)}},t.prototype._giveContainerGroup=function(e){var a=this._containerGroup;return a||(a=this._containerGroup=new mr,this._initEvents(a),this.group.add(a)),a.x=e.x,a.y=e.y,a},t.prototype._doRender=function(e,a,n){var i=a.getData().tree,o=this._oldTree,l=Tt(),s=Tt(),u=this._storage,v=[];function c(y,S,b,w){return av(a,s,u,n,l,v,y,S,b,w)}p(i.root?[i.root]:[],o&&o.root?[o.root]:[],e,i===o||!o,0);var h=d(u);if(this._oldTree=i,this._storage=s,this._controllerHost){var f=this.seriesModel.layoutInfo,g=i.root.getLayout();g.width===f.width&&g.height===f.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:l,willDeleteEls:h,renderFinally:m};function p(y,S,b,w,D){w?(S=y,O(y,function(P,I){!P.isRemoved()&&x(I,I)})):new _a(S,y,_,_).add(x).update(x).remove(me(x,null)).execute();function _(P){return P.getId()}function x(P,I){var A=P!=null?y[P]:null,L=I!=null?S[I]:null,M=c(A,L,b,D);M&&p(A&&A.viewChildren||[],L&&L.viewChildren||[],M,w,D+1)}}function d(y){var S=Tt();return y&&O(y,function(b,w){var D=S[w];O(b,function(_){_&&(D.push(_),fa(_).willDelete=!0)})}),S}function m(){O(h,function(y){O(y,function(S){S.parent&&S.parent.remove(S)})}),O(v,function(y){y.invisible=!0,y.dirty()})}},t.prototype._doAnimation=function(e,a,n,i){var o=n.get("animationDurationUpdate"),l=n.get("animationEasing"),s=(Ae(o)?0:o)||0,u=(Ae(l)?null:l)||"cubicOut",v=Ku();O(a.willDeleteEls,function(c,h){O(c,function(f,g){if(!f.invisible){var p=f.parent,d,m=fa(p);if(i&&i.direction==="drillDown")d=p===i.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,S=0;m.willDelete||(y=m.nodeWidth/2,S=m.nodeHeight/2),d=h==="nodeGroup"?{x:y,y:S,style:{opacity:0}}:{shape:{x:y,y:S,width:0,height:0},style:{opacity:0}}}d&&v.add(f,d,s,0,u)}})}),O(this._storage,function(c,h){O(c,function(f,g){var p=a.lastsForAnimation[h][g],d={};p&&(f instanceof K?p.oldX!=null&&(d.x=f.x,d.y=f.y,f.x=p.oldX,f.y=p.oldY):(p.oldShape&&(d.shape=Y({},f.shape),f.setShape(p.oldShape)),p.fadein?(f.setStyle("opacity",0),d.style={opacity:1}):f.style.opacity!==1&&(d.style={opacity:1})),v.add(f,d,s,0,u))})},this),this._state="animating",v.finished(ue(function(){this._state="ready",a.renderFinally()},this)).start()},t.prototype._resetController=function(e){var a=this,n=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var o=this.seriesModel;n||(n=this._controller=new La(e.getZr()),n.on("pan",ue(this._onPan,this)),n.on("zoom",ue(this._onZoom,this))),n.enable(o.get("roam"),{api:e,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(l,s,u){var v=a._containerGroup;return v?v.getBoundingRect().contain(s-v.x,u-v.y):!1}}}),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.get("zoom")},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>Wn||Math.abs(e.dy)>Wn)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var a=e.originX,n=e.originY,i=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var l=o.getLayout();if(!l)return;var s=new mt(l.x,l.y,l.width,l.height),u=null,v=this._controllerHost;u=v.zoomLimit;var c=v.zoom=v.zoom||1;if(c*=i,u){var h=u.min||0,f=u.max||1/0;c=Math.max(Math.min(f,c),h)}var g=c/v.zoom;v.zoom=c;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var d=vl();Qr(d,d,[-a,-n]),sl(d,d,[g,g]),Qr(d,d,[a,n]),s.applyTransform(d),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var l=o.node;if(l.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),u=s.get("link",!0),v=s.get("target",!0)||"blank";u&&Fi(u,v)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Xu(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(Vr(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Tt(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var l=this._storage.background[o.getRawIndex()];if(l){var s=l.transformCoordToLocal(e,a),u=l.shape;if(u.x<=s[0]&&s[0]<=u.x+u.width&&u.y<=s[1]&&s[1]<=u.y+u.height)n={node:o,offsetX:s[0],offsetY:s[1]};else return!1}},this),n},t.type="treemap",t})(ae);function Tt(){return{nodeGroup:[],background:[],content:[]}}function av(r,t,e,a,n,i,o,l,s,u){if(!o)return;var v=o.getLayout(),c=r.getData(),h=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var f=v.width,g=v.height,p=v.borderWidth,d=v.invisible,m=o.getRawIndex(),y=l&&l.getRawIndex(),S=o.viewChildren,b=v.upperHeight,w=S&&S.length,D=h.getModel("itemStyle"),_=h.getModel(["emphasis","itemStyle"]),x=h.getModel(["blur","itemStyle"]),P=h.getModel(["select","itemStyle"]),I=D.get("borderRadius")||0,A=$("nodeGroup",mr);if(!A)return;if(s.add(A),A.x=v.x||0,A.y=v.y||0,A.markRedraw(),fa(A).nodeWidth=f,fa(A).nodeHeight=g,v.isAboveViewRoot)return A;var L=$("background",Hn,u,Qu);L&&k(A,L,w&&v.upperLabelHeight);var M=h.getModel("emphasis"),V=M.get("focus"),N=M.get("blurScope"),T=M.get("disabled"),E=V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():V;if(w)ln(A)&&jt(A,!1),L&&(jt(L,!T),c.setItemGraphicEl(o.dataIndex,L),sn(L,E,N));else{var C=$("content",Hn,u,ev);C&&z(A,C),L.disableMorphing=!0,L&&ln(L)&&jt(L,!1),jt(A,!T),c.setItemGraphicEl(o.dataIndex,A);var R=h.getShallow("cursor");R&&C.attr("cursor",R),sn(A,E,N)}return A;function k(X,Z,q){var j=ne(Z);if(j.dataIndex=o.dataIndex,j.seriesIndex=r.seriesIndex,Z.setShape({x:0,y:0,width:f,height:g,r:I}),d)G(Z);else{Z.invisible=!1;var te=o.getVisual("style"),ge=te.stroke,be=$n(D);be.fill=ge;var re=it(_);re.fill=_.get("borderColor");var he=it(x);he.fill=x.get("borderColor");var de=it(P);if(de.fill=P.get("borderColor"),q){var $e=f-2*p;H(Z,ge,te.opacity,{x:p,y:0,width:$e,height:b})}else Z.removeTextContent();Z.setStyle(be),Z.ensureState("emphasis").style=re,Z.ensureState("blur").style=he,Z.ensureState("select").style=de,va(Z)}X.add(Z)}function z(X,Z){var q=ne(Z);q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex;var j=Math.max(f-2*p,0),te=Math.max(g-2*p,0);if(Z.culling=!0,Z.setShape({x:p,y:p,width:j,height:te,r:I}),d)G(Z);else{Z.invisible=!1;var ge=o.getVisual("style"),be=ge.fill,re=$n(D);re.fill=be,re.decal=ge.decal;var he=it(_),de=it(x),$e=it(P);H(Z,be,ge.opacity,null),Z.setStyle(re),Z.ensureState("emphasis").style=he,Z.ensureState("blur").style=de,Z.ensureState("select").style=$e,va(Z)}X.add(Z)}function G(X){!X.invisible&&i.push(X)}function H(X,Z,q,j){var te=h.getModel(j?Zn:Un),ge=Da(h.get("name"),null),be=te.getShallow("show");Ie(X,De(h,j?Zn:Un),{defaultText:be?ge:null,inheritColor:Z,defaultOpacity:q,labelFetcher:r,labelDataIndex:o.dataIndex});var re=X.getTextContent();if(re){var he=re.style,de=ul(he.padding||0);j&&(X.setTextConfig({layoutRect:j}),re.disableLabelLayout=!0),re.beforeUpdate=function(){var Oe=Math.max((j?j.width:X.shape.width)-de[1]-de[3],0),Yt=Math.max((j?j.height:X.shape.height)-de[0]-de[2],0);(he.width!==Oe||he.height!==Yt)&&re.setStyle({width:Oe,height:Yt})},he.truncateMinChar=2,he.lineOverflow="truncate",F(he,j,v);var $e=re.getState("emphasis");F($e?$e.style:null,j,v)}}function F(X,Z,q){var j=X?X.text:null;if(!Z&&q.isLeafRoot&&j!=null){var te=r.get("drillDownIcon",!0);X.text=te?te+" "+j:j}}function $(X,Z,q,j){var te=y!=null&&e[X][y],ge=n[X];return te?(e[X][y]=null,le(ge,te)):d||(te=new Z,te instanceof Ci&&(te.z2=rv(q,j)),Se(ge,te)),t[X][m]=te}function le(X,Z){var q=X[m]={};Z instanceof mr?(q.oldX=Z.x,q.oldY=Z.y):q.oldShape=Y({},Z.shape)}function Se(X,Z){var q=X[m]={},j=o.parentNode,te=Z instanceof K;if(j&&(!a||a.direction==="drillDown")){var ge=0,be=0,re=n.background[j.getRawIndex()];!a&&re&&re.oldShape&&(ge=re.oldShape.width,be=re.oldShape.height),te?(q.oldX=0,q.oldY=be):q.oldShape={x:ge,y:be,width:0,height:0}}q.fadein=!te}}function rv(r,t){return r*Ju+t}var nv="itemStyle",_o=wt();const iv={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||xo(e,{},r.getViewRoot().getAncestors(),r)}};function xo(r,t,e,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var l=n.getModel(nv),s=ov(l,t,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=l.get("borderColor"),c=l.get("borderColorSaturation"),h;c!=null&&(h=Xn(s),v=lv(c,h)),u.stroke=v;var f=r.viewChildren;if(!f||!f.length)h=Xn(s),u.fill=h;else{var g=sv(r,n,i,l,s,f);O(f,function(p,d){if(p.depth>=e.length||p===e[p.depth]){var m=uv(n,s,p,d,g,a);xo(p,m,e,a)}})}}}function ov(r,t,e){var a=Y({},t),n=e.designatedVisualItemStyle;return O(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Xn(r){var t=Ua(r,"color");if(t){var e=Ua(r,"colorAlpha"),a=Ua(r,"colorSaturation");return a&&(t=Pi(t,null,null,a)),e&&(t=cl(t,e)),t}}function lv(r,t){return t!=null?Pi(t,null,null,r):null}function Ua(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function sv(r,t,e,a,n,i){if(!(!i||!i.length)){var o=Za(t,"color")||n.color!=null&&n.color!=="none"&&(Za(t,"colorAlpha")||Za(t,"colorSaturation"));if(o){var l=t.get("visualMin"),s=t.get("visualMax"),u=e.dataExtent.slice();l!=null&&l<u[0]&&(u[0]=l),s!=null&&s>u[1]&&(u[1]=s);var v=t.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var h=new qi(c);return _o(h).drColorMappingBy=v,h}}}function Za(r,t){var e=r.get(t);return Q(e)&&e.length?{name:t,range:e}:null}function uv(r,t,e,a,n,i){var o=Y({},t);if(n){var l=n.type,s=l==="color"&&_o(n).drColorMappingBy,u=s==="index"?a:s==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[l]=n.mapValueToVisual(u)}return o}var Ht=Math.max,ga=Math.min,Yn=kt,kr=O,Ao=["itemStyle","borderWidth"],vv=["itemStyle","gapWidth"],cv=["upperLabel","show"],hv=["upperLabel","height"];const fv={seriesType:"treemap",reset:function(r,t,e,a){var n=r.option,i=Dt(r,e).refContainer,o=_t(r.getBoxLayoutParams(),i),l=n.size||[],s=W(Yn(o.width,l[0]),i.width),u=W(Yn(o.height,l[1]),i.height),v=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],h=Ft(a,c,r),f=v==="treemapRender"||v==="treemapMove"?a.rootRect:null,g=r.getViewRoot(),p=bo(g);if(v!=="treemapMove"){var d=v==="treemapZoomToNode"?Sv(r,h,g,s,u):f?[f.width,f.height]:[s,u],m=n.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var y={squareRatio:n.squareRatio,sort:m,leafDepth:n.leafDepth};g.hostTree.clearLayouts();var S={x:0,y:0,width:d[0],height:d[1],area:d[0]*d[1]};g.setLayout(S),Io(g,y,!1,0),S=g.getLayout(),kr(p,function(w,D){var _=(p[D+1]||g).getValue();w.setLayout(Y({dataExtent:[_,_],borderWidth:0,upperHeight:0},S))})}var b=r.getData().tree.root;b.setLayout(bv(o,f,h),!0),r.setLayoutInfo(o),Lo(b,new mt(-o.x,-o.y,e.getWidth(),e.getHeight()),p,g,0)}};function Io(r,t,e,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var l=r.getModel(),s=l.get(Ao),u=l.get(vv)/2,v=To(l),c=Math.max(s,v),h=s-u,f=c-u;r.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:v},!0),n=Ht(n-2*h,0),i=Ht(i-h-f,0);var g=n*i,p=gv(r,l,g,t,e,a);if(p.length){var d={x:h,y:f,width:n,height:i},m=ga(n,i),y=1/0,S=[];S.area=0;for(var b=0,w=p.length;b<w;){var D=p[b];S.push(D),S.area+=D.getLayout().area;var _=mv(S,m,t.squareRatio);_<=y?(b++,y=_):(S.area-=S.pop().getLayout().area,qn(S,m,d,u,!1),m=ga(d.width,d.height),S.length=S.area=0,y=1/0)}if(S.length&&qn(S,m,d,u,!0),!e){var x=l.get("childrenVisibleMin");x!=null&&g<x&&(e=!0)}for(var b=0,w=p.length;b<w;b++)Io(p[b],t,e,a+1)}}}function gv(r,t,e,a,n,i){var o=r.children||[],l=a.sort;l!=="asc"&&l!=="desc"&&(l=null);var s=a.leafDepth!=null&&a.leafDepth<=i;if(n&&!s)return r.viewChildren=[];o=Ar(o,function(f){return!f.isRemoved()}),dv(o,l);var u=yv(t,o,l);if(u.sum===0)return r.viewChildren=[];if(u.sum=pv(t,e,u.sum,l,o),u.sum===0)return r.viewChildren=[];for(var v=0,c=o.length;v<c;v++){var h=o[v].getValue()/u.sum*e;o[v].setLayout({area:h})}return s&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function pv(r,t,e,a,n){if(!a)return e;for(var i=r.get("visibleMin"),o=n.length,l=o,s=o-1;s>=0;s--){var u=n[a==="asc"?o-s-1:s].getValue();u/e*t<i&&(l=s,e-=u)}return a==="asc"?n.splice(0,o-l):n.splice(l,o-l),e}function dv(r,t){return t&&r.sort(function(e,a){var n=t==="asc"?e.getValue()-a.getValue():a.getValue()-e.getValue();return n===0?t==="asc"?e.dataIndex-a.dataIndex:a.dataIndex-e.dataIndex:n}),r}function yv(r,t,e){for(var a=0,n=0,i=t.length;n<i;n++)a+=t[n].getValue();var o=r.get("visualDimension"),l;return!t||!t.length?l=[NaN,NaN]:o==="value"&&e?(l=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&l.reverse()):(l=[1/0,-1/0],kr(t,function(s){var u=s.getValue(o);u<l[0]&&(l[0]=u),u>l[1]&&(l[1]=u)})),{sum:a,dataExtent:l}}function mv(r,t,e){for(var a=0,n=1/0,i=0,o=void 0,l=r.length;i<l;i++)o=r[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var s=r.area*r.area,u=t*t*e;return s?Ht(u*a/s,s/(u*n)):1/0}function qn(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,l=["x","y"],s=["width","height"],u=e[l[i]],v=t?r.area/t:0;(n||v>e[s[o]])&&(v=e[s[o]]);for(var c=0,h=r.length;c<h;c++){var f=r[c],g={},p=v?f.getLayout().area/v:0,d=g[s[o]]=Ht(v-2*a,0),m=e[l[i]]+e[s[i]]-u,y=c===h-1||m<p?m:p,S=g[s[i]]=Ht(y-2*a,0);g[l[o]]=e[l[o]]+ga(a,d/2),g[l[i]]=u+ga(a,S/2),u+=y,f.setLayout(g,!0)}e[l[o]]+=v,e[s[o]]-=v}function Sv(r,t,e,a,n){var i=(t||{}).node,o=[a,n];if(!i||i===e)return o;for(var l,s=a*n,u=s*r.option.zoomToNodeRatio;l=i.parentNode;){for(var v=0,c=l.children,h=0,f=c.length;h<f;h++)v+=c[h].getValue();var g=i.getValue();if(g===0)return o;u*=v/g;var p=l.getModel(),d=p.get(Ao),m=Math.max(d,To(p));u+=4*d*d+(3*d+m)*Math.pow(u,.5),u>un&&(u=un),i=l}u<s&&(u=s);var y=Math.pow(u/s,.5);return[a*y,n*y]}function bv(r,t,e){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!e)return a;var n=e.node,i=n.getLayout();if(!i)return a;for(var o=[i.width/2,i.height/2],l=n;l;){var s=l.getLayout();o[0]+=s.x,o[1]+=s.y,l=l.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function Lo(r,t,e,a,n){var i=r.getLayout(),o=e[n],l=o&&o===r;if(!(o&&!l||n===e.length&&r!==a)){r.setLayout({isInView:!0,invisible:!l&&!t.intersect(i),isAboveViewRoot:l},!0);var s=new mt(t.x-i.x,t.y-i.y,t.width,t.height);kr(r.viewChildren||[],function(u){Lo(u,s,e,a,n+1)})}}function To(r){return r.get(cv)?r.get(hv):0}function Mf(r){r.registerSeriesModel(Uu),r.registerChartView(tv),r.registerVisual(iv),r.registerLayout(fv),Wu(r)}function wv(r){var t=r.findComponents({mainType:"legend"});!t||!t.length||r.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),n=e.getGraph(),i=n.data,o=a.mapArray(a.getName);i.filterSelf(function(l){var s=i.getItemModel(l),u=s.getShallow("category");if(u!=null){Ne(u)&&(u=o[u]);for(var v=0;v<t.length;v++)if(!t[v].isSelected(u))return!1}return!0})})}function Dv(r){var t={};r.eachSeriesByType("graph",function(e){var a=e.getCategoriesData(),n=e.getData(),i={};a.each(function(o){var l=a.getName(o);i["ec-"+l]=o;var s=a.getItemModel(o),u=s.getModel("itemStyle").getItemStyle();u.fill||(u.fill=e.getColorFromPalette(l,t)),a.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],c=0;c<v.length;c++){var h=s.getShallow(v[c],!0);h!=null&&a.setItemVisual(o,v[c],h)}}),a.count()&&n.each(function(o){var l=n.getItemModel(o),s=l.getShallow("category");if(s!=null){Me(s)&&(s=i["ec-"+s]);var u=a.getItemVisual(s,"style"),v=n.ensureUniqueItemVisual(o,"style");Y(v,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++)n.setItemVisual(o,c[h],a.getItemVisual(s,c[h]))}})})}function ta(r){return r instanceof Array||(r=[r,r]),r}function _v(r){r.eachSeriesByType("graph",function(t){var e=t.getGraph(),a=t.getEdgeData(),n=ta(t.get("edgeSymbol")),i=ta(t.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",t.getModel("lineStyle").getLineStyle()),a.each(function(o){var l=a.getItemModel(o),s=e.getEdgeByIndex(o),u=ta(l.getShallow("symbol",!0)),v=ta(l.getShallow("symbolSize",!0)),c=l.getModel("lineStyle").getLineStyle(),h=a.ensureUniqueItemVisual(o,"style");switch(Y(h,c),h.stroke){case"source":{var f=s.node1.getVisual("style");h.stroke=f&&f.fill;break}case"target":{var f=s.node2.getVisual("style");h.stroke=f&&f.fill;break}}u[0]&&s.setVisual("fromSymbol",u[0]),u[1]&&s.setVisual("toSymbol",u[1]),v[0]&&s.setVisual("fromSymbolSize",v[0]),v[1]&&s.setVisual("toSymbolSize",v[1])})})}var Sr="-->",Pa=function(r){return r.get("autoCurveness")||null},Co=function(r,t){var e=Pa(r),a=20,n=[];if(Ne(e))a=e;else if(Q(e)){r.__curvenessList=e;return}t>a&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=n},Wt=function(r,t,e){var a=[r.id,r.dataIndex].join("."),n=[t.id,t.dataIndex].join(".");return[e.uid,a,n].join(Sr)},Po=function(r){var t=r.split(Sr);return[t[0],t[2],t[1]].join(Sr)},xv=function(r,t){var e=Wt(r.node1,r.node2,t);return t.__edgeMap[e]},Av=function(r,t){var e=br(Wt(r.node1,r.node2,t),t),a=br(Wt(r.node2,r.node1,t),t);return e+a},br=function(r,t){var e=t.__edgeMap;return e[r]?e[r].length:0};function Iv(r){Pa(r)&&(r.__curvenessList=[],r.__edgeMap={},Co(r))}function Lv(r,t,e,a){if(Pa(e)){var n=Wt(r,t,e),i=e.__edgeMap,o=i[Po(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(a)}}function zr(r,t,e,a){var n=Pa(t),i=Q(n);if(!n)return null;var o=xv(r,t);if(!o)return null;for(var l=-1,s=0;s<o.length;s++)if(o[s]===e){l=s;break}var u=Av(r,t);Co(t,u),r.lineStyle=r.lineStyle||{};var v=Wt(r.node1,r.node2,t),c=t.__curvenessList,h=i||u%2?0:1;if(o.isForward)return c[h+l];var f=Po(v),g=br(f,t),p=c[l+g+h];return a?i?n&&n[0]===0?(g+h)%2?p:-p:((g%2?0:1)+h)%2?p:-p:(g+h)%2?p:-p:c[l+g+h]}function No(r){var t=r.coordinateSystem;if(!(t&&t.type!=="view")){var e=r.getGraph();e.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),Gr(e,r)}}function Gr(r,t){r.eachEdge(function(e,a){var n=ht(e.getModel().get(["lineStyle","curveness"]),-zr(e,t,a,!0),0),i=Qe(e.node1.getLayout()),o=Qe(e.node2.getLayout()),l=[i,o];+n&&l.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),e.setLayout(l)})}function Tv(r,t){r.eachSeriesByType("graph",function(e){var a=e.get("layout"),n=e.coordinateSystem;if(n&&n.type!=="view"){var i=e.getData(),o=[];O(n.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var l=0;l<i.count();l++){for(var s=[],u=!1,v=0;v<o.length;v++){var c=i.get(o[v],l);isNaN(c)||(u=!0),s.push(c)}u?i.setItemLayout(l,n.dataToPoint(s)):i.setItemLayout(l,[NaN,NaN])}Gr(i.graph,e)}else(!a||a==="none")&&No(e)})}function Mt(r){var t=r.coordinateSystem;if(t.type!=="view")return 1;var e=r.option.nodeScaleRatio,a=t.scaleX,n=t.getZoom(),i=(n-1)*e+1;return i/a}function Rt(r){var t=r.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var jn=Math.PI,$a=[];function Or(r,t,e,a){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=r.getData(),l=o.graph,s=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:s,cy:u}),!!c){if(e){var h=n.pointToData(a),f=h[0],g=h[1],p=[f-s,g-u];Ir(p,p),hl(p,p,v),e.setLayout([s+p[0],u+p[1]],!0);var d=r.get(["circular","rotateLabel"]);Mo(e,d,s,u)}Cv[t](r,l,o,v,s,u,c),l.eachEdge(function(m,y){var S=ht(m.getModel().get(["lineStyle","curveness"]),zr(m,r,y),0),b=Qe(m.node1.getLayout()),w=Qe(m.node2.getLayout()),D,_=(b[0]+w[0])/2,x=(b[1]+w[1])/2;+S&&(S*=3,D=[s*S+_*(1-S),u*S+x*(1-S)]),m.setLayout([b,w,D])})}}}var Cv={value:function(r,t,e,a,n,i,o){var l=0,s=e.getSum("value"),u=Math.PI*2/(s||o);t.eachNode(function(v){var c=v.getValue("value"),h=u*(s?c:1)/2;l+=h,v.setLayout([a*Math.cos(l)+n,a*Math.sin(l)+i]),l+=h})},symbolSize:function(r,t,e,a,n,i,o){var l=0;$a.length=o;var s=Mt(r);t.eachNode(function(c){var h=Rt(c);isNaN(h)&&(h=2),h<0&&(h=0),h*=s;var f=Math.asin(h/2/a);isNaN(f)&&(f=jn/2),$a[c.dataIndex]=f,l+=f*2});var u=(2*jn-l)/o/2,v=0;t.eachNode(function(c){var h=u+$a[c.dataIndex];v+=h,(!c.getLayout()||!c.getLayout().fixed)&&c.setLayout([a*Math.cos(v)+n,a*Math.sin(v)+i]),v+=h})}};function Mo(r,t,e,a){var n=r.getGraphicEl();if(n){var i=r.getModel(),o=i.get(["label","rotate"])||0,l=n.getSymbolPath();if(t){var s=r.getLayout(),u=Math.atan2(s[1]-a,s[0]-e);u<0&&(u=Math.PI*2+u);var v=s[0]<e;v&&(u=u-Math.PI);var c=v?"left":"right";l.setTextConfig({rotation:-u,position:c,origin:"center"});var h=l.ensureState("emphasis");Y(h.textConfig||(h.textConfig={}),{position:c})}else l.setTextConfig({rotation:o*=Math.PI/180})}}function Pv(r){r.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&Or(t,"symbolSize")})}var ft=hr;function Nv(r,t,e){for(var a=r,n=t,i=e.rect,o=i.width,l=i.height,s=[i.x+o/2,i.y+l/2],u=e.gravity==null?.1:e.gravity,v=0;v<a.length;v++){var c=a[v];c.p||(c.p=fl(o*(Math.random()-.5)+s[0],l*(Math.random()-.5)+s[1])),c.pp=Qe(c.p),c.edges=null}var h=e.friction==null?.6:e.friction,f=h,g,p;return{warmUp:function(){f=h*.8},setFixed:function(d){a[d].fixed=!0},setUnfixed:function(d){a[d].fixed=!1},beforeStep:function(d){g=d},afterStep:function(d){p=d},step:function(d){g&&g(a,n);for(var m=[],y=a.length,S=0;S<n.length;S++){var b=n[S];if(!b.ignoreForceLayout){var w=b.n1,D=b.n2;Ct(m,D.p,w.p);var _=en(m)-b.d,x=D.w/(w.w+D.w);isNaN(x)&&(x=0),Ir(m,m),!w.fixed&&ft(w.p,w.p,m,x*_*f),!D.fixed&&ft(D.p,D.p,m,-(1-x)*_*f)}}for(var S=0;S<y;S++){var P=a[S];P.fixed||(Ct(m,s,P.p),ft(P.p,P.p,m,u*f))}for(var S=0;S<y;S++)for(var w=a[S],I=S+1;I<y;I++){var D=a[I];Ct(m,D.p,w.p);var _=en(m);_===0&&(gl(m,Math.random()-.5,Math.random()-.5),_=1);var A=(w.rep+D.rep)/_/_;!w.fixed&&ft(w.pp,w.pp,m,A),!D.fixed&&ft(D.pp,D.pp,m,-A)}for(var L=[],S=0;S<y;S++){var P=a[S];P.fixed||(Ct(L,P.p,P.pp),ft(P.p,P.p,L,f),we(P.pp,P.p))}f=f*.992;var M=f<.01;p&&p(a,n,M),d&&d(M)}}}function Mv(r){r.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!(e&&e.type!=="view"))if(t.get("layout")==="force"){var a=t.preservedPoints||{},n=t.getGraph(),i=n.data,o=n.edgeData,l=t.getModel("force"),s=l.get("initLayout");t.preservedPoints?i.each(function(S){var b=i.getId(S);i.setItemLayout(S,a[b]||[NaN,NaN])}):!s||s==="none"?No(t):s==="circular"&&Or(t,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),c=l.get("repulsion"),h=l.get("edgeLength"),f=Q(c)?c:[c,c],g=Q(h)?h:[h,h];g=[g[1],g[0]];var p=i.mapArray("value",function(S,b){var w=i.getItemLayout(b),D=Ce(S,u,f);return isNaN(D)&&(D=(f[0]+f[1])/2),{w:D,rep:D,fixed:i.getItemModel(b).get("fixed"),p:!w||isNaN(w[0])||isNaN(w[1])?null:w}}),d=o.mapArray("value",function(S,b){var w=n.getEdgeByIndex(b),D=Ce(S,v,g);isNaN(D)&&(D=(g[0]+g[1])/2);var _=w.getModel(),x=ht(w.getModel().get(["lineStyle","curveness"]),-zr(w,t,b,!0),0);return{n1:p[w.node1.dataIndex],n2:p[w.node2.dataIndex],d:D,curveness:x,ignoreForceLayout:_.get("ignoreForceLayout")}}),m=e.getBoundingRect(),y=Nv(p,d,{rect:m,gravity:l.get("gravity"),friction:l.get("friction")});y.beforeStep(function(S,b){for(var w=0,D=S.length;w<D;w++)S[w].fixed&&we(S[w].p,n.getNodeByIndex(w).getLayout())}),y.afterStep(function(S,b,w){for(var D=0,_=S.length;D<_;D++)S[D].fixed||n.getNodeByIndex(D).setLayout(S[D].p),a[i.getId(D)]=S[D].p;for(var D=0,_=b.length;D<_;D++){var x=b[D],P=n.getEdgeByIndex(D),I=x.n1.p,A=x.n2.p,L=P.getLayout();L=L?L.slice():[],L[0]=L[0]||[],L[1]=L[1]||[],we(L[0],I),we(L[1],A),+x.curveness&&(L[2]=[(I[0]+A[0])/2-(I[1]-A[1])*x.curveness,(I[1]+A[1])/2-(A[0]-I[0])*x.curveness]),P.setLayout(L)}}),t.forceLayout=y,t.preservedPoints=a,y.step()}else t.forceLayout=null})}function Rv(r,t,e){var a=Dt(r,t),n=Y(r.getBoxLayoutParams(),{aspect:e}),i=_t(n,a.refContainer);return zl(r,i,e)}function Ev(r,t){var e=[];return r.eachSeriesByType("graph",function(a){kl({targetModel:a,coordSysType:"view",coordSysProvider:n,isDefaultDataCoordSys:!0});function n(){var i=a.getData(),o=i.mapArray(function(g){var p=i.getItemModel(g);return[+p.get("x"),+p.get("y")]}),l=[],s=[];Ti(o,l,s),s[0]-l[0]===0&&(s[0]+=1,l[0]-=1),s[1]-l[1]===0&&(s[1]+=1,l[1]-=1);var u=(s[0]-l[0])/(s[1]-l[1]),v=Rv(a,t,u);isNaN(u)&&(l=[v.x,v.y],s=[v.x+v.width,v.y+v.height]);var c=s[0]-l[0],h=s[1]-l[1],f=new Ta(null,{api:t,ecModel:r});return f.zoomLimit=a.get("scaleLimit"),f.setBoundingRect(l[0],l[1],c,h),f.setViewRect(v.x,v.y,v.width,v.height),f.setCenter(a.get("center")),f.setZoom(a.get("zoom")),e.push(f),f}}),e}var Xa=[],Ya=[],qa=[],gt=Ni,ja=dl,Kn=Math.abs;function Jn(r,t,e){for(var a=r[0],n=r[1],i=r[2],o=1/0,l,s=e*e,u=.1,v=.1;v<=.9;v+=.1){Xa[0]=gt(a[0],n[0],i[0],v),Xa[1]=gt(a[1],n[1],i[1],v);var c=Kn(ja(Xa,t)-s);c<o&&(o=c,l=v)}for(var h=0;h<32;h++){var f=l+u;Ya[0]=gt(a[0],n[0],i[0],l),Ya[1]=gt(a[1],n[1],i[1],l),qa[0]=gt(a[0],n[0],i[0],f),qa[1]=gt(a[1],n[1],i[1],f);var c=ja(Ya,t)-s;if(Kn(c)<.01)break;var g=ja(qa,t)-s;u/=2,c<0?g>=0?l=l+u:l=l-u:g>=0?l=l-u:l=l+u}return l}function Ka(r,t){var e=[],a=pl,n=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(l,s){var u=l.getLayout(),v=l.getVisual("fromSymbol"),c=l.getVisual("toSymbol");u.__original||(u.__original=[Qe(u[0]),Qe(u[1])],u[2]&&u.__original.push(Qe(u[2])));var h=u.__original;if(u[2]!=null){if(we(n[0],h[0]),we(n[1],h[2]),we(n[2],h[1]),v&&v!=="none"){var f=Rt(l.node1),g=Jn(n,h[0],f*t);a(n[0][0],n[1][0],n[2][0],g,e),n[0][0]=e[3],n[1][0]=e[4],a(n[0][1],n[1][1],n[2][1],g,e),n[0][1]=e[3],n[1][1]=e[4]}if(c&&c!=="none"){var f=Rt(l.node2),g=Jn(n,h[1],f*t);a(n[0][0],n[1][0],n[2][0],g,e),n[1][0]=e[1],n[2][0]=e[2],a(n[0][1],n[1][1],n[2][1],g,e),n[1][1]=e[1],n[2][1]=e[2]}we(u[0],n[0]),we(u[1],n[2]),we(u[2],n[1])}else{if(we(i[0],h[0]),we(i[1],h[1]),Ct(o,i[1],i[0]),Ir(o,o),v&&v!=="none"){var f=Rt(l.node1);hr(i[0],i[0],o,f*t)}if(c&&c!=="none"){var f=Rt(l.node2);hr(i[1],i[1],o,-f*t)}we(u[0],i[0]),we(u[1],i[1])}})}function Qn(r){return r.type==="view"}var Vv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var n=new Aa,i=new ji,o=this.group,l=new K;this._controller=new La(a.getZr()),this._controllerHost={target:l},l.add(n.group),l.add(i.group),o.add(l),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=l,this._firstRender=!0},t.prototype.render=function(e,a,n){var i=this,o=e.coordinateSystem,l=!1;this._model=e,this._api=n,this._active=!0;var s=this._getThumbnailInfo();s&&s.bridge.reset(n);var u=this._symbolDraw,v=this._lineDraw;if(Qn(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(c):J(this._mainGroup,c,e)}Ka(e.getGraph(),Mt(e));var h=e.getData();u.updateData(h);var f=e.getEdgeData();v.updateData(f),this._updateNodeAndLinkScale(),this._updateController(null,e,n),clearTimeout(this._layoutTimeout);var g=e.forceLayout,p=e.get(["force","layoutAnimation"]);g&&(l=!0,this._startForceLayoutIteration(g,n,p));var d=e.get("layout");h.graph.eachNode(function(b){var w=b.dataIndex,D=b.getGraphicEl(),_=b.getModel();if(D){D.off("drag").off("dragend");var x=_.get("draggable");x&&D.on("drag",function(I){switch(d){case"force":g.warmUp(),!i._layouting&&i._startForceLayoutIteration(g,n,p),g.setFixed(w),h.setItemLayout(w,[D.x,D.y]);break;case"circular":h.setItemLayout(w,[D.x,D.y]),b.setLayout({fixed:!0},!0),Or(e,"symbolSize",b,[I.offsetX,I.offsetY]),i.updateLayout(e);break;case"none":default:h.setItemLayout(w,[D.x,D.y]),Gr(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){g&&g.setUnfixed(w)}),D.setDraggable(x,!!_.get("cursor"));var P=_.get(["emphasis","focus"]);P==="adjacency"&&(ne(D).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var w=b.getGraphicEl(),D=b.getModel().get(["emphasis","focus"]);w&&D==="adjacency"&&(ne(w).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var m=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),y=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){Mo(b,m,y,S)}),this._firstRender=!1,l||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a,n){var i=this,o=!1;(function l(){e.step(function(s){i.updateLayout(i._model),(s||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!s)&&(n?i._layoutTimeout=setTimeout(l,16):l())})})()},t.prototype._updateController=function(e,a,n){var i=this._controller,o=this._controllerHost,l=a.coordinateSystem;if(!Qn(l)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(s,u,v){return l.containPoint([u,v])},isInClip:function(s,u,v){return!e||e.contain(u,v)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=l.getZoom(),i.off("pan").off("zoom").on("pan",function(s){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:s.dx,dy:s.dy})}).on("zoom",function(s){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:s.scale,originX:s.originX,originY:s.originY})})},t.prototype.updateViewOnPan=function(e,a,n){this._active&&(rs(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(e,a,n){this._active&&(ns(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),Ka(e.getGraph(),Mt(e)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),n=Mt(e);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(Ka(e.getGraph(),Mt(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,a=e.coordinateSystem;if(a.type==="view"){var n=is(e);if(n)return{bridge:n,coordSys:a}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(e.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(e,a,n,i){var o=this._getThumbnailInfo();if(o){var l=new K,s=n.group.children(),u=i.group.children(),v=new K,c=new K;l.add(c),l.add(v);for(var h=0;h<s.length;h++){var f=s[h],g=f.children()[0],p=f.x,d=f.y,m=dt(g.shape),y=Y(m,{width:g.scaleX,height:g.scaleY,x:p-g.scaleX/2,y:d-g.scaleY/2}),S=dt(g.style),b=new g.constructor({shape:y,style:S,z2:151});c.add(b)}for(var h=0;h<u.length;h++){var f=u[h],w=f.children()[0],S=dt(w.style),y=dt(w.shape),D=new os({style:S,shape:y,z2:151});v.add(D)}o.bridge.renderContent({api:a,roamType:e.get("roam"),viewportRect:null,group:l,targetTrans:o.coordSys.transform})}},t.type="graph",t})(ae);function pt(r){return"_EC_"+r}var kv=(function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var a=this._nodesMap;if(!a[pt(t)]){var n=new ot(t,e);return n.hostGraph=this,this.nodes.push(n),a[pt(t)]=n,n}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[pt(t)]},r.prototype.addEdge=function(t,e,a){var n=this._nodesMap,i=this._edgesMap;if(Ne(t)&&(t=this.nodes[t]),Ne(e)&&(e=this.nodes[e]),t instanceof ot||(t=n[pt(t)]),e instanceof ot||(e=n[pt(e)]),!(!t||!e)){var o=t.id+"-"+e.id,l=new Ro(t,e,a);return l.hostGraph=this,this._directed&&(t.outEdges.push(l),e.inEdges.push(l)),t.edges.push(l),t!==e&&e.edges.push(l),this.edges.push(l),i[o]=l,l}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof ot&&(t=t.id),e instanceof ot&&(e=e.id);var a=this._edgesMap;return this._directed?a[t+"-"+e]:a[t+"-"+e]||a[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var a=this.nodes,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof ot||(e=this._nodesMap[pt(e)]),!!e){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(n,e,null))for(var l=[e];l.length;)for(var s=l.shift(),u=s[i],o=0;o<u.length;o++){var v=u[o],c=v.node1===s?v.node2:v.node1;if(!c.__visited){if(t.call(n,c,s))return;l.push(c),c.__visited=!0}}}},r.prototype.update=function(){for(var t=this.data,e=this.edgeData,a=this.nodes,n=this.edges,i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(l){var s=n[e.getRawIndex(l)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var t=new r(this._directed),e=this.nodes,a=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(var n=0;n<a.length;n++){var i=a[n];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},r})(),ot=(function(){function r(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=e??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var a=this.edges[e];a.dataIndex<0||(t.edge.push(a.dataIndex),t.node.push(a.node1.dataIndex,a.node2.dataIndex))}return t},r.prototype.getTrajectoryDataIndices=function(){for(var t=vt(),e=vt(),a=0,n=this.edges.length;a<n;a++){var i=this.edges[a];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],l=[i.node2],s=0;s<o.length;){var u=o[s];s++,e.set(u.dataIndex,!0);for(var v=u.inEdges,c=0,h=v.length,f=void 0,g=void 0;c<h;c++)f=v[c],g=f.dataIndex,g>=0&&!t.hasKey(g)&&(t.set(g,!0),o.push(f.node1))}for(s=0;s<l.length;){var p=l[s];s++,e.set(p.dataIndex,!0);for(var d=p.outEdges,c=0,m=d.length,y=void 0,S=void 0;c<m;c++)y=d[c],S=y.dataIndex,S>=0&&!t.hasKey(S)&&(t.set(S,!0),l.push(y.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),Ro=(function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=vt(),e=vt();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i<a.length;){var o=a[i];i++,e.set(o.dataIndex,!0);for(var l=o.inEdges,s=0,u=l.length,v=void 0,c=void 0;s<u;s++)v=o.inEdges[s],c=v.dataIndex,c>=0&&!t.hasKey(c)&&(t.set(c,!0),a.push(v.node1))}for(i=0;i<n.length;){var h=n[i];i++,e.set(h.dataIndex,!0);for(var f=h.outEdges,s=0,u=f.length,g=void 0,p=void 0;s<u;s++)g=h.outEdges[s],p=g.dataIndex,p>=0&&!t.hasKey(p)&&(t.set(p,!0),n.push(g.node2))}return{edge:t.keys(),node:e.keys()}},r})();function Eo(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}ya(ot,Eo("hostGraph","data"));ya(Ro,Eo("hostGraph","edgeData"));function Br(r,t,e,a,n){for(var i=new kv(a),o=0;o<r.length;o++)i.addNode(kt(r[o].id,r[o].name,o),o);for(var l=[],s=[],u=0,o=0;o<t.length;o++){var v=t[o],c=v.source,h=v.target;i.addEdge(c,h,u)&&(s.push(v),l.push(kt(Da(v.id,null),c+" > "+h)),u++)}var f=e.get("coordinateSystem"),g;if(f==="cartesian2d"||f==="polar"||f==="matrix")g=Ze(r,e);else{var p=Hi.get(f),d=p?p.dimensions||[]:[];St(d,"value")<0&&d.concat(["value"]);var m=xa(r,{coordDimensions:d,encodeDefine:e.getEncode()}).dimensions;g=new ct(m,e),g.initData(r)}var y=new ct(["value"],e);return y.initData(s,l),n&&n(g,y),mo({mainData:g,struct:i,structAttr:"graph",datas:{node:g,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var zv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new It(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Cr(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&n){Iv(this);var l=Br(i,n,this,!0,s);return O(l.edges,function(u){Lv(u.node1,u.node2,this,u.dataIndex)},this),l.data}function s(u,v){u.wrapMethod("getItemModel",function(g){var p=o._categoriesModels,d=g.getShallow("category"),m=p[d];return m&&(m.parentModel=g.parentModel,g.parentModel=m),g});var c=at.prototype.getModel;function h(g,p){var d=c.call(this,g,p);return d.resolveParentPath=f,d}v.wrapMethod("getItemModel",function(g){return g.resolveParentPath=f,g.getModel=h,g});function f(g){if(g&&(g[0]==="label"||g[1]==="label")){var p=g.slice();return g[0]==="label"?p[0]="edgeLabel":g[1]==="label"&&(p[1]="edgeLabel"),p}return g}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(e,n),l=i.graph.getEdgeByIndex(e),s=i.getName(l.node1.dataIndex),u=i.getName(l.node2.dataIndex),v=[];return s!=null&&v.push(s),u!=null&&v.push(u),Le("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=Gl({series:this,dataIndex:e,multipleSeries:a});return c},t.prototype._updateCategoriesData=function(){var e=ee(this.option.categories||[],function(n){return n.value!=null?n:Y({value:0},n)}),a=new ct(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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:U.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:U.color.primary}}},t})(oe);function Rf(r){r.registerChartView(Vv),r.registerSeriesModel(zv),r.registerProcessor(wv),r.registerVisual(Dv),r.registerVisual(_v),r.registerLayout(Tv),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Pv),r.registerLayout(Mv),r.registerCoordinateSystem("graphView",{dimensions:Ta.dimensions,create:Ev}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},cr),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},cr),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",query:t},function(n){var i=a.getViewOfSeriesModel(n);i&&(t.dx!=null&&t.dy!=null&&i.updateViewOnPan(n,a,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&i.updateViewOnZoom(n,a,t));var o=n.coordinateSystem,l=Nr(o,t,n.get("scaleLimit"));n.setCenter&&n.setCenter(l.center),n.setZoom&&n.setZoom(l.zoom)})})}var ei=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;ne(i).dataType="node",i.z2=2;var o=new Re;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,l=e.graph.getNodeByIndex(a),s=e.hostModel,u=l.getModel(),v=u.getModel("emphasis"),c=e.getItemLayout(a),h=Y(ke(u.getModel("itemStyle"),c,!0),c),f=this;if(isNaN(h.startAngle)){f.setShape(h);return}i?f.setShape(h):J(f,{shape:h},s,a);var g=Y(ke(u.getModel("itemStyle"),c,!0),c);o.setShape(g),o.useStyle(e.getItemVisual(a,"style")),ce(o,u),this._updateLabel(s,u,l),e.setItemGraphicEl(a,f),ce(f,u,"itemStyle");var p=v.get("focus");ie(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this.getTextContent(),o=n.getLayout(),l=(o.startAngle+o.endAngle)/2,s=Math.cos(l),u=Math.sin(l),v=a.getModel("label");i.ignore=!v.get("show");var c=De(a),h=n.getVisual("style");Ie(i,c,{labelFetcher:{getFormattedLabel:function(y,S,b,w,D,_){return e.getFormattedLabel(y,S,"node",w,ht(D,c.normal&&c.normal.get("formatter"),a.get("name")),_)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var f=v.get("position")||"outside",g=v.get("distance")||0,p;f==="outside"?p=o.r+g:p=(o.r+o.r0)/2,this.textConfig={inside:f!=="outside"};var d=f!=="outside"?v.get("align")||"center":s>0?"left":"right",m=f!=="outside"?v.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:s*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:d,verticalAlign:m}})},t})(Ue),Gv=(function(r){B(t,r);function t(e,a,n,i){var o=r.call(this)||this;return ne(o).dataType="edge",o.updateData(e,a,n,i,!0),o}return t.prototype.buildPath=function(e,a){e.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;e.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),e.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),e.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),e.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),e.closePath()},t.prototype.updateData=function(e,a,n,i,o){var l=e.hostModel,s=a.graph.getEdgeByIndex(n),u=s.getLayout(),v=s.node1.getModel(),c=a.getItemModel(s.dataIndex),h=c.getModel("lineStyle"),f=c.getModel("emphasis"),g=f.get("focus"),p=Y(ke(v.getModel("itemStyle"),u,!0),u),d=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){d.setShape(p);return}o?(d.setShape(p),ti(d,s,e,h)):(Ee(d),ti(d,s,e,h),J(d,{shape:p},l,n)),ie(this,g==="adjacency"?s.getAdjacentDataIndices():g,f.get("blurScope"),f.get("disabled")),ce(d,c,"lineStyle"),a.setItemGraphicEl(s.dataIndex,d)},t})(_e);function ti(r,t,e,a){var n=t.node1,i=t.node2,o=r.style;r.setStyle(a.getLineStyle());var l=a.get("color");switch(l){case"source":o.fill=e.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var s=e.getItemVisual(n.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(Me(s)&&Me(u)){var v=r.shape,c=(v.s1[0]+v.s2[0])/2,h=(v.s1[1]+v.s2[1])/2,f=(v.t1[0]+v.t2[0])/2,g=(v.t1[1]+v.t2[1])/2;o.fill=new Lr(c,h,f,g,[{offset:0,color:s},{offset:1,color:u}],!0)}break}}var Ov=Math.PI/180,Bv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,l=this.group,s=-e.get("startAngle")*Ov;if(i.diff(o).add(function(v){var c=i.getItemLayout(v);if(c){var h=new ei(i,v,s);ne(h).dataIndex=v,l.add(h)}}).update(function(v,c){var h=o.getItemGraphicEl(c),f=i.getItemLayout(v);if(!f){h&&et(h,e,c);return}h?h.updateData(i,v,s):h=new ei(i,v,s),l.add(h)}).remove(function(v){var c=o.getItemGraphicEl(v);c&&et(c,e,v)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=W(u[0],n.getWidth()),this.group.originY=W(u[1],n.getHeight()),ve(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,s)},t.prototype.renderEdges=function(e,a){var n=e.getData(),i=e.getEdgeData(),o=this._edgeData,l=this.group;i.diff(o).add(function(s){var u=new Gv(n,i,s,a);ne(u).dataIndex=s,l.add(u)}).update(function(s,u){var v=o.getItemGraphicEl(u);v.updateData(n,i,s,a),l.add(v)}).remove(function(s){var u=o.getItemGraphicEl(s);u&&et(u,e,s)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type="chord",t})(ae),Fv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new It(ue(this.getData,this),ue(this.getRawData,this))},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[];if(i&&n){var o=Br(i,n,this,!0,l);return o.data}function l(s,u){var v=at.prototype.getModel;function c(f,g){var p=v.call(this,f,g);return p.resolveParentPath=h,p}u.wrapMethod("getItemModel",function(f){return f.resolveParentPath=h,f.getModel=c,f});function h(f){if(f&&(f[0]==="label"||f[1]==="label")){var g=f.slice();return f[0]==="label"?g[0]="edgeLabel":f[1]==="label"&&(g[1]="edgeLabel"),g}return f}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){var i=this.getDataParams(e,n);if(n==="edge"){var o=this.getData(),l=o.graph.getEdgeByIndex(e),s=o.getName(l.node1.dataIndex),u=o.getName(l.node2.dataIndex),v=[];return s!=null&&v.push(s),u!=null&&v.push(u),Le("nameValue",{name:v.join(" > "),value:i.value,noValue:i.value==null})}return Le("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(n.name==null&&(n.name=i.getName(e)),n.value==null){var l=o.getLayout().value;n.value=l}}return n},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t})(oe),Ja=Math.PI/180;function Hv(r,t){r.eachSeriesByType("chord",function(e){Wv(e,t)})}function Wv(r,t){var e=r.getData(),a=e.graph,n=r.getEdgeData(),i=n.count();if(i){var o=zi(r,t),l=o.cx,s=o.cy,u=o.r,v=o.r0,c=Math.max((r.get("padAngle")||0)*Ja,0),h=Math.max((r.get("minAngle")||0)*Ja,0),f=-r.get("startAngle")*Ja,g=f+Math.PI*2,p=r.get("clockwise"),d=p?1:-1,m=[f,g];xr(m,!p);var y=m[0],S=m[1],b=S-y,w=e.getSum("value")===0&&n.getSum("value")===0,D=[],_=0;a.eachEdge(function(C){var R=w?1:C.getValue("value");w&&(R>0||h)&&(_+=2);var k=C.node1.dataIndex,z=C.node2.dataIndex;D[k]=(D[k]||0)+R,D[z]=(D[z]||0)+R});var x=0;if(a.eachNode(function(C){var R=C.getValue("value");isNaN(R)||(D[C.dataIndex]=Math.max(R,D[C.dataIndex]||0)),!w&&(D[C.dataIndex]>0||h)&&_++,x+=D[C.dataIndex]||0}),!(_===0||x===0)){c*_>=Math.abs(b)&&(c=Math.max(0,(Math.abs(b)-h*_)/_)),(c+h)*_>=Math.abs(b)&&(h=(Math.abs(b)-c*_)/_);var P=(b-c*_*d)/x,I=0,A=0,L=0;a.eachNode(function(C){var R=D[C.dataIndex]||0,k=P*(x?R:1)*d;Math.abs(k)<h?I+=h-Math.abs(k):(A+=Math.abs(k)-h,L+=Math.abs(k)),C.setLayout({angle:k,value:R})});var M=!1;if(I>A){var V=I/A;a.eachNode(function(C){var R=C.getLayout().angle;Math.abs(R)>=h?C.setLayout({angle:R*V,ratio:V},!0):C.setLayout({angle:h,ratio:h===0?1:R/h},!0)})}else a.eachNode(function(C){if(!M){var R=C.getLayout().angle,k=Math.min(R/L,1),z=k*I;R-z<h&&(M=!0)}});var N=I;a.eachNode(function(C){if(!(N<=0)){var R=C.getLayout().angle;if(R>h&&h>0){var k=M?1:Math.min(R/L,1),z=R-h,G=Math.min(z,Math.min(N,I*k));N-=G,C.setLayout({angle:R-G,ratio:(R-G)/R},!0)}else h>0&&C.setLayout({angle:h,ratio:R===0?1:h/R},!0)}});var T=y,E=[];a.eachNode(function(C){var R=Math.max(C.getLayout().angle,h);C.setLayout({cx:l,cy:s,r0:v,r:u,startAngle:T,endAngle:T+R*d,clockwise:p},!0),E[C.dataIndex]=T,T+=(R+c)*d}),a.eachEdge(function(C){var R=w?1:C.getValue("value"),k=P*(x?R:1)*d,z=C.node1.dataIndex,G=E[z]||0,H=Math.abs((C.node1.getLayout().ratio||1)*k),F=G+H*d,$=[l+v*Math.cos(G),s+v*Math.sin(G)],le=[l+v*Math.cos(F),s+v*Math.sin(F)],Se=C.node2.dataIndex,X=E[Se]||0,Z=Math.abs((C.node2.getLayout().ratio||1)*k),q=X+Z*d,j=[l+v*Math.cos(X),s+v*Math.sin(X)],te=[l+v*Math.cos(q),s+v*Math.sin(q)];C.setLayout({s1:$,s2:le,sStartAngle:G,sEndAngle:F,t1:j,t2:te,tStartAngle:X,tEndAngle:q,cx:l,cy:s,r:v,value:R,clockwise:p}),E[z]=F,E[Se]=q})}}}function Ef(r){r.registerChartView(Bv),r.registerSeriesModel(Fv),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Hv),r.registerProcessor(xt("chord"))}var Uv=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),Zv=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new Uv},t.prototype.buildPath=function(e,a){var n=Math.cos,i=Math.sin,o=a.r,l=a.width,s=a.angle,u=a.x-n(s)*l*(l>=o/3?1:2),v=a.y-i(s)*l*(l>=o/3?1:2);s=a.angle-Math.PI/2,e.moveTo(u,v),e.lineTo(a.x+n(s)*l,a.y+i(s)*l),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(s)*l,a.y-i(s)*l),e.lineTo(u,v)},t})(_e);function $v(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=W(e[0],t.getWidth()),l=W(e[1],t.getHeight()),s=W(r.get("radius"),i/2);return{cx:o,cy:l,r:s}}function aa(r,t){var e=r==null?"":r+"";return t&&(Me(t)?e=t.replace("{value}",e):Ae(t)&&(e=t(r))),e}var Xv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=$v(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var l=this.group,s=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,v=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),h=c.get("roundCap"),f=h?ha:Ue,g=c.get("show"),p=c.getModel("lineStyle"),d=p.get("width"),m=[u,v];xr(m,!s),u=m[0],v=m[1];for(var y=v-u,S=u,b=[],w=0;g&&w<i.length;w++){var D=Math.min(Math.max(i[w][0],0),1);v=u+y*D;var _=new f({shape:{startAngle:S,endAngle:v,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-d,r:o.r},silent:!0});_.setStyle({fill:i[w][1]}),_.setStyle(p.getLineStyle(["color","width"])),b.push(_),S=v}b.reverse(),O(b,function(P){return l.add(P)});var x=function(P){if(P<=0)return i[0][1];var I;for(I=0;I<i.length;I++)if(i[I][0]>=P&&(I===0?0:i[I-1][0])<P)return i[I][1];return i[I-1][1]};this._renderTicks(e,a,n,x,o,u,v,s,d),this._renderTitleAndDetail(e,a,n,x,o),this._renderAnchor(e,o),this._renderPointer(e,a,n,x,o,u,v,s,d)},t.prototype._renderTicks=function(e,a,n,i,o,l,s,u,v){for(var c=this.group,h=o.cx,f=o.cy,g=o.r,p=+e.get("min"),d=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),S=e.getModel("axisLabel"),b=e.get("splitNumber"),w=y.get("splitNumber"),D=W(m.get("length"),g),_=W(y.get("length"),g),x=l,P=(s-l)/b,I=P/w,A=m.getModel("lineStyle").getLineStyle(),L=y.getModel("lineStyle").getLineStyle(),M=m.get("distance"),V,N,T=0;T<=b;T++){if(V=Math.cos(x),N=Math.sin(x),m.get("show")){var E=M?M+v:v,C=new vn({shape:{x1:V*(g-E)+h,y1:N*(g-E)+f,x2:V*(g-D-E)+h,y2:N*(g-D-E)+f},style:A,silent:!0});A.stroke==="auto"&&C.setStyle({stroke:i(T/b)}),c.add(C)}if(S.get("show")){var E=S.get("distance")+M,R=aa(Pt(T/b*(d-p)+p),S.get("formatter")),k=i(T/b),z=V*(g-D-E)+h,G=N*(g-D-E)+f,H=S.get("rotate"),F=0;H==="radial"?(F=-x+2*Math.PI,F>Math.PI/2&&(F+=Math.PI)):H==="tangential"?F=-x-Math.PI/2:Ne(H)&&(F=H*Math.PI/180),F===0?c.add(new Re({style:Be(S,{text:R,x:z,y:G,verticalAlign:N<-.8?"top":N>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:k}),silent:!0})):c.add(new Re({style:Be(S,{text:R,x:z,y:G,verticalAlign:"middle",align:"center"},{inheritColor:k}),silent:!0,originX:z,originY:G,rotation:F}))}if(y.get("show")&&T!==b){var E=y.get("distance");E=E?E+v:v;for(var $=0;$<=w;$++){V=Math.cos(x),N=Math.sin(x);var le=new vn({shape:{x1:V*(g-E)+h,y1:N*(g-E)+f,x2:V*(g-_-E)+h,y2:N*(g-_-E)+f},silent:!0,style:L});L.stroke==="auto"&&le.setStyle({stroke:i((T+$/w)/b)}),c.add(le),x+=I}x-=I}else x+=P}},t.prototype._renderPointer=function(e,a,n,i,o,l,s,u,v){var c=this.group,h=this._data,f=this._progressEls,g=[],p=e.get(["pointer","show"]),d=e.getModel("progress"),m=d.get("show"),y=e.getData(),S=y.mapDimension("value"),b=+e.get("min"),w=+e.get("max"),D=[b,w],_=[l,s];function x(I,A){var L=y.getItemModel(I),M=L.getModel("pointer"),V=W(M.get("width"),o.r),N=W(M.get("length"),o.r),T=e.get(["pointer","icon"]),E=M.get("offsetCenter"),C=W(E[0],o.r),R=W(E[1],o.r),k=M.get("keepAspect"),z;return T?z=Ge(T,C-V/2,R-N,V,N,null,k):z=new Zv({shape:{angle:-Math.PI/2,width:V,r:N,x:C,y:R}}),z.rotation=-(A+Math.PI/2),z.x=o.cx,z.y=o.cy,z}function P(I,A){var L=d.get("roundCap"),M=L?ha:Ue,V=d.get("overlap"),N=V?d.get("width"):v/y.count(),T=V?o.r-N:o.r-(I+1)*N,E=V?o.r:o.r-I*N,C=new M({shape:{startAngle:l,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:T,r:E}});return V&&(C.z2=Ce(y.get(S,I),[b,w],[100,0],!0)),C}(m||p)&&(y.diff(h).add(function(I){var A=y.get(S,I);if(p){var L=x(I,l);ve(L,{rotation:-((isNaN(+A)?_[0]:Ce(A,D,_,!0))+Math.PI/2)},e),c.add(L),y.setItemGraphicEl(I,L)}if(m){var M=P(I,l),V=d.get("clip");ve(M,{shape:{endAngle:Ce(A,D,_,V)}},e),c.add(M),cn(e.seriesIndex,y.dataType,I,M),g[I]=M}}).update(function(I,A){var L=y.get(S,I);if(p){var M=h.getItemGraphicEl(A),V=M?M.rotation:l,N=x(I,V);N.rotation=V,J(N,{rotation:-((isNaN(+L)?_[0]:Ce(L,D,_,!0))+Math.PI/2)},e),c.add(N),y.setItemGraphicEl(I,N)}if(m){var T=f[A],E=T?T.shape.endAngle:l,C=P(I,E),R=d.get("clip");J(C,{shape:{endAngle:Ce(L,D,_,R)}},e),c.add(C),cn(e.seriesIndex,y.dataType,I,C),g[I]=C}}).execute(),y.each(function(I){var A=y.getItemModel(I),L=A.getModel("emphasis"),M=L.get("focus"),V=L.get("blurScope"),N=L.get("disabled");if(p){var T=y.getItemGraphicEl(I),E=y.getItemVisual(I,"style"),C=E.fill;if(T instanceof Ut){var R=T.style;T.useStyle(Y({image:R.image,x:R.x,y:R.y,width:R.width,height:R.height},E))}else T.useStyle(E),T.type!=="pointer"&&T.setColor(C);T.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),T.style.fill==="auto"&&T.setStyle("fill",i(Ce(y.get(S,I),D,[0,1],!0))),T.z2EmphasisLift=0,ce(T,A),ie(T,M,V,N)}if(m){var k=g[I];k.useStyle(y.getItemVisual(I,"style")),k.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),k.z2EmphasisLift=0,ce(k,A),ie(k,M,V,N)}}),this._progressEls=g)},t.prototype._renderAnchor=function(e,a){var n=e.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),l=n.get("icon"),s=n.get("offsetCenter"),u=n.get("keepAspect"),v=Ge(l,a.cx-o/2+W(s[0],a.r),a.cy-o/2+W(s[1],a.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var l=this,s=e.getData(),u=s.mapDimension("value"),v=+e.get("min"),c=+e.get("max"),h=new K,f=[],g=[],p=e.isAnimationEnabled(),d=e.get(["pointer","showAbove"]);s.diff(this._data).add(function(m){f[m]=new Re({silent:!0}),g[m]=new Re({silent:!0})}).update(function(m,y){f[m]=l._titleEls[y],g[m]=l._detailEls[y]}).execute(),s.each(function(m){var y=s.getItemModel(m),S=s.get(u,m),b=new K,w=i(Ce(S,[v,c],[0,1],!0)),D=y.getModel("title");if(D.get("show")){var _=D.get("offsetCenter"),x=o.cx+W(_[0],o.r),P=o.cy+W(_[1],o.r),I=f[m];I.attr({z2:d?0:2,style:Be(D,{x,y:P,text:s.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:w})}),b.add(I)}var A=y.getModel("detail");if(A.get("show")){var L=A.get("offsetCenter"),M=o.cx+W(L[0],o.r),V=o.cy+W(L[1],o.r),N=W(A.get("width"),o.r),T=W(A.get("height"),o.r),E=e.get(["progress","show"])?s.getItemVisual(m,"style").fill:w,I=g[m],C=A.get("formatter");I.attr({z2:d?0:2,style:Be(A,{x:M,y:V,text:aa(S,C),width:isNaN(N)?null:N,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:E})}),Ei(I,{normal:A},S,function(k){return aa(k,C)}),p&&Ol(I,m,s,e,{getFormattedLabel:function(k,z,G,H,F,$){return aa($?$.interpolatedValue:S,C)}}),b.add(I)}h.add(b)}),this.group.add(h),this._titleEls=f,this._detailEls=g},t.type="gauge",t})(ae),Yv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return At(this,["value"])},t.type="series.gauge",t.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,U.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:U.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:U.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:U.color.axisLabel,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:U.color.neutral00,borderWidth:0,borderColor:U.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:U.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:U.color.transparent,borderWidth:0,borderColor:U.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:U.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(oe);function Vf(r){r.registerChartView(Xv),r.registerSeriesModel(Yv)}var qv=["itemStyle","opacity"],jv=(function(r){B(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new bt,l=new Re;return i.setTextContent(l),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,l=e.getItemModel(a),s=e.getItemLayout(a),u=l.getModel("emphasis"),v=l.get(qv);v=v??1,n||Ee(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:s.points}),i.style.opacity=0,ve(i,{style:{opacity:v}},o,a)):J(i,{style:{opacity:v},shape:{points:s.points}},o,a),ce(i,l),this._updateLabel(e,a),ie(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),l=e.hostModel,s=e.getItemModel(a),u=e.getItemLayout(a),v=u.label,c=e.getItemVisual(a,"style"),h=c.fill;Ie(o,De(s),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:c.opacity,defaultText:e.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}});var f=s.getModel("label"),g=f.get("color"),p=g==="inherit"?h:null;n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:p,outsideFill:p});var d=v.linePoints;i.setShape({points:d}),n.textGuideLineConfig={anchor:d?new fe(d[0][0],d[0][1]):null},J(o,{style:{x:v.x,y:v.y}},l,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),Qi(n,eo(s),{stroke:h})},t})(Pr),Kv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,l=this.group;i.diff(o).add(function(s){var u=new jv(i,s);i.setItemGraphicEl(s,u),l.add(u)}).update(function(s,u){var v=o.getItemGraphicEl(u);v.updateData(i,s),l.add(v),i.setItemGraphicEl(s,v)}).remove(function(s){var u=o.getItemGraphicEl(s);et(u,e,s)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t})(ae),Jv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new It(ue(this.getData,this),ue(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return At(this,{coordDimensions:["value"],encodeDefaulter:me(Tr,this)})},t.prototype._defaultLabelLine=function(e){Cr(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:U.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:U.color.primary}}},t})(oe);function Qv(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(s){return s}),n=[],i=t==="ascending",o=0,l=r.count();o<l;o++)n[o]=o;return Ae(t)?n.sort(t):t!=="none"&&n.sort(function(s,u){return i?a[s]-a[u]:a[u]-a[s]}),n}function ec(r){var t=r.hostModel,e=t.get("orient");r.each(function(a){var n=r.getItemModel(a),i=n.getModel("label"),o=i.get("position"),l=n.getModel("labelLine"),s=r.getItemLayout(a),u=s.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,h,f,g;if(v)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,c="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),g=[[h,f],[h,f]];else{var p=void 0,d=void 0,m=void 0,y=void 0,S=l.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,m=p-S,h=m-5,c="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,m=p+S,h=m+5,c="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,y=d-S,f=y-5,c="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,y=d+S,f=y+5,c="center"):o==="rightTop"?(p=e==="horizontal"?u[3][0]:u[1][0],d=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(y=d-S,f=y-5,c="center"):(m=p+S,h=m+5,c="top")):o==="rightBottom"?(p=u[2][0],d=u[2][1],e==="horizontal"?(y=d+S,f=y+5,c="center"):(m=p+S,h=m+5,c="bottom")):o==="leftTop"?(p=u[0][0],d=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(y=d-S,f=y-5,c="center"):(m=p-S,h=m-5,c="right")):o==="leftBottom"?(p=e==="horizontal"?u[1][0]:u[3][0],d=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(y=d+S,f=y+5,c="center"):(m=p-S,h=m-5,c="right")):(p=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,e==="horizontal"?(y=d+S,f=y+5,c="center"):(m=p+S,h=m+5,c="left")),e==="horizontal"?(m=p,h=m):(y=d,f=y),g=[[p,d],[m,y]]}s.label={linePoints:g,x:h,y:f,verticalAlign:"middle",textAlign:c,inside:v}})}function tc(r,t){r.eachSeriesByType("funnel",function(e){var a=e.getData(),n=a.mapDimension("value"),i=e.get("sort"),o=Dt(e,t),l=_t(e.getBoxLayoutParams(),o.refContainer),s=e.get("orient"),u=l.width,v=l.height,c=Qv(a,i),h=l.x,f=l.y,g=s==="horizontal"?[W(e.get("minSize"),v),W(e.get("maxSize"),v)]:[W(e.get("minSize"),u),W(e.get("maxSize"),u)],p=a.getDataExtent(n),d=e.get("min"),m=e.get("max");d==null&&(d=Math.min(p[0],0)),m==null&&(m=p[1]);var y=e.get("funnelAlign"),S=e.get("gap"),b=s==="horizontal"?u:v,w=(b-S*(a.count()-1))/a.count(),D=function(N,T){if(s==="horizontal"){var E=a.get(n,N)||0,C=Ce(E,[d,m],g,!0),R=void 0;switch(y){case"top":R=f;break;case"center":R=f+(v-C)/2;break;case"bottom":R=f+(v-C);break}return[[T,R],[T,R+C]]}var k=a.get(n,N)||0,z=Ce(k,[d,m],g,!0),G;switch(y){case"left":G=h;break;case"center":G=h+(u-z)/2;break;case"right":G=h+u-z;break}return[[G,T],[G+z,T]]};i==="ascending"&&(w=-w,S=-S,s==="horizontal"?h+=u:f+=v,c=c.reverse());for(var _=0;_<c.length;_++){var x=c[_],P=c[_+1],I=a.getItemModel(x);if(s==="horizontal"){var A=I.get(["itemStyle","width"]);A==null?A=w:(A=W(A,u),i==="ascending"&&(A=-A));var L=D(x,h),M=D(P,h+A);h+=A+S,a.setItemLayout(x,{points:L.concat(M.slice().reverse())})}else{var V=I.get(["itemStyle","height"]);V==null?V=w:(V=W(V,v),i==="ascending"&&(V=-V));var L=D(x,f),M=D(P,f+V);f+=V+S,a.setItemLayout(x,{points:L.concat(M.slice().reverse())})}}ec(a)})}function kf(r){r.registerChartView(Kv),r.registerSeriesModel(Jv),r.registerLayout(tc),r.registerProcessor(xt("funnel"))}var ac=.3,rc=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new K,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,a,n,i){this._progressiveEls=null;var o=this._dataGroup,l=e.getData(),s=this._data,u=e.coordinateSystem,v=u.dimensions,c=ri(e);l.diff(s).add(h).update(f).remove(g).execute();function h(d){var m=ai(l,o,d,v,u);Qa(m,l,d,c)}function f(d,m){var y=s.getItemGraphicEl(m),S=Vo(l,d,v,u);l.setItemGraphicEl(d,y),J(y,{shape:{points:S}},e,d),Ee(y),Qa(y,l,d,c)}function g(d){var m=s.getItemGraphicEl(d);o.remove(m)}if(!this._initialized){this._initialized=!0;var p=nc(u,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=l},t.prototype.incrementalPrepareRender=function(e,a,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,a,n){for(var i=a.getData(),o=a.coordinateSystem,l=o.dimensions,s=ri(a),u=this._progressiveEls=[],v=e.start;v<e.end;v++){var c=ai(i,this._dataGroup,v,l,o);c.incremental=!0,Qa(c,i,v,s),u.push(c)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t})(ae);function nc(r,t,e){var a=r.model,n=r.getRect(),i=new xe({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=a.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),ve(i,{shape:{width:n.width,height:n.height}},t,e),i}function Vo(r,t,e,a){for(var n=[],i=0;i<e.length;i++){var o=e[i],l=r.get(r.mapDimension(o),t);ic(l,a.getAxis(o).type)||n.push(a.dataToPoint(l,o))}return n}function ai(r,t,e,a,n){var i=Vo(r,e,a,n),o=new bt({shape:{points:i},z2:10});return t.add(o),r.setItemGraphicEl(e,o),o}function ri(r){var t=r.get("smooth",!0);return t===!0&&(t=ac),t=Bl(t),na(t)&&(t=0),{smooth:t}}function Qa(r,t,e,a){r.useStyle(t.getItemVisual(e,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var n=t.getItemModel(e),i=n.getModel("emphasis");ce(r,n,"lineStyle"),ie(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function ic(r,t){return t==="category"?r==null:r==null||isNaN(r)}var oc=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,a){return Ze(null,this,{useEncodeDefaulter:ue(lc,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var a=this.coordinateSystem,n=this.getData(),i=[];return a.eachActiveState(n,function(o,l){e===o&&i.push(n.getRawIndex(l))}),i},t.type="series.parallel",t.dependencies=["parallel"],t.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"},t})(oe);function lc(r){var t=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(t){var e={};return O(t.dimensions,function(a){var n=sc(a);e[a]=n}),e}}function sc(r){return+r.replace("dim","")}var uc=["lineStyle","opacity"],vc={seriesType:"parallel",reset:function(r,t){var e=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,i){e.eachActiveState(i,function(o,l){var s=a[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(l).get(uc,!0);u!=null&&(s=u)}var v=i.ensureUniqueItemVisual(l,"style");v.opacity=s},n.start,n.end)}}}};function zf(r){ba(ls),r.registerChartView(rc),r.registerSeriesModel(oc),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,vc)}var cc=(function(){function r(){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 r})(),hc=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new cc},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){Wi(this)},t.prototype.downplay=function(){Ui(this)},t})(_e),fc=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new K,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,a){this._controller=new La(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,n){var i=this,o=e.getGraph(),l=this._mainGroup,s=e.layoutInfo,u=s.width,v=s.height,c=e.getData(),h=e.getData("edge"),f=e.get("orient");this._model=e,l.removeAll(),l.x=s.x,l.y=s.y,this._updateViewCoordSys(e,n),Yi(e,n,l,this._controller,this._controllerHost,null),o.eachEdge(function(g){var p=new hc,d=ne(p);d.dataIndex=g.dataIndex,d.seriesIndex=e.seriesIndex,d.dataType="edge";var m=g.getModel(),y=m.getModel("lineStyle"),S=y.get("curveness"),b=g.node1.getLayout(),w=g.node1.getModel(),D=w.get("localX"),_=w.get("localY"),x=g.node2.getLayout(),P=g.node2.getModel(),I=P.get("localX"),A=P.get("localY"),L=g.getLayout(),M,V,N,T,E,C,R,k;p.shape.extent=Math.max(1,L.dy),p.shape.orient=f,f==="vertical"?(M=(D!=null?D*u:b.x)+L.sy,V=(_!=null?_*v:b.y)+b.dy,N=(I!=null?I*u:x.x)+L.ty,T=A!=null?A*v:x.y,E=M,C=V*(1-S)+T*S,R=N,k=V*S+T*(1-S)):(M=(D!=null?D*u:b.x)+b.dx,V=(_!=null?_*v:b.y)+L.sy,N=I!=null?I*u:x.x,T=(A!=null?A*v:x.y)+L.ty,E=M*(1-S)+N*S,C=V,R=M*S+N*(1-S),k=T),p.setShape({x1:M,y1:V,x2:N,y2:T,cpx1:E,cpy1:C,cpx2:R,cpy2:k}),p.useStyle(y.getItemStyle()),ni(p.style,f,g);var z=""+m.get("value"),G=De(m,"edgeLabel");Ie(p,G,{labelFetcher:{getFormattedLabel:function($,le,Se,X,Z,q){return e.getFormattedLabel($,le,"edge",X,ht(Z,G.normal&&G.normal.get("formatter"),z),q)}},labelDataIndex:g.dataIndex,defaultText:z}),p.setTextConfig({position:"inside"});var H=m.getModel("emphasis");ce(p,m,"lineStyle",function($){var le=$.getItemStyle();return ni(le,f,g),le}),l.add(p),h.setItemGraphicEl(g.dataIndex,p);var F=H.get("focus");ie(p,F==="adjacency"?g.getAdjacentDataIndices():F==="trajectory"?g.getTrajectoryDataIndices():F,H.get("blurScope"),H.get("disabled"))}),o.eachNode(function(g){var p=g.getLayout(),d=g.getModel(),m=d.get("localX"),y=d.get("localY"),S=d.getModel("emphasis"),b=d.get(["itemStyle","borderRadius"])||0,w=new xe({shape:{x:m!=null?m*u:p.x,y:y!=null?y*v:p.y,width:p.dx,height:p.dy,r:b},style:d.getModel("itemStyle").getItemStyle(),z2:10});Ie(w,De(d),{labelFetcher:{getFormattedLabel:function(_,x){return e.getFormattedLabel(_,x,"node")}},labelDataIndex:g.dataIndex,defaultText:g.id}),w.disableLabelAnimation=!0,w.setStyle("fill",g.getVisual("color")),w.setStyle("decal",g.getVisual("style").decal),ce(w,d),l.add(w),c.setItemGraphicEl(g.dataIndex,w),ne(w).dataType="node";var D=S.get("focus");ie(w,D==="adjacency"?g.getAdjacentDataIndices():D==="trajectory"?g.getTrajectoryDataIndices():D,S.get("blurScope"),S.get("disabled"))}),c.eachItemGraphicEl(function(g,p){var d=c.getItemModel(p);d.get("draggable")&&(g.drift=function(m,y){i._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/v})},g.ondragend=function(){i._focusAdjacencyDisabled=!1},g.draggable=!0,g.cursor="move")}),!this._data&&e.isAnimationEnabled()&&l.setClipPath(gc(l.getBoundingRect(),e,function(){l.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=n.width,o=n.height,l=e.coordinateSystem=new Ta(null,{api:a,ecModel:e.ecModel});l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(0,0,i,o),l.setCenter(e.get("center")),l.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY})},t.type="sankey",t})(ae);function ni(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");Me(a)&&Me(n)&&(r.fill=new Lr(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function gc(r,t,e){var a=new xe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return ve(a,{shape:{width:r.width+20}},t,e),a}var pc=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var l=this.levelModels,s=0;s<o.length;s++)o[s].depth!=null&&o[s].depth>=0&&(l[o[s].depth]=new at(o[s],this,a));var u=Br(i,n,this,!0,v);return u.data;function v(c,h){c.wrapMethod("getItemModel",function(f,g){var p=f.parentModel,d=p.getData().getItemLayout(g);if(d){var m=d.depth,y=p.levelModels[m];y&&(f.parentModel=y)}return f}),h.wrapMethod("getItemModel",function(f,g){var p=f.parentModel,d=p.getGraph().getEdgeByIndex(g),m=d.node1.getLayout();if(m){var y=m.depth,S=p.levelModels[y];S&&(f.parentModel=S)}return f})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(f){return isNaN(f)||f==null}if(n==="edge"){var o=this.getDataParams(e,n),l=o.data,s=o.value,u=l.source+" -- "+l.target;return Le("nameValue",{name:u,value:s,noValue:i(s)})}else{var v=this.getGraph().getNodeByIndex(e),c=v.getLayout().value,h=this.getDataParams(e,n).data.name;return Le("nameValue",{name:h!=null?h+"":null,value:c,noValue:i(c)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.type="series.sankey",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:U.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:U.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(oe);function dc(r,t){r.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=Dt(e,t).refContainer,o=_t(e.getBoxLayoutParams(),i);e.layoutInfo=o;var l=o.width,s=o.height,u=e.getGraph(),v=u.nodes,c=u.edges;mc(v);var h=Ar(v,function(d){return d.getLayout().value===0}),f=h.length!==0?0:e.get("layoutIterations"),g=e.get("orient"),p=e.get("nodeAlign");yc(v,c,a,n,l,s,f,g,p)})}function yc(r,t,e,a,n,i,o,l,s){Sc(r,t,e,n,i,l,s),_c(r,t,i,n,a,o,l),Mc(r,l)}function mc(r){O(r,function(t){var e=tt(t.outEdges,pa),a=tt(t.inEdges,pa),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function Sc(r,t,e,a,n,i,o){for(var l=[],s=[],u=[],v=[],c=0,h=0;h<t.length;h++)l[h]=1;for(var h=0;h<r.length;h++)s[h]=r[h].inEdges.length,s[h]===0&&u.push(r[h]);for(var f=-1;u.length;){for(var g=0;g<u.length;g++){var p=u[g],d=p.hostGraph.data.getRawDataItem(p.dataIndex),m=d.depth!=null&&d.depth>=0;m&&d.depth>f&&(f=d.depth),p.setLayout({depth:m?d.depth:c},!0),i==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var y=0;y<p.outEdges.length;y++){var S=p.outEdges[y],b=t.indexOf(S);l[b]=0;var w=S.node2,D=r.indexOf(w);--s[D]===0&&v.indexOf(w)<0&&v.push(w)}}++c,u=v,v=[]}for(var h=0;h<l.length;h++)if(l[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var _=f>c-1?f:c-1;o&&o!=="left"&&bc(r,o,i,_);var x=i==="vertical"?(n-e)/_:(a-e)/_;Dc(r,x,i)}function ko(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function bc(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var l=0;l<i.length;l++){var s=i[l];s.setLayout({skNodeHeight:o},!0);for(var u=0;u<s.inEdges.length;u++){var v=s.inEdges[u];n.indexOf(v.node1)<0&&n.push(v.node1)}}i=n,n=[],++o}O(r,function(c){ko(c)||c.setLayout({depth:Math.max(0,a-c.getLayout().skNodeHeight)},!0)})}else t==="justify"&&wc(r,a)}function wc(r,t){O(r,function(e){!ko(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function Dc(r,t,e){O(r,function(a){var n=a.getLayout().depth*t;e==="vertical"?a.setLayout({y:n},!0):a.setLayout({x:n},!0)})}function _c(r,t,e,a,n,i,o){var l=xc(r,o);Ac(l,t,e,a,n,o),er(l,n,e,a,o);for(var s=1;i>0;i--)s*=.99,Ic(l,s,o),er(l,n,e,a,o),Nc(l,s,o),er(l,n,e,a,o)}function xc(r,t){var e=[],a=t==="vertical"?"y":"x",n=gr(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),O(n.keys,function(i){e.push(n.buckets.get(i))}),e}function Ac(r,t,e,a,n,i){var o=1/0;O(r,function(l){var s=l.length,u=0;O(l,function(c){u+=c.getLayout().value});var v=i==="vertical"?(a-(s-1)*n)/u:(e-(s-1)*n)/u;v<o&&(o=v)}),O(r,function(l){O(l,function(s,u){var v=s.getLayout().value*o;i==="vertical"?(s.setLayout({x:u},!0),s.setLayout({dx:v},!0)):(s.setLayout({y:u},!0),s.setLayout({dy:v},!0))})}),O(t,function(l){var s=+l.getValue()*o;l.setLayout({dy:s},!0)})}function er(r,t,e,a,n){var i=n==="vertical"?"x":"y";O(r,function(o){o.sort(function(p,d){return p.getLayout()[i]-d.getLayout()[i]});for(var l,s,u,v=0,c=o.length,h=n==="vertical"?"dx":"dy",f=0;f<c;f++)s=o[f],u=v-s.getLayout()[i],u>0&&(l=s.getLayout()[i]+u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]+s.getLayout()[h]+t;var g=n==="vertical"?a:e;if(u=v-t-g,u>0){l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),v=l;for(var f=c-2;f>=0;--f)s=o[f],u=s.getLayout()[i]+s.getLayout()[h]+t-v,u>0&&(l=s.getLayout()[i]-u,n==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),v=s.getLayout()[i]}})}function Ic(r,t,e){O(r.slice().reverse(),function(a){O(a,function(n){if(n.outEdges.length){var i=tt(n.outEdges,Lc,e)/tt(n.outEdges,pa);if(isNaN(i)){var o=n.outEdges.length;i=o?tt(n.outEdges,Tc,e)/o:0}if(e==="vertical"){var l=n.getLayout().x+(i-rt(n,e))*t;n.setLayout({x:l},!0)}else{var s=n.getLayout().y+(i-rt(n,e))*t;n.setLayout({y:s},!0)}}})})}function Lc(r,t){return rt(r.node2,t)*r.getValue()}function Tc(r,t){return rt(r.node2,t)}function Cc(r,t){return rt(r.node1,t)*r.getValue()}function Pc(r,t){return rt(r.node1,t)}function rt(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function pa(r){return r.getValue()}function tt(r,t,e){for(var a=0,n=r.length,i=-1;++i<n;){var o=+t(r[i],e);isNaN(o)||(a+=o)}return a}function Nc(r,t,e){O(r,function(a){O(a,function(n){if(n.inEdges.length){var i=tt(n.inEdges,Cc,e)/tt(n.inEdges,pa);if(isNaN(i)){var o=n.inEdges.length;i=o?tt(n.inEdges,Pc,e)/o:0}if(e==="vertical"){var l=n.getLayout().x+(i-rt(n,e))*t;n.setLayout({x:l},!0)}else{var s=n.getLayout().y+(i-rt(n,e))*t;n.setLayout({y:s},!0)}}})})}function Mc(r,t){var e=t==="vertical"?"x":"y";O(r,function(a){a.outEdges.sort(function(n,i){return n.node2.getLayout()[e]-i.node2.getLayout()[e]}),a.inEdges.sort(function(n,i){return n.node1.getLayout()[e]-i.node1.getLayout()[e]})}),O(r,function(a){var n=0,i=0;O(a.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),O(a.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function Rc(r){r.eachSeriesByType("sankey",function(t){var e=t.getGraph(),a=e.nodes,n=e.edges;if(a.length){var i=1/0,o=-1/0;O(a,function(l){var s=l.getLayout().value;s<i&&(i=s),s>o&&(o=s)}),O(a,function(l){var s=new qi({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=s.mapValueToVisual(l.getLayout().value),v=l.getModel().get(["itemStyle","color"]);v!=null?(l.setVisual("color",v),l.setVisual("style",{fill:v})):(l.setVisual("color",u),l.setVisual("style",{fill:u}))})}n.length&&O(n,function(l){var s=l.getModel().get("lineStyle");l.setVisual("style",s)})})}function Gf(r){r.registerChartView(fc),r.registerSeriesModel(pc),r.registerLayout(dc),r.registerVisual(Rc),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){var i=n.coordinateSystem,o=Nr(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var zo=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),l=i.get("type"),s;o==="category"?(t.layout="horizontal",a=n.getOrdinalMeta(),s=!this._hasEncodeRule("x")):l==="category"?(t.layout="vertical",a=i.getOrdinalMeta(),s=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],v=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],h=u[1-v],f=[n,i],g=f[v].get("type"),p=f[1-v].get("type"),d=t.data;if(d&&s){var m=[];O(d,function(b,w){var D;Q(b)?(D=b.slice(),b.unshift(w)):Q(b.value)?(D=Y({},b),D.value=D.value.slice(),b.value.unshift(w)):D=b,m.push(D)}),t.data=m}var y=this.defaultValueDimensions,S=[{name:c,type:pr(g),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:pr(p),dimsDef:y.slice()}];return At(this,{coordDimensions:S,dimensionsCount:y.length+1,encodeDefaulter:me(Fl,S,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),Go=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:U.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:U.color.shadow}},animationDuration:800},t})(oe);ya(Go,zo,!0);var Ec=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this.group,l=this._data;this._data||o.removeAll();var s=e.get("layout")==="horizontal"?1:0;i.diff(l).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),c=ii(v,i,u,s,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=l.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var h=i.getItemLayout(u);c?(Ee(c),Oo(h,c,i,u)):c=ii(h,i,u,s),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=l.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},t.prototype.remove=function(e){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},t.type="boxplot",t})(ae),Vc=(function(){function r(){}return r})(),kc=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new Vc},t.prototype.buildPath=function(e,a){var n=a.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])},t})(_e);function ii(r,t,e,a,n){var i=r.ends,o=new kc({shape:{points:n?zc(i,a,r):i}});return Oo(r,o,t,e,n),o}function Oo(r,t,e,a,n){var i=e.hostModel,o=wa[n?"initProps":"updateProps"];o(t,{shape:{points:r.ends}},i,a),t.useStyle(e.getItemVisual(a,"style")),t.style.strokeNoScale=!0,t.z2=100;var l=e.getItemModel(a),s=l.getModel("emphasis");ce(t,l),ie(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function zc(r,t,e){return ee(r,function(a){return a=a.slice(),a[t]=e.initBaseline,a})}var Et=O;function Gc(r){var t=Oc(r);Et(t,function(e){var a=e.seriesModels;a.length&&(Bc(e),Et(a,function(n,i){Fc(n,e.boxOffsetList[i],e.boxWidthList[i])}))})}function Oc(r){var t=[],e=[];return r.eachSeriesByType("boxplot",function(a){var n=a.getBaseAxis(),i=St(e,n);i<0&&(i=e.length,e[i]=n,t[i]={axis:n,seriesModels:[]}),t[i].seriesModels.push(a)}),t}function Bc(r){var t=r.axis,e=r.seriesModels,a=e.length,n=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],l;if(t.type==="category")l=t.getBandWidth();else{var s=0;Et(e,function(g){s=Math.max(s,g.getData().count())});var u=t.getExtent();l=Math.abs(u[1]-u[0])/s}Et(e,function(g){var p=g.get("boxWidth");Q(p)||(p=[p,p]),o.push([W(p[0],l)||0,W(p[1],l)||0])});var v=l*.8-2,c=v/a*.3,h=(v-c*(a-1))/a,f=h/2-v/2;Et(e,function(g,p){i.push(f),f+=c+h,n.push(Math.min(Math.max(h,o[p][0]),o[p][1]))})}function Fc(r,t,e){var a=r.coordinateSystem,n=r.getData(),i=e/2,o=r.get("layout")==="horizontal"?0:1,l=1-o,s=["x","y"],u=n.mapDimension(s[o]),v=n.mapDimensionsAll(s[l]);if(u==null||v.length<5)return;for(var c=0;c<n.count();c++){var h=n.get(u,c),f=S(h,v[2],c),g=S(h,v[0],c),p=S(h,v[1],c),d=S(h,v[3],c),m=S(h,v[4],c),y=[];b(y,p,!1),b(y,d,!0),y.push(g,p,m,d),w(y,g),w(y,m),w(y,f),n.setItemLayout(c,{initBaseline:f[l],ends:y})}function S(D,_,x){var P=n.get(_,x),I=[];I[o]=D,I[l]=P;var A;return isNaN(D)||isNaN(P)?A=[NaN,NaN]:(A=a.dataToPoint(I),A[o]+=t),A}function b(D,_,x){var P=_.slice(),I=_.slice();P[o]+=i,I[o]-=i,x?D.push(P,I):D.push(I,P)}function w(D,_){var x=_.slice(),P=_.slice();x[o]-=i,P[o]+=i,D.push(x,P)}}function Hc(r,t){t=t||{};for(var e=[],a=[],n=t.boundIQR,i=n==="none"||n===0,o=0;o<r.length;o++){var l=Hl(r[o].slice()),s=Ea(l,.25),u=Ea(l,.5),v=Ea(l,.75),c=l[0],h=l[l.length-1],f=(n??1.5)*(v-s),g=i?c:Math.max(c,s-f),p=i?h:Math.min(h,v+f),d=t.itemNameFormatter,m=Ae(d)?d({value:o}):Me(d)?d.replace("{value}",o+""):o+"";e.push([m,g,s,u,v,p]);for(var y=0;y<l.length;y++){var S=l[y];if(S<g||S>p){var b=[m,S];a.push(b)}}}return{boxData:e,outliers:a}}var Wc={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Wl){var a="";ia(a)}var n=Hc(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function Of(r){r.registerSeriesModel(Go),r.registerChartView(Ec),r.registerLayout(Gc),r.registerTransform(Wc)}var Uc=["itemStyle","borderColor"],Zc=["itemStyle","borderColor0"],$c=["itemStyle","borderColorDoji"],Xc=["itemStyle","color"],Yc=["itemStyle","color0"];function Fr(r,t){return t.get(r>0?Xc:Yc)}function Hr(r,t){return t.get(r===0?$c:r>0?Uc:Zc)}var qc={seriesType:"candlestick",plan:ma(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),l=n.getItemLayout(i).sign,s=o.getItemStyle();s.fill=Fr(l,o),s.stroke=Hr(l,o)||s.fill;var u=n.ensureUniqueItemVisual(i,"style");Y(u,s)}}}}}},jc=["color","borderColor"],Kc=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Sa(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),l=e.get("clip",!0),s=e.coordinateSystem,u=s.getArea&&s.getArea();this._data||i.removeAll(),a.diff(n).add(function(v){if(a.hasValue(v)){var c=a.getItemLayout(v);if(l&&oi(u,c))return;var h=tr(c,v,!0);ve(h,{shape:{points:c.ends}},e,v),ar(h,a,v,o),i.add(h),a.setItemGraphicEl(v,h)}}).update(function(v,c){var h=n.getItemGraphicEl(c);if(!a.hasValue(v)){i.remove(h);return}var f=a.getItemLayout(v);if(l&&oi(u,f)){i.remove(h);return}h?(J(h,{shape:{points:f.ends}},e,v),Ee(h)):h=tr(f),ar(h,a,v,o),i.add(h),a.setItemGraphicEl(v,h)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),li(e,this.group);var a=e.get("clip",!0)?$t(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var l=n.getItemLayout(o),s=tr(l);ar(s,n,o,i),s.incremental=!0,this.group.add(s),this._progressiveEls.push(s)}},t.prototype._incrementalRenderLarge=function(e,a){li(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})(ae),Jc=(function(){function r(){}return r})(),Qc=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new Jc},t.prototype.buildPath=function(e,a){var n=a.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t})(_e);function tr(r,t,e){var a=r.ends;return new Qc({shape:{points:e?eh(a,r):a},z2:100})}function oi(r,t){for(var e=!0,a=0;a<t.ends.length;a++)if(r.contain(t.ends[a][0],t.ends[a][1])){e=!1;break}return e}function ar(r,t,e,a){var n=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,ce(r,n);var i=t.getItemLayout(e).sign;O(r.states,function(l,s){var u=n.getModel(s),v=Fr(i,u),c=Hr(i,u)||v,h=l.style||(l.style={});v&&(h.fill=v),c&&(h.stroke=c)});var o=n.getModel("emphasis");ie(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function eh(r,t){return ee(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var th=(function(){function r(){}return r})(),rr=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new th},t.prototype.buildPath=function(e,a){for(var n=a.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];e.moveTo(o,n[i++]),e.lineTo(o,n[i++])}else i+=3},t})(_e);function li(r,t,e,a){var n=r.getData(),i=n.getLayout("largePoints"),o=new rr({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});t.add(o);var l=new rr({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});t.add(l);var s=new rr({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});t.add(s),nr(1,o,r),nr(-1,l,r),nr(0,s,r),a&&(o.incremental=!0,l.incremental=!0),e&&e.push(o,l)}function nr(r,t,e,a){var n=Hr(r,e)||Fr(r,e),i=e.getModel("itemStyle").getItemStyle(jc);t.useStyle(i),t.style.fill=null,t.style.stroke=n}var Bo=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,a,n){var i=a.getItemLayout(e);return i&&n.rect(i.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.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},t})(oe);ya(Bo,zo,!0);function ah(r){!r||!Q(r.series)||O(r.series,function(t){yl(t)&&t.type==="k"&&(t.type="candlestick")})}var rh={seriesType:"candlestick",plan:ma(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),a=nh(r,e),n=0,i=1,o=["x","y"],l=e.getDimensionIndex(e.mapDimension(o[n])),s=ee(e.mapDimensionsAll(o[i]),e.getDimensionIndex,e),u=s[0],v=s[1],c=s[2],h=s[3];if(e.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),l<0||s.length<4)return;return{progress:r.pipelineContext.large?g:f};function f(p,d){for(var m,y=d.getStore();(m=p.next())!=null;){var S=y.get(l,m),b=y.get(u,m),w=y.get(v,m),D=y.get(c,m),_=y.get(h,m),x=Math.min(b,w),P=Math.max(b,w),I=E(x,S),A=E(P,S),L=E(D,S),M=E(_,S),V=[];C(V,A,0),C(V,I,1),V.push(k(M),k(A),k(L),k(I));var N=d.getItemModel(m),T=!!N.get(["itemStyle","borderColorDoji"]);d.setItemLayout(m,{sign:si(y,m,b,w,v,T),initBaseline:b>w?A[i]:I[i],ends:V,brushRect:R(D,_,S)})}function E(z,G){var H=[];return H[n]=G,H[i]=z,isNaN(G)||isNaN(z)?[NaN,NaN]:t.dataToPoint(H)}function C(z,G,H){var F=G.slice(),$=G.slice();F[n]=Va(F[n]+a/2,1,!1),$[n]=Va($[n]-a/2,1,!0),H?z.push(F,$):z.push($,F)}function R(z,G,H){var F=E(z,H),$=E(G,H);return F[n]-=a/2,$[n]-=a/2,{x:F[0],y:F[1],width:a,height:$[1]-F[1]}}function k(z){return z[n]=Va(z[n],1),z}}function g(p,d){for(var m=st(p.count*4),y=0,S,b=[],w=[],D,_=d.getStore(),x=!!r.get(["itemStyle","borderColorDoji"]);(D=p.next())!=null;){var P=_.get(l,D),I=_.get(u,D),A=_.get(v,D),L=_.get(c,D),M=_.get(h,D);if(isNaN(P)||isNaN(L)||isNaN(M)){m[y++]=NaN,y+=3;continue}m[y++]=si(_,D,I,A,v,x),b[n]=P,b[i]=L,S=t.dataToPoint(b,null,w),m[y++]=S?S[0]:NaN,m[y++]=S?S[1]:NaN,b[i]=M,S=t.dataToPoint(b,null,w),m[y++]=S?S[1]:NaN}d.setLayout("largePoints",m)}}};function si(r,t,e,a,n,i){var o;return e>a?o=-1:e<a?o=1:o=i?0:t>0?r.get(n,t-1)<=a?1:-1:1,o}function nh(r,t){var e=r.getBaseAxis(),a,n=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),i=W(Vt(r.get("barMaxWidth"),n),n),o=W(Vt(r.get("barMinWidth"),1),n),l=r.get("barWidth");return l!=null?W(l,n):Math.max(Math.min(n/2,i),o)}function Bf(r){r.registerChartView(Kc),r.registerSeriesModel(Bo),r.registerPreprocessor(ah),r.registerVisual(qc),r.registerLayout(rh)}function ui(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var ih=(function(r){B(t,r);function t(e,a){var n=r.call(this)||this,i=new Ia(e,a),o=new K;return n.add(i),n.add(o),n.updateData(e,a),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),l=0;l<i;l++){var s=Ge(a,-1,-1,2,2,n);s.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-l/i*e.period+e.effectOffset;s.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(u).start(),s.animateStyle(!0).when(e.period,{opacity:0}).delay(u).start(),o.add(s)}ui(o,e)},t.prototype.updateEffectAnimation=function(e){for(var a=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var l=i[o];if(a[l]!==e[l]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}ui(n,e)},t.prototype.highlight=function(){Wi(this)},t.prototype.downplay=function(){Ui(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,a){var n=this,i=e.hostModel;this.childAt(0).updateData(e,a);var o=this.childAt(1),l=e.getItemModel(a),s=e.getItemVisual(a,"symbol"),u=Oi(e.getItemVisual(a,"symbolSize")),v=e.getItemVisual(a,"style"),c=v&&v.fill,h=l.getModel("emphasis");o.setScale(u),o.traverse(function(d){d.setStyle("fill",c)});var f=Zi(e.getItemVisual(a,"symbolOffset"),u);f&&(o.x=f[0],o.y=f[1]);var g=e.getItemVisual(a,"symbolRotate");o.rotation=(g||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=l.get(["rippleEffect","scale"]),p.brushType=l.get(["rippleEffect","brushType"]),p.period=l.get(["rippleEffect","period"])*1e3,p.effectOffset=a/e.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=s,p.color=c,p.rippleEffectColor=l.get(["rippleEffect","color"]),p.rippleNumber=l.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(d){d==="emphasis"?p.showEffectOn!=="render"&&n.startEffectAnimation(p):d==="normal"&&p.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=p,ie(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t})(K),oh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this._symbolDraw=new Aa(ih)},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(e)}),this.group.add(o.group)},t.prototype._getClipShape=function(e){var a=e.coordinateSystem,n=a&&a.getArea&&a.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,a,n){var i=e.getData();this.group.dirty();var o=Xt("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var a=e.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=ml(a.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t})(ae),lh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Ze(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.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},t})(oe);function Ff(r){r.registerChartView(oh),r.registerSeriesModel(lh),r.registerLayout(Xt("effectScatter"))}var Fo=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;return i.add(i.createLine(e,a,n)),i._updateEffectSymbol(e,a),i}return t.prototype.createLine=function(e,a,n){return new Ki(e,a,n)},t.prototype._updateEffectSymbol=function(e,a){var n=e.getItemModel(a),i=n.getModel("effect"),o=i.get("symbolSize"),l=i.get("symbol");Q(o)||(o=[o,o]);var s=e.getItemVisual(a,"style"),u=i.get("color")||s&&s.stroke,v=this.childAt(1);this._symbolType!==l&&(this.remove(v),v=Ge(l,-.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=l,this._symbolScale=o,this._updateEffectAnimation(e,i,a))},t.prototype._updateEffectAnimation=function(e,a,n){var i=this.childAt(1);if(i){var o=e.getItemLayout(n),l=a.get("period")*1e3,s=a.get("loop"),u=a.get("roundTrip"),v=a.get("constantSpeed"),c=kt(a.get("delay"),function(f){return f/e.count()*l/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),v>0&&(l=this._getLineLength(i)/v*1e3),l!==this._period||s!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;Ae(c)?h=c(n):h=c,i.__t>0&&(h=-l*i.__t),this._animateSymbol(i,l,h,s,u)}this._period=l,this._loop=s,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,n,i,o){if(a>0){e.__t=0;var l=this,s=e.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){l._updateSymbolPosition(e)});i||s.done(function(){l.remove(e)}),s.start()}},t.prototype._getLineLength=function(e){return lt(e.__p1,e.__cp1)+lt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,n){this.childAt(0).updateData(e,a,n),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t<1?e.__t:2-e.__t,l=[e.x,e.y],s=l.slice(),u=Ni,v=Sl;l[0]=u(a[0],i[0],n[0],o),l[1]=u(a[1],i[1],n[1],o);var c=e.__t<1?v(a[0],i[0],n[0],o):v(n[0],i[0],a[0],1-o),h=e.__t<1?v(a[1],i[1],n[1],o):v(n[1],i[1],a[1],1-o);e.rotation=-Math.atan2(h,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=lt(s,l)*1.05,o===1&&(l[0]=s[0]+(l[0]-s[0])/2,l[1]=s[1]+(l[1]-s[1])/2)):e.__lastT===1?e.scaleY=2*lt(a,l):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=l[0],e.y=l[1]},t.prototype.updateLayout=function(e,a){this.childAt(0).updateLayout(e,a);var n=e.getItemModel(a).getModel("effect");this._updateEffectAnimation(e,n,a)},t})(K),Ho=(function(r){B(t,r);function t(e,a,n){var i=r.call(this)||this;return i._createPolyline(e,a,n),i}return t.prototype._createPolyline=function(e,a,n){var i=e.getItemLayout(a),o=new bt({shape:{points:i}});this.add(o),this._updateCommonStl(e,a,n)},t.prototype.updateData=function(e,a,n){var i=e.hostModel,o=this.childAt(0),l={shape:{points:e.getItemLayout(a)}};J(o,l,i,a),this._updateCommonStl(e,a,n)},t.prototype._updateCommonStl=function(e,a,n){var i=this.childAt(0),o=e.getItemModel(a),l=n&&n.emphasisLineStyle,s=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var c=o.getModel("emphasis");l=c.getModel("lineStyle").getLineStyle(),v=c.get("disabled"),s=c.get("focus"),u=c.get("blurScope")}i.useStyle(e.getItemVisual(a,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var h=i.ensureState("emphasis");h.style=l,ie(this,s,u,v)},t.prototype.updateLayout=function(e,a){var n=this.childAt(0);n.setShape("points",e.getItemLayout(a))},t})(K),sh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return t.prototype.createLine=function(e,a,n){return new Ho(e,a,n)},t.prototype._updateAnimationPoints=function(e,a){this._points=a;for(var n=[0],i=0,o=1;o<a.length;o++){var l=a[o-1],s=a[o];i+=lt(l,s),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},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var a=e.__t<1?e.__t:2-e.__t,n=this._points,i=this._offsets,o=n.length;if(i){var l=this._lastFrame,s;if(a<this._lastFramePercent){var u=Math.min(l+1,o-1);for(s=u;s>=0&&!(i[s]<=a);s--);s=Math.min(s,o-2)}else{for(s=l;s<o&&!(i[s]>a);s++);s=Math.min(s-1,o-2)}var v=(a-i[s])/(i[s+1]-i[s]),c=n[s],h=n[s+1];e.x=c[0]*(1-v)+v*h[0],e.y=c[1]*(1-v)+v*h[1];var f=e.__t<1?h[0]-c[0]:c[0]-h[0],g=e.__t<1?h[1]-c[1]:c[1]-h[1];e.rotation=-Math.atan2(g,f)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=a,e.ignore=!1}},t})(Fo),uh=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),vh=(function(r){B(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:U.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new uh},t.prototype.buildPath=function(e,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o<n.length;){var l=n[o++];if(l>0){e.moveTo(n[o++],n[o++]);for(var s=1;s<l;s++)e.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],v=n[o++],c=n[o++],h=n[o++];if(e.moveTo(u,v),i>0){var f=(u+c)/2-(v-h)*i,g=(v+h)/2-(c-u)*i;e.quadraticCurveTo(f,g,c,h)}else e.lineTo(c,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var n=this.shape,i=n.segs,o=n.curveness,l=this.style.lineWidth;if(n.polyline)for(var s=0,u=0;u<i.length;){var v=i[u++];if(v>0)for(var c=i[u++],h=i[u++],f=1;f<v;f++){var g=i[u++],p=i[u++];if(tn(c,h,g,p,l,e,a))return s}s++}else for(var s=0,u=0;u<i.length;){var c=i[u++],h=i[u++],g=i[u++],p=i[u++];if(o>0){var d=(c+g)/2-(h-p)*o,m=(h+p)/2-(g-c)*o;if(bl(c,h,d,m,g,p,l,e,a))return s}else if(tn(c,h,g,p,l,e,a))return s;s++}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,l=-1/0,s=-1/0,u=0;u<n.length;){var v=n[u++],c=n[u++];i=Math.min(v,i),l=Math.max(v,l),o=Math.min(c,o),s=Math.max(c,s)}e=this._rect=new mt(i,o,l,s)}return e},t})(_e),ch=(function(){function r(){this.group=new K}return r.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},r.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(t,e){var a=this._newAdded[0],n=e.getLayout("linesPoints"),i=a&&a.shape.segs;if(i&&i.length<2e4){var o=i.length,l=new Float32Array(o+n.length);l.set(i),l.set(n,o),a.setShape({segs:l})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:n}),this._setCommon(s,e),s.__startIndex=t.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new vh({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},r.prototype._setCommon=function(t,e,a){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=e.getVisual("style");i&&i.stroke&&t.setStyle("stroke",i.stroke),t.setStyle("fill",null);var o=ne(t);o.seriesIndex=n.seriesIndex,t.on("mousemove",function(l){o.dataIndex=null;var s=t.hoverDataIdx;s>0&&(o.dataIndex=s+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),Wo={seriesType:"lines",plan:ma(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var l=void 0,s=n.end-n.start;if(e){for(var u=0,v=n.start;v<n.end;v++)u+=r.getLineCoordsCount(v);l=new Float32Array(s+u*2)}else l=new Float32Array(s*4);for(var c=0,h=[],v=n.start;v<n.end;v++){var f=r.getLineCoords(v,o);e&&(l[c++]=f);for(var g=0;g<f;g++)h=t.dataToPoint(o[g],!1,h),l[c++]=h[0],l[c++]=h[1]}i.setLayout("linesPoints",l)}else for(var v=n.start;v<n.end;v++){var p=i.getItemModel(v),f=r.getLineCoords(v,o),d=[];if(e)for(var m=0;m<f;m++)d.push(t.dataToPoint(o[m]));else{d[0]=t.dataToPoint(o[0]),d[1]=t.dataToPoint(o[1]);var y=p.get(["lineStyle","curveness"]);+y&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*y,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*y])}i.setItemLayout(v,d)}}}}}},hh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e),l=e.get("zlevel"),s=e.get(["effect","trailLength"]),u=n.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(l).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&s>0&&(v||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)})),o.updateData(i);var c=e.get("clip",!0)&&$t(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=l,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,n){var i=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var l=Wo.reset(e,a,n);l.progress&&l.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),l=a.pipelineContext,s=l.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||s!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=s?new ch:new ji(o?i?sh:Ho:i?Fo:Ki),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t})(ae),fh=typeof Uint32Array>"u"?Array:Uint32Array,gh=typeof Float64Array>"u"?Array:Float64Array;function vi(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=ee(t,function(e){var a=[e[0].coord,e[1].coord],n={coords:a};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),wl([n,e[0],e[1]])}))}var ph=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],vi(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(vi(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=oa(this._flatCoords,a.flatCoords),this._flatCoordsOffset=oa(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o<i;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[n+o*2],a[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var l=this._getCoordsFromItemModel(e),o=0;o<l.length;o++)a[o]=a[o]||[],a[o][0]=l[o][0],a[o][1]=l[o][1];return l.length}},t.prototype._processFlatCoordsArray=function(e){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),Ne(e[0])){for(var n=e.length,i=new fh(n),o=new gh(n),l=0,s=0,u=0,v=0;v<n;){u++;var c=e[v++];i[s++]=l+a,i[s++]=c;for(var h=0;h<c;h++){var f=e[v++],g=e[v++];o[l++]=f,o[l++]=g}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,s),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,a){var n=new ct(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(i,o,l,s){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[s]:u}),n},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=i.getItemModel(e),l=o.get("name");if(l)return l;var s=o.get("fromName"),u=o.get("toName"),v=[];return s!=null&&v.push(s),u!=null&&v.push(u),Le("nameValue",{name:v.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.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}},t})(oe);function ra(r){return r instanceof Array||(r=[r,r]),r}var dh={seriesType:"lines",reset:function(r){var t=ra(r.get("symbol")),e=ra(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function n(i,o){var l=i.getItemModel(o),s=ra(l.getShallow("symbol",!0)),u=ra(l.getShallow("symbolSize",!0));s[0]&&i.setItemVisual(o,"fromSymbol",s[0]),s[1]&&i.setItemVisual(o,"toSymbol",s[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function Hf(r){r.registerChartView(hh),r.registerSeriesModel(ph),r.registerLayout(Wo),r.registerVisual(dh)}var yh=256,mh=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=an.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var l=this._getBrush(),s=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),f=t.length;c.width=e,c.height=a;for(var g=0;g<f;++g){var p=t[g],d=p[0],m=p[1],y=p[2],S=n(y);h.globalAlpha=S,h.drawImage(l,d-v,m-v)}if(!c.width||!c.height)return c;for(var b=h.getImageData(0,0,c.width,c.height),w=b.data,D=0,_=w.length,x=this.minOpacity,P=this.maxOpacity,I=P-x;D<_;){var S=w[D+3]/256,A=Math.floor(S*(yh-1))*4;if(S>0){var L=o(S)?s:u;S>0&&(S=S*I+x),w[D++]=L[A],w[D++]=L[A+1],w[D++]=L[A+2],w[D++]=L[A+3]*S*256}else D+=4}return h.putImageData(b,0,0),c},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=an.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=U.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,l=0;l<256;l++)t[e](l/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r})();function Sh(r,t,e){var a=r[1]-r[0];t=ee(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var l;for(l=i;l<n;l++){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}if(l===n)for(l=i-1;l>=0;l--){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}return l>=0&&l<n&&e[l]}}function bh(r,t){var e=r[1]-r[0];return t=[(t[0]-r[0])/e,(t[1]-r[0])/e],function(a){return a>=t[0]&&a<=t[1]}}function ci(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var wh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===e&&(i=l)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):ci(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(ci(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Sa(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var l=e.coordinateSystem,s=Gt(l,"cartesian2d"),u=Gt(l,"matrix"),v,c,h,f;if(s){var g=l.getAxis("x"),p=l.getAxis("y");v=g.getBandWidth()+.5,c=p.getBandWidth()+.5,h=g.scale.getExtent(),f=p.scale.getExtent()}for(var d=this.group,m=e.getData(),y=e.getModel(["emphasis","itemStyle"]).getItemStyle(),S=e.getModel(["blur","itemStyle"]).getItemStyle(),b=e.getModel(["select","itemStyle"]).getItemStyle(),w=e.get(["itemStyle","borderRadius"]),D=De(e),_=e.getModel("emphasis"),x=_.get("focus"),P=_.get("blurScope"),I=_.get("disabled"),A=s||u?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],L=n;L<i;L++){var M=void 0,V=m.getItemVisual(L,"style");if(s){var N=m.get(A[0],L),T=m.get(A[1],L);if(isNaN(m.get(A[2],L))||isNaN(N)||isNaN(T)||N<h[0]||N>h[1]||T<f[0]||T>f[1])continue;var E=l.dataToPoint([N,T]);M=new xe({shape:{x:E[0]-v/2,y:E[1]-c/2,width:v,height:c},style:V})}else if(u){var C=l.dataToLayout([m.get(A[0],L),m.get(A[1],L)]).rect;if(na(C.x))continue;M=new xe({z2:1,shape:C,style:V})}else{if(isNaN(m.get(A[1],L)))continue;var R=l.dataToLayout([m.get(A[0],L)]),C=R.contentRect||R.rect;if(na(C.x)||na(C.y))continue;M=new xe({z2:1,shape:C,style:V})}if(m.hasItemOption){var k=m.getItemModel(L),z=k.getModel("emphasis");y=z.getModel("itemStyle").getItemStyle(),S=k.getModel(["blur","itemStyle"]).getItemStyle(),b=k.getModel(["select","itemStyle"]).getItemStyle(),w=k.get(["itemStyle","borderRadius"]),x=z.get("focus"),P=z.get("blurScope"),I=z.get("disabled"),D=De(k)}M.shape.r=w;var G=e.getRawValue(L),H="-";G&&G[2]!=null&&(H=G[2]+""),Ie(M,D,{labelFetcher:e,labelDataIndex:L,defaultOpacity:V.opacity,defaultText:H}),M.ensureState("emphasis").style=y,M.ensureState("blur").style=S,M.ensureState("select").style=b,ie(M,x,P,I),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),d.add(M),m.setItemGraphicEl(L,M),this._progressiveEls&&this._progressiveEls.push(M)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,l=n.targetVisuals.outOfRange,s=a.getData(),u=this._hmLayer||this._hmLayer||new mh;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var v=e.getViewRect().clone(),c=e.getRoamTransform();v.applyTransform(c);var h=Math.max(v.x,0),f=Math.max(v.y,0),g=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),d=g-h,m=p-f,y=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],S=s.mapArray(y,function(_,x,P){var I=e.dataToPoint([_,x]);return I[0]-=h,I[1]-=f,I.push(P),I}),b=n.getExtent(),w=n.type==="visualMap.continuous"?bh(b,n.option.range):Sh(b,n.getPieceList(),n.option.selected);u.update(S,d,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},w);var D=new Ut({style:{width:d,height:m,x:h,y:f,image:u.canvas},silent:!0});this.group.add(D)},t.type="heatmap",t})(ae),Dh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Ze(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Hi.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:U.color.primary}}},t})(oe);function Wf(r){r.registerChartView(wh),r.registerSeriesModel(Dh)}var _h=["itemStyle","borderWidth"],hi=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ir=new Bi,xh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),l=this._data,s=e.coordinateSystem,u=s.getBaseAxis(),v=u.isHorizontal(),c=s.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:s,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:v,valueDim:hi[+v],categoryDim:hi[1-+v]};o.diff(l).add(function(g){if(o.hasValue(g)){var p=gi(o,g),d=fi(o,g,p,h),m=pi(o,h,d);o.setItemGraphicEl(g,m),i.add(m),yi(m,h,d)}}).update(function(g,p){var d=l.getItemGraphicEl(p);if(!o.hasValue(g)){i.remove(d);return}var m=gi(o,g),y=fi(o,g,m,h),S=qo(o,y);d&&S!==d.__pictorialShapeStr&&(i.remove(d),o.setItemGraphicEl(g,null),d=null),d?Nh(d,h,y):d=pi(o,h,y,!0),o.setItemGraphicEl(g,d),d.__pictorialSymbolMeta=y,i.add(d),yi(d,h,y)}).remove(function(g){var p=l.getItemGraphicEl(g);p&&di(l,g,p.__pictorialSymbolMeta.animationModel,p)}).execute();var f=e.get("clip",!0)?$t(e.coordinateSystem,!1,e):null;return f?i.setClipPath(f):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){di(i,ne(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t})(ae);function fi(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),l=e.get("symbolPosition")||"start",s=e.get("symbolRotate"),u=(s||0)*Math.PI/180||0,v=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),h={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:v,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};Ah(e,i,n,a,h),Ih(r,t,n,i,o,h.boundingLength,h.pxSign,v,a,h),Lh(e,h.symbolScale,u,a,h);var f=h.symbolSize,g=Zi(e.get("symbolOffset"),f);return Th(e,f,n,i,o,g,l,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function Ah(r,t,e,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),l=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),s=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(e[i.wh]<=0),v;if(Q(o)){var c=[or(l,o[0])-s,or(l,o[1])-s];c[1]<c[0]&&c.reverse(),v=c[u]}else o!=null?v=or(l,o)-s:t?v=a.coordSysExtent[i.index][u]-s:v=e[i.wh];n.boundingLength=v,t&&(n.repeatCutLength=e[i.wh]);var h=i.xy==="x",f=l.inverse;n.pxSign=h&&!f||!h&&f?v>=0?1:-1:v>0?1:-1}function or(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function Ih(r,t,e,a,n,i,o,l,s,u){var v=s.valueDim,c=s.categoryDim,h=Math.abs(e[c.wh]),f=r.getItemVisual(t,"symbolSize"),g;Q(f)?g=f.slice():f==null?g=["100%","100%"]:g=[f,f],g[c.index]=W(g[c.index],h),g[v.index]=W(g[v.index],a?h:Math.abs(i)),u.symbolSize=g;var p=u.symbolScale=[g[0]/l,g[1]/l];p[v.index]*=(s.isHorizontal?-1:1)*o}function Lh(r,t,e,a,n){var i=r.get(_h)||0;i&&(ir.attr({scaleX:t[0],scaleY:t[1],rotation:e}),ir.updateTransform(),i/=ir.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function Th(r,t,e,a,n,i,o,l,s,u,v,c){var h=v.categoryDim,f=v.valueDim,g=c.pxSign,p=Math.max(t[f.index]+l,0),d=p;if(a){var m=Math.abs(s),y=kt(r.get("symbolMargin"),"15%")+"",S=!1;y.lastIndexOf("!")===y.length-1&&(S=!0,y=y.slice(0,y.length-1));var b=W(y,t[f.index]),w=Math.max(p+b*2,0),D=S?0:b*2,_=Ul(a),x=_?a:mi((m+D)/w),P=m-x*p;b=P/2/(S?x:Math.max(x-1,1)),w=p+b*2,D=S?0:b*2,!_&&a!=="fixed"&&(x=u?mi((Math.abs(u)+D)/w):0),d=x*w-D,c.repeatTimes=x,c.symbolMargin=b}var I=g*(d/2),A=c.pathPosition=[];A[h.index]=e[h.wh]/2,A[f.index]=o==="start"?I:o==="end"?s-I:s/2,i&&(A[0]+=i[0],A[1]+=i[1]);var L=c.bundlePosition=[];L[h.index]=e[h.xy],L[f.index]=e[f.xy];var M=c.barRectShape=Y({},e);M[f.wh]=g*Math.max(Math.abs(e[f.wh]),Math.abs(A[f.index]+I)),M[h.wh]=e[h.wh];var V=c.clipShape={};V[h.xy]=-e[h.xy],V[h.wh]=v.ecSize[h.wh],V[f.xy]=0,V[f.wh]=e[f.wh]}function Uo(r){var t=r.symbolPatternSize,e=Ge(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function Zo(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,l=e.pathPosition,s=t.valueDim,u=e.repeatTimes||0,v=0,c=i[t.valueDim.index]+o+e.symbolMargin*2;for(Wr(r,function(p){p.__pictorialAnimationIndex=v,p.__pictorialRepeatTimes=u,v<u?yt(p,null,g(v),e,a):yt(p,null,{scaleX:0,scaleY:0},e,a,function(){n.remove(p)}),v++});v<u;v++){var h=Uo(e);h.__pictorialAnimationIndex=v,h.__pictorialRepeatTimes=u,n.add(h);var f=g(v);yt(h,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},e,a)}function g(p){var d=l.slice(),m=e.pxSign,y=p;return(e.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-p),d[s.index]=c*(y-u/2+.5)+l[s.index],{x:d[0],y:d[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function $o(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?yt(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=Uo(e),n.add(i),yt(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function Xo(r,t,e){var a=Y({},t.barRectShape),n=r.__pictorialBarRect;n?yt(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new xe({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function Yo(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=Y({},e.clipShape),o=t.valueDim,l=e.animationModel,s=e.dataIndex;if(n)J(n,{shape:i},l,s);else{i[o.wh]=0,n=new xe({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],wa[a?"updateProps":"initProps"](n,{shape:u},l,s)}}}function gi(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=Ch,e.isAnimationEnabled=Ph,e}function Ch(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Ph(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function pi(r,t,e,a){var n=new K,i=new K;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?Zo(n,t,e):$o(n,t,e),Xo(n,e,a),Yo(n,t,e,a),n.__pictorialShapeStr=qo(r,e),n.__pictorialSymbolMeta=e,n}function Nh(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;J(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?Zo(r,t,e,!0):$o(r,t,e,!0),Xo(r,e,!0),Yo(r,t,e,!0)}function di(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Wr(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),O(i,function(o){ua(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function qo(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Wr(r,t,e){O(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function yt(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&wa[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function yi(r,t,e){var a=e.dataIndex,n=e.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),l=n.getModel(["blur","itemStyle"]).getItemStyle(),s=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),v=i.get("focus"),c=i.get("blurScope"),h=i.get("scale");Wr(r,function(p){if(p instanceof Ut){var d=p.style;p.useStyle(Y({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},e.style))}else p.useStyle(e.style);var m=p.ensureState("emphasis");m.style=o,h&&(m.scaleX=p.scaleX*1.1,m.scaleY=p.scaleY*1.1),p.ensureState("blur").style=l,p.ensureState("select").style=s,u&&(p.cursor=u),p.z2=e.z2});var f=t.valueDim.posDesc[+(e.boundingLength>0)],g=r.__pictorialBarRect;g.ignoreClip=!0,Ie(g,De(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:Ot(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:f}),ie(r,v,c,i.get("disabled"))}function mi(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var Mh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Ri(Bt.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:U.color.primary}}}),t})(Bt);function Uf(r){r.registerChartView(xh),r.registerSeriesModel(Mh),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,me(Vi,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ki("pictorialBar"))}var Rh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this,l=this.group,s=e.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;l.x=0,l.y=v.y+c[0];function h(d){return d.name}var f=new _a(this._layersSeries||[],s,h,h),g=[];f.add(ue(p,this,"add")).update(ue(p,this,"update")).remove(ue(p,this,"remove")).execute();function p(d,m,y){var S=o._layers;if(d==="remove"){l.remove(S[m]);return}for(var b=[],w=[],D,_=s[m].indices,x=0;x<_.length;x++){var P=i.getItemLayout(_[x]),I=P.x,A=P.y0,L=P.y;b.push(I,A),w.push(I,A+L),D=i.getItemVisual(_[x],"style")}var M,V=i.getItemLayout(_[0]),N=e.getModel("label"),T=N.get("margin"),E=e.getModel("emphasis");if(d==="add"){var C=g[m]=new K;M=new no({shape:{points:b,stackedOnPoints:w,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),C.add(M),l.add(C),e.isAnimationEnabled()&&M.setClipPath(Eh(M.getBoundingRect(),e,function(){M.removeClipPath()}))}else{var C=S[y];M=C.childAt(0),l.add(C),g[m]=C,J(M,{shape:{points:b,stackedOnPoints:w}},e),Ee(M)}Ie(M,De(e),{labelDataIndex:_[x-1],defaultText:i.getName(_[x-1]),inheritColor:D.fill},{normal:{verticalAlign:"middle"}}),M.setTextConfig({position:null,local:!0});var R=M.getTextContent();R&&(R.x=V.x-T,R.y=V.y0+V.y/2),M.useStyle(D),i.setItemGraphicEl(m,M),ce(M,e),ie(M,E.get("focus"),E.get("blurScope"),E.get("disabled"))}this._layersSeries=s,this._layers=g},t.type="themeRiver",t})(ae);function Eh(r,t,e){var a=new xe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return ve(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},t,e),a}var lr=2,Vh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new It(ue(this.getData,this),ue(this.getRawData,this))},t.prototype.fixData=function(e){var a=e.length,n={},i=gr(e,function(h){return n.hasOwnProperty(h[0]+"")||(n[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,f){o.push({name:f,dataList:h})});for(var l=o.length,s=0;s<l;++s){for(var u=o[s].name,v=0;v<o[s].dataList.length;++v){var c=o[s].dataList[v][0]+"";n[c]=s}for(var c in n)n.hasOwnProperty(c)&&n[c]!==s&&(n[c]=s,e[a]=[c,0,u],a++)}return e},t.prototype.getInitialData=function(e,a){for(var n=this.getReferringComponents("singleAxis",Zl).models[0],i=n.get("type"),o=Ar(e.data,function(g){return g[2]!==void 0}),l=this.fixData(o||[]),s=[],u=this.nameMap=vt(),v=0,c=0;c<l.length;++c)s.push(l[c][lr]),u.get(l[c][lr])||(u.set(l[c][lr],v),v++);var h=xa(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:pr(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new ct(h,this);return f.initData(l),f},t.prototype.getLayerSeries=function(){for(var e=this.getData(),a=e.count(),n=[],i=0;i<a;++i)n[i]=i;var o=e.mapDimension("single"),l=gr(n,function(u){return e.get("name",u)}),s=[];return l.buckets.each(function(u,v){u.sort(function(c,h){return e.get(o,c)-e.get(o,h)}),s.push({name:v,indices:u})}),s},t.prototype.getAxisTooltipData=function(e,a,n){Q(e)||(e=e?[e]:[]);for(var i=this.getData(),o=this.getLayerSeries(),l=[],s=o.length,u,v=0;v<s;++v){for(var c=Number.MAX_VALUE,h=-1,f=o[v].indices.length,g=0;g<f;++g){var p=i.get(e[0],o[v].indices[g]),d=Math.abs(p-a);d<=c&&(u=p,c=d,h=o[v].indices[g])}l.push(h)}return{dataIndices:l,nestestValue:u}},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=i.getName(e),l=i.get(i.mapDimension("value"),e);return Le("nameValue",{name:o,value:l})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.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}}},t})(oe);function kh(r,t){r.eachSeriesByType("themeRiver",function(e){var a=e.getData(),n=e.coordinateSystem,i={},o=n.getRect();i.rect=o;var l=e.get("boundaryGap"),s=n.getAxis();if(i.boundaryGap=l,s.orient==="horizontal"){l[0]=W(l[0],o.height),l[1]=W(l[1],o.height);var u=o.height-l[0]-l[1];Si(a,e,u)}else{l[0]=W(l[0],o.width),l[1]=W(l[1],o.width);var v=o.width-l[0]-l[1];Si(a,e,v)}a.setLayout("layoutInfo",i)})}function Si(r,t,e){if(r.count())for(var a=t.coordinateSystem,n=t.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),l=ee(n,function(d){return ee(d.indices,function(m){var y=a.dataToPoint(r.get(i,m));return y[1]=r.get(o,m),y})}),s=zh(l),u=s.y0,v=e/s.max,c=n.length,h=n[0].indices.length,f,g=0;g<h;++g){f=u[g]*v,r.setItemLayout(n[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:f,y:l[0][g][1]*v});for(var p=1;p<c;++p)f+=l[p-1][g][1]*v,r.setItemLayout(n[p].indices[g],{layerIndex:p,x:l[p][g][0],y0:f,y:l[p][g][1]*v})}}function zh(r){for(var t=r.length,e=r[0].length,a=[],n=[],i=0,o=0;o<e;++o){for(var l=0,s=0;s<t;++s)l+=r[s][o][1];l>i&&(i=l),a.push(l)}for(var u=0;u<e;++u)n[u]=(i-a[u])/2;i=0;for(var v=0;v<e;++v){var c=a[v]+n[v];c>i&&(i=c)}return{y0:n,max:i}}function Zf(r){r.registerChartView(Rh),r.registerSeriesModel(Vh),r.registerLayout(kh),r.registerProcessor(xt("themeRiver"))}var Gh=2,Oh=4,bi=(function(r){B(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=Gh,o.textConfig={inside:!0},ne(o).seriesIndex=a.seriesIndex;var l=new Re({z2:Oh,silent:e.getModel().get(["label","silent"])});return o.setTextContent(l),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var l=this;ne(l).dataIndex=a.dataIndex;var s=a.getModel(),u=s.getModel("emphasis"),v=a.getLayout(),c=Y({},v);c.label=null;var h=a.getVisual("style");h.lineJoin="bevel";var f=a.getVisual("decal");f&&(h.decal=$i(f,o));var g=ke(s.getModel("itemStyle"),c,!0);Y(c,g),O(zt,function(y){var S=l.ensureState(y),b=s.getModel([y,"itemStyle"]);S.style=b.getItemStyle();var w=ke(b,c);w&&(S.shape=w)}),e?(l.setShape(c),l.shape.r=v.r0,ve(l,{shape:{r:v.r}},n,a.dataIndex)):(J(l,{shape:c},n),Ee(l)),l.useStyle(h),this._updateLabel(n);var p=s.getShallow("cursor");p&&l.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var d=u.get("focus"),m=d==="relative"?oa(a.getAncestorsIndices(),a.getDescendantIndices()):d==="ancestor"?a.getAncestorsIndices():d==="descendant"?a.getDescendantIndices():d;ie(this,m,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),l=o.endAngle-o.startAngle,s=(o.startAngle+o.endAngle)/2,u=Math.cos(s),v=Math.sin(s),c=this,h=c.getTextContent(),f=this.node.dataIndex,g=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(g!=null&&Math.abs(l)<g);h.ignore=!p,O(fr,function(m){var y=m==="normal"?n.getModel("label"):n.getModel([m,"label"]),S=m==="normal",b=S?h:h.ensureState(m),w=e.getFormattedLabel(f,m);S&&(w=w||a.node.name),b.style=Be(y,{},null,m!=="normal",!0),w&&(b.style.text=w);var D=y.get("show");D!=null&&!S&&(b.ignore=!D);var _=d(y,"position"),x=S?c:c.states[m],P=x.style.fill;x.textConfig={outsideFill:y.get("color")==="inherit"?P:null,inside:_!=="outside"};var I,A=d(y,"distance")||0,L=d(y,"align"),M=d(y,"rotate"),V=Math.PI*.5,N=Math.PI*1.5,T=qt(M==="tangential"?Math.PI/2-s:s),E=T>V&&!$l(T-V)&&T<N;_==="outside"?(I=o.r+A,L=E?"right":"left"):!L||L==="center"?(l===2*Math.PI&&o.r0===0?I=0:I=(o.r+o.r0)/2,L="center"):L==="left"?(I=o.r0+A,L=E?"right":"left"):L==="right"&&(I=o.r-A,L=E?"left":"right"),b.style.align=L,b.style.verticalAlign=d(y,"verticalAlign")||"middle",b.x=I*u+o.cx,b.y=I*v+o.cy;var C=0;M==="radial"?C=qt(-s)+(E?Math.PI:0):M==="tangential"?C=qt(Math.PI/2-s)+(E?Math.PI:0):Ne(M)&&(C=M*Math.PI/180),b.rotation=qt(C)});function d(m,y){var S=m.get(y);return S??i.get(y)}h.dirtyStyle()},t})(Ue),wr="sunburstRootToNode",wi="sunburstHighlight",Bh="sunburstUnhighlight";function Fh(r){r.registerAction({type:wr,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},a);function a(n,i){var o=Ft(t,[wr],n);if(o){var l=n.getViewRoot();l&&(t.direction=Vr(l,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:wi,update:"none"},function(t,e,a){t=Y({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i){var o=Ft(t,[wi],i);o&&(t.dataIndex=o.node.dataIndex)}a.dispatchAction(Y(t,{type:"highlight"}))}),r.registerAction({type:Bh,update:"updateView"},function(t,e,a){t=Y({},t),a.dispatchAction(Y(t,{type:"downplay"}))})}var Hh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){var o=this;this.seriesModel=e,this.api=n,this.ecModel=a;var l=e.getData(),s=l.tree.root,u=e.getViewRoot(),v=this.group,c=e.get("renderLabelForZeroData"),h=[];u.eachNode(function(y){h.push(y)});var f=this._oldChildren||[];g(h,f),m(s,u),this._initEvents(),this._oldChildren=h;function g(y,S){if(y.length===0&&S.length===0)return;new _a(S,y,b,b).add(w).update(w).remove(me(w,null)).execute();function b(D){return D.getId()}function w(D,_){var x=D==null?null:y[D],P=_==null?null:S[_];p(x,P)}}function p(y,S){if(!c&&y&&!y.getValue()&&(y=null),y!==s&&S!==s){if(S&&S.piece)y?(S.piece.updateData(!1,y,e,a,n),l.setItemGraphicEl(y.dataIndex,S.piece)):d(S);else if(y){var b=new bi(y,e,a,n);v.add(b),l.setItemGraphicEl(y.dataIndex,b)}}}function d(y){y&&y.piece&&(v.remove(y.piece),y.piece=null)}function m(y,S){S.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,e,a,n):(o.virtualPiece=new bi(y,e,a,n),v.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(S.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var l=o.getModel().get("nodeClick");if(l==="rootToNode")e._rootToNode(o);else if(l==="link"){var s=o.getModel(),u=s.get("link");if(u){var v=s.get("target",!0)||"_blank";Fi(u,v)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:wr,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,l=e[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},t.type="sunburst",t})(ae),Wh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};jo(n);var i=this._levelModels=ee(e.levels||[],function(s){return new at(s,this,a)},this),o=Er.createTree(n,this,l);function l(s){s.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),h=i[c.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=Ca(n,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){wo(this)},t.type="series.sunburst",t.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"},t})(oe);function jo(r){var t=0;O(r.children,function(a){jo(a);var n=a.value;Q(n)&&(n=n[0]),t+=n});var e=r.value;Q(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Q(r.value)?r.value[0]=e:r.value=e}var Di=Math.PI/180;function Uh(r,t,e){t.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");Q(i)||(i=[0,i]),Q(n)||(n=[n,n]);var o=e.getWidth(),l=e.getHeight(),s=Math.min(o,l),u=W(n[0],o),v=W(n[1],l),c=W(i[0],s/2),h=W(i[1],s/2),f=-a.get("startAngle")*Di,g=a.get("minAngle")*Di,p=a.getData().tree.root,d=a.getViewRoot(),m=d.depth,y=a.get("sort");y!=null&&Ko(d,y);var S=0;O(d.children,function(T){!isNaN(T.getValue())&&S++});var b=d.getValue(),w=Math.PI/(b||S)*2,D=d.depth>0,_=d.height-(D?-1:1),x=(h-c)/(_||1),P=a.get("clockwise"),I=a.get("stillShowZeroSum"),A=P?1:-1,L=function(T,E){if(T){var C=E;if(T!==p){var R=T.getValue(),k=b===0&&I?w:R*w;k<g&&(k=g),C=E+A*k;var z=T.depth-m-(D?-1:1),G=c+x*z,H=c+x*(z+1),F=a.getLevelModel(T);if(F){var $=F.get("r0",!0),le=F.get("r",!0),Se=F.get("radius",!0);Se!=null&&($=Se[0],le=Se[1]),$!=null&&(G=W($,s/2)),le!=null&&(H=W(le,s/2))}T.setLayout({angle:k,startAngle:E,endAngle:C,clockwise:P,cx:u,cy:v,r0:G,r:H})}if(T.children&&T.children.length){var X=0;O(T.children,function(Z){X+=L(Z,E+X)})}return C-E}};if(D){var M=c,V=c+x,N=Math.PI*2;p.setLayout({angle:N,startAngle:f,endAngle:f+N,clockwise:P,cx:u,cy:v,r0:M,r:V})}L(d,f)})}function Ko(r,t){var e=r.children||[];r.children=Zh(e,t),e.length&&O(r.children,function(a){Ko(a,t)})}function Zh(r,t){if(Ae(t)){var e=ee(r,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 e.sort(function(n,i){return t(n.params,i.params)}),ee(e,function(n){return r[n.index]})}else{var a=t==="asc";return r.sort(function(n,i){var o=(n.getValue()-i.getValue())*(a?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(a?-1:1):o})}}function $h(r){var t={};function e(a,n,i){if(a.depth===0)return U.color.neutral50;for(var o=a;o&&o.depth>1;)o=o.parentNode;var l=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&Me(l)&&(l=Dl(l,(a.depth-1)/(i-1)*.5)),l}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var l=o.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");Y(u,s)})})}function $f(r){r.registerChartView(Hh),r.registerSeriesModel(Wh),r.registerLayout(me(Uh,"sunburst")),r.registerProcessor(me(xt,"sunburst")),r.registerVisual($h),Fh(r)}var _i={color:"fill",borderColor:"stroke"},Xh={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},He=wt(),Yh=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return Ze(null,this)},t.prototype.getDataParams=function(e,a,n){var i=r.prototype.getDataParams.call(this,e,a);return n&&(i.info=He(n).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t})(oe);function qh(r,t){return t=t||[0,0],ee(["x","y"],function(e,a){var n=this.getAxis(e),i=t[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function jh(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:ue(qh,r)}}}function Kh(r,t){return t=t||[0,0],ee([0,1],function(e){var a=t[e],n=r[e]/2,i=[],o=[];return i[e]=a-n,o[e]=a+n,i[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(o)[e])},this)}function Jh(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:ue(Kh,r)}}}function Qh(r,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,n=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-n)-e.dataToCoord(a+n))}function ef(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:ue(Qh,r)}}}function tf(r,t){return t=t||[0,0],ee(["Radius","Angle"],function(e,a){var n="get"+e+"Axis",i=this[n](),o=t[a],l=r[a]/2,s=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-l)-i.dataToCoord(o+l));return e==="Angle"&&(s=s*Math.PI/180),s},this)}function af(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),l=r.coordToPoint([i,o]);return l.push(i,o*Math.PI/180),l},size:ue(tf,r)}}}function rf(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function nf(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,a){return r.dataToPoint(e,a)},layout:function(e,a){return r.dataToLayout(e,a)}}}}var We="emphasis",Je="normal",Ur="blur",Zr="select",nt=[Je,We,Ur,Zr],sr={normal:["itemStyle"],emphasis:[We,"itemStyle"],blur:[Ur,"itemStyle"],select:[Zr,"itemStyle"]},ur={normal:["label"],emphasis:[We,"label"],blur:[Ur,"label"],select:[Zr,"label"]},of=["x","y"],lf="e\0\0",Te={normal:{},emphasis:{},blur:{},select:{}},sf={cartesian2d:jh,geo:Jh,single:ef,polar:af,calendar:rf,matrix:nf};function Dr(r){return r instanceof _e}function _r(r){return r instanceof Ci}function uf(r,t){t.copyTransform(r),_r(t)&&_r(r)&&(t.setStyle(r.style),t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t.invisible=r.invisible,t.ignore=r.ignore,Dr(t)&&Dr(r)&&t.setShape(r.shape))}var vf=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n,i){this._progressiveEls=null;var o=this._data,l=e.getData(),s=this.group,u=xi(e,l,a,n);o||s.removeAll(),l.diff(o).add(function(c){vr(n,null,c,u(c,i),e,s,l)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&Mr(h,He(h).option,e)}).update(function(c,h){var f=o.getItemGraphicEl(h);vr(n,f,c,u(c,i),e,s,l)}).execute();var v=e.get("clip",!0)?$t(e.coordinateSystem,!1,e):null;v?s.setClipPath(v):s.removeClipPath(),this._data=l},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,a,n,i,o){var l=a.getData(),s=xi(a,l,n,i),u=this._progressiveEls=[];function v(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var c=e.start;c<e.end;c++){var h=vr(null,null,c,s(c,o),a,this.group,l);h&&(h.traverse(v),u.push(h))}},t.prototype.eachRendered=function(e){Sa(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,a,n,i){var o=a.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},t.type="custom",t})(ae);function $r(r){var t=r.type,e;if(t==="path"){var a=r.shape,n=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,i=el(a);e=fn(i,null,n,a.layout||"center"),He(e).customPathData=i}else if(t==="image")e=new Ut({}),He(e).customImagePath=r.style.image;else if(t==="text")e=new Re({});else if(t==="group")e=new K;else if(t==="compoundPath"){var a=r.shape;if(!a||!a.paths){var o="";ia(o)}var l=ee(a.paths,function(v){if(v.type==="path")return fn(v.shape.pathData,v,null);var c=gn(v.type);if(!c){var h="";ia(h)}return new c});e=new _l({shape:{paths:l}})}else{var s=gn(t);if(!s){var o="";ia(o)}e=new s}return He(e).customGraphicType=t,e.name=r.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function Xr(r,t,e,a,n,i,o){ss(t);var l=n&&n.normal.cfg;l&&t.setTextConfig(l),a&&a.transition==null&&(a.transition=of);var s=a&&a.style;if(s){if(t.type==="text"){var u=s;Fe(u,"textFill")&&(u.fill=u.textFill),Fe(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,c=Dr(t)?s.decal:null;r&&c&&(c.dirty=!0,v=$i(c,r)),s.__decalPattern=v}if(_r(t)&&s){var v=s.__decalPattern;v&&(s.decal=v)}us(t,a,i,{dataIndex:e,isInit:o,clearStyle:!0}),vs(t,a.keyframeAnimation,i)}function Jo(r,t,e,a,n){var i=t.isGroup?null:t,o=n&&n[r].cfg;if(i){var l=i.ensureState(r);if(a===!1){var s=i.getState(r);s&&(s.style=null)}else l.style=a||null;o&&(l.textConfig=o),va(i)}}function cf(r,t,e){if(!r.isGroup){var a=r,n=e.currentZ,i=e.currentZLevel;a.z=n,a.zlevel=i;var o=t.z2;o!=null&&(a.z2=o||0);for(var l=0;l<nt.length;l++)hf(a,t,nt[l])}}function hf(r,t,e){var a=e===Je,n=a?t:da(t,e),i=n?n.z2:null,o;i!=null&&(o=a?r:r.ensureState(e),o.z2=i||0)}function xi(r,t,e,a){var n=r.get("renderItem");if(typeof n=="string"){var i=ql(n);i&&(n=i)}var o=r.coordinateSystem,l={};o&&(l=o.prepareCustoms?o.prepareCustoms(o):sf[o.type](o));for(var s=ze({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:w,style:_,ordinalRawValue:D,styleEmphasis:x,visual:A,barLayout:L,currentSeriesIndices:M,font:V},l.api||{}),u={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:l.coordSys,dataInsideLength:t.count(),encode:ff(r.getData()),itemPayload:r.get("itemPayload")||{}},v,c,h={},f={},g={},p={},d=0;d<nt.length;d++){var m=nt[d];g[m]=r.getModel(sr[m]),p[m]=r.getModel(ur[m])}function y(N){return N===v?c||(c=t.getItemModel(N)):t.getItemModel(N)}function S(N,T){return t.hasItemOption?N===v?h[T]||(h[T]=y(N).getModel(sr[T])):y(N).getModel(sr[T]):g[T]}function b(N,T){return t.hasItemOption?N===v?f[T]||(f[T]=y(N).getModel(ur[T])):y(N).getModel(ur[T]):p[T]}return function(N,T){return v=N,c=null,h={},f={},n&&n(ze({dataIndexInside:N,dataIndex:t.getRawIndex(N),actionType:T?T.type:null},u),s)};function w(N,T){return T==null&&(T=v),t.getStore().get(t.getDimensionIndex(N||0),T)}function D(N,T){T==null&&(T=v),N=N||0;var E=t.getDimensionInfo(N);if(!E){var C=t.getDimensionIndex(N);return C>=0?t.getStore().get(C,T):void 0}var R=t.get(E.name,T),k=E&&E.ordinalMeta;return k?k.categories[R]:R}function _(N,T){T==null&&(T=v);var E=t.getItemVisual(T,"style"),C=E&&E.fill,R=E&&E.opacity,k=S(T,Je).getItemStyle();C!=null&&(k.fill=C),R!=null&&(k.opacity=R);var z={inheritColor:Me(C)?C:U.color.neutral99},G=b(T,Je),H=Be(G,null,z,!1,!0);H.text=G.getShallow("show")?Vt(r.getFormattedLabel(T,Je),Ot(t,T)):null;var F=hn(G,z,!1);return I(N,k),k=pn(k,H,F),N&&P(k,N),k.legacy=!0,k}function x(N,T){T==null&&(T=v);var E=S(T,We).getItemStyle(),C=b(T,We),R=Be(C,null,null,!0,!0);R.text=C.getShallow("show")?ht(r.getFormattedLabel(T,We),r.getFormattedLabel(T,Je),Ot(t,T)):null;var k=hn(C,null,!0);return I(N,E),E=pn(E,R,k),N&&P(E,N),E.legacy=!0,E}function P(N,T){for(var E in T)Fe(T,E)&&(N[E]=T[E])}function I(N,T){N&&(N.textFill&&(T.textFill=N.textFill),N.textPosition&&(T.textPosition=N.textPosition))}function A(N,T){if(T==null&&(T=v),Fe(_i,N)){var E=t.getItemVisual(T,"style");return E?E[_i[N]]:null}if(Fe(Xh,N))return t.getItemVisual(T,N)}function L(N){if(o.type==="cartesian2d"){var T=o.getBaseAxis();return Xl(ze({axis:T},N))}}function M(){return e.getCurrentSeriesIndices()}function V(N){return Yl(N,e)}}function ff(r){var t={};return O(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function vr(r,t,e,a,n,i,o){if(!a){i.remove(t);return}var l=Yr(r,t,e,a,n,i);return l&&o.setItemGraphicEl(e,l),l&&ie(l,a.focus,a.blurScope,a.emphasisDisabled),l}function Yr(r,t,e,a,n,i){var o=-1,l=t;t&&Qo(t,a,n)&&(o=St(i.childrenRef(),t),t=null);var s=!t,u=t;u?u.clearStates():(u=$r(a),l&&uf(l,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),Te.normal.cfg=Te.normal.conOpt=Te.emphasis.cfg=Te.emphasis.conOpt=Te.blur.cfg=Te.blur.conOpt=Te.select.cfg=Te.select.conOpt=null,Te.isLegacy=!1,pf(u,e,a,n,s,Te),gf(u,e,a,n,s),Xr(r,u,e,a,Te,n,s),Fe(a,"info")&&(He(u).info=a.info);for(var v=0;v<nt.length;v++){var c=nt[v];if(c!==Je){var h=da(a,c),f=qr(a,h,c);Jo(c,u,h,f,Te)}}return cf(u,a,n),a.type==="group"&&df(r,u,e,a,n),o>=0?i.replaceAt(u,o):i.add(u),u}function Qo(r,t,e){var a=He(r),n=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&bf(i)&&el(i)!==a.customPathData||n==="image"&&Fe(o,"image")&&o.image!==a.customImagePath}function gf(r,t,e,a,n){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&Qo(o,i,a)&&(o=null),o||(o=$r(i),r.setClipPath(o)),Xr(null,o,t,i,null,a,n)}}function pf(r,t,e,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){Ai(e,null,i),Ai(e,We,i);var o=i.normal.conOpt,l=i.emphasis.conOpt,s=i.blur.conOpt,u=i.select.conOpt;if(o!=null||l!=null||u!=null||s!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=$r(o),r.setTextContent(v)),Xr(null,v,t,o,null,a,n);for(var c=o&&o.style,h=0;h<nt.length;h++){var f=nt[h];if(f!==Je){var g=i[f].conOpt;Jo(f,v,g,qr(o,g,f),null)}}c?v.dirty():v.markRedraw()}}}}function Ai(r,t,e){var a=t?da(r,t):r,n=t?qr(r,a,We):r.style,i=r.type,o=a?a.textConfig:null,l=r.textContent,s=l?t?da(l,t):l:null;if(n&&(e.isLegacy||cs(n,i,!!o,!!s))){e.isLegacy=!0;var u=hs(n,i,!t);!o&&u.textConfig&&(o=u.textConfig),!s&&u.textContent&&(s=u.textContent)}if(!t&&s){var v=s;!v.type&&(v.type="text")}var c=t?e[t]:e.normal;c.cfg=o,c.conOpt=s}function da(r,t){return t?r?r[t]:null:r}function qr(r,t,e){var a=t&&t.style;return a==null&&e===We&&r&&(a=r.styleEmphasis),a}function df(r,t,e,a,n){var i=a.children,o=i?i.length:0,l=a.$mergeChildren,s=l==="byName"||a.diffChildrenByName,u=l===!1;if(!(!o&&!s&&!u)){if(s){mf({api:r,oldChildren:t.children()||[],newChildren:i||[],dataIndex:e,seriesModel:n,group:t});return}u&&t.removeAll();for(var v=0;v<o;v++){var c=i[v],h=t.childAt(v);c?(c.ignore==null&&(c.ignore=!1),Yr(r,h,e,c,n,t)):h.ignore=!0}for(var f=t.childCount()-1;f>=v;f--){var g=t.childAt(f);yf(t,g,n)}}}function yf(r,t,e){t&&Mr(t,He(r).option,e)}function mf(r){new _a(r.oldChildren,r.newChildren,Ii,Ii,r).add(Li).update(Li).remove(Sf).execute()}function Ii(r,t){var e=r&&r.name;return e??lf+t}function Li(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;Yr(e.api,n,e.dataIndex,a,e.seriesModel,e.group)}function Sf(r){var t=this.context,e=t.oldChildren[r];e&&Mr(e,He(e).option,t.seriesModel)}function el(r){return r&&(r.pathData||r.d)}function bf(r){return r&&(Fe(r,"pathData")||Fe(r,"d"))}function Xf(r){r.registerChartView(vf),r.registerSeriesModel(Yh)}export{If as BarChart,Of as BoxplotChart,Bf as CandlestickChart,Ef as ChordChart,Xf as CustomChart,Ff as EffectScatterChart,kf as FunnelChart,Vf as GaugeChart,Rf as GraphChart,Wf as HeatmapChart,Af as LineChart,Hf as LinesChart,Pf as MapChart,zf as ParallelChart,Uf as PictorialBarChart,Lf as PieChart,Cf as RadarChart,Gf as SankeyChart,Tf as ScatterChart,$f as SunburstChart,Zf as ThemeRiverChart,Nf as TreeChart,Mf as TreemapChart};