import{d as Eu,c as W,q as me,r as ih,y as nh,$ as oh,bJ as sh,e as Do,ab as lh,bL as uh}from"./index.5f7ffb46.js";import{w as Lo,_ as V,p as D,B as bt,q as ch,r as Qi,s as Vu,t as Dr,v as Ru,x as ku,y as G,z as qt,A as Se,Z as ce,C as Lr,D as vh,E as Co,F as dt,G as hh,H as Nu,I as tt,J as fh,K as ph,M as F,N as zu,P as dh,O as Bu,Q as ue,R as Jt,T as Gu,S as gh,U as yh,V as It,W as Ra,X as mh,Y as ka,$ as Sh,a0 as yt,a1 as xh,a2 as vt,a3 as ut,a4 as bh,a5 as wh,a6 as _h,a7 as Ah,a8 as Th,a9 as Dh,aa as Lh,ab as Ou,ac as In,ad as Ch,ae as Ih,af as Mh,ag as O,ah as kt,ai as Io,aj as Ph,ak as Fe,al as sr,am as wt,an as Z,ao as Ot,ap as lt,aq as Na,ar as za,as as xt,u as j,at as Eh,au as Vh,av as de,aw as Le,ax as re,ay as _e,az as pt,aA as st,aB as Ft,aC as jt,aD as Nt,aE as St,aF as Ba,aG as Br,aH as Ga,aI as K,aJ as Gr,aK as Rh,aL as zt,aM as Wt,aN as Kt,aO as ae,aP as Oa,aQ as $t,aR as kh,aS as We,aT as He,aU as Fu,aV as te,aW as Qt,aX as ve,aY as B,aZ as tn,a_ as Nh,a$ as Fa,b0 as Mt,b1 as z,b2 as ee,b3 as zh,b4 as Bh,L as Mn,b5 as Gh,b6 as Oh,b7 as Wa,b8 as Wu,b9 as $e,ba as lr,bb as nt,bc as Pt,bd as Fh,be as Ha,bf as ar,bg as ir,bh as Pn,bi as En,bj as Hu,bk as Wh,bl as Or,bm as $u,bn as ct,bo as Uu,bp as Yr,bq as Hh,br as Ct,bs as nr,bt as ur,bu as Vn,bv as Rt,bw as ie,bx as $a,by as Yu,bz as Xu,bA as $h,bB as Zu,bC as ju,bD as en,bE as Uh,bF as Ku,bG as fa,bH as he,bI as Rn,bJ as Gt,bK as Ht,bL as rn,bM as ge,bN as kn,bO as Yh,bP as ft,bQ as gt,bR as qu,bS as Ua,bT as Ju,bU as Mo,bV as gr,bW as Po,bX as Xh,bY as ei,bZ as ri,b_ as _t,b$ as Zh,c0 as _r,c1 as pa,c2 as Eo,c3 as Fr,c4 as be,c5 as Wr,c6 as jh,c7 as Kh,c8 as tr,c9 as Vo,ca as qh,cb as an,cc as nn,cd as Nn,ce as zn,cf as Bn,cg as Hr,ch as Ya,ci as Jh,cj as Qu,ck as Qh,cl as Gn,cm as tf,cn as ef,co as Ro,cp as rf,cq as af,cr as ko,cs as Cr,ct as nf,cu as of,cv as sf,cw as lf,cx as uf,cy as tc,cz as ec,cA as cf,cB as On,cC as da,cD as er,cE as rc,cF as Ue,cG as ac,cH as Fn,cI as vf,cJ as hf,cK as ff,cL as ga,cM as on,cN as sn,cO as pf,cP as ai,cQ as df,cR as gf,cS as ic,cT as Wn,cU as Hn,cV as ii,cW as yf,cX as mf,cY as yr,cZ as Sf,c_ as No,c$ as xf,d0 as bf,d1 as zo,d2 as Xa,d3 as wf,d4 as ln,d5 as Za,d6 as Bo,d7 as _f,d8 as Af,d9 as Tf,da as Go,db as Oo,dc as Df,dd as Fo,de as Lf,df as Ir,dg as Cf,dh as If,di as nc,dj as Wo,dk as Mf,dl as Pf,dm as Ef,dn as oc,dp as sc,dq as Vf,dr as lc,ds as uc,dt as Ho,du as Rf,dv as $o,dw as $r,dx as cc,dy as $n,dz as kf,dA as Nf,dB as zf,dC as Bf,dD as Gf,dE as Of,dF as Ff,dG as Wf,dH as vc,dI as Hf,dJ as Uo,dK as $f,dL as Uf,dM as Yf,dN as Xf,dO as hc,dP as fc,dQ as Xr,dR as Zf,dS as jf,dT as Kf,dU as qf,dV as pc,dW as ni,dX as un,dY as Jf,dZ as Qf,d_ as tp,d$ as ep,e0 as rp,e1 as ya,e2 as ap,e3 as ip,e4 as ja,e5 as np,e6 as op,e7 as cn,e8 as oi,e9 as sp,ea as lp,eb as Yo,ec as up,j as cp,o as vp,f as hp,k as fp,c as pp,l as dp,b as gp,a as yp,m as mp,n as Sp,ed as xp,ee as bp,e as wp,d as _p,h as Ap,g as Tp,i as Dp}from"./universalTransition.c9e35979.js";const Lp="_subjectEcharts_17r04_1",Cp="_container_17r04_5",Ip="_emtry_17r04_12",Mp="_head_17r04_20",Pp="_headLeft_17r04_26",Ep="_icon_17r04_30",Vp="_headRight_17r04_36",Rp="_headLabelWrap_17r04_50",kp="_headLabel_17r04_50",Np="_headLabelDot_17r04_62",zp="_content_17r04_68",Bp="_echartsMain_17r04_73",Gp="_items_17r04_77",Op="_item_17r04_77",Fp="_itemNum_17r04_84",Wp="_rect_17r04_94",Hp="_itemTitle_17r04_101",$p="_line_17r04_106",Up="_subjectWrap_17r04_112",Yp="_listItem_17r04_115",Xp="_itemLeft_17r04_125",Zp="_subjectName_17r04_129",jp="_subjectType_17r04_138",Kp="_dot_17r04_144",qp="_listItemActive_17r04_153",Jp="_listitems_17r04_158";var X={subjectEcharts:Lp,container:Cp,emtry:Ip,head:Mp,headLeft:Pp,icon:Ep,headRight:Vp,headLabelWrap:Rp,headLabel:kp,headLabelDot:Np,content:zp,echartsMain:Bp,items:Gp,item:Op,itemNum:Fp,rect:Wp,itemTitle:Hp,line:$p,subjectWrap:Up,listItem:Yp,itemLeft:Xp,subjectName:Zp,subjectType:jp,dot:Kp,listItemActive:qp,listitems:Jp};const Qp="_circle_1j0c8_1",td="_des_1j0c8_22";var Ye={circle:Qp,"circle-main-box":"_circle-main-box_1j0c8_4","count-num":"_count-num_1j0c8_9",des:td},ed=Eu({name:"CircleProgress",data(){return{now:0,timer:null}},props:{value:{type:Number,default:0},size:{type:Number,default:120},strokeWidth:{type:Number,default:10},color:{type:String,default:"rgba(153,202,251,1)"},duration:{type:Number,default:1e3},des:{type:String,default:"\u603B\u8FBE\u6807\u7387"}},watch:{value(a){this.now=0,this.$nextTick(()=>{this.run()})}},computed:{percentage(){return this.value},countDown(){return this.now},cx(){return this.size/2},cy(){return this.size/2},radius(){return(this.size-this.strokeWidth)/2},circumference(){return 2*Math.PI*this.radius},progress(){return(1-this.now/100)*this.circumference}},mounted(){this.run()},methods:{run(){if(this.value==0)return;let a=this.duration/this.value;this.timer=setInterval(()=>{if(this.now>=this.value)return this.now=this.value,clearInterval(this.timer);this.now++},a)}},render(){return W("div",{class:Ye["circle-main"]},[W("div",{class:Ye["circle-main-box"],style:[{width:this.size+"px",height:this.size+"px"}]},[W("svg",{width:this.size,height:this.size,class:Ye.circle},[W("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:"#FFE7DF","stroke-width":this.strokeWidth},null),W("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:this.color,"stroke-width":this.strokeWidth,"stroke-linecap":"round","stroke-dasharray":this.circumference,"stroke-dashoffset":this.progress},null)]),W("span",{class:Ye["count-num"]},[this.countDown,W("span",{class:Ye.countType},[me("%")])]),W("span",{class:Ye.des},[this.des])])])}}),rd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABHtJREFUWEe9mFtsVFUUhr81A1MwtOoLqZBweVOHQnwwXqKJxigyBJCqSDReovWCthGtaWO0OlJ8ANNIAgmRlKp4B6TSalMlGB8M1MdCa9BEa0kMKEFjR21anNlmz5wzs3tmn8u00f22z1l77X///1prXwRP29KvkggNwK3AIqWo9trMpC+QQTiN4gjQ+dLtMmz6E7eT3q8S1NABbFKK+EwmjTpWIIuwmzGa0xtkUo/LA9JgctX0objFdKacThG103e/+03sZ+9+944X4WgsQ0qDytu09amdStEYdWX/hZ0Iu9pT0iRt/SqZzTKIRSZxlqTCKImK0I+iglbZeJwV8vyn6nUUm20+y6h1jTyO/aT1xemrHTuktVcNAUnr4DBmphtcPisVGJaWHjWmcFI7KoCIdkUi/Ow9C9IlQZ47rBQBnCdroX45VFcZHFoo/2McDg7Cd+cgBtxzFdQtgFm6A2QmoPsEDJ21aGHML89+EhyybbdB9Zxo+X7+L9j2JSyrhQeuLp9Yg2r/IjgDZHN3MEPb14SnkEvYRBZe7IPrlsD6Ovu41l6KghQtTIaePlTOkPtFp70NkJ/CGlCbBrQY1i+3A2rpDWGo6eNgyQIZ8sTSpMvQTAA1HiwBsiXDa4ZkYcmlAWmGrtWSaYYs6d3a48+QNpcnD0RgyFtvXJ+eCV3JNKB6HUOWOhUq2RP7gwG9sgrmzo6WZUXJfIJ6/AK83B8SQ49/ZAFkxMY1S2DdMog79aR4RLAocuoX6PoGFl4MT91QqkGaqWwODp+EgdFy4kyI8uiH4Vvn7DhclAhemfai64zrrWoWzHGZBf6ehAvZCCXkkQ/CAS2+1CiOTtUd/a3gfF4V6P/uycBvT9RgR3+PAOjh9y11yBmnlVtXB9cv9ThSsHcAvj8Hz9wEtTXhE2mLYyMF2YKaPPReMEOvrgYtmbcdOgEDP0F7CrQ8tuYtoFqyFz4LAfTgu8F1aPtau4Puk3B8BLamIOEDyDayxahDttOL3P+OUrZ64TrbZgGkHemd+/hogaFEBVcCa2E0kMl9+0IKowHIlCAPSEu2ugTIr36aTJkM2RiUe/cpVYTkeCw6VmBjSDPaPVgAtNUAFCW0NSBvRprzy8a3AxjyA+RIpoN6S0BQ2wDq40dglm14yzgPuZZGpW6+GeY7d1dTkjeOwQ/nofFGWHTJ1Cn8NuFfM9DxlQWOMUDuetPCkGOgqb2sBlZeXiiAuv2Tg6Ez8PWPhc18/jxYdQXUuKdKn+X/OQH9p+DsWMnABlzu7FLaZHr397CrbZQon7qAjNR3qSFU4RoUdt7x1b7ii1nBUxleYVju2Bt+Uax8oVHyzWIj7JA1e1RShEH4f148AqBmlWJFfvFrO9XOXK702BB0BZ/m2kOHxWLs6mmQpvzcd6dVYnwhfSo39TnG9TLNEAkFUawyMY7O/ZnUgbTzHKN/XJlWiaUL6MgpNtleQiJ7r8RQyMZg98gZmr9NGw9Wpo+Ve1SSHA1SwZNexDtAIbOEDHBawRFidH7+2NQnvX8BBdCOWcDBrfEAAAAASUVORK5CYII=",ad="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABOJJREFUWEfNmGtsFFUUx39nW4oUeQQUEGoJiRCwIZDoB4KJCQoBUZGoLYgoooipSAAhoAhxo2IkPApCBJRADcYoqNFEES2NfvMREkUoigSQUpRHQGlDW0q7x9zO7O7szJ2dBYJxPjTde8/jf8/5nzP3jOB79P2lJbS2zgDGAMWgXVBXSPzCfm3f76R8Ut9sizQAtZCoIp/NMmV5jVcr5UK3xwtoal6FJspB8jJNhyGKABS93YbIBjpdN1/K4i3teM0fjccL6N+4E/TuDBtXG5mkMb8db8ScqFVzrHC8xOMtDqAtC9ah+lz0ga6hhMh6eXLlbNG355UQk71AXoorSb9+DgQ45B5V3A2NSG0YB531NhI6TPSduRUoc6/h2XM3LawR3TRnP2hJppb/xJ7d/AIoHgL9h8IN/aCwG+R1gKZ6qD8Ldb/C0V+g4SzBiIfYTUVOakQ3zq5H6eK4zMJiicHgEXDbOCjsmv3UJnW//wh7voQL5z2yATb749Ag+tYsjeROx04wehoUDXZx+7iTqqbkurvQ3Ai7K+HEIWsCUosenKLry/2wM5ULOsHEOdC9T5YIZgmYJqBqK/yxLycuib75jBefo5TMqamee2amI5OTSYvQpRb4bA2c+yszwgFRQXTtTEuE3KUhI+HOSRYPEVwI5ELgTC18sjrySKIVM+wpM9X0yBLoHEHgSBcegap34chP6QWLZ9HVT3mWPf8OGA5jn8gsvstxbpOtOwhfbMxGOERXTg/iNBwaNRUG3W6vjuxlEO4w0QaVL0FLc6iM6IppdvNli6DHTVcbk6D+p2vh5NEsgJY/roGWaqpr+jLoWBgB6AouSF9vhcPm1el90jERfWOqPUJPr4D8Dj69kIZYvQ3+Pu3pU2HnEGg4B80XskTo9Sl2QFOXQteedlL7bwEfrYJ/TkH33tkj6tU7c9wqK7pschCQWZkwC4oGuUoRLDaAzPPwgpBU+E5wsRG2LA4B9Ooku7fho2DkA7mRuh2QWgCFqJuO/cHyEECvlNoBmXQ9usRcL6NB7XAjVDo/WtZIHNwD1e+FAIo/ZOlDLohRk2HIiHAnyRuiAWRUSt2UJddTh/G52FUJh38OAfTyg2lpv6Hru8GkRdHl3x4hTQPKFqfG87DtNWi7FJRSRXTpRHunNuJmp2gg3F8OsZjFjRvJHSudvVxS9u2HUPNdlrJfMiH6RTBgKIx5DDoUuIZ8vNruAipLVlnIzbP2N/h8E5g7Usgjuvi+4H0oJexphD37wl2ToVdx0JQfkA3PuZPw8VpoaYLUdOI3Ze5DL95r70NGNlBgAgOHO0TvdwvE3AF3u0vqMrfK/BaPH4SvKuFiU2QVir4wvh5V95Lvk7fN5kkRc7Xt2Qc6d4O6Q9C1B6RS5goZAv+wCw58nzVNaa/SILpw3H7AHYOi6eQoW16qN94ME591powzJ+DIPjh2AFot1RQepxrRhWMrSOj/Y1DEDIqLxpbQmtgLmh6lc2jOkWS4bAFpIxEb5nxseH70OjSR/tiQmtWTVnNNZbBqnJWooUBBYutl9e7ZDqDSWwso6r0TJfNzzGWf8goVhGrqTo2XHQeczzEpUH17rUIpb0/ff/JIG8IG/jw934Cxdhqdd0cJrXkzQMcgUhzaEjIAh5HONudIA6q1IFXk522Wim8yPun9C9eIpLzmb7PtAAAAAElFTkSuQmCC",id=1e-8;function Xo(a,e){return Math.abs(a-e)i&&(r=o,i=l)}if(r)return od(r.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var r=this._rect;if(r&&!t)return r;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?Zo(s.exterior,i,n,t):D(s.points,function(l){Zo(l,i,n,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),r=new bt(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=r),r},e.prototype.contain=function(t){var r=this.getBoundingRect(),i=this.geometries;if(!r.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,r.push([s/t,l/t])}return r}function ud(a,e){return a=ld(a),G(qt(a.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var r=t.properties,i=t.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new jo(o[0],o.slice(1)));break;case"MultiPolygon":D(i.coordinates,function(l){l[0]&&n.push(new jo(l[0],l.slice(1)))});break;case"LineString":n.push(new Ko([i.coordinates]));break;case"MultiLineString":n.push(new Ko(i.coordinates))}var s=new gc(r[e||"name"],n,r.cp);return s.properties=r,s})}var ui=Math.sin,ci=Math.cos,mc=Math.PI,Me=Math.PI*2,cd=180/mc,vd=function(){function a(){}return a.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},a.prototype.moveTo=function(e,t){this._add("M",e,t)},a.prototype.lineTo=function(e,t){this._add("L",e,t)},a.prototype.bezierCurveTo=function(e,t,r,i,n,o){this._add("C",e,t,r,i,n,o)},a.prototype.quadraticCurveTo=function(e,t,r,i){this._add("Q",e,t,r,i)},a.prototype.arc=function(e,t,r,i,n,o){this.ellipse(e,t,r,r,0,i,n,o)},a.prototype.ellipse=function(e,t,r,i,n,o,s,l){var u=s-o,c=!l,v=Math.abs(u),h=Se(v-Me)||(c?u>=Me:-u>=Me),f=u>0?u%Me:u%Me+Me,p=!1;h?p=!0:Se(v)?p=!1:p=f>=mc==!!c;var d=e+r*ci(o),g=t+i*ui(o);this._start&&this._add("M",d,g);var y=Math.round(n*cd);if(h){var m=1/this._p,S=(c?1:-1)*(Me-m);this._add("A",r,i,y,1,+c,e+r*ci(o+S),t+i*ui(o+S)),m>.01&&this._add("A",r,i,y,0,+c,d,g)}else{var x=e+r*ci(s),b=t+i*ui(s);this._add("A",r,i,y,+p,+c,x,b)}},a.prototype.rect=function(e,t,r,i){this._add("M",e,t),this._add("l",r,0),this._add("l",0,i),this._add("l",-r,0),this._add("Z")},a.prototype.closePath=function(){this._d.length>0&&this._add("Z")},a.prototype._add=function(e,t,r,i,n,o,s,l,u){for(var c=[],v=this._p,h=1;h"}function xd(a){return""}function Un(a,e){e=e||{};var t=e.newline?` `:"";function r(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return Sd(o,s)+(o!=="style"?hh(l):l||"")+(n?""+t+G(n,function(u){return r(u)}).join(t)+t:"")+xd(o)}return r(a)}function bd(a,e,t){t=t||{};var r=t.newline?` `:"",i=" {"+r,n=r+"}",o=G(dt(a),function(l){return l+i+G(dt(a[l]),function(u){return u+":"+a[l][u]+";"}).join(r)+n}).join(r),s=G(dt(e),function(l){return"@keyframes "+l+i+G(dt(e[l]),function(u){return u+i+G(dt(e[l][u]),function(c){var v=e[l][u][c];return c==="d"&&(v='path("'+v+'")'),c+":"+v+";"}).join(r)+n}).join(r)+n}).join(r);return!o&&!s?"":[""].join(r)}function hn(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function qo(a,e,t,r){return mt("svg","root",{width:a,height:e,xmlns:xc,"xmlns:xlink":bc,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var Jo={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"},Ee="transform-origin";function wd(a,e,t){var r=F({},a.shape);F(r,e),a.buildPath(t,r);var i=new Sc;return i.reset(Bu(a)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function _d(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[Ee]=t+"px "+r+"px")}var Ad={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function _c(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function Td(a,e,t){var r=a.shape.paths,i={},n,o;if(D(r,function(l){var u=hn(t.zrId);u.animation=!0,Ka(l,{},u,!0);var c=u.cssAnims,v=u.cssNodes,h=dt(c),f=h.length;if(!!f){o=h[f-1];var p=c[o];for(var d in p){var g=p[d];i[d]=i[d]||{d:""},i[d].d+=g.d||""}for(var y in v){var m=v[y].animation;m.indexOf(o)>=0&&(n=m)}}}),!!n){e.d=!1;var s=_c(i,t);return n.replace(o,s)}}function Qo(a){return tt(a)?Jo[a]?"cubic-bezier("+Jo[a]+")":fh(a)?a:"":""}function Ka(a,e,t,r){var i=a.animators,n=i.length,o=[];if(a instanceof Nu){var s=Td(a,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var J=_c(_,t);return J+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Mr=Math.round;function Ac(a){return a&&tt(a.src)}function Tc(a){return a&&ut(a.toDataURL)}function Yn(a,e,t,r){gd(function(i,n){var o=i==="fill"||i==="stroke";o&&Ou(n)?Lc(e,a,i,r):o&&In(n)?Cc(t,a,i,r):a[i]=n},e,t,!1),Ed(t,a,r)}function ts(a){return Se(a[0]-1)&&Se(a[1])&&Se(a[2])&&Se(a[3]-1)}function Dd(a){return Se(a[4])&&Se(a[5])}function Xn(a,e,t){if(e&&!(Dd(e)&&ts(e))){var r=t?10:1e4;a.transform=ts(e)?"translate("+Mr(e[4]*r)/r+" "+Mr(e[5]*r)/r+")":Ch(e)}}function es(a,e,t){for(var r=a.points,i=[],n=0;nn?(p=t[l+1]==null?null:t[l+1].elm,Pc(a,p,t,i,l)):ma(a,e,r,n))}function Qe(a,e){var t=e.elm=a.elm,r=a.children,i=e.children;a!==e&&(Zn(a,e),fn(e.text)?le(r)&&le(i)?r!==i&&zd(t,r,i):le(i)?(le(a.text)&&vi(t,""),Pc(t,null,i,0,i.length-1)):le(r)?ma(t,r,0,r.length-1):le(a.text)&&vi(t,""):a.text!==e.text&&(le(r)&&ma(t,r,0,r.length-1),vi(t,e.text)))}function Bd(a,e){if(mr(a,e))Qe(a,e);else{var t=a.elm,r=Ic(t);Pr(e),r!==null&&(Be(r,e.elm,Mc(t)),ma(r,[a],0,0))}return e}var Gd=0,Od=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=ls("refreshHover"),this.configLayer=ls("configLayer"),this.storage=t,this._opts=r=F({},r),this.root=e,this._id="zr"+Gd++,this._oldVNode=qo(r.width,r.height),e&&!r.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=wc("svg");Zn(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(r.width,r.height)}return a.prototype.getType=function(){return this.type},a.prototype.getViewportRoot=function(){return this._viewport},a.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},a.prototype.getSvgDom=function(){return this._svgDom},a.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Bd(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return as(e,hn(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._width,i=this._height,n=hn(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress;var o=[],s=this._bgVNode=Fd(r,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=mt("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=G(dt(n.defs),function(h){return n.defs[h]});if(u.length&&o.push(mt("defs","defs",{},u)),e.animation){var c=bd(n.cssNodes,n.cssAnims,{newline:!0});if(c){var v=mt("style","stl",{},[],c);o.push(v)}}return qo(r,i,o,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},Un(this.renderToVNode({animation:It(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:It(e.useViewBox,!0)}),{newline:!0})},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e},a.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},a.prototype._paintList=function(e,t,r){for(var i=e.length,n=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=n[o-1];for(var y=d+1;ythis.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}(wt),Ud=$d,Ec=4,Yd=function(){function a(){}return a}(),Xd=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.getDefaultShape=function(){return new Yd},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,r){var i=r.points,n=r.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var c=u*2,v=n[c]-s/2,h=n[c+1]-l/2;if(t>=v&&r>=h&&t<=v+s&&r<=h+l)return u}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.points,n=r.size,o=n[0],s=n[1],l=1/0,u=1/0,c=-1/0,v=-1/0,h=0;h=0&&(u.dataIndex=v+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),jd=Zd,Kd=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._symbolDraw.incrementalUpdate(t,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=t.end===r.getData().count()},e.prototype.updateTransform=function(t,r,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=Na("").reset(t,r,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var r=t.coordinateSystem,i=r&&r.getArea&&r.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,r){var i=this._symbolDraw,n=r.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new jd:new za,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(xt),qd=Kd;function Jd(a){j(Eh),a.registerSeriesModel(Ud),a.registerChartView(qd),a.registerLayout(Na("scatter"))}function Qd(a){a.eachSeriesByType("radar",function(e){var t=e.getData(),r=[],i=e.coordinateSystem;if(!!i){var n=i.getIndicatorAxes();D(n,function(o,s){t.each(t.mapDimension(n[s].dim),function(l,u){r[u]=r[u]||[];var c=i.dataToPoint(l,s);r[u][s]=us(c)?c:cs(i)})}),t.each(function(o){var s=Vh(r[o],function(l){return us(l)})||cs(i);r[o].push(s.slice()),t.setItemLayout(o,r[o])})}})}function us(a){return!isNaN(a[0])&&!isNaN(a[1])}function cs(a){return[a.cx,a.cy]}function tg(a){var e=a.polar;if(e){O(e)||(e=[e]);var t=[];D(e,function(r,i){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),a.radar=a.radar||[],O(a.radar)||(a.radar=[a.radar]),a.radar.push(r)):t.push(r)}),a.polar=t}D(a.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var eg=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(h,f){var p=h.getItemVisual(f,"symbol")||"circle";if(p!=="none"){var d=Br(h.getItemVisual(f,"symbolSize")),g=Ot(p,-1,-1,2,2),y=h.getItemVisual(f,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:y*Math.PI/180||0}),g}}function c(h,f,p,d,g,y){p.removeAll();for(var m=0;m0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=st({color:p.color},l));var g=Wt(vt(p),{boundaryGap:t,splitNumber:r,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:d,triggerEvent:h},!1);if(tt(c)){var y=g.name;g.name=c.replace("{value}",y!=null?y:"")}else ut(c)&&(g.name=c(g.name,g));var m=new Kt(g,null,this.ecModel);return ae(m,Oa.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Wt({lineStyle:{color:"#bbb"}},cr.axisLine),axisLabel:Zr(cr.axisLabel,!1),axisTick:Zr(cr.axisTick,!1),splitLine:Zr(cr.splitLine,!0),splitArea:Zr(cr.splitArea,!0),indicator:[]},e}($t),og=ng,sg=["axisLine","axisTickLabel","axisName"],lg=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes(),n=G(i,function(o){var s=o.model.get("showName")?o.name:"",l=new We(o.model,{axisName:s,position:[r.cx,r.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(n,function(o){D(sg,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),v=s.get("show"),h=l.get("color"),f=u.get("color"),p=O(h)?h:[h],d=O(f)?f:[f],g=[],y=[];function m(E,R,k){var N=k%R.length;return E[N]=E[N]||[],N}if(n==="circle")for(var S=i[0].getTicksCoords(),x=r.cx,b=r.cy,w=0;w=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(v=kc(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=i;i=new Z,i.add(f),f.scaleX=f.scaleY=v.scale,f.x=v.x,f.y=v.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Mt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:v,named:n}},a.prototype._parseNode=function(e,t,r,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var c=hi[s];if(c&&z(hi,s)){l=c.call(this,e,t);var v=e.getAttribute("name");if(v){var h={name:v,namedFrom:null,svgNodeTagLower:s,el:l};r.push(h),s==="g"&&(u=h)}else i&&r.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var f=fs[s];if(f&&z(fs,s)){var p=f.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,r,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},a.prototype._parseText=function(e,t){var r=new Gu({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),yg(r,t);var i=r.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=r.getBoundingRect();return this._textX+=s.width,t.add(r),r},a.internalField=function(){hi={g:function(e,t){var r=new Z;return Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new Mt;return Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),r.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),r.silent=!0,r},circle:function(e,t){var r=new He;return Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),r.silent=!0,r},line:function(e,t){var r=new ee;return Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),r.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),r.silent=!0,r},ellipse:function(e,t){var r=new zh;return Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),r.silent=!0,r},polygon:function(e,t){var r=e.getAttribute("points"),i;r&&(i=gs(r));var n=new de({shape:{points:i||[]},silent:!0});return Ut(t,n),Bt(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var r=e.getAttribute("points"),i;r&&(i=gs(r));var n=new Le({shape:{points:i||[]},silent:!0});return Ut(t,n),Bt(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var r=new ce;return Ut(t,r),Bt(e,r,this._defsUsePending,!1,!1),r.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),r.silent=!0,r},text:function(e,t){var r=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new Z;return Ut(t,s),Bt(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var r=e.getAttribute("x"),i=e.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Z;return Ut(t,s),Bt(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var r=e.getAttribute("d")||"",i=Bh(r);return Ut(t,i),Bt(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),a}(),fs={lineargradient:function(a){var e=parseInt(a.getAttribute("x1")||"0",10),t=parseInt(a.getAttribute("y1")||"0",10),r=parseInt(a.getAttribute("x2")||"10",10),i=parseInt(a.getAttribute("y2")||"0",10),n=new Mn(e,t,r,i);return ps(a,n),ds(a,n),n},radialgradient:function(a){var e=parseInt(a.getAttribute("cx")||"0",10),t=parseInt(a.getAttribute("cy")||"0",10),r=parseInt(a.getAttribute("r")||"0",10),i=new Gh(e,t,r);return ps(a,i),ds(a,i),i}};function ps(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function ds(a,e){for(var t=a.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var r=t.getAttribute("offset"),i=void 0;r&&r.indexOf("%")>0?i=parseInt(r,10)/100:r?i=parseFloat(r):i=0;var n={};Rc(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Ut(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),st(e.__inheritedStyle,a.__inheritedStyle))}function gs(a){for(var e=qa(a),t=[],r=0;r0;n-=2){var o=r[n],s=r[n-1],l=qa(o);switch(i=i||lr(),s){case"translate":$e(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Wu(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Wa(i,i,-parseFloat(l[0])*fi);break;case"skewX":var u=Math.tan(parseFloat(l[0])*fi);Qi(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*fi);Qi(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var ms=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Rc(a,e,t){var r=a.getAttribute("style");if(!!r){ms.lastIndex=0;for(var i;(i=ms.exec(r))!=null;){var n=i[1],o=z(Sa,n)?Sa[n]:null;o&&(e[o]=i[2]);var s=z(xa,n)?xa[n]:null;s&&(t[s]=i[2])}}}function _g(a,e,t){for(var r=0;r0,g={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,r),this._updateMapSelectHandler(e,u,r,i)},a.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=nt(),r=nt(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(f,p){return p&&(f=p(f)),f&&[f[0]*n.scaleX+n.x,f[1]*n.scaleY+n.y]}function v(f){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(h=i);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;jt(e,Nt(r),{labelFetcher:h,labelDataIndex:v,defaultText:t},f);var p=e.getTextContent();if(p&&(Nc(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function _s(a,e,t,r,i,n){a.data?a.data.setItemGraphicEl(n,e):lt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:r&&r.option||{}}}function As(a,e,t,r,i){a.data||Hu({el:e,componentModel:i,itemName:t,itemTooltipOption:r.get("tooltip")})}function Ts(a,e,t,r,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=r.getModel("emphasis"),o=n.get("focus");return St(e,o,n.get("blurScope"),n.get("disabled")),a.isGeo&&Wh(e,i,t),o}function Ds(a,e,t){var r=[],i;function n(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),D(a,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(wt),Ug=$g;function Yg(a,e){var t={};return D(a,function(r){r.each(r.mapDimension("value"),function(i,n){var o="ec-"+r.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),a[0].map(a[0].mapDimension("value"),function(r,i){for(var n="ec-"+a[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,c=0;c1?(x.width=S,x.height=S/g):(x.height=S,x.width=S*g),x.y=m[1]-x.height/2,x.x=m[0]-x.width/2;else{var b=a.getBoxLayoutParams();b.aspect=g,x=ie(b,{width:p,height:d})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(a.get("center"),e),this.setZoom(a.get("zoom"))}function qg(a,e){D(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var Jg=function(){function a(){this.dimensions=Bc}return a.prototype.create=function(e,t){var r=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Ms(l+s,l,F({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),r.push(u),o.coordinateSystem=u,u.model=o,u.resize=Ps,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=r[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),D(n,function(o,s){var l=G(o,function(c){return c.get("nameMap")}),u=new Ms(s,s,F({nameMap:Vn(l)},i(o[0])));u.zoomLimit=Rt.apply(null,G(o,function(c){return c.get("scaleLimit")})),r.push(u),u.resize=Ps,u.resize(o[0],t),D(o,function(c){c.coordinateSystem=u,qg(u,c)})}),r},a.prototype.getFilledRegions=function(e,t,r,i){for(var n=(e||[]).slice(),o=nt(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function sy(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,i=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){cy(a);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(a.hierNode.prelim=i.hierNode.prelim+e(a,i),a.hierNode.modifier=a.hierNode.prelim-n):a.hierNode.prelim=n}else i&&(a.hierNode.prelim=i.hierNode.prelim+e(a,i));a.parentNode.hierNode.defaultAncestor=vy(a,i,a.parentNode.hierNode.defaultAncestor||r[0],e)}function ly(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Vs(a){return arguments.length?a:py}function Sr(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function uy(a,e){return ie(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function cy(a){for(var e=a.children,t=e.length,r=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=r,n.hierNode.modifier+=r,i+=n.hierNode.change,r+=n.hierNode.shift+i}}function vy(a,e,t,r){if(e){for(var i=a,n=a,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,c=o.hierNode.modifier,v=s.hierNode.modifier;s=pi(s),n=di(n),s&&n;){i=pi(i),o=di(o),i.hierNode.ancestor=a;var h=s.hierNode.prelim+v-n.hierNode.prelim-u+r(s,n);h>0&&(fy(hy(s,a,t),a,h),u+=h,l+=h),v+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!pi(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=v-l),n&&!di(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-c,t=a)}return t}function pi(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function di(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function hy(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function fy(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function py(a,e){return a.parentNode===e.parentNode?1:2}var dy=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),gy=function(a){V(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dy},e.prototype.buildPath=function(t,r){var i=r.childPoints,n=i.length,o=r.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=r.orient,c=u==="TB"||u==="BT"?0:1,v=1-c,h=B(r.forkPosition,1),f=[];f[c]=o[c],f[v]=o[v]+(l[v]-o[v])*h,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[c]=s[c],t.lineTo(f[0],f[1]),f[c]=l[c],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(x=x-Math.PI));var _=b?"left":"right",A=s.getModel("label"),L=A.get("rotate"),T=L*(Math.PI/180),C=g.getTextContent();C&&(g.setTextConfig({position:A.get("position")||_,rotation:L==null?-x:T,origin:"center"}),C.setStyle("verticalAlign","middle"))}var M=s.get(["emphasis","focus"]),P=M==="relative"?en(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;P&&(lt(t).focus=P),my(i,o,c,t,p,f,d,r),t.__edge&&(t.onHoverStateChange=function(I){if(I!=="blur"){var E=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===Uh||$u(t.__edge,I)}})}function my(a,e,t,r,i,n,o,s){var l=e.getModel(),u=a.get("edgeShape"),c=a.get("layout"),v=a.getOrient(),h=a.get(["lineStyle","curveness"]),f=a.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=r.__edge=new Ku({shape:dn(c,v,h,i,i)})),pt(d,{shape:dn(c,v,h,n,o)},a));else if(u==="polyline")if(c==="orthogonal"){if(e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=i.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,i=r.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=t.getData().tree.root,i=a.targetNode;if(tt(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var n=a.targetNodeId;if(n!=null&&(i=r.getNodeById(n)))return{node:i}}}function Uc(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function eo(a,e){var t=Uc(a);return Ht(t,e)>=0}function Ja(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var Iy=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},i=t.leaves||{},n=new Kt(i,this,this.ecModel),o=to.createTree(r,this,s);function s(v){v.wrapMethod("getItemModel",function(h,f){var p=o.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(h.parentModel=n),h})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var h=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=h&&h.collapsed!=null?!h.collapsed:v.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,r,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return zt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ja(i,this),r.collapsed=!i.isExpand,r},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(wt),My=Iy;function Py(a,e,t){for(var r=[a],i=[],n;n=r.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(i[n])}}function Ey(a,e){a.eachSeriesByType("tree",function(t){Vy(t,e)})}function Vy(a,e){var t=uy(a,e);a.layoutInfo=t;var r=a.get("layout"),i=0,n=0,o=null;r==="radial"?(i=2*Math.PI,n=Math.min(t.height,t.width)/2,o=Vs(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(i=t.width,n=t.height,o=Vs());var s=a.getData().tree.root,l=s.children[0];if(l){oy(s),Py(l,sy,o),s.hierNode.modifier=-l.hierNode.prelim,hr(l,ly);var u=l,c=l,v=l;hr(l,function(S){var x=S.getLayout().x;xc.getLayout().x&&(c=S),S.depth>v.depth&&(v=S)});var h=u===c?1:o(u,c)/2,f=h-u.getLayout().x,p=0,d=0,g=0,y=0;if(r==="radial")p=i/(c.getLayout().x+h+f),d=n/(v.depth-1||1),hr(l,function(S){g=(S.getLayout().x+f)*p,y=(S.depth-1)*d;var x=Sr(g,y);S.setLayout({x:x.x,y:x.y,rawX:g,rawY:y},!0)});else{var m=a.getOrient();m==="RL"||m==="LR"?(d=n/(c.getLayout().x+h+f),p=i/(v.depth-1||1),hr(l,function(S){y=(S.getLayout().x+f)*d,g=m==="LR"?(S.depth-1)*p:i-(S.depth-1)*p,S.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=i/(c.getLayout().x+h+f),d=n/(v.depth-1||1),hr(l,function(S){g=(S.getLayout().x+f)*p,y=m==="TB"?(S.depth-1)*d:n-(S.depth-1)*d,S.setLayout({x:g,y},!0)}))}}}function Ry(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");F(s,o)})})}function ky(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var i=e.dataIndex,n=r.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=Jn(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function Ny(a){a.registerChartView(Sy),a.registerSeriesModel(My),a.registerLayout(Ey),a.registerVisual(Ry),ky(a)}var Bs=["treemapZoomToNode","treemapRender","treemapMove"];function zy(a){for(var e=0;e1;)n=n.parentNode;var o=rn(a.ecModel,n.name||n.dataIndex+"",r);i.setVisual("decal",o)})}var By=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Xc(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Kt({itemStyle:o},this,r);n=t.levels=Gy(n,r);var l=G(n||[],function(v){return new Kt(v,s,r)},this),u=to.createTree(i,this,c);function c(v){v.wrapMethod("getItemModel",function(h,f){var p=u.getNodeByDataIndex(f),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return zt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ja(i,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=nt(),this._idIndexMapCount=0);var i=r.get(t);return i==null&&r.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Yc(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},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}(wt);function Xc(a){var e=0;D(a.children,function(r){Xc(r);var i=r.value;O(i)&&(i=i[0]),e+=i});var t=a.value;O(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),O(a.value)?a.value[0]=t:a.value=t}function Gy(a,e){var t=ge(e.get("color")),r=ge(e.get(["aria","decal","decals"]));if(!!t){a=a||[];var i,n;D(a,function(s){var l=new Kt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(n=!0)});var o=a[0]||(a[0]={});return i||(o.color=t.slice()),!n&&r&&(o.decal=r.slice()),a}}var Oy=By,Fy=8,Gs=8,gi=5,Wy=function(){function a(e){this.group=new Z,e.add(this.group)}return a.prototype.render=function(e,t,r,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!r)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),v={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,v,u),this._renderContent(e,v,s,l,u,c,i),kn(o,v.pos,v.box)}},a.prototype._prepare=function(e,t,r){for(var i=e;i;i=i.parentNode){var n=he(i.getModel().get("name"),""),o=r.getTextRect(n),s=Math.max(o.width+Fy*2,t.emptyItemWidth);t.totalWidth+=s+Gs,t.renderList.push({node:i,text:n,width:s})}},a.prototype._renderContent=function(e,t,r,i,n,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),v=Yh(t.pos,t.box),h=t.totalWidth,f=t.renderList,p=i.getModel("itemStyle").getItemStyle(),d=f.length-1;d>=0;d--){var g=f[d],y=g.node,m=g.width,S=g.text;h>v.width&&(h-=m-u,m=u,S=null);var x=new de({shape:{points:Hy(l,0,m,c,d===f.length-1,d===0)},style:st(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new ft({style:gt(n,{text:S})}),textConfig:{position:"inside"},z2:Or*1e4,onclick:ct(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=gt(o,{text:S}),x.ensureState("emphasis").style=p,St(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),$y(x,e,y),l+=m+Gs}},a.prototype.remove=function(){this.group.removeAll()},a}();function Hy(a,e,t,r,i,n){var o=[[i?a:a-gi,e],[a+t,e],[a+t,e+r],[i?a:a-gi,e+r]];return!n&&o.splice(2,0,[a+t+gi,e+r/2]),!i&&o.push([a,e+r/2]),o}function $y(a,e,t){lt(a).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Ja(t,e)}}var Uy=Wy,Yy=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:i,easing:n}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;iFs||Math.abs(t.dy)>Fs)){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var r=t.originX,i=t.originY;if(this._state!=="animating"){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var s=new bt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;r-=l.x,i-=l.y;var u=lr();$e(u,u,[-r,-i]),Wu(u,u,[t.scale,t.scale]),$e(u,u,[r,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var r=this;t.on("click",function(i){if(r._state==="ready"){var n=r.seriesModel.get("nodeClick",!0);if(!!n){var o=r.findTarget(i.offsetX,i.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(n==="zoomToNode")r._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Ju(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Uy(this.group))).render(t,r,i.node,function(o){n._state!=="animating"&&(eo(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=fr(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,r){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,r),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(xt);function fr(){return{nodeGroup:[],background:[],content:[]}}function Jy(a,e,t,r,i,n,o,s,l,u){if(!o)return;var c=o.getLayout(),v=a.getData(),h=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var f=c.width,p=c.height,d=c.borderWidth,g=c.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),S=o.viewChildren,x=c.upperHeight,b=S&&S.length,w=h.getModel("itemStyle"),_=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),L=h.getModel(["select","itemStyle"]),T=w.get("borderRadius")||0,C=q("nodeGroup",gn);if(!C)return;if(l.add(C),C.x=c.x||0,C.y=c.y||0,C.markRedraw(),ba(C).nodeWidth=f,ba(C).nodeHeight=p,c.isAboveViewRoot)return C;var M=q("background",Os,u,jy);M&&H(C,M,b&&c.upperLabelHeight);var P=h.getModel("emphasis"),I=P.get("focus"),E=P.get("blurScope"),R=P.get("disabled"),k=I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():I;if(b)Mo(C)&&gr(C,!1),M&&(gr(M,!R),v.setItemGraphicEl(o.dataIndex,M),Po(M,k,E));else{var N=q("content",Os,u,Ky);N&&$(C,N),M.disableMorphing=!0,M&&Mo(M)&&gr(M,!1),gr(C,!R),v.setItemGraphicEl(o.dataIndex,C),Po(C,k,E)}return C;function H(J,Y,at){var rt=lt(Y);if(rt.dataIndex=o.dataIndex,rt.seriesIndex=a.seriesIndex,Y.setShape({x:0,y:0,width:f,height:p,r:T}),g)U(Y);else{Y.invisible=!1;var ot=o.getVisual("style"),Tt=ot.stroke,Lt=$s(w);Lt.fill=Tt;var ht=Re(_);ht.fill=_.get("borderColor");var Et=Re(A);Et.fill=A.get("borderColor");var Vt=Re(L);if(Vt.fill=L.get("borderColor"),at){var ne=f-2*d;Q(Y,Tt,ot.opacity,{x:d,y:0,width:ne,height:x})}else Y.removeTextContent();Y.setStyle(Lt),Y.ensureState("emphasis").style=ht,Y.ensureState("blur").style=Et,Y.ensureState("select").style=Vt,ir(Y)}J.add(Y)}function $(J,Y){var at=lt(Y);at.dataIndex=o.dataIndex,at.seriesIndex=a.seriesIndex;var rt=Math.max(f-2*d,0),ot=Math.max(p-2*d,0);if(Y.culling=!0,Y.setShape({x:d,y:d,width:rt,height:ot,r:T}),g)U(Y);else{Y.invisible=!1;var Tt=o.getVisual("style"),Lt=Tt.fill,ht=$s(w);ht.fill=Lt,ht.decal=Tt.decal;var Et=Re(_),Vt=Re(A),ne=Re(L);Q(Y,Lt,Tt.opacity,null),Y.setStyle(ht),Y.ensureState("emphasis").style=Et,Y.ensureState("blur").style=Vt,Y.ensureState("select").style=ne,ir(Y)}J.add(Y)}function U(J){!J.invisible&&n.push(J)}function Q(J,Y,at,rt){var ot=h.getModel(rt?Hs:Ws),Tt=he(h.get("name"),null),Lt=ot.getShallow("show");jt(J,Nt(h,rt?Hs:Ws),{defaultText:Lt?Tt:null,inheritColor:Y,defaultOpacity:at,labelFetcher:a,labelDataIndex:o.dataIndex});var ht=J.getTextContent();if(!!ht){var Et=ht.style,Vt=Xh(Et.padding||0);rt&&(J.setTextConfig({layoutRect:rt}),ht.disableLabelLayout=!0),ht.beforeUpdate=function(){var Ce=Math.max((rt?rt.width:J.shape.width)-Vt[1]-Vt[3],0),Ie=Math.max((rt?rt.height:J.shape.height)-Vt[0]-Vt[2],0);(Et.width!==Ce||Et.height!==Ie)&&ht.setStyle({width:Ce,height:Ie})},Et.truncateMinChar=2,Et.lineOverflow="truncate",et(Et,rt,c);var ne=ht.getState("emphasis");et(ne?ne.style:null,rt,c)}}function et(J,Y,at){var rt=J?J.text:null;if(!Y&&at.isLeafRoot&&rt!=null){var ot=a.get("drillDownIcon",!0);J.text=ot?ot+" "+rt:rt}}function q(J,Y,at,rt){var ot=m!=null&&t[J][m],Tt=i[J];return ot?(t[J][m]=null,it(Tt,ot)):g||(ot=new Y,ot instanceof ar&&(ot.z2=Qy(at,rt)),Dt(Tt,ot)),e[J][y]=ot}function it(J,Y){var at=J[y]={};Y instanceof gn?(at.oldX=Y.x,at.oldY=Y.y):at.oldShape=F({},Y.shape)}function Dt(J,Y){var at=J[y]={},rt=o.parentNode,ot=Y instanceof Z;if(rt&&(!r||r.direction==="drillDown")){var Tt=0,Lt=0,ht=i.background[rt.getRawIndex()];!r&&ht&&ht.oldShape&&(Tt=ht.oldShape.width,Lt=ht.oldShape.height),ot?(at.oldX=0,at.oldY=Lt):at.oldShape={x:Tt,y:Lt,width:0,height:0}}at.fadein=!ot}}function Qy(a,e){return a*Zy+e}var tm=qy,Vr=D,em=kt,wa=-1,ro=function(){function a(e){var t=e.mappingMethod,r=e.type,i=this.option=vt(e);this.type=r,this.mappingMethod=t,this._normalizeData=im[t];var n=a.visualHandlers[r];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(yi(i),rm(i)):t==="category"?i.categories?am(i):yi(i,!0):(yt(t!=="linear"||i.dataExtent),yi(i))}return a.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},a.prototype.getNormalizer=function(){return K(this._normalizeData,this)},a.listVisualTypes=function(){return dt(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){kt(e)?D(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var i,n=O(e)?[]:kt(e)?{}:(i=!0,null);return a.eachVisual(e,function(o,s){var l=t.call(r,o,s);i?n=l:n[s]=l}),n},a.retrieveVisuals=function(e){var t={},r;return e&&Vr(a.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],r=!0)}),r?t:null},a.prepareVisualTypes=function(e){if(O(e))e=e.slice();else if(em(e)){var t=[];Vr(e,function(r,i){t.push(i)}),e=t}else return[];return e.sort(function(r,i){return i==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),e},a.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},a.findPieceIndex=function(e,t,r){for(var i,n=1/0,o=0,s=t.length;o=0;n--)r[n]==null&&(delete t[e[n]],e.pop())}function yi(a,e){var t=a.visual,r=[];kt(t)?Vr(t,function(n){r.push(n)}):t!=null&&r.push(t);var i={color:1,symbol:1};!e&&r.length===1&&!i.hasOwnProperty(a.type)&&(r[1]=r[0]),Zc(a,r)}function Kr(a){return{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("color",a(t("color"),i))},_normalizedToVisual:yn([0,1])}}function Us(a){var e=this.option.visual;return e[Math.round(_t(a,[0,1],[0,e.length-1],!0))]||{}}function pr(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function xr(a){var e=this.option.visual;return e[this.option.loop&&a!==wa?a%e.length:a]}function ke(){return this.option.visual[0]}function yn(a){return{linear:function(e){return _t(e,a,this.option.visual,!0)},category:xr,piecewise:function(e,t){var r=mn.call(this,t);return r==null&&(r=_t(e,a,this.option.visual,!0)),r},fixed:ke}}function mn(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=ro.findPieceIndex(a,t),i=t[r];if(i&&i.visual)return i.visual[this.type]}}function Zc(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=G(e,function(t){var r=Zh(t);return r||nr("'"+t+"' is an illegal color, fallback to '#000000'",!0),r||[0,0,0,1]})),e}var im={linear:function(a){return _t(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=ro.findPieceIndex(a,e,!0);if(t!=null)return _t(t,[0,e.length-1],[0,1],!0)},category:function(a){var e=this.option.categories?this.option.categoryMap[a]:a;return e==null?wa:e},fixed:Fe};function qr(a,e,t){return a?e<=t:e=t.length||d===t[d.depth]){var y=cm(i,l,d,g,p,r);Kc(d,y,t,r)}})}}}function sm(a,e,t){var r=F({},e),i=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=a.get(n);i[n]=null,o!=null&&(r[n]=o)}),r}function Ys(a){var e=mi(a,"color");if(e){var t=mi(a,"colorAlpha"),r=mi(a,"colorSaturation");return r&&(e=_r(e,null,null,r)),t&&(e=pa(e,t)),e}}function lm(a,e){return e!=null?_r(e,null,null,a):null}function mi(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function um(a,e,t,r,i,n){if(!(!n||!n.length)){var o=Si(e,"color")||i.color!=null&&i.color!=="none"&&(Si(e,"colorAlpha")||Si(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(c==="index"||c==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var h=new At(v);return jc(h).drColorMappingBy=c,h}}}function Si(a,e){var t=a.get(e);return O(t)&&t.length?{name:e,range:t}:null}function cm(a,e,t,r,i,n){var o=F({},e);if(i){var s=i.type,l=s==="color"&&jc(i).drColorMappingBy,u=l==="index"?r:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Rr=Math.max,_a=Math.min,Xs=Rt,ao=D,qc=["itemStyle","borderWidth"],vm=["itemStyle","gapWidth"],hm=["upperLabel","show"],fm=["upperLabel","height"],pm={seriesType:"treemap",reset:function(a,e,t,r){var i=t.getWidth(),n=t.getHeight(),o=a.option,s=ie(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=B(Xs(s.width,l[0]),i),c=B(Xs(s.height,l[1]),n),v=r&&r.type,h=["treemapZoomToNode","treemapRootToNode"],f=Er(r,h,a),p=v==="treemapRender"||v==="treemapMove"?r.rootRect:null,d=a.getViewRoot(),g=Uc(d);if(v!=="treemapMove"){var y=v==="treemapZoomToNode"?xm(a,f,d,u,c):p?[p.width,p.height]:[u,c],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var S={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var x={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(x),Jc(d,S,!1,0),x=d.getLayout(),ao(g,function(w,_){var A=(g[_+1]||d).getValue();w.setLayout(F({dataExtent:[A,A],borderWidth:0,upperHeight:0},x))})}var b=a.getData().tree.root;b.setLayout(bm(s,p,f),!0),a.setLayoutInfo(s),Qc(b,new bt(-s.x,-s.y,i,n),g,d,0)}};function Jc(a,e,t,r){var i,n;if(!a.isRemoved()){var o=a.getLayout();i=o.width,n=o.height;var s=a.getModel(),l=s.get(qc),u=s.get(vm)/2,c=tv(s),v=Math.max(l,c),h=l-u,f=v-u;a.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:c},!0),i=Rr(i-2*h,0),n=Rr(n-h-f,0);var p=i*n,d=dm(a,s,p,e,t,r);if(!!d.length){var g={x:h,y:f,width:i,height:n},y=_a(i,n),m=1/0,S=[];S.area=0;for(var x=0,b=d.length;x=0;l--){var u=i[r==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function Sm(a,e,t){for(var r=0,i=1/0,n=0,o=void 0,s=a.length;nr&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Rr(u*r/l,l/(u*i)):1/0}function Zs(a,e,t,r,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],c=e?a.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var v=0,h=a.length;vEo&&(u=Eo),n=s}ur&&(r=e);var n=r%2?r+2:r+3;i=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var _=x[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var A=-Math.atan2(x[1],x[0]);v[0].8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":n.x=-h[0]*y+c[0],n.y=-h[1]*m+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=y*_+c[0],n.y=c[1]+L,p=x[0]<0?"right":"left",n.originX=-y*_,n.originY=-L;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=w[0],n.y=w[1]+L,p="center",n.originY=-L;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-y*_+v[0],n.y=v[1]+L,p=x[0]>=0?"right":"left",n.originX=y*_,n.originY=-L;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||p})}},e}(Z),so=Om,Fm=function(){function a(e){this.group=new Z,this._LineCtor=e||so}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,i=r.group,n=r._lineData;r._lineData=e,n||i.removeAll();var o=tl(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=tl(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!Wm(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function tl(a){var e=a.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Nt(e)}}function el(a){return isNaN(a[0])||isNaN(a[1])}function Ai(a){return a&&!el(a[0])&&!el(a[1])}var lo=Fm,Ti=[],Di=[],Li=[],je=Qu,Ci=Qh,rl=Math.abs;function al(a,e,t){for(var r=a[0],i=a[1],n=a[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){Ti[0]=je(r[0],i[0],n[0],c),Ti[1]=je(r[1],i[1],n[1],c);var v=rl(Ci(Ti,e)-l);v=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Ii(a,e){var t=[],r=Jh,i=[[],[],[]],n=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[be(u[0]),be(u[1])],u[2]&&u.__original.push(be(u[2])));var h=u.__original;if(u[2]!=null){if(Ct(i[0],h[0]),Ct(i[1],h[2]),Ct(i[2],h[1]),c&&c!=="none"){var f=wr(s.node1),p=al(i,h[0],f*e);r(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],r(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(v&&v!=="none"){var f=wr(s.node2),p=al(i,h[1],f*e);r(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],r(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}Ct(u[0],i[0]),Ct(u[1],i[2]),Ct(u[2],i[1])}else{if(Ct(n[0],h[0]),Ct(n[1],h[1]),tr(o,n[1],n[0]),Wr(o,o),c&&c!=="none"){var f=wr(s.node1);an(n[0],n[0],o,f*e)}if(v&&v!=="none"){var f=wr(s.node2);an(n[1],n[1],o,-f*e)}Ct(u[0],n[0]),Ct(u[1],n[1])}})}function il(a){return a.type==="view"}var Hm=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var i=new za,n=new lo,o=this.group;this._controller=new Ha(r.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,r,i){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(il(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):pt(u,c,t)}Ii(t.getGraph(),br(t));var v=t.getData();s.updateData(v);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,r,i),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p);var d=t.get("layout");v.graph.eachNode(function(S){var x=S.dataIndex,b=S.getGraphicEl(),w=S.getModel();if(!!b){b.off("drag").off("dragend");var _=w.get("draggable");_&&b.on("drag",function(L){switch(d){case"force":f.warmUp(),!n._layouting&&n._startForceLayoutIteration(f,p),f.setFixed(x),v.setItemLayout(x,[b.x,b.y]);break;case"circular":v.setItemLayout(x,[b.x,b.y]),S.setLayout({fixed:!0},!0),oo(t,"symbolSize",S,[L.offsetX,L.offsetY]),n.updateLayout(t);break;case"none":default:v.setItemLayout(x,[b.x,b.y]),no(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(x)}),b.setDraggable(_,!!w.get("cursor"));var A=w.get(["emphasis","focus"]);A==="adjacency"&&(lt(b).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var x=S.getGraphicEl(),b=S.getModel().get(["emphasis","focus"]);!x||b==="adjacency"&&(lt(x).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=v.getLayout("cx"),m=v.getLayout("cy");v.graph.eachNode(function(S){iv(S,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var i=this;(function n(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(r?i._layoutTimeout=setTimeout(n,16):n())})})()},e.prototype._updateController=function(t,r,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,v){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,v)&&!Pn(u,i,t)}),!il(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){jn(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Kn(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(),Ii(t.getGraph(),br(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),i=br(t);r.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){Ii(t.getGraph(),br(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(xt),$m=Hm;function Ke(a){return"_EC_"+a}var Um=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(r[Ke(e)]){console.error("Graph nodes have duplicate name or id");return}var i=new Ne(e,t);return i.hostGraph=this,this.nodes.push(i),r[Ke(e)]=i,i},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[Ke(e)]},a.prototype.addEdge=function(e,t,r){var i=this._nodesMap,n=this._edgesMap;if(ue(e)&&(e=this.nodes[e]),ue(t)&&(t=this.nodes[t]),e instanceof Ne||(e=i[Ke(e)]),t instanceof Ne||(t=i[Ke(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new ov(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof Ne&&(e=e.id),t instanceof Ne&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,i=r.length,n=0;n=0&&e.call(t,r[n],n)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,i=r.length,n=0;n=0&&r[n].node1.dataIndex>=0&&r[n].node2.dataIndex>=0&&e.call(t,r[n],n)},a.prototype.breadthFirstTraverse=function(e,t,r,i){if(t instanceof Ne||(t=this._nodesMap[Ke(t)]),!!t){for(var n=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}ae(Ne,sv("hostGraph","data"));ae(ov,sv("hostGraph","edgeData"));var Ym=Um;function lv(a,e,t,r,i){for(var n=new Ym(r),o=0;o "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=sr(a,t);else{var d=Gn.get(f),g=d?d.dimensions||[]:[];Ht(g,"value")<0&&g.concat(["value"]);var y=Rn(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Gt(y,t),p.initData(a)}var m=new Gt(["value"],t);return m.initData(l,s),i&&i(p,m),Hc({mainData:p,struct:n,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var Xm=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function i(){return r._categoriesData}this.legendVisualProvider=new Ga(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),$a(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){Cm(this);var s=lv(n,i,this,!0,l);return D(s.edges,function(u){Im(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var v=Kt.prototype.getModel;function h(p,d){var g=v.call(this,p,d);return g.resolveParentPath=f,g}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=h,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,r,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),zt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var v=tf({series:this,dataIndex:t,multipleSeries:r});return v},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(i){return i.value!=null?i:F({value:0},i)}),r=new Gt(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(i){return r.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return a.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(wt),Zm=Xm,jm={type:"graphRoam",event:"graphRoam",update:"none"};function Km(a){a.registerChartView($m),a.registerSeriesModel(Zm),a.registerProcessor(_m),a.registerVisual(Am),a.registerVisual(Tm),a.registerLayout(Mm),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,Em),a.registerLayout(Rm),a.registerCoordinateSystem("graphView",{dimensions:Ur.dimensions,create:Nm}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Fe),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Fe),a.registerAction(jm,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(i){var n=i.coordinateSystem,o=Jn(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var qm=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),Jm=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new qm},e.prototype.buildPath=function(t,r){var i=Math.cos,n=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-i(l)*s*(s>=o/3?1:2),c=r.y-n(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(r.x+i(l)*s,r.y+n(l)*s),t.lineTo(r.x+i(r.angle)*o,r.y+n(r.angle)*o),t.lineTo(r.x-i(l)*s,r.y-n(l)*s),t.lineTo(u,c)},e}(Jt),Qm=Jm;function t0(a,e){var t=a.get("center"),r=e.getWidth(),i=e.getHeight(),n=Math.min(r,i),o=B(t[0],e.getWidth()),s=B(t[1],e.getHeight()),l=B(a.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Qr(a,e){var t=a==null?"":a+"";return e&&(tt(e)?t=e.replace("{value}",t):ut(e)&&(t=e(a))),t}var e0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=t0(t,i);this._renderMain(t,r,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,v=t.getModel("axisLine"),h=v.get("roundCap"),f=h?ko:Cr,p=v.get("show"),d=v.getModel("lineStyle"),g=d.get("width"),y=[u,c];ef(y,!l),u=y[0],c=y[1];for(var m=c-u,S=u,x=[],b=0;p&&b=L&&(T===0?0:n[T-1][0])Math.PI/2&&(q+=Math.PI)):et==="tangential"?q=-A-Math.PI/2:ue(et)&&(q=et*Math.PI/180),q===0?v.add(new ft({style:gt(S,{text:H,x:U,y:Q,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:I<-.4?"left":I>.4?"right":"center"},{inheritColor:$}),silent:!0})):v.add(new ft({style:gt(S,{text:H,x:U,y:Q,verticalAlign:"middle",align:"center"},{inheritColor:$}),silent:!0,originX:U,originY:Q,rotation:q}))}if(m.get("show")&&R!==x){var k=m.get("distance");k=k?k+c:c;for(var it=0;it<=b;it++){I=Math.cos(A),E=Math.sin(A);var Dt=new ee({shape:{x1:I*(p-k)+h,y1:E*(p-k)+f,x2:I*(p-_-k)+h,y2:E*(p-_-k)+f},silent:!0,style:M});M.stroke==="auto"&&Dt.setStyle({stroke:n((R+it/b)/x)}),v.add(Dt),A+=T}A-=T}else A+=L}},e.prototype._renderPointer=function(t,r,i,n,o,s,l,u,c){var v=this.group,h=this._data,f=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),S=m.mapDimension("value"),x=+t.get("min"),b=+t.get("max"),w=[x,b],_=[s,l];function A(T,C){var M=m.getItemModel(T),P=M.getModel("pointer"),I=B(P.get("width"),o.r),E=B(P.get("length"),o.r),R=t.get(["pointer","icon"]),k=P.get("offsetCenter"),N=B(k[0],o.r),H=B(k[1],o.r),$=P.get("keepAspect"),U;return R?U=Ot(R,N-I/2,H-E,I,E,null,$):U=new Qm({shape:{angle:-Math.PI/2,width:I,r:E,x:N,y:H}}),U.rotation=-(C+Math.PI/2),U.x=o.cx,U.y=o.cy,U}function L(T,C){var M=g.get("roundCap"),P=M?ko:Cr,I=g.get("overlap"),E=I?g.get("width"):c/m.count(),R=I?o.r-E:o.r-(T+1)*E,k=I?o.r:o.r-T*E,N=new P({shape:{startAngle:s,endAngle:C,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:k}});return I&&(N.z2=b-m.get(S,T)%b),N}(y||d)&&(m.diff(h).add(function(T){var C=m.get(S,T);if(d){var M=A(T,s);re(M,{rotation:-((isNaN(+C)?_[0]:_t(C,w,_,!0))+Math.PI/2)},t),v.add(M),m.setItemGraphicEl(T,M)}if(y){var P=L(T,s),I=g.get("clip");re(P,{shape:{endAngle:_t(C,w,_,I)}},t),v.add(P),Ro(t.seriesIndex,m.dataType,T,P),p[T]=P}}).update(function(T,C){var M=m.get(S,T);if(d){var P=h.getItemGraphicEl(C),I=P?P.rotation:s,E=A(T,I);E.rotation=I,pt(E,{rotation:-((isNaN(+M)?_[0]:_t(M,w,_,!0))+Math.PI/2)},t),v.add(E),m.setItemGraphicEl(T,E)}if(y){var R=f[C],k=R?R.shape.endAngle:s,N=L(T,k),H=g.get("clip");pt(N,{shape:{endAngle:_t(M,w,_,H)}},t),v.add(N),Ro(t.seriesIndex,m.dataType,T,N),p[T]=N}}).execute(),m.each(function(T){var C=m.getItemModel(T),M=C.getModel("emphasis"),P=M.get("focus"),I=M.get("blurScope"),E=M.get("disabled");if(d){var R=m.getItemGraphicEl(T),k=m.getItemVisual(T,"style"),N=k.fill;if(R instanceof ce){var H=R.style;R.useStyle(F({image:H.image,x:H.x,y:H.y,width:H.width,height:H.height},k))}else R.useStyle(k),R.type!=="pointer"&&R.setColor(N);R.setStyle(C.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",n(_t(m.get(S,T),w,[0,1],!0))),R.z2EmphasisLift=0,Ft(R,C),St(R,P,I,E)}if(y){var $=p[T];$.useStyle(m.getItemVisual(T,"style")),$.setStyle(C.getModel(["progress","itemStyle"]).getItemStyle()),$.z2EmphasisLift=0,Ft($,C),St($,P,I,E)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,r){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ot(s,r.cx-o/2+B(l[0],r.r),r.cy-o/2+B(l[1],r.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,r,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),v=+t.get("max"),h=new Z,f=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){f[y]=new ft({silent:!0}),p[y]=new ft({silent:!0})}).update(function(y,m){f[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),S=l.get(u,y),x=new Z,b=n(_t(S,[c,v],[0,1],!0)),w=m.getModel("title");if(w.get("show")){var _=w.get("offsetCenter"),A=o.cx+B(_[0],o.r),L=o.cy+B(_[1],o.r),T=f[y];T.attr({z2:g?0:2,style:gt(w,{x:A,y:L,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(T)}var C=m.getModel("detail");if(C.get("show")){var M=C.get("offsetCenter"),P=o.cx+B(M[0],o.r),I=o.cy+B(M[1],o.r),E=B(C.get("width"),o.r),R=B(C.get("height"),o.r),k=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,T=p[y],N=C.get("formatter");T.attr({z2:g?0:2,style:gt(C,{x:P,y:I,text:Qr(S,N),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:k})}),rf(T,{normal:C},S,function($){return Qr($,N)}),d&&af(T,y,l,t,{getFormattedLabel:function($,U,Q,et,q,it){return Qr(it?it.interpolatedValue:S,N)}}),x.add(T)}h.add(x)}),this.group.add(h),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(xt),r0=e0,a0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return Gr(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}(wt),i0=a0;function n0(a){a.registerChartView(r0),a.registerSeriesModel(i0)}var o0=["itemStyle","opacity"],s0=function(a){V(e,a);function e(t,r){var i=a.call(this)||this,n=i,o=new Le,s=new ft;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,r,!0),i}return e.prototype.updateData=function(t,r,i){var n=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),c=s.get(o0);c=c==null?1:c,i||_e(n),n.useStyle(t.getItemVisual(r,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,re(n,{style:{opacity:c}},o,r)):pt(n,{style:{opacity:c},shape:{points:l.points}},o,r),Ft(n,s),this._updateLabel(t,r),St(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),c=u.label,v=t.getItemVisual(r,"style"),h=v.fill;jt(o,Nt(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:v.opacity,defaultText:t.getName(r)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var f=c.linePoints;n.setShape({points:f}),i.textGuideLineConfig={anchor:f?new nf(f[0][0],f[0][1]):null},pt(o,{style:{x:c.x,y:c.y}},s,r),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),of(i,sf(l),{stroke:h})},e}(de),l0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new s0(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(n,l),s.add(c),n.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);lf(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(xt),u0=l0,c0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ga(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return Gr(this,{coordDimensions:["value"],encodeDefaulter:ct(Uu,this)})},e.prototype._defaultLabelLine=function(t){$a(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),i=a.prototype.getDataParams.call(this,t),n=r.mapDimension("value"),o=r.getSum(n);return i.percent=o?+(r.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(wt),v0=c0;function h0(a,e){return ie(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function f0(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=a.count();o-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),t==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right.")),o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-S,h=y-5,v="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+S,h=y+5,v="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-S,f=m-5,v="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+S,f=m+5,v="center"):o==="rightTop"?(d=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-S,f=m-5,v="center"):(y=d+S,h=y+5,v="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],t==="horizontal"?(m=g+S,f=m+5,v="center"):(y=d+S,h=y+5,v="bottom")):o==="leftTop"?(d=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-S,f=m-5,v="center"):(y=d-S,h=y-5,v="right")):o==="leftBottom"?(d=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+S,f=m+5,v="center"):(y=d-S,h=y-5,v="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+S,f=m+5,v="center"):(y=d+S,h=y+5,v="left")),t==="horizontal"?(y=d,h=y):(m=g,f=m),p=[[d,g],[y,m]]}l.label={linePoints:p,x:h,y:f,verticalAlign:"middle",textAlign:v,inside:c}})}function d0(a,e){a.eachSeriesByType("funnel",function(t){var r=t.getData(),i=r.mapDimension("value"),n=t.get("sort"),o=h0(t,e),s=t.get("orient"),l=o.width,u=o.height,c=f0(r,n),v=o.x,h=o.y,f=s==="horizontal"?[B(t.get("minSize"),u),B(t.get("maxSize"),u)]:[B(t.get("minSize"),l),B(t.get("maxSize"),l)],p=r.getDataExtent(i),d=t.get("min"),g=t.get("max");d==null&&(d=Math.min(p[0],0)),g==null&&(g=p[1]);var y=t.get("funnelAlign"),m=t.get("gap"),S=s==="horizontal"?l:u,x=(S-m*(r.count()-1))/r.count(),b=function(I,E){if(s==="horizontal"){var R=r.get(i,I)||0,k=_t(R,[d,g],f,!0),N=void 0;switch(y){case"top":N=h;break;case"center":N=h+(u-k)/2;break;case"bottom":N=h+(u-k);break}return[[E,N],[E,N+k]]}var H=r.get(i,I)||0,$=_t(H,[d,g],f,!0),U;switch(y){case"left":U=v;break;case"center":U=v+(l-$)/2;break;case"right":U=v+l-$;break}return[[U,E],[U+$,E]]};n==="ascending"&&(x=-x,m=-m,s==="horizontal"?v+=l:h+=u,c=c.reverse());for(var w=0;wE0)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(a){if(!(this._mouseDownPoint||!Pi(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]),r=t.behavior;r==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(r==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:r==="jump"?null:{duration:0}})}}};function Pi(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var k0=V0,N0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){a.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var r=this.option;t&&Wt(r,t,!0),this._initDimensions()},e.prototype.contains=function(t,r){var i=t.get("parallelIndex");return i!=null&&r.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(r){t.hasOwnProperty(r)&&(this.option[r]=t[r])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],r=this.parallelAxisIndex=[],i=qt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);D(i,function(n){t.push("dim"+n.get("dim")),r.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}($t),z0=N0,B0=function(a){V(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(ve),G0=B0,Ei=D,cv=Math.min,vv=Math.max,sl=Math.floor,O0=Math.ceil,ll=Nn,F0=Math.PI,W0=function(){function a(e,t,r){this.type="parallel",this._axesMap=nt(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var i=e.dimensions,n=e.parallelAxisIndex;Ei(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new G0(o,On(u),[0,0],u.get("type"),l)),v=c.type==="category";c.onBand=v&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},a.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},a.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),r=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=r&&o<=r+t.axisLength&&s>=i&&s<=i+t.layoutLength},a.prototype.getModel=function(){return this._model},a.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(r){if(!!e.contains(r,t)){var i=r.getData();Ei(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),da(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=ie(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},a.prototype.getRect=function(){return this._rect},a.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,r=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=ta(e.get("axisExpandWidth"),l),v=ta(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>v&&v>1&&c>0&&s>0,f=e.get("axisExpandWindow"),p;if(f)p=ta(f[1]-f[0],l),f[1]=f[0]+p;else{p=ta(c*(v-1),l);var d=e.get("axisExpandCenter")||sl(u/2);f=[c*d-p/2],f[1]=f[0]+p}var g=(s-p)/(u-v);g<3&&(g=0);var y=[sl(ll(f[0]/c,1))+1,O0(ll(f[1]/c,1))-1],m=g/c*f[0];return{layout:n,pixelDimIndex:o,layoutBase:t[r[o]],layoutLength:s,axisBase:t[r[1-o]],axisLength:t[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},a.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Ei(r,function(o,s){var l=(i.axisExpandable?$0:H0)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:F0/2,vertical:0},v=[u[n].x+e.x,u[n].y+e.y],h=c[n],f=lr();Wa(f,f,h),$e(f,f,v),this._axesLayout[o]={position:v,rotation:h,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},a.prototype.getAxis=function(e){return this._axesMap.get(e)},a.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},a.prototype.eachActiveState=function(e,t,r,i){r==null&&(r=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(g){s.push(e.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),c=r;cn*(1-v[0])?(u="jump",l=s-n*(1-v[2])):(l=s-n*v[1])>=0&&(l=s-n*(1-v[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?rc(l,i,o,"all"):u="none";else{var f=i[1]-i[0],p=o[1]*s/f;i=[vv(0,p-f/2)],i[1]=cv(o[1],i[0]+f),i[0]=i[1]-f}return{axisExpandWindow:i,behavior:u}},a}();function ta(a,e){return cv(vv(a,e[0]),e[1])}function H0(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function $0(a,e){var t=e.layoutLength,r=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,c;return a=0;i--)Ue(r[i])},e.prototype.getActiveState=function(t){var r=this.activeIntervals;if(!r.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(r.length===1){var i=r[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=r.length;n=0)s[o[l].depth]=new Kt(o[l],this,r);else throw new Error("levels[i].depth is mandatory and should be natural number");if(n&&i){var u=lv(n,i,this,!0,c);return u.data}function c(v,h){v.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(f.parentModel=m)}return f}),h.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,S=d.levelModels[m];S&&(f.parentModel=S)}return f})}},e.prototype.setNodePosition=function(t,r){var i=this.option.data||this.option.nodes,n=i[t];n.localX=r[0],n.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,i){function n(f){return isNaN(f)||f==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return zt("nameValue",{name:u,value:l,noValue:n(l)})}else{var c=this.getGraph().getNodeByIndex(t),v=c.getLayout().value,h=this.getDataParams(t,i).data.name;return zt("nameValue",{name:h!=null?h+"":null,value:v,noValue:n(v)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var i=a.prototype.getDataParams.call(this,t,r);if(i.value==null&&r==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},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}(wt),vS=cS;function hS(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),i=t.get("nodeGap"),n=fS(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,c=l.edges;dS(u);var v=qt(u,function(d){return d.getLayout().value===0}),h=v.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");pS(u,c,r,i,o,s,h,f,p)})}function fS(a,e){return ie(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function pS(a,e,t,r,i,n,o,s,l){gS(a,e,t,i,n,s,l),xS(a,e,n,i,r,o,s),IS(a,s)}function dS(a){D(a,function(e){var t=we(e.outEdges,Aa),r=we(e.inEdges,Aa),i=e.getValue()||0,n=Math.max(t,r,i);e.setLayout({value:n},!0)})}function gS(a,e,t,r,i,n,o){for(var s=[],l=[],u=[],c=[],v=0,h=0;h=0;y&&g.depth>f&&(f=g.depth),d.setLayout({depth:y?g.depth:v},!0),n==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mv-1?f:v-1;o&&o!=="left"&&yS(a,o,n,_);var A=n==="vertical"?(i-t)/_:(r-t)/_;SS(a,A,n)}function pv(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function yS(a,e,t,r){if(e==="right"){for(var i=[],n=a,o=0;n.length;){for(var s=0;s0;n--)l*=.99,_S(s,l,o),Vi(s,i,t,r,o),CS(s,l,o),Vi(s,i,t,r,o)}function bS(a,e){var t=[],r=e==="vertical"?"y":"x",i=on(a,function(n){return n.getLayout()[r]});return i.keys.sort(function(n,o){return n-o}),D(i.keys,function(n){t.push(i.buckets.get(n))}),t}function wS(a,e,t,r,i,n){var o=1/0;D(a,function(s){var l=s.length,u=0;D(s,function(v){u+=v.getLayout().value});var c=n==="vertical"?(r-(l-1)*i)/u:(t-(l-1)*i)/u;c0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]+l.getLayout()[h]+e;var p=i==="vertical"?r:t;if(u=c-e-p,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var f=v-2;f>=0;--f)l=o[f],u=l.getLayout()[n]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[n]}})}function _S(a,e,t){D(a.slice().reverse(),function(r){D(r,function(i){if(i.outEdges.length){var n=we(i.outEdges,AS,t)/we(i.outEdges,Aa);if(isNaN(n)){var o=i.outEdges.length;n=o?we(i.outEdges,TS,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-Ae(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ae(i,t))*e;i.setLayout({y:l},!0)}}})})}function AS(a,e){return Ae(a.node2,e)*a.getValue()}function TS(a,e){return Ae(a.node2,e)}function DS(a,e){return Ae(a.node1,e)*a.getValue()}function LS(a,e){return Ae(a.node1,e)}function Ae(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function Aa(a){return a.getValue()}function we(a,e,t){for(var r=0,i=a.length,n=-1;++no&&(o=l)}),D(r,function(s){var l=new At({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&D(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function PS(a){a.registerChartView(uS),a.registerSeriesModel(vS),a.registerLayout(hS),a.registerVisual(MS),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var dv=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",r=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=n.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,v=this._baseAxisDim=u[c],h=u[1-c],f=[i,n],p=f[c].get("type"),d=f[1-c].get("type"),g=e.data;if(g&&l){var y=[];D(g,function(x,b){var w;O(x)?(w=x.slice(),x.unshift(b)):O(x.value)?(w=F({},x),w.value=w.value.slice(),x.value.unshift(b)):w=x,y.push(w)}),e.data=y}var m=this.defaultValueDimensions,S=[{name:v,type:sn(p),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:sn(d),dimsDef:m.slice()}];return Gr(this,{coordDimensions:S,dimensionsCount:m.length+1,encodeDefaulter:ct(pf,S,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),gv=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(wt);ae(gv,dv,!0);var ES=gv,VS=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var c=n.getItemLayout(u),v=vl(c,n,u,l,!0);n.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,c){var v=s.getItemGraphicEl(c);if(!n.hasValue(u)){o.remove(v);return}var h=n.getItemLayout(u);v?(_e(v),yv(h,v,n,u)):v=vl(h,n,u,l),o.add(v),n.setItemGraphicEl(u,v)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=n},e.prototype.remove=function(t){var r=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&r.remove(n)})},e.type="boxplot",e}(xt),RS=function(){function a(){}return a}(),kS=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new RS},e.prototype.buildPath=function(t,r){var i=r.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();nd){var x=[y,S];r.push(x)}}}return{boxData:t,outliers:r}}var HS={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==df){var r="";r=gf("source data is not applicable for this boxplot transform. Expect number[][]."),ic(r)}var i=WS(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function $S(a){a.registerSeriesModel(ES),a.registerChartView(zS),a.registerLayout(BS),a.registerTransform(HS)}var US=["color","borderColor"],YS=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){Ya(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),i=this._data,n=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),r.diff(i).add(function(c){if(r.hasValue(c)){var v=r.getItemLayout(c);if(s&&hl(u,v))return;var h=Ri(v,c,!0);re(h,{shape:{points:v.ends}},t,c),ki(h,r,c,o),n.add(h),r.setItemGraphicEl(c,h)}}).update(function(c,v){var h=i.getItemGraphicEl(v);if(!r.hasValue(c)){n.remove(h);return}var f=r.getItemLayout(c);if(s&&hl(u,f)){n.remove(h);return}h?(pt(h,{shape:{points:f.ends}},t,c),_e(h)):h=Ri(f),ki(h,r,c,o),n.add(h),r.setItemGraphicEl(c,h)}).remove(function(c){var v=i.getItemGraphicEl(c);v&&n.remove(v)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),fl(t,this.group);var r=t.get("clip",!0)?Wn(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var i=r.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=Ri(s);ki(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){fl(r,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(xt),XS=function(){function a(){}return a}(),ZS=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new XS},e.prototype.buildPath=function(t,r){var i=r.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Jt);function Ri(a,e,t){var r=a.ends;return new ZS({shape:{points:t?jS(r,a):r},z2:100})}function hl(a,e){for(var t=!0,r=0;r0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]);a===0&&(i=t.get(["itemStyle","borderColorDoji"]));var n=t.getModel("itemStyle").getItemStyle(US);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var qS=YS,mv=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,r,i){var n=r.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",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}(wt);ae(mv,dv,!0);var JS=mv;function QS(a){!a||!O(a.series)||D(a.series,function(e){kt(e)&&e.type==="k"&&(e.type="candlestick")})}var t1=["itemStyle","borderColor"],e1=["itemStyle","borderColor0"],r1=["itemStyle","borderColorDoji"],a1=["itemStyle","color"],i1=["itemStyle","color0"],n1={seriesType:"candlestick",plan:Hn(),performRawSeries:!0,reset:function(a,e){function t(n,o){return o.get(n>0?a1:i1)}function r(n,o){return o.get(n===0?r1:n>0?t1:e1)}if(!e.isSeriesFiltered(a)){var i=a.pipelineContext.large;return!i&&{progress:function(n,o){for(var s;(s=n.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=r(u,l)||c.fill;var v=o.ensureUniqueItemVisual(s,"style");F(v,c)}}}}}},o1=n1,s1={seriesType:"candlestick",plan:Hn(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=l1(a,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=G(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],c=l[1],v=l[2],h=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?p:f};function f(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var S=m.get(s,y),x=m.get(u,y),b=m.get(c,y),w=m.get(v,y),_=m.get(h,y),A=Math.min(x,b),L=Math.max(x,b),T=k(A,S),C=k(L,S),M=k(w,S),P=k(_,S),I=[];N(I,C,0),N(I,T,1),I.push($(P),$(C),$(M),$(T));var E=g.getItemModel(y),R=!!E.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:pl(m,y,x,b,c,R),initBaseline:x>b?C[n]:T[n],ends:I,brushRect:H(w,_,S)})}function k(U,Q){var et=[];return et[i]=Q,et[n]=U,isNaN(Q)||isNaN(U)?[NaN,NaN]:e.dataToPoint(et)}function N(U,Q,et){var q=Q.slice(),it=Q.slice();q[i]=ii(q[i]+r/2,1,!1),it[i]=ii(it[i]-r/2,1,!0),et?U.push(q,it):U.push(it,q)}function H(U,Q,et){var q=k(U,et),it=k(Q,et);return q[i]-=r/2,it[i]-=r/2,{x:q[0],y:q[1],width:r,height:it[1]-q[1]}}function $(U){return U[i]=ii(U[i],1),U}}function p(d,g){for(var y=yf(d.count*4),m=0,S,x=[],b=[],w,_=g.getStore(),A=!!a.get(["itemStyle","borderColorDoji"]);(w=d.next())!=null;){var L=_.get(s,w),T=_.get(u,w),C=_.get(c,w),M=_.get(v,w),P=_.get(h,w);if(isNaN(L)||isNaN(M)||isNaN(P)){y[m++]=NaN,m+=3;continue}y[m++]=pl(_,w,T,C,c,A),x[i]=L,x[n]=M,S=e.dataToPoint(x,null,b),y[m++]=S?S[0]:NaN,y[m++]=S?S[1]:NaN,x[n]=P,S=e.dataToPoint(x,null,b),y[m++]=S?S[1]:NaN}g.setLayout("largePoints",y)}}};function pl(a,e,t,r,i,n){var o;return t>r?o=-1:t0?a.get(i,e-1)<=r?1:-1:1,o}function l1(a,e){var t=a.getBaseAxis(),r,i=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),n=B(It(a.get("barMaxWidth"),i),i),o=B(It(a.get("barMinWidth"),1),i),s=a.get("barWidth");return s!=null?B(s,i):Math.max(Math.min(i/2,n),o)}var u1=s1;function c1(a){a.registerChartView(qS),a.registerSeriesModel(JS),a.registerPreprocessor(QS),a.registerVisual(o1),a.registerLayout(u1)}function dl(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var v1=function(a){V(e,a);function e(t,r){var i=a.call(this)||this,n=new ju(t,r),o=new Z;return i.add(n),i.add(o),i.updateData(t,r),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(n)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var h=void 0;ut(v)?h=v(i):h=v,n.__t>0&&(h=-s*n.__t),this._animateSymbol(n,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,r,i,n,o){if(r>0){t.__t=0;var s=this,l=t.animate("",n).when(o?r*2:r,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return yr(t.__p1,t.__cp1)+yr(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,i){this.childAt(0).updateData(t,r,i),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Qu,c=Sf;s[0]=u(r[0],n[0],i[0],o),s[1]=u(r[1],n[1],i[1],o);var v=t.__t<1?c(r[0],n[0],i[0],o):c(i[0],n[0],r[0],1-o),h=t.__t<1?c(r[1],n[1],i[1],o):c(i[1],n[1],r[1],1-o);t.rotation=-Math.atan2(h,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(n[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;lr);l++);l=Math.min(l-1,o-2)}var c=(r-n[l])/(n[l+1]-n[l]),v=i[l],h=i[l+1];t.x=v[0]*(1-c)+c*h[0],t.y=v[1]*(1-c)+c*h[1];var f=t.__t<1?h[0]-v[0]:v[0]-h[0],p=t.__t<1?h[1]-v[1]:v[1]-h[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(Sv),b1=x1,w1=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),_1=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new w1},e.prototype.buildPath=function(t,r){var i=r.segs,n=r.curveness,o;if(r.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var f=(u+v)/2-(c-h)*n,p=(c+h)/2-(v-u)*n;t.quadraticCurveTo(f,p,v,h)}else t.lineTo(v,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var v=n[u++],h=n[u++],f=1;f0){var g=(v+p)/2-(h-d)*o,y=(h+d)/2-(p-v)*o;if(xf(v,h,g,y,p,d,s,t,r))return l}else if(No(v,h,p,d,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),T1=A1,D1={seriesType:"lines",plan:Hn(),reset:function(a){var e=a.coordinateSystem;if(!e){bf("The lines series must have a coordinate system.");return}var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(i,n){var o=[];if(r){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c0&&(c?console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var v=t.get("clip",!0)&&Wn(t.coordinateSystem,!1,t);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=bv.reset(t,r,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,r){var i=this._lineDraw,n=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return n&&l&&console.warn("Large lines not support effect"),(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new T1:new lo(o?n?b1:xv:n?Sv:so),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=t.getZr(),i=r.painter.getType()==="svg";!i&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(xt),C1=L1,I1=typeof Uint32Array=="undefined"?Array:Uint32Array,M1=typeof Float64Array=="undefined"?Array:Float64Array;function gl(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),a.data=G(e,function(t){var r=[t[0].coord,t[1].coord],i={coords:r};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),Vn([i,t[0],t[1]])}))}var P1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],gl(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(gl(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=en(this._flatCoords,r.flatCoords),this._flatCoordsOffset=en(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),i=r.option instanceof Array?r.option:r.getShallow("coords");if(!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,r){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;oi)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){{var i=Gn.get(t.coordinateSystem);if(!i)throw new Error("Unknown coordinate system "+t.coordinateSystem)}var n=new Gt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),n},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),zt("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(wt),E1=P1;function ea(a){return a instanceof Array||(a=[a,a]),a}var V1={seriesType:"lines",reset:function(a){var e=ea(a.get("symbol")),t=ea(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=ea(s.getShallow("symbol",!0)),u=ea(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?i:null}}},R1=V1;function k1(a){a.registerChartView(C1),a.registerSeriesModel(E1),a.registerLayout(bv),a.registerVisual(R1)}var N1=256,z1=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=zo.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,v=this.canvas,h=v.getContext("2d"),f=e.length;v.width=t,v.height=r;for(var p=0;p0){var M=o(S)?l:u;S>0&&(S=S*T+A),b[w++]=M[C],b[w++]=M[C+1],b[w++]=M[C+2],b[w++]=M[C+3]*S*256}else w+=4}return h.putImageData(x,0,0),v},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=zo.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var i=e.getContext("2d");return i.clearRect(0,0,r,r),i.shadowOffsetX=r,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,i=r[t]||(r[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},a}(),B1=z1;function G1(a,e,t){var r=a[1]-a[0];e=G(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var i=e.length,n=0;return function(o){var s;for(s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&r<=e[1]}}function yl(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var F1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n;if(r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):yl(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,i,n){var o=r.coordinateSystem;o&&(yl(o)?this.render(r,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Ya(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,i,n,o){var s=t.coordinateSystem,l=Xa(s,"cartesian2d"),u,c,v,h;if(l){var f=s.getAxis("x"),p=s.getAxis("y");{if(!(f.type==="category"&&p.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(f.onBand&&p.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}u=f.getBandWidth()+.5,c=p.getBandWidth()+.5,v=f.scale.getExtent(),h=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),b=Nt(t),w=t.getModel("emphasis"),_=w.get("focus"),A=w.get("blurScope"),L=w.get("disabled"),T=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],C=i;Cv[1]||Eh[1])continue;var R=s.dataToPoint([I,E]);M=new Mt({shape:{x:R[0]-u/2,y:R[1]-c/2,width:u,height:c},style:P})}else{if(isNaN(g.get(T[1],C)))continue;M=new Mt({z2:1,shape:s.dataToRect([g.get(T[0],C)]).contentShape,style:P})}if(g.hasItemOption){var k=g.getItemModel(C),N=k.getModel("emphasis");y=N.getModel("itemStyle").getItemStyle(),m=k.getModel(["blur","itemStyle"]).getItemStyle(),S=k.getModel(["select","itemStyle"]).getItemStyle(),x=k.get(["itemStyle","borderRadius"]),_=N.get("focus"),A=N.get("blurScope"),L=N.get("disabled"),b=Nt(k)}M.shape.r=x;var H=t.getRawValue(C),$="-";H&&H[2]!=null&&($=H[2]+""),jt(M,b,{labelFetcher:t,labelDataIndex:C,defaultOpacity:P.opacity,defaultText:$}),M.ensureState("emphasis").style=y,M.ensureState("blur").style=m,M.ensureState("select").style=S,St(M,_,A,L),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),d.add(M),g.setItemGraphicEl(C,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(t,r,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new B1;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var c=t.getViewRect().clone(),v=t.getRoamTransform();c.applyTransform(v);var h=Math.max(c.x,0),f=Math.max(c.y,0),p=Math.min(c.width+c.x,n.getWidth()),d=Math.min(c.height+c.y,n.getHeight()),g=p-h,y=d-f,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(m,function(_,A,L){var T=t.dataToPoint([_,A]);return T[0]-=h,T[1]-=f,T.push(L),T}),x=i.getExtent(),b=i.type==="visualMap.continuous"?O1(x,i.option.range):G1(x,i.getPieceList(),i.option.selected);u.update(S,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var w=new ce({style:{width:g,height:y,x:h,y:f,image:u.canvas},silent:!0});this.group.add(w)},e.type="heatmap",e}(xt),W1=F1,H1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return sr(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Gn.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(wt),$1=H1;function U1(a){a.registerChartView(W1),a.registerSeriesModel($1)}var Y1=["itemStyle","borderWidth"],ml=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Bi=new He,X1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),v=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:c,valueDim:ml[+c],categoryDim:ml[1-+c]};return o.diff(s).add(function(f){if(!!o.hasValue(f)){var p=xl(o,f),d=Sl(o,f,p,h),g=bl(o,h,d);o.setItemGraphicEl(f,g),n.add(g),_l(g,h,d)}}).update(function(f,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(f)){n.remove(d);return}var g=xl(o,f),y=Sl(o,f,g,h),m=Lv(o,y);d&&m!==d.__pictorialShapeStr&&(n.remove(d),o.setItemGraphicEl(f,null),d=null),d?tx(d,h,y):d=bl(o,h,y,!0),o.setItemGraphicEl(f,d),d.__pictorialSymbolMeta=y,n.add(d),_l(d,h,y)}).remove(function(f){var p=s.getItemGraphicEl(f);p&&wl(s,f,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,r){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){wl(n,lt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(xt);function Sl(a,e,t,r){var i=a.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,v=t.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:v?t:null,hoverScale:v&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};Z1(t,n,i,r,h),j1(a,e,i,n,o,h.boundingLength,h.pxSign,c,r,h),K1(t,h.symbolScale,u,r,h);var f=h.symbolSize,p=Hr(t.get("symbolOffset"),f);return q1(t,f,i,n,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,r,h),h}function Z1(a,e,t,r,i){var n=r.valueDim,o=a.get("symbolBoundingData"),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),c;if(O(o)){var v=[Gi(s,o[0])-l,Gi(s,o[1])-l];v[1]0?1:-1}function Gi(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function j1(a,e,t,r,i,n,o,s,l,u){var c=l.valueDim,v=l.categoryDim,h=Math.abs(t[v.wh]),f=a.getItemVisual(e,"symbolSize"),p;O(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[v.index]=B(p[v.index],h),p[c.index]=B(p[c.index],r?h:Math.abs(n)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[c.index]*=(l.isHorizontal?-1:1)*o}function K1(a,e,t,r,i){var n=a.get(Y1)||0;n&&(Bi.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Bi.updateTransform(),n/=Bi.getLineScale(),n*=e[r.valueDim.index]),i.valueLineWidth=n||0}function q1(a,e,t,r,i,n,o,s,l,u,c,v){var h=c.categoryDim,f=c.valueDim,p=v.pxSign,d=Math.max(e[f.index]+s,0),g=d;if(r){var y=Math.abs(l),m=Rt(a.get("symbolMargin"),"15%")+"",S=!1;m.lastIndexOf("!")===m.length-1&&(S=!0,m=m.slice(0,m.length-1));var x=B(m,e[f.index]),b=Math.max(d+x*2,0),w=S?0:x*2,_=wf(r),A=_?r:Al((y+w)/b),L=y-A*d;x=L/2/(S?A:Math.max(A-1,1)),b=d+x*2,w=S?0:x*2,!_&&r!=="fixed"&&(A=u?Al((Math.abs(u)+w)/b):0),g=A*b-w,v.repeatTimes=A,v.symbolMargin=x}var T=p*(g/2),C=v.pathPosition=[];C[h.index]=t[h.wh]/2,C[f.index]=o==="start"?T:o==="end"?l-T:l/2,n&&(C[0]+=n[0],C[1]+=n[1]);var M=v.bundlePosition=[];M[h.index]=t[h.xy],M[f.index]=t[f.xy];var P=v.barRectShape=F({},t);P[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(C[f.index]+T)),P[h.wh]=t[h.wh];var I=v.clipShape={};I[h.xy]=-t[h.xy],I[h.wh]=c.ecSize[h.wh],I[f.xy]=0,I[f.wh]=t[f.wh]}function wv(a){var e=a.symbolPatternSize,t=Ot(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function _v(a,e,t,r){var i=a.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,v=n[e.valueDim.index]+o+t.symbolMargin*2;for(uo(a,function(d){d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,c0:y<0)&&(m=u-1-d),g[l.index]=v*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function Av(a,e,t,r){var i=a.__pictorialBundle,n=a.__pictorialMainPath;n?rr(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(n=a.__pictorialMainPath=wv(t),i.add(n),rr(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,r))}function Tv(a,e,t){var r=F({},e.barRectShape),i=a.__pictorialBarRect;i?rr(i,null,{shape:r},e,t):(i=a.__pictorialBarRect=new Mt({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,a.add(i))}function Dv(a,e,t,r){if(t.symbolClip){var i=a.__pictorialClipPath,n=F({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)pt(i,{shape:n},s,l);else{n[o.wh]=0,i=new Mt({shape:n}),a.__pictorialBundle.setClipPath(i),a.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],Ba[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function xl(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=J1,t.isAnimationEnabled=Q1,t}function J1(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function Q1(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function bl(a,e,t,r){var i=new Z,n=new Z;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?_v(i,e,t):Av(i,e,t),Tv(i,t,r),Dv(i,e,t,r),i.__pictorialShapeStr=Lv(a,t),i.__pictorialSymbolMeta=t,i}function tx(a,e,t){var r=t.animationModel,i=t.dataIndex,n=a.__pictorialBundle;pt(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,i),t.symbolRepeat?_v(a,e,t,!0):Av(a,e,t,!0),Tv(a,t,!0),Dv(a,e,t,!0)}function wl(a,e,t,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var n=[];uo(r,function(o){n.push(o)}),r.__pictorialMainPath&&n.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),D(n,function(o){fa(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function Lv(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function uo(a,e,t){D(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function rr(a,e,t,r,i,n){e&&a.attr(e),r.symbolClip&&!i?t&&a.attr(t):t&&Ba[i?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,n)}function _l(a,e,t){var r=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=n.get("focus"),v=n.get("blurScope"),h=n.get("scale");uo(a,function(d){if(d instanceof ce){var g=d.style;d.useStyle(F({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,h&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=a.__pictorialBarRect;jt(p,Nt(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:ln(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),St(a,c,v,n.get("disabled"))}function Al(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}var ex=X1,rx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,a.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Za(Bo.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Bo),ax=rx;function ix(a){a.registerChartView(ex),a.registerSeriesModel(ax),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,ct(Af,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,_f("pictorialBar"))}var nx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),c=u.rect,v=u.boundaryGap;s.x=0,s.y=c.y+v[0];function h(g){return g.name}var f=new Ua(this._layersSeries||[],l,h,h),p=[];f.add(K(d,this,"add")).update(K(d,this,"update")).remove(K(d,this,"remove")).execute();function d(g,y,m){var S=o._layers;if(g==="remove"){s.remove(S[y]);return}for(var x=[],b=[],w,_=l[y].indices,A=0;A<_.length;A++){var L=n.getItemLayout(_[A]),T=L.x,C=L.y0,M=L.y;x.push(T,C),b.push(T,C+M),w=n.getItemVisual(_[A],"style")}var P,I=n.getItemLayout(_[0]),E=t.getModel("label"),R=E.get("margin"),k=t.getModel("emphasis");if(g==="add"){var N=p[y]=new Z;P=new Tf({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),N.add(P),s.add(N),t.isAnimationEnabled()&&P.setClipPath(ox(P.getBoundingRect(),t,function(){P.removeClipPath()}))}else{var N=S[m];P=N.childAt(0),s.add(N),p[y]=N,pt(P,{shape:{points:x,stackedOnPoints:b}},t),_e(P)}jt(P,Nt(t),{labelDataIndex:_[A-1],defaultText:n.getName(_[A-1]),inheritColor:w.fill},{normal:{verticalAlign:"middle"}}),P.setTextConfig({position:null,local:!0});var H=P.getTextContent();H&&(H.x=I.x-R,H.y=I.y0+I.y/2),P.useStyle(w),n.setItemGraphicEl(y,P),Ft(P,t),St(P,k.get("focus"),k.get("blurScope"),k.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(xt);function ox(a,e,t){var r=new Mt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return re(r,{shape:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}var sx=nx,Oi=2,lx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ga(K(this.getData,this),K(this.getRawData,this))},e.prototype.fixData=function(t){var r=t.length,i={},n=on(t,function(h){return i.hasOwnProperty(h[0]+"")||(i[h[0]+""]=-1),h[2]}),o=[];n.buckets.each(function(h,f){o.push({name:f,dataList:h})});for(var s=o.length,l=0;ln&&(n=s),r.push(s)}for(var u=0;un&&(n=v)}return{y0:i,max:n}}function hx(a){a.registerChartView(sx),a.registerSeriesModel(ux),a.registerLayout(cx),a.registerProcessor(Fa("themeRiver"))}var fx=2,px=4,dx=function(a){V(e,a);function e(t,r,i,n){var o=a.call(this)||this;o.z2=fx,o.textConfig={inside:!0},lt(o).seriesIndex=r.seriesIndex;var s=new ft({z2:px,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,i,n),o}return e.prototype.updateData=function(t,r,i,n,o){this.node=r,r.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;lt(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),c=r.getLayout(),v=F({},c);v.label=null;var h=r.getVisual("style");h.lineJoin="bevel";var f=r.getVisual("decal");f&&(h.decal=En(f,o));var p=Go(l.getModel("itemStyle"),v,!0);F(v,p),D(nn,function(m){var S=s.ensureState(m),x=l.getModel([m,"itemStyle"]);S.style=x.getItemStyle();var b=Go(x,v);b&&(S.shape=b)}),t?(s.setShape(v),s.shape.r=c.r0,re(s,{shape:{r:c.r}},i,r.dataIndex)):(pt(s,{shape:v},i),_e(s)),s.useStyle(h),this._updateLabel(i);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?r.getAncestorsIndices():g==="descendant"?r.getDescendantIndices():g;St(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),v=this,h=v.getTextContent(),f=this.node.dataIndex,p=n.get("minAngle")/180*Math.PI,d=n.get("show")&&!(p!=null&&Math.abs(s)Math.PI/2?"right":"left"):!M||M==="center"?(s===2*Math.PI&&o.r0===0?T=0:T=(o.r+o.r0)/2,M="center"):M==="left"?(T=o.r0+C,l>Math.PI/2&&(M="right")):M==="right"&&(T=o.r-C,l>Math.PI/2&&(M="left")),x.style.align=M,x.style.verticalAlign=g(m,"verticalAlign")||"middle",x.x=T*u+o.cx,x.y=T*c+o.cy;var P=g(m,"rotate"),I=0;P==="radial"?(I=Oo(-l),I>Math.PI/2&&IMath.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):ue(P)&&(I=P*Math.PI/180),x.rotation=Oo(I)});function g(y,m){var S=y.get(m);return S==null?n.get(m):S}h.dirtyStyle()},e}(Cr),Dl=dx,wn="sunburstRootToNode",Ll="sunburstHighlight",gx="sunburstUnhighlight";function yx(a){a.registerAction({type:wn,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(i,n){var o=Er(e,[wn],i);if(o){var s=i.getViewRoot();s&&(e.direction=eo(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),a.registerAction({type:Ll,update:"none"},function(e,t,r){e=F({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n){var o=Er(e,[Ll],n);o&&(e.dataIndex=o.node.dataIndex)}Fo("sunburstHighlight","highlight"),r.dispatchAction(F(e,{type:"highlight"}))}),a.registerAction({type:gx,update:"updateView"},function(e,t,r){e=F({},e),Fo("sunburstUnhighlight","downplay"),r.dispatchAction(F(e,{type:"downplay"}))})}var mx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=r;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,v=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(m){h.push(m)});var f=this._oldChildren||[];p(h,f),y(l,u),this._initEvents(),this._oldChildren=h;function p(m,S){if(m.length===0&&S.length===0)return;new Ua(S,m,x,x).add(b).update(b).remove(ct(b,null)).execute();function x(w){return w.getId()}function b(w,_){var A=w==null?null:m[w],L=_==null?null:S[_];d(A,L)}}function d(m,S){if(!v&&m&&!m.getValue()&&(m=null),m!==l&&S!==l){if(S&&S.piece)m?(S.piece.updateData(!1,m,t,r,i),s.setItemGraphicEl(m.dataIndex,S.piece)):g(S);else if(m){var x=new Dl(m,t,r,i);c.add(x),s.setItemGraphicEl(m.dataIndex,x)}}}function g(m){!m||m.piece&&(c.remove(m.piece),m.piece=null)}function y(m,S){S.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,r,i):(o.virtualPiece=new Dl(m,t,r,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(r){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===r.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Ju(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:wn,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var i=r.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(xt),Sx=mx,xx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Cv(i);var n=this._levelModels=G(t.levels||[],function(l){return new Kt(l,this,r)},this),o=to.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var v=o.getNodeByDataIndex(c),h=n[v.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Ja(i,this),r},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Yc(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}(wt);function Cv(a){var e=0;D(a.children,function(r){Cv(r);var i=r.value;O(i)&&(i=i[0]),e+=i});var t=a.value;O(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),O(a.value)?a.value[0]=t:a.value=t}var bx=xx,Cl=Math.PI/180;function wx(a,e,t){e.eachSeriesByType(a,function(r){var i=r.get("center"),n=r.get("radius");O(n)||(n=[0,n]),O(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=B(i[0],o),c=B(i[1],s),v=B(n[0],l/2),h=B(n[1],l/2),f=-r.get("startAngle")*Cl,p=r.get("minAngle")*Cl,d=r.getData().tree.root,g=r.getViewRoot(),y=g.depth,m=r.get("sort");m!=null&&Iv(g,m);var S=0;D(g.children,function(R){!isNaN(R.getValue())&&S++});var x=g.getValue(),b=Math.PI/(x||S)*2,w=g.depth>0,_=g.height-(w?-1:1),A=(h-v)/(_||1),L=r.get("clockwise"),T=r.get("stillShowZeroSum"),C=L?1:-1,M=function(R,k){if(!!R){var N=k;if(R!==d){var H=R.getValue(),$=x===0&&T?b:H*b;$1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&tt(s)&&(s=Lf(s,(r.depth-1)/(n-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var i=r.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");F(u,l)})})}function Tx(a){a.registerChartView(Sx),a.registerSeriesModel(bx),a.registerLayout(ct(wx,"sunburst")),a.registerProcessor(ct(Fa,"sunburst")),a.registerVisual(Ax),yx(a)}var Il={color:"fill",borderColor:"stroke"},Dx={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},fe=Pt(),Lx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,r){return sr(null,this)},e.prototype.getDataParams=function(t,r,i){var n=a.prototype.getDataParams.call(this,t,r);return i&&(n.info=fe(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(wt),Cx=Lx;function Ix(a,e){return e=e||[0,0],G(["x","y"],function(t,r){var i=this.getAxis(t),n=e[r],o=a[r]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function Mx(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:K(Ix,a)}}}function Px(a,e){return e=e||[0,0],G([0,1],function(t){var r=e[t],i=a[t]/2,n=[],o=[];return n[t]=r-i,o[t]=r+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function Ex(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:K(Px,a)}}}function Vx(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,i=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-i)-t.dataToCoord(r+i))}function Rx(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:K(Vx,a)}}}function kx(a,e){return e=e||[0,0],G(["Radius","Angle"],function(t,r){var i="get"+t+"Axis",n=this[i](),o=e[r],s=a[r]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function Nx(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=a.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:K(kx,a)}}}function zx(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,i){return a.dataToPoint(r,i)}}}}var Ml={};function Mv(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||z(a,"text")))}function Pv(a,e,t){var r=a,i,n,o;if(e==="text")o=r;else{o={},z(r,"text")&&(o.text=r.text),z(r,"rich")&&(o.rich=r.rich),z(r,"textFill")&&(o.fill=r.textFill),z(r,"textStroke")&&(o.stroke=r.textStroke),z(r,"fontFamily")&&(o.fontFamily=r.fontFamily),z(r,"fontSize")&&(o.fontSize=r.fontSize),z(r,"fontStyle")&&(o.fontStyle=r.fontStyle),z(r,"fontWeight")&&(o.fontWeight=r.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=z(r,"textPosition");t?i.position=s?r.textPosition:"inside":s&&(i.position=r.textPosition),z(r,"textPosition")&&(i.position=r.textPosition),z(r,"textOffset")&&(i.offset=r.textOffset),z(r,"textRotation")&&(i.rotation=r.textRotation),z(r,"textDistance")&&(i.distance=r.textDistance)}return Pl(o,a),D(o.rich,function(l){Pl(l,l)}),{textConfig:i,textContent:n}}function Pl(a,e){!e||(e.font=e.textFont||e.font,z(e,"textStrokeWidth")&&(a.lineWidth=e.textStrokeWidth),z(e,"textAlign")&&(a.align=e.textAlign),z(e,"textVerticalAlign")&&(a.verticalAlign=e.textVerticalAlign),z(e,"textLineHeight")&&(a.lineHeight=e.textLineHeight),z(e,"textWidth")&&(a.width=e.textWidth),z(e,"textHeight")&&(a.height=e.textHeight),z(e,"textBackgroundColor")&&(a.backgroundColor=e.textBackgroundColor),z(e,"textPadding")&&(a.padding=e.textPadding),z(e,"textBorderColor")&&(a.borderColor=e.textBorderColor),z(e,"textBorderWidth")&&(a.borderWidth=e.textBorderWidth),z(e,"textBorderRadius")&&(a.borderRadius=e.textBorderRadius),z(e,"textBoxShadowColor")&&(a.shadowColor=e.textBoxShadowColor),z(e,"textBoxShadowBlur")&&(a.shadowBlur=e.textBoxShadowBlur),z(e,"textBoxShadowOffsetX")&&(a.shadowOffsetX=e.textBoxShadowOffsetX),z(e,"textBoxShadowOffsetY")&&(a.shadowOffsetY=e.textBoxShadowOffsetY))}function El(a,e,t){var r=a;r.textPosition=r.textPosition||t.position||"inside",t.offset!=null&&(r.textOffset=t.offset),t.rotation!=null&&(r.textRotation=t.rotation),t.distance!=null&&(r.textDistance=t.distance);var i=r.textPosition.indexOf("inside")>=0,n=a.fill||"#000";Vl(r,e);var o=r.textFill==null;return i?o&&(r.textFill=t.insideFill||"#fff",!r.textStroke&&t.insideStroke&&(r.textStroke=t.insideStroke),!r.textStroke&&(r.textStroke=n),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(o&&(r.textFill=a.fill||t.outsideFill||"#000"),!r.textStroke&&t.outsideStroke&&(r.textStroke=t.outsideStroke)),r.text=e.text,r.rich=e.rich,D(e.rich,function(s){Vl(s,s)}),r}function Vl(a,e){!e||(z(e,"fill")&&(a.textFill=e.fill),z(e,"stroke")&&(a.textStroke=e.fill),z(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),z(e,"font")&&(a.font=e.font),z(e,"fontStyle")&&(a.fontStyle=e.fontStyle),z(e,"fontWeight")&&(a.fontWeight=e.fontWeight),z(e,"fontSize")&&(a.fontSize=e.fontSize),z(e,"fontFamily")&&(a.fontFamily=e.fontFamily),z(e,"align")&&(a.textAlign=e.align),z(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),z(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),z(e,"width")&&(a.textWidth=e.width),z(e,"height")&&(a.textHeight=e.height),z(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),z(e,"padding")&&(a.textPadding=e.padding),z(e,"borderColor")&&(a.textBorderColor=e.borderColor),z(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),z(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),z(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),z(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),z(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),z(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),z(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),z(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),z(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),z(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}function Rl(a,e){{var t=a+"^_^"+e;Ml[t]||(console.warn('[ECharts] DEPRECATED: "'+a+'" has been deprecated. '+e),Ml[t]=!0)}}var Ev={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},kl=dt(Ev),Ta=Yu(Ir,function(a,e){return a[e]=1,a},{}),Nl=Ir.join(", "),Da=["","style","shape","extra"],or=Pt();function co(a,e,t,r,i){var n=a+"Animation",o=nc(a,r,i)||{},s=or(e).userDuring;return o.duration>0&&(o.during=s?K(Wx,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),F(o,t[n]),o}function ca(a,e,t,r){r=r||{};var i=r.dataIndex,n=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=or(a),u=e.style;l.userDuring=e.during;var c={},v={};if($x(a,e,v),Bl("shape",e,v),Bl("extra",e,v),!n&&s&&(Hx(a,e,c),zl("shape",a,e,c),zl("extra",a,e,c),Ux(a,e,u,c)),v.style=u,Bx(a,v,o),Ox(a,e),s)if(n){var h={};D(Da,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(h[p]=h[p]||{}),F(p?h[p]:h,d.enterFrom))});var f=co("enter",a,e,t,i);f.duration>0&&a.animateFrom(h,f)}else Gx(a,e,i||0,t,c);Vv(a,e),u?a.dirty():a.markRedraw()}function Vv(a,e){for(var t=or(a).leaveToProps,r=0;r0&&a.animateFrom(i,n)}}function Ox(a,e){z(e,"silent")&&(a.silent=e.silent),z(e,"ignore")&&(a.ignore=e.ignore),a instanceof ar&&z(e,"invisible")&&(a.invisible=e.invisible),a instanceof Jt&&z(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var oe={},Fx={setTransform:function(a,e){return yt(z(Ta,a),"Only "+Nl+" available in `setTransform`."),oe.el[a]=e,this},getTransform:function(a){return yt(z(Ta,a),"Only "+Nl+" available in `getTransform`."),oe.el[a]},setShape:function(a,e){qe(a);var t=oe.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){qe(a);var e=oe.el.shape;if(e)return e[a]},setStyle:function(a,e){qe(a);var t=oe.el,r=t.style;return r&&(tc(e)&&nr("style."+a+" must not be assigned with NaN."),r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){qe(a);var e=oe.el.style;if(e)return e[a]},setExtra:function(a,e){qe(a);var t=oe.el.extra||(oe.el.extra={});return t[a]=e,this},getExtra:function(a){qe(a);var e=oe.el.extra;if(e)return e[a]}};function qe(a){if(a==="transition"||a==="enterFrom"||a==="leaveTo")throw new Error('key must not be "'+a+'"')}function Wx(){var a=this,e=a.el;if(!!e){var t=or(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}oe.el=e,r(Fx)}}function zl(a,e,t,r){var i=t[a];if(!!i){var n=e[a],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=r[a]={}),Oe(l))F(o,n);else for(var u=ge(l),c=0;c=0){!o&&(o=r[a]={});for(var f=dt(n),c=0;c=0)){var h=a.getAnimationStyleProps(),f=h?h.style:null;if(f){!n&&(n=r.style={});for(var p=dt(t),u=0;u=1&&(u=!0),!!h){var f=dt(h);if(s||(f=qt(f,function(g){return Ht(Xx,g)<0})),!!f.length){l||(l=a.animate(s,e.loop,!0),l.scope="keyframe");for(var p=0;p=0?e.getStore().get(k,E):void 0}var N=e.get(R.name,E),H=R&&R.ordinalMeta;return H?H.categories[N]:N}function w(I,E){Rl("api.style","Please write literal style directly instead."),E==null&&(E=u);var R=e.getItemVisual(E,"style"),k=R&&R.fill,N=R&&R.opacity,H=m(E,xe).getItemStyle();k!=null&&(H.fill=k),N!=null&&(H.opacity=N);var $={inheritColor:tt(k)?k:"#000"},U=S(E,xe),Q=gt(U,null,$,!1,!0);Q.text=U.getShallow("show")?It(a.getFormattedLabel(E,xe),ln(e,E)):null;var et=Wo(U,$,!1);return L(I,H),H=El(H,Q,et),I&&A(H,I),H.legacy=!0,H}function _(I,E){Rl("api.styleEmphasis","Please write literal style directly instead."),E==null&&(E=u);var R=m(E,pe).getItemStyle(),k=S(E,pe),N=gt(k,null,null,!0,!0);N.text=k.getShallow("show")?Fr(a.getFormattedLabel(E,pe),a.getFormattedLabel(E,xe),ln(e,E)):null;var H=Wo(k,null,!0);return L(I,R),R=El(R,N,H),I&&A(R,I),R.legacy=!0,R}function A(I,E){for(var R in E)z(E,R)&&(I[R]=E[R])}function L(I,E){I&&(I.textFill&&(E.textFill=I.textFill),I.textPosition&&(E.textPosition=I.textPosition))}function T(I,E){if(E==null&&(E=u),z(Il,I)){var R=e.getItemVisual(E,"style");return R?R[Il[I]]:null}if(z(Dx,I))return e.getItemVisual(E,I)}function C(I){if(n.type==="cartesian2d"){var E=n.getBaseAxis();return Mf(st({axis:E},I))}}function M(){return t.getCurrentSeriesIndices()}function P(I){return Pf(I,t)}}function eb(a){var e={};return D(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var i=r.coordDim,n=e[i]=e[i]||[];n[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function Hi(a,e,t,r,i,n,o){if(!r){n.remove(e);return}var s=go(a,e,t,r,i,n);return s&&o.setItemGraphicEl(t,s),s&&St(s,r.focus,r.blurScope,r.emphasisDisabled),s}function go(a,e,t,r,i,n){yt(r,"should not have an null/undefined element setting");var o=-1,s=e;e&&Bv(e,r,i)&&(o=Ht(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=fo(r),s&&Kx(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Yt.normal.cfg=Yt.normal.conOpt=Yt.emphasis.cfg=Yt.emphasis.conOpt=Yt.blur.cfg=Yt.blur.conOpt=Yt.select.cfg=Yt.select.conOpt=null,Yt.isLegacy=!1,ab(u,t,r,i,l,Yt),rb(u,t,r,i,l),po(a,u,t,r,Yt,i,l),z(r,"info")&&(fe(u).info=r.info);for(var c=0;c=0?n.replaceAt(u,o):n.add(u),u}function Bv(a,e,t){var r=fe(a),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&lb(n)&&Gv(n)!==r.customPathData||i==="image"&&z(o,"image")&&o.image!==r.customImagePath}function rb(a,e,t,r,i){var n=t.clipPath;if(n===!1)a&&a.getClipPath()&&a.removeClipPath();else if(n){var o=a.getClipPath();o&&Bv(o,n,r)&&(o=null),o||(o=fo(n),yt(Ca(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),a.setClipPath(o)),po(null,o,e,n,null,r,i)}}function ab(a,e,t,r,i,n){if(!a.isGroup){Fl(t,null,n),Fl(t,pe,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=a.getTextContent();if(o===!1)c&&a.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=fo(o),a.setTextContent(c)),po(null,c,e,o,null,r,i);for(var v=o&&o.style,h=0;h=c;f--){var p=e.childAt(f);nb(e,p,i)}}}function nb(a,e,t){e&&ti(e,fe(a).option,t)}function ob(a){new Ua(a.oldChildren,a.newChildren,Wl,Wl,a).add(Hl).update(Hl).remove(sb).execute()}function Wl(a,e){var t=a&&a.name;return t!=null?t:jx+e}function Hl(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,i=e!=null?t.oldChildren[e]:null;go(t.api,i,t.dataIndex,r,t.seriesModel,t.group)}function sb(a){var e=this.context,t=e.oldChildren[a];t&&ti(t,fe(t).option,e.seriesModel)}function Gv(a){return a&&(a.pathData||a.d)}function lb(a){return a&&(z(a,"pathData")||z(a,"d"))}function ub(a){a.registerChartView(Jx),a.registerSeriesModel(Cx)}var cb=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),v=s.dataToCoord(r),h=n.get("type");if(h&&h!=="none"){var f=sc(n),p=hb[h](s,l,v,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var d=n.get(["label","margin"]),g=vb(r,i,n,l,d);Vf(t,i,n,o,g)},e}(lc);function vb(a,e,t,r,i){var n=e.axis,o=n.dataToCoord(a),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,c,v;if(n.dim==="radius"){var h=lr();Wa(h,h,s),$e(h,h,[r.cx,r.cy]),u=er([o,-i],h);var f=e.getModel("axisLabel").get("rotate")||0,p=We.innerTextLayout(s,f*Math.PI/180,-1);c=p.textAlign,v=p.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+i,o]);var g=r.cx,y=r.cy;c=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",v=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:v}}var hb={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:uc(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(a,e,t,r){var i=Math.max(1,a.getBandWidth()),n=Math.PI/180;return a.dim==="angle"?{type:"Sector",shape:Ho(e.cx,e.cy,r[0],r[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:Ho(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},fb=cb,pb=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(r=n)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}($t),db=pb,mo=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ur).models[0]},e.type="polarAxis",e}($t);ae(mo,Oa);var gb=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(mo),yb=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(mo),So=function(a){V(e,a);function e(t,r){return a.call(this,"radius",t,r)||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e}(ve);So.prototype.dataToRadius=ve.prototype.dataToCoord;So.prototype.radiusToData=ve.prototype.coordToData;var mb=So,Sb=Pt(),xo=function(a){V(e,a);function e(t,r){return a.call(this,"angle",t,r||[0,360])||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,r=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=Rf(s==null?"":s+"",r.getFont(),"center","top"),v=Math.max(c.height,7),h=v/u;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),p=Sb(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-f)<=1&&Math.abs(g-o)<=1&&d>f?f=d:(p.lastTickCount=o,p.lastAutoInterval=f),f},e}(ve);xo.prototype.dataToAngle=ve.prototype.dataToCoord;xo.prototype.angleToData=ve.prototype.coordToData;var xb=xo,Ov=["radius","angle"],bb=function(){function a(e){this.dimensions=Ov,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new mb,this._angleAxis=new xb,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return a.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},a.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},a.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},a.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},a.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,i=this._radiusAxis;return r.scale.type===e&&t.push(r),i.scale.type===e&&t.push(i),t},a.prototype.getAngleAxis=function(){return this._angleAxis},a.prototype.getRadiusAxis=function(){return this._radiusAxis},a.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},a.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},a.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},a.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},a.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},a.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+r*r);t/=l,r/=l;for(var u=Math.atan2(-r,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,i=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[i,n]},a.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,v=this.r,h=this.r0;return c<=v*v&&c>=h*h}}},a.prototype.convertToPixel=function(e,t,r){var i=$l(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=$l(t);return i===this?this.pointToData(r):null},a}();function $l(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var wb=bb;function _b(a,e,t){var r=e.get("center"),i=t.getWidth(),n=t.getHeight();a.cx=B(r[0],i),a.cy=B(r[1],n);var o=a.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:O(l)||(l=[0,l]);var u=[B(l[0],s),B(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function Ab(a,e){var t=this,r=t.getAngleAxis(),i=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),a.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();D($o(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),D($o(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),da(r.scale,r.model),da(i.scale,i.model),r.type==="category"&&!r.onBand){var n=r.getExtent(),o=360/r.scale.count();r.inverse?n[1]+=o:n[1]-=o,r.setExtent(n[0],n[1])}}function Tb(a){return a.mainType==="angleAxis"}function Ul(a,e){if(a.type=e.get("type"),a.scale=On(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),Tb(e)){a.inverse=a.inverse!==e.get("clockwise");var t=e.get("startAngle");a.setExtent(t,t+(a.inverse?-360:360))}e.axis=a,a.model=e}var Db={dimensions:Ov,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,i){var n=new wb(i+"");n.update=Ab;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");Ul(o,l),Ul(s,u),_b(n,r,e),t.push(n),r.coordinateSystem=n,n.model=r}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var i=r.getReferringComponents("polar",ur).models[0];if(!i)throw new Error('Polar "'+Rt(r.get("polarIndex"),r.get("polarId"),0)+'" not found');r.coordinateSystem=i.coordinateSystem}}),t}},Lb=Db,Cb=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function ra(a,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=a.coordToPoint([e[0],t]),i=a.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function aa(a){var e=a.getRadiusAxis();return e.inverse?0:1}function Yl(a){var e=a[0],t=a[a.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&a.pop()}var Ib=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=G(i.getViewLabels(),function(c){c=vt(c);var v=i.scale,h=v.type==="ordinal"?v.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});Yl(u),Yl(s),D(Cb,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Mb[c](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}($r),Mb={axisLine:function(a,e,t,r,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=aa(t),l=s?0:1,u;n[l]===0?u=new He({shape:{cx:t.cx,cy:t.cy,r:n[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Fu({shape:{cx:t.cx,cy:t.cy,r:n[s],r0:n[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,a.add(u)},axisTick:function(a,e,t,r,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[aa(t)],u=G(r,function(c){return new ee({shape:ra(t,[l,l+s],c.coord)})});a.add(te(u,{style:st(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(a,e,t,r,i,n){if(!!i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[aa(t)],c=[],v=0;vy?"left":"right",x=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];kt(b)&&b.textStyle&&(f=new Kt(b.textStyle,l,l.ecModel))}var w=new ft({silent:We.isLabelSilent(e),style:gt(f,{x:g[0],y:g[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:S,verticalAlign:x})});if(a.add(w),c){var _=We.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=v.rawLabel,lt(w).eventData=_}},this)},splitLine:function(a,e,t,r,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],v=0;v=0?"p":"n",P=_;b&&(r[c][C]||(r[c][C]={p:_,n:_}),P=r[c][C][M]);var I=void 0,E=void 0,R=void 0,k=void 0;if(p.dim==="radius"){var N=p.dataToCoord(T)-_,H=l.dataToCoord(C);Math.abs(N)=k})}}})}function Gb(a){var e={};D(a,function(r,i){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Wv(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),v=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=v.stacks;e[l]=v;var f=Fv(r);h[f]||v.autoWidthCount++,h[f]=h[f]||{width:0,maxWidth:0};var p=B(r.get("barWidth"),c),d=B(r.get("barMaxWidth"),c),g=r.get("barGap"),y=r.get("barCategoryGap");p&&!h[f].width&&(p=Math.min(v.remainedWidth,p),h[f].width=p,v.remainedWidth-=p),d&&(h[f].maxWidth=d),g!=null&&(v.gap=g),y!=null&&(v.categoryGap=y)});var t={};return D(e,function(r,i){t[i]={};var n=r.stacks,o=r.bandWidth,s=B(r.categoryGap,o),l=B(r.gap,1),u=r.remainedWidth,c=r.autoWidthCount,v=(u-s)/(c+(c-1)*l);v=Math.max(v,0),D(n,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),i=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[n]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-n]=n===0?r.y+r.height/2:r.x+r.width/2,i},a.prototype.convertToPixel=function(e,t,r){var i=Xl(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=Xl(t);return i===this?this.pointToData(r):null},a}();function Xl(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Jb(a,e){var t=[];return a.eachComponent("singleAxis",function(r,i){var n=new qb(r,a,e);n.name="single_"+i,n.resize(r,e),r.coordinateSystem=n,t.push(n)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var i=r.getReferringComponents("singleAxis",ur).models[0];r.coordinateSystem=i&&i.coordinateSystem}}),t}var Qb={create:Jb,dimensions:$v},tw=Qb,Zl=["x","y"],ew=["width","height"],rw=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.coordinateSystem,u=Ui(l,1-Ma(s)),c=l.dataToPoint(r)[0],v=n.get("type");if(v&&v!=="none"){var h=sc(n),f=aw[v](s,c,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=An(i);Bf(r,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=An(r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Gf(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.coordinateSystem,l=Ma(o),u=Ui(s,l),c=[t.x,t.y];c[l]+=r[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var v=Ui(s,1-l),h=(v[1]+v[0])/2,f=[h,h];return f[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(lc),aw={line:function(a,e,t){var r=uc([e,t[0]],[e,t[1]],Ma(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:Of([e-r/2,t[0]],[r,i],Ma(a))}}};function Ma(a){return a.isHorizontal()?0:1}function Ui(a,e){var t=a.getRect();return[t[Zl[e]],t[Zl[e]]+t[ew[e]]]}var iw=rw,nw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Qt);function ow(a){j($n),$r.registerAxisPointerClass("SingleAxisPointer",iw),a.registerComponentView(nw),a.registerComponentView(Zb),a.registerComponentModel($i),ga(a,"single",$i,$i.defaultOption),a.registerCoordinateSystem("single",tw)}var sw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var n=Ff(t);a.prototype.init.apply(this,arguments),jl(t,n)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),jl(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}($t);function jl(a,e){var t=a.cellSize,r;O(t)?r=t:r=a.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var i=G([0,1],function(n){return Wf(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});vc(a,e,{type:"box",ignoreSize:i})}var lw=sw,uw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,r,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=r.start.time;u<=r.end.time;u=n.getNextNDay(u,1).time){var c=n.dataToRect([u],!1).tl,v=new Mt({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(v)}},e.prototype._renderLines=function(t,r,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=r.start,h=0;v.time<=r.end.time;h++){p(v.formatedDate),h===0&&(v=s.getDateInfo(r.start.y+"-"+r.start.m));var f=v.date;f.setMonth(f.getMonth()+1),v=s.getDateInfo(f)}p(s.getNextNDay(r.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,n)},e.prototype._getEdgesPoints=function(t,r,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-r/2,n[1][o]=n[1][o]+r/2,n},e.prototype._drawSplitline=function(t,r,i){var n=new Le({z2:20,shape:{points:t},style:r});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,r,i){for(var n=t.coordinateSystem,o=n.getDateInfo(r),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),c=n.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return tt(t)&&t?Hf(t,r):ut(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,i,n,o){var s=r[0],l=r[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(n==="left"||n==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,i,n){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,f={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],v],right:[u[h][0],v]},p=r.start.y;+r.end.y>+r.start.y&&(p=p+"-"+r.end.y);var d=o.get("formatter"),g={start:r.start.y,end:r.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new ft({z2:30,style:gt(o,{text:y})});m.attr(this._yearTextPositionControl(m,f[l],i,l,s)),n.add(m)}},e.prototype._monthTextPositionControl=function(t,r,i,n,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,r&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),n==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,i,n){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||tt(s))&&(s&&(r=Uo(s)||r),s=r.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,f=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",d=0;d=i.start.time&&r.times.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var i=Math.floor(t[1].time/Yi)-Math.floor(t[0].time/Yi)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),v=r?-c+1:c-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:v,fweek:t[0].day,lweek:t[1].day}},a.prototype._getDateByWeeksAndDay=function(e,t,r){var i=this._getRangeInfo(r);if(e>i.weeks||e===0&&ti.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},a.create=function(e,t){var r=[];return e.eachComponent("calendar",function(i){var n=new a(i);r.push(n),i.coordinateSystem=n}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=r[i.get("calendarIndex")||0])}),r},a.dimensions=["time","value"],a}();function Kl(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}var hw=vw;function fw(a){a.registerComponentModel(lw),a.registerComponentView(cw),a.registerCoordinateSystem("calendar",hw)}function pw(a,e){var t=a.existing;if(e.id=a.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var r=e.parentOption;r?e.parentId=r.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function ql(a,e){var t;return D(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function dw(a,e,t){var r=F({},t),i=a[e],n=t.$action||"merge";if(n==="merge")if(i){{var o=t.type;yt(!o||i.type===o,'Please set $action: "replace" to change `type`')}Wt(i,r,!0),vc(i,r,{ignoreSize:!0}),Yf(t,i),ia(t,i),ia(t,i,"shape"),ia(t,i,"style"),ia(t,i,"extra"),t.clipPath=i.clipPath}else a[e]=r;else n==="replace"?a[e]=r:n==="remove"&&i&&(a[e]=null)}var Uv=["transition","enterFrom","leaveTo"],gw=Uv.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function ia(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?Uv:gw,i=0;i=0;c--){var v=i[c],h=he(v.id,null),f=h!=null?o.get(h):null;if(!!f){var p=f.parent,y=Xt(p),m=p===n?{width:s,height:l}:{width:y.width,height:y.height},S={},x=kn(f,v,m,null,{hv:v.hv,boundingMode:v.bounding},S);if(!Xt(f).isNew&&x){for(var b=v.transition,w={},_=0;_=0)?w[A]=L:f[A]=L}pt(f,w,t,0)}else f.attr(S)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(i){va(i,Xt(i).option,r,t._lastGraphicModel)}),this._elMap=nt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Qt);function Tn(a){yt(a,"graphic type MUST be set");var e=z(Jl,a)?Jl[a]:oc(a);yt(e,"graphic type "+a+" can not be found");var t=new e({});return Xt(t).type=a,t}function Ql(a,e,t,r){var i=Tn(t);return e.add(i),r.set(a,i),Xt(i).id=a,Xt(i).isNew=!0,i}function va(a,e,t,r){var i=a&&a.parent;i&&(a.type==="group"&&a.traverse(function(n){va(n,e,t,r)}),ti(a,e,r),t.removeKey(Xt(a).id))}function tu(a,e,t,r){a.isGroup||D([["cursor",ar.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(i){var n=i[0];z(e,n)?a[n]=It(e[n],i[1]):a[n]==null&&(a[n]=i[1])}),D(dt(e),function(i){if(i.indexOf("on")===0){var n=e[i];a[i]=ut(n)?n:null}}),z(e,"draggable")&&(a.draggable=e.draggable),e.name!=null&&(a.name=e.name),e.id!=null&&(a.id=e.id)}function xw(a){return a=F({},a),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Xf),function(e){delete a[e]}),a}function bw(a,e,t){var r=lt(a).eventData;!a.silent&&!a.ignore&&!r&&(r=lt(a).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:a.name}),r&&(r.info=t.info)}function ww(a){a.registerComponentModel(mw),a.registerComponentView(Sw),a.registerPreprocessor(function(e){var t=e.graphic;O(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var _w=["rect","polygon","keep","clear"];function Aw(a,e){var t=ge(a?a.brush:[]);if(!!t.length){var r=[];D(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var i=a&&a.toolbox;O(i)&&(i=i[0]),i||(i={feature:{}},a.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),Tw(s),e&&!s.length&&s.push.apply(s,_w)}}function Tw(a){var e={};D(a,function(t){e[t]=1}),a.length=0,D(e,function(t,r){a.push(r)})}var eu=D;function ru(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function Dn(a,e,t){var r={};return eu(e,function(n){var o=r[n]=i();eu(a[n],function(s,l){if(!!At.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new At(u),l==="opacity"&&(u=vt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new At(u))}})}),r;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function Yv(a,e,t){var r;D(t,function(i){e.hasOwnProperty(i)&&ru(e[i])&&(r=!0)}),r&&D(t,function(i){e.hasOwnProperty(i)&&ru(e[i])?a[i]=vt(e[i]):delete a[i]})}function Dw(a,e,t,r,i,n){var o={};D(a,function(v){var h=At.prepareVisualTypes(e[v]);o[v]=h});var s;function l(v){return hc(t,s,v)}function u(v,h){fc(t,s,v,h)}n==null?t.each(c):t.each([n],c);function c(v,h){s=n==null?v:h;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var p=r.call(i,v),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&su(e)}};function su(a){return new bt(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var Rw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new ac(r.getZr())).on("brush",K(this._onBrush,this)).mount()},e.prototype.render=function(t,r,i,n){this.model=t,this._updateController(t,r,i,n)},e.prototype.updateTransform=function(t,r,i,n){Xv(r),this._updateController(t,r,i,n)},e.prototype.updateVisual=function(t,r,i,n){this.updateTransform(t,r,i,n)},e.prototype.updateView=function(t,r,i,n){this._updateController(t,r,i,n)},e.prototype._updateController=function(t,r,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:vt(i),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:vt(i),$from:r})},e.type="brush",e}(Qt),kw=Rw,Nw="#ddd",zw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&Yv(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:Nw},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){yt(O(t)),D(t,function(r){yt(r.brushType,"Illegal areas")}),t&&(this.areas=G(t,function(r){return lu(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=lu(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}($t);function lu(a,e){return Wt({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Kt(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var Bw=zw,Gw=["rect","polygon","lineX","lineY","keep","clear"],Ow=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i){var n,o,s;r.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,D(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,i){this.render(t,r,i)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),i={};return D(t.get("type",!0),function(n){r[n]&&(i[n]=r[n])}),i},e.prototype.onclick=function(t,r,i){var n=this._brushType,o=this._brushMode;i==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:Gw.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return r},e}(jf),Fw=Ow;function Ww(a){a.registerComponentView(kw),a.registerComponentModel(Bw),a.registerPreprocessor(Aw),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,Iw),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Fe),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Fe),Kf("brush",Fw)}var Hw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var r=this._data.count();this.option.loop?t=(t%r+r)%r:(t>=r&&(t=r-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,r=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],D(r,function(u,c){var v=he(qf(u),""),h;kt(u)?(h=vt(u),h.value=c):h=c,o.push(h),n.push(v)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Gt([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}($t),uu=Hw,Zv=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Za(uu.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}(uu);ae(Zv,pc.prototype);var $w=Zv,Uw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Qt),Yw=Uw,Xw=function(a){V(e,a);function e(t,r,i,n){var o=a.call(this,t,r,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(ve),Zw=Xw,Zi=Math.PI,cu=Pt(),jw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.api=r},e.prototype.render=function(t,r,i){if(this.model=t,this.api=i,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return zt("nameValue",{noName:!0,value:c})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var i=t.get(["label","position"]),n=t.get("orient"),o=qw(t,r),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Zi/2},v=n==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),f=h.get("show",!0),p=f?h.get("itemSize"):0,d=f?h.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Zi/180;var m,S,x,b=h.get("position",!0),w=f&&h.get("showPlayBtn",!0),_=f&&h.get("showPrevBtn",!0),A=f&&h.get("showNextBtn",!0),L=0,T=v;b==="left"||b==="bottom"?(w&&(m=[0,0],L+=g),_&&(S=[L,0],L+=g),A&&(x=[T-p,0],T-=g)):(w&&(m=[T-p,0],T-=g),_&&(S=[0,0],L+=g),A&&(x=[T-p,0],T-=g));var C=[L,T];return t.get("inverse")&&C.reverse(),{viewRect:o,mainLength:v,orient:n,rotation:c[n],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:m,prevBtnPosition:S,nextBtnPosition:x,axisExtent:C,controlSize:p,controlGap:d}},e.prototype._position=function(t,r){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=lr(),l=o.x,u=o.y+o.height;$e(s,s,[-l,-u]),Wa(s,s,-Zi/2),$e(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),v=m(i.getBoundingRect()),h=m(n.getBoundingRect()),f=[i.x,i.y],p=[n.x,n.y];p[0]=f[0]=c[0][0];var d=t.labelPosOpt;if(d==null||tt(d)){var g=d==="+"?0:1;S(f,v,c,1,g),S(p,h,c,1,1-g)}else{var g=d>=0?0:1;S(f,v,c,1,g),p[1]=f[1]+d}i.setPosition(f),n.setPosition(p),i.rotation=n.rotation=t.rotation,y(i),y(n);function y(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function S(x,b,w,_,A){x[_]+=w[_][A]-b[_][A]}},e.prototype._createAxis=function(t,r){var i=r.getData(),n=r.get("axisType"),o=Kw(r,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Zw("value",o,t.axisExtent,n);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new Z;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,i,n){var o=i.getExtent();if(!!n.get(["lineStyle","show"])){var s=new ee({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:F({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new ee({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:st({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],D(l,function(u){var c=i.dataToCoord(u.value),v=s.getItemModel(u.value),h=v.getModel("itemStyle"),f=v.getModel(["emphasis","itemStyle"]),p=v.getModel(["progress","itemStyle"]),d={x:c,y:0,onclick:K(o._changeTimeline,o,u.value)},g=vu(v,h,r,d);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),ni(g);var y=lt(g);v.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,i,n){var o=this,s=i.getLabelModel();if(!!s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],D(u,function(c){var v=c.tickValue,h=l.getItemModel(v),f=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=i.dataToCoord(c.tickValue),y=new ft({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:K(o._changeTimeline,o,v),silent:!1,style:gt(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=gt(p),y.ensureState("progress").style=gt(d),r.add(y),ni(y),cu(y).dataIndex=v,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),c=n.getPlayState(),v=n.get("inverse",!0);h(t.nextBtnPosition,"next",K(this._changeTimeline,this,v?"-":"+")),h(t.prevBtnPosition,"prev",K(this._changeTimeline,this,v?"+":"-")),h(t.playPosition,c?"stop":"play",K(this._handlePlayClick,this,!c),!0);function h(f,p,d,g){if(!!f){var y=un(It(n.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],S=Jw(n,p+"Icon",m,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});S.ensureState("emphasis").style=u,r.add(S),ni(S)}}},e.prototype._renderCurrentPointer=function(t,r,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(v){v.draggable=!0,v.drift=K(u._handlePointerDrag,u),v.ondragend=K(u._handlePointerDragend,u),hu(v,u._progressLine,s,i,n,!0)},onUpdate:function(v){hu(v,u._progressLine,s,i,n)}};this._currentPointer=vu(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,r,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var i=this._toAxisCoord(t)[0],n=this._axis,o=Ue(n.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[n]=+o[n].toFixed(h)),[o,v]}var ji={min:ct(sa,"min"),max:ct(sa,"max"),average:ct(sa,"average"),median:ct(sa,"median")};function Nr(a,e){if(!!e){var t=a.getData(),r=a.coordinateSystem,i=r&&r.dimensions;if(!o_(e)&&!O(e.coord)&&O(i)){var n=Kv(e,t,r,a);if(e=vt(e),e.type&&ji[e.type]&&n.baseAxis&&n.valueAxis){var o=Ht(i,n.baseAxis.dim),s=Ht(i,n.valueAxis.dim),l=ji[e.type](t,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!O(i))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)ji[u[c]]&&(u[c]=wo(t,t.mapDimension(i[c]),u[c]));return e}}function Kv(a,e,t,r){var i={};return a.valueIndex!=null||a.valueDim!=null?(i.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,i.valueAxis=t.getAxis(s_(r,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function s_(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function zr(a,e){return a&&a.containData&&e.coord&&!Cn(e)?a.containData(e.coord):!0}function l_(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!Cn(e)&&!Cn(t)?a.containZone(e.coord,t.coord):!0}function qv(a,e){return a?function(t,r,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return ya(o,e[n])}:function(t,r,i,n){return ya(t.value,e[n])}}function wo(a,e,t){if(t==="average"){var r=0,i=0;return a.each(e,function(n,o){isNaN(n)||(r+=n,i++)}),r/i}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var Ki=Pt(),u_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=nt()},e.prototype.render=function(t,r,i){var n=this,o=this.markerGroupMap;o.each(function(s){Ki(s).keep=!1}),r.eachSeries(function(s){var l=De.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,i)}),o.each(function(s){!Ki(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){Ki(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var i=this;D(t,function(n){var o=De.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?ap(l):ip(l))})}})},e.type="marker",e}(Qt),_o=u_;function pu(a,e,t){var r=e.coordinateSystem;a.each(function(i){var n=a.getItemModel(i),o,s=B(n.get("x"),t.getWidth()),l=B(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,i));else if(r){var u=a.get(r.dimensions[0],i),c=a.get(r.dimensions[1],i);o=r.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(i,o)})}var c_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=De.getMarkerModelFromSeries(n,"markPoint");o&&(pu(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new za),v=v_(o,t,r);r.setData(v),pu(r.getData(),t,n),v.each(function(h){var f=v.getItemModel(h),p=f.getShallow("symbol"),d=f.getShallow("symbolSize"),g=f.getShallow("symbolRotate"),y=f.getShallow("symbolOffset"),m=f.getShallow("symbolKeepAspect");if(ut(p)||ut(d)||ut(g)||ut(y)){var S=r.getRawValue(h),x=r.getDataParams(h);ut(p)&&(p=p(S,x)),ut(d)&&(d=d(S,x)),ut(g)&&(g=g(S,x)),ut(y)&&(y=y(S,x))}var b=f.getModel("itemStyle").getItemStyle(),w=ja(l,"color");b.fill||(b.fill=w),v.setItemVisual(h,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),c.updateData(v),this.group.add(c.group),v.eachItemGraphicEl(function(h){h.traverse(function(f){lt(f).dataModel=r})}),this.markKeep(c),c.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(_o);function v_(a,e,t){var r;a?r=G(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return F(F({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new Gt(r,t),n=G(t.get("data"),ct(Nr,e));a&&(n=qt(n,ct(zr,a)));var o=qv(!!a,r);return i.initData(n,null,o),i}var h_=c_;function f_(a){a.registerComponentModel(n_),a.registerComponentView(h_),a.registerPreprocessor(function(e){bo(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var p_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(De),d_=p_,la=Pt(),g_=function(a,e,t,r){var i=a.getData(),n;if(O(r))n=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=Rt(r.yAxis,r.xAxis);else{var u=Kv(r,i,e,a);s=u.valueAxis;var c=np(i,u.valueDataDim);l=wo(i,c,o)}var v=s.dim==="x"?0:1,h=1-v,f=vt(r),p={coord:[]};f.type=null,f.coord=[],f.coord[h]=-1/0,p.coord[h]=1/0;var d=t.get("precision");d>=0&&ue(l)&&(l=+l.toFixed(Math.min(d,20))),f.coord[v]=p.coord[v]=l,n=[f,p,{type:o,valueIndex:r.valueIndex,value:l}]}else Ra("Invalid markLine data."),n=[]}var g=[Nr(a,n[0]),Nr(a,n[1]),F({},n[2])];return g[2].type=g[2].type||null,Wt(g[2],g[0]),Wt(g[2],g[1]),g};function Pa(a){return!isNaN(a)&&!isFinite(a)}function du(a,e,t,r){var i=1-a,n=r.dimensions[a];return Pa(e[i])&&Pa(t[i])&&e[a]===t[a]&&r.getAxis(n).containData(e[a])}function y_(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(du(1,t,r,a)||du(0,t,r,a)))return!0}return zr(a,e[0])&&zr(a,e[1])}function qi(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=B(o.get("x"),i.getWidth()),u=B(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var c=n.dimensions,v=a.get(c[0],e),h=a.get(c[1],e);s=n.dataToPoint([v,h])}if(Xa(n,"cartesian2d")){var f=n.getAxis("x"),p=n.getAxis("y"),c=n.dimensions;Pa(a.get(c[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):Pa(a.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var m_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=De.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=la(o).from,u=la(o).to;l.each(function(c){qi(l,c,!0,n,i),qi(u,c,!1,n,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new lo);this.group.add(c.group);var v=S_(o,t,r),h=v.from,f=v.to,p=v.line;la(r).from=h,la(r).to=f,r.setData(p);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),m=r.get("symbolOffset");O(d)||(d=[d,d]),O(g)||(g=[g,g]),O(y)||(y=[y,y]),O(m)||(m=[m,m]),v.from.each(function(x){S(h,x,!0),S(f,x,!1)}),p.each(function(x){var b=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[h.getItemLayout(x),f.getItemLayout(x)]),b.stroke==null&&(b.stroke=h.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(x,"symbolOffset"),toSymbolRotate:f.getItemVisual(x,"symbolRotate"),toSymbolSize:f.getItemVisual(x,"symbolSize"),toSymbol:f.getItemVisual(x,"symbol"),style:b})}),c.updateData(p),v.line.eachItemGraphicEl(function(x){lt(x).dataModel=r,x.traverse(function(b){lt(b).dataModel=r})});function S(x,b,w){var _=x.getItemModel(b);qi(x,b,w,t,n);var A=_.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=ja(l,"color")),x.setItemVisual(b,{symbolKeepAspect:_.get("symbolKeepAspect"),symbolOffset:It(_.get("symbolOffset",!0),m[w?0:1]),symbolRotate:It(_.get("symbolRotate",!0),y[w?0:1]),symbolSize:It(_.get("symbolSize"),g[w?0:1]),symbol:It(_.get("symbol",!0),d[w?0:1]),style:A})}this.markKeep(c),c.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(_o);function S_(a,e,t){var r;a?r=G(a&&a.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return F(F({},c),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new Gt(r,t),n=new Gt(r,t),o=new Gt([],t),s=G(t.get("data"),ct(g_,e,a,t));a&&(s=qt(s,ct(y_,a)));var l=qv(!!a,r);return i.initData(G(s,function(u){return u[0]}),null,l),n.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}var x_=m_;function b_(a){a.registerComponentModel(d_),a.registerComponentView(x_),a.registerPreprocessor(function(e){bo(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var w_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(De),__=w_,ua=Pt(),A_=function(a,e,t,r){var i=r[0],n=r[1];if(!(!i||!n)){var o=Nr(a,i),s=Nr(a,n),l=o.coord,u=s.coord;l[0]=Rt(l[0],-1/0),l[1]=Rt(l[1],-1/0),u[0]=Rt(u[0],1/0),u[1]=Rt(u[1],1/0);var c=Vn([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Ea(a){return!isNaN(a)&&!isFinite(a)}function gu(a,e,t,r){var i=1-a;return Ea(e[i])&&Ea(t[i])}function T_(a,e){var t=e.coord[0],r=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:r,x:e.x1,y:e.y1};return Xa(a,"cartesian2d")?t&&r&&(gu(1,t,r)||gu(0,t,r))?!0:l_(a,i,n):zr(a,i)||zr(a,n)}function yu(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=B(o.get(t[0]),i.getWidth()),u=B(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var c=a.getValues(["x0","y0"],e),v=a.getValues(["x1","y1"],e),h=n.clampData(c),f=n.clampData(v),p=[];t[0]==="x0"?p[0]=h[0]>f[0]?v[0]:c[0]:p[0]=h[0]>f[0]?c[0]:v[0],t[1]==="y0"?p[1]=h[1]>f[1]?v[1]:c[1]:p[1]=h[1]>f[1]?c[1]:v[1],s=r.getMarkerPosition(p,t,!0)}else{var d=a.get(t[0],e),g=a.get(t[1],e),y=[d,g];n.clampData&&n.clampData(y,y),s=n.dataToPoint(y,!0)}if(Xa(n,"cartesian2d")){var m=n.getAxis("x"),S=n.getAxis("y"),d=a.get(t[0],e),g=a.get(t[1],e);Ea(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Ea(g)&&(s[1]=S.toGlobalCoord(S.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var mu=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],D_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=De.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(mu,function(v){return yu(s,l,v,n,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Z});this.group.add(c.group),this.markKeep(c);var v=L_(o,t,r);r.setData(v),v.each(function(h){var f=G(mu,function(A){return yu(v,h,A,t,n)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(v.get("x0",h)),p.parse(v.get("x1",h))],S=[d.parse(v.get("y0",h)),d.parse(v.get("y1",h))];Ue(m),Ue(S);var x=!(g[0]>m[1]||g[1]S[1]||y[1]"],O(t)&&(t=t.slice(),u=!0);var c=r?t:u?[v(t[0]),v(t[1])]:v(t);if(tt(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(ut(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function v(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=R_([t.min,t.max]);this._dataExtent=r},e.prototype.getDataDimensionIndex=function(t){var r=this.option.dimension;if(r!=null)return t.getDimensionIndex(r);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,i={inRange:r.inRange,outOfRange:r.outOfRange},n=r.target||(r.target={}),o=r.controller||(r.controller={});Wt(n,i),Wt(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),c.call(this,o);function l(v){V_(r.color)&&!v.inRange&&(v.inRange={color:r.color.slice().reverse()}),v.inRange=v.inRange||{color:t.get("gradientColor")}}function u(v,h,f){var p=v[h],d=v[f];p&&!d&&(d=v[f]={},xu(p,function(g,y){if(!!At.isValidType(y)){var m=Jv.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function c(v){var h=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,f=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";xu(this.stateList,function(y){var m=this.itemSize,S=v[y];S||(S=v[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&vt(h)||(s?g:[g])),S.symbolSize==null&&(S.symbolSize=f&&vt(f)||(s?m[0]:[m[0],m[0]])),S.symbol=Su(S.symbol,function(w){return w==="none"?g:w});var x=S.symbolSize;if(x!=null){var b=-1/0;E_(x,function(w){w>b&&(b=w)}),S.symbolSize=Su(x,function(w){return k_(w,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}($t),Va=N_,bu=[20,140],z_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){a.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=bu[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=bu[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):O(r)&&(r[0]>r[1]&&r.reverse(),r[0]=Math.max(r[0],t[0]),r[1]=Math.min(r[1],t[1]))},e.prototype.completeVisualOption=function(){a.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(t){var r=this.option.controller[t].symbolSize;r&&r[0]!==r[1]&&(r[0]=r[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),r=Ue((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]=i[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),r.push({seriesId:i.id,dataIndex:n})},this),r},e.prototype.getVisualMeta=function(t){var r=wu(this,"outOfRange",this.getExtent()),i=wu(this,"inRange",this.option.range.slice()),n=[];function o(f,p){n.push({value:f,color:t(f,p)})}for(var s=0,l=0,u=i.length,c=r.length;lt[1])break;n.push({color:this.getControllerVisual(l,"color",r),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),n},e.prototype._createBarPoints=function(t,r){var i=this.visualMapModel.itemSize;return[[i[0]-r[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,i=this.visualMapModel.get("inverse");return new Z(r==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(!!this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent();O_([0,1],function(c){var v=o[c];v.setStyle("fill",r.handlesColor[c]),v.y=t[c];var h=se(t[c],[0,l[1]],u,!0),f=this.getControllerVisual(h,"symbolSize");v.scaleX=v.scaleY=f/l[0],v.x=l[0]-f/2;var p=er(i.handleLabelPoints[c],oi(v,this.group));s[c].setStyle({x:p[0],y:p[1],text:n.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,v=c.indicator;if(!!v){v.attr("invisible",!1);var h={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),d=se(t,s,u,!0),g=l[0]-p/2,y={x:v.x,y:v.y};v.y=d,v.x=g;var m=er(c.indicatorLabelPoint,oi(v,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),b=this._orient,w=b==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:w?x:"middle",align:w?"center":x});var _={x:g,y:d,style:{fill:f}},A={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var L={duration:100,easing:"cubicInOut",additive:!0};v.x=y.x,v.y=y.y,v.animateTo(_,L),S.animateTo(A,L)}else v.attr(_),S.attr(A);this._firstShowIndicator=!1;var T=this._shapes.handleLabels;if(T)for(var C=0;Co[1]&&(v[1]=1/0),r&&(v[0]===-1/0?this._showIndicator(c,v[1],"< ",l):v[1]===1/0?this._showIndicator(c,v[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,f=[];(r||Du(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(v));var p=sp(h,f);this._dispatchHighDown("downplay",ha(p[0],i)),this._dispatchHighDown("highlight",ha(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if(Xu(t.target,function(l){var u=lt(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var i=this.ecModel.getSeriesByIndex(r.seriesIndex),n=this.visualMapModel;if(!!n.isTargetSeries(i)){var o=i.getData(r.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),r.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var i=0;i=0&&(n.dimension=o,r.push(n))}}),a.getData().setVisual("visualMeta",r)}}];function j_(a,e,t,r){for(var i=e.targetVisuals[r],n=At.prepareVisualTypes(i),o={color:ja(a.getData(),"color")},s=0,l=n.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(Y_,X_),D(Z_,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(K_))}function rh(a){a.registerComponentModel(B_),a.registerComponentView(U_),eh(a)}var q_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],J_[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=vt(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=vt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},i=At.listVisualTypes(),n=this.isCategory();D(t.pieces,function(s){D(i,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),D(r,function(s,l){var u=!1;D(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&D(this.stateList,function(c){(t[c]||(t[c]={}))[l]=Jv.get(l,c==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}a.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var i=this.option,n=this._pieceList,o=(r?i:t).selected||{};if(i.selected=o,D(n,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;D(n,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=vt(t)},e.prototype.getValueState=function(t){var r=At.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=At.findPieceIndex(l,i);c===t&&o.push(u)},this),r.push({seriesId:n.id,dataIndex:o})},this),r},e.prototype.getRepresentValue=function(t){var r;if(this.isCategory())r=t.value;else if(t.value!=null)r=t.value;else{var i=t.interval||[];r=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],i=["",""],n=this;function o(c,v){var h=n.getRepresentValue({interval:c});v||(v=n.getValueState(h));var f=t(h,v);c[0]===-1/0?i[0]=f:c[1]===1/0?i[1]=f:r.push({value:c[0],color:f},{value:c[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(c){var v=c.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:r,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Za(Va.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}(Va),J_={splitNumber:function(a){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(r[1]-r[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&a.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];oo[1]&&console.warn("Piece "+r+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=At.retrieveVisuals(t),a.push(i)},this),Mu(e,a),Yo(a),D(a,function(t){var r=t.close,i=[["<","\u2264"][r[1]],[">","\u2265"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Mu(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}var Q_=q_,tA=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var r=this.visualMapModel,i=r.get("textGap"),n=r.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=r.itemSize,c=this._getViewData(),v=c.endsText,h=Rt(r.get("showLabel",!0),!v);v&&this._renderEndsText(t,v[0],u,h,l),D(c.viewPieceList,function(f){var p=f.piece,d=new Z;d.onclick=K(this._onItemClick,this,p),this._enableHoverLink(d,f.indexInModelPieceList);var g=r.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);d.add(new ft({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),v&&this._renderEndsText(t,v[1],u,h,l),up(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:ha(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return th(t,this.api,t.itemSize);var i=r.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,r,i,n,o){if(!!r){var s=new Z,l=this.visualMapModel.textStyleModel;s.add(new ft({style:gt(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?r.reverse():i&&(i=i.slice().reverse()),{viewPieceList:r,endsText:i}},e.prototype._createItemSymbol=function(t,r,i){t.add(Ot(this.getControllerVisual(r,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(r,"color")))},e.prototype._onItemClick=function(t){var r=this.visualMapModel,i=r.option,n=i.selectedMode;if(!!n){var o=vt(i.selected),s=r.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(Qv),eA=tA;function ah(a){a.registerComponentModel(Q_),a.registerComponentView(eA),eh(a)}function rA(a){j(rh),j(ah)}var aA={label:{enabled:!0},decal:{show:!1}},Pu=Pt(),iA={};function nA(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=vt(aA);Wt(r.label,a.getLocaleModel().get("aria"),!1),Wt(t.option,r,!1),i(),n();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var v=nt();a.eachSeries(function(h){if(!h.isColorBySeries()){var f=v.get(h.type);f||(f={},v.set(h.type,f)),Pu(h).scope=f}}),a.eachRawSeries(function(h){if(a.isSeriesFiltered(h))return;if(ut(h.enableAriaDecal)){h.enableAriaDecal();return}var f=h.getData();if(h.isColorBySeries()){var m=rn(h.ecModel,h.name,iA,a.getSeriesCount()),S=f.getVisual("decal");f.setVisual("decal",x(S,m))}else{var p=h.getRawData(),d={},g=Pu(h).scope;f.each(function(b){var w=f.getRawIndex(b);d[w]=b});var y=p.count();p.each(function(b){var w=d[b],_=p.getName(b)||b+"",A=rn(h.ecModel,_,g,y),L=f.getItemVisual(w,"decal");f.setItemVisual(w,"decal",x(L,A))})}function x(b,w){var _=b?F(F({},w),b):w;return _.dirty=!0,_}})}}function n(){var u=a.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=st(c.option,u),!!c.get("enabled")){var v=e.getZr().dom;if(c.get("description")){v.setAttribute("aria-label",c.get("description"));return}var h=a.getSeriesCount(),f=c.get(["data","maxCount"])||10,p=c.get(["series","maxCount"])||10,d=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var S=[],x=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(x,{seriesCount:h}),a.eachSeries(function(A,L){if(L1?c.get(["series","multiple",M]):c.get(["series","single",M]),T=o(T,{seriesId:A.seriesIndex,seriesName:A.get("name"),seriesType:l(A.subType)});var P=A.getData();if(P.count()>f){var I=c.get(["data","partialData"]);T+=o(I,{displayCnt:f})}else T+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),k=[],N=0;Na.practiceThisWeeks.map(s=>s.subjectName));let t;const r=s=>{const{content:l}=s;if(!l)return;t&&t.dispose(),a.sum=l.sum||{},a.practiceThisWeeks=l.practiceThisWeeks||[];const u=document.getElementById("subjectEcharts");t=Dp(u);const c={tooltip:{trigger:"axis",showContent:!1,axisPointer:{type:"line",lineStyle:{width:30,type:"solid",opacity:.2}}},grid:{left:8,top:5,right:5,bottom:5,containLabel:!0},legend:{type:"plain",align:"auto",itemGap:10,itemWidth:6,itemStyle:{opacity:0},lineStyle:{width:0,opacity:0},textStyle:{opacity:0}},xAxis:{type:"category",axisLine:{show:!1},axisLabel:{interval:0,color:"#333",fontSize:9},axisTick:{alignWithLabel:!0,show:!1},data:e.value},yAxis:[{type:"value",position:"left",axisLine:{show:!1,lineStyle:{color:"#999"}},splitLine:{show:!0,lineStyle:{color:["rgba(249, 234, 220, 1)"]}},min:0,splitNumber:5},{type:"value",position:"right",splitLine:{show:!0,lineStyle:{color:["rgba(249, 234, 220, 1)"]}},axisLine:{show:!1,lineStyle:{color:"#999"}},interval:20,min:0,max:100,splitNumber:5,axisLabel:{formatter:function(h,f){return h+"%"}}}],series:["practiceRate","passNum","noPassNum","noMemberNum"].map((h,f)=>({name:a.colors[f].text,color:a.colors[f].color,...lA,yAxisIndex:f===0?1:0,data:a.practiceThisWeeks.map(p=>p[h])}))};let v=Math.max(...c.series.map(h=>h.data).flat());Math.min(...c.series.map(h=>h.data).flat()),v=Math.ceil(v/9.5)*10,c.yAxis[0].interval=Math.ceil(Math.ceil(v)/5),c.yAxis[0].max=Math.ceil(Math.ceil(v)/5)*5,c&&t.setOption(c),t.on("highlight",function(h){a.index=h.batch[0].dataIndex})},i=s=>{a.index=s,t==null||t.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:s})},n=s=>{t==null||t.dispatchAction({type:s.select?"legendUnSelect":"legendSelect",name:s.text}),s.select=!s.select};oh(()=>{sh("setAccomanyEcharts",r),Do({api:"setAccomanyEcharts"})}),lh(()=>{uh("setAccomanyEcharts",r)});const o=()=>{const s=location.origin+location.pathname+"#/exercise-record";console.log("\u{1F680} ~ url:",s),Do({api:"openWebView",content:{url:s,orientation:1}})};return()=>W("div",{class:X.subjectEcharts},[W("div",{class:[X.container,X.ensemble]},[W("div",{class:X.head},[W("div",{class:X.headLeft},[W("img",{class:X.icon,src:ad},null),W("div",null,[me("\u603B\u4F53\u60C5\u51B5")])])]),W("div",{class:X.content,onClick:()=>o()},[W(ed,{value:Number(a.sum.practiceRate)||0,size:80,color:"#FF8057",strokeWidth:6},null),W("div",{class:X.items},[W("div",{class:X.item},[W("div",{class:X.itemNum},[W("span",{class:X.rect},null),W("span",{style:{color:"#FF8057"}},[a.sum.passNum])]),W("div",{class:X.itemTitle},[me("\u8FBE\u6807\u4EBA\u6570")])]),W("div",{class:[X.item,X.line]},[W("div",{class:X.itemNum},[W("span",{class:X.rect,style:{background:"#4A99FF"}},null),W("span",null,[a.sum.noPassNum])]),W("div",{class:X.itemTitle},[me("\u672A\u8FBE\u6807\u4EBA\u6570")])]),W("div",{class:X.item},[W("div",{class:X.itemNum},[W("span",{class:X.rect,style:{background:"#9884BA"}},null),W("span",null,[a.sum.noMemberNum])]),W("div",{class:X.itemTitle},[me("\u672A\u7EDF\u8BA1\u4EBA\u6570")])])])])]),W("div",{class:[X.container,X.ensemble]},[W("div",{class:X.head},[W("div",{class:X.headLeft},[W("img",{class:X.icon,src:rd},null),W("div",null,[me("\u58F0\u90E8\u60C5\u51B5")])]),W("div",{class:X.headRight},[a.colors.map(s=>W("div",{style:s.select?{color:"#fff",borderColor:s.color,backgroundColor:s.color}:{color:s.color,borderColor:s.borderColor},onClick:()=>n(s)},[s.text]))])]),W("div",{class:X.headLabelWrap},[a.colors.map((s,l)=>W("div",{class:X.headLabel,style:{display:s.select?"":"none"}},[W("div",{class:X.headLabelDot,style:{background:s.color,color:s.color}},null),W("div",{style:{color:s.color}},[a.sum[s.key]||0,l===0?"%":"\u4EBA"])]))]),W("div",{id:"subjectEcharts",class:X.echartsMain},null),!a.practiceThisWeeks.length&&W("div",{class:X.emtry},[me("\u6682\u65E0\u7EC3\u4E60\u8BB0\u5F55")])]),W("div",{class:[X.container,X.subjectWrap]},[a.practiceThisWeeks.map((s,l)=>W("div",{class:[X.listItem,l===a.index?X.listItemActive:""],onClick:()=>i(l)},[W("div",{class:X.dot},null),W("div",{class:X.itemLeft},[W("div",{class:X.subjectName},[s.subjectName]),W("div",{class:X.subjectType},[me("\u58F0\u90E8")])]),W("div",{class:X.listitems},[a.colors.map((u,c)=>W("div",{class:X.item},[W("div",{class:X.itemNum},[W("span",{style:{color:u.color}},[s[u.key],c===0?"%":""])]),W("div",{class:X.itemTitle},[u.text,c===0?"":"\u4EBA\u6570"])]))])]))])])}});export{vA as default};