2 lines
611 KiB
JavaScript
2 lines
611 KiB
JavaScript
import{ak as t,Z as e,al as n,am as i,an as o,j as r,ao as a,$ as s,ap as l,o as u,aq as c,ar as d,as as h,ag as p,at as g,au as f,av as y,aw as v,ax as m,ay as x,az as _,aA as b,aB as S,aC as w,aD as M,aE as I,aF as A,aG as C,aH as T,aI as D,K as L,aJ as P,aK as k,aL as N,aM as O,aN as R,aO as V,aP as z,aQ as E,aR as B,aS as G,aT as W,aU as F,aV as H,aW as Y,h as X,a1 as Z,aX as U,aY as j,aZ as q,a_ as K,c as J,a$ as $,a8 as Q,a5 as tt,b0 as et,b1 as nt,b2 as it,b3 as ot,b4 as rt,b5 as at,b6 as st,b7 as lt,b8 as ut,b9 as ct,l as dt,ba as ht,bb as pt,bc as gt,i as ft,bd as yt,be as vt,bf as mt,R as xt,a9 as _t,bg as bt,bh as St,x as wt,bi as Mt,bj as It,a6 as At,bk as Ct,B as Tt,bl as Dt,bm as Lt,aj as Pt,bn as kt,bo as Nt,bp as Ot,bq as Rt,br as Vt,bs as zt,bt as Et,bu as Bt,bv as Gt,N as Wt,bw as Ft,bx as Ht,by as Yt,af as Xt,J as Zt,bz as Ut,bA as jt,bB as qt,bC as Kt,bD as Jt,bE as $t,bF as Qt,bG as te,bH as ee,bI as ne,S as ie,bJ as oe,bK as re,bL as ae,bM as se,bN as le,bO as ue,U as ce,C as de,bP as he,m as pe,A as ge,w as fe,bQ as ye,bR as ve,bS as me,O as xe,ab as _e,ac as be,G as Se,I as we,bT as Me,bU as Ie,bV as Ae,bW as Ce,bX as Te,q as De,a as Le,bY as Pe,bZ as ke,b_ as Ne,n as Oe,b$ as Re,c0 as Ve,c1 as ze,c2 as Ee,D as Be,c3 as Ge,c4 as We,c5 as Fe,c6 as He,c7 as Ye,M as Xe,c8 as Ze,c9 as Ue,E as je,ca as qe,cb as Ke,u as Je,cc as $e,cd as Qe,ce as tn,cf as en,cg as nn,ch as on,ci as rn,cj as an,ck as sn,cl as ln,cm as un,cn,co as dn,cp as hn,cq as pn,cr as gn,cs as fn,ct as yn,cu as vn,aa as mn,cv as xn,cw as _n,W as bn,V as Sn,cx as wn,cy as Mn,cz as In,cA as An,cB as Cn,cC as Tn,cD as Dn,cE as Ln,cF as Pn,cG as kn,cH as Nn,cI as On,X as Rn,cJ as Vn,cK as zn,ah as En,cL as Bn,cM as Gn,cN as Wn,ae as Fn,cO as Hn,cP as Yn,cQ as Xn,cR as Zn,cS as Un,cT as jn,cU as qn,cV as Kn,cW as Jn,cX as $n,cY as Qn,cZ as ti,c_ as ei,p as ni,c$ as ii,d0 as oi,d1 as ri,d2 as ai,d3 as si,d4 as li,d5 as ui,d6 as ci,d7 as di,d8 as hi,d9 as pi,da as gi,db as fi,dc as yi,dd as vi,ad as mi,de as xi,df as _i,dg as bi,dh as Si,di as wi,dj as Mi,dk as Ii,dl as Ai,dm as Ci,dn as Ti,dp as Di,dq as Li,dr as Pi,ds as ki,dt as Ni,du as Oi,dv as Ri,dw as Vi,dx as zi,dy as Ei,dz as Bi,dA as Gi,dB as Wi,a7 as Fi,dC as Hi,dD as Yi,dE as Xi,dF as Zi,dG as Ui,T as ji,dH as qi,dI as Ki,dJ as Ji,dK as $i,dL as Qi,dM as to,dN as eo,dO as no,dP as io,dQ as oo,dR as ro,dS as ao,dT as so,dU as lo,dV as uo,dW as co,dX as ho,Y as po,dY as go,dZ as fo,d_ as yo,d$ as vo,e0 as mo,e1 as xo,e2 as _o,e3 as bo,e4 as So,e5 as wo,e6 as Mo,e7 as Io,e8 as Ao,e9 as Co,ea as To,eb as Do,ec as Lo,ed as Po,ee as ko,ef as No,eg as Oo,eh as Ro,_ as Vo,ei as zo,ej as Eo,ek as Bo,el as Go,em as Wo,en as Fo,eo as Ho,ep as Yo,eq as Xo,er as Zo,es as Uo,et as jo,eu as qo,ev as Ko,ew as Jo,ex as $o,g as Qo,ey as tr,ez as er,eA as nr,eB as ir,eC as or,eD as rr,eE as ar,eF as sr,eG as lr,eH as ur,eI as cr,eJ as dr,eK as hr,eL as pr,b as gr,d as fr,f as yr}from"./linkSeriesData.e74eae00.js";var vr=Math.sin,mr=Math.cos,xr=Math.PI,_r=2*Math.PI,br=180/xr,Sr=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,e){this._add("M",t,e)},e.prototype.lineTo=function(t,e){this._add("L",t,e)},e.prototype.bezierCurveTo=function(t,e,n,i,o,r){this._add("C",t,e,n,i,o,r)},e.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},e.prototype.arc=function(t,e,n,i,o,r){this.ellipse(t,e,n,n,0,i,o,r)},e.prototype.ellipse=function(e,n,i,o,r,a,s,l){var u=s-a,c=!l,d=Math.abs(u),h=t(d-_r)||(c?u>=_r:-u>=_r),p=u>0?u%_r:u%_r+_r,g=!1;g=!!h||!t(d)&&p>=xr==!!c;var f=e+i*mr(a),y=n+o*vr(a);this._start&&this._add("M",f,y);var v=Math.round(r*br);if(h){var m=1/this._p,x=(c?1:-1)*(_r-m);this._add("A",i,o,v,1,+c,e+i*mr(a+x),n+o*vr(a+x)),m>.01&&this._add("A",i,o,v,0,+c,f,y)}else{var _=e+i*mr(s),b=n+o*vr(s);this._add("A",i,o,v,+g,+c,_,b)}},e.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,e,n,i,o,r,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h))return void(this._invalid=!0);u.push(Math.round(h*c)/c)}this._d.push(t+u.join(" ")),this._start="Z"===t},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}();const wr=Sr;var Mr="none",Ir=Math.round;var Ar=["lineCap","miterLimit","lineJoin"],Cr=r(Ar,(function(t){return"stroke-"+t.toLowerCase()}));function Tr(t,r,a,s){var l=null==r.opacity?1:r.opacity;if(a instanceof e)t("opacity",l);else{if(function(t){var e=t.fill;return null!=e&&e!==Mr}(r)){var u=n(r.fill);t("fill",u.color);var c=null!=r.fillOpacity?r.fillOpacity*u.opacity*l:u.opacity*l;(s||c<1)&&t("fill-opacity",c)}else t("fill",Mr);if(function(t){var e=t.stroke;return null!=e&&e!==Mr}(r)){var d=n(r.stroke);t("stroke",d.color);var h=r.strokeNoScale?a.getLineScale():1,p=h?(r.lineWidth||0)/h:0,g=null!=r.strokeOpacity?r.strokeOpacity*d.opacity*l:d.opacity*l,f=r.strokeFirst;if((s||1!==p)&&t("stroke-width",p),(s||f)&&t("paint-order",f?"stroke":"fill"),(s||g<1)&&t("stroke-opacity",g),r.lineDash){var y=i(a),v=y[0],m=y[1];v&&(m=Ir(m||0),t("stroke-dasharray",v.join(",")),(m||s)&&t("stroke-dashoffset",m))}else s&&t("stroke-dasharray",Mr);for(var x=0;x<Ar.length;x++){var _=Ar[x];if(s||r[_]!==o[_]){var b=r[_]||o[_];b&&t(Cr[x],b)}}}else s&&t("stroke",Mr)}}var Dr="http://www.w3.org/2000/svg",Lr="http://www.w3.org/1999/xlink",Pr="ecmeta_";function kr(t){return document.createElementNS(Dr,t)}function Nr(t,e,n,i,o){return{tag:t,attrs:n||{},children:i,text:o,key:e}}function Or(t,e){var n=(e=e||{}).newline?"\n":"";return function t(e){var i=e.children,o=e.tag,a=e.attrs,l=e.text;return function(t,e){var n=[];if(e)for(var i in e){var o=e[i],r=i;!1!==o&&(!0!==o&&null!=o&&(r+='="'+o+'"'),n.push(r))}return"<"+t+" "+n.join(" ")+">"}(o,a)+("style"!==o?s(l):l||"")+(i?""+n+r(i,(function(e){return t(e)})).join(n)+n:"")+("</"+o+">")}(t)}function Rr(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Vr(t,e,n,i){return Nr("svg","root",{width:t,height:e,xmlns:Dr,"xmlns:xlink":Lr,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var zr=0;function Er(){return zr++}var Br={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Gr="transform-origin";function Wr(t,e,n){var i=p({},t.shape);p(i,e),t.buildPath(n,i);var o=new wr;return o.reset(v(t)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function Fr(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[Gr]=n+"px "+i+"px")}var Hr={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Yr(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Xr(t){return c(t)?Br[t]?"cubic-bezier("+Br[t]+")":d(t)?t:"":""}function Zr(t,e,n,i){var o=t.animators,r=o.length,s=[];if(t instanceof l){var d=function(t,e,n){var i,o,r=t.shape.paths,s={};if(u(r,(function(t){var e=Rr(n.zrId);e.animation=!0,Zr(t,{},e,!0);var r=e.cssAnims,l=e.cssNodes,u=a(r),c=u.length;if(c){var d=r[o=u[c-1]];for(var h in d){var p=d[h];s[h]=s[h]||{d:""},s[h].d+=p.d||""}for(var g in l){var f=l[g].animation;f.indexOf(o)>=0&&(i=f)}}})),i){e.d=!1;var l=Yr(s,n);return i.replace(o,l)}}(t,e,n);if(d)s.push(d);else if(!r)return}else if(!r)return;for(var v={},x=0;x<r;x++){var _=o[x],b=[_.getMaxTime()/1e3+"s"],S=Xr(_.getClip().easing),w=_.getDelay();S?b.push(S):b.push("linear"),w&&b.push(w/1e3+"s"),_.getLoop()&&b.push("infinite");var M=b.join(" ");v[M]=v[M]||[M,[]],v[M][1].push(_)}function I(o){var r,s=o[1],l=s.length,u={},d={},v={},x="animation-timing-function";function _(t,e,n){for(var i=t.getTracks(),o=t.getMaxTime(),r=0;r<i.length;r++){var a=i[r];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var d=s[u],h=Math.round(d.time/o*100)+"%",p=Xr(d.easing),g=d.rawValue;(c(g)||m(g))&&(e[h]=e[h]||{},e[h][l]=d.rawValue,p&&(e[h][x]=p))}}}}for(var b=0;b<l;b++){(P=(L=s[b]).targetName)?"shape"===P&&_(L,d):!i&&_(L,u)}for(var S in u){var w={};h(w,t),p(w,u[S]);var M=g(w),I=u[S][x];v[S]=M?{transform:M}:{},Fr(v[S],w),I&&(v[S][x]=I)}var A=!0;for(var S in d){v[S]=v[S]||{};var C=!r;I=d[S][x];C&&(r=new f);var T=r.len();r.reset(),v[S].d=Wr(t,d[S],r);var D=r.len();if(!C&&T!==D){A=!1;break}I&&(v[S][x]=I)}if(!A)for(var S in v)delete v[S].d;if(!i)for(b=0;b<l;b++){var L,P;"style"===(P=(L=s[b]).targetName)&&_(L,v,(function(t){return Hr[t]}))}var k,N=a(v),O=!0;for(b=1;b<N.length;b++){var R=N[b-1],V=N[b];if(v[R][Gr]!==v[V][Gr]){O=!1;break}k=v[R][Gr]}if(O&&k){for(var S in v)v[S][Gr]&&delete v[S][Gr];e[Gr]=k}if(y(N,(function(t){return a(v[t]).length>0})).length)return Yr(v,n)+" "+o[0]+" both"}for(var A in v){(d=I(v[A]))&&s.push(d)}if(s.length){var C=n.zrId+"-cls-"+Er();n.cssNodes["."+C]={animation:s.join(",")},e.class=C}}function Ur(t,e,n,i){var o=JSON.stringify(t),r=n.cssStyleCache[o];r||(r=n.zrId+"-cls-"+Er(),n.cssStyleCache[o]=r,n.cssNodes["."+r+(i?":hover":"")]=t),e.class=e.class?e.class+" "+r:r}var jr=Math.round;function qr(t){return t&&c(t.src)}function Kr(t){return t&&P(t.toDataURL)}function Jr(t,e,i,o){Tr((function(n,r){var a="fill"===n||"stroke"===n;a&&B(r)?la(e,t,n,o):a&&G(r)?ua(i,t,n,o):t[n]=a&&"none"===r?"transparent":r}),e,i,!1),function(t,e,i){var o=t.style;if(H(o)){var r=Y(t),a=i.shadowCache,s=a[r];if(!s){var l=t.getGlobalScale(),u=l[0],c=l[1];if(!u||!c)return;var d=o.shadowOffsetX||0,h=o.shadowOffsetY||0,p=o.shadowBlur,g=n(o.shadowColor),f=g.opacity,y=g.color,v=p/2/u+" "+p/2/c;s=i.zrId+"-s"+i.shadowIdx++,i.defs[s]=Nr("filter",s,{id:s,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Nr("feDropShadow","",{dx:d/u,dy:h/c,stdDeviation:v,"flood-color":y,"flood-opacity":f})]),a[r]=s}e.filter=A(s)}}(i,t,o)}function $r(t,e){var n=W(e);n&&(n.each((function(e,n){null!=e&&(t[(Pr+n).toLowerCase()]=e+"")})),e.isSilent()&&(t[Pr+"silent"]="true"))}function Qr(e){return t(e[0]-1)&&t(e[1])&&t(e[2])&&t(e[3]-1)}function ta(e,n,i){if(n&&(!function(e){return t(e[4])&&t(e[5])}(n)||!Qr(n))){var o=i?10:1e4;e.transform=Qr(n)?"translate("+jr(n[4]*o)/o+" "+jr(n[5]*o)/o+")":F(n)}}function ea(t,e,n){for(var i=t.points,o=[],r=0;r<i.length;r++)o.push(jr(i[r][0]*n)/n),o.push(jr(i[r][1]*n)/n);e.points=o.join(" ")}function na(t){return!t.smooth}var ia,oa,ra={circle:[(ia=["cx","cy","r"],oa=r(ia,(function(t){return"string"==typeof t?[t,t]:t})),function(t,e,n){for(var i=0;i<oa.length;i++){var o=oa[i],r=t[o[0]];null!=r&&(e[o[1]]=jr(r*n)/n)}})],polyline:[ea,na],polygon:[ea,na]};function aa(t,e){var n=t.style,i=t.shape,o=ra[t.type],r={},a=e.animation,s="path",l=t.style.strokePercent,u=e.compress&&v(t)||4;if(!o||e.willUpdate||o[1]&&!o[1](i)||a&&function(t){for(var e=t.animators,n=0;n<e.length;n++)if("shape"===e[n].targetName)return!0;return!1}(t)||l<1){var c=!t.path||t.shapeChanged();t.path||t.createPathProxy();var d=t.path;c&&(d.beginPath(),t.buildPath(d,t.shape),t.pathUpdated());var h=d.getVersion(),p=t,g=p.__svgPathBuilder;p.__svgPathVersion===h&&g&&l===p.__svgPathStrokePercent||(g||(g=p.__svgPathBuilder=new wr),g.reset(u),d.rebuildPath(g,l),g.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),r.d=g.getStr()}else{s=t.type;var f=Math.pow(10,u);o[0](i,r,f)}return ta(r,t.transform),Jr(r,n,t,e),$r(r,t),e.animation&&Zr(t,r,e),e.emphasis&&function(t,e,n){if(!t.ignore)if(t.isSilent())Ur(u={"pointer-events":"none"},e,n,!0);else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},o=i.fill;if(!o){var r=t.style&&t.style.fill,a=t.states.select&&t.states.select.style&&t.states.select.style.fill,s=t.currentStates.indexOf("select")>=0&&a||r;s&&(o=x(s))}var l=i.lineWidth;l&&(l/=!i.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};o&&(u.fill=o),i.stroke&&(u.stroke=i.stroke),l&&(u["stroke-width"]=l),Ur(u,e,n,!0)}}(t,r,e),Nr(s,t.id+"",r)}function sa(t,n){return t instanceof _?aa(t,n):t instanceof e?function(t,e){var n=t.style,i=n.image;if(i&&!c(i)&&(qr(i)?i=i.src:Kr(i)&&(i=i.toDataURL())),i){var o=n.x||0,r=n.y||0,a={href:i,width:n.width,height:n.height};return o&&(a.x=o),r&&(a.y=r),ta(a,t.transform),Jr(a,n,t,e),$r(a,t),e.animation&&Zr(t,a,e),Nr("image",t.id+"",a)}}(t,n):t instanceof b?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),i&&!isNaN(n.x)&&!isNaN(n.y)){var o=n.font||k,r=n.x||0,a=N(n.y||0,O(o),n.textBaseline),s={"dominant-baseline":"central","text-anchor":R[n.textAlign]||n.textAlign};if(V(n)){var l="",u=n.fontStyle,c=z(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||E,h=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),h&&"normal"!==h&&(l+="font-weight:"+h+";"),s.style=l}else s.style="font: "+o;return i.match(/\s/)&&(s["xml:space"]="preserve"),r&&(s.x=r),a&&(s.y=a),ta(s,t.transform),Jr(s,n,t,e),$r(s,t),e.animation&&Zr(t,s,e),Nr("text",t.id+"",s,void 0,i)}}(t,n):void 0}function la(t,e,i,o){var r,a=t[i],s={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(S(a))r="linearGradient",s.x1=a.x,s.y1=a.y,s.x2=a.x2,s.y2=a.y2;else{if(!w(a))return;r="radialGradient",s.cx=M(a.x,.5),s.cy=M(a.y,.5),s.r=M(a.r,.5)}for(var l=a.colorStops,u=[],c=0,d=l.length;c<d;++c){var h=100*I(l[c].offset)+"%",p=l[c].color,g=n(p),f=g.color,y=g.opacity,v={offset:h};v["stop-color"]=f,y<1&&(v["stop-opacity"]=y),u.push(Nr("stop",c+"",v))}var m=Or(Nr(r,"",s,u)),x=o.gradientCache,_=x[m];_||(_=o.zrId+"-g"+o.gradientIdx++,x[m]=_,s.id=_,o.defs[_]=Nr(r,_,s,u)),e[i]=A(_)}function ua(t,e,n,i){var o,r=t.style[n],a=t.getBoundingRect(),s={},l=r.repeat,u="no-repeat"===l,d="repeat-x"===l,h="repeat-y"===l;if(C(r)){var p=r.imageWidth,f=r.imageHeight,y=void 0,v=r.image;if(c(v)?y=v:qr(v)?y=v.src:Kr(v)&&(y=v.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";T(p,m),T(f,m)}else if(null==p||null==f){var x=function(t,e){if(t){var n=t.elm,i=p||e.width,o=f||e.height;"pattern"===t.tag&&(d?(o=1,i/=a.width):h&&(i=1,o/=a.height)),t.attrs.width=i,t.attrs.height=o,n&&(n.setAttribute("width",i),n.setAttribute("height",o))}},_=D(y,null,t,(function(t){u||x(M,t),x(o,t)}));_&&_.width&&_.height&&(p=p||_.width,f=f||_.height)}o=Nr("image","img",{href:y,width:p,height:f}),s.width=p,s.height=f}else r.svgElement&&(o=L(r.svgElement),s.width=r.svgWidth,s.height=r.svgHeight);if(o){var b,S;u?b=S=1:d?(S=1,b=s.width/a.width):h?(b=1,S=s.height/a.height):s.patternUnits="userSpaceOnUse",null==b||isNaN(b)||(s.width=b),null==S||isNaN(S)||(s.height=S);var w=g(r);w&&(s.patternTransform=w);var M=Nr("pattern","",s,[o]),I=Or(M),P=i.patternCache,k=P[I];k||(k=i.zrId+"-p"+i.patternIdx++,P[I]=k,s.id=k,M=i.defs[k]=Nr("pattern",k,s,[o])),e[n]=A(k)}}function ca(t,e,n){var i=n.clipPathCache,o=n.defs,r=i[t.id];if(!r){var a={id:r=n.zrId+"-c"+n.clipPathIdx++};i[t.id]=r,o[r]=Nr("clipPath",r,a,[aa(t,n)])}e["clip-path"]=A(r)}function da(t){return document.createTextNode(t)}function ha(t,e,n){t.insertBefore(e,n)}function pa(t,e){t.removeChild(e)}function ga(t,e){t.appendChild(e)}function fa(t){return t.parentNode}function ya(t){return t.nextSibling}function va(t,e){t.textContent=e}var ma=Nr("","");function xa(t){return void 0===t}function _a(t){return void 0!==t}function ba(t,e,n){for(var i={},o=e;o<=n;++o){var r=t[o].key;void 0!==r&&(i[r]=o)}return i}function Sa(t,e){var n=t.key===e.key;return t.tag===e.tag&&n}function wa(t){var e,n=t.children,i=t.tag;if(_a(i)){var o=t.elm=kr(i);if(Aa(ma,t),X(n))for(e=0;e<n.length;++e){var r=n[e];null!=r&&ga(o,wa(r))}else _a(t.text)&&!Z(t.text)&&ga(o,da(t.text))}else t.elm=da(t.text);return t.elm}function Ma(t,e,n,i,o){for(;i<=o;++i){var r=n[i];null!=r&&ha(t,wa(r),e)}}function Ia(t,e,n,i){for(;n<=i;++n){var o=e[n];if(null!=o)if(_a(o.tag))pa(fa(o.elm),o.elm);else pa(t,o.elm)}}function Aa(t,e){var n,i=e.elm,o=t&&t.attrs||{},r=e.attrs||{};if(o!==r){for(n in r){var a=r[n];o[n]!==a&&(!0===a?i.setAttribute(n,""):!1===a?i.removeAttribute(n):"style"===n?i.style.cssText=a:120!==n.charCodeAt(0)?i.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?i.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?i.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?i.setAttributeNS(Lr,n,a):i.setAttribute(n,a))}for(n in o)n in r||i.removeAttribute(n)}}function Ca(t,e){var n=e.elm=t.elm,i=t.children,o=e.children;t!==e&&(Aa(t,e),xa(e.text)?_a(i)&&_a(o)?i!==o&&function(t,e,n){for(var i,o,r,a=0,s=0,l=e.length-1,u=e[0],c=e[l],d=n.length-1,h=n[0],p=n[d];a<=l&&s<=d;)null==u?u=e[++a]:null==c?c=e[--l]:null==h?h=n[++s]:null==p?p=n[--d]:Sa(u,h)?(Ca(u,h),u=e[++a],h=n[++s]):Sa(c,p)?(Ca(c,p),c=e[--l],p=n[--d]):Sa(u,p)?(Ca(u,p),ha(t,u.elm,ya(c.elm)),u=e[++a],p=n[--d]):Sa(c,h)?(Ca(c,h),ha(t,c.elm,u.elm),c=e[--l],h=n[++s]):(xa(i)&&(i=ba(e,a,l)),xa(o=i[h.key])||(r=e[o]).tag!==h.tag?ha(t,wa(h),u.elm):(Ca(r,h),e[o]=void 0,ha(t,r.elm,u.elm)),h=n[++s]);(a<=l||s<=d)&&(a>l?Ma(t,null==n[d+1]?null:n[d+1].elm,n,s,d):Ia(t,e,a,l))}(n,i,o):_a(o)?(_a(t.text)&&va(n,""),Ma(n,null,o,0,o.length-1)):_a(i)?Ia(n,i,0,i.length-1):_a(t.text)&&va(n,""):t.text!==e.text&&(_a(i)&&Ia(n,i,0,i.length-1),va(n,e.text)))}var Ta=0,Da=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=e,this._opts=n=p({},n),this.root=t,this._id="zr"+Ta++,this._oldVNode=Vr(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=kr("svg");Aa(null,this._oldVNode),i.appendChild(o),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Sa(t,e))Ca(t,e);else{var n=t.elm,i=fa(n);wa(e),null!==i&&(ha(i,e.elm,ya(n)),Ia(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return sa(t,Rr(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,o=this._height,s=Rr(this._id);s.animation=t.animation,s.willUpdate=t.willUpdate,s.compress=t.compress,s.emphasis=t.emphasis;var l=[],u=this._bgVNode=function(t,e,i,o){var r;if(i&&"none"!==i)if(r=Nr("rect","bg",{width:t,height:e,x:"0",y:"0"}),B(i))la({fill:i},r.attrs,"fill",o);else if(G(i))ua({style:{fill:i},dirty:q,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",o);else{var a=n(i),s=a.color,l=a.opacity;r.attrs.fill=s,l<1&&(r.attrs["fill-opacity"]=l)}return r}(i,o,this._backgroundColor,s);u&&l.push(u);var c=t.compress?null:this._mainVNode=Nr("g","main",{},[]);this._paintList(e,s,c?c.children:l),c&&l.push(c);var d=r(a(s.defs),(function(t){return s.defs[t]}));if(d.length&&l.push(Nr("defs","defs",{},d)),t.animation){var h=function(t,e,n){var i=(n=n||{}).newline?"\n":"",o=" {"+i,s=i+"}",l=r(a(t),(function(e){return e+o+r(a(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+s})).join(i),u=r(a(e),(function(t){return"@keyframes "+t+o+r(a(e[t]),(function(n){return n+o+r(a(e[t][n]),(function(i){var o=e[t][n][i];return"d"===i&&(o='path("'+o+'")'),i+":"+o+";"})).join(i)+s})).join(i)+s})).join(i);return l||u?["<![CDATA[",l,u,"]]>"].join(i):""}(s.cssNodes,s.cssAnims,{newline:!0});if(h){var p=Nr("style","stl",{},[],h);l.push(p)}}return Vr(i,o,l,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},Or(this.renderToVNode({animation:M(t.cssAnimation,!0),emphasis:M(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:M(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,o,r=t.length,a=[],s=0,l=0,u=0;u<r;u++){var c=t[u];if(!c.invisible){var d=c.__clipPaths,h=d&&d.length||0,p=o&&o.length||0,g=void 0;for(g=Math.max(h-1,p-1);g>=0&&(!d||!o||d[g]!==o[g]);g--);for(var f=p-1;f>g;f--)i=a[--s-1];for(var y=g+1;y<h;y++){var v={};ca(d[y],v,e);var m=Nr("g","clip-g-"+l++,v,[]);(i?i.children:n).push(m),a[s++]=m,i=m}o=d;var x=sa(c,e);x&&(i?i.children:n).push(x)}}},t.prototype.resize=function(t,e){var n=this._opts,i=this.root,o=this._viewport;if(null!=t&&(n.width=t),null!=e&&(n.height=e),i&&o&&(o.style.display="none",t=U(i,0,n),e=U(i,1,n),o.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,o){var r=o.style;r.width=t+"px",r.height=e+"px"}if(G(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",t),a.setAttribute("height",e));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",t),s.setAttribute("height",e))}}},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},t.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},t.prototype.toDataURL=function(t){var e=this.renderToString(),n="data:image/svg+xml;";return t?(e=j(e))&&n+"base64,"+e:n+"charset=UTF-8,"+encodeURIComponent(e)},t}();const La=Da;const Pa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return K(e,t),e.prototype.getInitialData=function(t){return J(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new $,n=Q("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),r="none"===i?"circle":i,a=.8*t.itemHeight,s=Q(r,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?o:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),r.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(tt);function ka(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=et(t,e,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a<n.length;a++)r.push(et(t,e,n[a]));return r.join(" ")}}function Na(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!X(e))return e+"";for(var i=[],o=0;o<n.length;o++){var r=t.getDimensionIndex(n[o]);r>=0&&i.push(e[r])}return i.join(" ")}function Oa(t,e){this.parent.drift(t,e)}const Ra=function(t){function n(e,n,i,o){var r=t.call(this)||this;return r.updateData(e,n,i,o),r}return K(n,t),n.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var r=Q(t,-1,-1,2,2,null,o);r.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),r.drift=Oa,this._symbolType=t,this.add(r)},n.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},n.prototype.getSymbolType=function(){return this._symbolType},n.prototype.getSymbolPath=function(){return this.childAt(0)},n.prototype.highlight=function(){nt(this.childAt(0))},n.prototype.downplay=function(){it(this.childAt(0))},n.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},n.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},n.prototype.updateData=function(t,e,i,o){this.silent=!1;var r=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,s=n.getSymbolSize(t,e),l=r!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(r,t,e,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):ot(h,d,a,e),rt(h)}if(this._updateCommon(t,e,s,i,o),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,at(h,d,a,e)}}u&&this.childAt(0).stopAnimation("leave")},n.prototype._updateCommon=function(t,n,i,o,r){var a,s,l,u,c,d,h,g,f,y=this.childAt(0),v=t.hostModel;if(o&&(a=o.emphasisItemStyle,s=o.blurItemStyle,l=o.selectItemStyle,u=o.focus,c=o.blurScope,h=o.labelStatesModels,g=o.hoverScale,f=o.cursorStyle,d=o.emphasisDisabled),!o||t.hasItemOption){var m=o&&o.itemModel?o.itemModel:t.getItemModel(n),x=m.getModel("emphasis");a=x.getModel("itemStyle").getItemStyle(),l=m.getModel(["select","itemStyle"]).getItemStyle(),s=m.getModel(["blur","itemStyle"]).getItemStyle(),u=x.get("focus"),c=x.get("blurScope"),d=x.get("disabled"),h=st(m),g=x.getShallow("scale"),f=m.getShallow("cursor")}var _=t.getItemVisual(n,"symbolRotate");y.attr("rotation",(_||0)*Math.PI/180||0);var b=lt(t.getItemVisual(n,"symbolOffset"),i);b&&(y.x=b[0],y.y=b[1]),f&&y.attr("cursor",f);var S=t.getItemVisual(n,"style"),w=S.fill;if(y instanceof e){var M=y.style;y.useStyle(p({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},S))}else y.__isEmptyBrush?y.useStyle(p({},S)):y.useStyle(S),y.style.decal=null,y.setColor(w,r&&r.symbolInnerColor),y.style.strokeNoScale=!0;var I=t.getItemVisual(n,"liftZ"),A=this._z2;null!=I?null==A&&(this._z2=y.z2,y.z2+=I):null!=A&&(y.z2=A,this._z2=null);var C=r&&r.useNameLabel;ut(y,h,{labelFetcher:v,labelDataIndex:n,defaultText:function(e){return C?t.getName(e):ka(t,e)},inheritColor:w,defaultOpacity:S.opacity}),this._sizeX=i[0]/2,this._sizeY=i[1]/2;var T=y.ensureState("emphasis");T.style=a,y.ensureState("select").style=l,y.ensureState("blur").style=s;var D=null==g||!0===g?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;T.scaleX=this._sizeX*D,T.scaleY=this._sizeY*D,this.setSymbolScale(1),ct(this,u,c,d)},n.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},n.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),o=dt(this).dataIndex,r=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&ht(a,{style:{opacity:0}},e,{dataIndex:o,removeOpt:r,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ht(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:o,cb:t,removeOpt:r})},n.getSymbolSize=function(t,e){return pt(t.getItemVisual(e,"symbolSize"))},n}($);function Va(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function za(t){return null==t||Z(t)||(t={isIgnore:t}),t||{}}function Ea(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:st(e),cursorStyle:e.get("cursor")}}const Ba=function(){function t(t){this.group=new $,this._SymbolCtor=t||Ra}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=za(e);var n=this.group,i=t.hostModel,o=this._data,r=this._SymbolCtor,a=e.disableAnimation,s=Ea(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add((function(i){var o=u(i);if(Va(t,o,i,e)){var a=new r(t,i,s,l);a.setPosition(o),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(Va(t,p,c,e)){var g=t.getItemVisual(c,"symbol")||"circle",f=h&&h.getSymbolType&&h.getSymbolType();if(!h||f&&f!==g)n.remove(h),(h=new r(t,c,s,l)).setPosition(p);else{h.updateData(t,c,s,l);var y={x:p[0],y:p[1]};a?h.attr(y):ot(h,y,i)}n.add(h),t.setItemGraphicEl(c,h)}else n.remove(h)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Ea(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=za(n);for(var o=t.start;o<t.end;o++){var r=e.getItemLayout(o);if(Va(e,r,o,n)){var a=new this._SymbolCtor(e,o,this._seriesScope);a.traverse(i),a.setPosition(r),this.group.add(a),e.setItemGraphicEl(o,a),this._progressiveEls.push(a)}}},t.prototype.eachRendered=function(t){gt(this._progressiveEls||this.group,t)},t.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}),n.hostModel)})):e.removeAll()},t}();function Ga(t,e,n){var i=t.getBaseAxis(),o=t.getOtherAxis(i),a=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:m(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(o,n),s=i.dim,l=o.dim,u=e.mapDimension(l),c=e.mapDimension(s),d="x"===l||"radius"===l?1:0,h=r(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,g=e.getCalculationInfo("stackResultDimension");return ft(e,h[0])&&(p=!0,h[0]=g),ft(e,h[1])&&(p=!0,h[1]=g),{dataDimsForPoint:h,valueStart:a,valueAxisDim:l,baseAxisDim:s,stacked:!!p,valueDim:u,baseDim:c,baseDataOffset:d,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Wa(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var r=t.baseDataOffset,a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var Fa=Math.min,Ha=Math.max;function Ya(t,e){return isNaN(t)||isNaN(e)}function Xa(t,e,n,i,o,r,a,s,l){for(var u,c,d,h,p,g,f=n,y=0;y<i;y++){var v=e[2*f],m=e[2*f+1];if(f>=o||f<0)break;if(Ya(v,m)){if(l){f+=r;continue}break}if(f===n)t[r>0?"moveTo":"lineTo"](v,m),d=v,h=m;else{var x=v-u,_=m-c;if(x*x+_*_<.5){f+=r;continue}if(a>0){for(var b=f+r,S=e[2*b],w=e[2*b+1];S===v&&w===m&&y<i;)y++,f+=r,S=e[2*(b+=r)],w=e[2*b+1],x=(v=e[2*f])-u,_=(m=e[2*f+1])-c;var M=y+1;if(l)for(;Ya(S,w)&&M<i;)M++,S=e[2*(b+=r)],w=e[2*b+1];var I=.5,A=0,C=0,T=void 0,D=void 0;if(M>=i||Ya(S,w))p=v,g=m;else{A=S-u,C=w-c;var L=v-u,P=S-v,k=m-c,N=w-m,O=void 0,R=void 0;if("x"===s){var V=A>0?1:-1;p=v-V*(O=Math.abs(L))*a,g=m,T=v+V*(R=Math.abs(P))*a,D=m}else if("y"===s){var z=C>0?1:-1;p=v,g=m-z*(O=Math.abs(k))*a,T=v,D=m+z*(R=Math.abs(N))*a}else O=Math.sqrt(L*L+k*k),p=v-A*a*(1-(I=(R=Math.sqrt(P*P+N*N))/(R+O))),g=m-C*a*(1-I),D=m+C*a*I,T=Fa(T=v+A*a*I,Ha(S,v)),D=Fa(D,Ha(w,m)),T=Ha(T,Fa(S,v)),g=m-(C=(D=Ha(D,Fa(w,m)))-m)*O/R,p=Fa(p=v-(A=T-v)*O/R,Ha(u,v)),g=Fa(g,Ha(c,m)),T=v+(A=v-(p=Ha(p,Fa(u,v))))*R/O,D=m+(C=m-(g=Ha(g,Fa(c,m))))*R/O}t.bezierCurveTo(d,h,p,g,v,m),d=T,h=D}else t.lineTo(v,m)}u=v,c=m,f+=r}return y}var Za=function(){this.smooth=0,this.smoothConstraint=!0},Ua=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return K(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Za},e.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;o>0&&Ya(n[2*o-2],n[2*o-1]);o--);for(;i<o&&Ya(n[2*i],n[2*i+1]);i++);}for(;i<o;)i+=Xa(t,n,i,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},e.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,o=this.path.data,r=f.CMD,a="x"===e,s=[],l=0;l<o.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,g=void 0,y=void 0;switch(o[l++]){case r.M:n=o[l++],i=o[l++];break;case r.L:if(u=o[l++],c=o[l++],(y=a?(t-n)/(u-n):(t-i)/(c-i))<=1&&y>=0){var v=a?(c-i)*y+i:(u-n)*y+n;return a?[t,v]:[v,t]}n=u,i=c;break;case r.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],g=o[l++];var m=a?vt(n,u,d,p,t,s):vt(i,c,h,g,t,s);if(m>0)for(var x=0;x<m;x++){var _=s[x];if(_<=1&&_>=0){v=a?mt(i,c,h,g,_):mt(n,u,d,p,_);return a?[t,v]:[v,t]}}n=p,i=g}}},e}(_),ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e}(Za),qa=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return K(e,t),e.prototype.getDefaultShape=function(){return new ja},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;r>0&&Ya(n[2*r-2],n[2*r-1]);r--);for(;o<r&&Ya(n[2*o],n[2*o+1]);o++);}for(;o<r;){var s=Xa(t,n,o,r,r,1,e.smooth,a,e.connectNulls);Xa(t,i,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},e}(_);function Ka(t,e,n,i,o){var r=t.getArea(),a=r.x,s=r.y,l=r.width,u=r.height,c=n.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new xt({shape:{x:a,y:s,width:l,height:u}});if(e){var h=t.getBaseAxis(),p=h.isHorizontal(),g=h.inverse;p?(g&&(d.shape.x+=l),d.shape.width=0):(g||(d.shape.y+=u),d.shape.height=0);var f=P(o)?function(t){o(t,d)}:null;at(d,{shape:{width:l,height:u,x:a,y:s}},n,null,i,f)}return d}function Ja(t,e,n){var i=t.getArea(),o=_t(i.r0,1),r=_t(i.r,1),a=new bt({shape:{cx:_t(t.cx,1),cy:_t(t.cy,1),r0:o,r:r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=o,at(a,{shape:{endAngle:i.endAngle,r:r}},n));return a}function $a(t,e,n,i,o){return t?"polar"===t.type?Ja(t,e,n):"cartesian2d"===t.type?Ka(t,e,n,i,o):null:null}function Qa(t,e){return t.type===e}function ts(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return!0}}function es(t){for(var e=1/0,n=1/0,i=-1/0,o=-1/0,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[e,n],[i,o]]}function ns(t,e){var n=es(t),i=n[0],o=n[1],r=es(e),a=r[0],s=r[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(o[0]-s[0]),Math.abs(o[1]-s[1]))}function is(t){return m(t)?t:t?.5:0}function os(t,e,n,i){var o=e.getBaseAxis(),r="x"===o.dim||"radius"===o.dim?0:1,a=[],s=0,l=[],u=[],c=[],d=[];if(i){for(s=0;s<t.length;s+=2)isNaN(t[s])||isNaN(t[s+1])||d.push(t[s],t[s+1]);t=d}for(s=0;s<t.length-2;s+=2)switch(c[0]=t[s+2],c[1]=t[s+3],u[0]=t[s],u[1]=t[s+1],a.push(u[0],u[1]),n){case"end":l[r]=c[r],l[1-r]=u[1-r],a.push(l[0],l[1]);break;case"middle":var h=(u[r]+c[r])/2,p=[];l[r]=p[r]=h,l[1-r]=u[1-r],p[1-r]=c[1-r],a.push(l[0],l[1]),a.push(p[0],p[1]);break;default:l[r]=u[r],l[1-r]=c[1-r],a.push(l[0],l[1])}return a.push(t[s++],t[s++]),a}function rs(t,e,n){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var o,a,s=i.length-1;s>=0;s--){var l=t.getDimensionInfo(i[s].dimension);if("x"===(o=l&&l.coordDim)||"y"===o){a=i[s];break}}if(a){var c=e.getAxis(o),d=r(a.stops,(function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}})),h=d.length,p=a.outerColors.slice();h&&d[0].coord>d[h-1].coord&&(d.reverse(),p.reverse());var g=function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord,o=(n-i)/(e.coord-i);return{coord:n,color:Nt(o,[t.color,e.color])}}for(var s=0;s<r;s++){var l=t[s],u=l.coord;if(u<0)n=l;else{if(u>e){i?o.push(a(i,l,e)):n&&o.push(a(n,l,0),a(n,l,e));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),i=l}}return o}(d,"x"===o?n.getWidth():n.getHeight()),f=g.length;if(!f&&h)return d[0].coord<0?p[1]?p[1]:d[h-1].color:p[0]?p[0]:d[0].color;var y=g[0].coord-10,v=g[f-1].coord+10,m=v-y;if(m<.001)return"transparent";u(g,(function(t){t.offset=(t.coord-y)/m})),g.push({offset:f?g[f-1].offset:.5,color:p[1]||"transparent"}),g.unshift({offset:f?g[0].offset:.5,color:p[0]||"transparent"});var x=new Pt(0,0,0,0,g,!0);return x[o]=y,x[o+"2"]=v,x}}}function as(t,e,n){var i=t.get("showAllSymbol"),o="auto"===i;if(!i||o){var r=n.getAxesByScale("ordinal")[0];if(r&&(!o||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*Ra.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(r,e))){var a=e.mapDimension(r.dim),s={};return u(r.getViewLabels(),(function(t){var e=r.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function ss(t,e){return[t[2*e],t[2*e+1]]}function ls(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<kt.length;e++)if(t.get([kt[e],"endLabel","show"]))return!0;return!1}function us(t,e,n,i){if(Qa(e,"cartesian2d")){var o=i.getModel("endLabel"),r=o.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=ls(i)?function(n,i){t._endLabelOnDuring(n,i,a,s,r,o,e)}:null,u=e.getBaseAxis().isHorizontal(),c=Ka(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=s.originalX&&e.attr({x:s.originalX,y:s.originalY})}),l);if(!i.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return Ja(e,n,i)}var cs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.init=function(){var t=new $,e=new Ba;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem,r=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],c="polar"===o.type,d=this._coordSys,h=this._symbolDraw,p=this._polyline,g=this._polygon,f=this._lineGroup,y=!e.ssr&&t.get("animation"),v=!l.isEmpty(),m=l.get("origin"),x=Ga(o,a,m),_=v&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),o=yt(2*i),r=0;r<i;r++){var a=Wa(n,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(o,a,x),b=t.get("showSymbol"),S=t.get("connectNulls"),w=b&&!c&&as(t,a,o),M=this._data;M&&M.eachItemGraphicEl((function(t,e){t.__temp&&(r.remove(t),M.setItemGraphicEl(e,null))})),b||h.remove(),r.add(f);var I,A=!c&&t.get("step");o&&o.getArea&&t.get("clip",!0)&&(null!=(I=o.getArea()).width?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;var C=rs(a,o,n)||a.getVisual("style")[a.getVisual("drawType")];if(p&&d.type===o.type&&A===this._step){v&&!g?g=this._newPolygon(u,_):g&&!v&&(f.remove(g),g=this._polygon=null),c||this._initOrUpdateEndLabel(t,o,St(C));var T=f.getClipPath();if(T){var D=us(this,o,!1,t);at(T,{shape:D.shape},t)}else f.setClipPath(us(this,o,!0,t));b&&h.updateData(a,{isIgnore:w,clipShape:I,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),ts(this._stackedOnPoints,_)&&ts(this._points,u)||(y?this._doUpdateAnimation(a,_,o,n,A,m,S):(A&&(u=os(u,o,A,S),_&&(_=os(_,o,A,S))),p.setShape({points:u}),g&&g.setShape({points:u,stackedOnPoints:_})))}else b&&h.updateData(a,{isIgnore:w,clipShape:I,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,o,I),A&&(u=os(u,o,A,S),_&&(_=os(_,o,A,S))),p=this._newPolyline(u),v?g=this._newPolygon(u,_):g&&(f.remove(g),g=this._polygon=null),c||this._initOrUpdateEndLabel(t,o,St(C)),f.setClipPath(us(this,o,!0,t));var L=t.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),N=L.get("disabled");(p.useStyle(wt(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),Mt(p,t,"lineStyle"),p.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);dt(p).seriesIndex=t.seriesIndex,ct(p,P,k,N);var O=is(t.get("smooth")),R=t.get("smoothMonotone");if(p.setShape({smooth:O,smoothMonotone:R,connectNulls:S}),g){var V=a.getCalculationInfo("stackedOnSeries"),z=0;g.useStyle(wt(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),V&&(z=is(V.get("smooth"))),g.setShape({smooth:O,stackedOnSmooth:z,smoothMonotone:R,connectNulls:S}),Mt(g,t,"areaStyle"),dt(g).seriesIndex=t.seriesIndex,ct(g,P,k,N)}var E=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=E)})),this._polyline.onHoverStateChange=E,this._data=a,this._coordSys=o,this._stackedOnPoints=_,this._points=u,this._step=A,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,p),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,e){dt(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=It(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&r>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],u=a[2*r+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,d=t.get("z")||0;(s=new Ra(o,r)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else At.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var o=t.getData(),r=It(o,i);if(this._changePolyState("normal"),null!=r&&r>=0){var a=o.getItemGraphicEl(r);a&&(a.__temp?(o.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else At.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Ct(this._polyline,t),e&&Ct(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Ua({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new qa({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,o,r=e.getBaseAxis(),a=r.inverse;"cartesian2d"===e.type?(i=r.isHorizontal(),o=!1):"polar"===e.type&&(i="angle"===r.dim,o=!0);var s=t.hostModel,l=s.get("animationDuration");P(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=P(u)?u(null):u;t.eachItemGraphicEl((function(t,r){var s=t;if(s){var d=[t.x,t.y],h=void 0,p=void 0,g=void 0;if(n)if(o){var f=n,y=e.pointToCoord(d);i?(h=f.startAngle,p=f.endAngle,g=-y[1]/180*Math.PI):(h=f.r0,p=f.r,g=y[0])}else{var v=n;i?(h=v.x,p=v.x+v.width,g=t.x):(h=v.y+v.height,p=v.y,g=t.y)}var m=p===h?0:(g-h)/(p-h);a&&(m=1-m);var x=P(u)?u(r):l*m+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(ls(t)){var o=t.getData(),r=this._polyline,a=o.getLayout("points");if(!a)return r.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Tt({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(ut(r,st(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?Na(o,n):ka(o,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),o=n.inverse,r=i?o?"right":"left":"center",a=i?"middle":o?"top":"bottom";return{normal:{align:t.get("align")||r,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=r.get("precision"),p=r.get("distance")||0,g=a.getBaseAxis(),f=g.isHorizontal(),y=g.inverse,v=e.shape,m=y?f?v.x:v.y+v.height:f?v.x+v.width:v.y,x=(f?p:0)*(y?-1:1),_=(f?0:-p)*(y?-1:1),b=f?"x":"y",S=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<r;u++)if(o=t[2*u+a],!isNaN(o)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}else i=o;return{range:[s,l],t:(e-i)/(o-i)}}(u,m,b),w=S.range,M=w[1]-w[0],I=void 0;if(M>=1){if(M>1&&!d){var A=ss(u,w[0]);s.attr({x:A[0]+x,y:A[1]+_}),o&&(I=c.getRawValue(w[0]))}else{(A=l.getPointOn(m,b))&&s.attr({x:A[0]+x,y:A[1]+_});var C=c.getRawValue(w[0]),T=c.getRawValue(w[1]);o&&(I=Dt(n,h,C,T,S.t))}i.lastFrameIndex=w[0]}else{var D=1===t||i.lastFrameIndex>0?w[0]:0;A=ss(u,D);o&&(I=c.getRawValue(D)),s.attr({x:A[0]+x,y:A[1]+_})}if(o){var L=Lt(s);"function"==typeof L.setLabelText&&L.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,o,r,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=function(t,e,n,i,o,r,a){for(var s=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),l=[],u=[],c=[],d=[],h=[],p=[],g=[],f=Ga(o,e,a),y=t.getLayout("points")||[],v=e.getLayout("points")||[],m=0;m<s.length;m++){var x=s[m],_=!0,b=void 0,S=void 0;switch(x.cmd){case"=":b=2*x.idx,S=2*x.idx1;var w=y[b],M=y[b+1],I=v[S],A=v[S+1];(isNaN(w)||isNaN(M))&&(w=I,M=A),l.push(w,M),u.push(I,A),c.push(n[b],n[b+1]),d.push(i[S],i[S+1]),g.push(e.getRawIndex(x.idx1));break;case"+":var C=x.idx,T=f.dataDimsForPoint,D=o.dataToPoint([e.get(T[0],C),e.get(T[1],C)]);S=2*C,l.push(D[0],D[1]),u.push(v[S],v[S+1]);var L=Wa(f,o,e,C);c.push(L[0],L[1]),d.push(i[S],i[S+1]),g.push(e.getRawIndex(C));break;case"-":_=!1}_&&(h.push(x),p.push(p.length))}p.sort((function(t,e){return g[t]-g[e]}));var P=l.length,k=yt(P),N=yt(P),O=yt(P),R=yt(P),V=[];for(m=0;m<p.length;m++){var z=p[m],E=2*m,B=2*z;k[E]=l[B],k[E+1]=l[B+1],N[E]=u[B],N[E+1]=u[B+1],O[E]=c[B],O[E+1]=c[B+1],R[E]=d[B],R[E+1]=d[B+1],V[m]=h[z]}return{current:k,next:N,stackedOnCurrent:O,stackedOnNext:R,status:V}}(this._data,t,this._stackedOnPoints,e,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(o&&(d=os(c.current,n,o,a),h=os(c.stackedOnCurrent,n,o,a),p=os(c.next,n,o,a),g=os(c.stackedOnNext,n,o,a)),ns(d,p)>3e3||l&&ns(h,g)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:g})));s.shape.__points=c.current,s.shape.points=d;var f={shape:{points:p}};c.current!==d&&(f.shape.__points=c.next),s.stopAnimation(),ot(s,f,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),ot(l,{shape:{stackedOnPoints:g}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],v=c.status,m=0;m<v.length;m++){if("="===v[m].cmd){var x=t.getItemGraphicEl(v[m].idx1);x&&y.push({el:x,ptIdx:m})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var t=s.shape.__points,e=0;e<y.length;e++){var n=y[e].el,i=2*y[e].ptIdx;n.x=t[i],n.y=t[i+1],n.markRedraw()}}))},e.prototype.remove=function(t){var e=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(t,i){t.__temp&&(e.remove(t),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(At);const ds=cs;function hs(t,e){return{seriesType:t,plan:Ot(),reset:function(t){var n=t.getData(),i=t.coordinateSystem,o=t.pipelineContext,a=e||o.large;if(i){var s=r(i.dimensions,(function(t){return n.mapDimension(t)})).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");ft(n,s[0])&&(s[0]=u),ft(n,s[1])&&(s[1]=u);var c=n.getStore(),d=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(t,e){for(var n=t.end-t.start,o=a&&yt(n*l),r=[],s=[],u=t.start,p=0;u<t.end;u++){var g=void 0;if(1===l){var f=c.get(d,u);g=i.dataToPoint(f,null,s)}else r[0]=c.get(d,u),r[1]=c.get(h,u),g=i.dataToPoint(r,null,s);a?(o[p++]=g[0],o[p++]=g[1]):e.setItemLayout(u,g.slice())}a&&e.setLayout("points",o)}}}}}}var ps={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,n=-1/0,i=0;i<t.length;i++){var o=t[i],r=Math.abs(o);r>e&&(e=r,n=o)}return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},gs=function(t){return Math.round(t.length/2)};function fs(t){return{seriesType:t,reset:function(t,e,n){var i=t.getData(),o=t.get("sampling"),r=t.coordinateSystem,a=i.count();if(a>10&&"cartesian2d"===r.type&&o){var s=r.getBaseAxis(),l=r.getOtherAxis(s),u=s.getExtent(),d=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(d||1),p=Math.round(a/h);if(isFinite(p)&&p>1){"lttb"===o&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var g=void 0;c(o)?g=ps[o]:P(o)&&(g=o),g&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,g,gs))}}}}}var ys=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.getInitialData=function(t,e){return J(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),r=i.dataToPoint(o);if(n)u(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(r[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,h=0;h<i.length;h++){var p=i[h].coord,g=h===i.length-1?i[h-1].tickValue+d:i[h].tickValue;if(g===s){c=p;break}if(g<s)u=p;else if(null!=u&&g>s){c=(p+u)/2;break}1===h&&(d=g-i[0].tickValue)}null==c&&(u?u&&(c=i[i.length-1].coord):c=i[0].coord),r[n]=t.toGlobalCoord(c)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;r[c]+=s+l/2}return r}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(tt);tt.registerClass(ys);const vs=ys;const ms=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.getInitialData=function(){return J(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Rt(vs.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(vs);var xs=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const _s=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return K(e,t),e.prototype.getDefaultShape=function(){return new xs},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,d=2*Math.PI,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),g=Math.sin(l),f=Math.cos(u),y=Math.sin(u);h?(t.moveTo(p*o+n,g*o+i),t.arc(p*s+n,g*s+i,a,-Math.PI+l,l,!c)):t.moveTo(p*r+n,g*r+i),t.arc(n,i,r,l,u,!c),t.arc(f*s+n,y*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==o&&t.arc(n,i,o,u,l,c)},e}(_);function bs(t,e,n){return e*Math.sin(t)*(n?-1:1)}function Ss(t,e,n){return e*Math.cos(t)*(n?1:-1)}function ws(t,e,n){var i=t.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;X(i)||(i=[i,i,i,i]);var o=Math.abs(e.r||0-e.r0||0);return{cornerRadius:r(i,(function(t){return zt(t,o)}))}}var Ms=Math.max,Is=Math.min;var As=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return K(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var o=t.get("coordinateSystem");"cartesian2d"!==o&&"polar"!==o||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},e.prototype.eachRendered=function(t){gt(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var o,r=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?o=u.isHorizontal():"polar"===l.type&&(o="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,d=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);d&&this._enableRealtimeSort(d,a,n);var h=t.get("clip",!0)||d,p=function(t,e){var n=t.getArea&&t.getArea();if(Qa(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var o=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);r.removeClipPath();var g=t.get("roundCap",!0),f=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),v=y.get("borderRadius")||0,m=[],x=this._backgroundEls,_=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function S(t){var e=Os[l.type](a,t),n=function(t,e,n){var i="polar"===t.type?bt:xt;return new i({shape:Ws(e,n,t),silent:!0,z2:0})}(l,o,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),i=Os[l.type](a,e,n);if(f&&S(e),a.hasValue(e)&&Ns[l.type](i)){var s=!1;h&&(s=Cs[l.type](p,i));var y=Ts[l.type](t,a,e,i,o,c,u.model,!1,g);d&&(y.forceLabelAnimation=!0),Vs(y,a,e,n,i,t,o,"polar"===l.type),_?y.attr({shape:i}):d?Ds(d,c,y,i,e,o,!1,!1):at(y,{shape:i},t,e),a.setItemGraphicEl(e,y),r.add(y),y.ignore=s}})).update((function(e,n){var i=a.getItemModel(e),w=Os[l.type](a,e,i);if(f){var M=void 0;0===x.length?M=S(n):((M=x[n]).useStyle(y.getItemStyle()),"cartesian2d"===l.type?M.setShape("r",v):M.setShape("cornerRadius",v),m[e]=M);var I=Os[l.type](a,e),A=Ws(o,I,l);ot(M,{shape:A},c,e)}var C=s.getItemGraphicEl(n);if(a.hasValue(e)&&Ns[l.type](w)){var T=!1;if(h&&(T=Cs[l.type](p,w))&&r.remove(C),C?rt(C):C=Ts[l.type](t,a,e,w,o,c,u.model,!!C,g),d&&(C.forceLabelAnimation=!0),b){var D=C.getTextContent();if(D){var L=Lt(D);null!=L.prevValue&&(L.prevValue=L.value)}}else Vs(C,a,e,i,w,t,o,"polar"===l.type);_?C.attr({shape:w}):d?Ds(d,c,C,w,e,o,!0,b):ot(C,{shape:w},t,e,null),a.setItemGraphicEl(e,C),C.ignore=T,r.add(C)}else r.remove(C)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&Et(n,t,e)})).execute();var w=this._backgroundGroup||(this._backgroundGroup=new $);w.removeAll();for(var M=0;M<m.length;++M)w.add(m[M]);r.add(w),this._backgroundEls=m,this._data=a},e.prototype._renderLarge=function(t,e,n){this._clear(),Bs(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),Bs(e,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)&&$a(t.coordinateSystem,!1,t),n=this.group;e?n.setClipPath(e):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,e,n){var i=this;if(e.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(e,t,n),this._isFirstFrame=!1;else{var r=function(t){var n=e.getItemGraphicEl(t),i=n&&n.shape;return i&&Math.abs(o.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(e,r,o,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,e,n){var i=[];return t.each(t.mapDimension(e.dim),(function(t,e){var o=n(e);o=null==o?NaN:o,i.push({dataIndex:e,mappedValue:o,ordinalNumber:t})})),i.sort((function(t,e){return e.mappedValue-t.mappedValue})),{ordinalNumbers:r(i,(function(t){return t.ordinalNumber}))}},e.prototype._isOrderChangedWithinSameData=function(t,e,n){for(var i=n.scale,o=t.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=t.rawIndexOf(o,i.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:e(t.indexOfRawIndex(l));if(u>r)return!0;r=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),o=Math.max(0,i[0]),r=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=r;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var o=this._dataSort(t,n,e);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,o=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Et(e,t,dt(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(At),Cs={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var o=t.x+t.width,r=t.y+t.height,a=Ms(e.x,t.x),s=Is(e.x+e.width,o),l=Ms(e.y,t.y),u=Is(e.y+e.height,r),c=s<a,d=u<l;return e.x=c&&a>o?s:a,e.y=d&&l>r?u:l,e.width=c?0:s-a,e.height=d?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||d},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var o=Is(e.r,t.r),r=Ms(e.r0,t.r0);e.r=o,e.r0=r;var a=o-r<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Ts={cartesian2d:function(t,e,n,i,o,r,a,s,l){var u=new xt({shape:p({},i),z2:1});(u.__dataIndex=n,u.name="item",r)&&(u.shape[o?"height":"width"]=0);return u},polar:function(t,e,n,i,o,r,a,s,l){var u=!o&&l?_s:bt,c=new u({shape:i,z2:1});c.name="item";var d,h,p=Rs(o);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===_s}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return Vt(t,e,n);var o=d(i),r=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,g=a.startAngle,f=a.endAngle,y=(g+f)/2,v=h?Math.abs(u-c)/2:0,m=Math.cos,x=Math.sin,_=s+u*m(g),b=l+u*x(g),S="left",w="top";switch(o){case"startArc":_=s+(c-r)*m(y),b=l+(c-r)*x(y),S="center",w="top";break;case"insideStartArc":_=s+(c+r)*m(y),b=l+(c+r)*x(y),S="center",w="bottom";break;case"startAngle":_=s+p*m(g)+bs(g,r+v,!1),b=l+p*x(g)+Ss(g,r+v,!1),S="right",w="middle";break;case"insideStartAngle":_=s+p*m(g)+bs(g,-r+v,!1),b=l+p*x(g)+Ss(g,-r+v,!1),S="left",w="middle";break;case"middle":_=s+p*m(y),b=l+p*x(y),S="center",w="middle";break;case"endArc":_=s+(u+r)*m(y),b=l+(u+r)*x(y),S="center",w="bottom";break;case"insideEndArc":_=s+(u-r)*m(y),b=l+(u-r)*x(y),S="center",w="top";break;case"endAngle":_=s+p*m(f)+bs(f,r+v,!0),b=l+p*x(f)+Ss(f,r+v,!0),S="left",w="middle";break;case"insideEndAngle":_=s+p*m(f)+bs(f,-r+v,!0),b=l+p*x(f)+Ss(f,-r+v,!0),S="right",w="middle";break;default:return Vt(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=S,t.verticalAlign=w,t}),r){var g=o?"r":"endAngle",f={};c.shape[g]=o?i.r0:i.startAngle,f[g]=i[g],(s?ot:at)(c,{shape:f},r)}return c}};function Ds(t,e,n,i,o,r,a,s){var l,u;r?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?ot:at)(n,{shape:l},e,o,null);var c=e?t.baseAxis.model:null;(a?ot:at)(n,{shape:u},c,o)}function Ls(t,e){for(var n=0;n<e.length;n++)if(!isFinite(t[e[n]]))return!0;return!1}var Ps=["x","y","width","height"],ks=["cx","cy","r","startAngle","endAngle"],Ns={cartesian2d:function(t){return!Ls(t,Ps)},polar:function(t){return!Ls(t,ks)}},Os={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),o=n?function(t,e){var n=t.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var i=t.get(["itemStyle","borderWidth"])||0,o=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,o,r)}(n,i):0,r=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+r*o/2,y:i.y+a*o/2,width:i.width-r*o,height:i.height-a*o}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Rs(t){return e=t?"Arc":"Angle",function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}};var e}function Vs(t,e,n,i,o,r,a,s){var l=e.getItemVisual(n,"style");if(s){if(!r.get("roundCap")){var c=t.shape,d=ws(i.getModel("itemStyle"),c,!0);p(c,d),t.setShape(c)}}else{var h=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",h)}t.useStyle(l);var g=i.getShallow("cursor");g&&t.attr("cursor",g);var f=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",y=st(i);ut(t,y,{labelFetcher:r,labelDataIndex:n,defaultText:ka(r.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var v=t.getTextContent();if(s&&v){var x=i.get(["label","position"]);t.textConfig.inside="middle"===x||null,function(t,e,n,i){if(m(i))t.setTextConfig({rotation:i});else if(X(e))t.setTextConfig({rotation:0});else{var o,r=t.shape,a=r.clockwise?r.startAngle:r.endAngle,s=r.clockwise?r.endAngle:r.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return void t.setTextConfig({rotation:0})}var c=1.5*Math.PI-o;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}(t,"outside"===x?f:x,Rs(a),i.get(["label","rotate"]))}Bt(v,y,r.getRawValue(n),(function(t){return Na(e,t)}));var _=i.getModel(["emphasis"]);ct(t,_.get("focus"),_.get("blurScope"),_.get("disabled")),Mt(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(o)&&(t.style.fill="none",t.style.stroke="none",u(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var zs=function(){},Es=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return K(e,t),e.prototype.getDefaultShape=function(){return new zs},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[i]=s,a[o]=n[l+2],r[i]=n[l+i],r[o]=n[l+o],t.rect(r[0],r[1],a[0],a[1])},e}(_);function Bs(t,e,n,i){var o=t.getData(),r=o.getLayout("valueAxisHorizontal")?1:0,a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=t.getModel("backgroundStyle"),u=o.getLayout("largeBackgroundPoints");if(u){var c=new Es({shape:{points:u},incremental:!!i,silent:!0,z2:0});c.baseDimIdx=r,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),n&&n.push(c)}var d=new Es({shape:{points:o.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=r,d.largeDataIndices=a,d.barWidth=s,e.add(d),d.useStyle(o.getVisual("style")),dt(d).seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",Gs),d.on("mousemove",Gs)),n&&n.push(d)}var Gs=Gt((function(t){var e=function(t,e,n){for(var i=t.baseDimIdx,o=1-i,r=t.shape.points,a=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,d=r.length/3;c<d;c++){var h=3*c;if(l[i]=u,l[o]=r[h+2],s[i]=r[h+i],s[o]=r[h+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),e>=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,t.offsetX,t.offsetY);dt(this).dataIndex=e>=0?e:null}),30,!1);function Ws(t,e,n){if(Qa(n,"cartesian2d")){var i=e,o=n.getArea();return{x:t?i.x:o.x,y:t?o.y:i.y,width:t?i.width:o.width,height:t?o.height:i.height}}var r=e;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:t?o.r0:r.r0,r:t?o.r:r.r,startAngle:t?r.startAngle:0,endAngle:t?r.endAngle:2*Math.PI}}const Fs=As;var Hs=2*Math.PI,Ys=Math.PI/180;function Xs(t,e){return Zt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Zs(t,e){var n=Xs(t,e),i=t.get("center"),o=t.get("radius");X(o)||(o=[0,o]);var r,a,s=Ut(n.width,e.getWidth()),l=Ut(n.height,e.getHeight()),u=Math.min(s,l),c=Ut(o[0],u/2),d=Ut(o[1],u/2),h=t.coordinateSystem;if(h){var p=h.dataToPoint(i);r=p[0]||0,a=p[1]||0}else X(i)||(i=[i,i]),r=Ut(i[0],s)+n.x,a=Ut(i[1],l)+n.y;return{cx:r,cy:a,r0:c,r:d}}function Us(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),o=Xs(t,n),r=Zs(t,n),a=r.cx,s=r.cy,l=r.r,u=r.r0,c=-t.get("startAngle")*Ys,d=t.get("endAngle"),h=t.get("padAngle")*Ys;d="auto"===d?c-Hs:-d*Ys;var p=t.get("minAngle")*Ys+h,g=0;e.each(i,(function(t){!isNaN(t)&&g++}));var f=e.getSum(i),y=Math.PI/(f||g)*2,v=t.get("clockwise"),m=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=v?1:-1,S=[c,d],w=b*h/2;Yt(S,!v),c=S[0],d=S[1];var M=Math.abs(d-c),I=M,A=0,C=c;if(e.setLayout({viewRect:o,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===f&&x?y:t*y:M/g)<p?(i=p,I-=p):A+=t;var o=C+b*i,r=0,c=0;h>i?c=r=C+b*i/2:(r=C+w,c=o-w),e.setItemLayout(n,{angle:i,startAngle:r,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:m?Xt(t,_,[u,l]):l}),C=o}})),I<Hs&&g)if(I<=.001){var T=M/g;e.each(i,(function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=T;var o=0,r=0;T<h?r=o=c+b*(n+.5)*T:(o=c+b*n*T+w,r=c+b*(n+1)*T-w),i.startAngle=o,i.endAngle=r}}))}else y=I/A,C=c,e.each(i,(function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n),o=i.angle===p?p:t*y,r=0,a=0;o<h?a=r=C+b*o/2:(r=C+w,a=C+b*o-w),i.startAngle=r,i.endAngle=a,C+=b*o}}))}))}function js(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf((function(t){for(var e=i.getName(t),o=0;o<n.length;o++)if(!n[o].isSelected(e))return!1;return!0}))}}}}var qs=Math.PI/180;function Ks(t,e,n,i,o,r,a,s,l,u){if(!(t.length<2)){for(var c=t.length,d=0;d<c;d++)if("outer"===t[d].position&&"labelLine"===t[d].labelAlignTo){var h=t[d].label.x-u;t[d].linePoints[1][0]+=h,t[d].label.x=u}Jt(t,l,l+a)&&function(t){for(var r={list:[],maxY:0},a={list:[],maxY:0},s=0;s<t.length;s++)if("none"===t[s].labelAlignTo){var l=t[s],u=l.label.y>n?a:r,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-e-l.len2*o,h=i+l.len,g=Math.abs(d)<h?Math.sqrt(c*c/(1-d*d/h/h)):h;u.rB=g,u.maxY=c}u.list.push(l)}p(r),p(a)}(t)}function p(t){for(var r=t.rB,a=r*r,s=0;s<t.list.length;s++){var l=t.list[s],u=Math.abs(l.label.y-n),c=i+l.len,d=c*c,h=Math.sqrt((1-Math.abs(u*u/a))*d),p=e+(h+l.len2)*o,g=p-l.label.x;Js(l,l.targetTextWidth-g*o,!0),l.label.x=p}}}function Js(t,e,n){if(void 0===n&&(n=!1),null==t.labelStyleWidth){var i=t.label,o=i.style,r=t.rect,a=o.backgroundColor,s=o.padding,l=s?s[1]+s[3]:0,u=o.overflow,c=r.width+(a?0:l);if(e<c||n){var d=r.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",e-l);var h=i.getBoundingRect();i.setStyle("width",Math.ceil(h.width)),i.setStyle("backgroundColor",a)}else{var p=e-l,g=e<c?p:n?p>t.unconstrainedWidth?null:p:null;i.setStyle("width",g)}var f=i.getBoundingRect();r.width=f.width;var y=(i.style.margin||0)+2.1;r.height=f.height+y,r.y-=(r.height-d)/2}}}function $s(t){return"center"===t.position}function Qs(t){var e,n,i=t.getData(),o=[],r=!1,a=(t.get("minShowLabelAngle")||0)*qs,s=i.getLayout("viewRect"),l=i.getLayout("r"),c=s.width,d=s.x,h=s.y,p=s.height;function g(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),h=s.shape,p=s.getTextContent(),f=s.getTextGuideLine(),y=i.getItemModel(t),v=y.getModel("label"),x=v.get("position")||y.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),b=v.get("alignTo"),S=Ut(v.get("edgeDistance"),c),w=v.get("bleedMargin"),M=y.getModel("labelLine"),I=M.get("length");I=Ut(I,c);var A=M.get("length2");if(A=Ut(A,c),Math.abs(h.endAngle-h.startAngle)<a)return u(p.states,g),p.ignore=!0,void(f&&(u(f.states,g),f.ignore=!0));if(function(t){if(!t.ignore)return!0;for(var e in t.states)if(!1===t.states[e].ignore)return!0;return!1}(p)){var C,T,D,L,P=(h.startAngle+h.endAngle)/2,k=Math.cos(P),N=Math.sin(P);e=h.cx,n=h.cy;var O="inside"===x||"inner"===x;if("center"===x)C=h.cx,T=h.cy,L="center";else{var R=(O?(h.r+h.r0)/2*k:h.r*k)+e,V=(O?(h.r+h.r0)/2*N:h.r*N)+n;if(C=R+3*k,T=V+3*N,!O){var z=R+k*(I+l-h.r),E=V+N*(I+l-h.r),B=z+(k<0?-1:1)*A;C="edge"===b?k<0?d+S:d+c-S:B+(k<0?-_:_),T=E,D=[[R,V],[z,E],[B,E]]}L=O?"center":"edge"===b?k>0?"right":"left":k>0?"left":"right"}var G=Math.PI,W=0,F=v.get("rotate");if(m(F))W=F*(G/180);else if("center"===x)W=0;else if("radial"===F||!0===F){W=k<0?-P+G:-P}else if("tangential"===F&&"outside"!==x&&"outer"!==x){var H=Math.atan2(k,N);H<0&&(H=2*G+H),N>0&&(H=G+H),W=H-G}if(r=!!W,p.x=C,p.y=T,p.rotation=W,p.setStyle({verticalAlign:"middle"}),O){p.setStyle({align:L});var Y=p.states.select;Y&&(Y.x+=p.x,Y.y+=p.y)}else{var X=p.getBoundingRect().clone();X.applyTransform(p.getComputedTransform());var Z=(p.style.margin||0)+2.1;X.y-=Z/2,X.height+=Z,o.push({label:p,labelLine:f,position:x,len:I,len2:A,minTurnAngle:M.get("minTurnAngle"),maxSurfaceAngle:M.get("maxSurfaceAngle"),surfaceNormal:new jt(k,N),linePoints:D,textAlign:L,labelDistance:_,labelAlignTo:b,edgeDistance:S,bleedMargin:w,rect:X,unconstrainedWidth:X.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:O})}})),!r&&t.get("avoidLabelOverlap")&&function(t,e,n,i,o,r,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<t.length;h++){var p=t[h].label;$s(t[h])||(p.x<e?(c=Math.min(c,p.x),l.push(t[h])):(d=Math.max(d,p.x),u.push(t[h])))}for(h=0;h<t.length;h++)if(!$s(y=t[h])&&y.linePoints){if(null!=y.labelStyleWidth)continue;p=y.label;var g=y.linePoints,f=void 0;f="edge"===y.labelAlignTo?p.x<e?g[2][0]-y.labelDistance-a-y.edgeDistance:a+o-y.edgeDistance-g[2][0]-y.labelDistance:"labelLine"===y.labelAlignTo?p.x<e?c-a-y.bleedMargin:a+o-d-y.bleedMargin:p.x<e?p.x-a-y.bleedMargin:a+o-p.x-y.bleedMargin,y.targetTextWidth=f,Js(y,f)}for(Ks(u,e,n,i,1,0,r,0,s,d),Ks(l,e,n,i,-1,0,r,0,s,c),h=0;h<t.length;h++){var y;if(!$s(y=t[h])&&y.linePoints){p=y.label,g=y.linePoints;var v="edge"===y.labelAlignTo,m=p.style.padding,x=m?m[1]+m[3]:0,_=p.style.backgroundColor?0:x,b=y.rect.width+_,S=g[1][0]-g[2][0];v?p.x<e?g[2][0]=a+y.edgeDistance+b+y.labelDistance:g[2][0]=a+o-y.edgeDistance-b-y.labelDistance:(p.x<e?g[2][0]=p.x+y.labelDistance:g[2][0]=p.x-y.labelDistance,g[1][0]=g[2][0]+S),g[1][1]=g[2][1]=p.y}}}(o,e,n,l,c,p,d,h);for(var f=0;f<o.length;f++){var y=o[f],v=y.label,x=y.labelLine,_=isNaN(v.x)||isNaN(v.y);if(v){v.setStyle({align:y.textAlign}),_&&(u(v.states,g),v.ignore=!0);var b=v.states.select;b&&(b.x+=v.x,b.y+=v.y)}if(x){var S=y.linePoints;_||!S?(u(x.states,g),x.ignore=!0):(qt(S,y.minTurnAngle),Kt(S,y.surfaceNormal,y.maxSurfaceAngle),x.setShape({points:S}),v.__hostTarget.textGuideLineConfig={anchor:new jt(S[0][0],S[0][1])})}}}var tl=function(t){function e(e,n,i){var o=t.call(this)||this;o.z2=2;var r=new Tt;return o.setTextContent(r),o.updateData(e,n,i,!0),o}return K(e,t),e.prototype.updateData=function(t,e,n,i){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=p(ws(a.getModel("itemStyle"),l,!0),l);if(isNaN(u.startAngle))o.setShape(u);else{if(i){o.setShape(u);var c=r.getShallow("animationType");r.ecModel.ssr?(at(o,{scaleX:0,scaleY:0},r,{dataIndex:e,isFrom:!0}),o.originX=u.cx,o.originY=u.cy):"scale"===c?(o.shape.r=l.r0,at(o,{shape:{r:l.r}},r,e)):null!=n?(o.setShape({startAngle:n,endAngle:n}),at(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,ot(o,{shape:{endAngle:l.endAngle}},r,e))}else rt(o),ot(o,{shape:u},r,e);o.useStyle(t.getItemVisual(e,"style")),Mt(o,a);var d=(l.startAngle+l.endAngle)/2,h=r.get("selectedOffset"),g=Math.cos(d)*h,f=Math.sin(d)*h,y=a.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=p({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},ws(s.getModel("itemStyle"),l)),p(o.ensureState("select"),{x:g,y:f,shape:ws(a.getModel(["select","itemStyle"]),l)}),p(o.ensureState("blur"),{shape:ws(a.getModel(["blur","itemStyle"]),l)});var v=o.getTextGuideLine(),m=o.getTextContent();v&&p(v.ensureState("select"),{x:g,y:f}),p(m.ensureState("select"),{x:g,y:f}),ct(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},e.prototype._updateLabel=function(t,e,n){var i=this,o=e.getItemModel(n),r=o.getModel("labelLine"),a=e.getItemVisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;ut(i,st(o),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:l,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});var u=i.getTextContent();i.setTextConfig({position:null,rotation:null}),u.attr({z2:10});var c=t.get(["label","position"]);if("outside"!==c&&"outer"!==c)i.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new $t,this.setTextGuideLine(d)),Qt(this,ee(o),{stroke:s,opacity:te(r.get(["lineStyle","opacity"]),l,1)})}},e}(bt);const el=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return K(e,t),e.prototype.render=function(t,e,n,i){var o,r=t.getData(),a=this._data,s=this.group;if(!a&&r.count()>0){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<r.count();++u)l=r.getItemLayout(u);l&&(o=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===r.count()&&t.get("showEmptyCircle")){var c=new bt({shape:Zs(t,n)});c.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,s.add(c)}r.diff(a).add((function(t){var e=new tl(r,t,o);r.setItemGraphicEl(t,e),s.add(e)})).update((function(t,e){var n=a.getItemGraphicEl(e);n.updateData(r,t,o),n.off("click"),s.add(n),r.setItemGraphicEl(t,n)})).remove((function(e){var n=a.getItemGraphicEl(e);Et(n,t,e)})).execute(),Qs(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=r)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(i*i+o*o);return r<=n.r&&r>=n.r0}},e.type="pie",e}(At);function nl(t,e,n){e=X(e)&&{coordDimensions:e}||p({encodeDefine:t.getEncode()},e);var i=t.getSource(),o=ne(i,e).dimensions,r=new ie(o,t);return r.initData(i,n),r}const il=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}();var ol=le();const rl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new il(oe(this.getData,this),oe(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return nl(this,{coordDimensions:["value"],encodeDefaulter:Wt(re,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=ol(n),o=i.seats;if(!o){var r=[];n.each(n.mapDimension("value"),(function(t){r.push(t)})),o=i.seats=ae(r,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=o[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){se(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(tt);const al=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return K(e,t),e.prototype.getInitialData=function(t,e){return J(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(tt);var sl=function(){},ll=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return K(e,t),e.prototype.getDefaultShape=function(){return new sl},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,o=e.size,r=this.symbolProxy,a=r.shape,s=t.getContext?t.getContext():t,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n<i.length;){var c=i[n++],d=i[n++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-o[0]/2,a.y=d-o[1]/2,a.width=o[0],a.height=o[1],r.buildPath(t,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},e.prototype.afterBrush=function(){var t,e=this.shape,n=e.points,i=e.size,o=this._ctx,r=this.softClipShape;if(o){for(t=this._off;t<n.length;){var a=n[t++],s=n[t++];isNaN(a)||isNaN(s)||(r&&!r.contain(a,s)||o.fillRect(a-i[0]/2,s-i[1]/2,i[0],i[1]))}this.incremental&&(this._off=t,this.notClear=!0)}},e.prototype.findDataIndex=function(t,e){for(var n=this.shape,i=n.points,o=n.size,r=Math.max(o[0],4),a=Math.max(o[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+r&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,o=i[0],r=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c<n.length;){var d=n[c++],h=n[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(h,s),u=Math.max(h,u)}t=this._rect=new ce(a-o/2,s-r/2,l-a+o,u-s+r)}return t},e}(_);const ul=function(){function t(){this.group=new $}return t.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},t.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e),t.reset()}))},t.prototype.incrementalPrepareUpdate=function(t){this._clear()},t.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],o=e.getLayout("points"),r=i&&i.shape.points;if(r&&r.length<2e4){var a=r.length,s=new Float32Array(a+o.length);s.set(r),s.set(o,a),i.endIndex=t.end,i.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=t.start,l.endIndex=t.end,l.incremental=!0,l.setShape({points:o}),this._setCommon(l,e,n)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new ll({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=Q(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]<4;t.useStyle(i.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("style"),s=a&&a.fill;s&&t.setColor(s);var l=dt(t);l.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){l.dataIndex=null;var n=t.hoverDataIdx;n>=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const cl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=hs("").reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new ul:new Ba,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(At);const dl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(de);var hl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",he).models[0]},e.type="cartesian2dAxis",e}(de);pe(hl,ge);var pl={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},gl=fe({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},pl),fl=fe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},pl);const yl={category:gl,value:fl,time:fe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},fl),log:wt({logBase:10},fl)};var vl={value:1,category:1,time:1,log:1};function ml(t,e,n,i){u(vl,(function(o,r){var a=fe(fe({},yl[r],!0),i,!0),s=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+r,n}return K(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=ye(this),i=n?ve(t):{},o=e.getTheme();fe(t,o.get(r+"Axis")),fe(t,this.getDefaultOption()),t.type=xl(t),n&&me(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=xe.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+r,n.defaultOption=a,n}(n);t.registerComponentModel(s)})),t.registerSubTypeDefaulter(e+"Axis",xl)}function xl(t){return t.type||(t.data?"category":"value")}var _l=["x","y"];function bl(t){return"interval"===t.type||"time"===t.type}var Sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=_l,e}return K(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(bl(t)&&bl(e)){var n=t.getExtent(),i=e.getExtent(),o=this.dataToPoint([n[0],i[0]]),r=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(r[0]-o[0])/a,u=(r[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-i[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=_e([],h)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),o=this.getArea(),r=new ce(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(r)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return be(n,t,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(o,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return be(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=o.coordToData(o.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,o=Math.min(n[0],n[1])-t,r=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-o+t;return new ce(i,o,r,a)},e}(Se);const wl=function(t){function e(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return K(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(we);function Ml(t,e,n){n=n||{};var i=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,g="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var f=a.toGlobalCoord(a.dataToCoord(0));g[h.onZero]=Math.max(Math.min(f,g[1]),g[0])}r.position=["y"===u?g[h[l]]:d[0],"x"===u?g[h[l]]:d[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?g[h[s]]-g[h.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Me(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var y=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-y:y,r.z2=1,r}function Il(t){return"cartesian2d"===t.get("coordinateSystem")}function Al(t){var e={xAxisModel:null,yAxisModel:null};return u(e,(function(n,i){var o=i.replace(/Model$/,""),r=t.getReferringComponents(o,he).models[0];e[i]=r})),e}var Cl=Math.log;function Tl(t,e,n){var i=Ie.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,!0),a=o.length-1,s=i.getInterval.call(n),l=Ae(t,e),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===t.type){var h=Cl(t.base);u=[Cl(u[0])/h,Cl(u[1])/h]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=i.getExtent.call(t);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var g=i.getInterval.call(t),f=u[0],y=u[1];if(c&&d)g=(y-f)/a;else if(c)for(y=u[0]+g*a;y<u[1]&&isFinite(y)&&isFinite(u[1]);)g=Ce(g),y=u[0]+g*a;else if(d)for(f=u[1]-g*a;f>u[0]&&isFinite(f)&&isFinite(u[0]);)g=Ce(g),f=u[1]-g*a;else{t.getTicks().length-1>a&&(g=Ce(g));var v=g*a;y=Math.ceil(u[1]/g)*g,(f=_t(y-v))<0&&u[0]>=0?(f=0,y=_t(v)):y>0&&u[1]<=0&&(y=0,f=-_t(v))}var m=(o[0].value-r[0].value)/s,x=(o[a].value-r[a].value)/s;i.setExtent.call(t,f+g*m,y+g*x),i.setInterval.call(t,g),(m||x)&&i.setNiceExtent.call(t,f+g,y-g)}var Dl=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_l,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=a(t),i=n.length;if(i){for(var o=[],r=i-1;r>=0;r--){var s=t[+n[r]],l=s.model,c=s.scale;Ne(c)&&l.get("alignTicks")&&null==l.get("interval")?o.push(s):(Oe(c,l),Ne(c)&&(e=s))}o.length&&(e||(e=o.pop(),Oe(e.scale,e.model)),u(o,(function(t){Tl(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var o={};u(n.x,(function(t){Pl(n,"y",t,o)})),u(n.y,(function(t){Pl(n,"x",t,o)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),r=Zt(i,{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;function s(){u(a,(function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?r.x:r.y)}))}s(),o&&(u(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=Te(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}})),s()),u(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}Z(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",he).models[0],r=t.yAxisModel||i&&i.getReferringComponents("yAxis",he).models[0],a=t.gridModel,s=this._coordsList;if(i)e=i.coordinateSystem,De(s,e)<0&&(e=null);else if(o&&r)e=this.getCartesian(o.componentIndex,r.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(a){a.coordinateSystem===this&&(e=this._coordsList[0])}return{cartesian:e,axis:n}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,n){var i=this,o=this,r={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(e.eachComponent("xAxis",l("x"),this),e.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(e){return function(n,i){if(Ll(n,t)){var l=n.get("position");"x"===e?"top"!==l&&"bottom"!==l&&(l=r.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=r.left?"right":"left"),r[l]=!0;var u=new wl(e,Le(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=o,u.index=i,o._axesList.push(u),a[e][i]=u,s[e]++}}}this._axesMap=a,u(a.x,(function(e,n){u(a.y,(function(o,r){var a="x"+n+"y"+r,s=new Sl(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(e),s.addAxis(o)}))}))},t.prototype._updateScale=function(t,e){function n(t,e){u(Pe(t,e.dim),(function(n){e.scale.unionExtentFromData(t,n)}))}u(this._axesList,(function(t){if(t.scale.setExtent(1/0,-1/0),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setSortInfo(e)}})),t.eachSeries((function(t){if(Il(t)){var i=Al(t),o=i.xAxisModel,r=i.yAxisModel;if(!Ll(o,e)||!Ll(r,e))return;var a=this.getCartesian(o.componentIndex,r.componentIndex),s=t.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}}),this)},t.prototype.getTooltipAxes=function(t){var e=[],n=[];return u(this.getCartesians(),(function(i){var o=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),r=i.getOtherAxis(o);De(e,o)<0&&e.push(o),De(n,r)<0&&n.push(r)})),{baseAxes:e,otherAxes:n}},t.create=function(e,n){var i=[];return e.eachComponent("grid",(function(o,r){var a=new t(o,e,n);a.name="grid_"+r,a.resize(o,n,!0),o.coordinateSystem=a,i.push(a)})),e.eachSeries((function(t){if(Il(t)){var e=Al(t),n=e.xAxisModel,i=e.yAxisModel,o=n.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(n.componentIndex,i.componentIndex)}})),i},t.dimensions=_l,t}();function Ll(t,e){return t.getCoordSysModel()===e}function Pl(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)kl(r[l])&&(o=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&kl(r[u])&&!i[c(r[u])]){o=r[u];break}o&&(i[c(o)]=!0)}function c(t){return t.dim+"_"+t.index}}function kl(t){return t&&"category"!==t.type&&"time"!==t.type&&ke(t)}const Nl=Dl;var Ol=Math.PI,Rl=function(){function t(t,e){this.group=new $,this.opt=e,this.axisModel=t,wt(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new $({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!Vl[t]},t.prototype.add=function(t){Vl[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,o,r=Ze(e-t);return Ue(r)?(o=n>0?"top":"bottom",i="center"):Ue(r-Ol)?(o=n>0?"bottom":"top",i="center"):(o="middle",i=r>0&&r<Ol?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:o}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),Vl={axisLine:function(t,e,n,i){var o=e.get(["axisLine","show"]);if("auto"===o&&t.handleAutoShown&&(o=t.handleAutoShown("axisLine")),o){var r=e.axis.getExtent(),a=i.transform,s=[r[0],0],l=[r[1],0],d=s[0]>l[0];a&&(be(s,s,a),be(l,l,a));var h=p({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),g=new Re({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Ve(g.shape,g.style.lineWidth),g.anid="line",n.add(g);var f=e.get(["axisLine","symbol"]);if(null!=f){var y=e.get(["axisLine","symbolSize"]);c(f)&&(f=[f,f]),(c(y)||m(y))&&(y=[y,y]);var v=lt(e.get(["axisLine","symbolOffset"])||0,y),x=y[0],_=y[1];u([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==f[i]&&null!=f[i]){var o=Q(f[i],-x/2,-_/2,x,_,h.stroke,!0),r=e.r+e.offset,a=d?l:s;o.attr({rotation:e.rotate,x:a[0]+r*Math.cos(t.rotation),y:a[1]-r*Math.sin(t.rotation),silent:!0,z2:11}),n.add(o)}}))}}},axisTickLabel:function(t,e,n,i){var o=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=r.getModel("lineStyle"),l=i.tickDirection*r.get("length"),u=Gl(o.getTicksCoords(),e.transform,l,wt(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)t.add(u[c]);return u}(n,i,e,t),a=function(t,e,n,i){var o=n.axis,r=Me(i.axisLabelShow,n.get(["axisLabel","show"]));if(!r||o.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=o.getViewLabels(),c=(Me(i.labelRotate,a.get("rotate"))||0)*Ol/180,d=Rl.innerTextLayout(i.rotation,c,i.labelDirection),h=n.getCategories&&n.getCategories(!0),p=[],g=Rl.isLabelSilent(n),f=n.get("triggerEvent");return u(l,(function(r,u){var c="ordinal"===o.scale.type?o.scale.getRawOrdinalNumber(r.tickValue):r.tickValue,y=r.formattedLabel,v=r.rawLabel,m=a;if(h&&h[c]){var x=h[c];Z(x)&&x.textStyle&&(m=new Xe(x.textStyle,a,n.ecModel))}var _=m.getTextColor()||n.get(["axisLine","lineStyle","color"]),b=o.dataToCoord(c),S=m.getShallow("align",!0)||d.textAlign,w=M(m.getShallow("alignMinLabel",!0),S),I=M(m.getShallow("alignMaxLabel",!0),S),A=m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||d.textVerticalAlign,C=M(m.getShallow("verticalAlignMinLabel",!0),A),T=M(m.getShallow("verticalAlignMaxLabel",!0),A),D=new Tt({x:b,y:i.labelOffset+i.labelDirection*s,rotation:d.rotation,silent:g,z2:10+(r.level||0),style:Be(m,{text:y,align:0===u?w:u===l.length-1?I:S,verticalAlign:0===u?C:u===l.length-1?T:A,fill:P(_)?_("category"===o.type?v:"value"===o.type?c+"":c,u):_})});if(D.anid="label_"+c,f){var L=Rl.makeAxisEventDataBase(n);L.targetType="axisLabel",L.value=v,L.tickIndex=u,"category"===o.type&&(L.dataIndex=c),dt(D).eventData=L}e.add(D),D.updateTransform(),p.push(D),t.add(D),D.decomposeTransform()})),p}(n,i,e,t);if(function(t,e,n){if(We(t.axis))return;var i=t.get(["axisLabel","showMinLabel"]),o=t.get(["axisLabel","showMaxLabel"]);e=e||[],n=n||[];var r=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===i?(zl(r),zl(u)):El(r,a)&&(i?(zl(a),zl(c)):(zl(r),zl(u)));!1===o?(zl(s),zl(d)):El(l,s)&&(o?(zl(l),zl(h)):(zl(s),zl(d)))}(e,a,o),function(t,e,n,i){var o=n.axis,r=n.getModel("minorTick");if(!r.get("show")||o.scale.isBlank())return;var a=o.getMinorTicksCoords();if(!a.length)return;for(var s=r.getModel("lineStyle"),l=i*r.get("length"),u=wt(s.getLineStyle(),wt(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=Gl(a[c],e.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)t.add(d[h])}(n,i,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var s=ze(r(a,(function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}})));Ee(s)}},axisName:function(t,e,n,i){var o=Me(t.axisName,e.get("name"));if(o){var r,a,s=e.get("nameLocation"),l=t.nameDirection,u=e.getModel("nameTextStyle"),c=e.get("nameGap")||0,d=e.axis.getExtent(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,Bl(s)?t.labelOffset+l*c:0],g=e.get("nameRotate");null!=g&&(g=g*Ol/180),Bl(s)?r=Rl.innerTextLayout(t.rotation,null!=g?g:t.rotation,l):(r=function(t,e,n,i){var o,r,a=Ze(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;Ue(a-Ol/2)?(r=l?"bottom":"top",o="center"):Ue(a-1.5*Ol)?(r=l?"top":"bottom",o="center"):(r="middle",o=a<1.5*Ol&&a>Ol/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:r}}(t.rotation,s,g||0,d),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var f=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=Me(t.nameTruncateMaxWidth,y.maxWidth,a),x=new Tt({x:p[0],y:p[1],rotation:r.rotation,silent:Rl.isLabelSilent(e),style:Be(u,{text:o,font:f,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||r.textAlign,verticalAlign:u.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(Ge({el:x,componentModel:e,itemName:o}),x.__fullText=o,x.anid="name",e.get("triggerEvent")){var _=Rl.makeAxisEventDataBase(e);_.targetType="axisName",_.name=o,dt(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function zl(t){t&&(t.ignore=!0)}function El(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=Fe([]);return He(o,o,-t.rotation),n.applyTransform(Ye([],o,t.getLocalTransform())),i.applyTransform(Ye([],o,e.getLocalTransform())),n.intersect(i)}}function Bl(t){return"middle"===t||"center"===t}function Gl(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,e&&(be(a,a,e),be(s,s,e));var c=new Re({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});Ve(c.shape,c.style.lineWidth),c.anid=o+"_"+t[l].tickValue,r.push(c)}return r}const Wl=Rl;function Fl(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var i=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),r=o.get("link",!0)||[],a=[];u(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=Zl(n.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=n;var c=n.model.getModel("tooltip",i);if(u(n.getAxes(),Wt(g,!1,null)),n.getTooltipAxes&&i&&c.get("show")){var d="axis"===c.get("trigger"),h="cross"===c.get(["axisPointer","type"]),p=n.getTooltipAxes(c.get(["axisPointer","axis"]));(d||h)&&u(p.baseAxes,Wt(g,!h||"cross",d)),h&&u(p.otherAxes,Wt(g,"cross",!1))}}function g(i,s,d){var h=d.model.getModel("axisPointer",o),p=h.get("show");if(p&&("auto"!==p||i||Xl(h))){null==s&&(s=h.get("triggerTooltip")),h=i?function(t,e,n,i,o,r){var a=e.getModel("axisPointer"),s={};u(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=L(a.get(t))})),s.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var c=a.get(["label","show"]);if(l.show=null==c||c,!r){var d=s.lineStyle=a.get("crossStyle");d&&wt(l,d.textStyle)}}return t.model.getModel("axisPointer",new Xe(s,n,i))}(d,c,o,e,i,s):h;var g=h.get("snap"),f=h.get("triggerEmphasis"),y=Zl(d.model),v=s||g||"category"===d.type,m=t.axesInfo[y]={key:y,axis:d,coordSys:n,axisPointerModel:h,triggerTooltip:s,triggerEmphasis:f,involveSeries:v,snap:g,useHandle:Xl(h),seriesModels:[],linkGroup:null};l[y]=m,t.seriesInvolved=t.seriesInvolved||v;var x=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(Hl(r[i+"AxisId"],n.id)||Hl(r[i+"AxisIndex"],n.componentIndex)||Hl(r[i+"AxisName"],n.name))return o}}(r,d);if(null!=x){var _=a[x]||(a[x]={axesInfo:{}});_.axesInfo[y]=m,_.mapper=r[x].mapper,m.linkGroup=_}}}}))}(n,t,e),n.seriesInvolved&&function(t,e){e.eachSeries((function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),o=e.get(["tooltip","show"],!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==o&&!1!==e.get(["axisPointer","show"],!0)&&u(t.coordSysAxesInfo[Zl(n.model)],(function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}))}(n,t),n}function Hl(t,e){return"all"===t||X(t)&&De(t,e)>=0||t===e}function Yl(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Zl(t)]}function Xl(t){return!!t.get(["handle","show"])}function Zl(t){return t.type+"||"+t.id}var Ul={};const jl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&function(t){var e=Yl(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,o=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=Xl(n);null==r&&(o.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var r=function(t){var e=Yl(t);return e&&e.axisPointerModel}(t);r?(this._axisPointer||(this._axisPointer=new o)).render(t,r,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){Ul[t]=e},e.getAxisPointerClass=function(t){return t&&Ul[t]},e.type="axis",e}(je);var ql=le();function Kl(t,e,n,i){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitArea"),a=r.getModel("areaStyle"),s=a.get("color"),l=i.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=s.length,d=ql(t).splitAreaColors,h=qe(),p=0;if(d)for(var g=0;g<u.length;g++){var f=d.get(u[g].tickValue);if(null!=f){p=(f+(c-1)*g)%c;break}}var y=o.toGlobalCoord(u[0].coord),v=a.getAreaStyle();s=X(s)?s:[s];for(g=1;g<u.length;g++){var m=o.toGlobalCoord(u[g].coord),x=void 0,_=void 0,b=void 0,S=void 0;o.isHorizontal()?(x=y,_=l.y,b=m-x,S=l.height,y=x+b):(x=l.x,_=y,b=l.width,y=_+(S=m-_));var w=u[g-1].tickValue;null!=w&&h.set(w,p),e.add(new xt({anid:null!=w?"area_"+w:null,shape:{x:x,y:_,width:b,height:S},style:wt({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%c}ql(t).splitAreaColors=h}}}function Jl(t){ql(t).splitAreaColors=null}var $l=["axisLine","axisTickLabel","axisName"],Ql=["splitArea","splitLine","minorSplitLine"],tu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return K(e,t),e.prototype.render=function(e,n,i,o){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new $,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),s=Ml(a,e),l=new Wl(e,p({handleAutoShown:function(t){for(var n=a.coordinateSystem.getCartesians(),i=0;i<n.length;i++)if(Ne(n[i].getOtherAxis(e.axis).scale))return!0;return!1}},s));u($l,l.add,l),this._axisGroup.add(l.getGroup()),u(Ql,(function(t){e.get([t,"show"])&&eu[t](this,this._axisGroup,e,a)}),this),o&&"changeAxisOrder"===o.type&&o.isInitSort||Ke(r,this._axisGroup,e),t.prototype.render.call(this,e,n,i,o)}},e.prototype.remove=function(){Jl(this)},e.type="cartesianAxis",e}(jl),eu={splitLine:function(t,e,n,i){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=X(s)?s:[s];for(var l=i.coordinateSystem.getRect(),u=o.isHorizontal(),c=0,d=o.getTicksCoords({tickModel:r}),h=[],p=[],g=a.getLineStyle(),f=0;f<d.length;f++){var y=o.toGlobalCoord(d[f].coord);u?(h[0]=y,h[1]=l.y,p[0]=y,p[1]=l.y+l.height):(h[0]=l.x,h[1]=y,p[0]=l.x+l.width,p[1]=y);var v=c++%s.length,m=d[f].tickValue,x=new Re({anid:null!=m?"line_"+d[f].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:wt({stroke:s[v]},g),silent:!0});Ve(x.shape,g.lineWidth),e.add(x)}}},minorSplitLine:function(t,e,n,i){var o=n.axis,r=n.getModel("minorSplitLine").getModel("lineStyle"),a=i.coordinateSystem.getRect(),s=o.isHorizontal(),l=o.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=r.getLineStyle(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var g=o.toGlobalCoord(l[h][p].coord);s?(u[0]=g,u[1]=a.y,c[0]=g,c[1]=a.y+a.height):(u[0]=a.x,u[1]=g,c[0]=a.x+a.width,c[1]=g);var f=new Re({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});Ve(f.shape,d.lineWidth),e.add(f)}},splitArea:function(t,e,n,i){Kl(t,e,n,i)}},nu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="xAxis",e}(tu),iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=nu.type,e}return K(e,t),e.type="yAxis",e}(tu),ou=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return K(e,t),e.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new xt({shape:t.coordinateSystem.getRect(),style:wt({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(je),ru={offset:0};function au(t){t.registerComponentView(ou),t.registerComponentModel(dl),t.registerCoordinateSystem("cartesian2d",Nl),ml(t,"x",hl,ru),ml(t,"y",hl,ru),t.registerComponentView(nu),t.registerComponentView(iu),t.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}))}function su(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){var o=i.getIndicatorAxes();u(o,(function(t,r){e.each(e.mapDimension(o[r].dim),(function(t,e){n[e]=n[e]||[];var o=i.dataToPoint(t,r);n[e][r]=lu(o)?o:uu(i)}))})),e.each((function(t){var o=$e(n[t],(function(t){return lu(t)}))||uu(i);n[t].push(o.slice()),e.setItemLayout(t,n[t])}))}}))}function lu(t){return!isNaN(t[0])&&!isNaN(t[1])}function uu(t){return[t.cx,t.cy]}function cu(t){var e=t.polar;if(e){X(e)||(e=[e]);var n=[];u(e,(function(e,i){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],X(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):n.push(e)})),t.polar=n}u(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))}var du=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return K(n,t),n.prototype.render=function(t,n,i){var o=t.coordinateSystem,a=this.group,s=t.getData(),l=this._data;function c(t,e){var n=t.getItemVisual(e,"symbol")||"circle";if("none"!==n){var i=pt(t.getItemVisual(e,"symbolSize")),o=Q(n,-1,-1,2,2),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:i[0]/2,scaleY:i[1]/2,rotation:r*Math.PI/180||0}),o}}function d(e,n,i,o,r,a){i.removeAll();for(var s=0;s<n.length-1;s++){var l=c(o,r);l&&(l.__dimIdx=s,e[s]?(l.setPosition(e[s]),tn[a?"initProps":"updateProps"](l,{x:n[s][0],y:n[s][1]},t,r)):l.setPosition(n[s]),i.add(l))}}function h(t){return r(t,(function(t){return[o.cx,o.cy]}))}s.diff(l).add((function(e){var n=s.getItemLayout(e);if(n){var i=new Qe,o=new $t,r={shape:{points:n}};i.shape.points=h(n),o.shape.points=h(n),at(i,r,t,e),at(o,r,t,e);var a=new $,l=new $;a.add(o),a.add(i),a.add(l),d(o.shape.points,n,l,s,e,!0),s.setItemGraphicEl(e,a)}})).update((function(e,n){var i=l.getItemGraphicEl(n),o=i.childAt(0),r=i.childAt(1),a=i.childAt(2),u={shape:{points:s.getItemLayout(e)}};u.shape.points&&(d(o.shape.points,u.shape.points,a,s,e,!1),rt(r),rt(o),ot(o,u,t),ot(r,u,t),s.setItemGraphicEl(e,i))})).remove((function(t){a.remove(l.getItemGraphicEl(t))})).execute(),s.eachItemGraphicEl((function(t,n){var i=s.getItemModel(n),o=t.childAt(0),r=t.childAt(1),l=t.childAt(2),c=s.getItemVisual(n,"style"),d=c.fill;a.add(t),o.useStyle(wt(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:d})),Mt(o,i,"lineStyle"),Mt(r,i,"areaStyle");var h=i.getModel("areaStyle"),g=h.isEmpty()&&h.parentModel.isEmpty();r.ignore=g,u(["emphasis","select","blur"],(function(t){var e=i.getModel([t,"areaStyle"]),n=e.isEmpty()&&e.parentModel.isEmpty();r.ensureState(t).ignore=n&&g})),r.useStyle(wt(h.getAreaStyle(),{fill:d,opacity:.7,decal:c.decal}));var f=i.getModel("emphasis"),y=f.getModel("itemStyle").getItemStyle();l.eachChild((function(t){if(t instanceof e){var o=t.style;t.useStyle(p({image:o.image,x:o.x,y:o.y,width:o.width,height:o.height},c))}else t.useStyle(c),t.setColor(d),t.style.strokeNoScale=!0;t.ensureState("emphasis").style=L(y);var r=s.getStore().get(s.getDimensionIndex(t.__dimIdx),n);(null==r||isNaN(r))&&(r=""),ut(t,st(i),{labelFetcher:s.hostModel,labelDataIndex:n,labelDimIndex:t.__dimIdx,defaultText:r,inheritColor:d,defaultOpacity:c.opacity})})),ct(t,f.get("focus"),f.get("blurScope"),f.get("disabled"))})),this._data=s},n.prototype.remove=function(){this.group.removeAll(),this._data=null},n.type="radar",n}(At);const hu=du;var pu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return K(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new il(oe(this.getData,this),oe(this.getRawData,this))},e.prototype.getInitialData=function(t,e){return nl(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),a=this.getData().getName(t),s=""===a?this.name:a,l=en(this,t);return nn("section",{header:s,sortBlocks:!0,blocks:r(o,(function(e){var n=i.get(i.mapDimension(e.dim),t);return nn("nameValue",{markerType:"subItem",markerColor:l,name:e.name,value:n,sortParam:n})}))})},e.prototype.getTooltipPosition=function(t){if(null!=t)for(var e=this.getData(),n=this.coordinateSystem,i=e.getValues(r(n.dimensions,(function(t){return e.mapDimension(t)})),t),o=0,a=i.length;o<a;o++)if(!isNaN(i[o])){var s=n.getIndicatorAxes();return n.coordToPoint(s[o].dataToCoord(i[o]),o)}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(tt);const gu=pu;var fu=yl.value;function yu(t,e){return wt({show:e},t)}const vu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),a=this.get("axisLabel"),s=this.get("axisName"),l=this.get(["axisName","show"]),u=this.get(["axisName","formatter"]),d=this.get("axisNameGap"),h=this.get("triggerEvent"),p=r(this.get("indicator")||[],(function(r){null!=r.max&&r.max>0&&!r.min?r.min=0:null!=r.min&&r.min<0&&!r.max&&(r.max=0);var p=s;null!=r.color&&(p=wt({color:r.color},s));var g=fe(L(r),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:o,axisLabel:a,name:r.text,showName:l,nameLocation:"end",nameGap:d,nameTextStyle:p,triggerEvent:h},!1);if(c(u)){var f=g.name;g.name=u.replace("{value}",null!=f?f:"")}else P(u)&&(g.name=u(g.name,g));var y=new Xe(g,null,this.ecModel);return pe(y,ge.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y}),this);this._indicatorModels=p},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:fe({lineStyle:{color:"#bbb"}},fu.axisLine),axisLabel:yu(fu.axisLabel,!1),axisTick:yu(fu.axisTick,!1),splitLine:yu(fu.splitLine,!0),splitArea:yu(fu.splitArea,!0),indicator:[]},e}(de);var mu=["axisLine","axisTickLabel","axisName"],xu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=r(n,(function(t){var n=t.model.get("showName")?t.name:"";return new Wl(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));u(i,(function(t){u(mu,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),s=o.getModel("lineStyle"),l=a.getModel("areaStyle"),c=o.get("show"),d=a.get("show"),h=s.get("color"),p=l.get("color"),g=X(h)?h:[h],f=X(p)?p:[p],y=[],v=[];if("circle"===i)for(var m=n[0].getTicksCoords(),x=e.cx,_=e.cy,b=0;b<m.length;b++){if(c)y[D(y,g,b)].push(new on({shape:{cx:x,cy:_,r:m[b].coord}}));if(d&&b<m.length-1)v[D(v,f,b)].push(new rn({shape:{cx:x,cy:_,r0:m[b].coord,r:m[b+1].coord}}))}else{var S,w=r(n,(function(t,n){var i=t.getTicksCoords();return S=null==S?i.length-1:Math.min(i.length-1,S),r(i,(function(t){return e.coordToPoint(t.coord,n)}))})),M=[];for(b=0;b<=S;b++){for(var I=[],A=0;A<n.length;A++)I.push(w[A][b]);if(I[0]&&I.push(I[0].slice()),c)y[D(y,g,b)].push(new $t({shape:{points:I}}));if(d&&M)v[D(v,f,b-1)].push(new Qe({shape:{points:I.concat(M)}}));M=I.slice().reverse()}}var C=s.getLineStyle(),T=l.getAreaStyle();u(v,(function(t,e){this.group.add(an(t,{style:wt({stroke:"none",fill:f[e%f.length]},T),silent:!0}))}),this),u(y,(function(t,e){this.group.add(an(t,{style:wt({fill:"none",stroke:g[e%g.length]},C),silent:!0}))}),this)}function D(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}},e.type="radar",e}(je);const _u=xu;const bu=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.type="value",o.angle=0,o.name="",o}return K(e,t),e}(we);var Su=function(){function t(t,e,n){this.dimensions=[],this._model=t,this._indicatorAxes=r(t.getIndicatorModels(),(function(t,e){var n="indicator_"+e,i=new bu(n,new Ie);return i.name=t.get("name"),i.model=t,t.axis=i,this.dimensions.push(n),i}),this),this.resize(t,n)}return t.prototype.getIndicatorAxes=function(){return this._indicatorAxes},t.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},t.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},t.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var o,r=Math.atan2(-n,e),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<a&&(o=u,s=l,a=c)}return[s,+(o&&o.coordToData(i))]},t.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),r=Math.min(i,o)/2;this.cx=Ut(n[0],i),this.cy=Ut(n[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var a=t.get("radius");(c(a)||m(a))&&(a=[0,a]),this.r0=Ut(a[0],r),this.r=Ut(a[1],r),u(this._indicatorAxes,(function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),t.angle=n}),this)},t.prototype.update=function(t,e){var n=this._indicatorAxes,i=this._model;u(n,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(e,o){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===i){var r=e.getData();u(n,(function(t){t.scale.unionExtentFromData(r,r.mapDimension(t.dim))}))}}),this);var o=i.get("splitNumber"),r=new Ie;r.setExtent(0,o),r.setInterval(1),u(n,(function(t,e){Tl(t.scale,t.model,r)}))},t.prototype.convertToPixel=function(t,e,n){return null},t.prototype.convertFromPixel=function(t,e,n){return null},t.prototype.containPoint=function(t){return!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",(function(o){var r=new t(o,e,n);i.push(r),o.coordinateSystem=r})),e.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},t.dimensions=[],t}();const wu=Su;function Mu(t){t.registerCoordinateSystem("radar",wu),t.registerComponentModel(vu),t.registerComponentView(_u),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each((function(t){e.setItemVisual(t,"legendIcon","roundRect")})),e.setVisual("legendIcon","roundRect")}})}var Iu="\0_ec_interaction_mutex";function Au(t,e){return!!Cu(t)[e]}function Cu(t){return t[Iu]||(t[Iu]={})}function Tu(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(un(i.event),Du(t,e,n,i,o))}function Du(t,e,n,i,o){o.isAvailableBehavior=oe(Lu,null,n,i),t.trigger(e,o)}function Lu(t,e,n){var i=n[t];return!t||i&&(!c(i)||e.event[i+"Key"])}sn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},q);const Pu=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=oe(n._mousedownHandler,n),o=oe(n._mousemoveHandler,n),r=oe(n._mouseupHandler,n),a=oe(n._mousewheelHandler,n),s=oe(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=wt(L(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",o),e.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",o),e.off("mouseup",r),e.off("mousewheel",a),e.off("pinch",s)},n}return K(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!ln(t)){for(var e=t.target;e;){if(e.draggable)return;e=e.__hostTarget||e.parent}var n=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&Lu("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!Au(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,o=this._y,r=e-i,a=n-o;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&un(t.event),Du(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:i,oldY:o,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){ln(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=Lu("zoomOnMouseWheel",t,this._opt),n=Lu("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),r=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=o>3?1.4:o>1?1.2:1.1;Tu(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);Tu(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){Au(this._zr,"globalPan")||Tu(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(cn);function ku(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function Nu(t,e,n,i){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,r){var s=r.min||0,l=r.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,o.x-=(n-o.x)*(u-1),o.y-=(i-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var Ou,Ru={axisPointer:1,tooltip:1,brush:1};function Vu(t,e,n){var i=e.getComponentByElement(t.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!Ru.hasOwnProperty(i.mainType)&&o&&o.model!==n}function zu(t){c(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var Eu={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Bu=a(Eu),Gu={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Wu=a(Gu),Fu=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=zu(t);this._defsUsePending=[];var i=new $;this._root=i;var o=[],r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),ju(n,i,null,!0,!1);for(var l,u,c=n.firstChild;c;)this._parseNode(c,i,o,null,!1,!1),c=c.nextSibling;if(function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i[0].style[i[1]]=t[i[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],r){var d=$u(r);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=ic(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var h=i;(i=new $).add(h),h.scaleX=h.scaleY=u.scale,h.x=u.x,h.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new xt({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:o}},t.prototype._parseNode=function(t,e,n,i,o,r){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(o=!0),"text"===s&&(r=!0),"defs"===s||"switch"===s)a=e;else{if(!o){var u=Ou[s];if(u&&dn(Ou,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(d),"g"===s&&(l=d)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var h=Hu[s];if(h&&dn(Hu,s)){var p=h.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=p)}}if(a&&a.isGroup)for(var f=t.firstChild;f;)1===f.nodeType?this._parseNode(f,a,n,l,o,r):3===f.nodeType&&r&&this._parseText(f,a),f=f.nextSibling},t.prototype._parseText=function(t,e){var n=new b({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Zu(e,n),ju(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,o=i;i&&"auto"!==i?"baseline"===i?o="alphabetic":"before-edge"===i||"text-before-edge"===i?o="top":"after-edge"===i||"text-after-edge"===i?o="bottom":"central"!==i&&"mathematical"!==i||(o="middle"):o="alphabetic",t.style.textBaseline=o}var r=e.__inheritedStyle;if(r){var a=r.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,o=i.fontSize;o&&o<9&&(i.fontSize=9,n.scaleX*=o/9,n.scaleY*=o/9);var r=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=r;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(Ou={g:function(t,e){var n=new $;return Zu(e,n),ju(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new xt;return Zu(e,n),ju(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new on;return Zu(e,n),ju(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new Re;return Zu(e,n),ju(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new hn;return Zu(e,n),ju(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=Uu(i));var o=new Qe({shape:{points:n||[]},silent:!0});return Zu(e,o),ju(t,o,this._defsUsePending,!1,!1),o},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=Uu(i));var o=new $t({shape:{points:n||[]},silent:!0});return Zu(e,o),ju(t,o,this._defsUsePending,!1,!1),o},image:function(t,n){var i=new e;return Zu(n,i),ju(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(r);var a=new $;return Zu(e,a),ju(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0",a=new $;return Zu(e,a),ju(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(r),a},path:function(t,e){var n=t.getAttribute("d")||"",i=pn(n);return Zu(e,i),ju(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),Hu={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),r=new Pt(e,n,i,o);return Yu(t,r),Xu(t,r),r},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),o=new gn(e,n,i);return Yu(t,o),Xu(t,o),o}};function Yu(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function Xu(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),o=void 0;o=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r={};nc(n,r,r);var a=r.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:o,color:a})}n=n.nextSibling}}function Zu(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),wt(e.__inheritedStyle,t.__inheritedStyle))}function Uu(t){for(var e=$u(t),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),r=parseFloat(e[i+1]);n.push([o,r])}return n}function ju(t,e,n,i,o){var a=e,s=a.__inheritedStyle=a.__inheritedStyle||{},l={};1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=[],o=null;n.replace(Qu,(function(t,e,n){return i.push(e,n),""}));for(var r=i.length-1;r>0;r-=2){var a=i[r],s=i[r-1],l=$u(a);switch(o=o||mn(),s){case"translate":vn(o,o,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":yn(o,o,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":He(o,o,-parseFloat(l[0])*tc,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*tc);Ye(o,[1,0,u,1,0,0],o);break;case"skewY":var c=Math.tan(parseFloat(l[0])*tc);Ye(o,[1,c,0,1,0,0],o);break;case"matrix":o[0]=parseFloat(l[0]),o[1]=parseFloat(l[1]),o[2]=parseFloat(l[2]),o[3]=parseFloat(l[3]),o[4]=parseFloat(l[4]),o[5]=parseFloat(l[5])}}e.setLocalTransform(o)}}(t,e),nc(t,s,l),i||function(t,e,n){for(var i=0;i<Bu.length;i++){var o=Bu[i];null!=(r=t.getAttribute(o))&&(e[Eu[o]]=r)}for(i=0;i<Wu.length;i++){var r;o=Wu[i];null!=(r=t.getAttribute(o))&&(n[Gu[o]]=r)}}(t,s,l)),a.style=a.style||{},null!=s.fill&&(a.style.fill=Ku(a,"fill",s.fill,n)),null!=s.stroke&&(a.style.stroke=Ku(a,"stroke",s.stroke,n)),u(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=s[t]&&(a.style[t]=parseFloat(s[t]))})),u(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],(function(t){null!=s[t]&&(a.style[t]=s[t])})),o&&(a.__selfStyle=l),s.lineDash&&(a.style.lineDash=r($u(s.lineDash),(function(t){return parseFloat(t)}))),"hidden"!==s.visibility&&"collapse"!==s.visibility||(a.invisible=!0),"none"===s.display&&(a.ignore=!0)}var qu=/^url\(\s*#(.*?)\)/;function Ku(t,e,n,i){var o=n&&n.match(qu);if(!o)return"none"===n&&(n=null),n;var r=fn(o[1]);i.push([t,e,r])}var Ju=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function $u(t){return t.match(Ju)||[]}var Qu=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,tc=Math.PI/180;var ec=/([^\s:;]+)\s*:\s*([^:;]+)/g;function nc(t,e,n){var i,o=t.getAttribute("style");if(o)for(ec.lastIndex=0;null!=(i=ec.exec(o));){var r=i[1],a=dn(Eu,r)?Eu[r]:null;a&&(e[a]=i[2]);var s=dn(Gu,r)?Gu[r]:null;s&&(n[s]=i[2])}}function ic(t,e){var n=e.width/t.width,i=e.height/t.height,o=Math.min(n,i);return{scale:o,x:-(t.x+t.width/2)*o+(e.x+e.width/2),y:-(t.y+t.height/2)*o+(e.y+e.height/2)}}var oc=qe(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),rc=function(){function t(t,e){this.type="geoSVG",this._usedGraphicMap=qe(),this._freedGraphics=[],this._mapName=t,this._parsedXML=zu(e)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=function(t){var e=[],n=qe();return u(t,(function(t){if(null==t.namedFrom){var i=new xn(t.name,t.el);e.push(i),n.set(t.name,i)}})),{regions:e,regionsMap:n}}(t.named),n=e.regions,i=e.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var e,n,i,o;try{n=(e=t&&(i=t,o={ignoreViewBox:!0,ignoreRootClip:!0},(new Fu).parse(i,o))||{}).root,T(null!=n)}catch(m){throw new Error("Invalid svg format\n"+m.message)}var r=new $;r.add(n),r.isGeoSVGGraphicRoot=!0;var a=e.width,s=e.height,l=e.viewBoxRect,c=this._boundingRect;if(!c){var d=void 0,h=void 0,p=void 0,g=void 0;if(null!=a?(d=0,p=a):l&&(d=l.x,p=l.width),null!=s?(h=0,g=s):l&&(h=l.y,g=l.height),null==d||null==h){var f=n.getBoundingRect();null==d&&(d=f.x,p=f.width),null==h&&(h=f.y,g=f.height)}c=this._boundingRect=new ce(d,h,p,g)}if(l){var y=ic(l,c);n.scaleX=n.scaleY=y.scale,n.x=y.x,n.y=y.y}r.setClipPath(new xt({shape:c.plain()}));var v=[];return u(e.named,(function(t){var e;null!=oc.get(t.svgNodeTagLower)&&(v.push(t),(e=t.el).silent=!1,e.isGroup&&e.traverse((function(t){t.silent=!1})))})),{root:r,boundingRect:c,named:v}},t.prototype.useGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,n),n)},t.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},t}();for(var ac=[126,25],sc="南海诸岛",lc=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],uc=0;uc<lc.length;uc++)for(var cc=0;cc<lc[uc].length;cc++)lc[uc][cc][0]/=10.5,lc[uc][cc][1]/=-14,lc[uc][cc][0]+=ac[0],lc[uc][cc][1]+=ac[1];var dc=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var hc=function(){function t(t,e,n){var i;this.type="geoJSON",this._parsedMap=qe(),this._mapName=t,this._specialAreas=n,this._geoJSON=c(i=e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(i):new Function("return ("+i+");")():i}return t.prototype.load=function(t,e){e=e||"name";var n=this._parsedMap.get(e);if(!n){var i=this._parseToRegions(e);n=this._parsedMap.set(e,{regions:i,boundingRect:pc(i)})}var o=qe(),r=[];return u(n.regions,(function(e){var n=e.name;t&&dn(t,n)&&(e=e.cloneShallow(n=t[n])),r.push(e),o.set(n,e)})),{regions:r,boundingRect:n.boundingRect||new ce(0,0,0,0),regionsMap:o}},t.prototype._parseToRegions=function(t){var e,n=this._mapName,i=this._geoJSON;try{e=i?bn(i,t):[]}catch(o){throw new Error("Invalid geoJson format\n"+o.message)}return function(t,e){if("china"===t){for(var n=0;n<e.length;n++)if(e[n].name===sc)return;e.push(new _n(sc,r(lc,(function(t){return{type:"polygon",exterior:t}})),ac))}}(n,e),u(e,(function(t){var e=t.name;Sn(n,t),function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:dc[0]})}(n,t);var i=this._specialAreas&&this._specialAreas[e];i&&t.transformTo(i.left,i.top,i.width,i.height)}),this),e},t.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},t}();function pc(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}var gc=qe();const fc=function(t,e,n){if(e.svg){var i=new rc(t,e.svg);gc.set(t,i)}else{var o=e.geoJson||e.geoJSON;o&&!e.features?n=e.specialAreas:o=e;i=new hc(t,o,n);gc.set(t,i)}},yc=function(t){return gc.get(t)},vc=function(t){var e=gc.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()},mc=function(t,e,n){var i=gc.get(t);if(i)return i.load(e,n)};var xc=["rect","circle","line","ellipse","polygon","polyline","path"],_c=qe(xc),bc=qe(xc.concat(["g"])),Sc=qe(xc.concat(["g"])),wc=le();function Mc(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function Ic(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Ac=function(){function t(t){var e=new $;this.uid=wn("ec_map_draw"),this._controller=new Pu(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new $),e.add(this._svgGroup=new $)}return t.prototype.draw=function(t,e,n,i,o){var r="geo"===t.mainType,a=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},(function(e){a||e.getHostGeoModel()!==t||(a=e.getData())}));var s=t.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),d=c.raw,h=c.roam;!l.childAt(0)||o?(u.x=h.x,u.y=h.y,u.scaleX=h.scaleX,u.scaleY=h.scaleY,u.dirty()):ot(u,h,t);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,g={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:r,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(g):"geoSVG"===s.resourceType&&this._buildSVG(g),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=qe(),n=qe(),i=this._regionsGroup,o=t.transformInfoRaw,r=t.mapOrGeoModel,a=t.data,s=t.geo.projection,c=s&&s.stream;function d(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function h(t){for(var e=[],n=!c&&s&&s.project,i=0;i<t.length;++i){var o=d(t[i],n);o&&e.push(o)}return e}function p(t){return{shape:{points:h(t)}}}i.removeAll(),u(t.geo.regions,(function(o){var h=o.name,g=e.get(h),f=n.get(h)||{},y=f.dataIdx,v=f.regionModel;g||(g=e.set(h,new $),i.add(g),y=a?a.indexOfName(h):null,v=t.isGeo?r.getRegionModel(h):a?a.getItemModel(y):null,n.set(h,{dataIdx:y,regionModel:v}));var m=[],x=[];u(o.geometries,(function(t){if("polygon"===t.type){var e=[t.exterior].concat(t.interiors||[]);c&&(e=kc(e,c)),u(e,(function(t){m.push(new Qe(p(t)))}))}else{var n=t.points;c&&(n=kc(n,c,!0)),u(n,(function(t){x.push(new $t(p(t)))}))}}));var _=d(o.getCenter(),s&&s.project);function b(e,n){if(e.length){var i=new l({culling:!0,segmentIgnoreThreshold:1,shape:{paths:e}});g.add(i),Cc(t,i,y,v),Tc(t,i,h,v,r,y,_),n&&(Ic(i),u(i.states,Ic))}}b(m),b(x,!0)})),e.each((function(e,i){var o=n.get(i),a=o.dataIdx,s=o.regionModel;Dc(t,e,i,s,r,a),Lc(t,e,i,s,r),Pc(t,e,i,s,r)}),this)},t.prototype._buildSVG=function(t){var e=t.geo.map,n=t.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var i=this._svgDispatcherMap=qe(),o=!1;u(this._svgGraphicRecord.named,(function(e){var n=e.name,r=t.mapOrGeoModel,a=t.data,s=e.svgNodeTagLower,l=e.el,u=a?a.indexOfName(n):null,c=r.getRegionModel(n);(null!=_c.get(s)&&l instanceof Mn&&Cc(t,l,u,c),l instanceof Mn&&(l.culling=!0),l.z2EmphasisLift=0,e.namedFrom)||(null!=Sc.get(s)&&Tc(t,l,n,c,r,u,null),Dc(t,l,n,c,r,u),Lc(t,l,n,c,r),null!=bc.get(s)&&("self"===Pc(t,l,n,c,r)&&(o=!0),(i.get(n)||i.set(n,[])).push(l)))}),this),this._enableBlurEntireSVG(o,t)},t.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var n=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse((function(t){if(!t.isGroup){In(t);var e=t.ensureState("blur").style||{};null==e.opacity&&null!=n&&(e.opacity=n),t.ensureState("emphasis")}}))}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(t,e){if(null==t)return[];var n=e.coordinateSystem;if("geoJSON"===n.resourceType){var i=this._regionsGroupByName;if(i){var o=i.get(t);return o?[o]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},t.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},t.prototype._useSVG=function(t){var e=yc(t);if(e&&"geoSVG"===e.type){var n=e.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},t.prototype._freeSVG=function(){var t=this._svgMapName;if(null!=t){var e=yc(t);e&&"geoSVG"===e.type&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(t,e,n){var i=t.coordinateSystem,o=this._controller,r=this._controllerHost;r.zoomLimit=t.get("scaleLimit"),r.zoom=i.getZoom(),o.enable(t.get("roam")||!1);var a=t.mainType;function s(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}o.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,ku(r,t.dx,t.dy),n.dispatchAction(p(s(),{dx:t.dx,dy:t.dy,animation:{duration:0}}))}),this),o.off("zoom").on("zoom",(function(t){this._mouseDownFlag=!1,Nu(r,t.scale,t.originX,t.originY),n.dispatchAction(p(s(),{zoom:t.scale,originX:t.originX,originY:t.originY,animation:{duration:0}}))}),this),o.setPointerChecker((function(e,o,r){return i.containPoint([o,r])&&!Vu(e,n,t)}))},t.prototype.resetForLabelLayout=function(){this.group.traverse((function(t){var e=t.getTextContent();e&&(e.ignore=wc(e).ignore)}))},t.prototype._updateMapSelectHandler=function(t,e,n,i){var o=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",(function(){o._mouseDownFlag=!0})),e.on("click",(function(t){o._mouseDownFlag&&(o._mouseDownFlag=!1)})))},t}();function Cc(t,e,n,i){var o=i.getModel("itemStyle"),r=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=Mc(o),u=Mc(r),c=Mc(s),d=Mc(a),h=t.data;if(h){var p=h.getItemVisual(n,"style"),g=h.getItemVisual(n,"decal");t.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),g&&(l.decal=An(g,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=d,In(e)}function Tc(t,e,n,i,o,r,a){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),r)),c=s&&s.getItemLayout(r);if(l||u||c&&c.showLabel){var d=l?n:r,h=void 0;(!s||r>=0)&&(h=o);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;ut(e,st(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var g=e.getTextContent();if(g&&(wc(g).ignore=g.ignore,e.textConfig&&a)){var f=e.getBoundingRect().clone();e.textConfig.layoutRect=f,e.textConfig.position=[(a[0]-f.x)/f.width*100+"%",(a[1]-f.y)/f.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Dc(t,e,n,i,o,r){t.data?t.data.setItemGraphicEl(r,e):dt(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:i&&i.option||{}}}function Lc(t,e,n,i,o){t.data||Ge({el:e,componentModel:o,itemName:n,itemTooltipOption:i.get("tooltip")})}function Pc(t,e,n,i,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=i.getModel("emphasis"),a=r.get("focus");return ct(e,a,r.get("blurScope"),r.get("disabled")),t.isGeo&&Cn(e,o,n),a}function kc(t,e,n){var i,o=[];function r(){i=[]}function a(){i.length&&(o.push(i),i=[])}var s=e({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),u(t,(function(t){s.lineStart();for(var e=0;e<t.length;e++)s.point(t[e][0],t[e][1]);s.lineEnd()})),!n&&s.polygonEnd(),o}const Nc=Ac;const Oc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&"geoRoam"===i.type&&this._mapDraw.resetForLabelLayout(),i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id)(r=this._mapDraw)&&o.add(r.group);else if(t.needsDrawMap){var r=this._mapDraw||new Nc(n);o.add(r.group),r.draw(t,e,n,this,i),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,n){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),(function(e,n){if(!isNaN(e)){var r=i.getItemLayout(n);if(r&&r.point){var a=r.point,s=r.offset,l=new on({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:Tn+1)});if(!s){var u=t.mainSeries.getData(),c=i.getName(n),d=u.indexOfName(c),h=i.getItemModel(n),p=h.getModel("label"),g=u.getItemGraphicEl(d);ut(l,st(h),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(d,n)}},defaultText:c}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),g.onHoverStateChange=function(t){Ct(l,t)}}o.add(l)}}}))},e.type="map",e}(At);var Rc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.getCenter())}},n}return K(e,t),e.prototype.getInitialData=function(t){for(var e=nl(this,{coordDimensions:["value"],encodeDefaulter:Wt(re,this)}),n=qe(),i=[],o=0,r=e.count();o<r;o++){var a=e.getName(o);n.set(a,!0)}var s=mc(this.getMapType(),this.option.nameMap,this.option.nameProperty);return u(s.regions,(function(t){var e=t.name;n.get(e)||i.push(e)})),e.appendValues([],i),e},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData(),o=this.getRawValue(t),r=i.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(r),c=i.mapDimension("value");isNaN(a[l].originalData.get(c,u))||s.push(a[l].name)}return nn("section",{header:s.join(", "),noHeader:!s.length,blocks:[nn("nameValue",{name:r,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var e=t.icon||"roundRect",n=Q(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(tt);const Vc=Rc;function zc(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),u(e,(function(t,e){for(var n,i,o,a=(n=r(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),o={},u(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);o[i]=o[i]||[],isNaN(e)||o[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var r="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=o[r].length,c=0;c<u;c++)s=Math.min(s,o[r][c]),l=Math.max(l,o[r][c]),a+=o[r][c];return 0===u?NaN:"min"===i?s:"max"===i?l:"average"===i?a/u:a}))),s=0;s<t.length;s++)t[s].originalData=t[s].getData();for(s=0;s<t.length;s++)t[s].seriesGroup=t,t[s].needsDrawMap=0===s&&!t[s].getHostGeoModel(),t[s].setData(a.cloneShallow()),t[s].mainSeries=t[0]}))}function Ec(t){var e={};t.eachSeriesByType("map",(function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!e[i]){var o={};u(n.seriesGroup,(function(e){var n=e.coordinateSystem,i=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&i.each(i.mapDimension("value"),(function(t,e){var r=i.getName(e),a=n.getRegion(r);if(a&&!isNaN(t)){var s=o[r]||0,l=n.dataToPoint(a.getCenter());o[r]=s+1,i.setItemLayout(e,{point:l,offset:s})}}))}));var r=n.getData();r.each((function(t){var e=r.getName(t),n=r.getItemLayout(t)||{};n.showLabel=!o[e],r.setItemLayout(t,n)})),e[i]=!0}}))}var Bc=be;function Gc(t){var e=t.seriesModel;return e?e.coordinateSystem:null}const Wc=function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Dn,n._rawTransformable=new Dn,n.name=e,n}return K(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new ce(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new ce(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._rawTransformable;r.transform=o.calculateTransform(new ce(t,e,n,i));var a=r.parent;r.parent=null,r.decomposeTransform(),r.parent=a,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[Ut(t[0],e.getWidth()),Ut(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=be([],i,t),n=be([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Ln(this.transform||(this.transform=[]),e.transform||mn()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],_e(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new Dn;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?Bc(n,t,i):Pn(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?Bc([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=Gc(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=Gc(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Dn);var Fc={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Hc=["lng","lat"],Yc=function(t){function e(e,n,i){var o=t.call(this,e)||this;o.dimensions=Hc,o.type="geo",o._nameCoordMap=qe(),o.map=n;var r=i.projection,a=mc(n,i.nameMap,i.nameProperty),s=yc(n);o.resourceType=s?s.type:null;var l,u=o.regions=a.regions,c=Fc[s.type];if(o._regionsMap=a.regionsMap,o.regions=a.regions,o.projection=r,r)for(var d=0;d<u.length;d++){var h=u[d].getBoundingRect(r);(l=l||h.clone()).union(h)}else l=a.boundingRect;return o.setBoundingRect(l.x,l.y,l.width,l.height),o.aspectScale=r?1:M(i.aspectScale,c.aspectScale),o._invertLongitute=!r&&c.invertLongitute,o}return K(e,t),e.prototype._transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._invertLongitute;o=o.clone(),r&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new ce(t,e,n,i));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,r&&(a.scaleY=-a.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var e=this.regions,n=0;n<e.length;n++){var i=e[n];if("geoJSON"===i.type&&i.contain(t))return e[n]}},e.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},e.prototype.getGeoCoord=function(t){var e=this._regionsMap.get(t);return this._nameCoordMap.get(t)||e&&e.getCenter()},e.prototype.dataToPoint=function(t,e,n){if(c(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,e,n)}},e.prototype.pointToData=function(t){var e=this.projection;return e&&(t=e.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(e){return t.prototype.pointToData.call(this,e)},e.prototype.projectedToPoint=function(e,n,i){return t.prototype.dataToPoint.call(this,e,n,i)},e.prototype.convertToPixel=function(t,e,n){var i=Xc(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=Xc(e);return i===this?i.pointToData(n):null},e}(Wc);function Xc(t){var e=t.geoModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",he).models[0]||{}).coordinateSystem:null}pe(Yc,Wc);const Zc=Yc;function Uc(t,e){var n=t.get("boundingCoords");if(null!=n){var i=n[0],o=n[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])){var r=this.projection;if(r){var a=i[0],s=i[1],l=o[0],u=o[1];i=[1/0,1/0],o=[-1/0,-1/0];var c=function(t,e,n,a){for(var s=n-t,l=a-e,u=0;u<=100;u++){var c=u/100,d=r.project([t+s*c,e+l*c]);Nn(i,i,d),On(o,o,d)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1])}else;}var d,h,p,g=this.getBoundingRect(),f=t.get("layoutCenter"),y=t.get("layoutSize"),v=e.getWidth(),m=e.getHeight(),x=g.width/g.height*this.aspectScale,_=!1;if(f&&y&&(d=[Ut(f[0],v),Ut(f[1],m)],h=Ut(y,Math.min(v,m)),isNaN(d[0])||isNaN(d[1])||isNaN(h)||(_=!0)),_)p={},x>1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,p=Zt(b,{width:v,height:m})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var jc=function(){function t(){this.dimensions=Hc}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,o){var r=t.get("map"),a=new Zc(r+o,r,p({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=Uc,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var o={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();o[e]=o[e]||[],o[e].push(t)}})),u(o,(function(t,o){var a=r(t,(function(t){return t.get("nameMap")})),s=new Zc(o,o,p({nameMap:kn(a)},i(t[0])));s.zoomLimit=Me.apply(null,r(t,(function(t){return t.get("scaleLimit")}))),n.push(s),s.resize=Uc,s.resize(t[0],e),u(t,(function(t){t.coordinateSystem=s,function(t,e){u(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(s,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var o=(t||[]).slice(),r=qe(),a=0;a<o.length;a++)r.set(o[a].name,o[a]);var s=mc(e,n,i);return u(s.regions,(function(t){var e=t.name;!r.get(e)&&o.push({name:e})})),o},t}();const qc=new jc;const Kc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(t,e,n){var i=yc(t.map);if(i&&"geoJSON"===i.type){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,n),se(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,e=this.option;e.regions=qc.getFilledRegions(e.regions,e.map,e.nameMap,e.nameProperty);var n={};this._optionModelMap=Rn(e.regions||[],(function(e,i){var o=i.name;return o&&(e.set(o,new Xe(i,t,t.ecModel)),i.selected&&(n[o]=!0)),e}),qe()),e.selectedMap||(e.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Xe(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,e){var n=this.getRegionModel(t),i="normal"===e?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:t};return P(i)?(o.status=e,i(o)):c(i)?i.replace("{a}",null!=t?t:""):void 0},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var e=this.option,n=e.selectedMode;n&&("multiple"!==n&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},e.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var e=this.option.selectedMap;return!(!e||!e[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(de);function Jc(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function $c(t,e,n,i){var o=t.getZoom(),r=t.getCenter(),a=e.zoom,s=t.projectedToPoint?t.projectedToPoint(r):t.dataToPoint(r);if(null!=e.dx&&null!=e.dy&&(s[0]-=e.dx,s[1]-=e.dy,t.setCenter(Jc(t,s),i)),null!=a){if(n){var l=n.min||0,u=n.max||1/0;a=Math.max(Math.min(o*a,u),l)/o}t.scaleX*=a,t.scaleY*=a;var c=(e.originX-t.x)*(a-1),d=(e.originY-t.y)*(a-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(Jc(t,s),i),t.setZoom(a*o)}return{center:t.getCenter(),zoom:t.getZoom()}}const Qc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.focusBlurEnabled=!0,n}return K(e,t),e.prototype.init=function(t,e){this._api=e},e.prototype.render=function(t,e,n,i){if(this._model=t,!t.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new Nc(n));var o=this._mapDraw;o.draw(t,e,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,e,n)},e.prototype._handleRegionClick=function(t){var e;Vn(t.target,(function(t){return null!=(e=dt(t).eventData)}),!0),e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},e.prototype.updateSelectStatus=function(t,e,n){var i=this;this._mapDraw.group.traverse((function(t){var e=dt(t).eventData;if(e)return i._model.isSelected(e.name)?n.enterSelect(t):n.leaveSelect(t),!0}))},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(je);function td(t,e,n){fc(t,e,n)}function ed(t){function e(e,n){n.update="geo:updateSelectStatus",t.registerAction(n,(function(t,n){var i={},o=[];return n.eachComponent({mainType:"geo",query:t},(function(n){n[e](t.name);var r=n.coordinateSystem;u(r.regions,(function(t){i[t.name]=n.isSelected(t.name)||!1}));var a=[];u(i,(function(t,e){i[e]&&a.push(e)})),o.push({geoIndex:n.componentIndex,name:a})})),{selected:i,allSelected:o,name:t.name}}))}t.registerCoordinateSystem("geo",qc),t.registerComponentModel(Kc),t.registerComponentView(Qc),t.registerImpl("registerMap",td),t.registerImpl("getMap",(function(t){return vc(t)})),e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(t,e,n){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},(function(e){var o=e.coordinateSystem;if("geo"===o.type){var r=$c(o,t,e.get("scaleLimit"),n);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===i&&u(e.seriesGroup,(function(t){t.setCenter(r.center),t.setZoom(r.zoom)}))}}))}))}function nd(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,o=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){!function(t){var e=t.children,n=e.length,i=0,o=0;for(;--n>=0;){var r=e[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,o+=r.hierNode.change,i+=r.hierNode.shift+o}}(t);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=ad(s),r=sd(r),s&&r;){o=ad(o),a=sd(a),o.hierNode.ancestor=t;var h=s.hierNode.prelim+d-r.hierNode.prelim-u+i(s,r);h>0&&(ud(ld(s,t,n),t,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!ad(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),r&&!sd(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function id(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function od(t){return arguments.length?t:cd}function rd(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function ad(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function sd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function ld(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function ud(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function cd(t,e){return t.parentNode===e.parentNode?1:2}var dd=function(){this.parentPoint=[],this.childPoints=[]},hd=function(t){function e(e){return t.call(this,e)||this}return K(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dd},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,o=e.parentPoint,r=n[0],a=n[i-1];if(1===i)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Ut(e.forkPosition,1),d=[];d[l]=o[l],d[u]=o[u]+(a[u]-o[u])*c,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(r[0],r[1]),d[l]=r[l],t.lineTo(d[0],d[1]),d[l]=a[l],t.lineTo(d[0],d[1]),t.lineTo(a[0],a[1]);for(var h=1;h<i-1;h++){var p=n[h];t.moveTo(p[0],p[1]),d[l]=p[l],t.lineTo(d[0],d[1])}},e}(_);function pd(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)}function gd(t,e,n,i,o){var r=!n,a=t.tree.getNodeByDataIndex(e),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",c=t.tree.root,d=a.parentNode===c?a:a.parentNode||a,h=t.getItemGraphicEl(d.dataIndex),p=d.getLayout(),g=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,f=a.getLayout();r?((n=new Ra(t,e,null,{symbolInnerColor:u,useNameLabel:!0})).x=g.x,n.y=g.y):n.updateData(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=f.rawX,n.__radialRawY=f.rawY,i.add(n),t.setItemGraphicEl(e,n),n.__oldX=n.x,n.__oldY=n.y,ot(n,{x:f.x,y:f.y},o);var y=n.getSymbolPath();if("radial"===o.get("layout")){var v=c.children[0],m=v.getLayout(),x=v.children.length,_=void 0,b=void 0;if(f.x===m.x&&!0===a.isExpand&&v.children.length){var S={x:(v.children[0].getLayout().x+v.children[x-1].getLayout().x)/2,y:(v.children[0].getLayout().y+v.children[x-1].getLayout().y)/2};(_=Math.atan2(S.y-m.y,S.x-m.x))<0&&(_=2*Math.PI+_),(b=S.x<m.x)&&(_-=Math.PI)}else(_=Math.atan2(f.y-m.y,f.x-m.x))<0&&(_=2*Math.PI+_),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(b=f.x<m.x)&&(_-=Math.PI):(b=f.x>m.x)||(_-=Math.PI);var w=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),A=I*(Math.PI/180),C=y.getTextContent();C&&(y.setTextConfig({position:M.get("position")||w,rotation:null==I?-_:A,origin:"center"}),C.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),D="relative"===T?En(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===T?a.getAncestorsIndices():"descendant"===T?a.getDescendantIndices():null;D&&(dt(n).focus=D),function(t,e,n,i,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),d=t.getOrient(),h=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),f=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(f||(f=i.__edge=new Gn({shape:md(c,d,h,o,o)})),ot(f,{shape:md(c,d,h,r,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;m<y.length;m++){var x=y[m].getLayout();v.push([x.x,x.y])}f||(f=i.__edge=new hd({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),ot(f,{shape:{parentPoint:[a.x,a.y],childPoints:v}},t)}f&&("polyline"!==u||e.isExpand)&&(f.useStyle(wt({strokeNoScale:!0,fill:null},g)),Mt(f,l,"lineStyle"),In(f),s.add(f))}(o,a,c,n,g,p,f,i),n.__edge&&(n.onHoverStateChange=function(e){if("blur"!==e){var i=a.parentNode&&t.getItemGraphicEl(a.parentNode.dataIndex);i&&i.hoverState===Bn||Ct(n.__edge,e)}})}function fd(t,e,n,i,o){var r=yd(e.tree.root,t),a=r.source,s=r.sourceLayout,l=e.getItemGraphicEl(t.dataIndex);if(l){var u=e.getItemGraphicEl(a.dataIndex).__edge,c=l.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=i.get("edgeShape"),h=i.get("layout"),p=i.get("orient"),g=i.get(["lineStyle","curveness"]);c&&("curve"===d?ht(c,{shape:md(h,p,g,s,s),style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:o}):"polyline"===d&&"orthogonal"===i.get("layout")&&ht(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:o}))}}function yd(t,e){for(var n,i=e.parentNode===t?e:e.parentNode||e;null==(n=i.getLayout());)i=i.parentNode===t?i:i.parentNode||i;return{source:i,sourceLayout:n}}function vd(t,e,n,i,o){var r=t.tree.getNodeByDataIndex(e),a=yd(t.tree.root,r).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};ht(n,{x:a.x+1,y:a.y+1},o,{cb:function(){i.remove(n),t.setItemGraphicEl(e,null)},removeOpt:s}),n.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:s}),r.children.forEach((function(e){fd(e,t,i,o,s)})),fd(r,t,i,o,s)}function md(t,e,n,i,o){var r,a,s,l,u,c,d,h;if("radial"===t){u=i.rawX,d=i.rawY,c=o.rawX,h=o.rawY;var p=rd(u,d),g=rd(u,d+(h-d)*n),f=rd(c,h+(d-h)*n),y=rd(c,h);return{x1:p.x||0,y1:p.y||0,x2:y.x||0,y2:y.y||0,cpx1:g.x||0,cpy1:g.y||0,cpx2:f.x||0,cpy2:f.y||0}}return u=i.x,d=i.y,c=o.x,h=o.y,"LR"!==e&&"RL"!==e||(r=u+(c-u)*n,a=d,s=c+(u-c)*n,l=h),"TB"!==e&&"BT"!==e||(r=u,a=d+(h-d)*n,s=c,l=h+(d-h)*n),{x1:u,y1:d,x2:c,y2:h,cpx1:r,cpy1:a,cpx2:s,cpy2:l}}const xd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._mainGroup=new $,n}return K(e,t),e.prototype.init=function(t,e){this._controller=new Pu(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,n){var i=t.getData(),o=t.layoutInfo,r=this._mainGroup;"radial"===t.get("layout")?(r.x=o.x+o.width/2,r.y=o.y+o.height/2):(r.x=o.x,r.y=o.y),this._updateViewCoordSys(t,n),this._updateController(t,e,n);var a=this._data;i.diff(a).add((function(e){pd(i,e)&&gd(i,e,null,r,t)})).update((function(e,n){var o=a.getItemGraphicEl(n);pd(i,e)?gd(i,e,o,r,t):o&&vd(a,n,o,r,t)})).remove((function(e){var n=a.getItemGraphicEl(e);n&&vd(a,e,n,r,t)})).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&i.eachItemGraphicEl((function(e,i){e.off("click").on("click",(function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:i})}))})),this._data=i},e.prototype._updateViewCoordSys=function(t,e){var n=t.getData(),i=[];n.each((function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])}));var o=[],r=[];zn(i,o,r);var a=this._min,s=this._max;r[0]-o[0]==0&&(o[0]=a?a[0]:o[0]-1,r[0]=s?s[0]:r[0]+1),r[1]-o[1]==0&&(o[1]=a?a[1]:o[1]-1,r[1]=s?s[1]:r[1]+1);var l=t.coordinateSystem=new Wc;l.zoomLimit=t.get("scaleLimit"),l.setBoundingRect(o[0],o[1],r[0]-o[0],r[1]-o[1]),l.setCenter(t.get("center"),e),l.setZoom(t.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=o,this._max=r},e.prototype._updateController=function(t,e,n){var i=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,i,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(i,o)&&!Vu(e,n,t)})),o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){ku(r,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){Nu(r,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()}))},e.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),n=this._getNodeGlobalScale(t);e.eachItemGraphicEl((function(t,e){t.setSymbolScale(n)}))},e.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scaleX||1;return((e.getZoom()-1)*n+1)/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(At);var _d=function(){function t(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 t.prototype.isRemoved=function(){return this.dataIndex<0},t.prototype.eachNode=function(t,e,n){P(t)&&(n=e,e=t,t=null),c(t=t||{})&&(t={order:t});var i,o=t.order||"preorder",r=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var a=0;!i&&a<r.length;a++)r[a].eachNode(t,e,n);"postorder"===o&&e.call(n,this)},t.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},t.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},t.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},t.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},t.prototype.getDescendantIndices=function(){var t=[];return this.eachNode((function(e){t.push(e.dataIndex)})),t},t.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},t.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.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},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),bd=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,n,i){var o=new t(n),r=[],a=1;!function t(e,n){var i=e.value;a=Math.max(a,X(i)?i.length:1),r.push(e);var s=new _d(Wn(e.name,""),o);n?function(t,e){var n=e.children;if(t.parentNode===e)return;n.push(t),t.parentNode=e}(s,n):o.root=s,o._nodes.push(s);var l=e.children;if(l)for(var u=0;u<l.length;u++)t(l[u],s)}(e),o.root.updateDepthAndHeight(0);var s=ne(r,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new ie(s,n);return l.initData(r),i&&i(l),Fn({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},t}();const Sd=bd;function wd(t,e,n){if(t&&De(e,t.type)>=0){var i=n.getData().tree.root,o=t.targetNode;if(c(o)&&(o=i.getNodeById(o)),o&&i.contains(o))return{node:o};var r=t.targetNodeId;if(null!=r&&(o=i.getNodeById(r)))return{node:o}}}function Md(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Id(t,e){var n=Md(t);return De(n,e)>=0}function Ad(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}const Cd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return K(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Xe(n,this,this.ecModel),o=Sd.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=o.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var r=0;o.eachNode("preorder",(function(t){t.depth>r&&(r=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(t),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return nn("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Ad(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(tt);function Td(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;r>=0;r--)i.push(o[r])}}function Dd(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Zt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,r=0,a=null;"radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,a=od((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=n.width,r=n.height,a=od());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,o=[e];n=o.pop();)if(i=n.children,n.isExpand&&i.length)for(var r=i.length-1;r>=0;r--){var a=i[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(t,e,n){for(var i,o=[t],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;i=r.pop();)e(i,n)}(l,nd,a),s.hierNode.modifier=-l.hierNode.prelim,Td(l,id);var u=l,c=l,d=l;Td(l,(function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>c.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)}));var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,g=0,f=0,y=0,v=0;if("radial"===i)g=o/(c.getLayout().x+h+p),f=r/(d.depth-1||1),Td(l,(function(t){y=(t.getLayout().x+p)*g,v=(t.depth-1)*f;var e=rd(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(f=r/(c.getLayout().x+h+p),g=o/(d.depth-1||1),Td(l,(function(t){v=(t.getLayout().x+p)*f,y="LR"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(g=o/(c.getLayout().x+h+p),f=r/(d.depth-1||1),Td(l,(function(t){y=(t.getLayout().x+p)*g,v="TB"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function Ld(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");p(i,n)}))}))}var Pd=["treemapZoomToNode","treemapRender","treemapMove"];function kd(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var o=Hn(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",o)}))}function Nd(t){var e=0;u(t.children,(function(t){Nd(t);var n=t.value;X(n)&&(n=n[0]),e+=n}));var n=t.value;X(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),X(t.value)?t.value[0]=n:t.value=n}const Od=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return K(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Nd(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},a=new Xe({itemStyle:o},this,e);i=t.levels=function(t,e){var n,i,o=Yn(e.get("color")),r=Yn(e.get(["aria","decal","decals"]));if(!o)return;t=t||[],u(t,(function(t){var e=new Xe(t),o=e.get("color"),r=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(n=!0),(e.get(["itemStyle","decal"])||r&&"none"!==r)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=o.slice());!i&&r&&(a.decal=r.slice());return t}(i,e);var s=r(i||[],(function(t){return new Xe(t,a,e)}),this),l=Sd.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=l.getNodeByDataIndex(e),i=n?s[n.depth]:null;return t.parentModel=i||a,t}))}));return l.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),r=i.getName(t);return nn("nameValue",{name:r,value:o})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Ad(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=qe(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){kd(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(tt);var Rd=function(){function t(t){this.group=new $,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&n){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(t,c,a,s,l,u,i),Xn(r,c.pos,c.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var o=Wn(i.getModel().get("name"),""),r=n.getTextRect(o),a=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:o,width:a})}},t.prototype._renderContent=function(t,e,n,i,o,r,a){for(var s=0,l=e.emptyItemWidth,u=t.get(["breadcrumb","height"]),c=Zn(e.pos,e.box),d=e.totalWidth,h=e.renderList,p=i.getModel("itemStyle").getItemStyle(),g=h.length-1;g>=0;g--){var f=h[g],y=f.node,v=f.width,m=f.text;d>c.width&&(d-=v-l,v=l,m=null);var x=new Qe({shape:{points:Vd(s,0,v,u,g===h.length-1,0===g)},style:wt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Tt({style:Be(o,{text:m})}),textConfig:{position:"inside"},z2:1e4*Tn,onclick:Wt(a,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Be(r,{text:m}),x.ensureState("emphasis").style=p,ct(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),zd(x,t,y),s+=v+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function Vd(t,e,n,i,o,r){var a=[[o?t:t-5,e],[t+n,e],[t+n,e+i],[o?t:t-5,e+i]];return!r&&a.splice(2,0,[t+n+5,e+i/2]),!o&&a.push([t,e+i/2]),a}function zd(t,e,n){dt(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Ad(n,e)}}const Ed=Rd;var Bd=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;i<o;i++){var r=this._storage[i];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:n,aborted:n})}return this},t}();var Gd=$,Wd=xt,Fd="label",Hd="upperLabel",Yd=10*Tn,Xd=2*Tn,Zd=3*Tn,Ud=Un([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jd=function(t){var e=Ud(t);return e.stroke=e.fill=e.lineWidth=null,e},qd=le();const Kd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return K(e,t),e.prototype.render=function(t,e,n,i){var o=e.findComponents({mainType:"series",subType:"treemap",query:i});if(!(De(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=e;var r=wd(i,["treemapZoomToNode","treemapRootToNode"],t),a=i&&i.type,s=t.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===a&&r&&u?{rootNodeGroup:u.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(s),h=t.get("animation"),p=this._doRender(d,t,c);!h||l||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?p.renderFinally():this._doAnimation(d,p,t,c),this._resetController(n),this._renderBreadcrumb(t,n,r)}},e.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Gd,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},e.prototype._doRender=function(t,e,n){var i=e.getData().tree,o=this._oldTree,r={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,l=[];function c(t,i,o,u){return function(t,e,n,i,o,r,a,s,l,u){if(!a)return;var c=a.getLayout(),d=t.getData(),h=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!c||!c.isInView)return;var g=c.width,f=c.height,y=c.borderWidth,v=c.invisible,m=a.getRawIndex(),x=s&&s.getRawIndex(),_=a.viewChildren,b=c.upperHeight,S=_&&_.length,w=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),I=h.getModel(["blur","itemStyle"]),A=h.getModel(["select","itemStyle"]),C=w.get("borderRadius")||0,T=W("nodeGroup",Gd);if(!T)return;if(l.add(T),T.x=c.x||0,T.y=c.y||0,T.markRedraw(),qd(T).nodeWidth=g,qd(T).nodeHeight=f,c.isAboveViewRoot)return T;var D=W("background",Wd,u,Xd);D&&V(T,D,S&&c.upperLabelHeight);var L=h.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),N=L.get("disabled"),O="ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():P;if(S)Kn(T)&&Jn(T,!1),D&&(Jn(D,!N),d.setItemGraphicEl(a.dataIndex,D),$n(D,O,k));else{var R=W("content",Wd,u,Zd);R&&z(T,R),D.disableMorphing=!0,D&&Kn(D)&&Jn(D,!1),Jn(T,!N),d.setItemGraphicEl(a.dataIndex,T),$n(T,O,k)}return T;function V(e,n,i){var o=dt(n);if(o.dataIndex=a.dataIndex,o.seriesIndex=t.seriesIndex,n.setShape({x:0,y:0,width:g,height:f,r:C}),v)E(n);else{n.invisible=!1;var r=a.getVisual("style"),s=r.stroke,l=jd(w);l.fill=s;var u=Ud(M);u.fill=M.get("borderColor");var c=Ud(I);c.fill=I.get("borderColor");var d=Ud(A);if(d.fill=A.get("borderColor"),i){var h=g-2*y;B(n,s,r.opacity,{x:y,y:0,width:h,height:b})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,In(n)}e.add(n)}function z(e,n){var i=dt(n);i.dataIndex=a.dataIndex,i.seriesIndex=t.seriesIndex;var o=Math.max(g-2*y,0),r=Math.max(f-2*y,0);if(n.culling=!0,n.setShape({x:y,y:y,width:o,height:r,r:C}),v)E(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=jd(w);u.fill=l,u.decal=s.decal;var c=Ud(M),d=Ud(I),h=Ud(A);B(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=h,In(n)}e.add(n)}function E(t){!t.invisible&&r.push(t)}function B(e,n,i,o){var r=h.getModel(o?Hd:Fd),s=Wn(h.get("name"),null),l=r.getShallow("show");ut(e,st(h,o?Hd:Fd),{defaultText:l?s:null,inheritColor:n,defaultOpacity:i,labelFetcher:t,labelDataIndex:a.dataIndex});var u=e.getTextContent();if(u){var d=u.style,p=Qn(d.padding||0);o&&(e.setTextConfig({layoutRect:o}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var t=Math.max((o?o.width:e.shape.width)-p[1]-p[3],0),n=Math.max((o?o.height:e.shape.height)-p[0]-p[2],0);d.width===t&&d.height===n||u.setStyle({width:t,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",G(d,o,c);var g=u.getState("emphasis");G(g?g.style:null,o,c)}}function G(e,n,i){var o=e?e.text:null;if(!n&&i.isLeafRoot&&null!=o){var r=t.get("drillDownIcon",!0);e.text=r?r+" "+o:o}}function W(t,i,r,a){var s=null!=x&&n[t][x],l=o[t];return s?(n[t][x]=null,F(l,s)):v||((s=new i)instanceof Mn&&(s.z2=function(t,e){return t*Yd+e}(r,a)),H(l,s)),e[t][m]=s}function F(t,e){var n=t[m]={};e instanceof Gd?(n.oldX=e.x,n.oldY=e.y):n.oldShape=p({},e.shape)}function H(t,e){var n=t[m]={},r=a.parentNode,s=e instanceof $;if(r&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=o.background[r.getRawIndex()];!i&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}}(e,a,s,n,r,l,t,i,o,u)}!function t(e,n,i,o,r){o?(n=e,u(e,(function(t,e){!t.isRemoved()&&s(e,e)}))):new jn(n,e,a,a).add(s).update(s).remove(Wt(s,null)).execute();function a(t){return t.getId()}function s(a,s){var l=null!=a?e[a]:null,u=null!=s?n[s]:null,d=c(l,u,i,r);d&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],d,o,r+1)}}(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var d,h,g=(h={nodeGroup:[],background:[],content:[]},(d=s)&&u(d,(function(t,e){var n=h[e];u(t,(function(t){t&&(n.push(t),qd(t).willDelete=!0)}))})),h);return this._oldTree=i,this._storage=a,{lastsForAnimation:r,willDeleteEls:g,renderFinally:function(){u(g,(function(t){u(t,(function(t){t.parent&&t.parent.remove(t)}))})),u(l,(function(t){t.invisible=!0,t.dirty()}))}}},e.prototype._doAnimation=function(t,e,n,i){var o=n.get("animationDurationUpdate"),r=n.get("animationEasing"),a=(P(o)?0:o)||0,s=(P(r)?null:r)||"cubicOut",l=new Bd;u(e.willDeleteEls,(function(t,e){u(t,(function(t,n){if(!t.invisible){var o,r=t.parent,u=qd(r);if(i&&"drillDown"===i.direction)o=r===i.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;u.willDelete||(c=u.nodeWidth/2,d=u.nodeHeight/2),o="nodeGroup"===e?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}o&&l.add(t,o,a,0,s)}}))})),u(this._storage,(function(t,n){u(t,(function(t,i){var o=e.lastsForAnimation[n][i],r={};o&&(t instanceof $?null!=o.oldX&&(r.x=t.x,r.y=t.y,t.x=o.oldX,t.y=o.oldY):(o.oldShape&&(r.shape=p({},t.shape),t.setShape(o.oldShape)),o.fadein?(t.setStyle("opacity",0),r.style={opacity:1}):1!==t.style.opacity&&(r.style={opacity:1})),l.add(t,r,a,0,s))}))}),this),this._state="animating",l.finished(oe((function(){this._state="ready",e.renderFinally()}),this)).start()},e.prototype._resetController=function(t){var e=this._controller;e||((e=this._controller=new Pu(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",oe(this._onPan,this)),e.on("zoom",oe(this._onZoom,this)));var n=new ce(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,i){return n.contain(e,i)}))},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var r=new ce(o.x,o.y,o.width,o.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=mn();vn(s,s,[-e,-n]),yn(s,s,[t.scale,t.scale]),vn(s,s,[e,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var o=i.node;if(o.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&qn(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Ed(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(Id(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var o=this._storage.background[i.getRawIndex()];if(o){var r=o.transformCoordToLocal(t,e),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n},e.type="treemap",e}(At);var Jd=u,$d=Z,Qd=-1,th=function(){function t(e){var n=e.mappingMethod,i=e.type,o=this.option=L(e);this.type=i,this.mappingMethod=n,this._normalizeData=ch[n];var r=t.visualHandlers[i];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._normalizedToVisual=r._normalizedToVisual[n],"piecewise"===n?(eh(o),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,u(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(o)):"category"===n?o.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(Jd(e,(function(t,e){n[t]=e})),!X(i)){var o=[];Z(i)?Jd(i,(function(t,e){var i=n[e];o[null!=i?i:Qd]=t})):o[-1]=i,i=uh(t,o)}for(var r=e.length-1;r>=0;r--)null==i[r]&&(delete n[e[r]],e.pop())}(o):eh(o,!0):(T("linear"!==n||o.dataExtent),eh(o))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return oe(this._normalizeData,this)},t.listVisualTypes=function(){return a(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){Z(t)?u(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var o,r=X(e)?[]:Z(e)?{}:(o=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);o?r=a:r[e]=a})),r},t.retrieveVisuals=function(e){var n,i={};return e&&Jd(t.visualHandlers,(function(t,o){e.hasOwnProperty(o)&&(i[o]=e[o],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(X(t))t=t.slice();else{if(!$d(t))return[];var e=[];Jd(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,o=1/0,r=0,a=e.length;r<a;r++){var s=e[r].value;if(null!=s){if(s===t||c(s)&&s===t+"")return r;n&&h(s,r)}}for(r=0,a=e.length;r<a;r++){var l=e[r],u=l.interval,d=l.close;if(u){if(u[0]===-1/0){if(dh(d[1],t,u[1]))return r}else if(u[1]===1/0){if(dh(d[0],u[0],t))return r}else if(dh(d[0],u[0],t)&&dh(d[1],t,u[1]))return r;n&&h(u[0],r),n&&h(u[1],r)}}if(n)return t===1/0?e.length-1:t===-1/0?0:i;function h(e,n){var r=Math.abs(e-t);r<o&&(o=r,i=n)}},t.visualHandlers={color:{applyVisual:oh("color"),getColorMapper:function(){var t=this.option;return oe("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),rh.call(this,t)}:function(e,n,i){var o=!!i;return!n&&(e=this._normalizeData(e)),i=ti(e,t.parsedVisual,i),o?i:ei(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return ei(ti(t,this.option.parsedVisual),"rgba")},category:rh,piecewise:function(t,e){var n=lh.call(this,e);return null==n&&(n=ei(ti(t,this.option.parsedVisual),"rgba")),n},fixed:ah}},colorHue:nh((function(t,e){return oi(t,e)})),colorSaturation:nh((function(t,e){return oi(t,null,e)})),colorLightness:nh((function(t,e){return oi(t,null,null,e)})),colorAlpha:nh((function(t,e){return ri(t,e)})),decal:{applyVisual:oh("decal"),_normalizedToVisual:{linear:null,category:rh,piecewise:null,fixed:null}},opacity:{applyVisual:oh("opacity"),_normalizedToVisual:sh([0,1])},liftZ:{applyVisual:oh("liftZ"),_normalizedToVisual:{linear:ah,category:ah,piecewise:ah,fixed:ah}},symbol:{applyVisual:function(t,e,n){n("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:ih,category:rh,piecewise:function(t,e){var n=lh.call(this,e);return null==n&&(n=ih.call(this,t)),n},fixed:ah}},symbolSize:{applyVisual:oh("symbolSize"),_normalizedToVisual:sh([0,1])}},t}();function eh(t,e){var n=t.visual,i=[];Z(n)?Jd(n,(function(t){i.push(t)})):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),uh(t,i)}function nh(t){return{applyVisual:function(e,n,i){var o=this.mapValueToVisual(e);i("color",t(n("color"),o))},_normalizedToVisual:sh([0,1])}}function ih(t){var e=this.option.visual;return e[Math.round(Xt(t,[0,1],[0,e.length-1],!0))]||{}}function oh(t){return function(e,n,i){i(t,this.mapValueToVisual(e))}}function rh(t){var e=this.option.visual;return e[this.option.loop&&t!==Qd?t%e.length:t]}function ah(){return this.option.visual[0]}function sh(t){return{linear:function(e){return Xt(e,t,this.option.visual,!0)},category:rh,piecewise:function(e,n){var i=lh.call(this,n);return null==i&&(i=Xt(e,t,this.option.visual,!0)),i},fixed:ah}}function lh(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[th.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function uh(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=r(e,(function(t){var e=ni(t);return e||[0,0,0,1]}))),e}var ch={linear:function(t){return Xt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=th.findPieceIndex(t,e,!0);if(null!=n)return Xt(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?Qd:e},fixed:q};function dh(t,e,n){return t?e<=n:e<n}const hh=th;var ph=le();const gh={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||fh(e,{},t.getViewRoot().getAncestors(),t)}};function fh(t,e,n,i){var o=t.getModel(),r=t.getLayout(),a=t.hostTree.data;if(r&&!r.invisible&&r.isInView){var s,l=o.getModel("itemStyle"),c=function(t,e,n){var i=p({},e),o=n.designatedVisualItemStyle;return u(["color","colorAlpha","colorSaturation"],(function(n){o[n]=e[n];var r=t.get(n);o[n]=null,null!=r&&(i[n]=r)})),i}(l,e,i),d=a.ensureUniqueItemVisual(t.dataIndex,"style"),h=l.get("borderColor"),g=l.get("borderColorSaturation");null!=g&&(h=function(t,e){return null!=e?oi(e,null,null,t):null}(g,s=yh(c))),d.stroke=h;var f=t.viewChildren;if(f&&f.length){var y=function(t,e,n,i,o,r){if(!r||!r.length)return;var a=mh(e,"color")||null!=o.color&&"none"!==o.color&&(mh(e,"colorAlpha")||mh(e,"colorSaturation"));if(!a)return;var s=e.get("visualMin"),l=e.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new hh(d);return ph(h).drColorMappingBy=c,h}(0,o,r,0,c,f);u(f,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var r=function(t,e,n,i,o,r){var a=p({},e);if(o){var s=o.type,l="color"===s&&ph(o).drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}(o,c,t,e,y,i);fh(t,r,n,i)}}))}else s=yh(c),d.fill=s}}function yh(t){var e=vh(t,"color");if(e){var n=vh(t,"colorAlpha"),i=vh(t,"colorSaturation");return i&&(e=oi(e,null,null,i)),n&&(e=ri(e,n)),e}}function vh(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function mh(t,e){var n=t.get(e);return X(n)&&n.length?{name:e,range:n}:null}var xh=Math.max,_h=Math.min,bh=Me,Sh=u,wh=["itemStyle","borderWidth"],Mh=["itemStyle","gapWidth"],Ih=["upperLabel","show"],Ah=["upperLabel","height"];const Ch={seriesType:"treemap",reset:function(t,e,n,i){var o=n.getWidth(),r=n.getHeight(),a=t.option,s=Zt(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Ut(bh(s.width,l[0]),o),c=Ut(bh(s.height,l[1]),r),d=i&&i.type,h=wd(i,["treemapZoomToNode","treemapRootToNode"],t),g="treemapRender"===d||"treemapMove"===d?i.rootRect:null,f=t.getViewRoot(),y=Md(f);if("treemapMove"!==d){var v="treemapZoomToNode"===d?function(t,e,n,i,o){var r,a=(e||{}).node,s=[i,o];if(!a||a===n)return s;var l=i*o,u=l*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,d=r.children,h=0,p=d.length;h<p;h++)c+=d[h].getValue();var g=a.getValue();if(0===g)return s;u*=c/g;var f=r.getModel(),y=f.get(wh);(u+=4*y*y+(3*y+Math.max(y,kh(f)))*Math.pow(u,.5))>ai&&(u=ai),a=r}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,o*v]}(t,h,f,u,c):g?[g.width,g.height]:[u,c],m=a.sort;m&&"asc"!==m&&"desc"!==m&&(m="desc");var x={squareRatio:a.squareRatio,sort:m,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var _={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};f.setLayout(_),Th(f,x,!1,0),_=f.getLayout(),Sh(y,(function(t,e){var n=(y[e+1]||f).getValue();t.setLayout(p({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))}))}var b=t.getData().tree.root;b.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;var o=n.node,r=o.getLayout();if(!r)return i;var a=[r.width/2,r.height/2],s=o;for(;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}(s,g,h),!0),t.setLayoutInfo(s),Ph(b,new ce(-s.x,-s.y,o,r),y,f,0)}};function Th(t,e,n,i){var o,r;if(!t.isRemoved()){var a=t.getLayout();o=a.width,r=a.height;var s=t.getModel(),l=s.get(wh),u=s.get(Mh)/2,c=kh(s),d=Math.max(l,c),h=l-u,p=d-u;t.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var g=(o=xh(o-2*h,0))*(r=xh(r-h-p,0)),f=function(t,e,n,i,o,r){var a=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=r;if(o&&!l)return t.viewChildren=[];a=y(a,(function(t){return!t.isRemoved()})),function(t,e){e&&t.sort((function(t,n){var i="asc"===e?t.getValue()-n.getValue():n.getValue()-t.getValue();return 0===i?"asc"===e?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:i}))}(a,s);var u=function(t,e,n){for(var i=0,o=0,r=e.length;o<r;o++)i+=e[o].getValue();var a,s=t.get("visualDimension");e&&e.length?"value"===s&&n?(a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],Sh(e,(function(t){var e=t.getValue(s);e<a[0]&&(a[0]=e),e>a[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*e<r&&(s=l,n-=u)}return"asc"===i?o.splice(0,a-s):o.splice(s,a-s),n}(e,n,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var h=a[c].getValue()/u.sum*n;a[c].setLayout({area:h})}l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0);return t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}(t,s,g,e,n,i);if(f.length){var v={x:h,y:p,width:o,height:r},m=_h(o,r),x=1/0,_=[];_.area=0;for(var b=0,S=f.length;b<S;){var w=f[b];_.push(w),_.area+=w.getLayout().area;var M=Dh(_,m,e.squareRatio);M<=x?(b++,x=M):(_.area-=_.pop().getLayout().area,Lh(_,m,v,u,!1),m=_h(v.width,v.height),_.length=_.area=0,x=1/0)}if(_.length&&Lh(_,m,v,u,!0),!n){var I=s.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(b=0,S=f.length;b<S;b++)Th(f[b],e,n,i+1)}}}function Dh(t,e,n){for(var i=0,o=1/0,r=0,a=void 0,s=t.length;r<s;r++)(a=t[r].getLayout().area)&&(a<o&&(o=a),a>i&&(i=a));var l=t.area*t.area,u=e*e*n;return l?xh(u*i/l,l/(u*o)):1/0}function Lh(t,e,n,i,o){var r=e===n.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=e?t.area/e:0;(o||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=t.length;d<h;d++){var p=t[d],g={},f=c?p.getLayout().area/c:0,y=g[l[a]]=xh(c-2*i,0),v=n[s[r]]+n[l[r]]-u,m=d===h-1||v<f?v:f,x=g[l[r]]=xh(m-2*i,0);g[s[a]]=n[s[a]]+_h(i,y/2),g[s[r]]=u+_h(i,x/2),u+=m,p.setLayout(g,!0)}n[s[a]]+=c,n[l[a]]-=c}function Ph(t,e,n,i,o){var r=t.getLayout(),a=n[o],s=a&&a===t;if(!(a&&!s||o===n.length&&t!==i)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(r),isAboveViewRoot:s},!0);var l=new ce(e.x-r.x,e.y-r.y,e.width,e.height);Sh(t.viewChildren||[],(function(t){Ph(t,l,n,i,o+1)}))}}function kh(t){return t.get(Ih)?t.get(Ah):0}function Nh(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),i=t.getGraph().data,o=n.mapArray(n.getName);i.filterSelf((function(t){var n=i.getItemModel(t).getShallow("category");if(null!=n){m(n)&&(n=o[n]);for(var r=0;r<e.length;r++)if(!e[r].isSelected(n))return!1}return!0}))}))}function Oh(t){var e={};t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),i=t.getData(),o={};n.each((function(i){var r=n.getName(i);o["ec-"+r]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),n.setItemVisual(i,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=a.getShallow(l[u],!0);null!=c&&n.setItemVisual(i,l[u],c)}})),n.count()&&i.each((function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){c(e)&&(e=o["ec-"+e]);var r=n.getItemVisual(e,"style"),a=i.ensureUniqueItemVisual(t,"style");p(a,r);for(var s=["symbol","symbolSize","symbolKeepAspect"],l=0;l<s.length;l++)i.setItemVisual(t,s[l],n.getItemVisual(e,s[l]))}}))}))}function Rh(t){return t instanceof Array||(t=[t,t]),t}function Vh(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),n=t.getEdgeData(),i=Rh(t.get("edgeSymbol")),o=Rh(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",o&&o[0]),n.setVisual("toSymbolSize",o&&o[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each((function(t){var i=n.getItemModel(t),o=e.getEdgeByIndex(t),r=Rh(i.getShallow("symbol",!0)),a=Rh(i.getShallow("symbolSize",!0)),s=i.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(t,"style");switch(p(l,s),l.stroke){case"source":var u=o.node1.getVisual("style");l.stroke=u&&u.fill;break;case"target":u=o.node2.getVisual("style");l.stroke=u&&u.fill}r[0]&&o.setVisual("fromSymbol",r[0]),r[1]&&o.setVisual("toSymbol",r[1]),a[0]&&o.setVisual("fromSymbolSize",a[0]),a[1]&&o.setVisual("toSymbolSize",a[1])}))}))}var zh="--\x3e",Eh=function(t){return t.get("autoCurveness")||null},Bh=function(t,e){var n=Eh(t),i=20,o=[];if(m(n))i=n;else if(X(n))return void(t.__curvenessList=n);e>i&&(i=e);var r=i%2?i+2:i+3;o=[];for(var a=0;a<r;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=o},Gh=function(t,e,n){var i=[t.id,t.dataIndex].join("."),o=[e.id,e.dataIndex].join(".");return[n.uid,i,o].join(zh)},Wh=function(t){var e=t.split(zh);return[e[0],e[2],e[1]].join(zh)},Fh=function(t,e){var n=e.__edgeMap;return n[t]?n[t].length:0};function Hh(t,e,n,i){var o=Eh(e),r=X(o);if(!o)return null;var a=function(t,e){var n=Gh(t.node1,t.node2,e);return e.__edgeMap[n]}(t,e);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var u=function(t,e){return Fh(Gh(t.node1,t.node2,e),e)+Fh(Gh(t.node2,t.node1,e),e)}(t,e);Bh(e,u),t.lineStyle=t.lineStyle||{};var c=Gh(t.node1,t.node2,e),d=e.__curvenessList,h=r||u%2?0:1;if(a.isForward)return d[h+s];var p=Wh(c),g=Fh(p,e),f=d[s+g+h];return i?r?o&&0===o[0]?(g+h)%2?f:-f:((g%2?0:1)+h)%2?f:-f:(g+h)%2?f:-f:d[s+g+h]}function Yh(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),Xh(n,t)}}function Xh(t,e){t.eachEdge((function(t,n){var i=te(t.getModel().get(["lineStyle","curveness"]),-Hh(t,e,n,!0),0),o=si(t.node1.getLayout()),r=si(t.node2.getLayout()),a=[o,r];+i&&a.push([(o[0]+r[0])/2-(o[1]-r[1])*i,(o[1]+r[1])/2-(r[0]-o[0])*i]),t.setLayout(a)}))}function Zh(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];u(n.dimensions,(function(t){o=o.concat(i.mapDimensionsAll(t))}));for(var r=0;r<i.count();r++){for(var a=[],s=!1,l=0;l<o.length;l++){var c=i.get(o[l],r);isNaN(c)||(s=!0),a.push(c)}s?i.setItemLayout(r,n.dataToPoint(a)):i.setItemLayout(r,[NaN,NaN])}Xh(i.graph,t)}else e&&"none"!==e||Yh(t)}))}function Uh(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,i=e.scaleX;return((e.getZoom()-1)*n+1)/i}function jh(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var qh=Math.PI,Kh=[];function Jh(t,e,n,i){var o=t.coordinateSystem;if(!o||"view"===o.type){var r=o.getBoundingRect(),a=t.getData(),s=a.graph,l=r.width/2+r.x,u=r.height/2+r.y,c=Math.min(r.width,r.height)/2,d=a.count();if(a.setLayout({cx:l,cy:u}),d){if(n){var h=o.pointToData(i),p=h[0],g=h[1],f=[p-l,g-u];li(f,f),ui(f,f,c),n.setLayout([l+f[0],u+f[1]],!0),Qh(n,t.get(["circular","rotateLabel"]),l,u)}$h[e](t,s,a,c,l,u,d),s.eachEdge((function(e,n){var i,o=te(e.getModel().get(["lineStyle","curveness"]),Hh(e,t,n),0),r=si(e.node1.getLayout()),a=si(e.node2.getLayout()),s=(r[0]+a[0])/2,c=(r[1]+a[1])/2;+o&&(i=[l*(o*=3)+s*(1-o),u*o+c*(1-o)]),e.setLayout([r,a,i])}))}}}var $h={value:function(t,e,n,i,o,r,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);e.eachNode((function(t){var e=t.getValue("value"),n=u*(l?e:1)/2;s+=n,t.setLayout([i*Math.cos(s)+o,i*Math.sin(s)+r]),s+=n}))},symbolSize:function(t,e,n,i,o,r,a){var s=0;Kh.length=a;var l=Uh(t);e.eachNode((function(t){var e=jh(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=l;var n=Math.asin(e/2/i);isNaN(n)&&(n=qh/2),Kh[t.dataIndex]=n,s+=2*n}));var u=(2*qh-s)/a/2,c=0;e.eachNode((function(t){var e=u+Kh[t.dataIndex];c+=e,(!t.getLayout()||!t.getLayout().fixed)&&t.setLayout([i*Math.cos(c)+o,i*Math.sin(c)+r]),c+=e}))}};function Qh(t,e,n,i){var o=t.getGraphicEl();if(o){var r=t.getModel().get(["label","rotate"])||0,a=o.getSymbolPath();if(e){var s=t.getLayout(),l=Math.atan2(s[1]-i,s[0]-n);l<0&&(l=2*Math.PI+l);var u=s[0]<n;u&&(l-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-l,position:c,origin:"center"});var d=a.ensureState("emphasis");p(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:r*=Math.PI/180})}}function tp(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&Jh(t,"symbolSize")}))}var ep=gi;function np(t){t.eachSeriesByType("graph",(function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var n=t.preservedPoints||{},i=t.getGraph(),o=i.data,r=i.edgeData,a=t.getModel("force"),s=a.get("initLayout");t.preservedPoints?o.each((function(t){var e=o.getId(t);o.setItemLayout(t,n[e]||[NaN,NaN])})):s&&"none"!==s?"circular"===s&&Jh(t,"value"):Yh(t);var l=o.getDataExtent("value"),u=r.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),h=X(c)?c:[c,c],p=X(d)?d:[d,d];p=[p[1],p[0]];var g=o.mapArray("value",(function(t,e){var n=o.getItemLayout(e),i=Xt(t,l,h);return isNaN(i)&&(i=(h[0]+h[1])/2),{w:i,rep:i,fixed:o.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),f=r.mapArray("value",(function(e,n){var o=i.getEdgeByIndex(n),r=Xt(e,u,p);isNaN(r)&&(r=(p[0]+p[1])/2);var a=o.getModel(),s=te(o.getModel().get(["lineStyle","curveness"]),-Hh(o,t,n,!0),0);return{n1:g[o.node1.dataIndex],n2:g[o.node2.dataIndex],d:r,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}})),y=e.getBoundingRect(),v=function(t,e,n){for(var i=t,o=e,r=n.rect,a=r.width,s=r.height,l=[r.x+a/2,r.y+s/2],u=null==n.gravity?.1:n.gravity,c=0;c<i.length;c++){var d=i[c];d.p||(d.p=ci(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=si(d.p),d.edges=null}var h,p,g=null==n.friction?.6:n.friction,f=g;return{warmUp:function(){f=.8*g},setFixed:function(t){i[t].fixed=!0},setUnfixed:function(t){i[t].fixed=!1},beforeStep:function(t){h=t},afterStep:function(t){p=t},step:function(t){h&&h(i,o);for(var e=[],n=i.length,r=0;r<o.length;r++){var a=o[r];if(!a.ignoreForceLayout){var s=a.n1,c=a.n2;di(e,c.p,s.p);var d=hi(e)-a.d,g=c.w/(s.w+c.w);isNaN(g)&&(g=0),li(e,e),!s.fixed&&ep(s.p,s.p,e,g*d*f),!c.fixed&&ep(c.p,c.p,e,-(1-g)*d*f)}}for(r=0;r<n;r++)(x=i[r]).fixed||(di(e,l,x.p),ep(x.p,x.p,e,u*f));for(r=0;r<n;r++){s=i[r];for(var y=r+1;y<n;y++){c=i[y],di(e,c.p,s.p),0===(d=hi(e))&&(pi(e,Math.random()-.5,Math.random()-.5),d=1);var v=(s.rep+c.rep)/d/d;!s.fixed&&ep(s.pp,s.pp,e,v),!c.fixed&&ep(c.pp,c.pp,e,-v)}}var m=[];for(r=0;r<n;r++){var x;(x=i[r]).fixed||(di(m,x.p,x.pp),ep(x.p,x.p,m,f),Pn(x.pp,x.p))}var _=(f*=.992)<.01;p&&p(i,o,_),t&&t(_)}}}(g,f,{rect:y,gravity:a.get("gravity"),friction:a.get("friction")});v.beforeStep((function(t,e){for(var n=0,o=t.length;n<o;n++)t[n].fixed&&Pn(t[n].p,i.getNodeByIndex(n).getLayout())})),v.afterStep((function(t,e,r){for(var a=0,s=t.length;a<s;a++)t[a].fixed||i.getNodeByIndex(a).setLayout(t[a].p),n[o.getId(a)]=t[a].p;for(a=0,s=e.length;a<s;a++){var l=e[a],u=i.getEdgeByIndex(a),c=l.n1.p,d=l.n2.p,h=u.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],Pn(h[0],c),Pn(h[1],d),+l.curveness&&(h[2]=[(c[0]+d[0])/2-(c[1]-d[1])*l.curveness,(c[1]+d[1])/2-(d[0]-c[0])*l.curveness]),u.setLayout(h)}})),t.forceLayout=v,t.preservedPoints=n,v.step()}else t.forceLayout=null}))}function ip(t,e){var n=[];return t.eachSeriesByType("graph",(function(t){var i=t.get("coordinateSystem");if(!i||"view"===i){var o=t.getData(),r=o.mapArray((function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]})),a=[],s=[];zn(r,a,s),s[0]-a[0]==0&&(s[0]+=1,a[0]-=1),s[1]-a[1]==0&&(s[1]+=1,a[1]-=1);var l=(s[0]-a[0])/(s[1]-a[1]),u=function(t,e,n){var i=p(t.getBoxLayoutParams(),{aspect:n});return Zt(i,{width:e.getWidth(),height:e.getHeight()})}(t,e,l);isNaN(l)&&(a=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-a[0],d=s[1]-a[1],h=u.width,g=u.height,f=t.coordinateSystem=new Wc;f.zoomLimit=t.get("scaleLimit"),f.setBoundingRect(a[0],a[1],c,d),f.setViewRect(u.x,u.y,h,g),f.setCenter(t.get("center"),e),f.setZoom(t.get("zoom")),n.push(f)}})),n}var op=Re.prototype,rp=Gn.prototype,ap=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function sp(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}K(e,t)}(ap);const lp=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return K(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ap},e.prototype.buildPath=function(t,e){sp(e)?op.buildPath.call(this,t,e):rp.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return sp(this.shape)?op.pointAt.call(this,t):rp.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=sp(e)?[e.x2-e.x1,e.y2-e.y1]:rp.tangentAt.call(this,t);return li(n,n)},e}(_);var up=["fromSymbol","toSymbol"];function cp(t){return"_"+t+"Type"}function dp(t,e,n){var i=e.getItemVisual(n,t);if(!i||"none"===i)return i;var o=e.getItemVisual(n,t+"Size"),r=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=pt(o);return i+l+lt(a||0,l)+(r||"")+(s||"")}function hp(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var o=e.getItemVisual(n,t+"Size"),r=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=pt(o),u=lt(a||0,l),c=Q(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,c.name=t,c}}function pp(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var gp=function(t){function e(e,n,i){var o=t.call(this)||this;return o._createLine(e,n,i),o}return K(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,o=function(t){var e=new lp({name:"line",subPixelOptimize:!0});return pp(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,at(o,{shape:{percent:1}},i,e),this.add(o),u(up,(function(n){var i=hp(n,t,e);this.add(i),this[cp(n)]=dp(n,t,e)}),this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),r=t.getItemLayout(e),a={shape:{}};pp(a.shape,r),ot(o,a,i,e),u(up,(function(n){var i=dp(n,t,e),o=cp(n);if(this[o]!==i){this.remove(this.childOfName(n));var r=hp(n,t,e);this.add(r)}this[o]=i}),this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),r=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,d=n&&n.focus,h=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(e),g=p.getModel("emphasis");r=g.getModel("lineStyle").getLineStyle(),a=p.getModel(["blur","lineStyle"]).getLineStyle(),s=p.getModel(["select","lineStyle"]).getLineStyle(),c=g.get("disabled"),d=g.get("focus"),h=g.get("blurScope"),l=st(p)}var f=t.getItemVisual(e,"style"),y=f.stroke;o.useStyle(f),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=r,o.ensureState("blur").style=a,o.ensureState("select").style=s,u(up,(function(t){var e=this.childOfName(t);if(e){e.setColor(y),e.style.opacity=f.opacity;for(var n=0;n<kt.length;n++){var i=kt[n],r=o.getState(i);if(r){var a=r.style||{},s=e.ensureState(i),l=s.style||(s.style={});null!=a.stroke&&(l[e.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}e.markRedraw()}}),this);var v=i.getRawValue(e);ut(this,l,{labelDataIndex:e,labelFetcher:{getFormattedLabel:function(e,n){return i.getFormattedLabel(e,n,t.dataType)}},inheritColor:y||"#000",defaultOpacity:f.opacity,defaultText:(null==v?t.getName(e):isFinite(v)?_t(v):v)+""});var m=this.getTextContent();if(m){var x=l.normal;m.__align=m.style.align,m.__verticalAlign=m.style.verticalAlign,m.__position=x.get("position")||"middle";var _=x.get("distance");X(_)||(_=[_,_]),m.__labelDistance=_}this.setTextConfig({position:null,local:!0,inside:!1}),ct(this,d,h,c)},e.prototype.highlight=function(){nt(this)},e.prototype.downplay=function(){it(this)},e.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},e.prototype.setLinePoints=function(t){var e=this.childOfName("line");pp(e.shape,t),e.dirty()},e.prototype.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(e||n||i&&!i.ignore){for(var o=1,r=this.parent;r;)r.scaleX&&(o/=r.scaleX),r=r.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=di([],u,l);if(li(c,c),e&&(e.setPosition(l),w(e,0),e.scaleX=e.scaleY=o*s,e.markRedraw()),n&&(n.setPosition(u),w(n,1),n.scaleX=n.scaleY=o*s,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,h=void 0,p=i.__labelDistance,g=p[0]*o,f=p[1]*o,y=s/2,v=a.tangentAt(y),m=[v[1],-v[0]],x=a.pointAt(y);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]);var _=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0]<l[0]&&(b=Math.PI+b),i.rotation=b}var S=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-f,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=f,h="top";break;default:S=0,h="middle"}switch(i.__position){case"end":i.x=c[0]*g+u[0],i.y=c[1]*f+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*g+l[0],i.y=-c[1]*f+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=g*_+l[0],i.y=l[1]+S,d=v[0]<0?"right":"left",i.originX=-g*_,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-g*_+u[0],i.y=u[1]+S,d=v[0]>=0?"right":"left",i.originX=g*_,i.originY=-S}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||h,align:i.__align||d})}}}function w(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}($);const fp=gp;function yp(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:st(e)}}function vp(t){return isNaN(t[0])||isNaN(t[1])}function mp(t){return t&&!vp(t[0])&&!vp(t[1])}const xp=function(){function t(t){this.group=new $,this._LineCtor=t||fp}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,o=n._lineData;n._lineData=t,o||i.removeAll();var r=yp(t);t.diff(o).add((function(n){e._doAdd(t,n,r)})).update((function(n,i){e._doUpdate(o,t,i,n,r)})).remove((function(t){i.remove(o.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yp(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i<t.end;i++){if(mp(e.getItemLayout(i))){var o=new this._LineCtor(e,i,this._seriesScope);o.traverse(n),this.group.add(o),e.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(t){gt(this._progressiveEls||this.group,t)},t.prototype._doAdd=function(t,e,n){if(mp(t.getItemLayout(e))){var i=new this._LineCtor(t,e,n);t.setItemGraphicEl(e,i),this.group.add(i)}},t.prototype._doUpdate=function(t,e,n,i,o){var r=t.getItemGraphicEl(n);mp(e.getItemLayout(i))?(r?r.updateData(e,i,o):r=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,r),this.group.add(r)):this.group.remove(r)},t}();var _p=[],bp=[],Sp=[],wp=yi,Mp=vi,Ip=Math.abs;function Ap(t,e,n){for(var i,o=t[0],r=t[1],a=t[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){_p[0]=wp(o[0],r[0],a[0],c),_p[1]=wp(o[1],r[1],a[1],c),(p=Ip(Mp(_p,e)-l))<s&&(s=p,i=c)}for(var d=0;d<32;d++){var h=i+u;bp[0]=wp(o[0],r[0],a[0],i),bp[1]=wp(o[1],r[1],a[1],i),Sp[0]=wp(o[0],r[0],a[0],h),Sp[1]=wp(o[1],r[1],a[1],h);var p=Mp(bp,e)-l;if(Ip(p)<.01)break;var g=Mp(Sp,e)-l;u/=2,p<0?g>=0?i+=u:i-=u:g>=0?i-=u:i+=u}return i}function Cp(t,e){var n=[],i=fi,o=[[],[],[]],r=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[si(l[0]),si(l[1])],l[2]&&l.__original.push(si(l[2])));var d=l.__original;if(null!=l[2]){if(Pn(o[0],d[0]),Pn(o[1],d[2]),Pn(o[2],d[1]),u&&"none"!==u){var h=jh(t.node1),p=Ap(o,d[0],h*e);i(o[0][0],o[1][0],o[2][0],p,n),o[0][0]=n[3],o[1][0]=n[4],i(o[0][1],o[1][1],o[2][1],p,n),o[0][1]=n[3],o[1][1]=n[4]}if(c&&"none"!==c){h=jh(t.node2),p=Ap(o,d[1],h*e);i(o[0][0],o[1][0],o[2][0],p,n),o[1][0]=n[1],o[2][0]=n[2],i(o[0][1],o[1][1],o[2][1],p,n),o[1][1]=n[1],o[2][1]=n[2]}Pn(l[0],o[0]),Pn(l[1],o[2]),Pn(l[2],o[1])}else{if(Pn(r[0],d[0]),Pn(r[1],d[1]),di(a,r[1],r[0]),li(a,a),u&&"none"!==u){h=jh(t.node1);gi(r[0],r[0],a,h*e)}if(c&&"none"!==c){h=jh(t.node2);gi(r[1],r[1],a,-h*e)}Pn(l[0],r[0]),Pn(l[1],r[1])}}))}function Tp(t){return"view"===t.type}const Dp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(t,e){var n=new Ba,i=new xp,o=this.group;this._controller=new Pu(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem;this._model=t;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(Tp(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):ot(s,l,t)}Cp(t.getGraph(),Uh(t));var u=t.getData();r.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,h=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,o=e.getGraphicEl(),r=e.getModel();if(o){o.off("drag").off("dragend");var a=r.get("draggable");a&&o.on("drag",(function(r){switch(p){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,h),d.setFixed(n),u.setItemLayout(n,[o.x,o.y]);break;case"circular":u.setItemLayout(n,[o.x,o.y]),e.setLayout({fixed:!0},!0),Jh(t,"symbolSize",e,[r.offsetX,r.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[o.x,o.y]),Xh(t.getGraph(),t),i.updateLayout(t)}})).on("dragend",(function(){d&&d.setUnfixed(n)})),o.setDraggable(a,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(dt(o).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(dt(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var g="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),f=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(t){Qh(t,g,f,y)})),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},e.prototype._updateController=function(t,e,n){var i=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker((function(e,i,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(i,o)&&!Vu(e,n,t)})),Tp(t.coordinateSystem)?(o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){ku(r,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){Nu(r,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),Cp(t.getGraph(),Uh(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):o.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=Uh(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},e.prototype.updateLayout=function(t){Cp(t.getGraph(),Uh(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(At);function Lp(t,e,n,i,o){for(var r=new mi(i),a=0;a<t.length;a++)r.addNode(Me(t[a].id,t[a].name,a),a);var s=[],l=[],u=0;for(a=0;a<e.length;a++){var c=e[a],d=c.source,h=c.target;r.addEdge(d,h,u)&&(l.push(c),s.push(Me(Wn(c.id,null),d+" > "+h)),u++)}var p,g=n.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=J(t,n);else{var f=xi.get(g),y=f&&f.dimensions||[];De(y,"value")<0&&y.concat(["value"]);var v=ne(t,{coordDimensions:y,encodeDefine:n.getEncode()}).dimensions;(p=new ie(v,n)).initData(t)}var m=new ie(["value"],n);return m.initData(l,s),o&&o(p,m),Fn({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}const Pp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return K(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new il(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),se(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],o=t.data||t.nodes||[],r=this;if(o&&i){Eh(n=this)&&(n.__curvenessList=[],n.__edgeMap={},Bh(n));var a=Lp(o,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Xe.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=o,i}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=o,t.getModel=i,t}))}));return u(a.edges,(function(t){!function(t,e,n,i){if(Eh(n)){var o=Gh(t,e,n),r=n.__edgeMap,a=r[Wh(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),o=this.getDataParams(t,n),r=i.graph.getEdgeByIndex(t),a=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),nn("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return _i({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=r(this.option.categories||[],(function(t){return null!=t.value?t:p({value:0},t)})),e=new ie(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(tt);var kp={type:"graphRoam",event:"graphRoam",update:"none"};var Np=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0};const Op=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return K(e,t),e.prototype.getDefaultShape=function(){return new Np},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-n(a)*r*(r>=o/3?1:2),l=e.y-i(a)*r*(r>=o/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*r,e.y+i(a)*r),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(a)*r,e.y-i(a)*r),t.lineTo(s,l)},e}(_);function Rp(t,e){var n=null==t?"":t+"";return e&&(c(e)?n=e.replace("{value}",n):P(e)&&(n=e(t))),n}var Vp=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return K(n,t),n.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),r=Math.min(i,o);return{cx:Ut(n[0],e.getWidth()),cy:Ut(n[1],e.getHeight()),r:Ut(t.get("radius"),r/2)}}(t,n);this._renderMain(t,e,n,i,o),this._data=t.getData()},n.prototype.dispose=function(){},n.prototype._renderMain=function(t,e,n,i,o){var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),d=c.get("roundCap")?_s:bt,h=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),f=[s,l];Yt(f,!a);for(var y=(l=f[1])-(s=f[0]),v=s,m=[],x=0;h&&x<i.length;x++){var _=new d({shape:{startAngle:v,endAngle:l=s+y*Math.min(Math.max(i[x][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-g,r:o.r},silent:!0});_.setStyle({fill:i[x][1]}),_.setStyle(p.getLineStyle(["color","width"])),m.push(_),v=l}m.reverse(),u(m,(function(t){return r.add(t)}));var b=function(t){if(t<=0)return i[0][1];var e;for(e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};this._renderTicks(t,e,n,b,o,s,l,a,g),this._renderTitleAndDetail(t,e,n,b,o),this._renderAnchor(t,o),this._renderPointer(t,e,n,b,o,s,l,a,g)},n.prototype._renderTicks=function(t,e,n,i,o,r,a,s,l){for(var u,c,d=this.group,h=o.cx,p=o.cy,g=o.r,f=+t.get("min"),y=+t.get("max"),v=t.getModel("splitLine"),x=t.getModel("axisTick"),_=t.getModel("axisLabel"),b=t.get("splitNumber"),S=x.get("splitNumber"),w=Ut(v.get("length"),g),M=Ut(x.get("length"),g),I=r,A=(a-r)/b,C=A/S,T=v.getModel("lineStyle").getLineStyle(),D=x.getModel("lineStyle").getLineStyle(),L=v.get("distance"),P=0;P<=b;P++){if(u=Math.cos(I),c=Math.sin(I),v.get("show")){var k=new Re({shape:{x1:u*(g-(N=L?L+l:l))+h,y1:c*(g-N)+p,x2:u*(g-w-N)+h,y2:c*(g-w-N)+p},style:T,silent:!0});"auto"===T.stroke&&k.setStyle({stroke:i(P/b)}),d.add(k)}if(_.get("show")){var N=_.get("distance")+L,O=Rp(_t(P/b*(y-f)+f),_.get("formatter")),R=i(P/b),V=u*(g-w-N)+h,z=c*(g-w-N)+p,E=_.get("rotate"),B=0;"radial"===E?(B=-I+2*Math.PI)>Math.PI/2&&(B+=Math.PI):"tangential"===E?B=-I-Math.PI/2:m(E)&&(B=E*Math.PI/180),0===B?d.add(new Tt({style:Be(_,{text:O,x:V,y:z,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0})):d.add(new Tt({style:Be(_,{text:O,x:V,y:z,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:V,originY:z,rotation:B}))}if(x.get("show")&&P!==b){N=(N=x.get("distance"))?N+l:l;for(var G=0;G<=S;G++){u=Math.cos(I),c=Math.sin(I);var W=new Re({shape:{x1:u*(g-N)+h,y1:c*(g-N)+p,x2:u*(g-M-N)+h,y2:c*(g-M-N)+p},silent:!0,style:D});"auto"===D.stroke&&W.setStyle({stroke:i((P+G/S)/b)}),d.add(W),I+=C}I-=C}else I+=A}},n.prototype._renderPointer=function(t,n,i,o,r,a,s,l,u){var c=this.group,d=this._data,h=this._progressEls,g=[],f=t.get(["pointer","show"]),y=t.getModel("progress"),v=y.get("show"),m=t.getData(),x=m.mapDimension("value"),_=+t.get("min"),b=+t.get("max"),S=[_,b],w=[a,s];function M(e,n){var i,o=m.getItemModel(e).getModel("pointer"),a=Ut(o.get("width"),r.r),s=Ut(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=Ut(u[0],r.r),d=Ut(u[1],r.r),h=o.get("keepAspect");return(i=l?Q(l,c-a/2,d-s,a,s,null,h):new Op({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function I(t,e){var n=y.get("roundCap")?_s:bt,i=y.get("overlap"),o=i?y.get("width"):u/m.count(),s=i?r.r-o:r.r-(t+1)*o,c=i?r.r:r.r-t*o,d=new n({shape:{startAngle:a,endAngle:e,cx:r.cx,cy:r.cy,clockwise:l,r0:s,r:c}});return i&&(d.z2=b-m.get(x,t)%b),d}(v||f)&&(m.diff(d).add((function(e){var n=m.get(x,e);if(f){var i=M(e,a);at(i,{rotation:-((isNaN(+n)?w[0]:Xt(n,S,w,!0))+Math.PI/2)},t),c.add(i),m.setItemGraphicEl(e,i)}if(v){var o=I(e,a),r=y.get("clip");at(o,{shape:{endAngle:Xt(n,S,w,r)}},t),c.add(o),bi(t.seriesIndex,m.dataType,e,o),g[e]=o}})).update((function(e,n){var i=m.get(x,e);if(f){var o=d.getItemGraphicEl(n),r=o?o.rotation:a,s=M(e,r);s.rotation=r,ot(s,{rotation:-((isNaN(+i)?w[0]:Xt(i,S,w,!0))+Math.PI/2)},t),c.add(s),m.setItemGraphicEl(e,s)}if(v){var l=h[n],u=I(e,l?l.shape.endAngle:a),p=y.get("clip");ot(u,{shape:{endAngle:Xt(i,S,w,p)}},t),c.add(u),bi(t.seriesIndex,m.dataType,e,u),g[e]=u}})).execute(),m.each((function(t){var n=m.getItemModel(t),i=n.getModel("emphasis"),r=i.get("focus"),a=i.get("blurScope"),s=i.get("disabled");if(f){var l=m.getItemGraphicEl(t),u=m.getItemVisual(t,"style"),c=u.fill;if(l instanceof e){var d=l.style;l.useStyle(p({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},u))}else l.useStyle(u),"pointer"!==l.type&&l.setColor(c);l.setStyle(n.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===l.style.fill&&l.setStyle("fill",o(Xt(m.get(x,t),S,[0,1],!0))),l.z2EmphasisLift=0,Mt(l,n),ct(l,r,a,s)}if(v){var h=g[t];h.useStyle(m.getItemVisual(t,"style")),h.setStyle(n.getModel(["progress","itemStyle"]).getItemStyle()),h.z2EmphasisLift=0,Mt(h,n),ct(h,r,a,s)}})),this._progressEls=g)},n.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),o=n.get("icon"),r=n.get("offsetCenter"),a=n.get("keepAspect"),s=Q(o,e.cx-i/2+Ut(r[0],e.r),e.cy-i/2+Ut(r[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},n.prototype._renderTitleAndDetail=function(t,e,n,i,o){var r=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new $,d=[],h=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new Tt({silent:!0}),h[t]=new Tt({silent:!0})})).update((function(t,e){d[t]=r._titleEls[e],h[t]=r._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),r=a.get(s,e),f=new $,y=i(Xt(r,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var m=v.get("offsetCenter"),x=o.cx+Ut(m[0],o.r),_=o.cy+Ut(m[1],o.r);(T=d[e]).attr({z2:g?0:2,style:Be(v,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),f.add(T)}var b=n.getModel("detail");if(b.get("show")){var S=b.get("offsetCenter"),w=o.cx+Ut(S[0],o.r),M=o.cy+Ut(S[1],o.r),I=Ut(b.get("width"),o.r),A=Ut(b.get("height"),o.r),C=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,T=h[e],D=b.get("formatter");T.attr({z2:g?0:2,style:Be(b,{x:w,y:M,text:Rp(r,D),width:isNaN(I)?null:I,height:isNaN(A)?null:A,align:"center",verticalAlign:"middle"},{inheritColor:C})}),Bt(T,{normal:b},r,(function(t){return Rp(t,D)})),p&&Si(T,e,a,t,{getFormattedLabel:function(t,e,n,i,o,a){return Rp(a?a.interpolatedValue:r,D)}}),f.add(T)}c.add(f)})),this.group.add(c),this._titleEls=d,this._detailEls=h},n.type="gauge",n}(At);const zp=Vp;const Ep=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return K(e,t),e.prototype.getInitialData=function(t,e){return nl(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(tt);var Bp=["itemStyle","opacity"],Gp=function(t){function e(e,n){var i=t.call(this)||this,o=i,r=new $t,a=new Tt;return o.setTextContent(a),i.setTextGuideLine(r),i.updateData(e,n,!0),i}return K(e,t),e.prototype.updateData=function(t,e,n){var i=this,o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=r.getModel("emphasis"),l=r.get(Bp);l=null==l?1:l,n||rt(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,at(i,{style:{opacity:l}},o,e)):ot(i,{style:{opacity:l},shape:{points:a.points}},o,e),Mt(i,r),this._updateLabel(t,e),ct(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),r=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;ut(o,st(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new jt(c[0][0],c[0][1]):null},ot(o,{style:{x:s.x,y:s.y}},r,e),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Qt(n,ee(a),{stroke:u})},e}(Qe);const Wp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return K(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this._data,r=this.group;i.diff(o).add((function(t){var e=new Gp(i,t);i.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var n=o.getItemGraphicEl(e);n.updateData(i,t),r.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){var n=o.getItemGraphicEl(e);Et(n,t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(At);const Fp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new il(oe(this.getData,this),oe(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return nl(this,{coordDimensions:["value"],encodeDefaulter:Wt(re,this)})},e.prototype._defaultLabelLine=function(t){se(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),o=n.mapDimension("value"),r=n.getSum(o);return i.percent=r?+(n.get(o,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(tt);function Hp(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),o=t.get("sort"),r=function(t,e){return Zt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=r.width,l=r.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),o=[],r="ascending"===e,a=0,s=t.count();a<s;a++)o[a]=a;return P(e)?o.sort(e):"none"!==e&&o.sort((function(t,e){return r?i[t]-i[e]:i[e]-i[t]})),o}(n,o),c=r.x,d=r.y,h="horizontal"===a?[Ut(t.get("minSize"),l),Ut(t.get("maxSize"),l)]:[Ut(t.get("minSize"),s),Ut(t.get("maxSize"),s)],p=n.getDataExtent(i),g=t.get("min"),f=t.get("max");null==g&&(g=Math.min(p[0],0)),null==f&&(f=p[1]);var y=t.get("funnelAlign"),v=t.get("gap"),m=(("horizontal"===a?s:l)-v*(n.count()-1))/n.count(),x=function(t,e){if("horizontal"===a){var o=n.get(i,t)||0,r=Xt(o,[g,f],h,!0),u=void 0;switch(y){case"top":u=d;break;case"center":u=d+(l-r)/2;break;case"bottom":u=d+(l-r)}return[[e,u],[e,u+r]]}var p,v=n.get(i,t)||0,m=Xt(v,[g,f],h,!0);switch(y){case"left":p=c;break;case"center":p=c+(s-m)/2;break;case"right":p=c+s-m}return[[p,e],[p+m,e]]};"ascending"===o&&(m=-m,v=-v,"horizontal"===a?c+=s:d+=l,u=u.reverse());for(var _=0;_<u.length;_++){var b=u[_],S=u[_+1],w=n.getItemModel(b);if("horizontal"===a){var M=w.get(["itemStyle","width"]);null==M?M=m:(M=Ut(M,s),"ascending"===o&&(M=-M));var I=x(b,c),A=x(S,c+M);c+=M+v,n.setItemLayout(b,{points:I.concat(A.slice().reverse())})}else{var C=w.get(["itemStyle","height"]);null==C?C=m:(C=Ut(C,l),"ascending"===o&&(C=-C));I=x(b,d),A=x(S,d+C);d+=C+v,n.setItemLayout(b,{points:I.concat(A.slice().reverse())})}}!function(t){var e=t.hostModel.get("orient");t.each((function(n){var i,o,r,a,s=t.getItemModel(n),l=s.getModel("label").get("position"),u=s.getModel("labelLine"),c=t.getItemLayout(n),d=c.points,h="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(h)"insideLeft"===l?(o=(d[0][0]+d[3][0])/2+5,r=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===l?(o=(d[1][0]+d[2][0])/2-5,r=(d[1][1]+d[2][1])/2,i="right"):(o=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,r=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),a=[[o,r],[o,r]];else{var p=void 0,g=void 0,f=void 0,y=void 0,v=u.get("length");"left"===l?(p=(d[3][0]+d[0][0])/2,g=(d[3][1]+d[0][1])/2,o=(f=p-v)-5,i="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,o=(f=p+v)+5,i="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,r=(y=(g=(d[3][1]+d[0][1])/2)-v)-5,i="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,r=(y=(g=(d[1][1]+d[2][1])/2)+v)+5,i="center"):"rightTop"===l?(p="horizontal"===e?d[3][0]:d[1][0],g="horizontal"===e?d[3][1]:d[1][1],"horizontal"===e?(r=(y=g-v)-5,i="center"):(o=(f=p+v)+5,i="top")):"rightBottom"===l?(p=d[2][0],g=d[2][1],"horizontal"===e?(r=(y=g+v)+5,i="center"):(o=(f=p+v)+5,i="bottom")):"leftTop"===l?(p=d[0][0],g="horizontal"===e?d[0][1]:d[1][1],"horizontal"===e?(r=(y=g-v)-5,i="center"):(o=(f=p-v)-5,i="right")):"leftBottom"===l?(p="horizontal"===e?d[1][0]:d[3][0],g="horizontal"===e?d[1][1]:d[2][1],"horizontal"===e?(r=(y=g+v)+5,i="center"):(o=(f=p-v)-5,i="right")):(p=(d[1][0]+d[2][0])/2,g=(d[1][1]+d[2][1])/2,"horizontal"===e?(r=(y=g+v)+5,i="center"):(o=(f=p+v)+5,i="left")),"horizontal"===e?o=f=p:r=y=g,a=[[p,g],[f,y]]}c.label={linePoints:a,x:o,y:r,verticalAlign:"middle",textAlign:i,inside:h}}))}(n)}))}function Yp(t,e,n,i){for(var o,r=[],a=0;a<n.length;a++){var s=n[a],l=t.get(t.mapDimension(s),e);o=l,("category"===i.getAxis(s).type?null==o:null==o||isNaN(o))||r.push(i.dataToPoint(l,s))}return r}function Xp(t,e,n,i,o){var r=Yp(t,n,i,o),a=new $t({shape:{points:r},z2:10});return e.add(a),t.setItemGraphicEl(n,a),a}function Zp(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),e=wi(e),Mi(e)&&(e=0),{smooth:e}}function Up(t,e,n,i){t.useStyle(e.getItemVisual(n,"style")),t.style.fill=null,t.setShape("smooth",i.smooth);var o=e.getItemModel(n),r=o.getModel("emphasis");Mt(t,o,"lineStyle"),ct(t,r.get("focus"),r.get("blurScope"),r.get("disabled"))}const jp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._dataGroup=new $,n._initialized=!1,n}return K(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var o=this._dataGroup,r=t.getData(),a=this._data,s=t.coordinateSystem,l=s.dimensions,u=Zp(t);if(r.diff(a).add((function(t){Up(Xp(r,o,t,l,s),r,t,u)})).update((function(e,n){var i=a.getItemGraphicEl(n),o=Yp(r,e,l,s);r.setItemGraphicEl(e,i),ot(i,{shape:{points:o}},t,e),rt(i),Up(i,r,e,u)})).remove((function(t){var e=a.getItemGraphicEl(t);o.remove(e)})).execute(),!this._initialized){this._initialized=!0;var c=function(t,e,n){var i=t.model,o=t.getRect(),r=new xt({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),a="horizontal"===i.get("layout")?"width":"height";return r.setShape(a,0),at(r,{shape:{width:o.width,height:o.height}},e,n),r}(s,t,(function(){setTimeout((function(){o.removeClipPath()}))}));o.setClipPath(c)}this._data=r},e.prototype.incrementalPrepareRender=function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,n){for(var i=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=Zp(e),s=this._progressiveEls=[],l=t.start;l<t.end;l++){var u=Xp(i,this._dataGroup,l,r,o);u.incremental=!0,Up(u,i,l,a),s.push(u)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(At);function qp(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var n={};return u(e.dimensions,(function(t){var e=+t.replace("dim","");n[t]=e})),n}}const Kp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return K(e,t),e.prototype.getInitialData=function(t,e){return J(null,this,{useEncodeDefaulter:oe(qp,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var e=this.coordinateSystem,n=this.getData(),i=[];return e.eachActiveState(n,(function(e,o){t===e&&i.push(n.getRawIndex(o))})),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(tt);var Jp=["lineStyle","opacity"];const $p={seriesType:"parallel",reset:function(t,e){var n=t.coordinateSystem,i={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,e){n.eachActiveState(e,(function(t,n){var o=i[t];if("normal"===t&&e.hasItemOption){var r=e.getItemModel(n).get(Jp,!0);null!=r&&(o=r)}e.ensureUniqueItemVisual(n,"style").opacity=o}),t.start,t.end)}}}};function Qp(t){!function(t){if(t.parallel)return;var e=!1;u(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}(t),function(t){var e=Yn(t.parallelAxis);u(e,(function(e){if(Z(e)){var n=e.parallelIndex||0,i=Yn(t.parallel)[n];i&&i.parallelAxisDefault&&fe(e,i.parallelAxisDefault,!1)}}))}(t)}var tg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},u(eg,(function(t,e){n.getZr().on(e,this._handlers[e]=oe(t,this))}),this)),Ii(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,e){Ai(this,"_throttledDispatchExpand"),u(this._handlers,(function(t,n){e.getZr().off(n,t)})),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(p({type:"parallelAxisExpand"},t))},e.type="parallel",e}(je),eg={mousedown:function(t){ng(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(ng(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&ng(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function ng(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}const ig=tg;const og=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&fe(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){u(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=y(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);u(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(de);const rg=function(t){function e(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.type=o||"value",a.axisIndex=r,a}return K(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(we);function ag(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0];if(null!=o&&(o=lg(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=lg(s,[0,a]),o=r=lg(s,[o,r]),i=0}e[0]=lg(e[0],n),e[1]=lg(e[1],n);var l=sg(e,i);e[i]+=t;var u,c=o||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,e[i]=lg(e[i],d),u=sg(e,i),null!=o&&(u.sign!==l.sign||u.span<o)&&(e[1-i]=e[i]+l.sign*o),u=sg(e,i),null!=r&&u.span>r&&(e[1-i]=e[i]+u.sign*r),e}function sg(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function lg(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var ug=u,cg=Math.min,dg=Math.max,hg=Math.floor,pg=Math.ceil,gg=_t,fg=Math.PI;function yg(t,e){return cg(dg(t,e[0]),e[1])}function vg(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function mg(t,e){var n,i,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],u=r,c=!0):(n=o-(a-1-t)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}const xg=function(){function t(t,e,n){this.type="parallel",this._axesMap=qe(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,o=t.parallelAxisIndex;ug(i,(function(t,n){var i=o[n],r=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new rg(t,Le(r),[0,0],r.get("type"),i)),s="category"===a.type;a.onBand=s&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],a=t[o];return r>=n&&r<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();ug(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Oe(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Zt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],o=["width","height"],r=e.get("layout"),a="horizontal"===r?0:1,s=n[o[a]],l=[0,s],u=this.dimensions.length,c=yg(e.get("axisExpandWidth"),l),d=yg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,p=e.get("axisExpandWindow");p?(t=yg(p[1]-p[0],l),p[1]=p[0]+t):(t=yg(c*(d-1),l),(p=[c*(e.get("axisExpandCenter")||hg(u/2))-t/2])[1]=p[0]+t);var g=(s-t)/(u-d);g<3&&(g=0);var f=[hg(gg(p[0]/c,1))+1,pg(gg(p[1]/c,1))-1],y=g/c*p[0];return{layout:r,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[o[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:p,axisCount:u,winInnerIndices:f,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),o=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),ug(n,(function(e,n){var r=(i.axisExpandable?mg:vg)(n,i),a={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:fg/2,vertical:0},l=[a[o].x+t.x,a[o].y+t.y],u=s[o],c=mn();He(c,c,u),vn(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];u(r,(function(e){a.push(t.mapDimension(e)),s.push(o.get(e).model)}));for(var l=this.hasAxisBrushed(),c=n;c<i;c++){var d=void 0;if(l){d="active";for(var h=t.getValues(a,c),p=0,g=r.length;p<g;p++){if("inactive"===s[p].getActiveState(h[p])){d="inactive";break}}}else d="normal";e(d,c)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},t.prototype.axisCoordToPoint=function(t,e){var n=this._axesLayout[e];return Ci([t,0],n.transform)},t.prototype.getAxisLayout=function(t){return L(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),o=i[1]-i[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var a,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<o*c[0]?(l="jump",a=s-o*c[2]):d&&u&&s>o*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?ag(a,i,r,"all"):l="none";else{var h=i[1]-i[0];(i=[dg(0,r[1]*s/h-h/2)])[1]=cg(r[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:l}},t}();const _g={create:function(t,e){var n=[];return t.eachComponent("parallel",(function(i,o){var r=new xg(i,t,e);r.name="parallel_"+o,r.resize(i,e),i.coordinateSystem=r,r.model=i,n.push(r)})),t.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",he).models[0];t.coordinateSystem=e.coordinateSystem}})),n}};var bg=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return K(e,t),e.prototype.getAreaSelectStyle=function(){return Un([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=L(t);if(e)for(var n=e.length-1;n>=0;n--)Ti(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"},e}(de);pe(bg,ge);const Sg=bg;var wg=!0,Mg=Math.min,Ig=Math.max,Ag=Math.pow,Cg="globalPan",Tg={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Dg={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Lg={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},Pg=0,kg=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new $,n._uid="brushController_"+Pg++,u(af,(function(t,e){this._handlers[e]=oe(t,this)}),n),n}return K(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||function(t,e,n){Cu(t)[e]=n}(e,Cg,this._uid),u(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=fe(L(Lg),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;!function(t,e,n){var i=Cu(t);i[e]===n&&(i[e]=null)}(t,Cg,this._uid),u(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};u(t,(function(t){e[t.panelId]=L(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=r(t,(function(t){return fe(L(Lg),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new jn(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):Og(i,Ng(i,s));zg(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),Wg(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(cn);function Ng(t,e){var n=lf[e.brushType].createCover(t,e);return n.__brushOption=e,Vg(n,e),t.group.add(n),n}function Og(t,e){var n=Eg(e);return n.endCreating&&(n.endCreating(t,e),Vg(e,e.__brushOption)),e}function Rg(t,e){var n=e.__brushOption;Eg(e).updateCoverShape(t,e,n.range,n)}function Vg(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function zg(t,e){Eg(e).updateCommon(t,e),Rg(t,e)}function Eg(t){return lf[t.__brushOption.brushType]}function Bg(t,e,n){var i,o=t._panels;if(!o)return wg;var r=t._transform;return u(o,(function(t){t.isTargetByCursor(e,n,r)&&(i=t)})),i}function Gg(t,e){var n=t._panels;if(!n)return wg;var i=e.__brushOption.panelId;return null!=i?n[i]:wg}function Wg(t){var e=t._covers,n=e.length;return u(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function Fg(t,e){var n=r(t._covers,(function(t){var e=t.__brushOption,n=L(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Hg(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Yg(t,e,n,i){var o=new $;return o.add(new xt({name:"main",style:jg(n),silent:!0,draggable:!0,cursor:"move",drift:Wt(Jg,t,e,o,["n","s","w","e"]),ondragend:Wt(Fg,e,{isEnd:!0})})),u(i,(function(n){o.add(new xt({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Wt(Jg,t,e,o,n),ondragend:Wt(Fg,e,{isEnd:!0})}))})),o}function Xg(t,e,n,i){var o=i.brushStyle.lineWidth||0,r=Ig(o,6),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,c=n[0][1],d=n[1][1],h=c-r+o/2,p=d-r+o/2,g=c-a,f=d-s,y=g+o,v=f+o;Ug(t,e,"main",a,s,g,f),i.transformable&&(Ug(t,e,"w",l,u,r,v),Ug(t,e,"e",h,u,r,v),Ug(t,e,"n",l,u,y,r),Ug(t,e,"s",l,p,y,r),Ug(t,e,"nw",l,u,r,r),Ug(t,e,"ne",h,u,r,r),Ug(t,e,"sw",l,p,r,r),Ug(t,e,"se",h,p,r,r))}function Zg(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(jg(n)),o.attr({silent:!i,cursor:i?"move":"default"}),u([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var o=e.childOfName(n.join("")),r=1===n.length?Kg(t,n[0]):function(t,e){var n=[Kg(t,e[0]),Kg(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);o&&o.attr({silent:!i,invisible:!i,cursor:i?Dg[r]+"-resize":null})}))}function Ug(t,e,n,i,o,r,a){var s,l,u,c,d,h=e.childOfName(n);h&&h.setShape((s=tf(t,e,[[i,o],[i+r,o+a]]),l=Mg(s[0][0],s[1][0]),u=Mg(s[0][1],s[1][1]),c=Ig(s[0][0],s[1][0]),d=Ig(s[0][1],s[1][1]),{x:l,y:u,width:c-l,height:d-u}))}function jg(t){return wt({strokeNoScale:!0},t.brushStyle)}function qg(t,e,n,i){var o=[Mg(t,n),Mg(e,i)],r=[Ig(t,n),Ig(e,i)];return[[o[0],r[0]],[o[1],r[1]]]}function Kg(t,e){var n=Di({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return Li(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function Jg(t,e,n,i,o,r){var a=n.__brushOption,s=t.toRectRange(a.range),l=Qg(e,o,r);u(i,(function(t){var e=Tg[t];s[e[0]][e[1]]+=l[e[0]]})),a.range=t.fromRectRange(qg(s[0][0],s[1][0],s[0][1],s[1][1])),zg(e,n),Fg(e,{isEnd:!1})}function $g(t,e,n,i){var o=e.__brushOption.range,r=Qg(t,n,i);u(o,(function(t){t[0]+=r[0],t[1]+=r[1]})),zg(t,e),Fg(t,{isEnd:!1})}function Qg(t,e,n){var i=t.group,o=i.transformCoordToLocal(e,n),r=i.transformCoordToLocal(0,0);return[o[0]-r[0],o[1]-r[1]]}function tf(t,e,n){var i=Gg(t,e);return i&&i!==wg?i.clipPath(n,t._transform):L(n)}function ef(t){var e=t.event;e.preventDefault&&e.preventDefault()}function nf(t,e,n){return t.childOfName("main").contain(e,n)}function of(t,e,n,i){var o,r=t._creatingCover,a=t._creatingPanel,s=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],o=n[0]-i[0],r=n[1]-i[1];return Ag(o*o+r*r,.5)>6}(t)||r){if(a&&!r){"single"===s.brushMode&&Wg(t);var l=L(s);l.brushType=rf(l.brushType,a),l.panelId=a===wg?null:a.panelId,r=t._creatingCover=Ng(t,l),t._covers.push(r)}if(r){var u=lf[rf(t._brushType,a)];r.__brushOption.range=u.getCreatingRange(tf(t,r,t._track)),i&&(Og(t,r),u.updateCommon(t,r)),Rg(t,r),o={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&Bg(t,e,n)&&Wg(t)&&(o={isEnd:i,removeOnClick:!0});return o}function rf(t,e){return"auto"===t?e.defaultBrushType:t}var af={mousedown:function(t){if(this._dragging)sf(this,t);else if(!t.target||!t.target.draggable){ef(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Bg(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=Bg(t,e,n);if(!t._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(r&&(r===wg||s.panelId===r.panelId)&&lf[s.brushType].contain(o[a],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}(this,t,i),this._dragging){ef(t);var o=of(this,t,i,!1);o&&Fg(this,o)}},mouseup:function(t){sf(this,t)}};function sf(t,e){if(t._dragging){ef(e);var n=e.offsetX,i=e.offsetY,o=t.group.transformCoordToLocal(n,i),r=of(t,e,o,!0);t._dragging=!1,t._track=[],t._creatingCover=null,r&&Fg(t,r)}}var lf={lineX:uf(0),lineY:uf(1),rect:{createCover:function(t,e){function n(t){return t}return Yg({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=Hg(t);return qg(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){Xg(t,e,n,i)},updateCommon:Zg,contain:nf},polygon:{createCover:function(t,e){var n=new $;return n.add(new $t({name:"main",style:jg(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Qe({name:"main",draggable:!0,drift:Wt($g,t,e),ondragend:Wt(Fg,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:tf(t,e,n)})},updateCommon:Zg,contain:nf}};function uf(t){return{createCover:function(e,n){return Yg({toRectRange:function(e){var n=[e,[0,100]];return t&&n.reverse(),n},fromRectRange:function(e){return e[t]}},e,n,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var n=Hg(e);return[Mg(n[0][t],n[1][t]),Ig(n[0][t],n[1][t])]},updateCoverShape:function(e,n,i,o){var r,a=Gg(e,n);if(a!==wg&&a.getLinearBrushOtherExtent)r=a.getLinearBrushOtherExtent(t);else{var s=e._zr;r=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,r];t&&l.reverse(),Xg(e,n,l,o)},updateCommon:Zg,contain:nf}}const cf=kg;function df(t){return t=gf(t),function(e){return Pi(e,t)}}function hf(t,e){return t=gf(t),function(n){var i=null!=e?e:n,o=i?t.width:t.height,r=i?t.x:t.y;return[r,r+(o||0)]}}function pf(t,e,n){var i=gf(t);return function(t,o){return i.contain(o[0],o[1])&&!Vu(t,e,n)}}function gf(t){return ce.create(t)}var ff=["axisLine","axisTickLabel","axisName"];const yf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(e,n){t.prototype.init.apply(this,arguments),(this._brushController=new cf(n.getZr())).on("brush",oe(this._onBrush,this))},e.prototype.render=function(t,e,n,i){if(!function(t,e,n){return n&&"axisAreaSelect"===n.type&&e.findComponents({mainType:"parallelAxis",query:n})[0]===t}(t,e,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new $,this.group.add(this._axisGroup),t.get("show")){var r=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),a=r.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,c=t.axis.dim,d=a.getAxisLayout(c),h=p({strokeContainThreshold:l},d),g=new Wl(t,h);u(ff,g.add,g),this._axisGroup.add(g.getGroup()),this._refreshBrushController(h,s,t,r,l,n),Ke(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,e,n,i,o,a){var s=n.axis.getExtent(),l=s[1]-s[0],u=Math.min(30,.1*Math.abs(l)),c=ce.create({x:s[0],y:-o/2,width:l,height:o});c.x-=u,c.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:df(c),isTargetByCursor:pf(c,a,i),getLinearBrushOtherExtent:hf(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return r(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}(n))},e.prototype._onBrush=function(t){var e=t.areas,n=this.axisModel,i=n.axis,o=r(e,(function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]}));(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(je);var vf={type:"axisAreaSelect",event:"axisAreaSelected"};var mf={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function xf(t){t.registerComponentView(ig),t.registerComponentModel(og),t.registerCoordinateSystem("parallel",_g),t.registerPreprocessor(Qp),t.registerComponentModel(Sg),t.registerComponentView(yf),ml(t,"parallel",Sg,mf),function(t){t.registerAction(vf,(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),t.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}))}(t)}var _f=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},bf=function(t){function e(e){return t.call(this,e)||this}return K(e,t),e.prototype.getDefaultShape=function(){return new _f},e.prototype.buildPath=function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},e.prototype.highlight=function(){nt(this)},e.prototype.downplay=function(){it(this)},e}(_);function Sf(t,e,n){switch(t.fill){case"source":t.fill=n.node1.getVisual("color"),t.decal=n.node1.getVisual("style").decal;break;case"target":t.fill=n.node2.getVisual("color"),t.decal=n.node2.getVisual("style").decal;break;case"gradient":var i=n.node1.getVisual("color"),o=n.node2.getVisual("color");c(i)&&c(o)&&(t.fill=new Pt(0,0,+("horizontal"===e),+("vertical"===e),[{color:i,offset:0},{color:o,offset:1}]))}}const wf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._focusAdjacencyDisabled=!1,n}return K(e,t),e.prototype.render=function(t,e,n){var i=this,o=t.getGraph(),r=this.group,a=t.layoutInfo,s=a.width,l=a.height,u=t.getData(),c=t.getData("edge"),d=t.get("orient");this._model=t,r.removeAll(),r.x=a.x,r.y=a.y,o.eachEdge((function(e){var n=new bf,i=dt(n);i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var o,a,u,h,p,g,f,y,v=e.getModel(),m=v.getModel("lineStyle"),x=m.get("curveness"),_=e.node1.getLayout(),b=e.node1.getModel(),S=b.get("localX"),w=b.get("localY"),M=e.node2.getLayout(),I=e.node2.getModel(),A=I.get("localX"),C=I.get("localY"),T=e.getLayout();n.shape.extent=Math.max(1,T.dy),n.shape.orient=d,"vertical"===d?(o=(null!=S?S*s:_.x)+T.sy,a=(null!=w?w*l:_.y)+_.dy,u=(null!=A?A*s:M.x)+T.ty,p=o,g=a*(1-x)+(h=null!=C?C*l:M.y)*x,f=u,y=a*x+h*(1-x)):(o=(null!=S?S*s:_.x)+_.dx,a=(null!=w?w*l:_.y)+T.sy,p=o*(1-x)+(u=null!=A?A*s:M.x)*x,g=a,f=o*x+u*(1-x),y=h=(null!=C?C*l:M.y)+T.ty),n.setShape({x1:o,y1:a,x2:u,y2:h,cpx1:p,cpy1:g,cpx2:f,cpy2:y}),n.useStyle(m.getItemStyle()),Sf(n.style,d,e);var D=""+v.get("value"),L=st(v,"edgeLabel");ut(n,L,{labelFetcher:{getFormattedLabel:function(e,n,i,o,r,a){return t.getFormattedLabel(e,n,"edge",o,te(r,L.normal&&L.normal.get("formatter"),D),a)}},labelDataIndex:e.dataIndex,defaultText:D}),n.setTextConfig({position:"inside"});var P=v.getModel("emphasis");Mt(n,v,"lineStyle",(function(t){var n=t.getItemStyle();return Sf(n,d,e),n})),r.add(n),c.setItemGraphicEl(e.dataIndex,n);var k=P.get("focus");ct(n,"adjacency"===k?e.getAdjacentDataIndices():"trajectory"===k?e.getTrajectoryDataIndices():k,P.get("blurScope"),P.get("disabled"))})),o.eachNode((function(e){var n=e.getLayout(),i=e.getModel(),o=i.get("localX"),a=i.get("localY"),c=i.getModel("emphasis"),d=new xt({shape:{x:null!=o?o*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle(),z2:10});ut(d,st(i),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(e,n,"node")}},labelDataIndex:e.dataIndex,defaultText:e.id}),d.disableLabelAnimation=!0,d.setStyle("fill",e.getVisual("color")),d.setStyle("decal",e.getVisual("style").decal),Mt(d,i),r.add(d),u.setItemGraphicEl(e.dataIndex,d),dt(d).dataType="node";var h=c.get("focus");ct(d,"adjacency"===h?e.getAdjacentDataIndices():"trajectory"===h?e.getTrajectoryDataIndices():h,c.get("blurScope"),c.get("disabled"))})),u.eachItemGraphicEl((function(e,o){u.getItemModel(o).get("draggable")&&(e.drift=function(e,r){i._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){i._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move")})),!this._data&&t.isAnimationEnabled()&&r.setClipPath(function(t,e,n){var i=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return at(i,{shape:{width:t.width+20}},e,n),i}(r.getBoundingRect(),t,(function(){r.removeClipPath()}))),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(At);var Mf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.getInitialData=function(t,e){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var r=this.levelModels,a=0;a<o.length;a++)null!=o[a].depth&&o[a].depth>=0&&(r[o[a].depth]=new Xe(o[a],this,e));if(i&&n)return Lp(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var o=i.depth,r=n.levelModels[o];r&&(t.parentModel=r)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var o=i.depth,r=n.levelModels[o];r&&(t.parentModel=r)}return t}))})).data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var o=this.getDataParams(t,n),r=o.data,a=o.value,s=r.source+" -- "+r.target;return nn("nameValue",{name:s,value:a,noValue:i(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,n).data.name;return nn("nameValue",{name:null!=u?u+"":null,value:l,noValue:i(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(tt);const If=Mf;function Af(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),o=function(t,e){return Zt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var r=o.width,a=o.height,s=t.getGraph(),l=s.nodes,c=s.edges;!function(t){u(t,(function(t){var e=Vf(t.outEdges,Rf),n=Vf(t.inEdges,Rf),i=t.getValue()||0,o=Math.max(e,n,i);t.setLayout({value:o},!0)}))}(l),function(t,e,n,i,o,r,a,s,l){(function(t,e,n,i,o,r,a){for(var s=[],l=[],c=[],d=[],h=0,p=0;p<e.length;p++)s[p]=1;for(p=0;p<t.length;p++)l[p]=t[p].inEdges.length,0===l[p]&&c.push(t[p]);var g=-1;for(;c.length;){for(var f=0;f<c.length;f++){var y=c[f],v=y.hostGraph.data.getRawDataItem(y.dataIndex),m=null!=v.depth&&v.depth>=0;m&&v.depth>g&&(g=v.depth),y.setLayout({depth:m?v.depth:h},!0),"vertical"===r?y.setLayout({dy:n},!0):y.setLayout({dx:n},!0);for(var x=0;x<y.outEdges.length;x++){var _=y.outEdges[x];s[e.indexOf(_)]=0;var b=_.node2;0==--l[t.indexOf(b)]&&d.indexOf(b)<0&&d.push(b)}}++h,c=d,d=[]}for(p=0;p<s.length;p++)if(1===s[p])throw new Error("Sankey is a DAG, the original data has cycle!");var S=g>h-1?g:h-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var o=[],r=t,a=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:a},!0);for(var c=0;c<l.inEdges.length;c++){var d=l.inEdges[c];o.indexOf(d.node1)<0&&o.push(d.node1)}}r=o,o=[],++a}u(t,(function(t){Cf(t)||t.setLayout({depth:Math.max(0,i-t.getLayout().skNodeHeight)},!0)}))}else"justify"===e&&function(t,e){u(t,(function(t){Cf(t)||t.outEdges.length||t.setLayout({depth:e},!0)}))}(t,i)}(t,a,0,S);var w="vertical"===r?(o-n)/S:(i-n)/S;!function(t,e,n){u(t,(function(t){var i=t.getLayout().depth*e;"vertical"===n?t.setLayout({y:i},!0):t.setLayout({x:i},!0)}))}(t,w,r)})(t,e,n,o,r,s,l),function(t,e,n,i,o,r,a){var s=function(t,e){var n=[],i="vertical"===e?"y":"x",o=ki(t,(function(t){return t.getLayout()[i]}));return o.keys.sort((function(t,e){return t-e})),u(o.keys,(function(t){n.push(o.buckets.get(t))})),n}(t,a);(function(t,e,n,i,o,r){var a=1/0;u(t,(function(t){var e=t.length,s=0;u(t,(function(t){s+=t.getLayout().value}));var l="vertical"===r?(i-(e-1)*o)/s:(n-(e-1)*o)/s;l<a&&(a=l)})),u(t,(function(t){u(t,(function(t,e){var n=t.getLayout().value*a;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))}))})),u(e,(function(t){var e=+t.getValue()*a;t.setLayout({dy:e},!0)}))})(s,e,n,i,o,a),Tf(s,o,n,i,a);for(var l=1;r>0;r--)Df(s,l*=.99,a),Tf(s,o,n,i,a),zf(s,l,a),Tf(s,o,n,i,a)}(t,e,r,o,i,a,s),function(t,e){var n="vertical"===e?"x":"y";u(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),u(t,(function(t){var e=0,n=0;u(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),u(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,c,n,i,r,a,0!==y(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function Cf(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function Tf(t,e,n,i,o){var r="vertical"===o?"x":"y";u(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[r]-e.getLayout()[r]}));for(var u=0,c=t.length,d="vertical"===o?"dx":"dy",h=0;h<c;h++)(l=u-(s=t[h]).getLayout()[r])>0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]+s.getLayout()[d]+e;if((l=u-e-("vertical"===o?i:n))>0){a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(l=(s=t[h]).getLayout()[r]+s.getLayout()[d]+e-u)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]}}))}function Df(t,e,n){u(t.slice().reverse(),(function(t){u(t,(function(t){if(t.outEdges.length){var i=Vf(t.outEdges,Lf,n)/Vf(t.outEdges,Rf);if(isNaN(i)){var o=t.outEdges.length;i=o?Vf(t.outEdges,Pf,n)/o:0}if("vertical"===n){var r=t.getLayout().x+(i-Of(t,n))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(i-Of(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function Lf(t,e){return Of(t.node2,e)*t.getValue()}function Pf(t,e){return Of(t.node2,e)}function kf(t,e){return Of(t.node1,e)*t.getValue()}function Nf(t,e){return Of(t.node1,e)}function Of(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Rf(t){return t.getValue()}function Vf(t,e,n){for(var i=0,o=t.length,r=-1;++r<o;){var a=+e(t[r],n);isNaN(a)||(i+=a)}return i}function zf(t,e,n){u(t,(function(t){u(t,(function(t){if(t.inEdges.length){var i=Vf(t.inEdges,kf,n)/Vf(t.inEdges,Rf);if(isNaN(i)){var o=t.inEdges.length;i=o?Vf(t.inEdges,Nf,n)/o:0}if("vertical"===n){var r=t.getLayout().x+(i-Of(t,n))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(i-Of(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function Ef(t){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph(),n=e.nodes,i=e.edges;if(n.length){var o=1/0,r=-1/0;u(n,(function(t){var e=t.getLayout().value;e<o&&(o=e),e>r&&(r=e)})),u(n,(function(e){var n=new hh({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}i.length&&u(i,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var Bf=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",n=o.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=r.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],c="horizontal"===t.layout?0:1,d=this._baseAxisDim=l[c],h=l[1-c],g=[o,r],f=g[c].get("type"),y=g[1-c].get("type"),v=t.data;if(v&&i){var m=[];u(v,(function(t,e){var n;X(t)?(n=t.slice(),t.unshift(e)):X(t.value)?((n=p({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,m.push(n)})),t.data=m}var x=this.defaultValueDimensions,_=[{name:d,type:Ni(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ni(y),dimsDef:x.slice()}];return nl(this,{coordDimensions:_,dimensionsCount:x.length+1,encodeDefaulter:Wt(Oi,_,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),Gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return K(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(tt);pe(Gf,Bf,!0);const Wf=Gf;var Ff=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(r).add((function(t){if(i.hasValue(t)){var e=Xf(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),o.add(e)}})).update((function(t,e){var n=r.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(rt(n),Zf(s,n,i,t)):n=Xf(s,i,t,a),o.add(n),i.setItemGraphicEl(t,n)}else o.remove(n)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(At),Hf=function(){},Yf=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return K(e,t),e.prototype.getDefaultShape=function(){return new Hf},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(_);function Xf(t,e,n,i,o){var r=t.ends,a=new Yf({shape:{points:o?Uf(r,i,t):r}});return Zf(t,a,e,n,o),a}function Zf(t,e,n,i,o){var r=n.hostModel;(0,tn[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},r,i),e.useStyle(n.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;var a=n.getItemModel(i),s=a.getModel("emphasis");Mt(e,a),ct(e,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function Uf(t,e,n){return r(t,(function(t){return(t=t.slice())[e]=n.initBaseline,t}))}const jf=Ff;var qf=u;function Kf(t){var e=function(t){var e=[],n=[];return t.eachSeriesByType("boxplot",(function(t){var i=t.getBaseAxis(),o=De(n,i);o<0&&(o=n.length,n[o]=i,e[o]={axis:i,seriesModels:[]}),e[o].seriesModels.push(t)})),e}(t);qf(e,(function(t){var e=t.seriesModels;e.length&&(!function(t){var e,n=t.axis,i=t.seriesModels,o=i.length,r=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];if("category"===n.type)e=n.getBandWidth();else{var l=0;qf(i,(function(t){l=Math.max(l,t.getData().count())}));var u=n.getExtent();e=Math.abs(u[1]-u[0])/l}qf(i,(function(t){var n=t.get("boxWidth");X(n)||(n=[n,n]),s.push([Ut(n[0],e)||0,Ut(n[1],e)||0])}));var c=.8*e-2,d=c/o*.3,h=(c-d*(o-1))/o,p=h/2-c/2;qf(i,(function(t,e){a.push(p),p+=d+h,r.push(Math.min(Math.max(h,s[e][0]),s[e][1]))}))}(t),qf(e,(function(e,n){!function(t,e,n){var i=t.coordinateSystem,o=t.getData(),r=n/2,a="horizontal"===t.get("layout")?0:1,s=1-a,l=["x","y"],u=o.mapDimension(l[a]),c=o.mapDimensionsAll(l[s]);if(null==u||c.length<5)return;for(var d=0;d<o.count();d++){var h=o.get(u,d),p=x(h,c[2],d),g=x(h,c[0],d),f=x(h,c[1],d),y=x(h,c[3],d),v=x(h,c[4],d),m=[];_(m,f,!1),_(m,y,!0),m.push(g,f,v,y),b(m,g),b(m,v),b(m,p),o.setItemLayout(d,{initBaseline:p[s],ends:m})}function x(t,n,r){var l,u=o.get(n,r),c=[];return c[a]=t,c[s]=u,isNaN(t)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[a]+=e,l}function _(t,e,n){var i=e.slice(),o=e.slice();i[a]+=r,o[a]-=r,n?t.push(i,o):t.push(o,i)}function b(t,e){var n=e.slice(),i=e.slice();n[a]-=r,i[a]+=r,t.push(n,i)}}(e,t.boxOffsetList[n],t.boxWidthList[n])})))}))}var Jf={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Vi){zi("")}var n=function(t,e){for(var n=[],i=[],o=(e=e||{}).boundIQR,r="none"===o||0===o,a=0;a<t.length;a++){var s=Ti(t[a].slice()),l=Ri(s,.25),u=Ri(s,.5),d=Ri(s,.75),h=s[0],p=s[s.length-1],g=(null==o?1.5:o)*(d-l),f=r?h:Math.max(h,l-g),y=r?p:Math.min(p,d+g),v=e.itemNameFormatter,m=P(v)?v({value:a}):c(v)?v.replace("{value}",a+""):a+"";n.push([m,f,l,u,d,y]);for(var x=0;x<s.length;x++){var _=s[x];if(_<f||_>y){var b=[m,_];i.push(b)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var $f=["color","borderColor"],Qf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){gt(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,o=e.getLayout("isSimpleBox"),r=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(r&&iy(s,a))return;var l=ny(a,n,!0);at(l,{shape:{points:a.ends}},t,n),oy(l,e,n,o),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);r&&iy(s,c)?i.remove(u):(u?(ot(u,{shape:{points:c.ends}},t,a),rt(u)):u=ny(c),oy(u,e,a,o),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),ly(t,this.group);var e=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var r=ny(i.getItemLayout(n));oy(r,i,n,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},e.prototype._incrementalRenderLarge=function(t,e){ly(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(At),ty=function(){},ey=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return K(e,t),e.prototype.getDefaultShape=function(){return new ty},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(_);function ny(t,e,n){var i=t.ends;return new ey({shape:{points:n?ry(i,t):i},z2:100})}function iy(t,e){for(var n=!0,i=0;i<e.ends.length;i++)if(t.contain(e.ends[i][0],e.ends[i][1])){n=!1;break}return n}function oy(t,e,n,i){var o=e.getItemModel(n);t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.__simpleBox=i,Mt(t,o)}function ry(t,e){return r(t,(function(t){return(t=t.slice())[1]=e.initBaseline,t}))}var ay=function(){},sy=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeCandlestickBox",n}return K(e,t),e.prototype.getDefaultShape=function(){return new ay},e.prototype.buildPath=function(t,e){for(var n=e.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e}(_);function ly(t,e,n,i){var o=t.getData().getLayout("largePoints"),r=new sy({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});e.add(r);var a=new sy({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});e.add(a);var s=new sy({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});e.add(s),uy(1,r,t),uy(-1,a,t),uy(0,s,t),i&&(r.incremental=!0,a.incremental=!0),n&&n.push(r,a)}function uy(t,e,n,i){var o=n.get(["itemStyle",t>0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]);0===t&&(o=n.get(["itemStyle","borderColorDoji"]));var r=n.getModel("itemStyle").getItemStyle($f);e.useStyle(r),e.style.fill=null,e.style.stroke=o}const cy=Qf;var dy=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return K(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(tt);pe(dy,Bf,!0);const hy=dy;function py(t){t&&X(t.series)&&u(t.series,(function(t){Z(t)&&"k"===t.type&&(t.type="candlestick")}))}var gy=["itemStyle","borderColor"],fy=["itemStyle","borderColor0"],yy=["itemStyle","borderColorDoji"],vy=["itemStyle","color"],my=["itemStyle","color0"];const xy={seriesType:"candlestick",plan:Ot(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?vy:my)}function i(t,e){return e.get(0===t?yy:t>0?gy:fy)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var o;null!=(o=t.next());){var r=e.getItemModel(o),a=e.getItemLayout(o).sign,s=r.getItemStyle();s.fill=n(a,r),s.stroke=i(a,r)||s.fill;var l=e.ensureUniqueItemVisual(o,"style");p(l,s)}}}}};function _y(t,e,n,i,o,r){return n>i?-1:n<i?1:r?0:e>0?t.get(o,e-1)<=i?1:-1:1}const by={seriesType:"candlestick",plan:Ot(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),o="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),r=Ut(M(t.get("barMaxWidth"),o),o),a=Ut(M(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Ut(s,o):Math.max(Math.min(o/2,r),a)}(t,n),o=["x","y"],a=n.getDimensionIndex(n.mapDimension(o[0])),s=r(n.mapDimensionsAll(o[1]),n.getDimensionIndex,n),l=s[0],u=s[1],c=s[2],d=s[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(a<0||s.length<4))return{progress:t.pipelineContext.large?function(n,i){var o,r,s=yt(4*n.count),h=0,p=[],g=[],f=i.getStore(),y=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(r=n.next());){var v=f.get(a,r),m=f.get(l,r),x=f.get(u,r),_=f.get(c,r),b=f.get(d,r);isNaN(v)||isNaN(_)||isNaN(b)?(s[h++]=NaN,h+=3):(s[h++]=_y(f,r,m,x,u,y),p[0]=v,p[1]=_,o=e.dataToPoint(p,null,g),s[h++]=o?o[0]:NaN,s[h++]=o?o[1]:NaN,p[1]=b,o=e.dataToPoint(p,null,g),s[h++]=o?o[1]:NaN)}i.setLayout("largePoints",s)}:function(t,n){var o,r=n.getStore();for(;null!=(o=t.next());){var s=r.get(a,o),h=r.get(l,o),p=r.get(u,o),g=r.get(c,o),f=r.get(d,o),y=Math.min(h,p),v=Math.max(h,p),m=M(y,s),x=M(v,s),_=M(g,s),b=M(f,s),S=[];I(S,x,0),I(S,m,1),S.push(C(b),C(x),C(_),C(m));var w=!!n.getItemModel(o).get(["itemStyle","borderColorDoji"]);n.setItemLayout(o,{sign:_y(r,o,h,p,u,w),initBaseline:h>p?x[1]:m[1],ends:S,brushRect:A(g,f,s)})}function M(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function I(t,e,n){var o=e.slice(),r=e.slice();o[0]=Ei(o[0]+i/2,1,!1),r[0]=Ei(r[0]-i/2,1,!0),n?t.push(o,r):t.push(r,o)}function A(t,e,n){var o=M(t,n),r=M(e,n);return o[0]-=i/2,r[0]-=i/2,{x:o[0],y:o[1],width:i,height:r[1]-o[1]}}function C(t){return t[0]=Ei(t[0],1),t}}}}};function Sy(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var wy=function(t){function e(e,n){var i=t.call(this)||this,o=new Ra(e,n),r=new $;return i.add(o),i.add(r),i.updateData(e,n),i}return K(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),r=0;r<i;r++){var a=Q(e,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-r/i*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),o.add(a)}Sy(o,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var r=i[o];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Sy(n,t)},e.prototype.highlight=function(){nt(this)},e.prototype.downplay=function(){it(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,e){var n=this,i=t.hostModel;this.childAt(0).updateData(t,e);var o=this.childAt(1),r=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=pt(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"style"),u=l&&l.fill,c=r.getModel("emphasis");o.setScale(s),o.traverse((function(t){t.setStyle("fill",u)}));var d=lt(t.getItemVisual(e,"symbolOffset"),s);d&&(o.x=d[0],o.y=d[1]);var h=t.getItemVisual(e,"symbolRotate");o.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=r.get(["rippleEffect","scale"]),p.brushType=r.get(["rippleEffect","brushType"]),p.period=1e3*r.get(["rippleEffect","period"]),p.effectOffset=e/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=a,p.color=u,p.rippleEffectColor=r.get(["rippleEffect","color"]),p.rippleNumber=r.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===t&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,ct(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}($);const My=wy;const Iy=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(){this._symbolDraw=new Ba(My)},e.prototype.render=function(t,e,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,e,n){var i=t.getData();this.group.dirty();var o=hs("").reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Bi(e.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(At);const Ay=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return K(e,t),e.prototype.getInitialData=function(t,e){return J(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(tt);const Cy=function(t){function e(e,n,i){var o=t.call(this)||this;return o.add(o.createLine(e,n,i)),o._updateEffectSymbol(e,n),o}return K(e,t),e.prototype.createLine=function(t,e,n){return new fp(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");X(i)||(i=[i,i]);var r=t.getItemVisual(e,"style"),a=n.get("color")||r&&r.stroke,s=this.childAt(1);this._symbolType!==o&&(this.remove(s),(s=Q(o,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.scaleX=i[0],s.scaleY=i[1],s.setColor(a),this._symbolType=o,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var o=t.getItemLayout(n),r=1e3*e.get("period"),a=e.get("loop"),s=e.get("roundTrip"),l=e.get("constantSpeed"),u=Me(e.get("delay"),(function(e){return e/t.count()*r/3}));if(i.ignore=!0,this._updateAnimationPoints(i,o),l>0&&(r=this._getLineLength(i)/l*1e3),r!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var c=void 0;c=P(u)?u(n):u,i.__t>0&&(c=-r*i.__t),this._animateSymbol(i,r,c,a,s)}this._period=r,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,o){if(e>0){t.__t=0;var r=this,a=t.animate("",i).when(o?2*e:e,{__t:o?2:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||a.done((function(){r.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return Gi(t.__p1,t.__cp1)+Gi(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,r=[t.x,t.y],a=r.slice(),s=yi,l=Wi;r[0]=s(e[0],i[0],n[0],o),r[1]=s(e[1],i[1],n[1],o);var u=t.__t<1?l(e[0],i[0],n[0],o):l(n[0],i[0],e[0],1-o),c=t.__t<1?l(e[1],i[1],n[1],o):l(n[1],i[1],e[1],1-o);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*Gi(a,r),1===o&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*Gi(e,r):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=r[0],t.y=r[1]},e.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},e}($);const Ty=function(t){function e(e,n,i){var o=t.call(this)||this;return o._createPolyline(e,n,i),o}return K(e,t),e.prototype._createPolyline=function(t,e,n){var i=t.getItemLayout(e),o=new $t({shape:{points:i}});this.add(o),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childAt(0),r={shape:{points:t.getItemLayout(e)}};ot(o,r,i,e),this._updateCommonStl(t,e,n)},e.prototype._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),r=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var u=o.getModel("emphasis");r=u.getModel("lineStyle").getLineStyle(),l=u.get("disabled"),a=u.get("focus"),s=u.get("blurScope")}i.useStyle(t.getItemVisual(e,"style")),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=r,ct(this,a,s,l)},e.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},e}($);var Dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return K(e,t),e.prototype.createLine=function(t,e,n){return new Ty(t,e,n)},e.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var r=e[o-1],a=e[o];i+=Gi(r,a),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}else this._length=0},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var e=t.__t<1?t.__t:2-t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var r,a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);r>=0&&!(i[r]<=e);r--);r=Math.min(r,o-2)}else{for(r=a;r<o&&!(i[r]>e);r++);r=Math.min(r-1,o-2)}var s=(e-i[r])/(i[r+1]-i[r]),l=n[r],u=n[r+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=t.__t<1?u[0]-l[0]:l[0]-u[0],d=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},e}(Cy);const Ly=Dy;var Py=function(){this.polyline=!1,this.curveness=0,this.segs=[]},ky=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return K(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Py},e.prototype.buildPath=function(t,e){var n,i=e.segs,o=e.curveness;if(e.polyline)for(n=this._off;n<i.length;){var r=i[n++];if(r>0){t.moveTo(i[n++],i[n++]);for(var a=1;a<r;a++)t.lineTo(i[n++],i[n++])}}else for(n=this._off;n<i.length;){var s=i[n++],l=i[n++],u=i[n++],c=i[n++];if(t.moveTo(s,l),o>0){var d=(s+u)/2-(l-c)*o,h=(l+c)/2-(u-s)*o;t.quadraticCurveTo(d,h,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,o=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<i.length;){var l=i[s++];if(l>0)for(var u=i[s++],c=i[s++],d=1;d<l;d++){var h=i[s++],p=i[s++];if(Fi(u,c,h,p,r,t,e))return a}a++}else for(a=0,s=0;s<i.length;){u=i[s++],c=i[s++],h=i[s++],p=i[s++];if(o>0){if(Hi(u,c,(u+h)/2-(c-p)*o,(c+p)/2-(h-u)*o,h,p,r,t,e))return a}else if(Fi(u,c,h,p,r,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,o=-1/0,r=-1/0,a=0;a<e.length;){var s=e[a++],l=e[a++];n=Math.min(s,n),o=Math.max(s,o),i=Math.min(l,i),r=Math.max(l,r)}t=this._rect=new ce(n,i,o,r)}return t},e}(_);const Ny=function(){function t(){this.group=new $}return t.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,e){var n=this._newAdded[0],i=e.getLayout("linesPoints"),o=n&&n.shape.segs;if(o&&o.length<2e4){var r=o.length,a=new Float32Array(r+i.length);a.set(o),a.set(i,r),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:i}),this._setCommon(s,e),s.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new ky({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("style");o&&o.stroke&&t.setStyle("stroke",o.stroke),t.setStyle("fill",null);var r=dt(t);r.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){r.dataIndex=null;var n=t.hoverDataIdx;n>0&&(r.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();var Oy={seriesType:"lines",plan:Ot(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(o,r){var a=[];if(i){var s=void 0,l=o.end-o.start;if(n){for(var u=0,c=o.start;c<o.end;c++)u+=t.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var d=0,h=[];for(c=o.start;c<o.end;c++){var p=t.getLineCoords(c,a);n&&(s[d++]=p);for(var g=0;g<p;g++)h=e.dataToPoint(a[g],!1,h),s[d++]=h[0],s[d++]=h[1]}r.setLayout("linesPoints",s)}else for(c=o.start;c<o.end;c++){var f=r.getItemModel(c),y=(p=t.getLineCoords(c,a),[]);if(n)for(var v=0;v<p;v++)y.push(e.dataToPoint(a[v]));else{y[0]=e.dataToPoint(a[0]),y[1]=e.dataToPoint(a[1]);var m=f.get(["lineStyle","curveness"]);+m&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*m,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*m])}r.setItemLayout(c,y)}}}}}};const Ry=Oy;const Vy=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this._updateLineDraw(i,t),r=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a>0&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(i);var u=t.get("clip",!0)&&$a(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=Ry.reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),r=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new Ny:new xp(o?i?Ly:Ty:i?Cy:fp),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=r),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(At);var zy="undefined"==typeof Uint32Array?Array:Uint32Array,Ey="undefined"==typeof Float64Array?Array:Float64Array;function By(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=r(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),kn([e,t[0],t[1]])})))}var Gy=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return K(e,t),e.prototype.init=function(e){e.data=e.data||[],By(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(By(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=En(this._flatCoords,e.flatCoords),this._flatCoordsOffset=En(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}var r=this._getCoordsFromItemModel(t);for(o=0;o<r.length;o++)e[o]=e[o]||[],e[o][0]=r[o][0],e[o][1]=r[o][1];return r.length},e.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),m(t[0])){for(var n=t.length,i=new zy(n),o=new Ey(n),r=0,a=0,s=0,l=0;l<n;){s++;var u=t[l++];i[a++]=r+e,i[a++]=u;for(var c=0;c<u;c++){var d=t[l++],h=t[l++];o[r++]=d,o[r++]=h}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){var n=new ie(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],(function(t,e,i,o){if(t instanceof Array)return NaN;n.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[o]:r:void 0})),n},e.prototype.formatTooltip=function(t,e,n){var i=this.getData().getItemModel(t),o=i.get("name");if(o)return o;var r=i.get("fromName"),a=i.get("toName"),s=[];return null!=r&&s.push(r),null!=a&&s.push(a),nn("nameValue",{name:s.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(tt);const Wy=Gy;function Fy(t){return t instanceof Array||(t=[t,t]),t}const Hy={seriesType:"lines",reset:function(t){var e=Fy(t.get("symbol")),n=Fy(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=Fy(n.getShallow("symbol",!0)),o=Fy(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1])}:null}}};var Yy=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Yi.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=t.length;c.width=e,c.height=n;for(var p=0;p<h;++p){var g=t[p],f=g[0],y=g[1],v=i(g[2]);d.globalAlpha=v,d.drawImage(a,f-u,y-u)}if(!c.width||!c.height)return c;for(var m=d.getImageData(0,0,c.width,c.height),x=m.data,_=0,b=x.length,S=this.minOpacity,w=this.maxOpacity-S;_<b;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(v>0){var I=r(v)?s:l;v>0&&(v=v*w+S),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return d.putImageData(m,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Yi.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},t}();const Xy=Yy;function Zy(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var Uy=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return K(n,t),n.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Zy(o)&&this._renderOnGeo(o,t,i,n)},n.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},n.prototype.incrementalRender=function(t,e,n,i){var o=e.coordinateSystem;o&&(Zy(o)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},n.prototype.eachRendered=function(t){gt(this._progressiveEls||this.group,t)},n.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,o){var r,a,s,l,u=t.coordinateSystem,c=Qa(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");r=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,g=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),m=t.get(["itemStyle","borderRadius"]),x=st(t),_=t.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],I=n;I<i;I++){var A=void 0,C=g.getItemVisual(I,"style");if(c){var T=g.get(M[0],I),D=g.get(M[1],I);if(isNaN(g.get(M[2],I))||isNaN(T)||isNaN(D)||T<s[0]||T>s[1]||D<l[0]||D>l[1])continue;var L=u.dataToPoint([T,D]);A=new xt({shape:{x:L[0]-r/2,y:L[1]-a/2,width:r,height:a},style:C})}else{if(isNaN(g.get(M[1],I)))continue;A=new xt({z2:1,shape:u.dataToRect([g.get(M[0],I)]).contentShape,style:C})}if(g.hasItemOption){var P=g.getItemModel(I),k=P.getModel("emphasis");f=k.getModel("itemStyle").getItemStyle(),y=P.getModel(["blur","itemStyle"]).getItemStyle(),v=P.getModel(["select","itemStyle"]).getItemStyle(),m=P.get(["itemStyle","borderRadius"]),b=k.get("focus"),S=k.get("blurScope"),w=k.get("disabled"),x=st(P)}A.shape.r=m;var N=t.getRawValue(I),O="-";N&&null!=N[2]&&(O=N[2]+""),ut(A,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:C.opacity,defaultText:O}),A.ensureState("emphasis").style=f,A.ensureState("blur").style=y,A.ensureState("select").style=v,ct(A,b,S,w),A.incremental=o,o&&(A.states.emphasis.hoverLayer=!0),p.add(A),g.setItemGraphicEl(I,A),this._progressiveEls&&this._progressiveEls.push(A)}},n.prototype._renderOnGeo=function(t,n,i,o){var a=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new Xy;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),d=t.getRoamTransform();c.applyTransform(d);var h=Math.max(c.x,0),p=Math.max(c.y,0),g=Math.min(c.width+c.x,o.getWidth()),f=Math.min(c.height+c.y,o.getHeight()),y=g-h,v=f-p,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(m,(function(e,n,i){var o=t.dataToPoint([e,n]);return o[0]-=h,o[1]-=p,o.push(i),o})),_=i.getExtent(),b="visualMap.continuous"===i.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(_,i.option.range):function(t,e,n){var i=t[1]-t[0],o=(e=r(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,a=0;return function(t){var i;for(i=a;i<o;i++)if((r=e[i].interval)[0]<=t&&t<=r[1]){a=i;break}if(i===o)for(i=a-1;i>=0;i--){var r;if((r=e[i].interval)[0]<=t&&t<=r[1]){a=i;break}}return i>=0&&i<o&&n[i]}}(_,i.getPieceList(),i.option.selected);u.update(x,y,v,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new e({style:{width:y,height:v,x:h,y:p,image:u.canvas},silent:!0});this.group.add(S)},n.type="heatmap",n}(At);const jy=Uy;const qy=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.getInitialData=function(t,e){return J(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=xi.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(tt);var Ky=["itemStyle","borderWidth"],Jy=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],$y=new on;function Qy(t,e,n,i){var o=t.getItemLayout(e),r=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),d={dataIndex:e,layout:o,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:a,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverScale:c&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(t,e,n,i,o){var r,a=i.valueDim,s=t.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(X(s)){var d=[tv(l,s[0])-u,tv(l,s[1])-u];d[1]<d[0]&&d.reverse(),r=d[c]}else r=null!=s?tv(l,s)-u:e?i.coordSysExtent[a.index][c]-u:n[a.wh];o.boundingLength=r,e&&(o.repeatCutLength=n[a.wh]);o.pxSign=r>0?1:-1}(n,r,o,i,d),function(t,e,n,i,o,r,a,s,l,u){var c,d=l.valueDim,h=l.categoryDim,p=Math.abs(n[h.wh]),g=t.getItemVisual(e,"symbolSize");c=X(g)?g.slice():null==g?["100%","100%"]:[g,g];c[h.index]=Ut(c[h.index],p),c[d.index]=Ut(c[d.index],i?p:Math.abs(r)),u.symbolSize=c;var f=u.symbolScale=[c[0]/s,c[1]/s];f[d.index]*=(l.isHorizontal?-1:1)*a}(t,e,o,r,0,d.boundingLength,d.pxSign,u,i,d),function(t,e,n,i,o){var r=t.get(Ky)||0;r&&($y.attr({scaleX:e[0],scaleY:e[1],rotation:n}),$y.updateTransform(),r/=$y.getLineScale(),r*=e[i.valueDim.index]);o.valueLineWidth=r||0}(n,d.symbolScale,l,i,d);var h=d.symbolSize,g=lt(n.get("symbolOffset"),h);return function(t,e,n,i,o,r,a,s,l,u,c,d){var h=c.categoryDim,g=c.valueDim,f=d.pxSign,y=Math.max(e[g.index]+s,0),v=y;if(i){var m=Math.abs(l),x=Me(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1));var b=Ut(x,e[g.index]),S=Math.max(y+2*b,0),w=_?0:2*b,M=Xi(i),I=M?i:fv((m+w)/S);S=y+2*(b=(m-I*y)/2/(_?I:Math.max(I-1,1))),w=_?0:2*b,M||"fixed"===i||(I=u?fv((Math.abs(u)+w)/S):0),v=I*S-w,d.repeatTimes=I,d.symbolMargin=b}var A=f*(v/2),C=d.pathPosition=[];C[h.index]=n[h.wh]/2,C[g.index]="start"===a?A:"end"===a?l-A:l/2,r&&(C[0]+=r[0],C[1]+=r[1]);var T=d.bundlePosition=[];T[h.index]=n[h.xy],T[g.index]=n[g.xy];var D=d.barRectShape=p({},n);D[g.wh]=f*Math.max(Math.abs(n[g.wh]),Math.abs(C[g.index]+A)),D[h.wh]=n[h.wh];var L=d.clipShape={};L[h.xy]=-n[h.xy],L[h.wh]=c.ecSize[h.wh],L[g.xy]=0,L[g.wh]=n[g.wh]}(n,h,o,r,0,g,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function tv(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function ev(t){var e=t.symbolPatternSize,n=Q(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function nv(t,e,n,i){var o=t.__pictorialBundle,r=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,c=0,d=r[e.valueDim.index]+a+2*n.symbolMargin;for(hv(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c<u?pv(t,null,g(c),n,i):pv(t,null,{scaleX:0,scaleY:0},n,i,(function(){o.remove(t)})),c++}));c<u;c++){var h=ev(n);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,o.add(h);var p=g(c);pv(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,i)}function g(t){var e=s.slice(),i=n.pxSign,o=t;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(o=u-1-t),e[l.index]=d*(o-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function iv(t,e,n,i){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?pv(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(r=t.__pictorialMainPath=ev(n),o.add(r),pv(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function ov(t,e,n){var i=p({},e.barRectShape),o=t.__pictorialBarRect;o?pv(o,null,{shape:i},e,n):((o=t.__pictorialBarRect=new xt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function rv(t,e,n,i){if(n.symbolClip){var o=t.__pictorialClipPath,r=p({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(o)ot(o,{shape:r},s,l);else{r[a.wh]=0,o=new xt({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[a.wh]=n.clipShape[a.wh],tn[i?"updateProps":"initProps"](o,{shape:u},s,l)}}}function av(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=sv,n.isAnimationEnabled=lv,n}function sv(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function lv(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function uv(t,e,n,i){var o=new $,r=new $;return o.add(r),o.__pictorialBundle=r,r.x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?nv(o,e,n):iv(o,0,n),ov(o,n,i),rv(o,e,n,i),o.__pictorialShapeStr=dv(t,n),o.__pictorialSymbolMeta=n,o}function cv(t,e,n,i){var o=i.__pictorialBarRect;o&&o.removeTextContent();var r=[];hv(i,(function(t){r.push(t)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),u(r,(function(t){ht(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function dv(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function hv(t,e,n){u(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function pv(t,e,n,i,o,r){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&tn[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,r)}function gv(t,n,i){var o=i.dataIndex,r=i.itemModel,a=r.getModel("emphasis"),s=a.getModel("itemStyle").getItemStyle(),l=r.getModel(["blur","itemStyle"]).getItemStyle(),u=r.getModel(["select","itemStyle"]).getItemStyle(),c=r.getShallow("cursor"),d=a.get("focus"),h=a.get("blurScope"),g=a.get("scale");hv(t,(function(t){if(t instanceof e){var n=t.style;t.useStyle(p({image:n.image,x:n.x,y:n.y,width:n.width,height:n.height},i.style))}else t.useStyle(i.style);var o=t.ensureState("emphasis");o.style=s,g&&(o.scaleX=1.1*t.scaleX,o.scaleY=1.1*t.scaleY),t.ensureState("blur").style=l,t.ensureState("select").style=u,c&&(t.cursor=c),t.z2=i.z2}));var f=n.valueDim.posDesc[+(i.boundingLength>0)],y=t.__pictorialBarRect;y.ignoreClip=!0,ut(y,st(r),{labelFetcher:n.seriesModel,labelDataIndex:o,defaultText:ka(n.seriesModel.getData(),o),inheritColor:i.style.fill,defaultOpacity:i.style.opacity,defaultOutsidePosition:f}),ct(t,d,h,a.get("disabled"))}function fv(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const yv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){var i=this.group,o=t.getData(),r=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Jy[+s],categoryDim:Jy[1-+s]};o.diff(r).add((function(t){if(o.hasValue(t)){var e=av(o,t),n=Qy(o,t,e,u),r=uv(o,u,n);o.setItemGraphicEl(t,r),i.add(r),gv(r,u,n)}})).update((function(t,e){var n=r.getItemGraphicEl(e);if(o.hasValue(t)){var a=av(o,t),s=Qy(o,t,a,u),l=dv(o,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),o.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,o=n.dataIndex,r=t.__pictorialBundle;ot(r,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,o),n.symbolRepeat?nv(t,e,n,!0):iv(t,e,n,!0);ov(t,n,!0),rv(t,e,n,!0)}(n,u,s):n=uv(o,u,s,!0),o.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),gv(n,u,s)}else i.remove(n)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&cv(r,t,e.__pictorialSymbolMeta.animationModel,e)})).execute();var c=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(e){cv(i,dt(e).dataIndex,t,e)})):n.removeAll()},e.type="pictorialBar",e}(At);const vv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return K(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Rt(vs.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(vs);const mv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return K(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this,r=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}r.x=0,r.y=l.y+u[0];var d=new jn(this._layersSeries||[],a,c,c),h=[];function p(e,n,s){var l=o._layers;if("remove"!==e){for(var u,c,d=[],p=[],g=a[n].indices,f=0;f<g.length;f++){var y=i.getItemLayout(g[f]),v=y.x,m=y.y0,x=y.y;d.push(v,m),p.push(v,m+x),u=i.getItemVisual(g[f],"style")}var _=i.getItemLayout(g[0]),b=t.getModel("label").get("margin"),S=t.getModel("emphasis");if("add"===e){var w=h[n]=new $;c=new qa({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),w.add(c),r.add(w),t.isAnimationEnabled()&&c.setClipPath(function(t,e,n){var i=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return at(i,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,n),i}(c.getBoundingRect(),t,(function(){c.removeClipPath()})))}else{w=l[s];c=w.childAt(0),r.add(w),h[n]=w,ot(c,{shape:{points:d,stackedOnPoints:p}},t),rt(c)}ut(c,st(t),{labelDataIndex:g[f-1],defaultText:i.getName(g[f-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var M=c.getTextContent();M&&(M.x=_.x-b,M.y=_.y0+_.y/2),c.useStyle(u),i.setItemGraphicEl(n,c),Mt(c,t),ct(c,S.get("focus"),S.get("blurScope"),S.get("disabled"))}else r.remove(l[n])}d.add(oe(p,this,"add")).update(oe(p,this,"update")).remove(oe(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},e.type="themeRiver",e}(At);var xv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new il(oe(this.getData,this),oe(this.getRawData,this))},e.prototype.fixData=function(t){var e=t.length,n={},i=ki(t,(function(t){return n.hasOwnProperty(t[0]+"")||(n[t[0]+""]=-1),t[2]})),o=[];i.buckets.each((function(t,e){o.push({name:e,dataList:t})}));for(var r=o.length,a=0;a<r;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var u=o[a].dataList[l][0]+"";n[u]=a}for(var u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,t[e]=[u,0,s],e++)}return t},e.prototype.getInitialData=function(t,e){for(var n=this.getReferringComponents("singleAxis",he).models[0].get("type"),i=y(t.data,(function(t){return void 0!==t[2]})),o=this.fixData(i||[]),r=[],a=this.nameMap=qe(),s=0,l=0;l<o.length;++l)r.push(o[l][2]),a.get(o[l][2])||(a.set(o[l][2],s),s++);var u=ne(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ni(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new ie(u,this);return c.initData(o),c},e.prototype.getLayerSeries=function(){for(var t=this.getData(),e=t.count(),n=[],i=0;i<e;++i)n[i]=i;var o=t.mapDimension("single"),r=ki(n,(function(e){return t.get("name",e)})),a=[];return r.buckets.each((function(e,n){e.sort((function(e,n){return t.get(o,e)-t.get(o,n)})),a.push({name:n,indices:e})})),a},e.prototype.getAxisTooltipData=function(t,e,n){X(t)||(t=t?[t]:[]);for(var i,o=this.getData(),r=this.getLayerSeries(),a=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,d=r[l].indices.length,h=0;h<d;++h){var p=o.get(t[0],r[l].indices[h]),g=Math.abs(p-e);g<=u&&(i=p,u=g,c=r[l].indices[h])}a.push(c)}return{dataIndices:a,nestestValue:i}},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=i.getName(t),r=i.get(i.mapDimension("value"),t);return nn("nameValue",{name:o,value:r})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(tt);const _v=xv;function bv(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var r=t.get("boundaryGap"),a=n.getAxis();(i.boundaryGap=r,"horizontal"===a.orient)?(r[0]=Ut(r[0],o.height),r[1]=Ut(r[1],o.height),Sv(e,t,o.height-r[0]-r[1])):(r[0]=Ut(r[0],o.width),r[1]=Ut(r[1],o.width),Sv(e,t,o.width-r[0]-r[1]));e.setLayout("layoutInfo",i)}))}function Sv(t,e,n){if(t.count())for(var i,o=e.coordinateSystem,a=e.getLayerSeries(),s=t.mapDimension("single"),l=t.mapDimension("value"),u=r(a,(function(e){return r(e.indices,(function(e){var n=o.dataToPoint(t.get(s,e));return n[1]=t.get(l,e),n}))})),c=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],r=0,a=0;a<n;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];s>r&&(r=s),i.push(s)}for(var u=0;u<n;++u)o[u]=(r-i[u])/2;r=0;for(var c=0;c<n;++c){var d=i[c]+o[c];d>r&&(r=d)}return{y0:o,max:r}}(u),d=c.y0,h=n/c.max,p=a.length,g=a[0].indices.length,f=0;f<g;++f){i=d[f]*h,t.setItemLayout(a[0].indices[f],{layerIndex:0,x:u[0][f][0],y0:i,y:u[0][f][1]*h});for(var y=1;y<p;++y)i+=u[y-1][f][1]*h,t.setItemLayout(a[y].indices[f],{layerIndex:y,x:u[y][f][0],y0:i,y:u[y][f][1]*h})}}const wv=function(t){function e(e,n,i,o){var r=t.call(this)||this;r.z2=2,r.textConfig={inside:!0},dt(r).seriesIndex=n.seriesIndex;var a=new Tt({z2:4,silent:e.getModel().get(["label","silent"])});return r.setTextContent(a),r.updateData(!0,e,n,i,o),r}return K(e,t),e.prototype.updateData=function(t,e,n,i,o){this.node=e,e.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var r=this;dt(r).dataIndex=e.dataIndex;var a=e.getModel(),s=a.getModel("emphasis"),l=e.getLayout(),c=p({},l);c.label=null;var d=e.getVisual("style");d.lineJoin="bevel";var h=e.getVisual("decal");h&&(d.decal=An(h,o));var g=ws(a.getModel("itemStyle"),c,!0);p(c,g),u(kt,(function(t){var e=r.ensureState(t),n=a.getModel([t,"itemStyle"]);e.style=n.getItemStyle();var i=ws(n,c);i&&(e.shape=i)})),t?(r.setShape(c),r.shape.r=l.r0,at(r,{shape:{r:l.r}},n,e.dataIndex)):(ot(r,{shape:c},n),rt(r)),r.useStyle(d),this._updateLabel(n);var f=a.getShallow("cursor");f&&r.attr("cursor",f),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var y=s.get("focus"),v="ancestor"===y?e.getAncestorsIndices():"descendant"===y?e.getDescendantIndices():y;ct(this,v,s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t){var e=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),r=o.endAngle-o.startAngle,a=(o.startAngle+o.endAngle)/2,s=Math.cos(a),l=Math.sin(a),c=this,d=c.getTextContent(),h=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,g=i.get("show")&&!(null!=p&&Math.abs(r)<p);function f(t,e){var n=t.get(e);return null==n?i.get(e):n}d.ignore=!g,u(Ui,(function(i){var u="normal"===i?n.getModel("label"):n.getModel([i,"label"]),p="normal"===i,g=p?d:d.ensureState(i),y=t.getFormattedLabel(h,i);p&&(y=y||e.node.name),g.style=Be(u,{},null,"normal"!==i,!0),y&&(g.style.text=y);var v=u.get("show");null==v||p||(g.ignore=!v);var x,_=f(u,"position"),b=p?c:c.states[i],S=b.style.fill;b.textConfig={outsideFill:"inherit"===u.get("color")?S:null,inside:"outside"!==_};var w=f(u,"distance")||0,M=f(u,"align"),I=f(u,"rotate"),A=.5*Math.PI,C=1.5*Math.PI,T=Zi("tangential"===I?Math.PI/2-a:a),D=T>A&&!Ue(T-A)&&T<C;"outside"===_?(x=o.r+w,M=D?"right":"left"):M&&"center"!==M?"left"===M?(x=o.r0+w,M=D?"right":"left"):"right"===M&&(x=o.r-w,M=D?"left":"right"):(x=r===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,M="center"),g.style.align=M,g.style.verticalAlign=f(u,"verticalAlign")||"middle",g.x=x*s+o.cx,g.y=x*l+o.cy;var L=0;"radial"===I?L=Zi(-a)+(D?Math.PI:0):"tangential"===I?L=Zi(Math.PI/2-a)+(D?Math.PI:0):m(I)&&(L=I*Math.PI/180),g.rotation=Zi(L)})),d.dirtyStyle()},e}(bt);var Mv="sunburstRootToNode",Iv="sunburstHighlight";const Av=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=e;var r=t.getData(),a=r.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),c=[];s.eachNode((function(t){c.push(t)}));var d,h,p=this._oldChildren||[];!function(i,o){if(0===i.length&&0===o.length)return;function s(t){return t.getId()}function c(s,c){!function(i,o){u||!i||i.getValue()||(i=null);if(i!==a&&o!==a)if(o&&o.piece)i?(o.piece.updateData(!1,i,t,e,n),r.setItemGraphicEl(i.dataIndex,o.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(o);else if(i){var s=new wv(i,t,e,n);l.add(s),r.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==c?null:o[c])}new jn(o,i,s,s).add(c).update(c).remove(Wt(c,null)).execute()}(c,p),d=a,(h=s).depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,d,t,e,n):(o.virtualPiece=new wv(d,t,e,n),l.add(o.virtualPiece)),h.piece.off("click"),o.virtualPiece.on("click",(function(t){o._rootToNode(h.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var o=i.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(i);else if("link"===o){var r=i.getModel(),a=r.get("link");if(a){var s=r.get("target",!0)||"_blank";qn(a,s)}}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Mv,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(i*i+o*o);return r<=n.r&&r>=n.r0}},e.type="sunburst",e}(At);function Cv(t){var e=0;u(t.children,(function(t){Cv(t);var n=t.value;X(n)&&(n=n[0]),e+=n}));var n=t.value;X(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),X(t.value)?t.value[0]=n:t.value=n}const Tv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return K(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Cv(n);var i=this._levelModels=r(t.levels||[],(function(t){return new Xe(t,this,e)}),this),o=Sd.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=o.getNodeByDataIndex(e),r=i[n.depth];return r&&(t.parentModel=r),t}))}));return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=Ad(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){kd(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(tt);var Dv=Math.PI/180;function Lv(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");X(i)||(i=[0,i]),X(e)||(e=[e,e]);var o=n.getWidth(),r=n.getHeight(),a=Math.min(o,r),s=Ut(e[0],o),l=Ut(e[1],r),c=Ut(i[0],a/2),d=Ut(i[1],a/2),h=-t.get("startAngle")*Dv,p=t.get("minAngle")*Dv,g=t.getData().tree.root,f=t.getViewRoot(),y=f.depth,v=t.get("sort");null!=v&&Pv(f,v);var m=0;u(f.children,(function(t){!isNaN(t.getValue())&&m++}));var x=f.getValue(),_=Math.PI/(x||m)*2,b=f.depth>0,S=f.height-(b?-1:1),w=(d-c)/(S||1),M=t.get("clockwise"),I=t.get("stillShowZeroSum"),A=M?1:-1,C=function(e,n){if(e){var i=n;if(e!==g){var o=e.getValue(),r=0===x&&I?_:o*_;r<p&&(r=p),i=n+A*r;var d=e.depth-y-(b?-1:1),h=c+w*d,f=c+w*(d+1),v=t.getLevelModel(e);if(v){var m=v.get("r0",!0),S=v.get("r",!0),T=v.get("radius",!0);null!=T&&(m=T[0],S=T[1]),null!=m&&(h=Ut(m,a/2)),null!=S&&(f=Ut(S,a/2))}e.setLayout({angle:r,startAngle:n,endAngle:i,clockwise:M,cx:s,cy:l,r0:h,r:f})}if(e.children&&e.children.length){var D=0;u(e.children,(function(t){D+=C(t,n+D)}))}return i-n}};if(b){var T=c,D=c+w,L=2*Math.PI;g.setLayout({angle:L,startAngle:h,endAngle:h+L,clockwise:M,cx:s,cy:l,r0:T,r:D})}C(f,h)}))}function Pv(t,e){var n=t.children||[];t.children=function(t,e){if(P(e)){var n=r(t,(function(t,e){var n=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return n}},index:e}}));return n.sort((function(t,n){return e(t.params,n.params)})),r(n,(function(e){return t[e.index]}))}var i="asc"===e;return t.sort((function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n}))}(n,e),n.length&&u(t.children,(function(t){Pv(t,e)}))}function kv(t){var e={};t.eachSeriesByType("sunburst",(function(t){var n=t.getData(),i=n.tree;i.eachNode((function(o){var r=o.getModel().getModel("itemStyle").getItemStyle();r.fill||(r.fill=function(t,n,i){for(var o=t;o&&o.depth>1;)o=o.parentNode;var r=n.getColorFromPalette(o.name||o.dataIndex+"",e);return t.depth>1&&c(r)&&(r=ji(r,(t.depth-1)/(i-1)*.5)),r}(o,t,i.root.height));var a=n.ensureUniqueItemVisual(o.dataIndex,"style");p(a,r)}))}))}var Nv={color:"fill",borderColor:"stroke"},Ov={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Rv=le();const Vv=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return J(null,this)},e.prototype.getDataParams=function(e,n,i){var o=t.prototype.getDataParams.call(this,e,n);return i&&(o.info=Rv(i).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(tt);function zv(t,e){return e=e||[0,0],r(["x","y"],(function(n,i){var o=this.getAxis(n),r=e[i],a=t[i]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))}),this)}function Ev(t,e){return e=e||[0,0],r([0,1],(function(n){var i=e[n],o=t[n]/2,r=[],a=[];return r[n]=i-o,a[n]=i+o,r[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(a)[n])}),this)}function Bv(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}function Gv(t,e){return e=e||[0,0],r(["Radius","Angle"],(function(n,i){var o=this["get"+n+"Axis"](),r=e[i],a=t[i]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function Wv(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||dn(t,"text")))}function Fv(t,e,n){var i,o,r,a=t;if("text"===e)r=a;else{r={},dn(a,"text")&&(r.text=a.text),dn(a,"rich")&&(r.rich=a.rich),dn(a,"textFill")&&(r.fill=a.textFill),dn(a,"textStroke")&&(r.stroke=a.textStroke),dn(a,"fontFamily")&&(r.fontFamily=a.fontFamily),dn(a,"fontSize")&&(r.fontSize=a.fontSize),dn(a,"fontStyle")&&(r.fontStyle=a.fontStyle),dn(a,"fontWeight")&&(r.fontWeight=a.fontWeight),o={type:"text",style:r,silent:!0},i={};var s=dn(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),dn(a,"textPosition")&&(i.position=a.textPosition),dn(a,"textOffset")&&(i.offset=a.textOffset),dn(a,"textRotation")&&(i.rotation=a.textRotation),dn(a,"textDistance")&&(i.distance=a.textDistance)}return Hv(r,t),u(r.rich,(function(t){Hv(t,t)})),{textConfig:i,textContent:o}}function Hv(t,e){e&&(e.font=e.textFont||e.font,dn(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),dn(e,"textAlign")&&(t.align=e.textAlign),dn(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),dn(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),dn(e,"textWidth")&&(t.width=e.textWidth),dn(e,"textHeight")&&(t.height=e.textHeight),dn(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),dn(e,"textPadding")&&(t.padding=e.textPadding),dn(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),dn(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),dn(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),dn(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),dn(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),dn(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),dn(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function Yv(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var o=i.textPosition.indexOf("inside")>=0,r=t.fill||"#000";Xv(i,e);var a=null==i.textFill;return o?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=r),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,u(e.rich,(function(t){Xv(t,t)})),i}function Xv(t,e){e&&(dn(e,"fill")&&(t.textFill=e.fill),dn(e,"stroke")&&(t.textStroke=e.fill),dn(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),dn(e,"font")&&(t.font=e.font),dn(e,"fontStyle")&&(t.fontStyle=e.fontStyle),dn(e,"fontWeight")&&(t.fontWeight=e.fontWeight),dn(e,"fontSize")&&(t.fontSize=e.fontSize),dn(e,"fontFamily")&&(t.fontFamily=e.fontFamily),dn(e,"align")&&(t.textAlign=e.align),dn(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),dn(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),dn(e,"width")&&(t.textWidth=e.width),dn(e,"height")&&(t.textHeight=e.height),dn(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),dn(e,"padding")&&(t.textPadding=e.padding),dn(e,"borderColor")&&(t.textBorderColor=e.borderColor),dn(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),dn(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),dn(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),dn(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),dn(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),dn(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),dn(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),dn(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),dn(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),dn(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Zv={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Uv=a(Zv);Rn(qi,(function(t,e){return t[e]=1,t}),{}),qi.join(", ");var jv=["","style","shape","extra"],qv=le();function Kv(t,e,n,i,o){var r=t+"Animation",a=$i(t,i,o)||{},s=qv(e).userDuring;return a.duration>0&&(a.during=s?oe(im,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),p(a,n[r]),a}function Jv(t,e,n,i){var o=(i=i||{}).dataIndex,r=i.isInit,s=i.clearStyle,l=n.isAnimationEnabled(),c=qv(t),d=e.style;c.userDuring=e.during;var h={},g={};if(function(t,e,n){for(var i=0;i<Uv.length;i++){var o=Uv[i],r=Zv[o],a=e[o];a&&(n[r[0]]=a[0],n[r[1]]=a[1])}for(i=0;i<qi.length;i++){var s=qi[i];null!=e[s]&&(n[s]=e[s])}}(0,e,g),rm("shape",e,g),rm("extra",e,g),!r&&l&&(function(t,e,n){for(var i=e.transition,o=tm(i)?qi:Yn(i||[]),r=0;r<o.length;r++){var a=o[r];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=t[a];n[a]=s}}}(t,e,h),om("shape",t,e,h),om("extra",t,e,h),function(t,e,n,i){if(!n)return;var o,r=t.style;if(r){var s=n.transition,l=e.transition;if(s&&!tm(s)){var u=Yn(s);!o&&(o=i.style={});for(var c=0;c<u.length;c++){var d=r[f=u[c]];o[f]=d}}else if(t.getAnimationStyleProps&&(tm(l)||tm(s)||De(l,"style")>=0)){var h=t.getAnimationStyleProps(),p=h?h.style:null;if(p){!o&&(o=i.style={});var g=a(n);for(c=0;c<g.length;c++){var f;if(p[f=g[c]]){d=r[f];o[f]=d}}}}}}(t,e,d,h)),g.style=d,function(t,e,n){var i=e.style;if(!t.isGroup&&i){if(n){t.useStyle({});for(var o=t.animators,r=0;r<o.length;r++){var a=o[r];"style"===a.targetName&&a.changeTarget(t.style)}}t.setStyle(i)}e&&(e.style=null,e&&t.attr(e),e.style=i)}(t,g,s),function(t,e){dn(e,"silent")&&(t.silent=e.silent),dn(e,"ignore")&&(t.ignore=e.ignore),t instanceof Mn&&dn(e,"invisible")&&(t.invisible=e.invisible);t instanceof _&&dn(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}(t,e),l)if(r){var f={};u(jv,(function(t){var n=t?e[t]:e;n&&n.enterFrom&&(t&&(f[t]=f[t]||{}),p(t?f[t]:f,n.enterFrom))}));var y=Kv("enter",t,e,n,o);y.duration>0&&t.animateFrom(f,y)}else!function(t,e,n,i,o){if(o){var r=Kv("update",t,e,i,n);r.duration>0&&t.animateFrom(o,r)}}(t,e,o||0,n,h);$v(t,e),d?t.dirty():t.markRedraw()}function $v(t,e){for(var n=qv(t).leaveToProps,i=0;i<jv.length;i++){var o=jv[i],r=o?e[o]:e;r&&r.leaveTo&&(n||(n=qv(t).leaveToProps={}),o&&(n[o]=n[o]||{}),p(o?n[o]:n,r.leaveTo))}}function Qv(t,e,n,i){if(t){var o=t.parent,r=qv(t).leaveToProps;if(r){var a=Kv("update",t,e,n,0);a.done=function(){o.remove(t),i&&i()},t.animateTo(r,a)}else o.remove(t),i&&i()}}function tm(t){return"all"===t}var em={},nm={setTransform:function(t,e){return em.el[t]=e,this},getTransform:function(t){return em.el[t]},setShape:function(t,e){var n=em.el;return(n.shape||(n.shape={}))[t]=e,n.dirtyShape&&n.dirtyShape(),this},getShape:function(t){var e=em.el.shape;if(e)return e[t]},setStyle:function(t,e){var n=em.el,i=n.style;return i&&(i[t]=e,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(t){var e=em.el.style;if(e)return e[t]},setExtra:function(t,e){return(em.el.extra||(em.el.extra={}))[t]=e,this},getExtra:function(t){var e=em.el.extra;if(e)return e[t]}};function im(){var t=this,e=t.el;if(e){var n=qv(e).userDuring,i=t.userDuring;n===i?(em.el=e,i(nm)):t.el=t.userDuring=null}}function om(t,e,n,i){var o=n[t];if(o){var r,s=e[t];if(s){var l=n.transition,u=o.transition;if(u)if(!r&&(r=i[t]={}),tm(u))p(r,s);else for(var c=Yn(u),d=0;d<c.length;d++){var h=s[f=c[d]];r[f]=h}else if(tm(l)||De(l,t)>=0){!r&&(r=i[t]={});var g=a(s);for(d=0;d<g.length;d++){var f;h=s[f=g[d]];am(o[f],h)&&(r[f]=h)}}}}}function rm(t,e,n){var i=e[t];if(i)for(var o=n[t]={},r=a(i),s=0;s<r.length;s++){var l=r[s];o[l]=Ki(i[l])}}function am(t,e){return Ji(t)?t!==e:null!=t&&isFinite(t)}var sm=le(),lm=["percent","easing","shape","style","extra"];function um(t){t.stopAnimation("keyframe"),t.attr(sm(t))}function cm(t,e,n){if(n.isAnimationEnabled()&&e)if(X(e))u(e,(function(e){cm(t,e,n)}));else{var i=e.keyframes,o=e.duration;if(n&&null==o){var r=$i("enter",n,0);o=r&&r.duration}if(i&&o){var s=sm(t);u(jv,(function(n){var r;n&&!t[n]||(i.sort((function(t,e){return t.percent-e.percent})),u(i,(function(i){var l=t.animators,c=n?i[n]:i;if(c){var d=a(c);if(n||(d=y(d,(function(t){return De(lm,t)<0}))),d.length){r||((r=t.animate(n,e.loop,!0)).scope="keyframe");for(var h=0;h<l.length;h++)l[h]!==r&&l[h].targetName===r.targetName&&l[h].stopTracks(d);n&&(s[n]=s[n]||{});var p=n?s[n]:s;u(d,(function(e){p[e]=((n?t[n]:t)||{})[e]})),r.whenWithKeys(o*i.percent,c,d,i.easing)}}})),r&&r.delay(e.delay||0).duration(o).start(e.easing))}))}}}var dm="emphasis",hm="normal",pm="blur",gm="select",fm=[hm,dm,pm,gm],ym={normal:["itemStyle"],emphasis:[dm,"itemStyle"],blur:[pm,"itemStyle"],select:[gm,"itemStyle"]},vm={normal:["label"],emphasis:[dm,"label"],blur:[pm,"label"],select:[gm,"label"]},mm=["x","y"],xm={normal:{},emphasis:{},blur:{},select:{}},_m={cartesian2d:function(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:oe(zv,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:oe(Ev,t)}}},single:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:oe(Bv,t)}}},polar:function(t){var e=t.getRadiusAxis(),n=t.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var o=e.dataToRadius(i[0]),r=n.dataToAngle(i[1]),a=t.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:oe(Gv,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function bm(t){return t instanceof _}function Sm(t){return t instanceof Mn}const wm=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var o=this._data,r=t.getData(),a=this.group,s=Tm(t,r,e,n);o||a.removeAll(),r.diff(o).add((function(e){Lm(n,null,e,s(e,i),t,a,r)})).remove((function(e){var n=o.getItemGraphicEl(e);n&&Qv(n,Rv(n).option,t)})).update((function(e,l){var u=o.getItemGraphicEl(l);Lm(n,u,e,s(e,i),t,a,r)})).execute();var l=t.get("clip",!0)?$a(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=Tm(e,r,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u<t.end;u++){var c=Lm(null,null,u,a(u,o),e,this.group,r);c&&(c.traverse(l),s.push(c))}},e.prototype.eachRendered=function(t){gt(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,e,n,i){var o=e.element;if(null==o||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e}(At);function Mm(t){var n,i=t.type;if("path"===i){var o=t.shape,r=null!=o.width&&null!=o.height?{x:o.x||0,y:o.y||0,width:o.width,height:o.height}:null,a=Gm(o);n=no(a,null,r,o.layout||"center"),Rv(n).customPathData=a}else if("image"===i)n=new e({}),Rv(n).customImagePath=t.style.image;else if("text"===i)n=new Tt({});else if("group"===i)n=new $;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var s=io(i);if(!s){zi("")}n=new s}return Rv(n).customGraphicType=i,n.name=t.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function Im(t,e,n,i,o,r,a){um(e);var s=o&&o.normal.cfg;s&&e.setTextConfig(s),i&&null==i.transition&&(i.transition=mm);var l=i&&i.style;if(l){if("text"===e.type){var u=l;dn(u,"textFill")&&(u.fill=u.textFill),dn(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=bm(e)?l.decal:null;t&&d&&(d.dirty=!0,c=An(d,t)),l.__decalPattern=c}Sm(e)&&(l&&(c=l.__decalPattern)&&(l.decal=c));Jv(e,i,r,{dataIndex:n,isInit:a,clearStyle:!0}),cm(e,i.keyframeAnimation,r)}function Am(t,e,n,i,o){var r=e.isGroup?null:e,a=o&&o[t].cfg;if(r){var s=r.ensureState(t);if(!1===i){var l=r.getState(t);l&&(l.style=null)}else s.style=i||null;a&&(s.textConfig=a),In(r)}}function Cm(t,e,n){var i=n===hm,o=i?e:Om(e,n),r=o?o.z2:null;null!=r&&((i?t:t.ensureState(n)).z2=r||0)}function Tm(t,e,n,i){var o=t.get("renderItem"),r=t.coordinateSystem,a={};r&&(a=r.prepareCustoms?r.prepareCustoms(r):_m[r.type](r));for(var s,l,u=wt({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(t,n){return null==n&&(n=s),e.getStore().get(e.getDimensionIndex(t||0),n)},style:function(n,i){null==i&&(i=s);var o=e.getItemVisual(i,"style"),r=o&&o.fill,a=o&&o.opacity,l=x(i,hm).getItemStyle();null!=r&&(l.fill=r),null!=a&&(l.opacity=a);var u={inheritColor:c(r)?r:"#000"},d=_(i,hm),h=Be(d,null,u,!1,!0);h.text=d.getShallow("show")?M(t.getFormattedLabel(i,hm),ka(e,i)):null;var p=Qi(d,u,!1);return S(n,l),l=Yv(l,h,p),n&&b(l,n),l.legacy=!0,l},ordinalRawValue:function(t,n){null==n&&(n=s),t=t||0;var i=e.getDimensionInfo(t);if(!i){var o=e.getDimensionIndex(t);return o>=0?e.getStore().get(o,n):void 0}var r=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(n,i){null==i&&(i=s);var o=x(i,dm).getItemStyle(),r=_(i,dm),a=Be(r,null,null,!0,!0);a.text=r.getShallow("show")?te(t.getFormattedLabel(i,dm),t.getFormattedLabel(i,hm),ka(e,i)):null;var l=Qi(r,null,!0);return S(n,o),o=Yv(o,a,l),n&&b(o,n),o.legacy=!0,o},visual:function(t,n){if(null==n&&(n=s),dn(Nv,t)){var i=e.getItemVisual(n,"style");return i?i[Nv[t]]:null}if(dn(Ov,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===r.type){var e=r.getBaseAxis();return to(wt({axis:e},t))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return eo(t,n)}},a.api||{}),d={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:Dm(t.getData())},h={},p={},g={},f={},y=0;y<fm.length;y++){var v=fm[y];g[v]=t.getModel(ym[v]),f[v]=t.getModel(vm[v])}function m(t){return t===s?l||(l=e.getItemModel(t)):e.getItemModel(t)}function x(t,n){return e.hasItemOption?t===s?h[n]||(h[n]=m(t).getModel(ym[n])):m(t).getModel(ym[n]):g[n]}function _(t,n){return e.hasItemOption?t===s?p[n]||(p[n]=m(t).getModel(vm[n])):m(t).getModel(vm[n]):f[n]}return function(t,n){return s=t,l=null,h={},p={},o&&o(wt({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:n?n.type:null},d),u)};function b(t,e){for(var n in e)dn(e,n)&&(t[n]=e[n])}function S(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function Dm(t){var e={};return u(t.dimensions,(function(n){var i=t.getDimensionInfo(n);if(!i.isExtraCoord){var o=i.coordDim;(e[o]=e[o]||[])[i.coordDimIndex]=t.getDimensionIndex(n)}})),e}function Lm(t,e,n,i,o,r,a){if(i){var s=Pm(t,e,n,i,o,r);return s&&a.setItemGraphicEl(n,s),s&&ct(s,i.focus,i.blurScope,i.emphasisDisabled),s}r.remove(e)}function Pm(t,e,n,i,o,r){var a=-1,s=e;e&&km(e,i,o)&&(a=De(r.childrenRef(),e),e=null);var l,u,c=!e,d=e;d?d.clearStates():(d=Mm(i),s&&(l=s,(u=d).copyTransform(l),Sm(u)&&Sm(l)&&(u.setStyle(l.style),u.z=l.z,u.z2=l.z2,u.zlevel=l.zlevel,u.invisible=l.invisible,u.ignore=l.ignore,bm(u)&&bm(l)&&u.setShape(l.shape)))),!1===i.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),xm.normal.cfg=xm.normal.conOpt=xm.emphasis.cfg=xm.emphasis.conOpt=xm.blur.cfg=xm.blur.conOpt=xm.select.cfg=xm.select.conOpt=null,xm.isLegacy=!1,function(t,e,n,i,o,r){if(t.isGroup)return;Nm(n,null,r),Nm(n,dm,r);var a=r.normal.conOpt,s=r.emphasis.conOpt,l=r.blur.conOpt,u=r.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=t.getTextContent();if(!1===a)c&&t.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=Mm(a),t.setTextContent(c)),Im(null,c,e,a,null,i,o);for(var d=a&&a.style,h=0;h<fm.length;h++){var p=fm[h];if(p!==hm){var g=r[p].conOpt;Am(p,c,0,Rm(a,g,p),null)}}d?c.dirty():c.markRedraw()}}}(d,n,i,o,c,xm),function(t,e,n,i,o){var r=n.clipPath;if(!1===r)t&&t.getClipPath()&&t.removeClipPath();else if(r){var a=t.getClipPath();a&&km(a,r,i)&&(a=null),a||(a=Mm(r),t.setClipPath(a)),Im(null,a,e,r,null,i,o)}}(d,n,i,o,c),Im(t,d,n,i,xm,o,c),dn(i,"info")&&(Rv(d).info=i.info);for(var h=0;h<fm.length;h++){var p=fm[h];if(p!==hm){var g=Om(i,p);Am(p,d,0,Rm(i,g,p),xm)}}return function(t,e,n){if(!t.isGroup){var i=t,o=n.currentZ,r=n.currentZLevel;i.z=o,i.zlevel=r;var a=e.z2;null!=a&&(i.z2=a||0);for(var s=0;s<fm.length;s++)Cm(i,e,fm[s])}}(d,i,o),"group"===i.type&&function(t,e,n,i,o){var r=i.children,a=r?r.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!a&&!l&&!u)return;if(l)return c={api:t,oldChildren:e.children()||[],newChildren:r||[],dataIndex:n,seriesModel:o,group:e},void new jn(c.oldChildren,c.newChildren,zm,zm,c).add(Em).update(Em).remove(Bm).execute();var c;u&&e.removeAll();for(var d=0;d<a;d++){var h=r[d],p=e.childAt(d);h?(null==h.ignore&&(h.ignore=!1),Pm(t,p,n,h,o,e)):p.ignore=!0}for(var g=e.childCount()-1;g>=d;g--){var f=e.childAt(g);Vm(e,f,o)}}(t,d,n,i,o),a>=0?r.replaceAt(d,a):r.add(d),d}function km(t,e,n){var i,o=Rv(t),r=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&((i=a)&&(dn(i,"pathData")||dn(i,"d")))&&Gm(a)!==o.customPathData||"image"===r&&dn(s,"image")&&s.image!==o.customImagePath}function Nm(t,e,n){var i=e?Om(t,e):t,o=e?Rm(t,i,dm):t.style,r=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?Om(s,e):s:null;if(o&&(n.isLegacy||Wv(o,r,!!a,!!l))){n.isLegacy=!0;var u=Fv(o,r,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var d=e?n[e]:n.normal;d.cfg=a,d.conOpt=l}function Om(t,e){return e?t?t[e]:null:t}function Rm(t,e,n){var i=e&&e.style;return null==i&&n===dm&&t&&(i=t.styleEmphasis),i}function Vm(t,e,n){e&&Qv(e,Rv(t).option,n)}function zm(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function Em(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,o=null!=e?n.oldChildren[e]:null;Pm(n.api,o,n.dataIndex,i,n.seriesModel,n.group)}function Bm(t){var e=this.context,n=e.oldChildren[t];n&&Qv(n,Rv(n).option,e.seriesModel)}function Gm(t){return t&&(t.pathData||t.d)}var Wm=le(),Fm=L,Hm=oe;function Ym(t,e,n,i){Xm(Wm(n).lastProp,i)||(Wm(n).lastProp=i,e?ot(n,i,t):(n.stopAnimation(),n.attr(i)))}function Xm(t,e){if(Z(t)&&Z(e)){var n=!0;return u(e,(function(e,i){n=n&&Xm(t[i],e)})),!!n}return t===e}function Zm(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Um(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function jm(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)}))}const qm=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,e);if(a){var d=Wt(Ym,e,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,e)}else a=this._group=new $,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);jm(a,e,!0),this._renderHandle(o)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,r=e.get("snap");if(!r&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&i.getBandWidth()>a)return!0;if(r){var s=Yl(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,o){},t.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;if(o){var r=Wm(t).pointerEl=new tn[o.type](Fm(e.pointer));t.add(r)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var o=Wm(t).labelEl=new Tt(Fm(e.label));t.add(o),Zm(o,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=Wm(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var o=Wm(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{x:e.label.x,y:e.label.y}),Zm(o,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=oo(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){un(t.event)},onmousedown:Hm(this._onHandleDragMove,this,0,0),drift:Hm(this._onHandleDragMove,this),ondragend:Hm(this._onHandleDragEnd,this)}),i.add(o)),jm(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");X(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,Ii(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){Ym(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Um(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Um(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Um(i)),Wm(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Ai(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function Km(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function Jm(t,e,n,i,o){var r=$m(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=ro(a.get("padding")||0),l=a.getFont(),u=ao(r,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=o.verticalAlign;"bottom"===g&&(c[1]-=h),"middle"===g&&(c[1]-=h/2),function(t,e,n,i){var o=i.getWidth(),r=i.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+n,r)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,d,h,i);var f=a.get("backgroundColor");f&&"auto"!==f||(f=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:Be(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:f}),z2:10}}function $m(t,e,n,i,o){t=e.scale.parse(t);var r=e.scale.getLabel({value:t},{precision:o.precision}),a=o.formatter;if(a){var s={value:so(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};u(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,o=e&&e.getDataParams(i);o&&s.seriesData.push(o)})),c(a)?r=a.replace("{value}",r):P(a)&&(r=a(s))}return r}function Qm(t,e,n){var i=mn();return He(i,i,n.rotation),vn(i,i,n.position),Ci([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function tx(t,e,n,i,o,r){var a=Wl.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),Jm(e,i,o,r,{position:Qm(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function ex(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function nx(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function ix(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var ox=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.grid,s=i.get("type"),l=rx(a,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var c=Km(i),d=ax[s](r,u,l);d.style=c,t.graphicKey=d.type,t.pointer=d}tx(e,t,Ml(a.model,n),n,i,o)},e.prototype.getHandleTransform=function(t,e,n){var i=Ml(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Qm(e.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),s=rx(r,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(qm);function rx(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var ax={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:ex([e,n[0]],[e,n[1]],sx(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:nx([e-i/2,n[0]],[i,o],sx(t))}}};function sx(t){return"x"===t.dim?0:1}const lx=ox;const ux=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(de);var cx=le(),dx=u;function hx(t,e,n){if(!lo.node){var i=e.getZr();cx(i).records||(cx(i).records={}),function(t,e){if(cx(t).initialized)return;function n(n,i){t.on(n,(function(n){var o=function(t){var e={showTip:[],hideTip:[]},n=function(i){var o=e[i.type];o?o.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);dx(cx(t).records,(function(t){t&&i(t,n,o.dispatchAction)})),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(o.pendings,e)}))}cx(t).initialized=!0,n("click",Wt(gx,"click")),n("mousemove",Wt(gx,"mousemove")),n("globalout",px)}(i,e),(cx(i).records[t]||(cx(i).records[t]={})).handler=n}}function px(t,e,n){t.handler("leave",null,n)}function gx(t,e,n,i){e.handler(t,n,i)}function fx(t,e){if(!lo.node){var n=e.getZr();(cx(n).records||{})[t]&&(cx(n).records[t]=null)}}const yx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";hx("axisPointer",n,(function(t,e,n){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){fx("axisPointer",e)},e.prototype.dispose=function(t,e){fx("axisPointer",e)},e.type="axisPointer",e}(je);function vx(t,e){var n,i=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var a=n.getData(),s=It(a,t);if(null==s||s<0||X(s))return{point:[]};var l=a.getItemGraphicEl(s),u=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(s)||[];else if(u&&u.dataToPoint)if(t.isStacked){var c=u.getBaseAxis(),d=u.getOtherAxis(c).dim,h=c.dim,p="x"===d||"radius"===d?1:0,g=a.mapDimension(h),f=[];f[p]=a.get(g,s),f[1-p]=a.get(a.getCalculationInfo("stackResultDimension"),s),i=u.dataToPoint(f)||[]}else i=u.dataToPoint(a.getValues(r(u.dimensions,(function(t){return a.mapDimension(t)})),s))||[];else if(l){var y=l.getBoundingRect().clone();y.applyTransform(l.transform),i=[y.x+y.width/2,y.y+y.height/2]}return{point:i,el:l}}var mx=le();function xx(t,e,n){var i=t.currTrigger,o=[t.x,t.y],r=t,a=t.dispatchAction||oe(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Mx(o)&&(o=vx({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=Mx(o),c=r.axesInfo,d=s.axesInfo,h="leave"===i||Mx(o),p={},g={},f={list:[],map:{}},y={showPointer:Wt(bx,g),showTooltip:Wt(Sx,f)};u(s.coordSysMap,(function(t,e){var n=l||t.containPoint(o);u(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,r=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(c,t);if(!h&&n&&(!c||r)){var a=r&&r.value;null!=a||l||(a=i.pointToData(o)),null!=a&&_x(t,a,y,!1,p)}}))}));var v={};return u(d,(function(t,e){var n=t.linkGroup;n&&!g[e]&&u(n.axesInfo,(function(e,i){var o=g[i];if(e!==t&&o){var r=o.value;n.mapper&&(r=t.axis.scale.parse(n.mapper(r,wx(e),wx(t)))),v[t.key]=r}}))})),u(v,(function(t,e){_x(d[e],t,y,!0,p)})),function(t,e,n){var i=n.axesInfo=[];u(e,(function(e,n){var o=e.axisPointerModel.option,r=t[n];r?(!e.useHandle&&(o.status="show"),o.value=r.value,o.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})}))}(g,d,p),function(t,e,n,i){if(Mx(e)||!t.list.length)return void i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(f,o,t,a),function(t,e,n){var i=n.getZr(),o="axisPointerLastHighlights",r=mx(i)[o]||{},a=mx(i)[o]={};u(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&u(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];u(r,(function(t,e){!a[e]&&l.push(t)})),u(a,(function(t,e){!r[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(d,0,n),p}}function _x(t,e,n,i,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,o=t,r=[],a=Number.MAX_VALUE,s=-1;return u(e.seriesModels,(function(e,l){var c,d,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(h,t,n);d=p.dataIndices,c=p.nestestValue}else{if(!(d=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null)).length)return;c=e.getData().get(h[0],d[0])}if(null!=c&&isFinite(c)){var g=t-c,f=Math.abs(g);f<=a&&((f<a||g>=0&&s<0)&&(a=f,s=g,o=c,r.length=0),u(d,(function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:r,snapToValue:o}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&p(o,s[0]),!i&&t.snap&&r.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function bx(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function Sx(t,e,n,i){var o=n.payloadBatch,r=e.axis,a=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Zl(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function wx(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Mx(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Ix(t){jl.registerAxisPointerClass("CartesianAxisPointer",lx),t.registerComponentModel(ux),t.registerComponentView(yx),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!X(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Fl(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},xx)}var Ax=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var c=Km(i),d=Cx[u](r,a,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}var h=function(t,e,n,i,o){var r=e.axis,a=r.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=i.getRadiusAxis().getExtent();if("radius"===r.dim){var h=mn();He(h,h,s),vn(h,h,[i.cx,i.cy]),l=Ci([a,-o],h);var p=e.getModel("axisLabel").get("rotate")||0,g=Wl.innerTextLayout(s,p*Math.PI/180,-1);u=g.textAlign,c=g.textVerticalAlign}else{var f=d[1];l=i.coordToPoint([f+o,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/f<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-v)/f<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,i.get(["label","margin"]));Jm(t,n,i,o,h)},e}(qm);var Cx={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:ex(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:ix(e.cx,e.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:ix(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};const Tx=Ax;const Dx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(de);var Lx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",he).models[0]},e.type="polarAxis",e}(de);pe(Lx,ge);var Px=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="angleAxis",e}(Lx),kx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="radiusAxis",e}(Lx),Nx=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return K(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(we);Nx.prototype.dataToRadius=we.prototype.dataToCoord,Nx.prototype.radiusToData=we.prototype.coordToData;const Ox=Nx;var Rx=le(),Vx=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return K(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var r=i[0],a=t.dataToCoord(r+1)-t.dataToCoord(r),s=Math.abs(a),l=ao(null==r?"":r+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=Rx(t.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-o)<=1&&h>c?c=h:(d.lastTickCount=o,d.lastAutoInterval=c),c},e}(we);Vx.prototype.dataToAngle=we.prototype.dataToCoord,Vx.prototype.angleToData=we.prototype.coordToData;const zx=Vx;var Ex=["radius","angle"];function Bx(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const Gx=function(){function t(t){this.dimensions=Ex,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Ox,this._angleAxis=new zx,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),o=i.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);i.inverse?r=a-360:a=r+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=l<r?1:-1;l<r||l>a;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,o=n*n+i*i-1e-4,r=this.r,a=this.r0;return o<=r*r&&o>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return Bx(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return Bx(e)===this?this.pointToData(n):null},t}();function Wx(t,e){var n=this,i=n.getAngleAxis(),o=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();u(Pe(e,"radius"),(function(t){o.scale.unionExtentFromData(e,t)})),u(Pe(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),Oe(i.scale,i.model),Oe(o.scale,o.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),a=360/i.scale.count();i.inverse?r[1]+=a:r[1]-=a,i.setExtent(r[0],r[1])}}function Fx(t,e){var n;if(t.type=e.get("type"),t.scale=Le(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),o=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,o)}e.axis=t,t.model=e}const Hx={dimensions:Ex,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var o=new Gx(i+"");o.update=Wx;var r=o.getRadiusAxis(),a=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Fx(r,s),Fx(a,l),function(t,e,n){var i=e.get("center"),o=n.getWidth(),r=n.getHeight();t.cx=Ut(i[0],o),t.cy=Ut(i[1],r);var a=t.getRadiusAxis(),s=Math.min(o,r)/2,l=e.get("radius");null==l?l=[0,"100%"]:X(l)||(l=[0,l]);var u=[Ut(l[0],s),Ut(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(o,t,e),n.push(o),t.coordinateSystem=o,o.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",he).models[0];t.coordinateSystem=e.coordinateSystem}})),n}};var Yx=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xx(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function Zx(t){return t.getRadiusAxis().inverse?0:1}function Ux(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var jx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return K(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),a=n.getTicksCoords(),s=n.getMinorTicksCoords(),l=r(n.getViewLabels(),(function(t){t=L(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));Ux(l),Ux(a),u(Yx,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||qx[e](this.group,t,i,a,s,o,l)}),this)}},e.type="angleAxis",e}(jl),qx={axisLine:function(t,e,n,i,o,r){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),d=Zx(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===r[h]?new tn[p]({shape:{cx:n.cx,cy:n.cy,r:r[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new rn({shape:{cx:n.cx,cy:n.cy,r:r[d],r0:r[h]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,o,a){var s=e.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),u=a[Zx(n)],c=r(i,(function(t){return new Re({shape:Xx(n,[u,u+l],t.coord)})}));t.add(an(c,{style:wt(s.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[Zx(n)],c=[],d=0;d<o.length;d++)for(var h=0;h<o[d].length;h++)c.push(new Re({shape:Xx(n,[u,u+l],o[d][h].coord)}));t.add(an(c,{style:wt(s.getModel("lineStyle").getLineStyle(),wt(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,n,i,o,r,a){var s=e.getCategories(!0),l=e.getModel("axisLabel"),c=l.get("margin"),d=e.get("triggerEvent");u(a,(function(i,o){var a=l,u=i.tickValue,h=r[Zx(n)],p=n.coordToPoint([h+c,i.coord]),g=n.cx,f=n.cy,y=Math.abs(p[0]-g)/h<.3?"center":p[0]>g?"left":"right",v=Math.abs(p[1]-f)/h<.3?"middle":p[1]>f?"top":"bottom";if(s&&s[u]){var m=s[u];Z(m)&&m.textStyle&&(a=new Xe(m.textStyle,l,l.ecModel))}var x=new Tt({silent:Wl.isLabelSilent(e),style:Be(a,{x:p[0],y:p[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(x),d){var _=Wl.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=i.rawLabel,dt(x).eventData=_}}),this)},splitLine:function(t,e,n,i,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<i.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new Re({shape:Xx(n,r,i[c].coord)}))}for(c=0;c<u.length;c++)t.add(an(u[c],{style:wt({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)s.push(new Re({shape:Xx(n,r,o[l][u].coord)}));t.add(an(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,n,i,o,r){if(i.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,d=-i[0].coord*c,h=Math.min(r[0],r[1]),p=Math.max(r[0],r[1]),g=e.get("clockwise"),f=1,y=i.length;f<=y;f++){var v=f===y?i[0].coord:i[f].coord,m=l++%s.length;u[m]=u[m]||[],u[m].push(new bt({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:d,endAngle:-v*c,clockwise:g},silent:!0})),d=-v*c}for(f=0;f<u.length;f++)t.add(an(u[f],{style:wt({fill:s[f%s.length]},a.getAreaStyle()),silent:!0}))}}};const Kx=jx;var Jx=["axisLine","axisTickLabel","axisName"],$x=["splitLine","splitArea","minorSplitLine"],Qx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return K(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=this._axisGroup,i=this._axisGroup=new $;this.group.add(i);var o=t.axis,r=o.polar,a=r.getAngleAxis(),s=o.getTicksCoords(),l=o.getMinorTicksCoords(),c=a.getExtent()[0],d=o.getExtent(),h=function(t,e,n){return{position:[t.cx,t.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(r,t,c),p=new Wl(t,h);u(Jx,p.add,p),i.add(p.getGroup()),Ke(n,i,t),u($x,(function(e){t.get([e,"show"])&&!o.scale.isBlank()&&t_[e](this.group,t,r,c,d,s,l)}),this)}},e.type="radiusAxis",e}(jl),t_={splitLine:function(t,e,n,i,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,u=n.getAngleAxis(),c=Math.PI/180,d=u.getExtent(),h=360===Math.abs(d[1]-d[0])?"Circle":"Arc";s=s instanceof Array?s:[s];for(var p=[],g=0;g<r.length;g++){var f=l++%s.length;p[f]=p[f]||[],p[f].push(new tn[h]({shape:{cx:n.cx,cy:n.cy,r:Math.max(r[g].coord,0),startAngle:-d[0]*c,endAngle:-d[1]*c,clockwise:u.inverse}}))}for(g=0;g<p.length;g++)t.add(an(p[g],{style:wt({stroke:s[g%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,n,i,o,r,a){if(a.length){for(var s=e.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new on({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));t.add(an(l,{style:wt({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(t,e,n,i,o,r){if(r.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=r[0].coord,d=1;d<r.length;d++){var h=l++%s.length;u[h]=u[h]||[],u[h].push(new bt({shape:{cx:n.cx,cy:n.cy,r0:c,r:r[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=r[d].coord}for(d=0;d<u.length;d++)t.add(an(u[d],{style:wt({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};const e_=Qx;function n_(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function i_(t,e){return e.dim+t.model.componentIndex}function o_(t,e,n){var i={},o=function(t){var e={};u(t,(function(t,n){var i=t.getData(),o=t.coordinateSystem,r=o.getBaseAxis(),a=i_(o,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=e[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;e[a]=u;var d=n_(t);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var h=Ut(t.get("barWidth"),l),p=Ut(t.get("barMaxWidth"),l),g=t.get("barGap"),f=t.get("barCategoryGap");h&&!c[d].width&&(h=Math.min(u.remainedWidth,h),c[d].width=h,u.remainedWidth-=h),p&&(c[d].maxWidth=p),null!=g&&(u.gap=g),null!=f&&(u.categoryGap=f)}));var n={};return u(e,(function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,r=Ut(t.categoryGap,o),a=Ut(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,c=(s-r)/(l+(l-1)*a);c=Math.max(c,0),u(i,(function(t,e){var n=t.maxWidth;n&&n<c&&(n=Math.min(n,s),t.width&&(n=Math.min(n,t.width)),s-=n,t.width=n,l--)})),c=(s-r)/(l+(l-1)*a),c=Math.max(c,0);var d,h=0;u(i,(function(t,e){t.width||(t.width=c),d=t,h+=t.width*(1+a)})),d&&(h-=d.width*a);var p=-h/2;u(i,(function(t,i){n[e][i]=n[e][i]||{offset:p,width:t.width},p+=t.width*(1+a)}))})),n}(y(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));e.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),a=i_(n,r),s=n_(t),l=o[a][s],u=l.offset,c=l.width,d=n.getOtherAxis(r),h=t.coordinateSystem.cx,p=t.coordinateSystem.cy,g=t.get("barMinHeight")||0,f=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var y=e.mapDimension(d.dim),v=e.mapDimension(r.dim),m=ft(e,y),x="radius"!==r.dim||!t.get("roundCap",!0),_=d.dataToCoord(0),b=0,S=e.count();b<S;b++){var w=e.get(y,b),M=e.get(v,b),I=w>=0?"p":"n",A=_;m&&(i[s][M]||(i[s][M]={p:_,n:_}),A=i[s][M][I]);var C=void 0,T=void 0,D=void 0,L=void 0;if("radius"===d.dim){var P=d.dataToCoord(w)-_,k=r.dataToCoord(M);Math.abs(P)<g&&(P=(P<0?-1:1)*g),C=A,T=A+P,L=(D=k-u)-c,m&&(i[s][M][I]=T)}else{var N=d.dataToCoord(w,x)-_,O=r.dataToCoord(M);Math.abs(N)<f&&(N=(N<0?-1:1)*f),T=(C=O+u)+c,D=A,L=A+N,m&&(i[s][M][I]=L)}e.setItemLayout(b,{cx:h,cy:p,r0:C,r:T,startAngle:-D*Math.PI/180,endAngle:-L*Math.PI/180,clockwise:D>=L})}}}))}var r_={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},a_={splitNumber:5},s_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="polar",e}(je);function l_(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},r=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[r]:l[0],"horizontal"===a?u.horizontal[r]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Me(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-c:c,o.z2=1,o}var u_=["axisLine","axisTickLabel","axisName"],c_=["splitArea","splitLine"],d_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return K(e,t),e.prototype.render=function(e,n,i,o){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new $;var s=l_(e),l=new Wl(e,s);u(u_,l.add,l),r.add(this._axisGroup),r.add(l.getGroup()),u(c_,(function(t){e.get([t,"show"])&&h_[t](this,this.group,this._axisGroup,e)}),this),Ke(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,o)},e.prototype.remove=function(){Jl(this)},e.type="singleAxis",e}(jl),h_={splitLine:function(t,e,n,i){var o=i.axis;if(!o.scale.isBlank()){var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),c=o.isHorizontal(),d=[],h=0,p=o.getTicksCoords({tickModel:r}),g=[],f=[],y=0;y<p.length;++y){var v=o.toGlobalCoord(p[y].coord);c?(g[0]=v,g[1]=u.y,f[0]=v,f[1]=u.y+u.height):(g[0]=u.x,g[1]=v,f[0]=u.x+u.width,f[1]=v);var m=new Re({shape:{x1:g[0],y1:g[1],x2:f[0],y2:f[1]},silent:!0});Ve(m.shape,l);var x=h++%s.length;d[x]=d[x]||[],d[x].push(m)}var _=a.getLineStyle(["color"]);for(y=0;y<d.length;++y)e.add(an(d[y],{style:wt({stroke:s[y%s.length]},_),silent:!0}))}},splitArea:function(t,e,n,i){Kl(t,n,i,i)}};const p_=d_;var g_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(de);pe(g_,ge.prototype);const f_=g_;const y_=function(t){function e(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.type=o||"value",a.position=r||"bottom",a}return K(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},e}(we);var v_=["single"],m_=function(){function t(t,e,n){this.type="single",this.dimension="single",this.dimensions=v_,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=this.dimension,o=new y_(i,Le(t),[0,0],t.get("type"),t.get("position")),r="category"===o.type;o.onBand=r&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},t.prototype.update=function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData();u(e.mapDimensionsAll(this.dimension),(function(t){this._axis.scale.unionExtentFromData(e,t)}),this),Oe(this._axis.scale,this._axis.model)}}),this)},t.prototype.resize=function(t,e){this._rect=Zt({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.inverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},t.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),i=n[0]+n[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return i-t+e}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},t.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0===o?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return x_(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return x_(e)===this?this.pointToData(n):null},t}();function x_(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const __={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,o){var r=new m_(i,t,e);r.name="single_"+o,r.resize(i,e),i.coordinateSystem=r,n.push(r)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",he).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:v_};var b_=["x","y"],S_=["width","height"],w_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.coordinateSystem,s=A_(a,1-I_(r)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=Km(i),d=M_[u](r,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}tx(e,t,l_(n),n,i,o)},e.prototype.getHandleTransform=function(t,e,n){var i=l_(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Qm(e.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.coordinateSystem,a=I_(o),s=A_(r,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=A_(r,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(qm),M_={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:ex([e,n[0]],[e,n[1]],I_(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:nx([e-i/2,n[0]],[i,o],I_(t))}}};function I_(t){return t.isHorizontal()?0:1}function A_(t,e){var n=t.getRect();return[n[b_[e]],n[b_[e]]+n[S_[e]]]}const C_=w_;var T_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="single",e}(je);function D_(t,e){var n,i=t.cellSize;1===(n=X(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var o=r([0,1],(function(t){return uo(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));me(t,e,{type:"box",ignoreSize:o})}const L_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(e,n,i){var o=ve(e);t.prototype.init.apply(this,arguments),D_(e,o)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),D_(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(de);var P_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,r,i),this._renderLines(t,r,a,i),this._renderYearText(t,r,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,r,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new xt({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var o=this,r=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){h(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}function h(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,n);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,i)}h(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new $t({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,o=i.getDateInfo(e),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},e.prototype._formatterLabel=function(t,e){return c(t)&&t?co(t,e):P(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,i,o){var r=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=o,s=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=e.start.y;+e.end.y>+e.start.y&&(h=h+"-"+e.end.y);var p=o.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:h},f=this._formatterLabel(p,g),y=new Tt({z2:30,style:Be(o,{text:f})});y.attr(this._yearTextPositionControl(y,d[a],n,a,r)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,o){var r="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(r="center"),"start"===i&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===i&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var o=t.getModel("monthLabel");if(o.get("show")){var r=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),l=o.get("align"),u=[this._tlpoints,this._blpoints];r&&!c(r)||(r&&(e=ho(r)||e),r=e.get(["time","monthAbbr"])||[]);var d="start"===s?0:1,h="horizontal"===n?0:1;a="start"===s?-a:a;for(var g="center"===l,f=0;f<u[d].length-1;f++){var y=u[d][f].slice(),v=this._firstDayOfMonth[f];if(g){var m=this._firstDayPoints[f];y[h]=(m[h]+u[0][f+1][h])/2}var x=o.get("formatter"),_=r[+v.m-1],b={yyyy:v.y,yy:(v.y+"").slice(2),MM:v.m,M:+v.m,nameMap:_},S=this._formatterLabel(x,b),w=new Tt({z2:30,style:p(Be(o,{text:S}),this._monthTextPositionControl(y,g,n,s,a))});i.add(w)}}},e.prototype._weekTextPositionControl=function(t,e,n,i,o){var r="center",a="middle",s=t[0],l=t[1],u="start"===n;return"horizontal"===e?(s=s+i+(u?1:-1)*o[0]/2,r=u?"right":"left"):(l=l+i+(u?1:-1)*o[1]/2,a=u?"bottom":"top"),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderWeekText=function(t,e,n,i,o){var a=t.getModel("dayLabel");if(a.get("show")){var s=t.coordinateSystem,l=a.get("position"),u=a.get("nameMap"),d=a.get("margin"),h=s.getFirstDayOfWeek();if(!u||c(u))u&&(e=ho(u)||e),u=e.get(["time","dayOfWeekShort"])||r(e.get(["time","dayOfWeekAbbr"]),(function(t){return t[0]}));var g=s.getNextNDay(n.end.time,7-n.lweek).time,f=[s.getCellWidth(),s.getCellHeight()];d=Ut(d,Math.min(f[1],f[0])),"start"===l&&(g=s.getNextNDay(n.start.time,-(7+n.fweek)).time,d=-d);for(var y=0;y<7;y++){var v,m=s.getNextNDay(g,y),x=s.dataToRect([m.time],!1).center;v=Math.abs((y+h)%7);var _=new Tt({z2:30,style:p(Be(a,{text:u[v]}),this._weekTextPositionControl(x,i,l,d,f))});o.add(_)}}},e.type="calendar",e}(je);const k_=P_;var N_=864e5;function O_(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}const R_=function(){function t(e,n,i){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var e=(t=po(t)).getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,o=t.getDate(),r=o<10?"0"+o:""+o,a=t.getDay();return{y:e+"",m:i,d:r,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+r,date:t}},t.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},t.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],o=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];u([0,1],(function(t){c(o,t)&&(r[i[t]]=o[t]*a[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=Zt(r,s);function c(t,e){return null!=t[e]&&"auto"!==t[e]}u([0,1],(function(t){c(o,t)||(o[t]=l[i[t]]/a[t])})),this._sw=o[0],this._sh=o[1]},t.prototype.dataToPoint=function(t,e){X(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,o=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+N_))return[NaN,NaN];var r=n.day,a=this._getRangeInfo([i.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},t.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},t.prototype.dataToRect=function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},t.prototype.convertToPixel=function(t,e,n){var i=O_(e);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){var i=O_(e);return i===this?i.pointToData(n):null},t.prototype.containPoint=function(t){return!1},t.prototype._initRangeOption=function(){var t,e=this._model.get("range");if(X(e)&&1===e.length&&(e=e[0]),X(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),o=i.date;o.setMonth(o.getMonth()+1);var r=this.getNextNDay(o,-1);t=[i.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/N_)-Math.floor(n[0].time/N_)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-n[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-n[1].time)*l>0;)i-=l,o.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&e<i.fweek||t===i.weeks&&e>i.lweek)return null;var o=7*(t-1)-i.fweek+e,r=new Date(i.start.time);return r.setDate(+i.start.d+o),this.getDateInfo(r)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(e){var n=new t(e);i.push(n),e.coordinateSystem=n})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function V_(t,e){var n;return u(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var z_=["transition","enterFrom","leaveTo"],E_=z_.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function B_(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?z_:E_,o=0;o<i.length;o++){var r=i[o];null==t[r]&&null!=e[r]&&(t[r]=e[r])}}var G_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return K(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,o=n.elements=e?[]:n.elements,r=[];this._flatten(i,r,null);var a=go(o,r,"normalMerge"),s=this._elOptionsToUpdate=[];u(a,(function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=p({},n),o=t[e],r=n.$action||"merge";"merge"===r?o?(fe(o,i,!0),me(o,i,{ignoreSize:!0}),fo(n,o),B_(n,o),B_(n,o,"shape"),B_(n,o,"style"),B_(n,o,"extra"),n.clipPath=o.clipPath):t[e]=i:"replace"===r?t[e]=i:"remove"===r&&o&&(t[e]=null)}(o,e,n),function(t,e){if(t&&(t.hv=e.hv=[V_(e,["left","right"]),V_(e,["top","bottom"])],"group"===t.type)){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(o[e],n))}),this),n.elements=y(o,(function(t){return t&&delete t.$action,null!=t}))},e.prototype._flatten=function(t,e,n){u(t,(function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;i&&i.length&&this._flatten(i,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(de),W_={path:null,compoundPath:null,group:$,image:e,text:Tt},F_=le(),H_=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(){this._elMap=qe()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group,o=t.get("z"),r=t.get("zlevel");u(e,(function(e){var a=Wn(e.id,null),s=null!=a?n.get(a):null,l=Wn(e.parentId,null),c=null!=l?n.get(l):i,d=e.type,h=e.style;"text"===d&&h&&e.hv&&e.hv[1]&&(h.textVerticalAlign=h.textBaseline=h.verticalAlign=h.align=null);var g=e.textContent,f=e.textConfig;if(h&&Wv(h,d,!!f,!!g)){var y=Fv(h,d,!0);!f&&y.textConfig&&(f=e.textConfig=y.textConfig),!g&&y.textContent&&(g=y.textContent)}var v=function(t){return t=p({},t),u(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(yo),(function(e){delete t[e]})),t}(e),m=e.$action||"merge",x="merge"===m,_="replace"===m;if(x){var b=s;(T=!s)?b=X_(a,c,e.type,n):(b&&(F_(b).isNew=!1),um(b)),b&&(Jv(b,v,t,{isInit:T}),U_(b,e,o,r))}else if(_){Z_(s,e,n,t);var S=X_(a,c,e.type,n);S&&(Jv(S,v,t,{isInit:!0}),U_(S,e,o,r))}else"remove"===m&&($v(s,e),Z_(s,e,n,t));var w=n.get(a);if(w&&g)if(x){var M=w.getTextContent();M?M.attr(g):w.setTextContent(new Tt(g))}else _&&w.setTextContent(new Tt(g));if(w){var I=e.clipPath;if(I){var A=I.type,C=void 0,T=!1;if(x){var D=w.getClipPath();C=(T=!D||F_(D).type!==A)?Y_(A):D}else _&&(T=!0,C=Y_(A));w.setClipPath(C),Jv(C,I,t,{isInit:T}),cm(C,I.keyframeAnimation,t)}var L=F_(w);w.setTextConfig(f),L.option=e,function(t,e,n){var i=dt(t).eventData;t.silent||t.ignore||i||(i=dt(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(w,t,e),Ge({el:w,componentModel:t,itemName:w.name,itemTooltipOption:e.tooltip}),cm(w,e.keyframeAnimation,t)}}))}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,o=this._elMap,r=e.getWidth(),a=e.getHeight(),s=["x","y"],l=0;l<n.length;l++){var u=n[l];if((g=null!=(p=Wn(u.id,null))?o.get(p):null)&&g.isGroup){var c=(f=g.parent)===i,d=F_(g),h=F_(f);d.width=Ut(d.option.width,c?r:h.width)||0,d.height=Ut(d.option.height,c?a:h.height)||0}}for(l=n.length-1;l>=0;l--){var p,g;u=n[l];if(g=null!=(p=Wn(u.id,null))?o.get(p):null){var f=g.parent,y=(h=F_(f),f===i?{width:r,height:a}:{width:h.width,height:h.height}),v={},m=Xn(g,u,y,null,{hv:u.hv,boundingMode:u.bounding},v);if(!F_(g).isNew&&m){for(var x=u.transition,_={},b=0;b<s.length;b++){var S=s[b],w=v[S];x&&(tm(x)||De(x,S)>=0)?_[S]=w:g[S]=w}ot(g,_,t,0)}else g.attr(v)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){Z_(n,F_(n).option,e,t._lastGraphicModel)})),this._elMap=qe()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(je);function Y_(t){var e=new(dn(W_,t)?W_[t]:io(t))({});return F_(e).type=t,e}function X_(t,e,n,i){var o=Y_(n);return e.add(o),i.set(t,o),F_(o).id=t,F_(o).isNew=!0,o}function Z_(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Z_(t,e,n,i)})),Qv(t,e,i),n.removeKey(F_(t).id))}function U_(t,e,n,i){t.isGroup||u([["cursor",Mn.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];dn(e,i)?t[i]=M(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),u(a(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=P(i)?i:null}})),dn(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var j_=["x","y","radius","angle","single"],q_=["cartesian2d","polar","singleAxis"];function K_(t){return t+"Axis"}function J_(t,e){var n,i=qe(),o=[],r=qe();t.eachComponent({mainType:"dataZoom",query:e},(function(t){r.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!r.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var o=i.get(t);o&&o[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){r.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return o}function $_(t){var e=t.ecModel,n={infoList:[],infoMap:qe()};return t.eachTargetAxis((function(t,i){var o=e.getComponent(K_(t),i);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=n.infoMap.get(a);s||(s={model:r,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}})),n}var Q_=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),tb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return K(e,t),e.prototype.init=function(t,e,n){var i=eb(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=eb(t);fe(this.option,t,!0),fe(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;u([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=qe();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return u(j_,(function(n){var i=this.getReferringComponents(K_(n),vo);if(i.specified){e=!0;var o=new Q_;u(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";r(n.findComponents({mainType:o+"Axis"}),o)}i&&r(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function r(e,n){var o=e[0];if(o){var r=new Q_;if(r.add(o.componentIndex),t.set(n,r),i=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",he).models[0];a&&u(e,(function(t){o.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",he).models[0]&&r.add(t.componentIndex)}))}}}i&&u(j_,(function(e){if(i){var o=n.findComponents({mainType:K_(e),filter:function(t){return"category"===t.get("type",!0)}});if(o[0]){var r=new Q_;r.add(o[0].componentIndex),t.set(e,r),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");u([["start","startValue"],["end","endValue"]],(function(i,o){var r=null!=t[i[0]],a=null!=t[i[1]];r&&!a?e[o]="percent":!r&&a?e[o]="value":n?e[o]=n[o]:r&&(e[o]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(K_(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){u(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(K_(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;u([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;u(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e||(e=s)}return e},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(de);function eb(t){var e={};return u(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const nb=tb;const ib=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="dataZoom.select",e}(nb);const ob=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(je);const rb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="dataZoom.select",e}(ob);var ab=u,sb=Ti,lb=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if(function(t){var e=t.get("coordinateSystem");return De(q_,e)>=0}(e)){var n=K_(this._dimName),i=e.getReferringComponents(n,he).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return L(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];ab(["start","end"],(function(l,u){var c=t[l],d=t[l+"Value"];"percent"===o[u]?(null==c&&(c=r[u]),d=i.parse(Xt(c,r,n))):(e=!0,d=null==d?n[u]:i.parse(d),c=Xt(d,n,r)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?r[u]:c})),sb(s),sb(a);var l=this._minMaxSpan;function u(t,e,n,o,r){var a=r?"Span":"ValueSpan";ag(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Xt(t[s],n,o,!0),r&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,r,!1):u(a,s,r,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];ab(n,(function(t){xo(i,t.getData(),e)}));var o=t.getAxisModel(),r=_o(o.axis.scale,o,i).calculate();return[r.min,r.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&ab(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===o){var s=e.getStore(),l=r(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,o,r=0;r<i.length;r++){var u=s.get(l[r],t),c=!isNaN(u),d=u<a[0],h=u>a[1];if(c&&!d&&!h)return!0;c&&(o=!0),d&&(e=!0),h&&(n=!0)}return o&&e&&n}))}else ab(i,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}}));ab(i,(function(t){e.setApproximateExtent(a,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;ab(["min","max"],(function(i){var o=e.get(i+"Span"),r=e.get(i+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=Xt(n[0]+r,n,[0,100],!0):null!=o&&(r=Xt(o,[0,100],n,!0)-n[0]),t[i+"Span"]=o,t[i+"ValueSpan"]=r}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=mo(n,[0,500]);i=Math.min(i,20);var o=t.axis.scale.rawExtentInfo;0!==e[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(i)),o.freeze()}},t}();const ub=lb;const cb={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var r=t.getComponent(K_(i),o);e(i,o,r,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new ub(e,i,r,t),n.push(o.__dzAxisProxy))}));var i=qe();return u(n,(function(t){u(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var db=!1;function hb(t){db||(db=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,cb),function(t){t.registerAction("dataZoom",(function(t,e){var n=J_(e,t);u(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function pb(t){t.registerComponentModel(ib),t.registerComponentView(rb),hb(t)}var gb=function(){},fb={};function yb(t,e){fb[t]=e}function vb(t){return fb[t]}const mb=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;u(this.option.feature,(function(t,n){var i=vb(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),fe(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(de);function xb(t,e){var n=ro(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new xt({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}const _b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.render=function(t,e,n,i){var o=this.group;if(o.removeAll(),t.get("show")){var r=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),d=[];u(s,(function(t,e){d.push(e)})),new jn(this._featureNames||[],d).add(h).update(h).remove(Wt(h,null)).execute(),this._featureNames=d,function(t,e,n){var i=e.getBoxLayoutParams(),o=e.get("padding"),r={width:n.getWidth(),height:n.getHeight()},a=Zt(i,r,o);bo(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Xn(t,i,r,o)}(o,t,n),o.add(xb(o.getBoundingRect(),t)),a||o.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!P(l)&&e){var u=l.style||(l.style={}),c=ao(e,Tt.makeFont(u)),d=t.x+o.x,h=!1;t.y+o.y+r+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:r+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function h(h,p){var g,f=d[h],y=d[p],v=s[f],m=new Xe(v,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===f&&(v.title=i.newTitle),f&&!y){if(function(t){return 0===t.indexOf("my")}(f))g={onclick:m.option.onclick,featureName:f};else{var x=vb(f);if(!x)return;g=new x}l[f]=g}else if(!(g=l[y]))return;g.uid=wn("toolbox-feature"),g.model=m,g.ecModel=e,g.api=n;var _=g instanceof gb;f||!y?!m.get("show")||_&&g.unusable?_&&g.remove&&g.remove(e,n):(!function(i,s,l){var d,h,p=i.getModel("iconStyle"),g=i.getModel(["emphasis","iconStyle"]),f=s instanceof gb&&s.getIcons?s.getIcons():i.get("icon"),y=i.get("title")||{};c(f)?(d={})[l]=f:d=f;c(y)?(h={})[l]=y:h=y;var v=i.iconPaths={};u(d,(function(l,u){var c=oo(l,{},{x:-r/2,y:-r/2,width:r,height:r});c.setStyle(p.getItemStyle()),c.ensureState("emphasis").style=g.getItemStyle();var d=new Tt({style:{text:h[u],align:g.get("textAlign"),borderRadius:g.get("textBorderRadius"),padding:g.get("textPadding"),fill:null,font:eo({fontStyle:g.get("textFontStyle"),fontFamily:g.get("textFontFamily"),fontSize:g.get("textFontSize"),fontWeight:g.get("textFontWeight")},e)},ignore:!0});c.setTextContent(d),Ge({el:c,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),c.__title=h[u],c.on("mouseover",(function(){var e=g.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";d.setStyle({fill:g.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:g.get("textBackgroundColor")}),c.setTextConfig({position:g.get("textPosition")||i}),d.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),d.hide()})),("emphasis"===i.get(["iconStatus",u])?nt:it)(c),o.add(c),c.on("click",oe(s.onclick,s,e,n,u)),v[u]=c}))}(m,g,f),m.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?nt:it)(i[t])},g instanceof gb&&g.render&&g.render(m,e,n,i)):_&&g.dispose&&g.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){u(this._features,(function(t){t instanceof gb&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){u(this._features,(function(n){n instanceof gb&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){u(this._features,(function(n){n instanceof gb&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(je);const bb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=lo.browser;if(P(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+r,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||o){var c=a.split(","),d=c[0].indexOf("base64")>-1,h=o?decodeURIComponent(c[1]):c[1];d&&(h=window.atob(h));var p=i+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var g=h.length,f=new Uint8Array(g);g--;)f[g]=h.charCodeAt(g);var y=new Blob([f]);window.navigator.msSaveOrOpenBlob(y,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var m=v.contentWindow,x=m.document;x.open("image/svg+xml","replace"),x.write(h),x.close(),m.focus(),x.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var _=n.get("lang"),b='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(_&&_[0]||"")+'" /></body>',S=window.open();S.document.write(b),S.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(gb);var Sb="__ec_magicType_stack__",wb=[["line","bar"],["stack"]],Mb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return u(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,o=i.get(["seriesIndex",n]);if(Ib[n]){var r,a={series:[]};u(wb,(function(t){De(t,n)>=0&&u(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(t){var e=t.subType,o=t.id,r=Ib[n](e,o,t,i);r&&(wt(r,t.option),a.series.push(r));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=t.getReferringComponents(u,he).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(r=fe({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:r,featureName:"magicType"})}},e}(gb),Ib={line:function(t,e,n,i){if("bar"===t)return fe({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return fe({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var o=n.get("stack")===Sb;if("line"===t||"bar"===t)return i.setIconStatus("stack",o?"normal":"emphasis"),fe({id:e,stack:o?"":Sb},i.get(["option","stack"])||{},!0)}};sn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const Ab=Mb;var Cb=new Array(60).join("-"),Tb="\t";function Db(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Lb=new RegExp("[\t]+","g");function Pb(t,e){var n=t.split(new RegExp("\n*"+Cb+"\n*","g")),i={series:[]};return u(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(Tb)>=0)return!0}(t)){var o=function(t){for(var e=t.split(/\n+/g),n=Db(e.shift()).split(Lb),i=[],o=r(n,(function(t){return{name:t,data:[]}})),a=0;a<e.length;a++){var s=Db(e[a]).split(Lb);i.push(s.shift());for(var l=0;l<s.length;l++)o[l]&&(o[l].data[a]=s[l])}return{series:o,categories:i}}(t),a=e[n],s=a.axisDim+"Axis";a&&(i[s]=i[s]||[],i[s][a.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{o=function(t){for(var e=t.split(/\n+/g),n=Db(e.shift()),i=[],o=0;o<e.length;o++){var r=Db(e[o]);if(r){var a=r.split(Lb),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),i[o]={name:s,value:[]},l=i[o].value):l=i[o]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?i[o].value=l[0]:i[o]=l[0])}}return{name:n,data:i}}(t);i.series.push(o)}})),i}var kb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.onclick=function(t,e){setTimeout((function(){e.dispatchAction({type:"hideTip"})}));var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=i.get("lang")||[];a.innerHTML=s[0]||i.get("title"),a.style.cssText="margin:10px 20px",a.style.color=i.get("textColor");var l=document.createElement("div"),d=document.createElement("textarea");l.style.cssText="overflow:auto";var h=i.get("optionToContent"),p=i.get("contentToOption"),g=function(t){var e,n,i,o=function(t){var e={},n=[],i=[];return t.eachRawSeries((function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)n.push(t);else{var r=o.getBaseAxis();if("category"===r.type){var a=r.dim+"_"+r.index;e[a]||(e[a]={categoryAxis:r,valueAxis:o.getOtherAxis(r),series:[]},i.push({axisDim:r.dim,axisIndex:r.index})),e[a].series.push(t)}else n.push(t)}})),{seriesGroupByCategoryAxis:e,other:n,meta:i}}(t);return{value:y([(n=o.seriesGroupByCategoryAxis,i=[],u(n,(function(t,e){var n=t.categoryAxis,o=t.valueAxis.dim,a=[" "].concat(r(t.series,(function(t){return t.name}))),s=[n.model.getCategories()];u(t.series,(function(t){var e=t.getRawData();s.push(t.getRawData().mapArray(e.mapDimension(o),(function(t){return t})))}));for(var l=[a.join(Tb)],c=0;c<s[0].length;c++){for(var d=[],h=0;h<s.length;h++)d.push(s[h][c]);l.push(d.join(Tb))}i.push(l.join("\n"))})),i.join("\n\n"+Cb+"\n\n")),(e=o.other,r(e,(function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,o=arguments[t-1],r=e.getName(o),a=0;a<t-1;a++)i[a]=arguments[a];n.push((r?r+Tb:"")+i.join(Tb))})),n.join("\n")})).join("\n\n"+Cb+"\n\n"))],(function(t){return!!t.replace(/[\n\t\s]/g,"")})).join("\n\n"+Cb+"\n\n"),meta:o.meta}}(t);if(P(h)){var f=h(e.getOption());c(f)?l.innerHTML=f:So(f)&&l.appendChild(f)}else{d.readOnly=i.get("readOnly");var v=d.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=i.get("textColor"),v.borderColor=i.get("textareaBorderColor"),v.backgroundColor=i.get("textareaColor"),d.value=g.value,l.appendChild(d)}var m=g.meta,x=document.createElement("div");x.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",b=document.createElement("div"),S=document.createElement("div");_+=";background-color:"+i.get("buttonColor"),_+=";color:"+i.get("buttonTextColor");var w=this;function M(){n.removeChild(o),w._dom=null}wo(b,"click",M),wo(S,"click",(function(){if(null==p&&null!=h||null!=p&&null==h)M();else{var t;try{t=P(p)?p(l,e.getOption()):Pb(d.value,m)}catch(n){throw M(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),M()}})),b.innerHTML=s[1],S.innerHTML=s[2],S.style.cssText=b.style.cssText=_,!i.get("readOnly")&&x.appendChild(S),x.appendChild(b),o.appendChild(a),o.appendChild(l),o.appendChild(x),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},e}(gb);function Nb(t,e){return r(t,(function(t,n){var i=e&&e[n];if(Z(i)&&!X(i)){Z(t)&&!X(t)||(t={value:t});var o=null!=i.name&&null==t.name;return t=wt(t,i),o&&delete t.name,t}return t}))}sn({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var n=[];u(t.newOption.series,(function(t){var i=e.getSeriesByName(t.name)[0];if(i){var o=i.get("data");n.push({name:t.name,data:Nb(t.data,o)})}else n.push(p({type:"scatter"},t))})),e.mergeOption(wt({series:n},t.newOption))}));const Ob=kb;var Rb=u,Vb=le();function zb(t){var e=Vb(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Eb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.onclick=function(t,e){!function(t){Vb(t).snapshots=null}(t),e.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])}},e}(gb);sn({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));const Bb=Eb;var Gb=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Wb=function(){function t(t,e,n){var i=this;this._targetInfoList=[];var o=Hb(e,t);u(Yb,(function(t,e){(!n||!n.include||De(n.include,e)>=0)&&t(o,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=Ub[t.brushType](0,n,e);t.__rangeOffset={offset:qb[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){u(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&u(i.coordSyses,(function(i){var o=Ub[t.brushType](1,i,t.range,!0);n(t,o.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){u(t,(function(t){var n,i,o,r,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=Ub[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?qb[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,o=Jb(n),r=Jb(i),a=[o[0]/r[0],o[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return r(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:df(i),isTargetByCursor:pf(i,t,n.coordSysModel),getLinearBrushOtherExtent:hf(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&De(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Hb(e,t),o=0;o<n.length;o++){var r=n[o],a=t.panelId;if(a){if(r.panelId===a)return r}else for(var s=0;s<Xb.length;s++)if(Xb[s](i,r))return r}return!0},t}();function Fb(t){return t[0]>t[1]&&t.reverse(),t}function Hb(t,e){return Mo(t,e,{includeMainTypes:Gb})}var Yb={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,o=t.gridModels,r=qe(),a={},s={};(n||i||o)&&(u(n,(function(t){var e=t.axis.grid.model;r.set(e.id,e),a[e.id]=!0})),u(i,(function(t){var e=t.axis.grid.model;r.set(e.id,e),s[e.id]=!0})),u(o,(function(t){r.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),r.each((function(t){var o=t.coordinateSystem,r=[];u(o.getCartesians(),(function(t,e){(De(n,t.getAxis("x").model)>=0||De(i,t.getAxis("y").model)>=0)&&r.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:Zb.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){u(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Zb.geo})}))}},Xb=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,o=t.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&i&&(o=i.axis.grid.model),o&&o===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],Zb={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Li(t)),e}},Ub={lineX:Wt(jb,0),lineY:Wt(jb,1),rect:function(t,e,n,i){var o=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),r=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[Fb([o[0],r[0]]),Fb([o[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:r(n,(function(n){var r=t?e.pointToData(n,i):e.dataToPoint(n,i);return o[0][0]=Math.min(o[0][0],r[0]),o[1][0]=Math.min(o[1][0],r[1]),o[0][1]=Math.max(o[0][1],r[0]),o[1][1]=Math.max(o[1][1],r[1]),r})),xyMinMax:o}}};function jb(t,e,n,i){var o=n.getAxis(["x","y"][t]),a=Fb(r([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(i[t]),!0):o.toGlobalCoord(o.dataToCoord(i[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var qb={lineX:Wt(Kb,0),lineY:Wt(Kb,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return r(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function Kb(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Jb(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const $b=Wb;var Qb=u,tS=Ao("toolbox-dataZoom_"),eS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new cf(n.getZr()),this._brushController.on("brush",oe(this._onBrush,this)).mount()),function(t,e,n,i,o){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");var a=new $b(iS(t),e,{include:["grid"]}),s=a.makePanelOpts(o,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!r||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return zb(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){nS[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new $b(iS(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(o("x",n,e[0]),o("y",n,e[1])):o({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=zb(t);Rb(e,(function(e,i){for(var o=n.length-1;o>=0&&!n[o][i];o--);if(o<0){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var a=r.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function o(t,e,o){var r=e.getAxis(t),a=r.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=ag(0,o.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];Qb(t,(function(t,n){e.push(L(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(gb),nS={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=zb(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return Rb(n,(function(t,n){for(var o=e.length-1;o>=0;o--)if(t=e[o][n]){i[n]=t;break}})),i}(this.ecModel))}};function iS(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}Io("dataZoom",(function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),o=[],r=iS(i),a=Mo(t,r);return Qb(a.xAxisModels,(function(t){return s(t,"xAxis","xAxisIndex")})),Qb(a.yAxisModels,(function(t){return s(t,"yAxis","yAxisIndex")})),o}function s(t,e,n){var r=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:tS+e+r};a[n]=r,o.push(a)}}));const oS=eS;const rS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(de);function aS(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function sS(t){if(lo.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}var lS=sS(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function uS(t,e){if(!t)return e;e=Co(e,!0);var n=t.indexOf(e);return(t=-1===n?e:"-"+t.slice(0,n)+"-"+e).toLowerCase()}var cS=uS(sS(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),dS=uS(lS,"transform"),hS="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(lo.transform3dSupported?"will-change:transform;":"");function pS(t,e,n){var i=t.toFixed(0)+"px",o=e.toFixed(0)+"px";if(!lo.transformSupported)return n?"top:"+o+";left:"+i+";":[["top",o],["left",i]];var r=lo.transform3dSupported,a="translate"+(r?"3d":"")+"("+i+","+o+(r?",0":"")+")";return n?"top:0;left:0;"+dS+":"+a+";":[["top",0],["left",0],[lS,a]]}function gS(t,e,n){var i=[],o=t.get("transitionDuration"),r=t.get("backgroundColor"),a=t.get("shadowBlur"),s=t.get("shadowColor"),l=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),d=t.getModel("textStyle"),h=Do(t,"html"),p=l+"px "+c+"px "+a+"px "+s;return i.push("box-shadow:"+p),e&&o&&i.push(function(t,e){var n="cubic-bezier(0.23,1,0.32,1)",i=" "+t/2+"s "+n,o="opacity"+i+",visibility"+i;return e||(i=" "+t+"s "+n,o+=lo.transformSupported?","+dS+i:",left"+i+",top"+i),cS+":"+o}(o,n)),r&&i.push("background-color:"+r),u(["width","color","radius"],(function(e){var n="border-"+e,o=Co(n),r=t.get(o);null!=r&&i.push(n+":"+r+("color"===e?"":"px"))})),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var o=t.get("textShadowColor"),r=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return o&&r&&e.push("text-shadow:"+a+"px "+s+"px "+r+"px "+o),u(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(d)),null!=h&&i.push("padding:"+ro(h).join("px ")+"px"),i.join(";")+";"}function fS(t,e,n,i,o){var r=e&&e.painter;if(n){var a=r&&r.getViewportRoot();a&&Lo(t,a,n,i,o)}else{t[0]=i,t[1]=o;var s=r&&r.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var yS=function(){function t(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,lo.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),o=e.appendTo,r=o&&(c(o)?document.querySelector(o):So(o)?o:P(o)&&o(t.getDom()));fS(this._styleCoord,i,r,t.getWidth()/2,t.getHeight()/2),(r||t.getDom()).appendChild(n),this._api=t,this._container=r;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=i.handler,n=i.painter.getViewportRoot();To(n,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=(r="position",(a=(o=e).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(o))?r?a[r]:a:null),i=e.style;"absolute"!==i.position&&"absolute"!==n&&(i.position="relative")}var o,r,a,s=t.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,o=this._styleCoord;n.innerHTML?i.cssText=hS+gS(t,!this._firstShow,this._longHide)+pS(o[0],o[1],!0)+"border-color:"+St(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,o){var r=this.el;if(null!=t){var a="";if(c(o)&&"item"===n.get("trigger")&&!aS(n)&&(a=function(t,e,n){if(!c(n)||"inside"===n)return"";var i=t.get("backgroundColor"),o=t.get("borderWidth");e=St(e);var r,a,s="left"===(r=n)?"right":"right"===r?"left":"top"===r?"bottom":"top",l=Math.max(1.5*Math.round(o),6),u="",d=dS+":";De(["left","right"],s)>-1?(u+="top:50%",d+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",d+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var h=a*Math.PI/180,p=l+o,g=p*Math.abs(Math.cos(h))+p*Math.abs(Math.sin(h)),f=e+" solid "+o+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((g-Math.SQRT2*o)/2+Math.SQRT2*o-(g-p)/2))/100+"px")+";"+d+";","border-bottom:"+f,"border-right:"+f,"background-color:"+i+";"].join("")+'"></div>'}(n,i,o)),c(t))r.innerHTML=t+a;else if(t){r.innerHTML="",X(t)||(t=[t]);for(var s=0;s<t.length;s++)So(t[s])&&t[s].parentNode!==r&&r.appendChild(t[s]);if(a&&r.childNodes.length){var l=document.createElement("div");l.innerHTML=a,r.appendChild(l)}}}else r.innerHTML=""},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},t.prototype.moveTo=function(t,e){var n=this._styleCoord;if(fS(n,this._zr,this._container,t,e),null!=n[0]&&null!=n[1]){var i=this.el.style,o=pS(n[0],n[1]);u(o,(function(t){i[t[0]]=t[1]}))}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",lo.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(oe(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},t}();const vS=yS;function mS(t){return Math.max(0,t)}function xS(t){var e=mS(t.shadowBlur||0),n=mS(t.shadowOffsetX||0),i=mS(t.shadowOffsetY||0);return{left:mS(e-n),right:mS(e+n),top:mS(e-i),bottom:mS(e+i)}}function _S(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}const bS=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),_S(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,n,i,o){var r=this;Z(t)&&zi(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new Tt({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Do(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),u(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(t){r.el.style[t]=n.get(t)})),u(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(t){r.el.style[t]=a.get(t)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=xS(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},t.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;_S(i,this._zr,t,e),t=i[0],e=i[1];var o=n.style,r=mS(o.borderWidth||0),a=xS(o);n.x=t+r+a.left,n.y=e+r+a.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(oe(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();var SS=new xt({shape:{x:-1,y:-1,width:2,height:2}});function wS(t,e,n){var i,o=e.ecModel;n?(i=new Xe(n,o,o),i=new Xe(e.option,i,o)):i=e;for(var r=t.length-1;r>=0;r--){var a=t[r];a&&(a instanceof Xe&&(a=a.get("tooltip",!0)),c(a)&&(a={formatter:a}),a&&(i=new Xe(a,i,o)))}return i}function MS(t,e){return t.dispatchAction||oe(e.dispatchAction,e)}function IS(t){return"center"===t||"middle"===t}const AS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(t,e){if(!lo.node&&e.getDom()){var n=t.getComponent("tooltip"),i=this._renderMode=Po(n.get("renderMode"));this._tooltipContent="richText"===i?new bS(e):new vS(e,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},e.prototype.render=function(t,e,n){if(!lo.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?Ii(this,"_updatePosition",50,"fixRate"):Ai(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");hx("itemTooltip",this._api,oe((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(t,e,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!lo.node&&n.getDom()){var o=MS(i,n);this._ticket="";var r=i.dataByCoordSys,a=function(t,e,n){var i=zo(t).queryOptionMap,o=i.keys()[0];if(!o||"series"===o)return;var r=Eo(e,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=r.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=dt(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=SS;l.x=i.x,l.y=i.y,l.update(),dt(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},o)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:r,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=vx(i,e),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(MS(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=e.getSeriesByIndex(o);if(s)if("axis"===wS([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var o,r;if("legend"===dt(n).ssrType)return;this._lastDataByCoordSys=null,Vn(n,(function(t){return null!=dt(t).dataIndex?(o=t,!0):null!=dt(t).tooltipConfig?(r=t,!0):void 0}),!0),o?this._showSeriesItemTooltip(t,o,e):r?this._showComponentItemTooltip(t,r,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=oe(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,o=[e.offsetX,e.offsetY],r=wS([e.tooltipOption],i),a=this._renderMode,s=[],l=nn("section",{blocks:[],noHeader:!0}),c=[],d=new ko;u(t,(function(t){u(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value;if(e&&null!=o){var r=$m(o,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),h=nn("section",{header:r,noHeader:!fn(r),sortBlocks:!0,blocks:[]});l.blocks.push(h),u(t.seriesDataIndices,(function(l){var u=n.getSeriesByIndex(l.seriesIndex),g=l.dataIndexInside,f=u.getDataParams(g);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=so(e.axis,{value:o}),f.axisValueLabel=r,f.marker=d.makeTooltipMarker("item",St(f.color),a);var y=No(u.formatTooltip(g,!0,null)),v=y.frag;if(v){var m=wS([u],i).get("valueFormatter");h.blocks.push(m?p({valueFormatter:m},v):v)}y.text&&c.push(y.text),s.push(f)}}))}}))})),l.blocks.reverse(),c.reverse();var h=e.position,g=r.get("order"),f=Oo(l,d,a,g,n.get("useUTC"),r.get("textStyle"));f&&c.unshift(f);var y="richText"===a?"\n\n":"<br/>",v=c.join(y);this._showOrMove(r,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(r,h,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(r,v,s,Math.random()+"",o[0],o[1],h,null,d)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,o=dt(e),r=o.seriesIndex,a=i.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=t.positionDefault,g=wS([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=g.get("trigger");if(null==f||"item"===f){var y=s.getDataParams(l,u),v=new ko;y.marker=v.makeTooltipMarker("item",St(y.color),d);var m=No(s.formatTooltip(l,!1,u)),x=g.get("order"),_=g.get("valueFormatter"),b=m.frag,S=b?Oo(_?p({valueFormatter:_},b):b,v,d,x,i.get("useUTC"),g.get("textStyle")):m.text,w="item_"+s.name+"_"+l;this._showOrMove(g,(function(){this._showTooltipContent(g,S,y,w,t.offsetX,t.offsetY,t.position,t.target,v)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:r,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=dt(e),o=i.tooltipConfig.option||{};if(c(o)){o={content:o,formatter:o}}var r=[o],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&r.push(a),r.push({formatter:o.content});var s=t.positionDefault,l=wS(r,this._tooltipModel,s?{position:s}:null),u=l.get("content"),d=Math.random()+"",h=new ko;this._showOrMove(l,(function(){var n=L(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,d,t.offsetX,t.offsetY,t.position,e,h)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,o,r,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var d=t.get("formatter");a=a||t.get("position");var h=e,p=this._getNearestPoint([o,r],n,t.get("trigger"),t.get("borderColor")).color;if(d)if(c(d)){var g=t.ecModel.get("useUTC"),f=X(n)?n[0]:n;h=d,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(h=Ro(f.axisValue,h,g)),h=Vo(h,n,!0)}else if(P(d)){var y=oe((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,o,r,u,n,s))}),this);this._ticket=i,h=d(n,i,y)}else h=d;u.setContent(h,l,t,p,a),u.show(t,p),this._updatePosition(t,a,o,r,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||X(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:X(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),d=t.get("align"),h=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),P(e)&&(e=e([n,i],r,o.el,p,{viewSize:[s,l],contentSize:u.slice()})),X(e))n=Ut(e[0],s),i=Ut(e[1],l);else if(Z(e)){var g=e;g.width=u[0],g.height=u[1];var f=Zt(g,{width:s,height:l});n=f.x,i=f.y,d=null,h=null}else if(c(e)&&a){var y=function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+c/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+c+a;break;case"left":s=e.x-o-a,l=e.y+c/2-r/2;break;case"right":s=e.x+u+a,l=e.y+c/2-r/2}return[s,l]}(e,p,u,t.get("borderWidth"));n=y[0],i=y[1]}else{y=function(t,e,n,i,o,r,a){var s=n.getSize(),l=s[0],u=s[1];null!=r&&(t+l+r+2>i?t-=l+r:t+=r);null!=a&&(e+u+a>o?e-=u+a:e+=a);return[t,e]}(n,i,o,s,l,d?null:20,h?null:20);n=y[0],i=y[1]}if(d&&(n-=IS(d)?u[0]/2:"right"===d?u[0]:0),h&&(i-=IS(h)?u[1]/2:"bottom"===h?u[1]:0),aS(t)){y=function(t,e,n,i,o){var r=n.getSize(),a=r[0],s=r[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,o,s,l);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&u(n,(function(n,r){var a=n.dataByAxis||[],s=(t[r]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&u(a,(function(t,n){var r=s[n]||{},a=t.seriesDataIndices||[],l=r.seriesDataIndices||[];(o=o&&t.value===r.value&&t.axisType===r.axisType&&t.axisId===r.axisId&&a.length===l.length)&&u(a,(function(t,e){var n=l[e];o=o&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&u(t.seriesDataIndices,(function(t){var n=t.seriesIndex,r=e[n],a=i[n];r&&a&&a.data!==r.data&&(o=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!lo.node&&e.getDom()&&(Ai(this,"_updatePosition"),this._tooltipContent.dispose(),fx("itemTooltip",e))},e.type="tooltip",e}(je);var CS=["rect","polygon","keep","clear"];function TS(t,e){var n=Yn(t?t.brush:[]);if(n.length){var i=[];u(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var o=t&&t.toolbox;X(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var r,a,s=o.feature||(o.feature={}),l=s.brush||(s.brush={}),c=l.type||(l.type=[]);c.push.apply(c,i),a={},u(r=c,(function(t){a[t]=1})),r.length=0,u(a,(function(t,e){r.push(e)})),e&&!c.length&&c.push.apply(c,CS)}}var DS=u;function LS(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function PS(t,e,n){var i={};return DS(e,(function(e){var o,r=i[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);DS(t[e],(function(t,i){if(hh.isValidType(i)){var o={type:i,visual:t};n&&n(o,e),r[i]=new hh(o),"opacity"===i&&((o=L(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new hh(o))}}))})),i}function kS(t,e,n){var i;u(n,(function(t){e.hasOwnProperty(t)&&LS(e[t])&&(i=!0)})),i&&u(n,(function(n){e.hasOwnProperty(n)&&LS(e[n])?t[n]=L(e[n]):delete t[n]}))}var NS={lineX:OS(0),lineY:OS(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Wo(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,l=i[0];return!!(Wo(i,o,r)||Wo(i,o+a,r)||Wo(i,o,r+s)||Wo(i,o+a,r+s)||ce.create(t).contain(l[0],l[1])||Fo(o,r,o+a,r,i)||Fo(o,r,o,r+s,i)||Fo(o+a,r,o+a,r+s,i)||Fo(o,r+s,o+a,r+s,i))||void 0}}};function OS(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var o=i.range;return RS(e[t],o)}},rect:function(i,o,r){if(i){var a=r.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]<s[0]&&s.reverse(),RS(s[0],a)||RS(s[1],a)||RS(a[0],s)||RS(a[1],s)}}}}function RS(t,e){return e[0]<=t&&t<=e[1]}var VS=["inBrush","outOfBrush"],zS="__ecBrushSelect",ES="__ecInBrushSelectEvent";function BS(t){t.eachComponent({mainType:"brush"},(function(e){(e.brushTargetManager=new $b(e.option,t)).setInputRanges(e.areas,t)}))}function GS(t,e,n){var i,o,a=[];t.eachComponent({mainType:"brush"},(function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),BS(t),t.eachComponent({mainType:"brush"},(function(e,n){var s={brushId:e.id,brushIndex:n,brushName:e.name,areas:L(e.areas),selected:[]};a.push(s);var l=e.option,c=l.brushLink,d=[],h=[],p=[],g=!1;n||(i=l.throttleType,o=l.throttleDelay);var f=r(e.areas,(function(t){var e=HS[t.brushType],n=wt({boundingRect:e?e(t):void 0},t);return n.selectors=function(t){var e=t.brushType,n={point:function(i){return NS[e].point(i,n,t)},rect:function(i){return NS[e].rect(i,n,t)}};return n}(n),n})),y=PS(e.option,VS,(function(t){t.mappingMethod="fixed"}));function v(t){return"all"===c||!!d[t]}function m(t){return!!t.length}X(c)&&u(c,(function(t){d[t]=1})),t.eachSeries((function(n,i){var o=p[i]=[];"parallel"===n.subType?function(t,e){var n=t.coordinateSystem;g=g||n.hasAxisBrushed(),v(e)&&n.eachActiveState(t.getData(),(function(t,e){"active"===t&&(h[e]=1)}))}(n,i):function(n,i,o){if(!n.brushSelector||function(t,e){var n=t.option.seriesIndex;return null!=n&&"all"!==n&&(X(n)?De(n,e)<0:e!==n)}(e,i))return;if(u(f,(function(i){e.brushTargetManager.controlSeries(i,n,t)&&o.push(i),g=g||m(o)})),v(i)&&m(o)){var r=n.getData();r.each((function(t){FS(n,o,r,t)&&(h[t]=1)}))}}(n,i,o)})),t.eachSeries((function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};s.selected.push(n);var i=p[e],o=t.getData(),r=v(e)?function(t){return h[t]?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(e){return FS(t,i,o,e)?(n.dataIndex.push(o.getRawIndex(e)),"inBrush"):"outOfBrush"};(v(e)?g:m(i))&&function(t,e,n,i,o,r){var a,s={};function l(t){return Bo(n,a,t)}function c(t,e){Go(n,a,t,e)}function d(t,u){a=null==r?t:u;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var h=i.call(o,t),p=e[h],g=s[h],f=0,y=g.length;f<y;f++){var v=g[f];p[v]&&p[v].applyVisual(t,l,c)}}u(t,(function(t){var n=hh.prepareVisualTypes(e[t]);s[t]=n})),null==r?n.each(d):n.each([r],d)}(VS,y,o,r)}))})),function(t,e,n,i,o){if(!o)return;var r=t.getZr();if(r[ES])return;r[zS]||(r[zS]=WS);var a=Ii(r,zS,n,e);a(t,i)}(e,i,o,a,n)}function WS(t,e){if(!t.isDisposed()){var n=t.getZr();n[ES]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[ES]=!1}}function FS(t,e,n,i){for(var o=0,r=e.length;o<r;o++){var a=e[o];if(t.brushSelector(i,n,a.selectors,a))return!0}}var HS={rect:function(t){return YS(t.range)},polygon:function(t){for(var e,n=t.range,i=0,o=n.length;i<o;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var r=n[i];r[0]<e[0][0]&&(e[0][0]=r[0]),r[0]>e[0][1]&&(e[0][1]=r[0]),r[1]<e[1][0]&&(e[1][0]=r[1]),r[1]>e[1][1]&&(e[1][1]=r[1])}return e&&YS(e)}};function YS(t){return new ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const XS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new cf(e.getZr())).on("brush",oe(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){BS(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:L(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:L(n),$from:e})},e.type="brush",e}(je);function ZS(t,e){return fe({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Xe(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const US=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return K(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&kS(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=r(t,(function(t){return ZS(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=ZS(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(de);var jS=["rect","polygon","lineX","lineY","keep","clear"];const qS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.render=function(t,e,n){var i,o,r;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length})),this._brushType=i,this._brushMode=o,u(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?r:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return u(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},e.getDefaultOption=function(t){return{show:!0,type:jS.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(gb);var KS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return K(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(de),JS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,o=t.getModel("textStyle"),r=t.getModel("subtextStyle"),a=t.get("textAlign"),s=M(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Tt({style:Be(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),d=new Tt({style:Be(r,{text:c,fill:r.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);l.silent=!h&&!g,d.silent=!p&&!g,h&&l.on("click",(function(){qn(h,"_"+t.get("target"))})),p&&d.on("click",(function(){qn(p,"_"+t.get("subtarget"))})),dt(l).eventData=dt(d).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),c&&i.add(d);var f=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=f.width,y.height=f.height;var v=Zt(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),d.setStyle(m),f=i.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new xt({shape:{x:f.x-x[3],y:f.y-x[0],width:f.width+x[1]+x[3],height:f.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(je);const $S=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return K(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,o=this._names=[];"category"===i?(t=[],u(n,(function(e,n){var i,r=Wn(Ho(e),"");Z(e)?(i=L(e)).value=n:i=n,t.push(i),o.push(r)}))):t=n;var r={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new ie([{name:"value",type:r}],this)).initData(t,o)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(de);var QS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="timeline.slider",e.defaultOption=Rt($S.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}($S);pe(QS,Yo.prototype);const tw=QS;const ew=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="timeline",e}(je);const nw=function(t){function e(e,n,i,o){var r=t.call(this,e,n,i)||this;return r.type=o||"value",r}return K(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(we);var iw=Math.PI,ow=le(),rw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return nn("nameValue",{noName:!0,value:e})},u(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,o,a,t)}),this),this._renderAxisLabel(i,r,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,o,r,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Zt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<e.getHeight()/2?"-":"+":l.x+l.width/2<e.getWidth()/2?"+":"-":c(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===n?"left":"right"},d={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:iw/2},p="vertical"===s?l.height:l.width,g=t.getModel("controlStyle"),f=g.get("show",!0),y=f?g.get("itemSize"):0,v=f?g.get("itemGap"):0,m=y+v,x=t.get(["label","rotate"])||0;x=x*iw/180;var _=g.get("position",!0),b=f&&g.get("showPlayBtn",!0),S=f&&g.get("showPrevBtn",!0),w=f&&g.get("showNextBtn",!0),M=0,I=p;"left"===_||"bottom"===_?(b&&(i=[0,0],M+=m),S&&(o=[M,0],M+=m),w&&(r=[I-y,0],I-=m)):(b&&(i=[I-y,0],I-=m),S&&(o=[0,0],M+=m),w&&(r=[I-y,0],I-=m));var A=[M,I];return t.get("inverse")&&A.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:h[s],labelRotation:x,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||d[s],playPosition:i,prevBtnPosition:o,nextBtnPosition:r,axisExtent:A,controlSize:y,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var r=mn(),a=o.x,s=o.y+o.height;vn(r,r,[-a,-s]),He(r,r,-iw/2),vn(r,r,[a,s]),(o=o.clone()).applyTransform(r)}var l=v(o),u=v(n.getBoundingRect()),d=v(i.getBoundingRect()),h=[n.x,n.y],p=[i.x,i.y];p[0]=h[0]=l[0][0];var g,f=t.labelPosOpt;null==f||c(f)?(m(h,u,l,1,g="+"===f?0:1),m(p,d,l,1,1-g)):(m(h,u,l,1,g=f>=0?0:1),p[1]=h[1]+f);function y(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}n.setPosition(h),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Uo({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Zo({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Ie}}(e,i);o.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var r=n.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new nw("value",o,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new $;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var r=new Re({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:p({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(r);var a=this._progressLine=new Re({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:wt({lineCap:"round",lineWidth:r.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var o=this,r=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],u(a,(function(t){var a=n.dataToCoord(t.value),s=r.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:oe(o._changeTimeline,o,t.value)},h=aw(s,l,e,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),Xo(h);var p=dt(h);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=i):p.dataIndex=p.dataModel=null,o._tickSymbols.push(h)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var o=this;if(n.getLabelModel().get("show")){var r=i.getData(),a=n.getViewLabels();this._tickLabels=[],u(a,(function(i){var a=i.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(i.tickValue),h=new Tt({x:d,y:0,rotation:t.labelRotation-t.rotation,onclick:oe(o._changeTimeline,o,a),silent:!1,style:Be(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});h.ensureState("emphasis").style=Be(u),h.ensureState("progress").style=Be(c),e.add(h),Xo(h),ow(h).dataIndex=a,o._tickLabels.push(h)}))}},e.prototype._renderControl=function(t,e,n,i){var o=t.controlSize,r=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(t,n,l,u){if(t){var c=zt(M(i.get(["controlStyle",n+"BtnSize"]),o),o),d=function(t,e,n,i){var o=i.style,r=oo(t.get(["controlStyle",e]),i||{},new ce(n[0],n[1],n[2],n[3]));o&&r.setStyle(o);return r}(i,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,e.add(d),Xo(d)}}c(t.nextBtnPosition,"next",oe(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",oe(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",oe(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var o=i.getData(),r=i.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=oe(s._handlePointerDrag,s),t.ondragend=oe(s._handlePointerDragend,s),sw(t,s._progressLine,r,n,i,!0)},onUpdate:function(t){sw(t,s._progressLine,r,n,i)}};this._currentPointer=aw(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,o=Ti(i.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var r=this._progressLine;r&&(r.shape.x2=n,r.dirty());var a=this._findNearestTick(n),s=this.model;(e||a!==s.getCurrentIndex()&&s.get("realtime"))&&this._changeTimeline(a)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout((function(){var e=t.model;t._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var e=this._mainGroup.getLocalTransform();return Ci(t,e,!0)},e.prototype._findNearestTick=function(t){var e,n=this.model.getData(),i=1/0,o=this._axis;return n.each(["value"],(function(n,r){var a=o.dataToCoord(n),s=Math.abs(a-t);s<i&&(i=s,e=r)})),e},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var i=0;i<e.length;i++)e&&e[i]&&e[i].toggleState("progress",i<t);if(n)for(i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",ow(n[i]).dataIndex<=t)},e.type="timeline.slider",e}(ew);function aw(t,e,n,i,o,r){var a=e.get("color");if(o)o.setColor(a),n.add(o),r&&r.onUpdate(o);else{var s=t.get("symbol");(o=Q(s,-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),r&&r.onCreate(o)}var l=e.getItemStyle(["color"]);o.setStyle(l),i=fe({rectHover:!0,z2:100},i,!0);var u=pt(t.get("symbolSize"));i.scaleX=u[0]/2,i.scaleY=u[1]/2;var c=lt(t.get("symbolOffset"),u);c&&(i.x=(i.x||0)+c[0],i.y=(i.y||0)+c[1]);var d=t.get("symbolRotate");return i.rotation=(d||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function sw(t,e,n,i,o,r){if(!t.dragging){var a=o.getModel("checkpointStyle"),s=i.dataToCoord(o.getData().get("value",n));if(r||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}const lw=rw;function uw(t){var e=t&&t.timeline;X(e)||(e=e?[e]:[]),u(e,(function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};n[e]&&(t.axisType=n[e],delete t.type);if(cw(t),dw(t,"controlPosition")){var i=t.controlStyle||(t.controlStyle={});dw(i,"position")||(i.position=t.controlPosition),"none"!==i.position||dw(i,"show")||(i.show=!1,delete i.position),delete t.controlPosition}u(t.data||[],(function(t){Z(t)&&!X(t)&&(!dw(t,"value")&&dw(t,"name")&&(t.value=t.name),cw(t))}))}(t)}))}function cw(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},o=i.normal||(i.normal={}),r={normal:1,emphasis:1};u(i,(function(t,e){r[e]||dw(o,e)||(o[e]=t)})),n.label&&!dw(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function dw(t,e){return t.hasOwnProperty(e)}function hw(t,e){if(!t)return!1;for(var n=X(t)?t:[t],i=0;i<n.length;i++)if(n[i]&&n[i][e])return!0;return!1}function pw(t){se(t,"label",["show"])}var gw=le(),fw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.createdBySelf=!1,n}return K(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(lo.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},e.prototype._mergeOption=function(t,e,n,i){var o=this.mainType;n||e.eachSeries((function(t){var n=t.get(this.mainType,!0),r=gw(t)[o];n&&n.data?(r?r._mergeOption(n,e,!0):(i&&pw(n),u(n.data,(function(t){t instanceof Array?(pw(t[0]),pw(t[1])):pw(t)})),r=this.createMarkerModelFromSeries(n,this,e),p(r,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),gw(t)[o]=r):gw(t)[o]=null}),this)},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),r=i.getName(t);return nn("section",{header:this.name,blocks:[nn("nameValue",{name:r,value:o,noName:!r,noValue:null==o})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,e){return gw(t)[e]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(de);pe(fw,Yo.prototype);const yw=fw;const vw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(yw);function mw(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function xw(t,e,n,i,o,r){var a=[],s=ft(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=Iw(e,s,t),u=e.indicesOfNearest(s,l)[0];a[o]=e.get(n,u),a[r]=e.get(s,u);var c=e.get(i,u),d=jo(e.get(i,u));return(d=Math.min(d,20))>=0&&(a[r]=+a[r].toFixed(d)),[a,c]}var _w={min:Wt(xw,"min"),max:Wt(xw,"max"),average:Wt(xw,"average"),median:Wt(xw,"median")};function bw(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,o=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!X(e.coord)&&X(o)){var r=Sw(e,n,i,t);if((e=L(e)).type&&_w[e.type]&&r.baseAxis&&r.valueAxis){var a=De(o,r.baseAxis.dim),s=De(o,r.valueAxis.dim),l=_w[e.type](n,r.baseDataDim,r.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&X(o))for(var u=e.coord,c=0;c<2;c++)_w[u[c]]&&(u[c]=Iw(n,n.mapDimension(o[c]),u[c]));else e.coord=[];return e}}function Sw(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function ww(t,e){return!(t&&t.containData&&e.coord&&!mw(e))||t.containData(e.coord)}function Mw(t,e){return t?function(t,n,i,o){var r=o<2?t.coord&&t.coord[o]:t.value;return qo(r,e[o])}:function(t,n,i,o){return qo(t.value,e[o])}}function Iw(t,e,n){if("average"===n){var i=0,o=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,o++)})),i/o}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var Aw=le();const Cw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.init=function(){this.markerGroupMap=qe()},e.prototype.render=function(t,e,n){var i=this,o=this.markerGroupMap;o.each((function(t){Aw(t).keep=!1})),e.eachSeries((function(t){var o=yw.getMarkerModelFromSeries(t,i.type);o&&i.renderSeries(t,o,e,n)})),o.each((function(t){!Aw(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){Aw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;u(t,(function(t){var i=yw.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?Ko(t):Jo(t))}))}))},e.type="marker",e}(je);function Tw(t,e,n){var i=e.coordinateSystem;t.each((function(o){var r,a=t.getItemModel(o),s=Ut(a.get("x"),n.getWidth()),l=Ut(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(i){var u=t.get(i.dimensions[0],o),c=t.get(i.dimensions[1],o);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)}))}const Dw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=yw.getMarkerModelFromSeries(t,"markPoint");e&&(Tw(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new Ba),c=function(t,e,n){var i;i=t?r(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return p(p({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new ie(i,n),a=r(n.get("data"),Wt(bw,e));t&&(a=y(a,Wt(ww,t)));var s=Mw(!!t,i);return o.initData(a,null,s),o}(o,t,e);e.setData(c),Tw(e.getData(),t,i),c.each((function(t){var n=c.getItemModel(t),i=n.getShallow("symbol"),o=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(P(i)||P(o)||P(r)||P(a)){var u=e.getRawValue(t),d=e.getDataParams(t);P(i)&&(i=i(u,d)),P(o)&&(o=o(u,d)),P(r)&&(r=r(u,d)),P(a)&&(a=a(u,d))}var h=n.getModel("itemStyle").getItemStyle(),p=$o(s,"color");h.fill||(h.fill=p),c.setItemVisual(t,{symbol:i,symbolSize:o,symbolRotate:r,symbolOffset:a,symbolKeepAspect:l,style:h})})),u.updateData(c),this.group.add(u.group),c.eachItemGraphicEl((function(t){t.traverse((function(t){dt(t).dataModel=e}))})),this.markKeep(u),u.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(Cw);const Lw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(yw);var Pw=le(),kw=function(t,e,n,i){var o,r=t.getData();if(X(i))o=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=Me(i.yAxis,i.xAxis);else{var u=Sw(i,r,e,t);s=u.valueAxis,l=Iw(r,Qo(r,u.valueDataDim),a)}var c="x"===s.dim?0:1,d=1-c,h=L(i),g={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,g.coord[d]=1/0;var f=n.get("precision");f>=0&&m(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[c]=g.coord[c]=l,o=[h,g,{type:a,valueIndex:i.valueIndex,value:l}]}else o=[]}var y=[bw(t,o[0]),bw(t,o[1]),p({},o[2])];return y[2].type=y[2].type||null,fe(y[2],y[0]),fe(y[2],y[1]),y};function Nw(t){return!isNaN(t)&&!isFinite(t)}function Ow(t,e,n,i){var o=1-t,r=i.dimensions[t];return Nw(e[o])&&Nw(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function Rw(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(Ow(1,n,i,t)||Ow(0,n,i,t)))return!0}return ww(t,e[0])&&ww(t,e[1])}function Vw(t,e,n,i,o){var r,a=i.coordinateSystem,s=t.getItemModel(e),l=Ut(s.get("x"),o.getWidth()),u=Ut(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,d=t.get(c[0],e),h=t.get(c[1],e);r=a.dataToPoint([d,h])}if(Qa(a,"cartesian2d")){var p=a.getAxis("x"),g=a.getAxis("y");c=a.dimensions;Nw(t.get(c[0],e))?r[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):Nw(t.get(c[1],e))&&(r[1]=g.toGlobalCoord(g.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];t.setItemLayout(e,r)}const zw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=yw.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),o=Pw(e).from,r=Pw(e).to;o.each((function(e){Vw(o,e,!0,t,n),Vw(r,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new xp);this.group.add(u.group);var c=function(t,e,n){var i;i=t?r(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return p(p({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new ie(i,n),a=new ie(i,n),s=new ie([],n),l=r(n.get("data"),Wt(kw,e,t,n));t&&(l=y(l,Wt(Rw,t)));var u=Mw(!!t,i);return o.initData(r(l,(function(t){return t[0]})),null,u),a.initData(r(l,(function(t){return t[1]})),null,u),s.initData(r(l,(function(t){return t[2]}))),s.hasItemOption=!0,{from:o,to:a,line:s}}(o,t,e),d=c.from,h=c.to,g=c.line;Pw(e).from=d,Pw(e).to=h,e.setData(g);var f=e.get("symbol"),v=e.get("symbolSize"),m=e.get("symbolRotate"),x=e.get("symbolOffset");function _(e,n,o){var r=e.getItemModel(n);Vw(e,n,o,t,i);var a=r.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=$o(s,"color")),e.setItemVisual(n,{symbolKeepAspect:r.get("symbolKeepAspect"),symbolOffset:M(r.get("symbolOffset",!0),x[o?0:1]),symbolRotate:M(r.get("symbolRotate",!0),m[o?0:1]),symbolSize:M(r.get("symbolSize"),v[o?0:1]),symbol:M(r.get("symbol",!0),f[o?0:1]),style:a})}X(f)||(f=[f,f]),X(v)||(v=[v,v]),X(m)||(m=[m,m]),X(x)||(x=[x,x]),c.from.each((function(t){_(d,t,!0),_(h,t,!1)})),g.each((function(t){var e=g.getItemModel(t).getModel("lineStyle").getLineStyle();g.setItemLayout(t,[d.getItemLayout(t),h.getItemLayout(t)]),null==e.stroke&&(e.stroke=d.getItemVisual(t,"style").fill),g.setItemVisual(t,{fromSymbolKeepAspect:d.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(t,"symbolOffset"),fromSymbolRotate:d.getItemVisual(t,"symbolRotate"),fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(t,"symbolOffset"),toSymbolRotate:h.getItemVisual(t,"symbolRotate"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol"),style:e})})),u.updateData(g),c.line.eachItemGraphicEl((function(t){dt(t).dataModel=e,t.traverse((function(t){dt(t).dataModel=e}))})),this.markKeep(u),u.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(Cw);const Ew=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(yw);var Bw=le(),Gw=function(t,e,n,i){var o=i[0],r=i[1];if(o&&r){var a=bw(t,o),s=bw(t,r),l=a.coord,u=s.coord;l[0]=Me(l[0],-1/0),l[1]=Me(l[1],-1/0),u[0]=Me(u[0],1/0),u[1]=Me(u[1],1/0);var c=kn([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function Ww(t){return!isNaN(t)&&!isFinite(t)}function Fw(t,e,n,i){var o=1-t;return Ww(e[o])&&Ww(n[o])}function Hw(t,e){var n=e.coord[0],i=e.coord[1],o={coord:n,x:e.x0,y:e.y0},r={coord:i,x:e.x1,y:e.y1};return Qa(t,"cartesian2d")?!(!n||!i||!Fw(1,n,i)&&!Fw(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!mw(e)&&!mw(n))||t.containZone(e.coord,n.coord)}(t,o,r):ww(t,o)||ww(t,r)}function Yw(t,e,n,i,o){var r,a=i.coordinateSystem,s=t.getItemModel(e),l=Ut(s.get(n[0]),o.getWidth()),u=Ut(s.get(n[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=t.getValues(["x0","y0"],e),d=t.getValues(["x1","y1"],e),h=a.clampData(c),p=a.clampData(d),g=[];"x0"===n[0]?g[0]=h[0]>p[0]?d[0]:c[0]:g[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?g[1]=h[1]>p[1]?d[1]:c[1]:g[1]=h[1]>p[1]?c[1]:d[1],r=i.getMarkerPosition(g,n,!0)}else{var f=[m=t.get(n[0],e),x=t.get(n[1],e)];a.clampData&&a.clampData(f,f),r=a.dataToPoint(f,!0)}if(Qa(a,"cartesian2d")){var y=a.getAxis("x"),v=a.getAxis("y"),m=t.get(n[0],e),x=t.get(n[1],e);Ww(m)?r[0]=y.toGlobalCoord(y.getExtent()["x0"===n[0]?0:1]):Ww(x)&&(r[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var Xw=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];const Zw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=yw.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var o=r(Xw,(function(o){return Yw(i,e,o,t,n)}));i.setItemLayout(e,o),i.getItemGraphicEl(e).setShape("points",o)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new $});this.group.add(u.group),this.markKeep(u);var d=function(t,e,n){var i,o,a=["x0","y0","x1","y1"];if(t){var s=r(t&&t.dimensions,(function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return p(p({},i),{name:t,ordinalMeta:null})}));o=r(a,(function(t,e){return{name:t,type:s[e%2].type}})),i=new ie(o,n)}else i=new ie(o=[{name:"value",type:"float"}],n);var l=r(n.get("data"),Wt(Gw,e,t,n));t&&(l=y(l,Wt(Hw,t)));var u=t?function(t,e,n,i){var r=t.coord[Math.floor(i/2)][i%2];return qo(r,o[i])}:function(t,e,n,i){return qo(t.value,o[i])};return i.initData(l,null,u),i.hasItemOption=!0,i}(o,t,e);e.setData(d),d.each((function(e){var n=r(Xw,(function(n){return Yw(d,e,n,t,i)})),a=o.getAxis("x").scale,l=o.getAxis("y").scale,u=a.getExtent(),h=l.getExtent(),p=[a.parse(d.get("x0",e)),a.parse(d.get("x1",e))],g=[l.parse(d.get("y0",e)),l.parse(d.get("y1",e))];Ti(p),Ti(g);var f=!!(u[0]>p[1]||u[1]<p[0]||h[0]>g[1]||h[1]<g[0]);d.setItemLayout(e,{points:n,allClipped:f});var y=d.getItemModel(e).getModel("itemStyle").getItemStyle(),v=$o(s,"color");y.fill||(y.fill=v,c(y.fill)&&(y.fill=ri(y.fill,.4))),y.stroke||(y.stroke=v),d.setItemVisual(e,"style",y)})),d.diff(Bw(u).data).add((function(t){var e=d.getItemLayout(t);if(!e.allClipped){var n=new Qe({shape:{points:e.points}});d.setItemGraphicEl(t,n),u.group.add(n)}})).update((function(t,n){var i=Bw(u).data.getItemGraphicEl(n),o=d.getItemLayout(t);o.allClipped?i&&u.group.remove(i):(i?ot(i,{shape:{points:o.points}},e,t):i=new Qe({shape:{points:o.points}}),d.setItemGraphicEl(t,i),u.group.add(i))})).remove((function(t){var e=Bw(u).data.getItemGraphicEl(t);u.group.remove(e)})).execute(),d.eachItemGraphicEl((function(t,n){var i=d.getItemModel(n),o=d.getItemVisual(n,"style");t.useStyle(d.getItemVisual(n,"style")),ut(t,st(i),{labelFetcher:e,labelDataIndex:n,defaultText:d.getName(n)||"",inheritColor:c(o.fill)?ri(o.fill,1):"#000"}),Mt(t,i),ct(t,null,null,i.get(["emphasis","disabled"])),dt(t).dataModel=e})),Bw(u).data=d,u.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(Cw);var Uw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return K(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),X(e)&&u(e,(function(t,i){c(t)&&(t={type:t}),e[i]=fe(t,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var e=[],n=[];t.eachRawSeries((function(i){var o,r=i.name;if(n.push(r),i.legendVisualProvider){var a=i.legendVisualProvider.getAllNames();t.isSeriesFiltered(i)||(n=n.concat(a)),a.length?e=e.concat(a):o=!0}else o=!0;o&&tr(i)&&e.push(i.name)})),this._availableNames=n;var i=this.get("data")||e,o=qe(),a=r(i,(function(t){return(c(t)||m(t))&&(t={name:t}),o.get(t.name)?null:(o.set(t.name,!0),new Xe(t,this,this.ecModel))}),this);this._data=y(a,(function(t){return!!t}))},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;u(n,(function(t){e[t.get("name")]=!1}))}e[t]=!0},e.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,e=this.option.selected;u(t,(function(t){e[t.get("name",!0)]=!0}))},e.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;u(t,(function(t){var n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]}))},e.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&De(this._availableNames,t)>=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(de);const jw=Uw;var qw=Wt,Kw=u,Jw=$;function $w(t,e,n,i){eM(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),tM(t,e,n,i)}function Qw(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i<o&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function tM(t,e,n,i){Qw(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function eM(t,e,n,i){Qw(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}const nM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return K(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new Jw),this.group.add(this._selectorGroup=new Jw),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),r=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===r?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(o,t,e,n,a,r,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),d=Zt(l,u,c),h=this.layoutInner(t,o,d,i,a,s),p=Zt(wt({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=xb(h,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,o,r,a){var s=this.getContentGroup(),l=qe(),u=e.get("selectedMode"),c=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&c.push(t.id)})),Kw(e.getData(),(function(o,r){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new Jw;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a))if(h){var g=h.getData(),f=g.getVisual("legendLineStyle")||{},y=g.getVisual("legendIcon"),v=g.getVisual("style"),m=this._createItem(h,a,r,o,e,t,f,v,y,u,i);m.on("click",qw($w,a,null,i,c)).on("mouseover",qw(tM,h.name,null,i,c)).on("mouseout",qw(eM,h.name,null,i,c)),n.ssr&&m.eachChild((function(t){var e=dt(t);e.seriesIndex=h.seriesIndex,e.dataIndex=r,e.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),g=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),y=ni(g.fill);y&&0===y[3]&&(y[3]=.2,g=p(p({},g),{fill:ei(y,"rgba")}));var v=this._createItem(s,a,r,o,e,t,{},g,f,u,i);v.on("click",qw($w,null,a,i,c)).on("mouseover",qw(tM,null,a,i,c)).on("mouseout",qw(eM,null,a,i,c)),n.ssr&&v.eachChild((function(t){var e=dt(t);e.seriesIndex=s.seriesIndex,e.dataIndex=r,e.ssrType="legend"})),l.set(a,!0)}}),this)}),this),o&&this._createSelector(o,e,i,r,a)},e.prototype._createSelector=function(t,e,n,i,o){var r=this.getSelectorGroup();Kw(t,(function(t){var i=t.type,o=new Tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(o);var a=e.getModel("selectorLabel"),s=e.getModel(["emphasis","selectorLabel"]);ut(o,{normal:a,emphasis:s},{defaultText:t.title}),Xo(o)}))},e.prototype._createItem=function(t,e,n,i,o,r,a,s,l,u,d){var h=t.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),f=o.isSelected(e),y=i.get("symbolRotate"),v=i.get("symbolKeepAspect"),m=i.get("icon"),x=function(t,e,n,i,o,r,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),Kw(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=0===t.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?An(d,a):i.decal,"inherit"===u.fill&&(u.fill=i[o]);"inherit"===u.stroke&&(u.stroke=i[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?i:n).opacity);s(u,i);var h=e.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!r){var g=e.get("inactiveBorderWidth"),f=u[c];u.lineWidth="auto"===g?i.lineWidth>0&&f?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=m||l||"roundRect",i,a,s,h,f,d),_=new Jw,b=i.getModel("textStyle");if(!P(t.getLegendIcon)||m&&"inherit"!==m){var S="inherit"===m&&t.getData().getVisual("symbol")?"inherit"===y?t.getData().getVisual("symbolRotate"):y:0;_.add(function(t){var e=t.icon||"roundRect",n=Q(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:g,icon:l,iconRotate:S,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:v}))}else _.add(t.getLegendIcon({itemWidth:p,itemHeight:g,icon:l,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:v}));var w="left"===r?p+5:-5,M=r,I=o.get("formatter"),A=e;c(I)&&I?A=I.replace("{name}",null!=e?e:""):P(I)&&(A=I(e));var C=f?b.getTextColor():i.get("inactiveColor");_.add(new Tt({style:Be(b,{text:A,x:w,y:g/2,fill:C,align:M,verticalAlign:"middle"},{inheritColor:C})}));var T=new xt({shape:_.getBoundingRect(),style:{fill:"transparent"}}),D=i.getModel("tooltip");return D.get("show")&&Ge({el:T,componentModel:o,itemName:e,itemTooltipOption:D.option}),_.add(T),_.eachChild((function(t){t.silent=!0})),T.silent=!u,this.getContentGroup().add(_),Xo(_),_.__legendDataIndex=n,_},e.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();bo(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){bo("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=0===p?"width":"height",f=0===p?"height":"width",y=0===p?"y":"x";"end"===r?d[p]+=l[g]+h:u[p]+=c[g]+h,d[1-p]+=l[f]/2-c[f]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[g]=l[g]+h+c[g],v[f]=Math.max(l[f],c[f]),v[y]=Math.min(0,c[y]+d[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(je);function iM(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0}))}function oM(t,e,n){var i,o={},r="toggleSelected"===t;return n.eachComponent("legend",(function(n){r&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name));var a=n.getData();u(a,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);o.hasOwnProperty(e)?o[e]=o[e]&&i:o[e]=i}}))})),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}function rM(t){t.registerComponentModel(jw),t.registerComponentView(nM),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,iM),t.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(t){t.registerAction("legendToggleSelect","legendselectchanged",Wt(oM,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",Wt(oM,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",Wt(oM,"inverseSelect")),t.registerAction("legendSelect","legendselected",Wt(oM,"select")),t.registerAction("legendUnSelect","legendunselected",Wt(oM,"unSelect"))}(t)}function aM(t,e,n){var i=[1,1];i[t.getOrient().index]=0,me(e,n,{type:"box",ignoreSize:!!i})}const sM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(e,n,i){var o=ve(e);t.prototype.init.call(this,e,n,i),aM(this,e,o)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),aM(this,this.option,e)},e.type="legend.scroll",e.defaultOption=Rt(jw.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(jw);var lM=$,uM=["width","height"],cM=["x","y"],dM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!0,n._currentIndex=0,n}return K(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new lM),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new lM)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(e,n,i,o,r,a,s){var l=this;t.prototype.renderInner.call(this,e,n,i,o,r,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=X(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(t,e){var i=t+"DataIndex",r=oo(n.get("pageIcons",!0)[n.getOrient().name][e],{onclick:oe(l._pageGo,l,i,n,o)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});r.name=t,u.add(r)}u.add(new Tt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},e.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=uM[s],u=cM[s],c=uM[1-s],d=cM[1-s];o&&bo("horizontal",a,t.get("selectorItemGap",!0));var h=t.get("selectorButtonGap",!0),p=a.getBoundingRect(),g=[-p.x,-p.y],f=L(n);o&&(f[l]=n[l]-p[l]-h);var y=this._layoutContentAndController(t,i,f,s,l,c,d,u);if(o){if("end"===r)g[s]+=y[l]+h;else{var v=p[l]+h;g[s]-=v,y[u]-=v}y[l]+=p[l]+h,g[1-s]+=y[d]+y[c]/2-p[c]/2,y[c]=Math.max(y[c],p[c]),y[d]=Math.min(y[d],p[d]+g[1-s]),a.x=g[0],a.y=g[1],a.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,e,n,i,o,r,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;bo(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),bo("horizontal",c,t.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[o]>n[o],g=[-d.x,-d.y];e||(g[i]=l[s]);var f=[0,0],y=[-h.x,-h.y],v=M(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[o]-h[o]:f[i]+=h[o]+v);y[1-i]+=d[r]/2-h[r]/2,l.setPosition(g),u.setPosition(f),c.setPosition(y);var m={x:0,y:0};if(m[o]=p?n[o]:d[o],m[r]=Math.max(d[r],h[r]),m[a]=Math.min(0,h[a]+y[1-i]),u.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-h[o]-v,0),x[r]=m[r],u.setClipPath(new xt({shape:x})),u.__rectSize=x[o]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(t);return null!=_.pageIndex&&ot(l,{x:_.contentPosition[0],y:_.contentPosition[1]},p?t:null),this._updatePageInfoView(t,_),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;u(["pagePrev","pageNext"],(function(i){var o=null!=e[i+"DataIndex"],r=n.childOfName(i);r&&(r.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),r.cursor=o?"pointer":"default")}));var i=n.childOfName("pageText"),o=t.get("pageFormatter"),r=e.pageIndex,a=null!=r?r+1:0,s=e.pageCount;i&&o&&i.setStyle("text",c(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,r=uM[o],a=cM[o],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=m(u);h.contentPosition[o]=-p.s;for(var g=s+1,f=p,y=p,v=null;g<=c;++g)(!(v=m(l[g]))&&y.e>f.s+i||v&&!x(v,f.s))&&(f=y.i>f.i?y:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=f.i),++h.pageCount),y=v;for(g=s-1,f=p,y=p,v=null;g>=-1;--g)(v=m(l[g]))&&x(y,v.s)||!(f.i<y.i)||(y=f,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=f.i),++h.pageCount,++h.pageIndex),f=v;return h;function m(t){if(t){var e=t.getBoundingRect(),n=e[a]+t[a];return{s:n,e:n+e[r],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,o){var r=i.__legendDataIndex;null==n&&null!=r&&(n=o),r===t&&(e=o)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(nM);const hM=dM;function pM(t){Je(rM),t.registerComponentModel(sM),t.registerComponentView(hM),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}const gM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="dataZoom.inside",e.defaultOption=Rt(nb.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(nb);var fM=le();function yM(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function vM(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function mM(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function xM(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=fM(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=qe());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){var n=$_(t);u(n.infoList,(function(n){var o=n.model.uid,r=i.get(o)||i.set(o,function(t,e){var n={model:e,containsPoint:Wt(mM,e),dispatchAction:Wt(vM,t),dataZoomInfoMap:null,controller:null},i=n.controller=new Pu(t.getZr());return u(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(o){if(e.isAvailableBehavior(o.model.option)){var r=(o.getRange||{})[t],a=r&&r(o.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!o.model.get("disabled",!0)&&a&&i.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(r.dataZoomInfoMap||(r.dataZoomInfoMap=qe())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,o=t.dataZoomInfoMap;if(o){var r=o.keys()[0];null!=r&&(e=o.get(r))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each((function(t){var r=t.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),o=o&&r.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Ii(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else yM(i,t)}))}))}var _M=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return K(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,n){fM(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}(i,e,{pan:oe(bM.pan,this),zoom:oe(bM.zoom,this),scrollMove:oe(bM.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=fM(t).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r=i[o],a=n.get(r),s=a.dataZoomInfoMap;if(s){var l=e.uid;s.get(l)&&(s.removeKey(l),s.keys().length||yM(n,a))}}}(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(ob),bM={zoom:function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a){var s=wM[e](null,[i.originX,i.originY],a,n,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return ag(0,r,[0,100],0,c.minSpan,c.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:SM((function(t,e,n,i,o,r){var a=wM[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:SM((function(t,e,n,i,o,r){return wM[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta}))};function SM(t){return function(e,n,i,o){var r=this.range,a=r.slice(),s=e.axisModels[0];if(s)return ag(t(a,s,e,n,i,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}}var wM={grid:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,n,i,o){var r=n.axis,a=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}};const MM=_M;function IM(t){hb(t),t.registerComponentModel(gM),t.registerComponentView(MM),xM(t)}const AM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Rt(nb.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(nb);var CM=xt,TM="horizontal",DM="vertical",LM=["line","bar","candlestick","scatter"],PM={easing:"cubicOut",duration:100,delay:0},kM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return K(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=oe(this._onBrush,this),this._onBrushEnd=oe(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,o){if(t.prototype.render.apply(this,arguments),Ii(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Ai(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new $;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),o={width:e.getWidth(),height:e.getHeight()},r=this._orient===TM?{right:o.width-i.x-i.width,top:o.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=ve(t.option);u(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=r[t])}));var s=Zt(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===DM&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==TM||o?n===TM&&o?{scaleY:a?1:-1,scaleX:-1}:n!==DM||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([r]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new CM({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new CM({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:oe(this._onClickPanel,this)}),r=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),a=r&&o.getDimensionInfo(r)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,e[1]],p=[0,e[0]],g=[[e[0],0],[0,0]],f=[],y=p[1]/(o.count()-1),v=0,m=Math.round(o.count()/e[0]);o.each([a],(function(t,e){if(m>0&&e%m)v+=y;else{var n=null==t||isNaN(t)||""===t,i=n?0:Xt(t,u,h,!0);n&&!d&&e?(g.push([g[g.length-1][0],0]),f.push([f[f.length-1][0],0])):!n&&d&&(g.push([v,0]),f.push([v,0])),g.push([v,i]),f.push([v,i]),v+=y,d=n}})),s=this._shadowPolygonPts=g,l=this._shadowPolylinePts=f}this._shadowData=o,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var x,_,b,S,w,M=this.dataZoomModel,I=0;I<3;I++){var A=(x=1===I,_=void 0,b=void 0,S=void 0,w=void 0,_=M.getModel(x?"selectedDataBackground":"dataBackground"),b=new $,S=new Qe({shape:{points:s},segmentIgnoreThreshold:1,style:_.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),w=new $t({shape:{points:l},segmentIgnoreThreshold:1,style:_.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),b.add(S),b.add(w),b);this._displayables.sliderGroup.add(A),this._displayables.dataShadowSegs.push(A)}}}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(o,r){var a=t.getAxisProxy(o,r).getTargetSeriesModels();u(a,(function(t){if(!(n||!0!==e&&De(LM,t.get("type"))<0)){var a,s=i.getComponent(K_(o),r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,c=a.get("brushSelect"),d=e.filler=new CM({silent:c,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new CM({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),u([0,1],(function(e){var r=a.get("handleIcon");!er[r]&&r.indexOf("path://")<0&&r.indexOf("image://")<0&&(r="path://"+r);var s=Q(r,-1,0,2,2,null,!0);s.attr({cursor:NM(this._orient),draggable:!0,drift:oe(this._onDragMove,this,e),ondragend:oe(this._onDragEnd,this),onmouseover:oe(this._showDataInfo,this,!0),onmouseout:oe(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Ut(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Xo(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[e]=s);var d=a.getModel("textStyle");t.add(i[e]=new Tt({silent:!0,invisible:!0,style:Be(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var h=d;if(c){var p=Ut(a.get("moveHandleSize"),r[1]),g=e.moveHandle=new xt({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:p}}),f=.8*p,y=e.moveHandleIcon=Q(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);y.silent=!0,y.y=r[1]+p/2-.5,g.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var v=Math.min(r[1]/2,Math.max(p,10));(h=e.moveZone=new xt({invisible:!0,shape:{y:r[1]-v,height:p+v}})).on("mouseover",(function(){s.enterEmphasis(g)})).on("mouseout",(function(){s.leaveEmphasis(g)})),o.add(g),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:NM(this._orient),drift:oe(this._onDragMove,this,"all"),ondragstart:oe(this._showDataInfo,this,!0),ondragend:oe(this._onDragEnd,this),onmouseover:oe(this._showDataInfo,this,!0),onmouseout:oe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Xt(t[0],[0,100],e,!0),Xt(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];ag(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?Xt(r.minSpan,a,o,!0):null,null!=r.maxSpan?Xt(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=Ti([Xt(i[0],o,a,!0),Xt(i[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Ti(n.slice()),o=this._size;u([0,1],(function(t){var i=e.handles[t],r=this._handleHeight;i.attr({scaleX:r/2,scaleY:r/2,x:n[t]+(t?-1:1),y:o[1]/2-r/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var r={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(r),e.moveZone.setShape(r),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],o[0]],l=0;l<a.length;l++){var c=a[l],d=c.getClipPath();d||(d=new xt,c.setClipPath(d)),d.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var e=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,r=["",""];if(e.get("showDetail")){var a=e.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=t?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();r=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=Ti(this._handleEnds.slice());function d(t){var e=Li(n.handles[t].parent,this.group),a=Di(0===t?"right":"left",e),s=this._handleWidth/2+5,l=Ci([c[t]+(0===t?-s:s),this._size[1]/2],e);i[t].setStyle({x:l[0],y:l[1],verticalAlign:o===TM?"middle":a,align:o===TM?a:"center",text:r[t]})}d.call(this,0),d.call(this,1)},e.prototype._formatLabel=function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var r=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return P(i)?i(t,r):c(i)?i.replace("{value}",r):r},e.prototype._showDataInfo=function(t){t=this._dragging||t;var e=this._displayables,n=e.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),e.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](e.moveHandle,1)},e.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,un(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),r=Ci([e,n],o,!0),a=this._updateInterval(t,r[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),a&&s&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var e=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new jt(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),o=[0,100];this._range=Ti([Xt(n.x,i,o,!0),Xt(n.x+n.width,i,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(un(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new CM({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(r.x,r.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?PM:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=$_(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:.2*i,y:.2*o,width:.6*i,height:.6*o}}return t},e.type="dataZoom.slider",e}(ob);function NM(t){return"vertical"===t?"ns-resize":"ew-resize"}const OM=kM;function RM(t){t.registerComponentModel(AM),t.registerComponentView(OM),hb(t)}var VM={get:function(t,e,n){var i=L((zM[t]||{})[e]);return n&&X(i)?i[i.length-1]:i}},zM={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const EM=VM;var BM=hh.mapVisual,GM=hh.eachVisual,WM=X,FM=u,HM=Ti,YM=Xt,XM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return K(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&kS(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=oe(t,this),this.controllerVisuals=PS(this.option.controller,e,t),this.targetVisuals=PS(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=Yn(t),e},e.prototype.eachTargetSeries=function(t,e){u(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,o=this.option,r=o.precision,a=this.dataBound,s=o.formatter;n=n||["<",">"],X(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return c(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):P(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},e.prototype.resetExtent=function(){var t=this.option,e=HM([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),o=e.controller||(e.controller={});fe(i,n),fe(o,n);var r=this.isCategory();function a(n){WM(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,o),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},FM(i,(function(t,e){if(hh.isValidType(e)){var n=EM.get(e,"inactive",r);null!=n&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";FM(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:r?i:[i]}),null==l.symbol&&(l.symbol=e&&L(e)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&L(n)||(r?s[0]:[s[0],s[0]])),l.symbol=BM(l.symbol,(function(t){return"none"===t?o:t}));var u=l.symbolSize;if(null!=u){var c=-1/0;GM(u,(function(t){t>c&&(c=t)})),l.symbolSize=BM(u,(function(t){return YM(t,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(de);const ZM=XM;var UM=[20,140];function jM(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],r=[],a=0;a<=200&&o<n[1];a++)r.push(o),o+=i;return r.push(n[1]),r}const qM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=UM[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=UM[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):X(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),u(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Ti((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},e.prototype.getValueState=function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=jM(this,"outOfRange",this.getExtent()),n=jM(this,"inRange",this.option.range.slice()),i=[];function o(e,n){i.push({value:e,color:t(e,n)})}for(var r=0,a=0,s=n.length,l=e.length;a<l&&(!n.length||e[a]<=n[0]);a++)e[a]<n[r]&&o(e[a],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&o(n[r],"outOfRange"),o(n[r],"inRange");for(u=1;a<l;a++)(!n.length||n[n.length-1]<e[a])&&(u&&(i.length&&o(i[i.length-1].value,"outOfRange"),u=0),o(e[a],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Rt(ZM.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(ZM);const KM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return K(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e},e.prototype.render=function(t,e,n,i){this.visualMapModel=t,!1!==t.get("show")?this.doRender(t,e,n,i):this.group.removeAll()},e.prototype.renderBackground=function(t){var e=this.visualMapModel,n=ro(e.get("padding")||0),i=t.getBoundingRect();t.add(new xt({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,e,n){var i=(n=n||{}).forceState,o=this.visualMapModel,r={};if("color"===e){var a=o.get("contentColor");r.color=a}function s(t){return r[t]}function l(t,e){r[t]=e}var c=o.controllerVisuals[i||o.getValueState(t)],d=hh.prepareVisualTypes(c);return u(d,(function(i){var o=c[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",o=c.__alphaForOpacity),hh.dependsOn(i,e)&&o&&o.applyVisual(t,s,l)})),r[e]},e.prototype.positionGroup=function(t){var e=this.visualMapModel,n=this.api;Xn(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,e,n,i){},e.type="visualMap",e}(je);var JM=[["left","right","width"],["top","bottom","height"]];function $M(t,e,n){var i=t.option,o=i.align;if(null!=o&&"auto"!==o)return o;for(var r={width:e.getWidth(),height:e.getHeight()},a="horizontal"===i.orient?1:0,s=JM[a],l=[0,null,10],u={},c=0;c<3;c++)u[JM[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:i[s[c]];var d=[["x","width",3],["y","height",0]][a],h=Zt(u,r,i.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*r[d[1]]?0:1]}function QM(t,e){return u(t||[],(function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")})),t}var tI=Xt,eI=u,nI=Math.min,iI=Math.max,oI=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return K(n,t),n.prototype.init=function(e,n){t.prototype.init.call(this,e,n),this._hoverLinkFromSeriesMouseOver=oe(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=oe(this._hideIndicator,this)},n.prototype.doRender=function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},n.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},n.prototype._renderEndsText=function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var o=this.visualMapModel,r=o.get("textGap"),a=o.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-r:a[1]+r],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Tt({style:Be(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:i})}))}},n.prototype._renderBar=function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,r=this._useHandle,a=$M(e,this.api,i),s=n.mainGroup=this._createBarGroup(a),l=new $;s.add(l),l.add(n.outOfRange=rI()),l.add(n.inRange=rI(null,r?sI(this._orient):null,oe(this._dragHandle,this,"all",!1),oe(this._dragHandle,this,"all",!0))),l.setClipPath(new xt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var u=e.textStyleModel.getTextRect("国"),c=iI(u.width,u.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(e,s,0,i,c,o),this._createHandle(e,s,1,i,c,o)),this._createIndicator(e,s,i,c,o),t.add(s)},n.prototype._createHandle=function(t,e,n,i,o,r){var a=oe(this._dragHandle,this,n,!1),s=oe(this._dragHandle,this,n,!0),l=zt(t.get("handleSize"),i[0]),u=Q(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=sI(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){un(t.event)}}),u.x=i[0]/2,u.useStyle(t.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Jn(u,!0),e.add(u);var d=this.visualMapModel.textStyleModel,h=new Tt({cursor:c,draggable:!0,drift:a,onmousemove:function(t){un(t.event)},ondragend:s,style:Be(d,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var p=[l,0],g=this._shapes;g.handleThumbs[n]=u,g.handleLabelPoints[n]=p,g.handleLabels[n]=h},n.prototype._createIndicator=function(t,n,i,o,r){var a=zt(t.get("indicatorSize"),i[0]),s=Q(t.get("indicatorIcon"),-a/2,-a/2,a,a,null,!0);s.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var l=t.getModel("indicatorStyle").getItemStyle();if(s instanceof e){var u=s.style;s.useStyle(p({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},l))}else s.useStyle(l);n.add(s);var c=this.visualMapModel.textStyleModel,d=new Tt({silent:!0,invisible:!0,style:Be(c,{x:0,y:0,text:""})});this.group.add(d);var h=[("horizontal"===r?o/2:6)+i[0]/2,0],g=this._shapes;g.indicator=s,g.indicatorLabel=d,g.indicatorLabelPoint=h,this._firstShowIndicator=!0},n.prototype._dragHandle=function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():aI(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},n.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[tI(e[0],n,i,!0),tI(e[1],n,i,!0)]},n.prototype._updateInterval=function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];ag(e,i,o,t,0);var r=n.getExtent();this._dataInterval=[tI(i[0],o,r,!0),tI(i[1],o,r,!0)]},n.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,o=[0,e.itemSize[1]],r=t?o:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,r,"inRange"),s=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),i.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(r,a)},n.prototype._createBarVisual=function(t,e,n,i){var o={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,o),a=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(n,a);return{barColor:new Pt(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},n.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var r=t[0]+i*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},n.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},n.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new $("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},n.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,r=n.handleLabels,a=i.itemSize,s=i.getExtent();eI([0,1],(function(l){var u=o[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=tI(t[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=Ci(n.handleLabelPoints[l],Li(u,this.group));r[l].setStyle({x:h[0],y:h[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},n.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(t,"symbolSize"),h=tI(t,r,s,!0),p=a[0]-d/2,g={x:u.x,y:u.y};u.y=h,u.x=p;var f=Ci(l.indicatorLabelPoint,Li(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var x={x:p,y:h,style:{fill:c}},_={style:{x:f[0],y:f[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=g.x,u.y=g.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var w=0;w<S.length;w++)this.api.enterBlur(S[w])}},n.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([e.offsetX,e.offsetY],t._shapes.mainGroup,!0,!0);i[1]=nI(iI(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},n.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},n.prototype._doHoverLinkToSeries=function(t,e){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],r=n.getExtent();t=nI(iI(o[0],t),o[1]);var a=function(t,e,n){var i=6,o=t.get("hoverLinkDataSize");o&&(i=tI(o,e,n,!0)/2);return i}(n,r,o),s=[t-a,t+a],l=tI(t,o,r,!0),u=[tI(s[0],o,r,!0),tI(s[1],o,r,!0)];s[0]<o[0]&&(u[0]=-1/0),s[1]>o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(e||aI(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=nr(c,d);this._dispatchHighDown("downplay",QM(h[0],n)),this._dispatchHighDown("highlight",QM(h[1],n))}},n.prototype._hoverLinkFromSeriesMouseOver=function(t){var e;if(Vn(t.target,(function(t){var n=dt(t);if(null!=n.dataIndex)return e=n,!0}),!0),e){var n=this.ecModel.getSeriesByIndex(e.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(e.dataType),r=o.getStore().get(i.getDataDimensionIndex(o),e.dataIndex);isNaN(r)||this._showIndicator(r,r)}}},n.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n<e.length;n++)this.api.leaveBlur(e[n])},n.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",QM(t,this.visualMapModel)),t.length=0},n.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},n.prototype._applyTransform=function(t,e,n,i){var o=Li(e,i?null:this.group);return X(t)?Ci(t,o,n):Di(t,o,n)},n.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},n.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},n.type="visualMap.continuous",n}(KM);function rI(t,e,n,i){return new Qe({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){un(t.event)},ondragend:i})}function aI(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function sI(t){return"vertical"===t?"ns-resize":"ew-resize"}const lI=oI;var uI={type:"selectDataRange",event:"dataRangeSelected",update:"update"},cI=function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))},dI=[{createOnAllSeries:!0,reset:function(t,e){var n=[];return e.eachComponent("visualMap",(function(e){var i,o,r,a,s,l=t.pipelineContext;!e.isTargetSeries(t)||l&&l.large||n.push((i=e.stateList,o=e.targetVisuals,r=oe(e.getValueState,e),a=e.getDataDimensionIndex(t.getData()),s={},u(i,(function(t){var e=hh.prepareVisualTypes(o[t]);s[t]=e})),{progress:function(t,e){var n,i;function l(t){return Bo(e,i,t)}function u(t,n){Go(e,i,t,n)}null!=a&&(n=e.getDimensionIndex(a));for(var c=e.getStore();null!=(i=t.next());){var d=e.getRawDataItem(i);if(!d||!1!==d.visualMap)for(var h=null!=a?c.get(n,i):i,p=r(h),g=o[p],f=s[p],y=0,v=f.length;y<v;y++){var m=f[y];g[m]&&g[m].applyVisual(h,l,u)}}}}))})),n}},{createOnAllSeries:!0,reset:function(t,e){var n=t.getData(),i=[];e.eachComponent("visualMap",(function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(oe(hI,null,t,e))||{stops:[],outerColors:[]},r=e.getDataDimensionIndex(n);r>=0&&(o.dimension=r,i.push(o))}})),t.getData().setVisual("visualMeta",i)}}];function hI(t,e,n,i){for(var o=e.targetVisuals[i],r=hh.prepareVisualTypes(o),a={color:$o(t.getData(),"color")},s=0,l=r.length;s<l;s++){var u=r[s],c=o["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,h)}return a.color;function d(t){return a[t]}function h(t,e){a[t]=e}}var pI=u;function gI(t){var e=t&&t.visualMap;X(e)||(e=e?[e]:[]),pI(e,(function(t){if(t){fI(t,"splitList")&&!fI(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&X(e)&&pI(e,(function(t){Z(t)&&(fI(t,"start")&&!fI(t,"min")&&(t.min=t.start),fI(t,"end")&&!fI(t,"max")&&(t.max=t.end))}))}}))}function fI(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var yI=!1;function vI(t){yI||(yI=!0,t.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(uI,cI),u(dI,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(gI))}function mI(t){t.registerComponentModel(qM),t.registerComponentView(lI),vI(t)}var xI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return K(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],_I[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var o=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=L(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=r(this._pieceList,(function(t){return t=L(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=hh.listVisualTypes(),o=this.isCategory();function r(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}u(e.pieces,(function(t){u(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),u(n,(function(t,n){var i=!1;u(this.stateList,(function(t){i=i||r(e,t,n)||r(e.target,t,n)}),this),!i&&u(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=EM.get(n,"inRange"===t?"active":"inactive",o)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,o=(e?n:t).selected||{};if(n.selected=o,u(i,(function(t,e){var n=this.getSelectedMapKey(t);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var r=!1;u(i,(function(t,e){var n=this.getSelectedMapKey(t);o[n]&&(r?o[n]=!1:r=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=L(t)},e.prototype.getValueState=function(t){var e=hh.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var o=[],r=i.getData();r.each(this.getDataDimensionIndex(r),(function(e,i){hh.findPieceIndex(e,n)===t&&o.push(i)}),this),e.push({seriesId:i.id,dataIndex:o})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),(r=o[o.length-1].interval[1])!==1/0&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return u(o,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(o,r){var a=i.getRepresentValue({interval:o});r||(r=i.getValueState(a));var s=t(a,r);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Rt(ZM.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(ZM),_I={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a<o;s+=r,a++){var l=a===o-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),ir(t),u(t,(function(t,e){t.index=e,t.text=this.formatValueText(t.interval)}),this)},categories:function(t){var e=this.option;u(e.categories,(function(e){t.push({text:this.formatValueText(e,!0),value:e})}),this),bI(e,t)},pieces:function(t){var e=this.option;u(e.pieces,(function(e,n){Z(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var o=i.value=e.value;i.interval=[o,o],i.close=[1,1]}else{for(var r=i.interval=[],a=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],h=0;h<3&&null==r[c];h++)r[c]=e[d[h]],a[c]=s[h],u[c]=2===h;null==r[c]&&(r[c]=l[c])}u[0]&&r[1]===1/0&&(a[0]=0),u[1]&&r[0]===-1/0&&(a[1]=0),r[0]===r[1]&&a[0]&&a[1]&&(i.value=r[0])}i.visual=hh.retrieveVisuals(e),t.push(i)}),this),bI(e,t),ir(t),u(t,(function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function bI(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}const SI=xI;const wI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return K(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,o=i.getFont(),r=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),c=l.endsText,d=Me(e.get("showLabel",!0),!c);c&&this._renderEndsText(t,c[0],s,d,a),u(l.viewPieceList,(function(i){var l=i.piece,u=new $;u.onclick=oe(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),d){var h=this.visualMapModel.getValueState(c);u.add(new Tt({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:r,opacity:"outOfRange"===h?.5:1}}))}t.add(u)}),this),c&&this._renderEndsText(t,c[1],s,d,a),bo(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:QM(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return $M(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,o){if(e){var r=new $,a=this.visualMapModel.textStyleModel;r.add(new Tt({style:Be(a,{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e})})),t.add(r)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=r(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return("horizontal"===i?o:!o)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(Q(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var o=L(n.selected),r=e.getSelectedMapKey(t);"single"===i||!0===i?(o[r]=!0,u(o,(function(t,e){o[e]=e===r}))):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(KM);function MI(t){t.registerComponentModel(SI),t.registerComponentView(wI),vI(t)}var II={label:{enabled:!0},decal:{show:!1}},AI=le(),CI={};function TI(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=L(II);fe(i.label,t.getLocaleModel().get("aria"),!1),fe(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=qe();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),AI(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(P(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=Hn(e.ecModel,e.name,CI,t.getSeriesCount()),o=n.getVisual("decal");n.setVisual("decal",u(o,i))}else{var r=e.getRawData(),a={},s=AI(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=r.count();r.each((function(t){var i=a[t],o=r.getName(t)||t+"",c=Hn(e.ecModel,o,s,l),d=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(d,c))}))}}function u(t,e){var n=t?p(p({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),r=n.getModel("label");if(r.option=wt(r.option,i),!r.get("enabled"))return;var a=e.getZr().dom;if(r.get("description"))return void a.setAttribute("aria-label",r.get("description"));var s,l=t.getSeriesCount(),u=r.get(["data","maxCount"])||10,c=r.get(["series","maxCount"])||10,d=Math.min(l,c);if(l<1)return;var h=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();s=h?o(r.get(["general","withTitle"]),{title:h}):r.get(["general","withoutTitle"]);var p=[];s+=o(l>1?r.get(["series","multiple","prefix"]):r.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n<d){var i=void 0,a=e.get("name")?"withName":"withoutName";i=o(i=l>1?r.get(["series","multiple",a]):r.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,_=t.getLocaleModel().get(["series","typeNames"]),_[x]||_.chart)});var s=e.getData();if(s.count()>u)i+=o(r.get(["data","partialData"]),{displayCnt:u});else i+=r.get(["data","allData"]);for(var c=r.get(["data","separator","middle"]),h=r.get(["data","separator","end"]),g=[],f=0;f<s.count();f++)if(f<u){var y=s.getName(f),v=s.getValues(f),m=r.get(["data",y?"withName":"withoutName"]);g.push(o(m,{name:y,value:v.join(c)}))}i+=g.join(c)+h,p.push(i)}var x,_}));var g=r.getModel(["series","multiple","separator"]),f=g.get("middle"),y=g.get("end");s+=p.join(f)+y,a.setAttribute("aria-label",s)}()}function o(t,e){if(!c(t))return t;var n=t;return u(e,(function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)})),n}}function DI(t){if(t&&t.aria){var e=t.aria;null!=e.show&&(e.enabled=e.show),e.label=e.label||{},u(["description","general","series","data"],(function(t){null!=e[t]&&(e.label[t]=e[t])}))}}var LI={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},PI=function(){function t(t){if(null==(this._condVal=c(t)?new RegExp(t):ar(t)?t:null)){zi("")}}return t.prototype.evaluate=function(t){var e=typeof t;return c(e)?this._condVal.test(t):!!m(e)&&this._condVal.test(t+"")},t}(),kI=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),NI=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},t}(),OI=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},t}(),RI=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),VI=function(){function t(){}return t.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},t}();function zI(t,e){if(!0===t||!1===t){var n=new kI;return n.value=t,n}return BI(t)||zi(""),t.and?EI("and",t,e):t.or?EI("or",t,e):t.not?function(t,e){var n=t.not,i="";BI(n)||zi(i);var o=new RI;o.child=zI(n,e),o.child||zi(i);return o}(t,e):function(t,e){for(var n="",i=e.prepareGetValue(t),o=[],r=a(t),s=t.parser,l=s?or(s):null,u=0;u<r.length;u++){var c=r[u];if("parser"!==c&&!e.valueGetterAttrMap.get(c)){var d=dn(LI,c)?LI[c]:c,h=t[c],p=l?l(h):h,g=rr(d,p)||"reg"===d&&new PI(p);g||zi(n),o.push(g)}}o.length||zi(n);var f=new VI;return f.valueGetterParam=i,f.valueParser=l,f.getValue=e.getValue,f.subCondList=o,f}(t,e)}function EI(t,e,n){var i=e[t];X(i)||zi(""),i.length||zi("");var o="and"===t?new NI:new OI;return o.children=r(i,(function(t){return zI(t,n)})),o.children.length||zi(""),o}function BI(t){return Z(t)&&!Ji(t)}var GI=function(){function t(t,e){this._cond=zI(t,e)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();var WI={type:"echarts:filter",transform:function(t){for(var e,n,i,o=t.upstream,r=(n=t.config,i={valueGetterAttrMap:qe({dimension:!0}),prepareGetValue:function(t){var e=t.dimension;dn(t,"dimension")||zi("");var n=o.getDimensionInfo(e);return n||zi(""),{dimIdx:n.index}},getValue:function(t){return o.retrieveValueFromItem(e,t.dimIdx)}},new GI(n,i)),a=[],s=0,l=o.count();s<l;s++)e=o.getRawDataItem(s),r.evaluate()&&a.push(e);return{data:a}}},FI={type:"echarts:sort",transform:function(t){var e=t.upstream,n=t.config,i="",o=Yn(n);o.length||zi(i);var r=[];u(o,(function(t){var n=t.dimension,o=t.order,a=t.parser,s=t.incomparable;if(null==n&&zi(i),"asc"!==o&&"desc"!==o&&zi(i),s&&"min"!==s&&"max"!==s){zi("")}if("asc"!==o&&"desc"!==o){zi("")}var l=e.getDimensionInfo(n);l||zi(i);var u=a?or(a):null;a&&!u&&zi(i),r.push({dimIdx:l.index,parser:u,comparator:new sr(o,s)})}));var a=e.sourceFormat;a!==Vi&&a!==lr&&zi(i);for(var s=[],l=0,c=e.count();l<c;l++)s.push(e.getRawDataItem(l));return s.sort((function(t,n){for(var i=0;i<r.length;i++){var o=r[i],a=e.retrieveValueFromItem(t,o.dimIdx),s=e.retrieveValueFromItem(n,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var l=o.comparator.evaluate(a,s);if(0!==l)return l}return 0})),{data:s}}};var HI=f.CMD;function YI(t,e){return Math.abs(t-e)<1e-5}function XI(t){var e,n,i,o,r,a,s,l,u,c,d,h,p,g,f,y,v,m,x,_,b,S,w,M,I=t.data,A=t.len(),C=[],T=0,D=0,L=0,P=0;function k(t,n){e&&e.length>2&&C.push(e),e=[t,n]}function N(t,n,i,o){YI(t,i)&&YI(n,o)||e.push(t,n,i,o,i,o)}for(var O=0;O<A;){var R=I[O++],V=1===O;switch(V&&(L=T=I[O],P=D=I[O+1],R!==HI.L&&R!==HI.C&&R!==HI.Q||(e=[L,P])),R){case HI.M:T=L=I[O++],D=P=I[O++],k(L,P);break;case HI.L:N(T,D,n=I[O++],i=I[O++]),T=n,D=i;break;case HI.C:e.push(I[O++],I[O++],I[O++],I[O++],T=I[O++],D=I[O++]);break;case HI.Q:n=I[O++],i=I[O++],o=I[O++],r=I[O++],e.push(T+2/3*(n-T),D+2/3*(i-D),o+2/3*(n-o),r+2/3*(i-r),o,r),T=o,D=r;break;case HI.A:var z=I[O++],E=I[O++],B=I[O++],G=I[O++],W=I[O++],F=I[O++]+W;O+=1;var H=!I[O++];n=Math.cos(W)*B+z,i=Math.sin(W)*G+E,V?k(L=n,P=i):N(T,D,n,i),T=Math.cos(F)*B+z,D=Math.sin(F)*G+E;for(var Y=(H?-1:1)*Math.PI/2,X=W;H?X>F:X<F;X+=Y){var Z=H?Math.max(X+Y,F):Math.min(X+Y,F);a=X,s=Z,l=z,u=E,c=B,d=G,h=void 0,p=void 0,g=void 0,f=void 0,y=void 0,v=void 0,m=void 0,x=void 0,_=void 0,b=void 0,S=void 0,w=void 0,M=void 0,h=Math.abs(s-a),p=4*Math.tan(h/4)/3,g=s<a?-1:1,f=Math.cos(a),y=Math.sin(a),v=Math.cos(s),m=Math.sin(s),x=f*c+l,_=y*d+u,b=v*c+l,S=m*d+u,w=c*p*g,M=d*p*g,e.push(x-w*y,_+M*f,b+w*m,S-M*v,b,S)}break;case HI.R:L=T=I[O++],P=D=I[O++],n=L+I[O++],i=P+I[O++],k(n,P),N(n,P,n,i),N(n,i,L,i),N(L,i,L,P),N(L,P,n,P);break;case HI.Z:e&&N(T,D,L,P),T=L,D=P}}return e&&e.length>2&&C.push(e),C}function ZI(t,e,n,i,o,r,a,s,l,u){if(YI(t,n)&&YI(e,i)&&YI(o,a)&&YI(r,s))l.push(a,s);else{var c=2/u,d=c*c,h=a-t,p=s-e,g=Math.sqrt(h*h+p*p);h/=g,p/=g;var f=n-t,y=i-e,v=o-a,m=r-s,x=f*f+y*y,_=v*v+m*m;if(x<d&&_<d)l.push(a,s);else{var b=h*f+p*y,S=-h*v-p*m;if(x-b*b<d&&b>=0&&_-S*S<d&&S>=0)l.push(a,s);else{var w=[],M=[];ur(t,n,o,a,.5,w),ur(e,i,r,s,.5,M),ZI(w[0],M[0],w[1],M[1],w[2],M[2],w[3],M[3],l,u),ZI(w[4],M[4],w[5],M[5],w[6],M[6],w[7],M[7],l,u)}}}}function UI(t,e,n){var i=t[e],o=t[1-e],r=Math.abs(i/o),a=Math.ceil(Math.sqrt(r*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u<a;u++)l.push(s);var c=n-a*s;if(c>0)for(u=0;u<c;u++)l[u%a]+=1;return l}function jI(t,e,n){for(var i=t.r0,o=t.r,r=t.startAngle,a=t.endAngle,s=Math.abs(a-r),l=s*o,u=o-i,c=l>Math.abs(u),d=UI([l,u],c?0:1,e),h=(c?s:u)/d.length,p=0;p<d.length;p++)for(var g=(c?u:s)/d[p],f=0;f<d[p];f++){var y={};c?(y.startAngle=r+h*p,y.endAngle=r+h*(p+1),y.r0=i+g*f,y.r=i+g*(f+1)):(y.startAngle=r+g*f,y.endAngle=r+g*(f+1),y.r0=i+h*p,y.r=i+h*(p+1)),y.clockwise=t.clockwise,y.cx=t.cx,y.cy=t.cy,n.push(y)}}function qI(t,e,n,i){return t*i-n*e}function KI(t,e,n,i,o,r,a,s){var l=n-t,u=i-e,c=a-o,d=s-r,h=qI(c,d,l,u);if(Math.abs(h)<1e-6)return null;var p=qI(t-o,e-r,c,d)/h;return p<0||p>1?null:new jt(p*l+t,p*u+e)}function JI(t,e,n){var i=new jt;jt.sub(i,n,e),i.normalize();var o=new jt;return jt.sub(o,t,e),o.dot(i)}function $I(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function QI(t){var e=t.points,n=[],i=[];zn(e,n,i);var o=new ce(n[0],n[1],i[0]-n[0],i[1]-n[1]),r=o.width,a=o.height,s=o.x,l=o.y,u=new jt,c=new jt;return r>a?(u.x=c.x=s+r/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+r),function(t,e,n){for(var i=t.length,o=[],r=0;r<i;r++){var a=t[r],s=t[(r+1)%i],l=KI(a[0],a[1],s[0],s[1],e.x,e.y,n.x,n.y);l&&o.push({projPt:JI(l,e,n),pt:l,idx:r})}if(o.length<2)return[{points:t},{points:t}];o.sort((function(t,e){return t.projPt-e.projPt}));var u=o[0],c=o[o.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}var h=[u.pt.x,u.pt.y],p=[c.pt.x,c.pt.y],g=[h],f=[p];for(r=u.idx+1;r<=c.idx;r++)$I(g,t[r].slice());for($I(g,p),$I(g,h),r=c.idx+1;r<=u.idx+i;r++)$I(f,t[r%i].slice());return $I(f,h),$I(f,p),[{points:g},{points:f}]}(e,u,c)}function tA(t,e,n,i){if(1===n)i.push(e);else{var o=Math.floor(n/2),r=t(e);tA(t,r[0],o,i),tA(t,r[1],n-o,i)}return i}function eA(t,e){var n,i=[],o=t.shape;switch(t.type){case"rect":!function(t,e,n){for(var i=t.width,o=t.height,r=i>o,a=UI([i,o],r?0:1,e),s=r?"width":"height",l=r?"height":"width",u=r?"x":"y",c=r?"y":"x",d=t[s]/a.length,h=0;h<a.length;h++)for(var p=t[l]/a[h],g=0;g<a[h];g++){var f={};f[u]=h*d,f[c]=g*p,f[s]=d,f[l]=p,f.x+=t.x,f.y+=t.y,n.push(f)}}(o,e,i),n=xt;break;case"sector":jI(o,e,i),n=bt;break;case"circle":jI({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},e,i),n=bt;break;default:var a=t.getComputedTransform(),s=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,l=r(function(t,e){var n=XI(t),i=[];e=e||1;for(var o=0;o<n.length;o++){var r=n[o],a=[],s=r[0],l=r[1];a.push(s,l);for(var u=2;u<r.length;){var c=r[u++],d=r[u++],h=r[u++],p=r[u++],g=r[u++],f=r[u++];ZI(s,l,c,d,h,p,g,f,a,e),s=g,l=f}i.push(a)}return i}(t.getUpdatedPathProxy(),s),(function(t){return function(t){for(var e=[],n=0;n<t.length;)e.push([t[n++],t[n++]]);return e}(t)})),u=l.length;if(0===u)tA(QI,{points:l[0]},e,i);else if(u===e)for(var c=0;c<u;c++)i.push({points:l[c]});else{var d=0,h=r(l,(function(t){var e=[],n=[];zn(t,e,n);var i=(n[1]-e[1])*(n[0]-e[0]);return d+=i,{poly:t,area:i}}));h.sort((function(t,e){return e.area-t.area}));var p=e;for(c=0;c<u;c++){var g=h[c];if(p<=0)break;var f=c===u-1?p:Math.ceil(g.area/d*e);f<0||(tA(QI,{points:g.poly},f,i),p-=f)}}n=Qe}if(!n)return function(t,e){for(var n=[],i=0;i<e;i++)n.push(cr(t));return n}(t,e);var y,v,m=[];for(c=0;c<i.length;c++){var x=new n;x.setShape(i[c]),y=t,(v=x).setStyle(y.style),v.z=y.z,v.z2=y.z2,v.zlevel=y.zlevel,m.push(x)}return m}function nA(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var o=[],r=[],a=n<i?t:e,s=Math.min(n,i),l=Math.abs(i-n)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[a[0],a[1]],h=l,p=2;p<s;){var g=a[p-2],f=a[p-1],y=a[p++],v=a[p++],m=a[p++],x=a[p++],_=a[p++],b=a[p++];if(h<=0)d.push(y,v,m,x,_,b);else{for(var S=Math.min(h,c-1)+1,w=1;w<=S;w++){var M=w/S;ur(g,y,m,_,M,o),ur(f,v,x,b,M,r),g=o[3],f=r[3],d.push(o[1],r[1],o[2],r[2],g,f),y=o[5],v=r[5],m=o[6],x=r[6]}h-=S-1}}return a===t?[d,e]:[t,d]}function iA(t,e){for(var n=t.length,i=t[n-2],o=t[n-1],r=[],a=0;a<e.length;)r[a++]=i,r[a++]=o;return r}function oA(t){for(var e=0,n=0,i=0,o=t.length,r=0,a=o-2;r<o;a=r,r+=2){var s=t[a],l=t[a+1],u=t[r],c=t[r+1],d=s*c-u*l;e+=d,n+=(s+u)*d,i+=(l+c)*d}return 0===e?[t[0]||0,t[1]||0]:[n/e/3,i/e/3,e]}function rA(t,e,n,i){for(var o=(t.length-2)/6,r=1/0,a=0,s=t.length,l=s-2,u=0;u<o;u++){for(var c=6*u,d=0,h=0;h<s;h+=2){var p=0===h?c:(c+h-2)%l+2,g=t[p]-n[0],f=t[p+1]-n[1],y=e[h]-i[0]-g,v=e[h+1]-i[1]-f;d+=y*y+v*v}d<r&&(r=d,a=u)}return a}function aA(t){for(var e=[],n=t.length,i=0;i<n;i+=2)e[i]=t[n-i-2],e[i+1]=t[n-i-1];return e}function sA(t){return t.__isCombineMorphing}var lA="__mOriginal_";function uA(t,e,n){var i=lA+e,o=t[i]||t[e];t[i]||(t[i]=t[e]);var r=n.replace,a=n.after,s=n.before;t[e]=function(){var t,e=arguments;return s&&s.apply(this,e),t=r?r.apply(this,e):o.apply(this,e),a&&a.apply(this,e),t}}function cA(t,e){var n=lA+e;t[n]&&(t[e]=t[n],t[n]=null)}function dA(t,e){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<i.length;){var r=i[o],a=i[o+1];i[o++]=e[0]*r+e[2]*a+e[4],i[o++]=e[1]*r+e[3]*a+e[5]}}function hA(t,e){var n=t.getUpdatedPathProxy(),i=e.getUpdatedPathProxy(),o=function(t,e){for(var n,i,o,r=[],a=[],s=0;s<Math.max(t.length,e.length);s++){var l=t[s],u=e[s],c=void 0,d=void 0;l?u?(i=c=(n=nA(l,u))[0],o=d=n[1]):(d=iA(o||l,l),c=l):(c=iA(i||u,u),d=u),r.push(c),a.push(d)}return[r,a]}(XI(n),XI(i)),r=o[0],a=o[1],s=t.getComputedTransform(),l=e.getComputedTransform();s&&dA(r,s),l&&dA(a,l),uA(e,"updateTransform",{replace:function(){this.transform=null}}),e.transform=null;var u=function(t,e,n,i){for(var o,r=[],a=0;a<t.length;a++){var s=t[a],l=e[a],u=oA(s),c=oA(l);null==o&&(o=u[2]<0!=c[2]<0);var d=[],h=[],p=0,g=1/0,f=[],y=s.length;o&&(s=aA(s));for(var v=6*rA(s,l,u,c),m=y-2,x=0;x<m;x+=2){var _=(v+x)%m+2;d[x+2]=s[_]-u[0],d[x+3]=s[_+1]-u[1]}if(d[0]=s[v]-u[0],d[1]=s[v+1]-u[1],n>0)for(var b=i/n,S=-i/2;S<=i/2;S+=b){var w=Math.sin(S),M=Math.cos(S),I=0;for(x=0;x<s.length;x+=2){var A=d[x],C=d[x+1],T=l[x]-c[0],D=l[x+1]-c[1],L=T*M-D*w,P=T*w+D*M;f[x]=L,f[x+1]=P;var k=L-A,N=P-C;I+=k*k+N*N}if(I<g){g=I,p=S;for(var O=0;O<f.length;O++)h[O]=f[O]}}else for(var R=0;R<y;R+=2)h[R]=l[R]-c[0],h[R+1]=l[R+1]-c[1];r.push({from:d,to:h,fromCp:u,toCp:c,rotation:-p})}return r}(r,a,10,Math.PI),c=[];uA(e,"buildPath",{replace:function(t){for(var n=e.__morphT,i=1-n,o=[],r=0;r<u.length;r++){var a=u[r],s=a.from,l=a.to,d=a.rotation*n,h=a.fromCp,p=a.toCp,g=Math.sin(d),f=Math.cos(d);dr(o,h,p,n);for(var y=0;y<s.length;y+=2){var v=s[y],m=s[y+1],x=v*i+(w=l[y])*n,_=m*i+(M=l[y+1])*n;c[y]=x*f-_*g+o[0],c[y+1]=x*g+_*f+o[1]}var b=c[0],S=c[1];t.moveTo(b,S);for(y=2;y<s.length;){var w=c[y++],M=c[y++],I=c[y++],A=c[y++],C=c[y++],T=c[y++];b===w&&S===M&&I===C&&A===T?t.lineTo(C,T):t.bezierCurveTo(w,M,I,A,C,T),b=C,S=T}}}})}function pA(t,e,n){if(!t||!e)return e;var i=n.done,o=n.during;return hA(t,e),e.__morphT=0,e.animateTo({__morphT:1},wt({during:function(t){e.dirtyShape(),o&&o(t)},done:function(){cA(e,"buildPath"),cA(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape(),i&&i()}},n)),e}function gA(t,e,n,i,o,r){t=o===n?0:Math.round(32767*(t-n)/(o-n)),e=r===i?0:Math.round(32767*(e-i)/(r-i));for(var a,s=0,l=32768;l>0;l/=2){var u=0,c=0;(t&l)>0&&(u=1),(e&l)>0&&(c=1),s+=l*l*(3*u^c),0===c&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function fA(t){var e=1/0,n=1/0,i=-1/0,o=-1/0,a=r(t,(function(t){var r=t.getBoundingRect(),a=t.getComputedTransform(),s=r.x+r.width/2+(a?a[4]:0),l=r.y+r.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),o=Math.max(l,o),[s,l]}));return r(a,(function(r,a){return{cp:r,z:gA(r[0],r[1],e,n,i,o),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function yA(t){return eA(t.path,t.count)}function vA(t){return X(t[0])}function mA(t,e){for(var n=[],i=t.length,o=0;o<i;o++)n.push({one:t[o],many:[]});for(o=0;o<e.length;o++){var r=e[o].length,a=void 0;for(a=0;a<r;a++)n[a%i].many.push(e[o][a])}var s=0;for(o=i-1;o>=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}r=l.length;var u=Math.ceil(r/2);n[o].many=l.slice(u,r),n[s].many=l.slice(0,u),s++}return n}var xA={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i<t.count;i++){var o=cr(t.path);o.setStyle("opacity",n),e.push(o)}return e},split:null};function _A(t,e,n,i,o,r){if(t.length&&e.length){var a=$i("update",i,o);if(a&&a.duration>0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);vA(t)&&(s=t,l=e),vA(e)&&(s=e,l=t);for(var d=s?s===t:t.length>e.length,h=s?mA(l,s):mA(d?e:t,[d?t:e]),p=0,g=0;g<h.length;g++)p+=h[g].many.length;var f=0;for(g=0;g<h.length;g++)y(h[g],d,f,p),f+=h[g].many.length}}function y(t,e,i,o,a){var s=t.many,l=t.one;if(1!==s.length||a)for(var d=wt({dividePath:xA[n],individualDelay:u&&function(t,e,n,r){return u(t+i,o)}},c),h=e?function(t,e,n){var i=[];!function t(e){for(var n=0;n<e.length;n++){var o=e[n];sA(o)?t(o.childrenRef()):o instanceof _&&i.push(o)}}(t);var o=i.length;if(!o)return{fromIndividuals:[],toIndividuals:[],count:0};var r=(n.dividePath||yA)({path:e,count:o});if(r.length!==o)return{fromIndividuals:[],toIndividuals:[],count:0};i=fA(i),r=fA(r);for(var a=n.done,s=n.during,l=n.individualDelay,u=new Dn,c=0;c<o;c++){var d=i[c],h=r[c];h.parent=e,h.copyTransform(u),l||hA(d,h)}function p(t){for(var e=0;e<r.length;e++)r[e].addSelfToZr(t)}function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,cA(e,"addSelfToZr"),cA(e,"removeSelfFromZr")}e.__isCombineMorphing=!0,e.childrenRef=function(){return r},uA(e,"addSelfToZr",{after:function(t){p(t)}}),uA(e,"removeSelfFromZr",{after:function(t){for(var e=0;e<r.length;e++)r[e].removeSelfFromZr(t)}});var f=r.length;if(l){var y=f,v=function(){0==--y&&(g(),a&&a())};for(c=0;c<f;c++){var m=l?wt({delay:(n.delay||0)+l(c,f,i[c],r[c]),done:v},n):n;pA(i[c],r[c],m)}}else e.__morphT=0,e.animateTo({__morphT:1},wt({during:function(t){for(var n=0;n<f;n++){var i=r[n];i.__morphT=e.__morphT,i.dirtyShape()}s&&s(t)},done:function(){g();for(var e=0;e<t.length;e++)cA(t[e],"updateTransform");a&&a()}},n));return e.__zr&&p(e.__zr),{fromIndividuals:i,toIndividuals:r,count:f}}(s,l,d):function(t,e,n){var i=e.length,o=[],r=n.dividePath||yA;if(sA(t)){!function t(e){for(var n=0;n<e.length;n++){var i=e[n];sA(i)?t(i.childrenRef()):i instanceof _&&o.push(i)}}(t.childrenRef());var a=o.length;if(a<i)for(var s=0,l=a;l<i;l++)o.push(cr(o[s++%a]));o.length=i}else{o=r({path:t,count:i});var u=t.getComputedTransform();for(l=0;l<o.length;l++)o[l].setLocalTransform(u);if(o.length!==i)return{fromIndividuals:[],toIndividuals:[],count:0}}o=fA(o),e=fA(e);var c=n.individualDelay;for(l=0;l<i;l++){var d=c?wt({delay:(n.delay||0)+c(l,i,o[l],e[l])},n):n;pA(o[l],e[l],d)}return{fromIndividuals:o,toIndividuals:e,count:e.length}}(l,s,d),p=h.fromIndividuals,g=h.toIndividuals,f=p.length,v=0;v<f;v++){m=u?wt({delay:u(v,f)},c):c;r(p[v],g[v],e?s[v]:t.one,e?t.one:s[v],m)}else{var m,x=e?s[0]:l,b=e?l:s[0];if(sA(x))y({many:[x],one:b},!0,i,o,!0);else pA(x,b,m=u?wt({delay:u(i,o)},c):c),r(x,b,x,b,m)}}}function bA(t){if(!t)return[];if(X(t)){for(var e=[],n=0;n<t.length;n++)e.push(bA(t[n]));return e}var i=[];return t.traverse((function(t){t instanceof _&&!t.disableMorphing&&!t.invisible&&!t.ignore&&i.push(t)})),i}var SA=le();function wA(t,e,n,i){var o=function(t,e){for(var n=t.dimensions,i=0;i<n.length;i++){var o=t.getDimensionInfo(n[i]);if(o&&0===o.otherDims[e])return n[i]}}(t,i?"itemChildGroupId":"itemGroupId");if(o){var r=function(t,e,n){var i=t.getDimensionInfo(n),o=i&&i.ordinalMeta;if(i){var r=t.get(i.name,e);return o&&o.categories[r]||r+""}}(t,e,o);return r}var a=t.getRawDataItem(e),s=i?"childGroupId":"groupId";return a&&a[s]?a[s]+"":i?void 0:n||t.getId(e)}function MA(t){var e=[];return u(t,(function(t){var n=t.data,i=t.dataGroupId;if(!(n.count()>1e4))for(var o=n.getIndices(),r=0;r<o.length;r++)e.push({data:n,groupId:wA(n,r,i,!1),childGroupId:wA(n,r,i,!0),divide:t.divide,dataIndex:r})})),e}function IA(t,e,n){t.traverse((function(t){t instanceof _&&at(t,{style:{opacity:0}},e,{dataIndex:n,isFrom:!0})}))}function AA(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function CA(t){t.stopAnimation(),t.isGroup&&t.traverse((function(t){t.stopAnimation()}))}function TA(t,e,n){var i=MA(t),o=MA(e);function a(t,e,n,i,o){(n||t)&&e.animateFrom({style:n&&n!==t?p(p({},n.style),t.style):t.style},o)}var s=!1,l=0,c=qe(),d=qe();i.forEach((function(t){t.groupId&&c.set(t.groupId,!0),t.childGroupId&&d.set(t.childGroupId,!0)}));for(var h=0;h<o.length;h++){var g=o[h].groupId;if(d.get(g)){l=1;break}var f=o[h].childGroupId;if(f&&c.get(f)){l=2;break}}function v(t,e){return function(n){var i=n.data,o=n.dataIndex;return e?i.getId(o):t?1===l?n.childGroupId:n.groupId:2===l?n.childGroupId:n.groupId}}var m=function(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++){var o=t[i],r=e[i];if(o.data.getId(o.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(i,o),x={};if(!m)for(h=0;h<o.length;h++){var b=o[h],S=b.data.getItemGraphicEl(b.dataIndex);S&&(x[S.id]=!0)}function w(t,e){var n=i[e],r=o[t],l=r.data.hostModel,u=n.data.getItemGraphicEl(n.dataIndex),c=r.data.getItemGraphicEl(r.dataIndex);u!==c?u&&x[u.id]||c&&(CA(c),u?(CA(u),AA(u),s=!0,_A(bA(u),bA(c),r.divide,l,t,a)):IA(c,l,t)):c&&function(t,e,n){var i=$i("update",n,e);i&&t.traverse((function(t){if(t instanceof Mn){var e=pr(t);e&&t.animateFrom({style:e},i)}}))}(c,r.dataIndex,l)}new jn(i,o,v(!0,m),v(!1,m),null,"multiple").update(w).updateManyToOne((function(t,e){var n=o[t],l=n.data,c=l.hostModel,d=l.getItemGraphicEl(n.dataIndex),h=y(r(e,(function(t){return i[t].data.getItemGraphicEl(i[t].dataIndex)})),(function(t){return t&&t!==d&&!x[t.id]}));d&&(CA(d),h.length?(u(h,(function(t){CA(t),AA(t)})),s=!0,_A(bA(h),bA(d),n.divide,c,t,a)):IA(d,c,n.dataIndex))})).updateOneToMany((function(t,e){var n=i[e],l=n.data.getItemGraphicEl(n.dataIndex);if(!l||!x[l.id]){var c=y(r(t,(function(t){return o[t].data.getItemGraphicEl(o[t].dataIndex)})),(function(t){return t&&t!==l})),d=o[t[0]].data.hostModel;c.length&&(u(c,(function(t){return CA(t)})),l?(CA(l),AA(l),s=!0,_A(bA(l),bA(c),n.divide,d,t[0],a)):u(c,(function(e){return IA(e,d,t[0])})))}})).updateManyToMany((function(t,e){new jn(e,t,(function(t){return i[t].data.getId(i[t].dataIndex)}),(function(t){return o[t].data.getId(o[t].dataIndex)})).update((function(n,i){w(t[n],e[i])})).execute()})).execute(),s&&u(e,(function(t){var e=t.data.hostModel,i=e&&n.getViewOfSeriesModel(e),o=$i("update",e,0);i&&e.isAnimationEnabled()&&o&&o.duration>0&&i.group.traverse((function(t){t instanceof _&&!t.animators.length&&t.animateFrom({style:{opacity:0}},o)}))}))}function DA(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function LA(t){return X(t)?t.sort().join(","):t}function PA(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function kA(t,e){for(var n=0;n<t.length;n++){if(null!=e.seriesIndex&&e.seriesIndex===t[n].seriesIndex||null!=e.seriesId&&e.seriesId===t[n].id)return n}}Je([gr]),Je([function(t){t.registerPainter("svg",La)}]),Je([function(t){t.registerChartView(ds),t.registerSeriesModel(Pa),t.registerLayout(hs("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fs("line"))},function(t){t.registerChartView(Fs),t.registerSeriesModel(ms),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Wt(Ht,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ft("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fs("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))}))},function(t){t.registerChartView(el),t.registerSeriesModel(rl),ue("pie",t.registerAction),t.registerLayout(Wt(Us,"pie")),t.registerProcessor(js("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf((function(t){var e=n.mapDimension("value"),i=n.get(e,t);return!(m(i)&&!isNaN(i)&&i<0)}))}})},function(t){Je(au),t.registerSeriesModel(al),t.registerChartView(cl),t.registerLayout(hs("scatter"))},function(t){Je(Mu),t.registerChartView(hu),t.registerSeriesModel(gu),t.registerLayout(su),t.registerProcessor(js("radar")),t.registerPreprocessor(cu)},function(t){Je(ed),t.registerChartView(Oc),t.registerSeriesModel(Vc),t.registerLayout(Ec),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,zc),ue("map",t.registerAction)},function(t){t.registerChartView(xd),t.registerSeriesModel(Cd),t.registerLayout(Dd),t.registerVisual(Ld),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var n=t.dataIndex,i=e.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=$c(e.coordinateSystem,t,void 0,n);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))}))}(t)},function(t){t.registerSeriesModel(Od),t.registerChartView(Kd),t.registerVisual(gh),t.registerLayout(Ch),function(t){for(var e=0;e<Pd.length;e++)t.registerAction({type:Pd[e],update:"updateView"},q);t.registerAction({type:"treemapRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},(function(e,n){var i=wd(t,["treemapZoomToNode","treemapRootToNode"],e);if(i){var o=e.getViewRoot();o&&(t.direction=Id(o,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}))}))}(t)},function(t){t.registerChartView(Dp),t.registerSeriesModel(Pp),t.registerProcessor(Nh),t.registerVisual(Oh),t.registerVisual(Vh),t.registerLayout(Zh),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,tp),t.registerLayout(np),t.registerCoordinateSystem("graphView",{dimensions:Wc.dimensions,create:ip}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},q),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},q),t.registerAction(kp,(function(t,e,n){e.eachComponent({mainType:"series",query:t},(function(e){var i=$c(e.coordinateSystem,t,void 0,n);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)}))}))},function(t){t.registerChartView(zp),t.registerSeriesModel(Ep)},function(t){t.registerChartView(Wp),t.registerSeriesModel(Fp),t.registerLayout(Hp),t.registerProcessor(js("funnel"))},function(t){Je(xf),t.registerChartView(jp),t.registerSeriesModel(Kp),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,$p)},function(t){t.registerChartView(wf),t.registerSeriesModel(If),t.registerLayout(Af),t.registerVisual(Ef),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},(function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])}))}))},function(t){t.registerSeriesModel(Wf),t.registerChartView(jf),t.registerLayout(Kf),t.registerTransform(Jf)},function(t){t.registerChartView(cy),t.registerSeriesModel(hy),t.registerPreprocessor(py),t.registerVisual(xy),t.registerLayout(by)},function(t){t.registerChartView(Iy),t.registerSeriesModel(Ay),t.registerLayout(hs("effectScatter"))},function(t){t.registerChartView(Vy),t.registerSeriesModel(Wy),t.registerLayout(Ry),t.registerVisual(Hy)},function(t){t.registerChartView(jy),t.registerSeriesModel(qy)},function(t){t.registerChartView(yv),t.registerSeriesModel(vv),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Wt(Ht,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ft("pictorialBar"))},function(t){t.registerChartView(mv),t.registerSeriesModel(_v),t.registerLayout(bv),t.registerProcessor(js("themeRiver"))},function(t){t.registerChartView(Av),t.registerSeriesModel(Tv),t.registerLayout(Wt(Lv,"sunburst")),t.registerProcessor(Wt(js,"sunburst")),t.registerVisual(kv),function(t){t.registerAction({type:Mv,update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e,n){var i=wd(t,[Mv],e);if(i){var o=e.getViewRoot();o&&(t.direction=Id(o,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}))})),t.registerAction({type:Iv,update:"none"},(function(t,e,n){t=p({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},(function(e){var n=wd(t,[Iv],e);n&&(t.dataIndex=n.node.dataIndex)})),n.dispatchAction(p(t,{type:"highlight"}))})),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(t,e,n){t=p({},t),n.dispatchAction(p(t,{type:"downplay"}))}))}(t)},function(t){t.registerChartView(wm),t.registerSeriesModel(Vv)}]),Je((function(t){Je(au),Je(Ix)})),Je((function(t){Je(Ix),jl.registerAxisPointerClass("PolarAxisPointer",Tx),t.registerCoordinateSystem("polar",Hx),t.registerComponentModel(Dx),t.registerComponentView(s_),ml(t,"angle",Px,r_),ml(t,"radius",kx,a_),t.registerComponentView(Kx),t.registerComponentView(e_),t.registerLayout(Wt(o_,"bar"))})),Je(ed),Je((function(t){Je(Ix),jl.registerAxisPointerClass("SingleAxisPointer",C_),t.registerComponentView(T_),t.registerComponentView(p_),t.registerComponentModel(f_),ml(t,"single",f_,f_.defaultOption),t.registerCoordinateSystem("single",__)})),Je(xf),Je((function(t){t.registerComponentModel(L_),t.registerComponentView(k_),t.registerCoordinateSystem("calendar",R_)})),Je((function(t){t.registerComponentModel(G_),t.registerComponentView(H_),t.registerPreprocessor((function(t){var e=t.graphic;X(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}))})),Je((function(t){t.registerComponentModel(mb),t.registerComponentView(_b),yb("saveAsImage",bb),yb("magicType",Ab),yb("dataView",Ob),yb("dataZoom",oS),yb("restore",Bb),Je(pb)})),Je((function(t){Je(Ix),t.registerComponentModel(rS),t.registerComponentView(AS),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},q),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},q)})),Je(Ix),Je((function(t){t.registerComponentView(XS),t.registerComponentModel(US),t.registerPreprocessor(TS),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,GS),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},q),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},q),yb("brush",qS)})),Je((function(t){t.registerComponentModel(KS),t.registerComponentView(JS)})),Je((function(t){t.registerComponentModel(tw),t.registerComponentView(lw),t.registerSubTypeDefaulter("timeline",(function(){return"slider"})),function(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,e,n){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),wt({currentIndex:i.option.currentIndex},t)})),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)}))}(t),t.registerPreprocessor(uw)})),Je((function(t){t.registerComponentModel(vw),t.registerComponentView(Dw),t.registerPreprocessor((function(t){hw(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})}))})),Je((function(t){t.registerComponentModel(Lw),t.registerComponentView(zw),t.registerPreprocessor((function(t){hw(t.series,"markLine")&&(t.markLine=t.markLine||{})}))})),Je((function(t){t.registerComponentModel(Ew),t.registerComponentView(Zw),t.registerPreprocessor((function(t){hw(t.series,"markArea")&&(t.markArea=t.markArea||{})}))})),Je((function(t){Je(rM),Je(pM)})),Je((function(t){Je(IM),Je(RM)})),Je(IM),Je(RM),Je((function(t){Je(mI),Je(MI)})),Je(mI),Je(MI),Je((function(t){t.registerPreprocessor(DI),t.registerVisual(t.PRIORITY.VISUAL.ARIA,TI)})),Je((function(t){t.registerTransform(WI),t.registerTransform(FI)})),Je(fr),Je((function(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){u(Yn(n.seriesTransition),(function(t){u(Yn(t.to),(function(t){for(var e=n.updatedSeries,i=0;i<e.length;i++)(null!=t.seriesIndex&&t.seriesIndex===e[i].seriesIndex||null!=t.seriesId&&t.seriesId===e[i].id)&&(e[i][hr]=!0)}))}))})),t.registerUpdateLifecycle("series:transition",(function(t,e,n){var i=SA(e);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var o=n.seriesTransition;if(o)u(Yn(o),(function(t){!function(t,e,n,i){var o=[],r=[];u(Yn(t.from),(function(t){var n=kA(e.oldSeries,t);n>=0&&o.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:PA(e.oldData[n]),groupIdDim:t.dimension})})),u(Yn(t.to),(function(t){var i=kA(n.updatedSeries,t);if(i>=0){var o=n.updatedSeries[i].getData();r.push({dataGroupId:e.oldDataGroupIds[i],data:o,divide:PA(o),groupIdDim:t.dimension})}})),o.length>0&&r.length>0&&TA(o,r,i)}(t,i,n,e)}));else{var r=function(t,e){var n=qe(),i=qe(),o=qe();return u(t.oldSeries,(function(e,n){var r=t.oldDataGroupIds[n],a=t.oldData[n],s=DA(e),l=LA(s);i.set(l,{dataGroupId:r,data:a}),X(s)&&u(s,(function(t){o.set(t,{key:l,dataGroupId:r,data:a})}))})),u(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),r=t.getData(),a=DA(t),s=LA(a),l=i.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:PA(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:PA(r),data:r}]});else if(X(a)){var c=[];u(a,(function(t){var e=i.get(t);e.data&&c.push({dataGroupId:e.dataGroupId,divide:PA(e.data),data:e.data})})),c.length&&n.set(s,{oldSeries:c,newSeries:[{dataGroupId:e,data:r,divide:PA(r)}]})}else{var d=o.get(a);if(d){var h=n.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:PA(d.data)}],newSeries:[]},n.set(d.key,h)),h.newSeries.push({dataGroupId:e,data:r,divide:PA(r)})}}}})),n}(i,n);u(r.keys(),(function(t){var n=r.get(t);TA(n.oldSeries,n.newSeries,e)}))}u(n.updatedSeries,(function(t){t[hr]&&(t[hr]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldDataGroupIds=[],c=i.oldData=[],d=0;d<a.length;d++){var h=a[d].getData();h.count()<1e4&&(s.push(a[d]),l.push(a[d].get("dataGroupId")),c.push(h))}}))})),Je(yr);
|