index.c3035d41.js 409 KB

12345
  1. import{d as _u,c as W,q as ye,r as Xv,y as Zv,$ as jv,bJ as Kv,e as bo,ab as qv,bL as Jv}from"./index.ff8c07d1.js";import{w as _o,_ as V,p as D,B as xt,q as Qv,r as Zi,s as wu,t as wr,v as Au,x as Tu,y as G,z as Kt,A as me,Z as ue,C as Ar,D as th,E as wo,F as gt,G as eh,H as Du,I as tt,J as rh,K as ah,M as F,N as Lu,P as ih,O as Cu,Q as le,R as qt,T as Iu,S as nh,U as oh,V as Ct,W as sh,X as Ma,Y as lh,$ as Tr,a0 as uh,a1 as vt,a2 as ut,a3 as ch,a4 as vh,a5 as hh,a6 as fh,a7 as ph,a8 as dh,a9 as gh,aa as Mu,ab as Tn,ac as yh,ad as mh,ae as Sh,af as O,ag as Bt,ah as Ao,ai as xh,aj as Oe,ak as ir,al as bt,am as Z,an as Gt,ao as lt,ap as Pa,aq as Ea,ar as St,u as j,as as bh,at as _h,au as pe,av as De,aw as ee,ax as _e,ay as pt,az as st,aA as Ot,aB as Zt,aC as Vt,aD as mt,aE as Va,aF as Nr,aG as Ra,aH as K,aI as zr,aJ as wh,aK as Rt,aL as Ft,aM as jt,aN as re,aO as ka,aP as Ht,aQ as Ah,aR as Fe,aS as We,aT as Pu,aU as Qt,aV as Jt,aW as ce,aX as B,aY as ji,aZ as Th,a_ as Na,a$ as It,b0 as z,b1 as te,b2 as Dh,b3 as Lh,L as Dn,b4 as Ch,b5 as Ih,b6 as za,b7 as Eu,b8 as He,b9 as nr,ba as nt,bb as Mt,bc as Mh,bd as Ba,be as er,bf as rr,bg as Ln,bh as Cn,bi as Vu,bj as Ph,bk as Br,bl as Ru,bm as ct,bn as ku,bo as $r,bp as Eh,bq as Lt,br as or,bs as In,bt as Nt,bu as ae,bv as Ga,bw as Nu,bx as zu,by as Vh,bz as Bu,bA as Gu,bB as Ki,bC as Rh,bD as Ou,bE as va,bF as ve,bG as Mn,bH as zt,bI as Wt,bJ as qi,bK as de,bL as Pn,bM as kh,bN as ft,bO as dt,bP as Fu,bQ as Oa,bR as Wu,bS as To,bT as fr,bU as Do,bV as Nh,bW as Ka,bX as qa,bY as _t,bZ as zh,b$ as xr,c0 as ha,c1 as Lo,c2 as Gr,c3 as xe,c4 as Or,c5 as Bh,c6 as Gh,c7 as Je,c8 as Co,c9 as Oh,ca as Ji,cb as Qi,cc as En,cd as Vn,ce as Rn,cf as Fr,cg as Fa,ch as Fh,ci as Hu,cj as Wh,ck as $u,cl as Hh,cm as $h,cn as Io,co as Uh,cp as Yh,cq as Mo,cr as Dr,cs as Xh,ct as Zh,cu as jh,cv as Kh,cw as qh,cx as Jh,cy as Uu,cz as Qh,cA as kn,cB as fa,cC as Qe,cD as Yu,cE as $e,cF as Xu,cG as Nn,cH as tf,cI as ef,cJ as rf,cK as pa,cL as tn,cM as en,cN as af,cO as Ja,cP as nf,cQ as Zu,cR as zn,cS as Bn,cT as Qa,cU as of,cV as sf,cW as pr,cX as lf,cY as Po,cZ as uf,c_ as Eo,c$ as Wa,d0 as cf,d1 as rn,d2 as Ha,d3 as Vo,d4 as vf,d5 as hf,d6 as ff,d7 as Ro,d8 as ko,d9 as pf,da as df,db as Lr,dc as gf,dd as yf,de as ju,df as No,dg as mf,dh as Sf,di as xf,dj as Ku,dk as qu,dl as bf,dm as Ju,dn as Qu,dp as zo,dq as _f,dr as Bo,ds as Wr,dt as tc,du as Gn,dv as wf,dw as Af,dx as Tf,dy as Df,dz as Lf,dA as Cf,dB as If,dC as Mf,dD as ec,dE as Pf,dF as Go,dG as Ef,dH as Vf,dI as Rf,dJ as kf,dK as rc,dL as ac,dM as Ur,dN as Nf,dO as zf,dP as Bf,dQ as Gf,dR as ic,dS as ti,dT as an,dU as Of,dV as Ff,dW as Wf,dX as Hf,dY as $f,dZ as da,d_ as Uf,d$ as Yf,e0 as $a,e1 as Xf,e2 as Zf,e3 as nn,e4 as ei,e5 as jf,e6 as Kf,e7 as Oo,e8 as qf,j as Jf,o as Qf,f as tp,k as ep,c as rp,l as ap,b as ip,a as np,m as op,n as sp,e9 as lp,ea as up,e as cp,d as vp,h as hp,g as fp,i as pp}from"./universalTransition.3d16890a.js";const dp="_subjectEcharts_17r04_1",gp="_container_17r04_5",yp="_emtry_17r04_12",mp="_head_17r04_20",Sp="_headLeft_17r04_26",xp="_icon_17r04_30",bp="_headRight_17r04_36",_p="_headLabelWrap_17r04_50",wp="_headLabel_17r04_50",Ap="_headLabelDot_17r04_62",Tp="_content_17r04_68",Dp="_echartsMain_17r04_73",Lp="_items_17r04_77",Cp="_item_17r04_77",Ip="_itemNum_17r04_84",Mp="_rect_17r04_94",Pp="_itemTitle_17r04_101",Ep="_line_17r04_106",Vp="_subjectWrap_17r04_112",Rp="_listItem_17r04_115",kp="_itemLeft_17r04_125",Np="_subjectName_17r04_129",zp="_subjectType_17r04_138",Bp="_dot_17r04_144",Gp="_listItemActive_17r04_153",Op="_listitems_17r04_158";var X={subjectEcharts:dp,container:gp,emtry:yp,head:mp,headLeft:Sp,icon:xp,headRight:bp,headLabelWrap:_p,headLabel:wp,headLabelDot:Ap,content:Tp,echartsMain:Dp,items:Lp,item:Cp,itemNum:Ip,rect:Mp,itemTitle:Pp,line:Ep,subjectWrap:Vp,listItem:Rp,itemLeft:kp,subjectName:Np,subjectType:zp,dot:Bp,listItemActive:Gp,listitems:Op};const Fp="_circle_1j0c8_1",Wp="_des_1j0c8_22";var Ue={circle:Fp,"circle-main-box":"_circle-main-box_1j0c8_4","count-num":"_count-num_1j0c8_9",des:Wp},Hp=_u({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:Ue["circle-main"]},[W("div",{class:Ue["circle-main-box"],style:[{width:this.size+"px",height:this.size+"px"}]},[W("svg",{width:this.size,height:this.size,class:Ue.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:Ue["count-num"]},[this.countDown,W("span",{class:Ue.countType},[ye("%")])]),W("span",{class:Ue.des},[this.des])])])}}),$p="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=",Up="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",Yp=1e-8;function Fo(a,e){return Math.abs(a-e)<Yp}function Ne(a,e,t){var r=0,i=a[0];if(!i)return!1;for(var n=1;n<a.length;n++){var o=a[n];r+=_o(i[0],i[1],o[0],o[1],e,t),i=o}var s=a[0];return(!Fo(i[0],s[0])||!Fo(i[1],s[1]))&&(r+=_o(i[0],i[1],s[0],s[1],e,t)),r!==0}var Xp=[];function ri(a,e){for(var t=0;t<a.length;t++)wr(a[t],a[t],e)}function Wo(a,e,t,r){for(var i=0;i<a.length;i++){var n=a[i];r&&(n=r.project(n)),n&&isFinite(n[0])&&isFinite(n[1])&&(Au(e,e,n),Tu(t,t,n))}}function Zp(a){for(var e=0,t=0,r=0,i=a.length,n=a[i-1][0],o=a[i-1][1],s=0;s<i;s++){var l=a[s][0],u=a[s][1],c=n*u-l*o;e+=c,t+=(n+l)*c,r+=(o+u)*c,n=l,o=u}return e?[t/e/3,r/e/3,e]:[a[0][0]||0,a[0][1]||0]}var nc=function(){function a(e){this.name=e}return a.prototype.setCenter=function(e){this._center=e},a.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},a}(),Ho=function(){function a(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return a}(),$o=function(){function a(e){this.type="linestring",this.points=e}return a}(),oc=function(a){V(e,a);function e(t,r,i){var n=a.call(this,t)||this;return n.type="geoJSON",n.geometries=r,n._center=i&&[i[0],i[1]],n}return e.prototype.calcCenter=function(){for(var t=this.geometries,r,i=0,n=0;n<t.length;n++){var o=t[n],s=o.exterior,l=s&&s.length;l>i&&(r=o,i=l)}if(r)return Zp(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"?Wo(s.exterior,i,n,t):D(s.points,function(l){Wo(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 xt(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<o;n++){var s=i[n];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Ne(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Ne(u[c],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,r,i,n){var o=this.getBoundingRect(),s=o.width/o.height;i?n||(n=i/s):i=s*n;for(var l=new xt(t,r,i,n),u=o.calculateTransform(l),c=this.geometries,v=0;v<c.length;v++){var h=c[v];h.type==="polygon"?(ri(h.exterior,u),D(h.interiors,function(f){ri(f,u)})):D(h.points,function(f){ri(f,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var r=new e(t,this.geometries,this._center);return r._rect=this._rect,r.transformTo=null,r},e}(nc),jp=function(a){V(e,a);function e(t,r){var i=a.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=r,i}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,r=t.getBoundingRect(),i=[r.x+r.width/2,r.y+r.height/2],n=Qv(Xp),o=t;o&&!o.isGeoSVGGraphicRoot;)Zi(n,o.getLocalTransform(),n),o=o.parent;return wu(n,n),wr(i,i,n),i},e}(nc);function Kp(a){if(!a.UTF8Encoding)return a;var e=a,t=e.UTF8Scale;t==null&&(t=1024);var r=e.features;return D(r,function(i){var n=i.geometry,o=n.encodeOffsets,s=n.coordinates;if(!!o)switch(n.type){case"LineString":n.coordinates=sc(s,o,t);break;case"Polygon":ai(s,o,t);break;case"MultiLineString":ai(s,o,t);break;case"MultiPolygon":D(s,function(l,u){return ai(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function ai(a,e,t){for(var r=0;r<a.length;r++)a[r]=sc(a[r],e[r],t)}function sc(a,e,t){for(var r=[],i=e[0],n=e[1],o=0;o<a.length;o+=2){var s=a.charCodeAt(o)-64,l=a.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,r.push([s/t,l/t])}return r}function qp(a,e){return a=Kp(a),G(Kt(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 Ho(o[0],o.slice(1)));break;case"MultiPolygon":D(i.coordinates,function(l){l[0]&&n.push(new Ho(l[0],l.slice(1)))});break;case"LineString":n.push(new $o([i.coordinates]));break;case"MultiLineString":n.push(new $o(i.coordinates))}var s=new oc(r[e||"name"],n,r.cp);return s.properties=r,s})}var ii=Math.sin,ni=Math.cos,lc=Math.PI,Ie=Math.PI*2,Jp=180/lc,Qp=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=me(v-Ie)||(c?u>=Ie:-u>=Ie),f=u>0?u%Ie:u%Ie+Ie,p=!1;h?p=!0:me(v)?p=!1:p=f>=lc==!!c;var d=e+r*ni(o),g=t+i*ii(o);this._start&&this._add("M",d,g);var y=Math.round(n*Jp);if(h){var m=1/this._p,S=(c?1:-1)*(Ie-m);this._add("A",r,i,y,1,+c,e+r*ni(o+S),t+i*ii(o+S)),m>.01&&this._add("A",r,i,y,0,+c,d,g)}else{var x=e+r*ni(s),b=t+i*ii(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<arguments.length;h++){var f=arguments[h];if(isNaN(f)){this._invalid=!0;return}c.push(Math.round(f*v)/v)}this._d.push(e+c.join(" ")),this._start=e==="Z"},a.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},a.prototype.getStr=function(){return this._str},a}(),uc=Qp,br="none",td=Math.round;function ed(a){var e=a.fill;return e!=null&&e!==br}function rd(a){var e=a.stroke;return e!=null&&e!==br}var on=["lineCap","miterLimit","lineJoin"],ad=G(on,function(a){return"stroke-"+a.toLowerCase()});function id(a,e,t,r){var i=e.opacity==null?1:e.opacity;if(t instanceof ue){a("opacity",i);return}if(ed(e)){var n=Ar(e.fill);a("fill",n.color);var o=e.fillOpacity!=null?e.fillOpacity*n.opacity*i:n.opacity*i;(r||o<1)&&a("fill-opacity",o)}else a("fill",br);if(rd(e)){var s=Ar(e.stroke);a("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,v=e.strokeFirst;if((r||u!==1)&&a("stroke-width",u),(r||v)&&a("paint-order",v?"stroke":"fill"),(r||c<1)&&a("stroke-opacity",c),e.lineDash){var h=th(t),f=h[0],p=h[1];f&&(p=td(p||0),a("stroke-dasharray",f.join(",")),(p||r)&&a("stroke-dashoffset",p))}else r&&a("stroke-dasharray",br);for(var d=0;d<on.length;d++){var g=on[d];if(r||e[g]!==wo[g]){var y=e[g]||wo[g];y&&a(ad[d],y)}}}else r&&a("stroke",br)}var cc="http://www.w3.org/2000/svg",vc="http://www.w3.org/1999/xlink",nd="http://www.w3.org/2000/xmlns/",od="http://www.w3.org/XML/1998/namespace";function hc(a){return document.createElementNS(cc,a)}function yt(a,e,t,r,i){return{tag:a,attrs:t||{},children:r,text:i,key:e}}function sd(a,e){var t=[];if(e)for(var r in e){var i=e[r],n=r;i!==!1&&(i!==!0&&i!=null&&(n+='="'+i+'"'),t.push(n))}return"<"+a+" "+t.join(" ")+">"}function ld(a){return"</"+a+">"}function On(a,e){e=e||{};var t=e.newline?`
  2. `:"";function r(i){var n=i.children,o=i.tag,s=i.attrs,l=i.text;return sd(o,s)+(o!=="style"?eh(l):l||"")+(n?""+t+G(n,function(u){return r(u)}).join(t)+t:"")+ld(o)}return r(a)}function ud(a,e,t){t=t||{};var r=t.newline?`
  3. `:"",i=" {"+r,n=r+"}",o=G(gt(a),function(l){return l+i+G(gt(a[l]),function(u){return u+":"+a[l][u]+";"}).join(r)+n}).join(r),s=G(gt(e),function(l){return"@keyframes "+l+i+G(gt(e[l]),function(u){return u+i+G(gt(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?"":["<![CDATA[",o,s,"]]>"].join(r)}function sn(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Uo(a,e,t,r){return yt("svg","root",{width:a,height:e,xmlns:cc,"xmlns:xlink":vc,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var Yo={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"},Pe="transform-origin";function cd(a,e,t){var r=F({},a.shape);F(r,e),a.buildPath(t,r);var i=new uc;return i.reset(Cu(a)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function vd(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[Pe]=t+"px "+r+"px")}var hd={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function fc(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function fd(a,e,t){var r=a.shape.paths,i={},n,o;if(D(r,function(l){var u=sn(t.zrId);u.animation=!0,Ua(l,{},u,!0);var c=u.cssAnims,v=u.cssNodes,h=gt(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=fc(i,t);return n.replace(o,s)}}function Xo(a){return tt(a)?Yo[a]?"cubic-bezier("+Yo[a]+")":rh(a)?a:"":""}function Ua(a,e,t,r){var i=a.animators,n=i.length,o=[];if(a instanceof Du){var s=fd(a,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u<n;u++){var c=i[u],v=[c.getMaxTime()/1e3+"s"],h=Xo(c.getClip().easing),f=c.getDelay();h?v.push(h):v.push("linear"),f&&v.push(f/1e3+"s"),c.getLoop()&&v.push("infinite");var p=v.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function d(m){var S=m[1],x=S.length,b={},_={},w={},A="animation-timing-function";function L(Y,at,rt){for(var ot=Y.getTracks(),At=Y.getMaxTime(),Dt=0;Dt<ot.length;Dt++){var ht=ot[Dt];if(ht.needsAnimate()){var Pt=ht.keyframes,Et=ht.propName;if(rt&&(Et=rt(Et)),Et)for(var ie=0;ie<Pt.length;ie++){var Le=Pt[ie],Ce=Math.round(Le.time/At*100)+"%",So=Xo(Le.easing),xo=Le.rawValue;(tt(xo)||le(xo))&&(at[Ce]=at[Ce]||{},at[Ce][Et]=Le.rawValue,So&&(at[Ce][A]=So))}}}}for(var T=0;T<x;T++){var C=S[T],M=C.targetName;M?M==="shape"&&L(C,_):!r&&L(C,b)}for(var P in b){var I={};ah(I,a),F(I,b[P]);var E=Lu(I),R=b[P][A];w[P]=E?{transform:E}:{},vd(w[P],I),R&&(w[P][A]=R)}var k,N=!0;for(var P in _){w[P]=w[P]||{};var H=!k,R=_[P][A];H&&(k=new ih);var $=k.len();k.reset(),w[P].d=cd(a,_[P],k);var U=k.len();if(!H&&$!==U){N=!1;break}R&&(w[P][A]=R)}if(!N)for(var P in w)delete w[P].d;if(!r)for(var T=0;T<x;T++){var C=S[T],M=C.targetName;M==="style"&&L(C,w,function(ot){return hd[ot]})}for(var Q=gt(w),et=!0,q,T=1;T<Q.length;T++){var it=Q[T-1],Tt=Q[T];if(w[it][Pe]!==w[Tt][Pe]){et=!1;break}q=w[it][Pe]}if(et&&q){for(var P in w)w[P][Pe]&&delete w[P][Pe];e[Pe]=q}if(Kt(Q,function(Y){return gt(w[Y]).length>0}).length){var J=fc(w,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 Cr=Math.round;function pc(a){return a&&tt(a.src)}function dc(a){return a&&ut(a.toDataURL)}function Fn(a,e,t,r){id(function(i,n){var o=i==="fill"||i==="stroke";o&&Mu(n)?yc(e,a,i,r):o&&Tn(n)?mc(t,a,i,r):a[i]=n},e,t,!1),xd(t,a,r)}function Zo(a){return me(a[0]-1)&&me(a[1])&&me(a[2])&&me(a[3]-1)}function pd(a){return me(a[4])&&me(a[5])}function Wn(a,e,t){if(e&&!(pd(e)&&Zo(e))){var r=t?10:1e4;a.transform=Zo(e)?"translate("+Cr(e[4]*r)/r+" "+Cr(e[5]*r)/r+")":yh(e)}}function jo(a,e,t){for(var r=a.points,i=[],n=0;n<r.length;n++)i.push(Cr(r[n][0]*t)/t),i.push(Cr(r[n][1]*t)/t);e.points=i.join(" ")}function Ko(a){return!a.smooth}function dd(a){var e=G(a,function(t){return typeof t=="string"?[t,t]:t});return function(t,r,i){for(var n=0;n<e.length;n++){var o=e[n],s=t[o[0]];s!=null&&(r[o[1]]=Cr(s*i)/i)}}}var gd={circle:[dd(["cx","cy","r"])],polyline:[jo,Ko],polygon:[jo,Ko]};function yd(a){for(var e=a.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function gc(a,e){var t=a.style,r=a.shape,i=gd[a.type],n={},o=e.animation,s="path",l=a.style.strokePercent,u=e.compress&&Cu(a)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&yd(a))&&!(l<1)){s=a.type;var c=Math.pow(10,u);i[0](r,n,c)}else{var v=!a.path||a.shapeChanged();a.path||a.createPathProxy();var h=a.path;v&&(h.beginPath(),a.buildPath(h,a.shape),a.pathUpdated());var f=h.getVersion(),p=a,d=p.__svgPathBuilder;(p.__svgPathVersion!==f||!d||l!==p.__svgPathStrokePercent)&&(d||(d=p.__svgPathBuilder=new uc),d.reset(u),h.rebuildPath(d,l),d.generateStr(),p.__svgPathVersion=f,p.__svgPathStrokePercent=l),n.d=d.getStr()}return Wn(n,a.transform),Fn(n,t,a,e),e.animation&&Ua(a,n,e),yt(s,a.id+"",n)}function md(a,e){var t=a.style,r=t.image;if(r&&!tt(r)&&(pc(r)?r=r.src:dc(r)&&(r=r.toDataURL())),!!r){var i=t.x||0,n=t.y||0,o=t.width,s=t.height,l={href:r,width:o,height:s};return i&&(l.x=i),n&&(l.y=n),Wn(l,a.transform),Fn(l,t,a,e),e.animation&&Ua(a,l,e),yt("image",a.id+"",l)}}function Sd(a,e){var t=a.style,r=t.text;if(r!=null&&(r+=""),!(!r||isNaN(t.x)||isNaN(t.y))){var i=t.font||ch,n=t.x||0,o=vh(t.y||0,hh(i),t.textBaseline),s=fh[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(ph(t)){var u="",c=t.fontStyle,v=dh(t.fontSize);if(!parseFloat(v))return;var h=t.fontFamily||gh,f=t.fontWeight;u+="font-size:"+v+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),f&&f!=="normal"&&(u+="font-weight:"+f+";"),l.style=u}else l.style="font: "+i;return r.match(/\s/)&&(l["xml:space"]="preserve"),n&&(l.x=n),o&&(l.y=o),Wn(l,a.transform),Fn(l,t,a,e),e.animation&&Ua(a,l,e),yt("text",a.id+"",l,void 0,r)}}function qo(a,e){if(a instanceof qt)return gc(a,e);if(a instanceof ue)return md(a,e);if(a instanceof Iu)return Sd(a,e)}function xd(a,e,t){var r=a.style;if(mh(r)){var i=Sh(a),n=t.shadowCache,o=n[i];if(!o){var s=a.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,v=r.shadowOffsetY||0,h=r.shadowBlur,f=Ar(r.shadowColor),p=f.opacity,d=f.color,g=h/2/l,y=h/2/u,m=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=yt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yt("feDropShadow","",{dx:c/l,dy:v/u,stdDeviation:m,"flood-color":d,"flood-opacity":p})]),n[i]=o}e.filter=Ma(o)}}function yc(a,e,t,r){var i=a[t],n,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(nh(i))n="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(oh(i))n="radialGradient",o.cx=Ct(i.x,.5),o.cy=Ct(i.y,.5),o.r=Ct(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var v=sh(s[u].offset)*100+"%",h=s[u].color,f=Ar(h),p=f.color,d=f.opacity,g={offset:v};g["stop-color"]=p,d<1&&(g["stop-opacity"]=d),l.push(yt("stop",u+"",g))}var y=yt(n,"",o,l),m=On(y),S=r.gradientCache,x=S[m];x||(x=r.zrId+"-g"+r.gradientIdx++,S[m]=x,o.id=x,r.defs[x]=yt(n,x,o,l)),e[t]=Ma(x)}function mc(a,e,t,r){var i=a.style[t],n=a.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",v;if(lh(i)){var h=i.imageWidth,f=i.imageHeight,p=void 0,d=i.image;if(tt(d)?p=d:pc(d)?p=d.src:dc(d)&&(p=d.toDataURL()),typeof Image=="undefined"){var g="Image width/height must been given explictly in svg-ssr renderer.";Tr(h,g),Tr(f,g)}else if(h==null||f==null){var y=function(T,C){if(T){var M=T.elm,P=h||C.width,I=f||C.height;T.tag==="pattern"&&(u?(I=1,P/=n.width):c&&(P=1,I/=n.height)),T.attrs.width=P,T.attrs.height=I,M&&(M.setAttribute("width",P),M.setAttribute("height",I))}},m=uh(p,null,a,function(T){l||y(_,T),y(v,T)});m&&m.width&&m.height&&(h=h||m.width,f=f||m.height)}v=yt("image","img",{href:p,width:h,height:f}),o.width=h,o.height=f}else i.svgElement&&(v=vt(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(!!v){var S,x;l?S=x=1:u?(x=1,S=o.width/n.width):c?(S=1,x=o.height/n.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),x!=null&&!isNaN(x)&&(o.height=x);var b=Lu(i);b&&(o.patternTransform=b);var _=yt("pattern","",o,[v]),w=On(_),A=r.patternCache,L=A[w];L||(L=r.zrId+"-p"+r.patternIdx++,A[w]=L,o.id=L,_=r.defs[L]=yt("pattern",L,o,[v])),e[t]=Ma(L)}}function bd(a,e,t){var r=t.clipPathCache,i=t.defs,n=r[a.id];if(!n){n=t.zrId+"-c"+t.clipPathIdx++;var o={id:n};r[a.id]=n,i[n]=yt("clipPath",n,o,[gc(a,t)])}e["clip-path"]=Ma(n)}function Jo(a){return document.createTextNode(a)}function ze(a,e,t){a.insertBefore(e,t)}function Qo(a,e){a.removeChild(e)}function ts(a,e){a.appendChild(e)}function Sc(a){return a.parentNode}function xc(a){return a.nextSibling}function oi(a,e){a.textContent=e}var es=58,_d=120,wd=yt("","");function ln(a){return a===void 0}function se(a){return a!==void 0}function Ad(a,e,t){for(var r={},i=e;i<=t;++i){var n=a[i].key;n!==void 0&&(r[n]=i)}return r}function dr(a,e){var t=a.key===e.key,r=a.tag===e.tag;return r&&t}function Ir(a){var e,t=a.children,r=a.tag;if(se(r)){var i=a.elm=hc(r);if(Hn(wd,a),O(t))for(e=0;e<t.length;++e){var n=t[e];n!=null&&ts(i,Ir(n))}else se(a.text)&&!Bt(a.text)&&ts(i,Jo(a.text))}else a.elm=Jo(a.text);return a.elm}function bc(a,e,t,r,i){for(;r<=i;++r){var n=t[r];n!=null&&ze(a,Ir(n),e)}}function ga(a,e,t,r){for(;t<=r;++t){var i=e[t];if(i!=null)if(se(i.tag)){var n=Sc(i.elm);Qo(n,i.elm)}else Qo(a,i.elm)}}function Hn(a,e){var t,r=e.elm,i=a&&a.attrs||{},n=e.attrs||{};if(i!==n){for(t in n){var o=n[t],s=i[t];s!==o&&(o===!0?r.setAttribute(t,""):o===!1?r.removeAttribute(t):t.charCodeAt(0)!==_d?r.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?r.setAttributeNS(nd,t,o):t.charCodeAt(3)===es?r.setAttributeNS(od,t,o):t.charCodeAt(5)===es?r.setAttributeNS(vc,t,o):r.setAttribute(t,o))}for(t in i)t in n||r.removeAttribute(t)}}function Td(a,e,t){for(var r=0,i=0,n=e.length-1,o=e[0],s=e[n],l=t.length-1,u=t[0],c=t[l],v,h,f,p;r<=n&&i<=l;)o==null?o=e[++r]:s==null?s=e[--n]:u==null?u=t[++i]:c==null?c=t[--l]:dr(o,u)?(qe(o,u),o=e[++r],u=t[++i]):dr(s,c)?(qe(s,c),s=e[--n],c=t[--l]):dr(o,c)?(qe(o,c),ze(a,o.elm,xc(s.elm)),o=e[++r],c=t[--l]):dr(s,u)?(qe(s,u),ze(a,s.elm,o.elm),s=e[--n],u=t[++i]):(ln(v)&&(v=Ad(e,r,n)),h=v[u.key],ln(h)?ze(a,Ir(u),o.elm):(f=e[h],f.tag!==u.tag?ze(a,Ir(u),o.elm):(qe(f,u),e[h]=void 0,ze(a,f.elm,o.elm))),u=t[++i]);(r<=n||i<=l)&&(r>n?(p=t[l+1]==null?null:t[l+1].elm,bc(a,p,t,i,l)):ga(a,e,r,n))}function qe(a,e){var t=e.elm=a.elm,r=a.children,i=e.children;a!==e&&(Hn(a,e),ln(e.text)?se(r)&&se(i)?r!==i&&Td(t,r,i):se(i)?(se(a.text)&&oi(t,""),bc(t,null,i,0,i.length-1)):se(r)?ga(t,r,0,r.length-1):se(a.text)&&oi(t,""):a.text!==e.text&&(se(r)&&ga(t,r,0,r.length-1),oi(t,e.text)))}function Dd(a,e){if(dr(a,e))qe(a,e);else{var t=a.elm,r=Sc(t);Ir(e),r!==null&&(ze(r,e.elm,xc(t)),ga(r,[a],0,0))}return e}var Ld=0,Cd=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=rs(),this.configLayer=rs(),this.storage=t,this._opts=r=F({},r),this.root=e,this._id="zr"+Ld++,this._oldVNode=Uo(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=hc("svg");Hn(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",Dd(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return qo(e,sn(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._width,i=this._height,n=sn(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress;var o=[],s=this._bgVNode=Id(r,i,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=yt("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=G(gt(n.defs),function(h){return n.defs[h]});if(u.length&&o.push(yt("defs","defs",{},u)),e.animation){var c=ud(n.cssNodes,n.cssAnims,{newline:!0});if(c){var v=yt("style","stl",{},[],c);o.push(v)}}return Uo(r,i,o,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},On(this.renderToVNode({animation:Ct(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Ct(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<i;c++){var v=e[c];if(!v.invisible){var h=v.__clipPaths,f=h&&h.length||0,p=l&&l.length||0,d=void 0;for(d=Math.max(f-1,p-1);d>=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;y<f;y++){var m={};bd(h[y],m,t);var S=yt("g","clip-g-"+u++,m,[]);(s?s.children:r).push(S),n[o++]=S,s=S}l=h;var x=qo(v,t);x&&(s?s.children:r).push(x)}}},a.prototype.resize=function(e,t){var r=this._opts,i=this.root,n=this._viewport;if(e!=null&&(r.width=e),t!=null&&(r.height=t),i&&n&&(n.style.display="none",e=Ao(i,0,r),t=Ao(i,1,r),n.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,n){var o=n.style;o.width=e+"px",o.height=t+"px"}if(Tn(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},a.prototype.getWidth=function(){return this._width},a.prototype.getHeight=function(){return this._height},a.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},a.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},a.prototype.toDataURL=function(e){var t=this.renderToString(),r="data:image/svg+xml;";return e?(t=xh(t),t&&r+"base64,"+t):r+"charset=UTF-8,"+encodeURIComponent(t)},a}();function rs(a){return function(){}}function Id(a,e,t,r){var i;if(t&&t!=="none")if(i=yt("rect","bg",{width:a,height:e,x:"0",y:"0",id:"0"}),Mu(t))yc({fill:t},i.attrs,"fill",r);else if(Tn(t))mc({style:{fill:t},dirty:Oe,getBoundingRect:function(){return{width:a,height:e}}},i.attrs,"fill",r);else{var n=Ar(t),o=n.color,s=n.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}var Md=Cd;function Pd(a){a.registerPainter("svg",Md)}var Ed=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return ir(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,r,i){return i.point(r.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(bt),Vd=Ed,_c=4,Rd=function(){function a(){}return a}(),kd=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 Rd},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]<_c,c=this.softClipShape,v;if(u){this._ctx=l;return}for(this._ctx=null,v=this._off;v<i.length;){var h=i[v++],f=i[v++];isNaN(h)||isNaN(f)||c&&!c.contain(h,f)||(s.x=h-n[0]/2,s.y=f-n[1]/2,s.width=n[0],s.height=n[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=v,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,r=t.points,i=t.size,n=this._ctx,o=this.softClipShape,s;if(!!n){for(s=this._off;s<r.length;){var l=r[s++],u=r[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||n.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,r){for(var i=this.shape,n=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=n.length/2-1;u>=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<i.length;){var f=i[h++],p=i[h++];l=Math.min(f,l),c=Math.max(f,c),u=Math.min(p,u),v=Math.max(p,v)}t=this._rect=new xt(l-o/2,u-s/2,c-l+o,v-u+s)}return t},e}(qt),Nd=function(){function a(){this.group=new Z}return a.prototype.updateData=function(e,t){this._clear();var r=this._create();r.setShape({points:e.getLayout("points")}),this._setCommon(r,e,t)},a.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(r){if(r.startIndex!=null){var i=(r.endIndex-r.startIndex)*2,n=r.startIndex*4*2;t=new Float32Array(t.buffer,n,i)}r.setShape("points",t),r.reset()})},a.prototype.incrementalPrepareUpdate=function(e){this._clear()},a.prototype.incrementalUpdate=function(e,t,r){var i=this._newAdded[0],n=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+n.length);l.set(o),l.set(n,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:n}),this._setCommon(u,t,r)}},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new kd({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},a.prototype._setCommon=function(e,t,r){var i=t.hostModel;r=r||{};var n=t.getVisual("symbolSize");e.setShape("size",n instanceof Array?n:[n,n]),e.softClipShape=r.clipShape||null,e.symbolProxy=Gt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<_c;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=lt(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var v=e.hoverDataIdx;v>=0&&(u.dataIndex=v+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),zd=Nd,Bd=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=Pa("").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 zd:new Ea,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}(St),Gd=Bd;function Od(a){j(bh),a.registerSeriesModel(Vd),a.registerChartView(Gd),a.registerLayout(Pa("scatter"))}function Fd(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]=as(c)?c:is(i)})}),t.each(function(o){var s=_h(r[o],function(l){return as(l)})||is(i);r[o].push(s.slice()),t.setItemLayout(o,r[o])})}})}function as(a){return!isNaN(a[0])&&!isNaN(a[1])}function is(a){return[a.cx,a.cy]}function Wd(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 Hd=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=Nr(h.getItemVisual(f,"symbolSize")),g=Gt(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;m<f.length-1;m++){var S=u(d,g);S&&(S.__dimIdx=m,h[m]?(S.setPosition(h[m]),Va[y?"initProps":"updateProps"](S,{x:f[m][0],y:f[m][1]},t,g)):S.setPosition(f[m]),p.add(S))}}function v(h){return G(h,function(f){return[n.cx,n.cy]})}s.diff(l).add(function(h){var f=s.getItemLayout(h);if(!!f){var p=new pe,d=new De,g={shape:{points:f}};p.shape.points=v(f),d.shape.points=v(f),ee(p,g,t,h),ee(d,g,t,h);var y=new Z,m=new Z;y.add(d),y.add(p),y.add(m),c(d.shape.points,f,m,s,h,!0),s.setItemGraphicEl(h,y)}}).update(function(h,f){var p=l.getItemGraphicEl(f),d=p.childAt(0),g=p.childAt(1),y=p.childAt(2),m={shape:{points:s.getItemLayout(h)}};!m.shape.points||(c(d.shape.points,m.shape.points,y,s,h,!1),_e(g),_e(d),pt(d,m,t),pt(g,m,t),s.setItemGraphicEl(h,p))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,f){var p=s.getItemModel(f),d=h.childAt(0),g=h.childAt(1),y=h.childAt(2),m=s.getItemVisual(f,"style"),S=m.fill;o.add(h),d.useStyle(st(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:S})),Ot(d,p,"lineStyle"),Ot(g,p,"areaStyle");var x=p.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,D(["emphasis","select","blur"],function(A){var L=p.getModel([A,"areaStyle"]),T=L.isEmpty()&&L.parentModel.isEmpty();g.ensureState(A).ignore=T&&b}),g.useStyle(st(x.getAreaStyle(),{fill:S,opacity:.7,decal:m.decal}));var _=p.getModel("emphasis"),w=_.getModel("itemStyle").getItemStyle();y.eachChild(function(A){if(A instanceof ue){var L=A.style;A.useStyle(F({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},m))}else A.useStyle(m),A.setColor(S),A.style.strokeNoScale=!0;var T=A.ensureState("emphasis");T.style=vt(w);var C=s.getStore().get(s.getDimensionIndex(A.__dimIdx),f);(C==null||isNaN(C))&&(C=""),Zt(A,Vt(p),{labelFetcher:s.hostModel,labelDataIndex:f,labelDimIndex:A.__dimIdx,defaultText:C,inheritColor:S,defaultOpacity:m.opacity})}),mt(h,_.get("focus"),_.get("blurScope"),_.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(St),$d=Hd,Ud=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ra(K(this.getData,this),K(this.getRawData,this))},e.prototype.getInitialData=function(t,r){return zr(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=wh(this,t);return Rt("section",{header:u,sortBlocks:!0,blocks:G(s,function(v){var h=n.get(n.mapDimension(v.dim),t);return Rt("nameValue",{markerType:"subItem",markerColor:c,name:v.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var r=this.getData(),i=this.coordinateSystem,n=r.getValues(G(i.dimensions,function(u){return r.mapDimension(u)}),t),o=0,s=n.length;o<s;o++)if(!isNaN(n[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(n[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(bt),Yd=Ud,sr=Ah.value;function Yr(a,e){return st({show:e},a)}var Xd=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),r=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),v=this.get("axisNameGap"),h=this.get("triggerEvent"),f=G(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=st({color:p.color},l));var g=Ft(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 jt(g,null,this.ecModel);return re(m,ka.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:Ft({lineStyle:{color:"#bbb"}},sr.axisLine),axisLabel:Yr(sr.axisLabel,!1),axisTick:Yr(sr.axisTick,!1),splitLine:Yr(sr.splitLine,!0),splitArea:Yr(sr.splitArea,!0),indicator:[]},e}(Ht),Zd=Xd,jd=["axisLine","axisTickLabel","axisName"],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=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 Fe(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(jd,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,_=0;_<S.length;_++){if(c){var w=m(g,p,_);g[w].push(new We({shape:{cx:x,cy:b,r:S[_].coord}}))}if(v&&_<S.length-1){var w=m(y,d,_);y[w].push(new Pu({shape:{cx:x,cy:b,r0:S[_].coord,r:S[_+1].coord}}))}}else for(var A,L=G(i,function(E,R){var k=E.getTicksCoords();return A=A==null?k.length-1:Math.min(k.length-1,A),G(k,function(N){return r.coordToPoint(N.coord,R)})}),T=[],_=0;_<=A;_++){for(var C=[],M=0;M<i.length;M++)C.push(L[M][_]);if(C[0]&&C.push(C[0].slice()),c){var w=m(g,p,_);g[w].push(new De({shape:{points:C}}))}if(v&&T){var w=m(y,d,_-1);y[w].push(new pe({shape:{points:C.concat(T)}}))}T=C.slice().reverse()}var P=l.getLineStyle(),I=u.getAreaStyle();D(y,function(E,R){this.group.add(Qt(E,{style:st({stroke:"none",fill:d[R%d.length]},I),silent:!0}))},this),D(g,function(E,R){this.group.add(Qt(E,{style:st({fill:"none",stroke:p[R%p.length]},P),silent:!0}))},this)},e.type="radar",e}(Jt),qd=Kd,Jd=function(a){V(e,a);function e(t,r,i){var n=a.call(this,t,r,i)||this;return n.type="value",n.angle=0,n.name="",n}return e}(ce),Qd=Jd,tg=function(){function a(e,t,r){this.dimensions=[],this._model=e,this._indicatorAxes=G(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new Qd(o,new ji);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,r)}return a.prototype.getIndicatorAxes=function(){return this._indicatorAxes},a.prototype.dataToPoint=function(e,t){var r=this._indicatorAxes[t];return this.coordToPoint(r.dataToCoord(e),t)},a.prototype.coordToPoint=function(e,t){var r=this._indicatorAxes[t],i=r.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},a.prototype.pointToData=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=Math.sqrt(t*t+r*r);t/=i,r/=i;for(var n=Math.atan2(-r,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],v=Math.abs(n-c.angle);v<o&&(s=c,l=u,o=v)}return[l,+(s&&s.coordToData(i))]},a.prototype.resize=function(e,t){var r=e.get("center"),i=t.getWidth(),n=t.getHeight(),o=Math.min(i,n)/2;this.cx=B(r[0],i),this.cy=B(r[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(tt(s)||le(s))&&(s=[0,s]),this.r0=B(s[0],o),this.r=B(s[1],o),D(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},a.prototype.update=function(e,t){var r=this._indicatorAxes,i=this._model;D(r,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();D(r,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var n=i.get("splitNumber"),o=new ji;o.setExtent(0,n),o.setInterval(1),D(r,function(s,l){Th(s.scale,s.model,o)})},a.prototype.convertToPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.convertFromPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.create=function(e,t){var r=[];return e.eachComponent("radar",function(i){var n=new a(i,e,t);r.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=r[i.get("radarIndex")||0])}),r},a.dimensions=[],a}(),eg=tg;function rg(a){a.registerCoordinateSystem("radar",eg),a.registerComponentModel(Zd),a.registerComponentView(qd),a.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(r){t.setItemVisual(r,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function ag(a){j(rg),a.registerChartView($d),a.registerSeriesModel(Yd),a.registerLayout(Fd),a.registerProcessor(Na("radar")),a.registerPreprocessor(Wd)}function $n(a,e,t){var r=a.target;r.x+=e,r.y+=t,r.dirty()}function Un(a,e,t,r){var i=a.target,n=a.zoomLimit,o=a.zoom=a.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/a.zoom;a.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}function wc(a){if(tt(a)){var e=new DOMParser;a=e.parseFromString(a,"text/xml")}var t=a;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var si,ya={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},ns=gt(ya),ma={"alignment-baseline":"textBaseline","stop-color":"stopColor"},os=gt(ma),ig=function(){function a(){this._defs={},this._root=null}return a.prototype.parse=function(e,t){t=t||{};var r=wc(e);this._defsUsePending=[];var i=new Z;this._root=i;var n=[],o=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||t.width),l=parseFloat(r.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),kt(r,i,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;sg(this._defs,this._defsUsePending),this._defsUsePending=[];var c,v;if(o){var h=Ya(o);h.length>=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=Tc(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 It({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=si[s];if(c&&z(si,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=ss[s];if(f&&z(ss,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 Iu({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});$t(t,r),kt(e,r,this._defsUsePending,!1,!1),ng(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(){si={g:function(e,t){var r=new Z;return $t(t,r),kt(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new It;return $t(t,r),kt(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 We;return $t(t,r),kt(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 te;return $t(t,r),kt(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 Dh;return $t(t,r),kt(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=cs(r));var n=new pe({shape:{points:i||[]},silent:!0});return $t(t,n),kt(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var r=e.getAttribute("points"),i;r&&(i=cs(r));var n=new De({shape:{points:i||[]},silent:!0});return $t(t,n),kt(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var r=new ue;return $t(t,r),kt(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 $t(t,s),kt(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 $t(t,s),kt(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=Lh(r);return $t(t,i),kt(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),a}(),ss={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 Dn(e,t,r,i);return ls(a,n),us(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 Ch(e,t,r);return ls(a,i),us(a,i),i}};function ls(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function us(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={};Ac(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function $t(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),st(e.__inheritedStyle,a.__inheritedStyle))}function cs(a){for(var e=Ya(a),t=[],r=0;r<e.length;r+=2){var i=parseFloat(e[r]),n=parseFloat(e[r+1]);t.push([i,n])}return t}function kt(a,e,t,r,i){var n=e,o=n.__inheritedStyle=n.__inheritedStyle||{},s={};a.nodeType===1&&(cg(a,e),Ac(a,o,s),r||vg(a,o,s)),n.style=n.style||{},o.fill!=null&&(n.style.fill=vs(n,"fill",o.fill,t)),o.stroke!=null&&(n.style.stroke=vs(n,"stroke",o.stroke,t)),D(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(n.style[l]=parseFloat(o[l]))}),D(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(n.style[l]=o[l])}),i&&(n.__selfStyle=s),o.lineDash&&(n.style.lineDash=G(Ya(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(n.invisible=!0),o.display==="none"&&(n.ignore=!0)}function ng(a,e){var t=e.__selfStyle;if(t){var r=t.textBaseline,i=r;!r||r==="auto"||r==="baseline"?i="alphabetic":r==="before-edge"||r==="text-before-edge"?i="top":r==="after-edge"||r==="text-after-edge"?i="bottom":(r==="central"||r==="mathematical")&&(i="middle"),a.style.textBaseline=i}var n=e.__inheritedStyle;if(n){var o=n.textAlign,s=o;o&&(o==="middle"&&(s="center"),a.style.textAlign=s)}}var og=/^url\(\s*#(.*?)\)/;function vs(a,e,t,r){var i=t&&t.match(og);if(i){var n=Ih(i[1]);r.push([a,e,n]);return}return t==="none"&&(t=null),t}function sg(a,e){for(var t=0;t<e.length;t++){var r=e[t];r[0].style[r[1]]=a[r[2]]}}var lg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ya(a){return a.match(lg)||[]}var ug=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,li=Math.PI/180;function cg(a,e){var t=a.getAttribute("transform");if(t){t=t.replace(/,/g," ");var r=[],i=null;t.replace(ug,function(v,h,f){return r.push(h,f),""});for(var n=r.length-1;n>0;n-=2){var o=r[n],s=r[n-1],l=Ya(o);switch(i=i||nr(),s){case"translate":He(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Eu(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":za(i,i,-parseFloat(l[0])*li);break;case"skewX":var u=Math.tan(parseFloat(l[0])*li);Zi(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*li);Zi(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 hs=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Ac(a,e,t){var r=a.getAttribute("style");if(!!r){hs.lastIndex=0;for(var i;(i=hs.exec(r))!=null;){var n=i[1],o=z(ya,n)?ya[n]:null;o&&(e[o]=i[2]);var s=z(ma,n)?ma[n]:null;s&&(t[s]=i[2])}}}function vg(a,e,t){for(var r=0;r<ns.length;r++){var i=ns[r],n=a.getAttribute(i);n!=null&&(e[ya[i]]=n)}for(var r=0;r<os.length;r++){var i=os[r],n=a.getAttribute(i);n!=null&&(t[ma[i]]=n)}}function Tc(a,e){var t=e.width/a.width,r=e.height/a.height,i=Math.min(t,r);return{scale:i,x:-(a.x+a.width/2)*i+(e.x+e.width/2),y:-(a.y+a.height/2)*i+(e.y+e.height/2)}}function hg(a,e){var t=new ig;return t.parse(a,e)}var fg=nt(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),pg=function(){function a(e,t){this.type="geoSVG",this._usedGraphicMap=nt(),this._freedGraphics=[],this._mapName=e,this._parsedXML=wc(t)}return a.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=gg(e.named),r=t.regions,i=t.regionsMap;this._regions=r,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},a.prototype._buildGraphic=function(e){var t,r;try{t=e&&hg(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},r=t.root,Tr(r!=null)}catch(g){throw new Error(`Invalid svg format
  4. `+g.message)}var i=new Z;i.add(r),i.isGeoSVGGraphicRoot=!0;var n=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,v=void 0,h=void 0;if(n!=null?(u=0,v=n):s&&(u=s.x,v=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var f=r.getBoundingRect();u==null&&(u=f.x,v=f.width),c==null&&(c=f.y,h=f.height)}l=this._boundingRect=new xt(u,c,v,h)}if(s){var p=Tc(s,l);r.scaleX=r.scaleY=p.scale,r.x=p.x,r.y=p.y}i.setClipPath(new It({shape:l.plain()}));var d=[];return D(t.named,function(g){fg.get(g.svgNodeTagLower)!=null&&(d.push(g),dg(g.el))}),{root:i,boundingRect:l,named:d}},a.prototype.useGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);return r||(r=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,r),r)},a.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);r&&(t.removeKey(e),this._freedGraphics.push(r))},a}();function dg(a){a.silent=!1,a.isGroup&&a.traverse(function(e){e.silent=!1})}function gg(a){var e=[],t=nt();return D(a,function(r){if(r.namedFrom==null){var i=new jp(r.name,r.el);e.push(i),t.set(r.name,i)}}),{regions:e,regionsMap:t}}var un=[126,25],fs="\u5357\u6D77\u8BF8\u5C9B",Ee=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Me=0;Me<Ee.length;Me++)for(var Ye=0;Ye<Ee[Me].length;Ye++)Ee[Me][Ye][0]/=10.5,Ee[Me][Ye][1]/=-10.5/.75,Ee[Me][Ye][0]+=un[0],Ee[Me][Ye][1]+=un[1];function yg(a,e){if(a==="china"){for(var t=0;t<e.length;t++)if(e[t].name===fs)return;e.push(new oc(fs,G(Ee,function(r){return{type:"polygon",exterior:r}}),un))}}var mg={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function Sg(a,e){if(a==="china"){var t=mg[e.name];if(t){var r=e.getCenter();r[0]+=t[0]/10.5,r[1]+=-t[1]/(10.5/.75),e.setCenter(r)}}}var xg=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function bg(a,e){a==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:xg[0]})}var _g="name",wg=function(){function a(e,t,r){this.type="geoJSON",this._parsedMap=nt(),this._mapName=e,this._specialAreas=r,this._geoJSON=Tg(t)}return a.prototype.load=function(e,t){t=t||_g;var r=this._parsedMap.get(t);if(!r){var i=this._parseToRegions(t);r=this._parsedMap.set(t,{regions:i,boundingRect:Ag(i)})}var n=nt(),o=[];return D(r.regions,function(s){var l=s.name;e&&z(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),n.set(l,s)}),{regions:o,boundingRect:r.boundingRect||new xt(0,0,0,0),regionsMap:n}},a.prototype._parseToRegions=function(e){var t=this._mapName,r=this._geoJSON,i;try{i=r?qp(r,e):[]}catch(n){throw new Error(`Invalid geoJson format
  5. `+n.message)}return yg(t,i),D(i,function(n){var o=n.name;Sg(t,n),bg(t,n);var s=this._specialAreas&&this._specialAreas[o];s&&n.transformTo(s.left,s.top,s.width,s.height)},this),i},a.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},a}();function Ag(a){for(var e,t=0;t<a.length;t++){var r=a[t].getBoundingRect();e=e||r.clone(),e.union(r)}return e}function Tg(a){return tt(a)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(a):new Function("return ("+a+");")():a}var lr=nt(),ge={registerMap:function(a,e,t){if(e.svg){var r=new pg(a,e.svg);lr.set(a,r)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?t=e.specialAreas:i=e;var r=new wg(a,i,t);lr.set(a,r)}},getGeoResource:function(a){return lr.get(a)},getMapForUser:function(a){var e=lr.get(a);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(a,e,t){var r=lr.get(a);if(!!r)return r.load(e,t)}},Yn=["rect","circle","line","ellipse","polygon","polyline","path"],Dg=nt(Yn),Lg=nt(Yn.concat(["g"])),Cg=nt(Yn.concat(["g"])),Dc=Mt();function Xr(a){var e=a.getItemStyle(),t=a.get("areaColor");return t!=null&&(e.fill=t),e}function ps(a){var e=a.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Ig=function(){function a(e){var t=new Z;this.uid=Mh("ec_map_draw"),this._controller=new Ba(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Z),t.add(this._svgGroup=new Z)}return a.prototype.draw=function(e,t,r,i,n){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,v=l.getTransformInfo(),h=v.raw,f=v.roam,p=!u.childAt(0)||n;p?(c.x=f.x,c.y=f.y,c.scaleX=f.scaleX,c.scaleY=f.scaleY,c.dirty()):pt(c,f,e);var d=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw: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<f.length;++g){var y=c(f[g],d);y&&p.push(y)}return p}function h(f){return{shape:{points:v(f)}}}i.removeAll(),D(e.geo.regions,function(f){var p=f.name,d=t.get(p),g=r.get(p)||{},y=g.dataIdx,m=g.regionModel;d||(d=t.set(p,new Z),i.add(d),y=s?s.indexOfName(p):null,m=e.isGeo?o.getRegionModel(p):s?s.getItemModel(y):null,r.set(p,{dataIdx:y,regionModel:m}));var S=[],x=[];D(f.geometries,function(w){if(w.type==="polygon"){var A=[w.exterior].concat(w.interiors||[]);u&&(A=xs(A,u)),D(A,function(T){S.push(new pe(h(T)))})}else{var L=w.points;u&&(L=xs(L,u,!0)),D(L,function(T){x.push(new De(h(T)))})}});var b=c(f.getCenter(),l&&l.project);function _(w,A){if(!!w.length){var L=new Du({culling:!0,segmentIgnoreThreshold:1,shape:{paths:w}});d.add(L),ds(e,L,y,m),gs(e,L,p,m,o,y,b),A&&(ps(L),D(L.states,ps))}}_(S),_(x,!0)}),t.each(function(f,p){var d=r.get(p),g=d.dataIdx,y=d.regionModel;ys(e,f,p,y,o,g),ms(e,f,p,y,o),Ss(e,f,p,y,o)},this)},a.prototype._buildSVG=function(e){var t=e.geo.map,r=e.transformInfoRaw;this._svgGroup.x=r.x,this._svgGroup.y=r.y,this._svgGroup.scaleX=r.scaleX,this._svgGroup.scaleY=r.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=nt(),n=!1;D(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,v=o.el,h=u?u.indexOfName(s):null,f=l.getRegionModel(s);if(Dg.get(c)!=null&&v instanceof er&&ds(e,v,h,f),v instanceof er&&(v.culling=!0),v.z2EmphasisLift=0,!o.namedFrom&&(Cg.get(c)!=null&&gs(e,v,s,f,l,h,null),ys(e,v,s,f,l,h),ms(e,v,s,f,l),Lg.get(c)!=null)){var p=Ss(e,v,s,f,l);p==="self"&&(n=!0);var d=i.get(s)||i.set(s,[]);d.push(v)}},this),this._enableBlurEntireSVG(n,e)},a.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var r=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=r.opacity;this._svgGraphicRecord.root.traverse(function(n){if(!n.isGroup){rr(n);var o=n.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),n.ensureState("emphasis")}})}},a.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},a.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var r=t.coordinateSystem;if(r.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var n=i.get(e);return n?[n]:[]}}else if(r.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},a.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},a.prototype._useSVG=function(e){var t=ge.getGeoResource(e);if(t&&t.type==="geoSVG"){var r=t.useGraphic(this.uid);this._svgGroup.add(r.root),this._svgGraphicRecord=r,this._svgMapName=e}},a.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=ge.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},a.prototype._updateController=function(e,t,r){var i=e.coordinateSystem,n=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=i.getZoom(),n.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}n.off("pan").on("pan",function(u){this._mouseDownFlag=!1,$n(o,u.dx,u.dy),r.dispatchAction(F(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),n.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Un(o,u.scale,u.originX,u.originY),r.dispatchAction(F(l(),{zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),n.setPointerChecker(function(u,c,v){return i.containPoint([c,v])&&!Ln(u,r,e)})},a.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=Dc(t).ignore)})},a.prototype._updateMapSelectHandler=function(e,t,r,i){var n=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){n._mouseDownFlag=!0}),t.on("click",function(o){!n._mouseDownFlag||(n._mouseDownFlag=!1)}))},a}();function ds(a,e,t,r){var i=r.getModel("itemStyle"),n=r.getModel(["emphasis","itemStyle"]),o=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=Xr(i),u=Xr(n),c=Xr(s),v=Xr(o),h=a.data;if(h){var f=h.getItemVisual(t,"style"),p=h.getItemVisual(t,"decal");a.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=Cn(p,a.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=v,rr(e)}function gs(a,e,t,r,i,n,o){var s=a.data,l=a.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),n)),c=s&&s.getItemLayout(n);if(l||u||c&&c.showLabel){var v=l?t:n,h=void 0;(!s||n>=0)&&(h=i);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Zt(e,Vt(r),{labelFetcher:h,labelDataIndex:v,defaultText:t},f);var p=e.getTextContent();if(p&&(Dc(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 ys(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 ms(a,e,t,r,i){a.data||Vu({el:e,componentModel:i,itemName:t,itemTooltipOption:r.get("tooltip")})}function Ss(a,e,t,r,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=r.getModel("emphasis"),o=n.get("focus");return mt(e,o,n.get("blurScope"),n.get("disabled")),a.isGeo&&Ph(e,i,t),o}function xs(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<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),r}var Lc=Ig,Mg=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){if(!(n&&n.type==="mapToggleSelect"&&n.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&n&&n.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),n&&n.type==="geoRoam"&&n.componentType==="series"&&n.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new Lc(i);o.add(s.group),s.draw(t,r,i,this,n),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&r.getComponent("legend")&&this._renderSymbols(t,r,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,r,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=n.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,v=u.offset,h=new We({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+v*9,cy:c[1],r:3},silent:!0,z2:8+(v?0:Br+1)});if(!v){var f=t.mainSeries.getData(),p=n.getName(l),d=f.indexOfName(p),g=n.getItemModel(l),y=g.getModel("label"),m=f.getItemGraphicEl(d);Zt(h,Vt(g),{labelFetcher:{getFormattedLabel:function(S,x){return t.getFormattedLabel(d,x)}},defaultText:p}),h.disableLabelAnimation=!0,y.get("position")||h.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(S){Ru(h,S)}}o.add(h)}}})},e.type="map",e}(St),Pg=Mg,Eg=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(r){if(r!=null){var i=this.getData().getName(r),n=this.coordinateSystem,o=n.getRegion(i);return o&&n.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var r=zr(this,{coordDimensions:["value"],encodeDefaulter:ct(ku,this)}),i=nt(),n=[],o=0,s=r.count();o<s;o++){var l=r.getName(o);i.set(l,!0)}var u=ge.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return D(u.regions,function(c){var v=c.name;i.get(v)||n.push(v)}),r.appendValues([],n),r},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var r=this.getData();return r.get(r.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var r=this.getData();return r.getItemModel(r.indexOfName(t))},e.prototype.formatTooltip=function(t,r,i){for(var n=this.getData(),o=this.getRawValue(t),s=n.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var v=l[c].originalData.indexOfName(s),h=n.mapDimension("value");isNaN(l[c].originalData.get(h,v))||u.push(l[c].name)}return Rt("section",{header:u.join(", "),noHeader:!u.length,blocks:[Rt("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var r=t.icon||"roundRect",i=Gt(r,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",r.indexOf("empty")>-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}(bt),Vg=Eg;function Rg(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;c<u;c++)s=Math.min(s,t[n][c]),l=Math.max(l,t[n][c]),o+=t[n][c];var v;return e==="min"?v=s:e==="max"?v=l:e==="average"?v=o/u:v=o,u===0?NaN:v})}function kg(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getHostGeoModel(),i=r?"o"+r.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),D(e,function(t,r){for(var i=Rg(G(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(var n=0;n<t.length;n++)t[n].seriesGroup=t,t[n].needsDrawMap=n===0&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}function Ng(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getMapType();if(!(t.getHostGeoModel()||e[r])){var i={};D(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&a.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var v=l.getName(c),h=s.getRegion(v);if(!(!h||isNaN(u))){var f=i[v]||0,p=s.dataToPoint(h.getCenter());i[v]=f+1,l.setItemLayout(c,{point:p,offset:f})}})});var n=t.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),e[r]=!0}})}var bs=wr,zg=function(a){V(e,a);function e(t){var r=a.call(this)||this;return r.type="view",r.dimensions=["x","y"],r._roamTransformable=new $r,r._rawTransformable=new $r,r.name=t,r}return e.prototype.setBoundingRect=function(t,r,i,n){return this._rect=new xt(t,r,i,n),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,r,i,n){this._transformTo(t,r,i,n),this._viewRect=new xt(t,r,i,n)},e.prototype._transformTo=function(t,r,i,n){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new xt(t,r,i,n));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,r){!t||(this._center=[B(t[0],r.getWidth()),B(t[1],r.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var r=this.zoomLimit;r&&(r.max!=null&&(t=Math.min(r.max,t)),r.min!=null&&(t=Math.max(r.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),r=t.x+t.width/2,i=t.y+t.height/2;return[r,i]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),r=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=wr([],n,t),i=wr([],i,t),r.originX=n[0],r.originY=n[1],r.x=i[0]-n[0],r.y=i[1]-n[1],r.scaleX=r.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,r=this._rawTransformable;r.parent=t,t.updateTransform(),r.updateTransform(),Eh(this.transform||(this.transform=[]),r.transform||nr()),this._rawTransform=r.getLocalTransform(),this.invTransform=this.invTransform||[],wu(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,r=this._roamTransformable,i=new $r;return i.transform=r.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,r,i){var n=r?this._rawTransform:this.transform;return i=i||[],n?bs(i,t,n):Lt(i,t)},e.prototype.pointToData=function(t){var r=this.invTransform;return r?bs([],t,r):[t[0],t[1]]},e.prototype.convertToPixel=function(t,r,i){var n=_s(r);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,r,i){var n=_s(r);return n===this?n.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}($r);function _s(a){var e=a.seriesModel;return e?e.coordinateSystem:null}var Hr=zg,Bg={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Cc=["lng","lat"],Ic=function(a){V(e,a);function e(t,r,i){var n=a.call(this,t)||this;n.dimensions=Cc,n.type="geo",n._nameCoordMap=nt(),n.map=r;var o=i.projection,s=ge.load(r,i.nameMap,i.nameProperty),l=ge.getGeoResource(r);n.resourceType=l?l.type:null;var u=n.regions=s.regions,c=Bg[l.type];n._regionsMap=s.regionsMap,n.regions=s.regions,n.projection=o;var v;if(o)for(var h=0;h<u.length;h++){var f=u[h].getBoundingRect(o);v=v||f.clone(),v.union(f)}else v=s.boundingRect;return n.setBoundingRect(v.x,v.y,v.width,v.height),n.aspectScale=o?1:Ct(i.aspectScale,c.aspectScale),n._invertLongitute=o?!1:c.invertLongitute,n}return e.prototype._transformTo=function(t,r,i,n){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new xt(t,r,i,n));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var r=this.regions,i=0;i<r.length;i++){var n=r[i];if(n.type==="geoJSON"&&n.contain(t))return r[i]}},e.prototype.addGeoCoord=function(t,r){this._nameCoordMap.set(t,r)},e.prototype.getGeoCoord=function(t){var r=this._regionsMap.get(t);return this._nameCoordMap.get(t)||r&&r.getCenter()},e.prototype.dataToPoint=function(t,r,i){if(tt(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t,r,i)}},e.prototype.pointToData=function(t){var r=this.projection;return r&&(t=r.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return a.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,r,i){return a.prototype.dataToPoint.call(this,t,r,i)},e.prototype.convertToPixel=function(t,r,i){var n=ws(r);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,r,i){var n=ws(r);return n===this?n.pointToData(i):null},e}(Hr);re(Ic,Hr);function ws(a){var e=a.geoModel,t=a.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",or).models[0]||{}).coordinateSystem:null}var As=Ic;function Ts(a,e){var t=a.get("boundingCoords");if(t!=null){var r=t[0],i=t[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(i[0])&&isFinite(i[1])){var n=this.projection;if(n){var o=r[0],s=r[1],l=i[0],u=i[1];r=[1/0,1/0],i=[-1/0,-1/0];var c=function(_,w,A,L){for(var T=A-_,C=L-w,M=0;M<=100;M++){var P=M/100,I=n.project([_+T*P,w+C*P]);Au(r,r,I),Tu(i,i,I)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(r[0],r[1],i[0]-r[0],i[1]-r[1])}}var v=this.getBoundingRect(),h=a.get("layoutCenter"),f=a.get("layoutSize"),p=e.getWidth(),d=e.getHeight(),g=v.width/v.height*this.aspectScale,y=!1,m,S;h&&f&&(m=[B(h[0],p),B(h[1],d)],S=B(f,Math.min(p,d)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(S)&&(y=!0));var x;if(y)x={},g>1?(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=ae(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 Gg(a,e){D(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var Og=function(){function a(){this.dimensions=Cc}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 As(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=Ts,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 As(s,s,F({nameMap:In(l)},i(o[0])));u.zoomLimit=Nt.apply(null,G(o,function(c){return c.get("scaleLimit")})),r.push(u),u.resize=Ts,u.resize(o[0],t),D(o,function(c){c.coordinateSystem=u,Gg(u,c)})}),r},a.prototype.getFilledRegions=function(e,t,r,i){for(var n=(e||[]).slice(),o=nt(),s=0;s<n.length;s++)o.set(n[s].name,n[s]);var l=ge.load(t,r,i);return D(l.regions,function(u){var c=u.name;!o.get(c)&&n.push({name:c})}),n},a}(),Fg=new Og,Mc=Fg,Wg=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=ge.getGeoResource(t.map);if(n&&n.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,i),Ga(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,r=this.option;r.regions=Mc.getFilledRegions(r.regions,r.map,r.nameMap,r.nameProperty);var i={};this._optionModelMap=Nu(r.regions||[],function(n,o){var s=o.name;return s&&(n.set(s,new jt(o,t,t.ecModel)),o.selected&&(i[s]=!0)),n},nt()),r.selectedMap||(r.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new jt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,r){var i=this.getRegionModel(t),n=r==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};if(ut(n))return o.status=r,n(o);if(tt(n))return n.replace("{a}",t!=null?t:"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var r=this.option,i=r.selectedMode;if(!!i){i!=="multiple"&&(r.selectedMap=null);var n=r.selectedMap||(r.selectedMap={});n[t]=!0}},e.prototype.unSelect=function(t){var r=this.option.selectedMap;r&&(r[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var r=this.option.selectedMap;return!!(r&&r[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Ht),Hg=Wg;function Ds(a,e){return a.pointToProjected?a.pointToProjected(e):a.pointToData(e)}function Xn(a,e,t,r){var i=a.getZoom(),n=a.getCenter(),o=e.zoom,s=a.projectedToPoint?a.projectedToPoint(n):a.dataToPoint(n);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,a.setCenter(Ds(a,s),r)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(i*o,u),l)/i}a.scaleX*=o,a.scaleY*=o;var c=(e.originX-a.x)*(o-1),v=(e.originY-a.y)*(o-1);a.x-=c,a.y-=v,a.updateTransform(),a.setCenter(Ds(a,s),r),a.setZoom(o*i)}return{center:a.getCenter(),zoom:a.getZoom()}}var $g=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,r){this._api=r},e.prototype.render=function(t,r,i,n){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Lc(i));var o=this._mapDraw;o.draw(t,r,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,r,i)},e.prototype._handleRegionClick=function(t){var r;zu(t.target,function(i){return(r=lt(i).eventData)!=null},!0),r&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:r.name})},e.prototype.updateSelectStatus=function(t,r,i){var n=this;this._mapDraw.group.traverse(function(o){var s=lt(o).eventData;if(s)return n._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(Jt),Ug=$g;function Yg(a,e,t){ge.registerMap(a,e,t)}function Pc(a){a.registerCoordinateSystem("geo",Mc),a.registerComponentModel(Hg),a.registerComponentView(Ug),a.registerImpl("registerMap",Yg),a.registerImpl("getMap",function(t){return ge.getMapForUser(t)});function e(t,r){r.update="geo:updateSelectStatus",a.registerAction(r,function(i,n){var o={},s=[];return n.eachComponent({mainType:"geo",query:i},function(l){l[t](i.name);var u=l.coordinateSystem;D(u.regions,function(v){o[v.name]=l.isSelected(v.name)||!1});var c=[];D(o,function(v,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),a.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,r,i){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Xn(s,t,o.get("scaleLimit"),i);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),n==="series"&&D(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Xg(a){j(Pc),a.registerChartView(Pg),a.registerSeriesModel(Vg),a.registerLayout(Ng),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,kg),Vh("map",a.registerAction)}function Zg(a){var e=a;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],r,i;r=t.pop();)if(i=r.children,r.isExpand&&i.length)for(var n=i.length,o=n-1;o>=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 jg(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){Jg(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=Qg(a,i,a.parentNode.hierNode.defaultAncestor||r[0],e)}function Kg(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Ls(a){return arguments.length?a:ry}function gr(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function qg(a,e){return ae(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Jg(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 Qg(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=ui(s),n=ci(n),s&&n;){i=ui(i),o=ci(o),i.hierNode.ancestor=a;var h=s.hierNode.prelim+v-n.hierNode.prelim-u+r(s,n);h>0&&(ey(ty(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&&!ui(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=v-l),n&&!ci(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-c,t=a)}return t}function ui(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function ci(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function ty(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function ey(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 ry(a,e){return a.parentNode===e.parentNode?1:2}var ay=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),iy=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 ay},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;p<n-1;p++){var d=i[p];t.moveTo(d[0],d[1]),f[c]=d[c],t.lineTo(f[0],f[1])}},e}(qt),ny=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Z,t}return e.prototype.init=function(t,r){this._controller=new Ba(r.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,r,i){var n=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,i),this._updateController(t,r,i);var u=this._data;n.diff(u).add(function(c){Cs(n,c)&&Is(n,c,null,s,t)}).update(function(c,v){var h=u.getItemGraphicEl(v);if(!Cs(n,c)){h&&Ps(u,v,h,s,t);return}Is(n,c,h,s,t)}).remove(function(c){var v=u.getItemGraphicEl(c);v&&Ps(u,c,v,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&n.eachItemGraphicEl(function(c,v){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:v})})}),this._data=n},e.prototype._updateViewCoordSys=function(t,r){var i=t.getData(),n=[];i.each(function(v){var h=i.getItemLayout(v);h&&!isNaN(h.x)&&!isNaN(h.y)&&n.push([+h.x,+h.y])});var o=[],s=[];Bu(n,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=t.coordinateSystem=new Hr;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),r),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,r,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,v){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,v)&&!Ln(u,i,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){$n(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Un(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(t),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var r=t.getData(),i=this._getNodeGlobalScale(t);r.eachItemGraphicEl(function(n,o){n.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(t){var r=t.coordinateSystem;if(r.type!=="view")return 1;var i=this._nodeScaleRatio,n=r.scaleX||1,o=r.getZoom(),s=(o-1)*i+1;return s/n},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(St);function Cs(a,e){var t=a.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function Is(a,e,t,r,i){var n=!t,o=a.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=a.tree.root,v=o.parentNode===c?o:o.parentNode||o,h=a.getItemGraphicEl(v.dataIndex),f=v.getLayout(),p=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:f,d=o.getLayout();n?(t=new Gu(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=d.rawX,t.__radialRawY=d.rawY,r.add(t),a.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,pt(t,{x:d.x,y:d.y},i);var g=t.getSymbolPath();if(i.get("layout")==="radial"){var y=c.children[0],m=y.getLayout(),S=y.children.length,x=void 0,b=void 0;if(d.x===m.x&&o.isExpand===!0&&y.children.length){var _={x:(y.children[0].getLayout().x+y.children[S-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[S-1].getLayout().y)/2};x=Math.atan2(_.y-m.y,_.x-m.x),x<0&&(x=Math.PI*2+x),b=_.x<m.x,b&&(x=x-Math.PI)}else x=Math.atan2(d.y-m.y,d.x-m.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=d.x<m.x,b&&(x=x-Math.PI)):(b=d.x>m.x,b||(x=x-Math.PI));var w=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")||w,rotation:L==null?-x:T,origin:"center"}),C.setStyle("verticalAlign","middle"))}var M=s.get(["emphasis","focus"]),P=M==="relative"?Ki(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;P&&(lt(t).focus=P),oy(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===Rh||Ru(t.__edge,I)}})}function oy(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 Ou({shape:cn(c,v,h,i,i)})),pt(d,{shape:cn(c,v,h,n,o)},a));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var S=g[m].getLayout();y.push([S.x,S.y])}d||(d=r.__edge=new iy({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:v,forkPosition:f}})),pt(d,{shape:{parentPoint:[o.x,o.y],childPoints:y}},a)}d&&!(u==="polyline"&&!e.isExpand)&&(d.useStyle(st({strokeNoScale:!0,fill:null},p)),Ot(d,l,"lineStyle"),rr(d),s.add(d))}function Ms(a,e,t,r,i){var n=e.tree.root,o=Ec(n,a),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(a.dataIndex);if(!!u){var c=e.getItemGraphicEl(s.dataIndex),v=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?v:void 0),f=r.get("edgeShape"),p=r.get("layout"),d=r.get("orient"),g=r.get(["lineStyle","curveness"]);h&&(f==="curve"?va(h,{shape:cn(p,d,g,l,l),style:{opacity:0}},r,{cb:function(){t.remove(h)},removeOpt:i}):f==="polyline"&&r.get("layout")==="orthogonal"&&va(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},r,{cb:function(){t.remove(h)},removeOpt:i}))}}function Ec(a,e){for(var t=e.parentNode===a?e:e.parentNode||e,r;r=t.getLayout(),r==null;)t=t.parentNode===a?t:t.parentNode||t;return{source:t,sourceLayout:r}}function Ps(a,e,t,r,i){var n=a.tree.getNodeByDataIndex(e),o=a.tree.root,s=Ec(o,n).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};va(t,{x:s.x+1,y:s.y+1},i,{cb:function(){r.remove(t),a.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,a.hostModel,{fadeLabel:!0,animation:l}),n.children.forEach(function(u){Ms(u,a,r,i,l)}),Ms(n,a,r,i,l)}function cn(a,e,t,r,i){var n,o,s,l,u,c,v,h;if(a==="radial"){u=r.rawX,v=r.rawY,c=i.rawX,h=i.rawY;var f=gr(u,v),p=gr(u,v+(h-v)*t),d=gr(c,h+(v-h)*t),g=gr(c,h);return{x1:f.x||0,y1:f.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:d.x||0,cpy2:d.y||0}}else u=r.x,v=r.y,c=i.x,h=i.y,(e==="LR"||e==="RL")&&(n=u+(c-u)*t,o=v,s=c+(u-c)*t,l=h),(e==="TB"||e==="BT")&&(n=u,o=v+(h-v)*t,s=c,l=h+(v-h)*t);return{x1:u,y1:v,x2:c,y2:h,cpx1:n,cpy1:o,cpx2:s,cpy2:l}}var sy=ny,Xt=Mt();function Vc(a){var e=a.mainData,t=a.datas;t||(t={main:e},a.datasAttr={main:"data"}),a.datas=a.mainData=null,Rc(e,t,a),D(t,function(r){D(e.TRANSFERABLE_METHODS,function(i){r.wrapMethod(i,ct(ly,a))})}),e.wrapMethod("cloneShallow",ct(cy,a)),D(e.CHANGABLE_METHODS,function(r){e.wrapMethod(r,ct(uy,a))}),Tr(t[e.dataType]===e)}function ly(a,e){if(fy(this)){var t=F({},Xt(this).datas);t[this.dataType]=e,Rc(e,t,a)}else Zn(e,this.dataType,Xt(this).mainData,a);return e}function uy(a,e){return a.struct&&a.struct.update(),e}function cy(a,e){return D(Xt(e).datas,function(t,r){t!==e&&Zn(t.cloneShallow(),r,e,a)}),e}function vy(a){var e=Xt(this).mainData;return a==null||e==null?e:Xt(e).datas[a]}function hy(){var a=Xt(this).mainData;return a==null?[{data:a}]:G(gt(Xt(a).datas),function(e){return{type:e,data:Xt(a).datas[e]}})}function fy(a){return Xt(a).mainData===a}function Rc(a,e,t){Xt(a).datas={},D(e,function(r,i){Zn(r,i,a,t)})}function Zn(a,e,t,r){Xt(t).datas[e]=a,Xt(a).mainData=t,a.dataType=e,r.struct&&(a[r.structAttr]=r.struct,r.struct[r.datasAttr[e]]=a),a.getLinkedData=vy,a.getLinkedDataAll=hy}var py=function(){function a(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return a.prototype.isRemoved=function(){return this.dataIndex<0},a.prototype.eachNode=function(e,t,r){ut(e)&&(r=t,t=e,e=null),e=e||{},tt(e)&&(e={order:e});var i=e.order||"preorder",n=this[e.attr||"children"],o;i==="preorder"&&(o=t.call(r,this));for(var s=0;!o&&s<n.length;s++)n[s].eachNode(e,t,r);i==="postorder"&&t.call(r,this)},a.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var r=0;r<this.children.length;r++){var i=this.children[r];i.updateDepthAndHeight(e+1),i.height>t&&(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<i;t++){var n=r[t].getNodeById(e);if(n)return n}},a.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,i=r.length;t<i;t++){var n=r[t].contains(e);if(n)return n}},a.prototype.getAncestors=function(e){for(var t=[],r=e?this:this.parentNode;r;)t.push(r),r=r.parentNode;return t.reverse(),t},a.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},a.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},a.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},a.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},a.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},a.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},a}(),dy=function(){function a(e){this.type="tree",this._nodes=[],this.hostModel=e}return a.prototype.eachNode=function(e,t,r){this.root.eachNode(e,t,r)},a.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},a.prototype.getNodeById=function(e){return this.root.getNodeById(e)},a.prototype.update=function(){for(var e=this.data,t=this._nodes,r=0,i=t.length;r<i;r++)t[r].dataIndex=-1;for(var r=0,i=e.count();r<i;r++)t[e.getRawIndex(r)].dataIndex=r},a.prototype.clearLayouts=function(){this.data.clearItemLayouts()},a.createTree=function(e,t,r){var i=new a(t),n=[],o=1;s(e);function s(c,v){var h=c.value;o=Math.max(o,O(h)?h.length:1),n.push(c);var f=new py(ve(c.name,""),i);v?gy(f,v):i.root=f,i._nodes.push(f);var p=c.children;if(p)for(var d=0;d<p.length;d++)s(p[d],f)}i.root.updateDepthAndHeight(0);var l=Mn(n,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new zt(l,t);return u.initData(n),r&&r(u),Vc({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},a}();function gy(a,e){var t=e.children;a.parentNode!==e&&(t.push(a),a.parentNode=e)}var jn=dy;function Mr(a,e,t){if(a&&Wt(e,a.type)>=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 kc(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function Kn(a,e){var t=kc(a);return Wt(t,e)>=0}function Xa(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 yy=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 jt(i,this,this.ecModel),o=jn.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 Rt("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=Xa(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}(bt),my=yy;function Sy(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<o.length;s++)r.push(o[s])}for(;n=i.pop();)e(n,t)}function ur(a,e){for(var t=[a],r;r=t.pop();)if(e(r),r.isExpand){var i=r.children;if(i.length)for(var n=i.length-1;n>=0;n--)t.push(i[n])}}function xy(a,e){a.eachSeriesByType("tree",function(t){by(t,e)})}function by(a,e){var t=qg(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=Ls(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(i=t.width,n=t.height,o=Ls());var s=a.getData().tree.root,l=s.children[0];if(l){Zg(s),Sy(l,jg,o),s.hierNode.modifier=-l.hierNode.prelim,ur(l,Kg);var u=l,c=l,v=l;ur(l,function(S){var x=S.getLayout().x;x<u.getLayout().x&&(u=S),x>c.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),ur(l,function(S){g=(S.getLayout().x+f)*p,y=(S.depth-1)*d;var x=gr(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),ur(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),ur(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 _y(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 wy(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=Xn(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function Ay(a){a.registerChartView(sy),a.registerSeriesModel(my),a.registerLayout(xy),a.registerVisual(_y),wy(a)}var Es=["treemapZoomToNode","treemapRender","treemapMove"];function Ty(a){for(var e=0;e<Es.length;e++)a.registerAction({type:Es[e],update:"updateView"},Oe);a.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(n,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Mr(t,s,n);if(l){var u=n.getViewRoot();u&&(t.direction=Kn(u,l.node)?"rollUp":"drillDown"),n.resetViewRoot(l.node)}}})}function Nc(a){var e=a.getData(),t=e.tree,r={};t.eachNode(function(i){for(var n=i;n&&n.depth>1;)n=n.parentNode;var o=qi(a.ecModel,n.name||n.dataIndex+"",r);i.setVisual("decal",o)})}var Dy=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};zc(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new jt({itemStyle:o},this,r);n=t.levels=Ly(n,r);var l=G(n||[],function(v){return new jt(v,s,r)},this),u=jn.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 Rt("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=Xa(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(){Nc(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}(bt);function zc(a){var e=0;D(a.children,function(r){zc(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 Ly(a,e){var t=de(e.get("color")),r=de(e.get(["aria","decal","decals"]));if(!!t){a=a||[];var i,n;D(a,function(s){var l=new jt(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 Cy=Dy,Iy=8,Vs=8,vi=5,My=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),Pn(o,v.pos,v.box)}},a.prototype._prepare=function(e,t,r){for(var i=e;i;i=i.parentNode){var n=ve(i.getModel().get("name"),""),o=r.getTextRect(n),s=Math.max(o.width+Iy*2,t.emptyItemWidth);t.totalWidth+=s+Vs,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=kh(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 pe({shape:{points:Py(l,0,m,c,d===f.length-1,d===0)},style:st(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new ft({style:dt(n,{text:S})}),textConfig:{position:"inside"},z2:Br*1e4,onclick:ct(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=dt(o,{text:S}),x.ensureState("emphasis").style=p,mt(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),Ey(x,e,y),l+=m+Vs}},a.prototype.remove=function(){this.group.removeAll()},a}();function Py(a,e,t,r,i,n){var o=[[i?a:a-vi,e],[a+t,e],[a+t,e+r],[i?a:a-vi,e+r]];return!n&&o.splice(2,0,[a+t+vi,e+r/2]),!i&&o.push([a,e+r/2]),o}function Ey(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&&Xa(t,e)}}var Vy=My,Ry=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;i<n;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:r,aborted:r})}return this},a}();function ky(){return new Ry}var vn=Z,Rs=It,ks=3,Ns="label",zs="upperLabel",Ny=Br*10,zy=Br*2,By=Br*3,Ve=Fu([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Bs=function(a){var e=Ve(a);return e.stroke=e.fill=e.lineWidth=null,e},Sa=Mt(),Gy=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=cr(),t}return e.prototype.render=function(t,r,i,n){var o=r.findComponents({mainType:"series",subType:"treemap",query:n});if(!(Wt(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=r;var s=["treemapZoomToNode","treemapRootToNode"],l=Mr(n,s,t),u=n&&n.type,c=t.layoutInfo,v=!this._oldTree,h=this._storage,f=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:n.direction}:null,p=this._giveContainerGroup(c),d=t.get("animation"),g=this._doRender(p,t,f);d&&!v&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,f):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,l)}},e.prototype._giveContainerGroup=function(t){var r=this._containerGroup;return r||(r=this._containerGroup=new vn,this._initEvents(r),this.group.add(r)),r.x=t.x,r.y=t.y,r},e.prototype._doRender=function(t,r,i){var n=r.getData().tree,o=this._oldTree,s=cr(),l=cr(),u=this._storage,c=[];function v(g,y,m,S){return Oy(r,l,u,i,s,c,g,y,m,S)}f(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var h=p(u);return this._oldTree=n,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:d};function f(g,y,m,S,x){S?(y=g,D(g,function(w,A){!w.isRemoved()&&_(A,A)})):new Oa(y,g,b,b).add(_).update(_).remove(ct(_,null)).execute();function b(w){return w.getId()}function _(w,A){var L=w!=null?g[w]:null,T=A!=null?y[A]:null,C=v(L,T,m,x);C&&f(L&&L.viewChildren||[],T&&T.viewChildren||[],C,S,x+1)}}function p(g){var y=cr();return g&&D(g,function(m,S){var x=y[S];D(m,function(b){b&&(x.push(b),Sa(b).willDelete=!0)})}),y}function d(){D(h,function(g){D(g,function(y){y.parent&&y.parent.remove(y)})}),D(c,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,r,i,n){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(ut(o)?0:o)||0,u=(ut(s)?null:s)||"cubicOut",c=ky();D(r.willDeleteEls,function(v,h){D(v,function(f,p){if(!f.invisible){var d=f.parent,g,y=Sa(d);if(n&&n.direction==="drillDown")g=d===n.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,S=0;y.willDelete||(m=y.nodeWidth/2,S=y.nodeHeight/2),g=h==="nodeGroup"?{x:m,y:S,style:{opacity:0}}:{shape:{x:m,y:S,width:0,height:0},style:{opacity:0}}}g&&c.add(f,g,l,0,u)}})}),D(this._storage,function(v,h){D(v,function(f,p){var d=r.lastsForAnimation[h][p],g={};!d||(f instanceof Z?d.oldX!=null&&(g.x=f.x,g.y=f.y,f.x=d.oldX,f.y=d.oldY):(d.oldShape&&(g.shape=F({},f.shape),f.setShape(d.oldShape)),d.fadein?(f.setStyle("opacity",0),g.style={opacity:1}):f.style.opacity!==1&&(g.style={opacity:1})),c.add(f,g,l,0,u))})},this),this._state="animating",c.finished(K(function(){this._state="ready",r.renderFinally()},this)).start()},e.prototype._resetController=function(t){var r=this._controller;r||(r=this._controller=new Ba(t.getZr()),r.enable(this.seriesModel.get("roam")),r.on("pan",K(this._onPan,this)),r.on("zoom",K(this._onZoom,this)));var i=new xt(0,0,t.getWidth(),t.getHeight());r.setPointerChecker(function(n,o,s){return i.contain(o,s)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>ks||Math.abs(t.dy)>ks)){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 xt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;r-=l.x,i-=l.y;var u=nr();He(u,u,[-r,-i]),Eu(u,u,[t.scale,t.scale]),He(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&&Wu(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 Vy(this.group))).render(t,r,i.node,function(o){n._state!=="animating"&&(Kn(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=cr(),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}(St);function cr(){return{nodeGroup:[],background:[],content:[]}}function Oy(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,_=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),L=h.getModel(["select","itemStyle"]),T=_.get("borderRadius")||0,C=q("nodeGroup",vn);if(!C)return;if(l.add(C),C.x=c.x||0,C.y=c.y||0,C.markRedraw(),Sa(C).nodeWidth=f,Sa(C).nodeHeight=p,c.isAboveViewRoot)return C;var M=q("background",Rs,u,zy);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)To(C)&&fr(C,!1),M&&(fr(M,!R),v.setItemGraphicEl(o.dataIndex,M),Do(M,k,E));else{var N=q("content",Rs,u,By);N&&$(C,N),M.disableMorphing=!0,M&&To(M)&&fr(M,!1),fr(C,!R),v.setItemGraphicEl(o.dataIndex,C),Do(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"),At=ot.stroke,Dt=Bs(_);Dt.fill=At;var ht=Ve(w);ht.fill=w.get("borderColor");var Pt=Ve(A);Pt.fill=A.get("borderColor");var Et=Ve(L);if(Et.fill=L.get("borderColor"),at){var ie=f-2*d;Q(Y,At,ot.opacity,{x:d,y:0,width:ie,height:x})}else Y.removeTextContent();Y.setStyle(Dt),Y.ensureState("emphasis").style=ht,Y.ensureState("blur").style=Pt,Y.ensureState("select").style=Et,rr(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 At=o.getVisual("style"),Dt=At.fill,ht=Bs(_);ht.fill=Dt,ht.decal=At.decal;var Pt=Ve(w),Et=Ve(A),ie=Ve(L);Q(Y,Dt,At.opacity,null),Y.setStyle(ht),Y.ensureState("emphasis").style=Pt,Y.ensureState("blur").style=Et,Y.ensureState("select").style=ie,rr(Y)}J.add(Y)}function U(J){!J.invisible&&n.push(J)}function Q(J,Y,at,rt){var ot=h.getModel(rt?zs:Ns),At=ve(h.get("name"),null),Dt=ot.getShallow("show");Zt(J,Vt(h,rt?zs:Ns),{defaultText:Dt?At:null,inheritColor:Y,defaultOpacity:at,labelFetcher:a,labelDataIndex:o.dataIndex});var ht=J.getTextContent();if(!!ht){var Pt=ht.style,Et=Nh(Pt.padding||0);rt&&(J.setTextConfig({layoutRect:rt}),ht.disableLabelLayout=!0),ht.beforeUpdate=function(){var Le=Math.max((rt?rt.width:J.shape.width)-Et[1]-Et[3],0),Ce=Math.max((rt?rt.height:J.shape.height)-Et[0]-Et[2],0);(Pt.width!==Le||Pt.height!==Ce)&&ht.setStyle({width:Le,height:Ce})},Pt.truncateMinChar=2,Pt.lineOverflow="truncate",et(Pt,rt,c);var ie=ht.getState("emphasis");et(ie?ie.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],At=i[J];return ot?(t[J][m]=null,it(At,ot)):g||(ot=new Y,ot instanceof er&&(ot.z2=Fy(at,rt)),Tt(At,ot)),e[J][y]=ot}function it(J,Y){var at=J[y]={};Y instanceof vn?(at.oldX=Y.x,at.oldY=Y.y):at.oldShape=F({},Y.shape)}function Tt(J,Y){var at=J[y]={},rt=o.parentNode,ot=Y instanceof Z;if(rt&&(!r||r.direction==="drillDown")){var At=0,Dt=0,ht=i.background[rt.getRawIndex()];!r&&ht&&ht.oldShape&&(At=ht.oldShape.width,Dt=ht.oldShape.height),ot?(at.oldX=0,at.oldY=Dt):at.oldShape={x:At,y:Dt,width:0,height:0}}at.fadein=!ot}}function Fy(a,e){return a*Ny+e}var Wy=Gy,Pr=D,Hy=Bt,xa=-1,qn=function(){function a(e){var t=e.mappingMethod,r=e.type,i=this.option=vt(e);this.type=r,this.mappingMethod=t,this._normalizeData=Yy[t];var n=a.visualHandlers[r];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(hi(i),$y(i)):t==="category"?i.categories?Uy(i):hi(i,!0):(Tr(t!=="linear"||i.dataExtent),hi(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 gt(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){Bt(e)?D(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var i,n=O(e)?[]:Bt(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&&Pr(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(Hy(e)){var t=[];Pr(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<s;o++){var l=t[o].value;if(l!=null){if(l===e||tt(l)&&l===e+"")return o;r&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,v=u.close;if(c){if(c[0]===-1/0){if(jr(v[1],e,c[1]))return o}else if(c[1]===1/0){if(jr(v[0],c[0],e))return o}else if(jr(v[0],c[0],e)&&jr(v[1],e,c[1]))return o;r&&h(c[0],o),r&&h(c[1],o)}}if(r)return e===1/0?t.length-1:e===-1/0?0:i;function h(f,p){var d=Math.abs(f-e);d<n&&(n=d,i=p)}},a.visualHandlers={color:{applyVisual:vr("color"),getColorMapper:function(){var e=this.option;return K(e.mappingMethod==="category"?function(t,r){return!r&&(t=this._normalizeData(t)),yr.call(this,t)}:function(t,r,i){var n=!!i;return!r&&(t=this._normalizeData(t)),i=Ka(t,e.parsedVisual,i),n?i:qa(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return qa(Ka(e,this.option.parsedVisual),"rgba")},category:yr,piecewise:function(e,t){var r=fn.call(this,t);return r==null&&(r=qa(Ka(e,this.option.parsedVisual),"rgba")),r},fixed:Re}},colorHue:Zr(function(e,t){return xr(e,t)}),colorSaturation:Zr(function(e,t){return xr(e,null,t)}),colorLightness:Zr(function(e,t){return xr(e,null,null,t)}),colorAlpha:Zr(function(e,t){return ha(e,t)}),decal:{applyVisual:vr("decal"),_normalizedToVisual:{linear:null,category:yr,piecewise:null,fixed:null}},opacity:{applyVisual:vr("opacity"),_normalizedToVisual:hn([0,1])},liftZ:{applyVisual:vr("liftZ"),_normalizedToVisual:{linear:Re,category:Re,piecewise:Re,fixed:Re}},symbol:{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("symbol",i)},_normalizedToVisual:{linear:Gs,category:yr,piecewise:function(e,t){var r=fn.call(this,t);return r==null&&(r=Gs.call(this,e)),r},fixed:Re}},symbolSize:{applyVisual:vr("symbolSize"),_normalizedToVisual:hn([0,1])}},a}();function $y(a){var e=a.pieceList;a.hasSpecialVisual=!1,D(e,function(t,r){t.originIndex=r,t.visual!=null&&(a.hasSpecialVisual=!0)})}function Uy(a){var e=a.categories,t=a.categoryMap={},r=a.visual;if(Pr(e,function(o,s){t[o]=s}),!O(r)){var i=[];Bt(r)?Pr(r,function(o,s){var l=t[s];i[l!=null?l:xa]=o}):i[xa]=r,r=Bc(a,i)}for(var n=e.length-1;n>=0;n--)r[n]==null&&(delete t[e[n]],e.pop())}function hi(a,e){var t=a.visual,r=[];Bt(t)?Pr(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]),Bc(a,r)}function Zr(a){return{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("color",a(t("color"),i))},_normalizedToVisual:hn([0,1])}}function Gs(a){var e=this.option.visual;return e[Math.round(_t(a,[0,1],[0,e.length-1],!0))]||{}}function vr(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function yr(a){var e=this.option.visual;return e[this.option.loop&&a!==xa?a%e.length:a]}function Re(){return this.option.visual[0]}function hn(a){return{linear:function(e){return _t(e,a,this.option.visual,!0)},category:yr,piecewise:function(e,t){var r=fn.call(this,t);return r==null&&(r=_t(e,a,this.option.visual,!0)),r},fixed:Re}}function fn(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=qn.findPieceIndex(a,t),i=t[r];if(i&&i.visual)return i.visual[this.type]}}function Bc(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=G(e,function(t){var r=zh(t);return r||[0,0,0,1]})),e}var Yy={linear:function(a){return _t(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=qn.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?xa:e},fixed:Oe};function jr(a,e,t){return a?e<=t:e<t}var wt=qn,Xy="itemStyle",Gc=Mt(),Zy={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||Oc(t,{},a.getViewRoot().getAncestors(),a)}};function Oc(a,e,t,r){var i=a.getModel(),n=a.getLayout(),o=a.hostTree.data;if(!(!n||n.invisible||!n.isInView)){var s=i.getModel(Xy),l=jy(s,e,r),u=o.ensureUniqueItemVisual(a.dataIndex,"style"),c=s.get("borderColor"),v=s.get("borderColorSaturation"),h;v!=null&&(h=Os(l),c=Ky(v,h)),u.stroke=c;var f=a.viewChildren;if(!f||!f.length)h=Os(l),u.fill=h;else{var p=qy(a,i,n,s,l,f);D(f,function(d,g){if(d.depth>=t.length||d===t[d.depth]){var y=Jy(i,l,d,g,p,r);Oc(d,y,t,r)}})}}}function jy(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 Os(a){var e=fi(a,"color");if(e){var t=fi(a,"colorAlpha"),r=fi(a,"colorSaturation");return r&&(e=xr(e,null,null,r)),t&&(e=ha(e,t)),e}}function Ky(a,e){return e!=null?xr(e,null,null,a):null}function fi(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function qy(a,e,t,r,i,n){if(!(!n||!n.length)){var o=pi(e,"color")||i.color!=null&&i.color!=="none"&&(pi(e,"colorAlpha")||pi(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var 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 wt(v);return Gc(h).drColorMappingBy=c,h}}}function pi(a,e){var t=a.get(e);return O(t)&&t.length?{name:e,range:t}:null}function Jy(a,e,t,r,i,n){var o=F({},e);if(i){var s=i.type,l=s==="color"&&Gc(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 Er=Math.max,ba=Math.min,Fs=Nt,Jn=D,Fc=["itemStyle","borderWidth"],Qy=["itemStyle","gapWidth"],tm=["upperLabel","show"],em=["upperLabel","height"],rm={seriesType:"treemap",reset:function(a,e,t,r){var i=t.getWidth(),n=t.getHeight(),o=a.option,s=ae(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=B(Fs(s.width,l[0]),i),c=B(Fs(s.height,l[1]),n),v=r&&r.type,h=["treemapZoomToNode","treemapRootToNode"],f=Mr(r,h,a),p=v==="treemapRender"||v==="treemapMove"?r.rootRect:null,d=a.getViewRoot(),g=kc(d);if(v!=="treemapMove"){var y=v==="treemapZoomToNode"?lm(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),Wc(d,S,!1,0),x=d.getLayout(),Jn(g,function(_,w){var A=(g[w+1]||d).getValue();_.setLayout(F({dataExtent:[A,A],borderWidth:0,upperHeight:0},x))})}var b=a.getData().tree.root;b.setLayout(um(s,p,f),!0),a.setLayoutInfo(s),Hc(b,new xt(-s.x,-s.y,i,n),g,d,0)}};function Wc(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(Fc),u=s.get(Qy)/2,c=$c(s),v=Math.max(l,c),h=l-u,f=v-u;a.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:c},!0),i=Er(i-2*h,0),n=Er(n-h-f,0);var p=i*n,d=am(a,s,p,e,t,r);if(!!d.length){var g={x:h,y:f,width:i,height:n},y=ba(i,n),m=1/0,S=[];S.area=0;for(var x=0,b=d.length;x<b;){var _=d[x];S.push(_),S.area+=_.getLayout().area;var w=sm(S,y,e.squareRatio);w<=m?(x++,m=w):(S.area-=S.pop().getLayout().area,Ws(S,y,g,u,!1),y=ba(g.width,g.height),S.length=S.area=0,m=1/0)}if(S.length&&Ws(S,y,g,u,!0),!t){var A=s.get("childrenVisibleMin");A!=null&&p<A&&(t=!0)}for(var x=0,b=d.length;x<b;x++)Wc(d[x],e,t,r+1)}}}function am(a,e,t,r,i,n){var o=a.children||[],s=r.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=r.leafDepth!=null&&r.leafDepth<=n;if(i&&!l)return a.viewChildren=[];o=Kt(o,function(f){return!f.isRemoved()}),nm(o,s);var u=om(e,o,s);if(u.sum===0)return a.viewChildren=[];if(u.sum=im(e,t,u.sum,s,o),u.sum===0)return a.viewChildren=[];for(var c=0,v=o.length;c<v;c++){var h=o[c].getValue()/u.sum*t;o[c].setLayout({area:h})}return l&&(o.length&&a.setLayout({isLeafRoot:!0},!0),o.length=0),a.viewChildren=o,a.setLayout({dataExtent:u.dataExtent},!0),o}function im(a,e,t,r,i){if(!r)return t;for(var n=a.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[r==="asc"?o-l-1:l].getValue();u/t*e<n&&(s=l,t-=u)}return r==="asc"?i.splice(0,o-s):i.splice(s,o-s),t}function nm(a,e){return e&&a.sort(function(t,r){var i=e==="asc"?t.getValue()-r.getValue():r.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-r.dataIndex:r.dataIndex-t.dataIndex:i}),a}function om(a,e,t){for(var r=0,i=0,n=e.length;i<n;i++)r+=e[i].getValue();var o=a.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Jn(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function sm(a,e,t){for(var r=0,i=1/0,n=0,o=void 0,s=a.length;n<s;n++)o=a[n].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Er(u*r/l,l/(u*i)):1/0}function Ws(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;v<h;v++){var f=a[v],p={},d=c?f.getLayout().area/c:0,g=p[l[o]]=Er(c-2*r,0),y=t[s[n]]+t[l[n]]-u,m=v===h-1||y<d?y:d,S=p[l[n]]=Er(m-2*r,0);p[s[o]]=t[s[o]]+ba(r,g/2),p[s[n]]=u+ba(r,S/2),u+=m,f.setLayout(p,!0)}t[s[o]]+=c,t[l[o]]-=c}function lm(a,e,t,r,i){var n=(e||{}).node,o=[r,i];if(!n||n===t)return o;for(var s,l=r*i,u=l*a.option.zoomToNodeRatio;s=n.parentNode;){for(var c=0,v=s.children,h=0,f=v.length;h<f;h++)c+=v[h].getValue();var p=n.getValue();if(p===0)return o;u*=c/p;var d=s.getModel(),g=d.get(Fc),y=Math.max(g,$c(d));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>Lo&&(u=Lo),n=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[r*m,i*m]}function um(a,e,t){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!t)return r;var i=t.node,n=i.getLayout();if(!n)return r;for(var o=[n.width/2,n.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:a.width/2-o[0],y:a.height/2-o[1]}}function Hc(a,e,t,r,i){var n=a.getLayout(),o=t[i],s=o&&o===a;if(!(o&&!s||i===t.length&&a!==r)){a.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new xt(e.x-n.x,e.y-n.y,e.width,e.height);Jn(a.viewChildren||[],function(u){Hc(u,l,t,r,i+1)})}}function $c(a){return a.get(tm)?a.get(em):0}function cm(a){a.registerSeriesModel(Cy),a.registerChartView(Wy),a.registerVisual(Zy),a.registerLayout(rm),Ty(a)}function vm(a){var e=a.findComponents({mainType:"legend"});!e||!e.length||a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),i=t.getGraph(),n=i.data,o=r.mapArray(r.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){le(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function hm(a){var e={};a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),i=t.getData(),n={};r.each(function(o){var s=r.getName(o);n["ec-"+s]=o;var l=r.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),r.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],v=0;v<c.length;v++){var h=l.getShallow(c[v],!0);h!=null&&r.setItemVisual(o,c[v],h)}}),r.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){tt(l)&&(l=n["ec-"+l]);var u=r.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");F(c,u);for(var v=["symbol","symbolSize","symbolKeepAspect"],h=0;h<v.length;h++)i.setItemVisual(o,v[h],r.getItemVisual(l,v[h]))}})})}function Kr(a){return a instanceof Array||(a=[a,a]),a}function fm(a){a.eachSeriesByType("graph",function(e){var t=e.getGraph(),r=e.getEdgeData(),i=Kr(e.get("edgeSymbol")),n=Kr(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each(function(o){var s=r.getItemModel(o),l=t.getEdgeByIndex(o),u=Kr(s.getShallow("symbol",!0)),c=Kr(s.getShallow("symbolSize",!0)),v=s.getModel("lineStyle").getLineStyle(),h=r.ensureUniqueItemVisual(o,"style");switch(F(h,v),h.stroke){case"source":{var f=l.node1.getVisual("style");h.stroke=f&&f.fill;break}case"target":{var f=l.node2.getVisual("style");h.stroke=f&&f.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var pn="-->",Za=function(a){return a.get("autoCurveness")||null},Uc=function(a,e){var t=Za(a),r=20,i=[];if(le(t))r=t;else if(O(t)){a.__curvenessList=t;return}e>r&&(r=e);var n=r%2?r+2:r+3;i=[];for(var o=0;o<n;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));a.__curvenessList=i},Vr=function(a,e,t){var r=[a.id,a.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,r,i].join(pn)},Yc=function(a){var e=a.split(pn);return[e[0],e[2],e[1]].join(pn)},pm=function(a,e){var t=Vr(a.node1,a.node2,e);return e.__edgeMap[t]},dm=function(a,e){var t=dn(Vr(a.node1,a.node2,e),e),r=dn(Vr(a.node2,a.node1,e),e);return t+r},dn=function(a,e){var t=e.__edgeMap;return t[a]?t[a].length:0};function gm(a){!Za(a)||(a.__curvenessList=[],a.__edgeMap={},Uc(a))}function ym(a,e,t,r){if(!!Za(t)){var i=Vr(a,e,t),n=t.__edgeMap,o=n[Yc(i)];n[i]&&!o?n[i].isForward=!0:o&&n[i]&&(o.isForward=!0,n[i].isForward=!1),n[i]=n[i]||[],n[i].push(r)}}function Qn(a,e,t,r){var i=Za(e),n=O(i);if(!i)return null;var o=pm(a,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=dm(a,e);Uc(e,u),a.lineStyle=a.lineStyle||{};var c=Vr(a.node1,a.node2,e),v=e.__curvenessList,h=n||u%2?0:1;if(o.isForward)return v[h+s];var f=Yc(c),p=dn(f,e),d=v[s+p+h];return r?n?i&&i[0]===0?(p+h)%2?d:-d:((p%2?0:1)+h)%2?d:-d:(p+h)%2?d:-d:v[s+p+h]}function Xc(a){var e=a.coordinateSystem;if(!(e&&e.type!=="view")){var t=a.getGraph();t.eachNode(function(r){var i=r.getModel();r.setLayout([+i.get("x"),+i.get("y")])}),to(t,a)}}function to(a,e){a.eachEdge(function(t,r){var i=Gr(t.getModel().get(["lineStyle","curveness"]),-Qn(t,e,r,!0),0),n=xe(t.node1.getLayout()),o=xe(t.node2.getLayout()),s=[n,o];+i&&s.push([(n[0]+o[0])/2-(n[1]-o[1])*i,(n[1]+o[1])/2-(o[0]-n[0])*i]),t.setLayout(s)})}function mm(a,e){a.eachSeriesByType("graph",function(t){var r=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var n=t.getData(),o=[];D(i.dimensions,function(h){o=o.concat(n.mapDimensionsAll(h))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var v=n.get(o[c],s);isNaN(v)||(u=!0),l.push(v)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}to(n.graph,t)}else(!r||r==="none")&&Xc(t)})}function mr(a){var e=a.coordinateSystem;if(e.type!=="view")return 1;var t=a.option.nodeScaleRatio,r=e.scaleX,i=e.getZoom(),n=(i-1)*t+1;return n/r}function Sr(a){var e=a.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Hs=Math.PI,di=[];function eo(a,e,t,r){var i=a.coordinateSystem;if(!(i&&i.type!=="view")){var n=i.getBoundingRect(),o=a.getData(),s=o.graph,l=n.width/2+n.x,u=n.height/2+n.y,c=Math.min(n.width,n.height)/2,v=o.count();if(o.setLayout({cx:l,cy:u}),!!v){if(t){var h=i.pointToData(r),f=h[0],p=h[1],d=[f-l,p-u];Or(d,d),Bh(d,d,c),t.setLayout([l+d[0],u+d[1]],!0);var g=a.get(["circular","rotateLabel"]);Zc(t,g,l,u)}Sm[e](a,s,o,c,l,u,v),s.eachEdge(function(y,m){var S=Gr(y.getModel().get(["lineStyle","curveness"]),Qn(y,a,m),0),x=xe(y.node1.getLayout()),b=xe(y.node2.getLayout()),_,w=(x[0]+b[0])/2,A=(x[1]+b[1])/2;+S&&(S*=3,_=[l*S+w*(1-S),u*S+A*(1-S)]),y.setLayout([x,b,_])})}}}var Sm={value:function(a,e,t,r,i,n,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var v=c.getValue("value"),h=u*(l?v:1)/2;s+=h,c.setLayout([r*Math.cos(s)+i,r*Math.sin(s)+n]),s+=h})},symbolSize:function(a,e,t,r,i,n,o){var s=0;di.length=o;var l=mr(a);e.eachNode(function(v){var h=Sr(v);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var f=Math.asin(h/2/r);isNaN(f)&&(f=Hs/2),di[v.dataIndex]=f,s+=f*2});var u=(2*Hs-s)/o/2,c=0;e.eachNode(function(v){var h=u+di[v.dataIndex];c+=h,(!v.getLayout()||!v.getLayout().fixed)&&v.setLayout([r*Math.cos(c)+i,r*Math.sin(c)+n]),c+=h})}};function Zc(a,e,t,r){var i=a.getGraphicEl();if(!!i){var n=a.getModel(),o=n.get(["label","rotate"])||0,s=i.getSymbolPath();if(e){var l=a.getLayout(),u=Math.atan2(l[1]-r,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var v=c?"left":"right";s.setTextConfig({rotation:-u,position:v,origin:"center"});var h=s.ensureState("emphasis");F(h.textConfig||(h.textConfig={}),{position:v})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function xm(a){a.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&eo(e,"symbolSize")})}var Xe=Ji;function bm(a,e,t){for(var r=a,i=e,n=t.rect,o=n.width,s=n.height,l=[n.x+o/2,n.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<r.length;c++){var v=r[c];v.p||(v.p=Gh(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),v.pp=xe(v.p),v.edges=null}var h=t.friction==null?.6:t.friction,f=h,p,d;return{warmUp:function(){f=h*.8},setFixed:function(g){r[g].fixed=!0},setUnfixed:function(g){r[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){d=g},step:function(g){p&&p(r,i);for(var y=[],m=r.length,S=0;S<i.length;S++){var x=i[S];if(!x.ignoreForceLayout){var b=x.n1,_=x.n2;Je(y,_.p,b.p);var w=Co(y)-x.d,A=_.w/(b.w+_.w);isNaN(A)&&(A=0),Or(y,y),!b.fixed&&Xe(b.p,b.p,y,A*w*f),!_.fixed&&Xe(_.p,_.p,y,-(1-A)*w*f)}}for(var S=0;S<m;S++){var L=r[S];L.fixed||(Je(y,l,L.p),Xe(L.p,L.p,y,u*f))}for(var S=0;S<m;S++)for(var b=r[S],T=S+1;T<m;T++){var _=r[T];Je(y,_.p,b.p);var w=Co(y);w===0&&(Oh(y,Math.random()-.5,Math.random()-.5),w=1);var C=(b.rep+_.rep)/w/w;!b.fixed&&Xe(b.pp,b.pp,y,C),!_.fixed&&Xe(_.pp,_.pp,y,-C)}for(var M=[],S=0;S<m;S++){var L=r[S];L.fixed||(Je(M,L.p,L.pp),Xe(L.p,L.p,M,f),Lt(L.pp,L.p))}f=f*.992;var P=f<.01;d&&d(r,i,P),g&&g(P)}}}function _m(a){a.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var r=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(S){var x=n.getId(S);n.setItemLayout(S,r[x]||[NaN,NaN])}):!l||l==="none"?Xc(e):l==="circular"&&eo(e,"value");var u=n.getDataExtent("value"),c=o.getDataExtent("value"),v=s.get("repulsion"),h=s.get("edgeLength"),f=O(v)?v:[v,v],p=O(h)?h:[h,h];p=[p[1],p[0]];var d=n.mapArray("value",function(S,x){var b=n.getItemLayout(x),_=_t(S,u,f);return isNaN(_)&&(_=(f[0]+f[1])/2),{w:_,rep:_,fixed:n.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(S,x){var b=i.getEdgeByIndex(x),_=_t(S,c,p);isNaN(_)&&(_=(p[0]+p[1])/2);var w=b.getModel(),A=Gr(b.getModel().get(["lineStyle","curveness"]),-Qn(b,e,x,!0),0);return{n1:d[b.node1.dataIndex],n2:d[b.node2.dataIndex],d:_,curveness:A,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=bm(d,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(S,x){for(var b=0,_=S.length;b<_;b++)S[b].fixed&&Lt(S[b].p,i.getNodeByIndex(b).getLayout())}),m.afterStep(function(S,x,b){for(var _=0,w=S.length;_<w;_++)S[_].fixed||i.getNodeByIndex(_).setLayout(S[_].p),r[n.getId(_)]=S[_].p;for(var _=0,w=x.length;_<w;_++){var A=x[_],L=i.getEdgeByIndex(_),T=A.n1.p,C=A.n2.p,M=L.getLayout();M=M?M.slice():[],M[0]=M[0]||[],M[1]=M[1]||[],Lt(M[0],T),Lt(M[1],C),+A.curveness&&(M[2]=[(T[0]+C[0])/2-(T[1]-C[1])*A.curveness,(T[1]+C[1])/2-(C[0]-T[0])*A.curveness]),L.setLayout(M)}}),e.forceLayout=m,e.preservedPoints=r,m.step()}else e.forceLayout=null})}function wm(a,e,t){var r=F(a.getBoxLayoutParams(),{aspect:t});return ae(r,{width:e.getWidth(),height:e.getHeight()})}function Am(a,e){var t=[];return a.eachSeriesByType("graph",function(r){var i=r.get("coordinateSystem");if(!i||i==="view"){var n=r.getData(),o=n.mapArray(function(g){var y=n.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];Bu(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=wm(r,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var v=l[0]-s[0],h=l[1]-s[1],f=c.width,p=c.height,d=r.coordinateSystem=new Hr;d.zoomLimit=r.get("scaleLimit"),d.setBoundingRect(s[0],s[1],v,h),d.setViewRect(c.x,c.y,f,p),d.setCenter(r.get("center"),e),d.setZoom(r.get("zoom")),t.push(d)}}),t}var $s=te.prototype,gi=Ou.prototype,jc=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a}();(function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e})(jc);function yi(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var Tm=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-line",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new jc},e.prototype.buildPath=function(t,r){yi(r)?$s.buildPath.call(this,t,r):gi.buildPath.call(this,t,r)},e.prototype.pointAt=function(t){return yi(this.shape)?$s.pointAt.call(this,t):gi.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var r=this.shape,i=yi(r)?[r.x2-r.x1,r.y2-r.y1]:gi.tangentAt.call(this,t);return Or(i,i)},e}(qt),Dm=Tm,mi=["fromSymbol","toSymbol"];function Us(a){return"_"+a+"Type"}function Ys(a,e,t){var r=e.getItemVisual(t,a);if(!r||r==="none")return r;var i=e.getItemVisual(t,a+"Size"),n=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=Nr(i),u=Fr(o||0,l);return r+l+u+(n||"")+(s||"")}function Xs(a,e,t){var r=e.getItemVisual(t,a);if(!(!r||r==="none")){var i=e.getItemVisual(t,a+"Size"),n=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=Nr(i),u=Fr(o||0,l),c=Gt(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=n==null||isNaN(n)?void 0:+n*Math.PI/180||0,c.name=a,c}}function Lm(a){var e=new Dm({name:"line",subPixelOptimize:!0});return gn(e.shape,a),e}function gn(a,e){a.x1=e[0][0],a.y1=e[0][1],a.x2=e[1][0],a.y2=e[1][1],a.percent=1;var t=e[2];t?(a.cpx1=t[0],a.cpy1=t[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Cm=function(a){V(e,a);function e(t,r,i){var n=a.call(this)||this;return n._createLine(t,r,i),n}return e.prototype._createLine=function(t,r,i){var n=t.hostModel,o=t.getItemLayout(r),s=Lm(o);s.shape.percent=0,ee(s,{shape:{percent:1}},n,r),this.add(s),D(mi,function(l){var u=Xs(l,t,r);this.add(u),this[Us(l)]=Ys(l,t,r)},this),this._updateCommonStl(t,r,i)},e.prototype.updateData=function(t,r,i){var n=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(r),l={shape:{}};gn(l.shape,s),pt(o,l,n,r),D(mi,function(u){var c=Ys(u,t,r),v=Us(u);if(this[v]!==c){this.remove(this.childOfName(u));var h=Xs(u,t,r);this.add(h)}this[v]=c},this),this._updateCommonStl(t,r,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,r,i){var n=t.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,v=i&&i.emphasisDisabled,h=i&&i.focus,f=i&&i.blurScope;if(!i||t.hasItemOption){var p=t.getItemModel(r),d=p.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),v=d.get("disabled"),h=d.get("focus"),f=d.get("blurScope"),c=Vt(p)}var g=t.getItemVisual(r,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,D(mi,function(_){var w=this.childOfName(_);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var A=0;A<Qi.length;A++){var L=Qi[A],T=o.getState(L);if(T){var C=T.style||{},M=w.ensureState(L),P=M.style||(M.style={});C.stroke!=null&&(P[w.__isEmptyBrush?"stroke":"fill"]=C.stroke),C.opacity!=null&&(P.opacity=C.opacity)}}w.markRedraw()}},this);var m=n.getRawValue(r);Zt(this,c,{labelDataIndex:r,labelFetcher:{getFormattedLabel:function(_,w){return n.getFormattedLabel(_,w,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(r):isFinite(m)?En(m):m)+""});var S=this.getTextContent();if(S){var x=c.normal;S.__align=S.style.align,S.__verticalAlign=S.style.verticalAlign,S.__position=x.get("position")||"middle";var b=x.get("distance");O(b)||(b=[b,b]),S.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),mt(this,h,f,v)},e.prototype.highlight=function(){Vn(this)},e.prototype.downplay=function(){Rn(this)},e.prototype.updateLayout=function(t,r){this.setLinePoints(t.getItemLayout(r))},e.prototype.setLinePoints=function(t){var r=this.childOfName("line");gn(r.shape,t),r.dirty()},e.prototype.beforeUpdate=function(){var t=this,r=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.getTextContent();if(!r&&!i&&(!n||n.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),v=l.pointAt(u),h=Je([],v,c);Or(h,h);function f(T,C){var M=T.__specifiedRotation;if(M==null){var P=l.tangentAt(C);T.attr("rotation",(C===1?-1:1)*Math.PI/2-Math.atan2(P[1],P[0]))}else T.attr("rotation",M)}if(r&&(r.setPosition(c),f(r,0),r.scaleX=r.scaleY=o*u,r.markRedraw()),i&&(i.setPosition(v),f(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var p=void 0,d=void 0,g=n.__labelDistance,y=g[0]*o,m=g[1]*o,S=u/2,x=l.tangentAt(S),b=[x[1],-x[0]],_=l.pointAt(S);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var A=-Math.atan2(x[1],x[0]);v[0]<c[0]&&(A=Math.PI+A),n.rotation=A}var L=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":L=-m,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":L=m,d="top";break;default:L=0,d="middle"}switch(n.__position){case"end":n.x=h[0]*y+v[0],n.y=h[1]*m+v[1],p=h[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*w+c[0],n.y=c[1]+L,p=x[0]<0?"right":"left",n.originX=-y*w,n.originY=-L;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=_[0],n.y=_[1]+L,p="center",n.originY=-L;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-y*w+v[0],n.y=v[1]+L,p=x[0]>=0?"right":"left",n.originX=y*w,n.originY=-L;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||p})}},e}(Z),ro=Cm,Im=function(){function a(e){this.group=new Z,this._LineCtor=e||ro}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=Zs(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=Zs(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!Mm(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var n=t.getItemLayout(i);if(Si(n)){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(r),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(e){Fa(this._progressiveEls||this.group,e)},a.prototype._doAdd=function(e,t,r){var i=e.getItemLayout(t);if(!!Si(i)){var n=new this._LineCtor(e,t,r);e.setItemGraphicEl(t,n),this.group.add(n)}},a.prototype._doUpdate=function(e,t,r,i,n){var o=e.getItemGraphicEl(r);if(!Si(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,n):o=new this._LineCtor(t,i,n),t.setItemGraphicEl(i,o),this.group.add(o)},a}();function Mm(a){return a.animators&&a.animators.length>0}function Zs(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:Vt(e)}}function js(a){return isNaN(a[0])||isNaN(a[1])}function Si(a){return a&&!js(a[0])&&!js(a[1])}var ao=Im,xi=[],bi=[],_i=[],Ze=Hu,wi=Wh,Ks=Math.abs;function qs(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){xi[0]=Ze(r[0],i[0],n[0],c),xi[1]=Ze(r[1],i[1],n[1],c);var v=Ks(wi(xi,e)-l);v<o&&(o=v,s=c)}for(var h=0;h<32;h++){var f=s+u;bi[0]=Ze(r[0],i[0],n[0],s),bi[1]=Ze(r[1],i[1],n[1],s),_i[0]=Ze(r[0],i[0],n[0],f),_i[1]=Ze(r[1],i[1],n[1],f);var v=wi(bi,e)-l;if(Ks(v)<.01)break;var p=wi(_i,e)-l;u/=2,v<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Ai(a,e){var t=[],r=Fh,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=[xe(u[0]),xe(u[1])],u[2]&&u.__original.push(xe(u[2])));var h=u.__original;if(u[2]!=null){if(Lt(i[0],h[0]),Lt(i[1],h[2]),Lt(i[2],h[1]),c&&c!=="none"){var f=Sr(s.node1),p=qs(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=Sr(s.node2),p=qs(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]}Lt(u[0],i[0]),Lt(u[1],i[2]),Lt(u[2],i[1])}else{if(Lt(n[0],h[0]),Lt(n[1],h[1]),Je(o,n[1],n[0]),Or(o,o),c&&c!=="none"){var f=Sr(s.node1);Ji(n[0],n[0],o,f*e)}if(v&&v!=="none"){var f=Sr(s.node2);Ji(n[1],n[1],o,-f*e)}Lt(u[0],n[0]),Lt(u[1],n[1])}})}function Js(a){return a.type==="view"}var Pm=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 Ea,n=new ao,o=this.group;this._controller=new Ba(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(Js(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):pt(u,c,t)}Ai(t.getGraph(),mr(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(),_=S.getModel();if(!!b){b.off("drag").off("dragend");var w=_.get("draggable");w&&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),eo(t,"symbolSize",S,[L.offsetX,L.offsetY]),n.updateLayout(t);break;case"none":default:v.setItemLayout(x,[b.x,b.y]),to(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){f&&f.setUnfixed(x)}),b.setDraggable(w,!!_.get("cursor"));var A=_.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){Zc(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)&&!Ln(u,i,t)}),!Js(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){$n(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Un(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(),Ai(t.getGraph(),mr(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),i=mr(t);r.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){Ai(t.getGraph(),mr(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}(St),Em=Pm;function je(a){return"_EC_"+a}var Vm=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[je(e)]){var i=new ke(e,t);return i.hostGraph=this,this.nodes.push(i),r[je(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[je(e)]},a.prototype.addEdge=function(e,t,r){var i=this._nodesMap,n=this._edgesMap;if(le(e)&&(e=this.nodes[e]),le(t)&&(t=this.nodes[t]),e instanceof ke||(e=i[je(e)]),t instanceof ke||(t=i[je(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Kc(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 ke&&(e=e.id),t instanceof ke&&(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<i;n++)r[n].dataIndex>=0&&e.call(t,r[n],n)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,i=r.length,n=0;n<i;n++)r[n].dataIndex>=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 ke||(t=this._nodesMap[je(t)]),!!t){for(var n=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[n],o=0;o<u.length;o++){var c=u[o],v=c.node1===l?c.node2:c.node1;if(!v.__visited){if(e.call(i,v,l))return;s.push(v),v.__visited=!0}}}},a.prototype.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,i=this.edges,n=0,o=r.length;n<o;n++)r[n].dataIndex=-1;for(var n=0,o=e.count();n<o;n++)r[e.getRawIndex(n)].dataIndex=n;t.filterSelf(function(s){var l=i[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n<o;n++)i[n].dataIndex=-1;for(var n=0,o=t.count();n<o;n++)i[t.getRawIndex(n)].dataIndex=n},a.prototype.clone=function(){for(var e=new a(this._directed),t=this.nodes,r=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(var i=0;i<r.length;i++){var n=r[i];e.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return e},a}(),ke=function(){function a(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return a.prototype.degree=function(){return this.edges.length},a.prototype.inDegree=function(){return this.inEdges.length},a.prototype.outDegree=function(){return this.outEdges.length},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var r=this.edges[t];r.dataIndex<0||(e.edge.push(r.dataIndex),e.node.push(r.node1.dataIndex,r.node2.dataIndex))}return e},a.prototype.getTrajectoryDataIndices=function(){for(var e=nt(),t=nt(),r=0;r<this.edges.length;r++){var i=this.edges[r];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var n=[i.node1],o=[i.node2],s=0;s<n.length;){var l=n[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),n.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var c=o[s];s++,t.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)e.set(c.outEdges[u].dataIndex,!0),o.push(c.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},a}(),Kc=function(){function a(e,t,r){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=r==null?-1:r}return a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.edgeData.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},a.prototype.getTrajectoryDataIndices=function(){var e=nt(),t=nt();e.set(this.dataIndex,!0);for(var r=[this.node1],i=[this.node2],n=0;n<r.length;){var o=r[n];n++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),r.push(o.inEdges[s].node1)}for(n=0;n<i.length;){var l=i[n];n++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},a}();function qc(a,e){return{getValue:function(t){var r=this[a][e];return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,r){this.dataIndex>=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}re(ke,qc("hostGraph","data"));re(Kc,qc("hostGraph","edgeData"));var Rm=Vm;function Jc(a,e,t,r,i){for(var n=new Rm(r),o=0;o<a.length;o++)n.addNode(Nt(a[o].id,a[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],v=c.source,h=c.target;n.addEdge(v,h,u)&&(l.push(c),s.push(Nt(ve(c.id,null),v+" > "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=ir(a,t);else{var d=$u.get(f),g=d?d.dimensions||[]:[];Wt(g,"value")<0&&g.concat(["value"]);var y=Mn(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new zt(y,t),p.initData(a)}var m=new zt(["value"],t);return m.initData(l,s),i&&i(p,m),Vc({mainData:p,struct:n,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var km=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 Ra(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),Ga(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){gm(this);var s=Jc(n,i,this,!0,l);return D(s.edges,function(u){ym(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=jt.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),Rt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var v=Hh({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 zt(["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}(bt),Nm=km,zm={type:"graphRoam",event:"graphRoam",update:"none"};function Bm(a){a.registerChartView(Em),a.registerSeriesModel(Nm),a.registerProcessor(vm),a.registerVisual(hm),a.registerVisual(fm),a.registerLayout(mm),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,xm),a.registerLayout(_m),a.registerCoordinateSystem("graphView",{dimensions:Hr.dimensions,create:Am}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Oe),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Oe),a.registerAction(zm,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(i){var n=i.coordinateSystem,o=Xn(n,e,void 0,r);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var Gm=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),Om=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 Gm},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}(qt),Fm=Om;function Wm(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 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.render=function(t,r,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=Wm(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?Mo:Dr,p=v.get("show"),d=v.getModel("lineStyle"),g=d.get("width"),y=[u,c];$h(y,!l),u=y[0],c=y[1];for(var m=c-u,S=u,x=[],b=0;p&&b<n.length;b++){var _=Math.min(Math.max(n[b][0],0),1);c=u+m*_;var w=new f({shape:{startAngle:S,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:n[b][1]}),w.setStyle(d.getLineStyle(["color","width"])),x.push(w),S=c}x.reverse(),D(x,function(L){return s.add(L)});var A=function(L){if(L<=0)return n[0][1];var T;for(T=0;T<n.length;T++)if(n[T][0]>=L&&(T===0?0:n[T-1][0])<L)return n[T][1];return n[T-1][1]};this._renderTicks(t,r,i,A,o,u,c,l,g),this._renderTitleAndDetail(t,r,i,A,o),this._renderAnchor(t,o),this._renderPointer(t,r,i,A,o,u,c,l,g)},e.prototype._renderTicks=function(t,r,i,n,o,s,l,u,c){for(var v=this.group,h=o.cx,f=o.cy,p=o.r,d=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),S=t.getModel("axisLabel"),x=t.get("splitNumber"),b=m.get("splitNumber"),_=B(y.get("length"),p),w=B(m.get("length"),p),A=s,L=(l-s)/x,T=L/b,C=y.getModel("lineStyle").getLineStyle(),M=m.getModel("lineStyle").getLineStyle(),P=y.get("distance"),I,E,R=0;R<=x;R++){if(I=Math.cos(A),E=Math.sin(A),y.get("show")){var k=P?P+c:c,N=new te({shape:{x1:I*(p-k)+h,y1:E*(p-k)+f,x2:I*(p-_-k)+h,y2:E*(p-_-k)+f},style:C,silent:!0});C.stroke==="auto"&&N.setStyle({stroke:n(R/x)}),v.add(N)}if(S.get("show")){var k=S.get("distance")+P,H=qr(En(R/x*(g-d)+d),S.get("formatter")),$=n(R/x),U=I*(p-_-k)+h,Q=E*(p-_-k)+f,et=S.get("rotate"),q=0;et==="radial"?(q=-A+2*Math.PI,q>Math.PI/2&&(q+=Math.PI)):et==="tangential"?q=-A-Math.PI/2:le(et)&&(q=et*Math.PI/180),q===0?v.add(new ft({style:dt(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:dt(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 Tt=new te({shape:{x1:I*(p-k)+h,y1:E*(p-k)+f,x2:I*(p-w-k)+h,y2:E*(p-w-k)+f},silent:!0,style:M});M.stroke==="auto"&&Tt.setStyle({stroke:n((R+it/b)/x)}),v.add(Tt),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"),_=[x,b],w=[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=Gt(R,N-I/2,H-E,I,E,null,$):U=new Fm({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?Mo:Dr,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);ee(M,{rotation:-((isNaN(+C)?w[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");ee(P,{shape:{endAngle:_t(C,_,w,I)}},t),v.add(P),Io(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)?w[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),Io(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 ue){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),_,[0,1],!0))),R.z2EmphasisLift=0,Ot(R,C),mt(R,P,I,E)}if(y){var $=p[T];$.useStyle(m.getItemVisual(T,"style")),$.setStyle(C.getModel(["progress","itemStyle"]).getItemStyle()),$.z2EmphasisLift=0,Ot($,C),mt($,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=Gt(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)),_=m.getModel("title");if(_.get("show")){var w=_.get("offsetCenter"),A=o.cx+B(w[0],o.r),L=o.cy+B(w[1],o.r),T=f[y];T.attr({z2:g?0:2,style:dt(_,{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:dt(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})}),Uh(T,{normal:C},S,function($){return qr($,N)}),d&&Yh(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}(St),$m=Hm,Um=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 zr(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}(bt),Ym=Um;function Xm(a){a.registerChartView($m),a.registerSeriesModel(Ym)}var Zm=["itemStyle","opacity"],jm=function(a){V(e,a);function e(t,r){var i=a.call(this)||this,n=i,o=new De,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(Zm);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,ee(n,{style:{opacity:c}},o,r)):pt(n,{style:{opacity:c},shape:{points:l.points}},o,r),Ot(n,s),this._updateLabel(t,r),mt(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;Zt(o,Vt(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 Xh(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}),Zh(i,jh(l),{stroke:h})},e}(pe),Km=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 jm(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);Kh(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}(St),qm=Km,Jm=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 Ra(K(this.getData,this),K(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return zr(this,{coordDimensions:["value"],encodeDefaulter:ct(ku,this)})},e.prototype._defaultLabelLine=function(t){Ga(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}(bt),Qm=Jm;function t0(a,e){return ae(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function e0(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<s;o++)i[o]=o;return ut(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?r[l]-r[u]:r[u]-r[l]}),i}function r0(a){var e=a.hostModel,t=e.get("orient");a.each(function(r){var i=a.getItemModel(r),n=i.getModel("label"),o=n.get("position"),s=i.getModel("labelLine"),l=a.getItemLayout(r),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",v,h,f,p;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,v="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,v="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,v="center"),p=[[h,f],[h,f]];else{var d=void 0,g=void 0,y=void 0,m=void 0,S=s.get("length");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 a0(a,e){a.eachSeriesByType("funnel",function(t){var r=t.getData(),i=r.mapDimension("value"),n=t.get("sort"),o=t0(t,e),s=t.get("orient"),l=o.width,u=o.height,c=e0(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 _=0;_<c.length;_++){var w=c[_],A=c[_+1],L=r.getItemModel(w);if(s==="horizontal"){var T=L.get(["itemStyle","width"]);T==null?T=x:(T=B(T,l),n==="ascending"&&(T=-T));var C=b(w,v),M=b(A,v+T);v+=T+m,r.setItemLayout(w,{points:C.concat(M.slice().reverse())})}else{var P=L.get(["itemStyle","height"]);P==null?P=x:(P=B(P,u),n==="ascending"&&(P=-P));var C=b(w,h),M=b(A,h+P);h+=P+m,r.setItemLayout(w,{points:C.concat(M.slice().reverse())})}}r0(r)})}function i0(a){a.registerChartView(qm),a.registerSeriesModel(Qm),a.registerLayout(a0),a.registerProcessor(Na("funnel"))}var n0=.3,o0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Z,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,r,i,n){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,v=tl(t);s.diff(l).add(h).update(f).remove(p).execute();function h(g){var y=Qs(s,o,g,c,u);Ti(y,s,g,v)}function f(g,y){var m=l.getItemGraphicEl(y),S=Qc(s,g,c,u);s.setItemGraphicEl(g,m),pt(m,{shape:{points:S}},t,g),_e(m),Ti(m,s,g,v)}function p(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var d=s0(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(d)}this._data=s},e.prototype.incrementalPrepareRender=function(t,r,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,r,i){for(var n=r.getData(),o=r.coordinateSystem,s=o.dimensions,l=tl(r),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var v=Qs(n,this._dataGroup,c,s,o);v.incremental=!0,Ti(v,n,c,l),u.push(v)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(St);function s0(a,e,t){var r=a.model,i=a.getRect(),n=new It({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=r.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),ee(n,{shape:{width:i.width,height:i.height}},e,t),n}function Qc(a,e,t,r){for(var i=[],n=0;n<t.length;n++){var o=t[n],s=a.get(a.mapDimension(o),e);l0(s,r.getAxis(o).type)||i.push(r.dataToPoint(s,o))}return i}function Qs(a,e,t,r,i){var n=Qc(a,t,r,i),o=new De({shape:{points:n},z2:10});return e.add(o),a.setItemGraphicEl(t,o),o}function tl(a){var e=a.get("smooth",!0);return e===!0&&(e=n0),e=qh(e),Jh(e)&&(e=0),{smooth:e}}function Ti(a,e,t,r){a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.setShape("smooth",r.smooth);var i=e.getItemModel(t),n=i.getModel("emphasis");Ot(a,i,"lineStyle"),mt(a,n.get("focus"),n.get("blurScope"),n.get("disabled"))}function l0(a,e){return e==="category"?a==null:a==null||isNaN(a)}var u0=o0,c0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,r){return ir(null,this,{useEncodeDefaulter:K(v0,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var r=this.coordinateSystem,i=this.getData(),n=[];return r.eachActiveState(i,function(o,s){t===o&&n.push(i.getRawIndex(s))}),n},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(bt);function v0(a){var e=a.ecModel.getComponent("parallel",a.get("parallelIndex"));if(!!e){var t={};return D(e.dimensions,function(r){var i=h0(r);t[r]=i}),t}}function h0(a){return+a.replace("dim","")}var f0=c0,p0=["lineStyle","opacity"],d0={seriesType:"parallel",reset:function(a,e){var t=a.coordinateSystem,r={normal:a.get(["lineStyle","opacity"]),active:a.get("activeOpacity"),inactive:a.get("inactiveOpacity")};return{progress:function(i,n){t.eachActiveState(n,function(o,s){var l=r[o];if(o==="normal"&&n.hasItemOption){var u=n.getItemModel(s).get(p0,!0);u!=null&&(l=u)}var c=n.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}},g0=d0;function y0(a){m0(a),S0(a)}function m0(a){if(!a.parallel){var e=!1;D(a.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(a.parallel=[{}])}}function S0(a){var e=de(a.parallelAxis);D(e,function(t){if(!!Bt(t)){var r=t.parallelIndex||0,i=de(a.parallel)[r];i&&i.parallelAxisDefault&&Ft(t,i.parallelAxisDefault,!1)}})}var x0=5,b0=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._model=t,this._api=i,this._handlers||(this._handlers={},D(_0,function(n,o){i.getZr().on(o,this._handlers[o]=K(n,this))},this)),Uu(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,r){Qh(this,"_throttledDispatchExpand"),D(this._handlers,function(i,n){r.getZr().off(n,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(F({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Jt),_0={mousedown:function(a){Di(this,"click")&&(this._mouseDownPoint=[a.offsetX,a.offsetY])},mouseup:function(a){var e=this._mouseDownPoint;if(Di(this,"click")&&e){var t=[a.offsetX,a.offsetY],r=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(r>x0)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||!Di(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 Di(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var w0=b0,A0=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&&Ft(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=Kt(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}(Ht),T0=A0,D0=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}(ce),L0=D0,Li=D,tv=Math.min,ev=Math.max,el=Math.floor,C0=Math.ceil,rl=En,I0=Math.PI,M0=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;Li(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new L0(o,kn(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();Li(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),fa(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=ae(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=Jr(e.get("axisExpandWidth"),l),v=Jr(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=Jr(f[1]-f[0],l),f[1]=f[0]+p;else{p=Jr(c*(v-1),l);var d=e.get("axisExpandCenter")||el(u/2);f=[c*d-p/2],f[1]=f[0]+p}var g=(s-p)/(u-v);g<3&&(g=0);var y=[el(rl(f[0]/c,1))+1,C0(rl(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])}),Li(r,function(o,s){var l=(i.axisExpandable?E0:P0)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:I0/2,vertical:0},v=[u[n].x+e.x,u[n].y+e.y],h=c[n],f=nr();za(f,f,h),He(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;c<i;c++){var v=void 0;if(!u)v="normal";else{v="active";for(var h=e.getValues(s,c),f=0,p=o.length;f<p;f++){var d=l[f].getActiveState(h[f]);if(d==="inactive"){v="inactive";break}}}t(v,c)}},a.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,r=!1,i=0,n=e.length;i<n;i++)t.get(e[i]).model.getActiveState()!=="normal"&&(r=!0);return r},a.prototype.axisCoordToPoint=function(e,t){var r=this._axesLayout[t];return Qe([e,0],r.transform)},a.prototype.getAxisLayout=function(e){return vt(this._axesLayout[e])},a.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),r=t.pixelDimIndex,i=t.axisExpandWindow.slice(),n=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[r]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,v=this._model.get("axisExpandSlideTriggerArea"),h=v[0]!=null;if(c)h&&c&&s<n*v[0]?(u="jump",l=s-n*v[2]):h&&c&&s>n*(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?Yu(l,i,o,"all"):u="none";else{var f=i[1]-i[0],p=o[1]*s/f;i=[ev(0,p-f/2)],i[1]=tv(o[1],i[0]+f),i[0]=i[1]-f}return{axisExpandWindow:i,behavior:u}},a}();function Jr(a,e){return tv(ev(a,e[0]),e[1])}function P0(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function E0(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<o[0]?(s=a*n,c=n):a<=o[1]?(s=e.axisExpandWindow0Pos+a*r-e.axisExpandWindow[0],l=r,u=!0):(s=t-(i-1-a)*n,c=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}var V0=M0;function R0(a,e){var t=[];return a.eachComponent("parallel",function(r,i){var n=new V0(r,a,e);n.name="parallel_"+i,n.resize(r,e),r.coordinateSystem=n,n.model=r,t.push(n)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="parallel"){var i=r.getReferringComponents("parallel",or).models[0];r.coordinateSystem=i.coordinateSystem}}),t}var k0={create:R0},N0=k0,rv=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Fu([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var r=this.activeIntervals=vt(t);if(r)for(var i=r.length-1;i>=0;i--)$e(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<o;n++)if(r[n][0]<=t&&t<=r[n][1])return"active";return"inactive"},e}(Ht);re(rv,ka);var al=rv,z0=["axisLine","axisTickLabel","axisName"],B0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){a.prototype.init.apply(this,arguments),(this._brushController=new Xu(r.getZr())).on("brush",K(this._onBrush,this))},e.prototype.render=function(t,r,i,n){if(!G0(t,r,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Z,this.group.add(this._axisGroup),!!t.get("show")){var s=F0(t,r),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,v=t.axis.dim,h=l.getAxisLayout(v),f=F({strokeContainThreshold:c},h),p=new Fe(t,f);D(z0,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,s,c,i),Nn(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,r,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),v=xt.create({x:l[0],y:-o/2,width:u,height:o});v.x-=c,v.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:tf(v),isTargetByCursor:ef(v,s,n),getLinearBrushOtherExtent:rf(v,0)}]).enableBrush({brushType:"lineX",brushStyle:r,removeOnClick:!0}).updateCovers(O0(i))},e.prototype._onBrush=function(t){var r=t.areas,i=this.axisModel,n=i.axis,o=G(r,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Jt);function G0(a,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===a}function O0(a){var e=a.axis;return G(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function F0(a,e){return e.getComponent("parallel",a.get("parallelIndex"))}var W0=B0,H0={type:"axisAreaSelect",event:"axisAreaSelected"};function $0(a){a.registerAction(H0,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(r){r.axis.model.setActiveIntervals(e.intervals)})}),a.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(r){r.setAxisExpand(e)})})}var U0={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function av(a){a.registerComponentView(w0),a.registerComponentModel(T0),a.registerCoordinateSystem("parallel",N0),a.registerPreprocessor(y0),a.registerComponentModel(al),a.registerComponentView(W0),pa(a,"parallel",al,U0),$0(a)}function Y0(a){j(av),a.registerChartView(u0),a.registerSeriesModel(f0),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,g0)}var X0=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return a}(),Z0=function(a){V(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new X0},e.prototype.buildPath=function(t,r){var i=r.extent;t.moveTo(r.x1,r.y1),t.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(t.lineTo(r.x2+i,r.y2),t.bezierCurveTo(r.cpx2+i,r.cpy2,r.cpx1+i,r.cpy1,r.x1+i,r.y1)):(t.lineTo(r.x2,r.y2+i),t.bezierCurveTo(r.cpx2,r.cpy2+i,r.cpx1,r.cpy1+i,r.x1,r.y1+i)),t.closePath()},e.prototype.highlight=function(){Vn(this)},e.prototype.downplay=function(){Rn(this)},e}(qt),j0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,r,i){var n=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,v=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new Z0,g=lt(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),S=m.get("curveness"),x=p.node1.getLayout(),b=p.node1.getModel(),_=b.get("localX"),w=b.get("localY"),A=p.node2.getLayout(),L=p.node2.getModel(),T=L.get("localX"),C=L.get("localY"),M=p.getLayout(),P,I,E,R,k,N,H,$;d.shape.extent=Math.max(1,M.dy),d.shape.orient=f,f==="vertical"?(P=(_!=null?_*u:x.x)+M.sy,I=(w!=null?w*c:x.y)+x.dy,E=(T!=null?T*u:A.x)+M.ty,R=C!=null?C*c:A.y,k=P,N=I*(1-S)+R*S,H=E,$=I*S+R*(1-S)):(P=(_!=null?_*u:x.x)+x.dx,I=(w!=null?w*c:x.y)+M.sy,E=T!=null?T*u:A.x,R=(C!=null?C*c:A.y)+M.ty,k=P*(1-S)+E*S,N=I,H=P*S+E*(1-S),$=R),d.setShape({x1:P,y1:I,x2:E,y2:R,cpx1:k,cpy1:N,cpx2:H,cpy2:$}),d.useStyle(m.getItemStyle()),il(d.style,f,p);var U=""+y.get("value"),Q=Vt(y,"edgeLabel");Zt(d,Q,{labelFetcher:{getFormattedLabel:function(it,Tt,J,Y,at,rt){return t.getFormattedLabel(it,Tt,"edge",Y,Gr(at,Q.normal&&Q.normal.get("formatter"),U),rt)}},labelDataIndex:p.dataIndex,defaultText:U}),d.setTextConfig({position:"inside"});var et=y.getModel("emphasis");Ot(d,y,"lineStyle",function(it){var Tt=it.getItemStyle();return il(Tt,f,p),Tt}),s.add(d),h.setItemGraphicEl(p.dataIndex,d);var q=et.get("focus");mt(d,q==="adjacency"?p.getAdjacentDataIndices():q==="trajectory"?p.getTrajectoryDataIndices():q,et.get("blurScope"),et.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),S=g.getModel("emphasis"),x=new It({shape:{x:y!=null?y*u:d.x,y:m!=null?m*c:d.y,width:d.dx,height:d.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});Zt(x,Vt(g),{labelFetcher:{getFormattedLabel:function(_,w){return t.getFormattedLabel(_,w,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),Ot(x,g),s.add(x),v.setItemGraphicEl(p.dataIndex,x),lt(x).dataType="node";var b=S.get("focus");mt(x,b==="adjacency"?p.getAdjacentDataIndices():b==="trajectory"?p.getTrajectoryDataIndices():b,S.get("blurScope"),S.get("disabled"))}),v.eachItemGraphicEl(function(p,d){var g=v.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){n._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:v.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){n._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(K0(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(St);function il(a,e,t){switch(a.fill){case"source":a.fill=t.node1.getVisual("color"),a.decal=t.node1.getVisual("style").decal;break;case"target":a.fill=t.node2.getVisual("color"),a.decal=t.node2.getVisual("style").decal;break;case"gradient":var r=t.node1.getVisual("color"),i=t.node2.getVisual("color");tt(r)&&tt(i)&&(a.fill=new Dn(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:r,offset:0},{color:i,offset:1}]))}}function K0(a,e,t){var r=new It({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return ee(r,{shape:{width:a.width+20}},e,t),r}var q0=j0,J0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new jt(o[l],this,r));if(n&&i){var u=Jc(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 Rt("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 Rt("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}(bt),Q0=J0;function tS(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),i=t.get("nodeGap"),n=eS(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,c=l.edges;aS(u);var v=Kt(u,function(d){return d.getLayout().value===0}),h=v.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");rS(u,c,r,i,o,s,h,f,p)})}function eS(a,e){return ae(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function rS(a,e,t,r,i,n,o,s,l){iS(a,e,t,i,n,s,l),lS(a,e,n,i,r,o,s),yS(a,s)}function aS(a){D(a,function(e){var t=be(e.outEdges,_a),r=be(e.inEdges,_a),i=e.getValue()||0,n=Math.max(t,r,i);e.setLayout({value:n},!0)})}function iS(a,e,t,r,i,n,o){for(var s=[],l=[],u=[],c=[],v=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<a.length;h++)l[h]=a[h].inEdges.length,l[h]===0&&u.push(a[h]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var d=u[p],g=d.hostGraph.data.getRawDataItem(d.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>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;m<d.outEdges.length;m++){var S=d.outEdges[m],x=e.indexOf(S);s[x]=0;var b=S.node2,_=a.indexOf(b);--l[_]===0&&c.indexOf(b)<0&&c.push(b)}}++v,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=f>v-1?f:v-1;o&&o!=="left"&&nS(a,o,n,w);var A=n==="vertical"?(i-t)/w:(r-t)/w;sS(a,A,n)}function iv(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function nS(a,e,t,r){if(e==="right"){for(var i=[],n=a,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}n=i,i=[],++o}D(a,function(v){iv(v)||v.setLayout({depth:Math.max(0,r-v.getLayout().skNodeHeight)},!0)})}else e==="justify"&&oS(a,r)}function oS(a,e){D(a,function(t){!iv(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function sS(a,e,t){D(a,function(r){var i=r.getLayout().depth*e;t==="vertical"?r.setLayout({y:i},!0):r.setLayout({x:i},!0)})}function lS(a,e,t,r,i,n,o){var s=uS(a,o);cS(s,e,t,r,i,o),Ci(s,i,t,r,o);for(var l=1;n>0;n--)l*=.99,vS(s,l,o),Ci(s,i,t,r,o),gS(s,l,o),Ci(s,i,t,r,o)}function uS(a,e){var t=[],r=e==="vertical"?"y":"x",i=tn(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 cS(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;c<o&&(o=c)}),D(a,function(s){D(s,function(l,u){var c=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),D(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Ci(a,e,t,r,i){var n=i==="vertical"?"x":"y";D(a,function(o){o.sort(function(d,g){return d.getLayout()[n]-g.getLayout()[n]});for(var s,l,u,c=0,v=o.length,h=i==="vertical"?"dx":"dy",f=0;f<v;f++)l=o[f],u=c-l.getLayout()[n],u>0&&(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 vS(a,e,t){D(a.slice().reverse(),function(r){D(r,function(i){if(i.outEdges.length){var n=be(i.outEdges,hS,t)/be(i.outEdges,_a);if(isNaN(n)){var o=i.outEdges.length;n=o?be(i.outEdges,fS,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-we(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-we(i,t))*e;i.setLayout({y:l},!0)}}})})}function hS(a,e){return we(a.node2,e)*a.getValue()}function fS(a,e){return we(a.node2,e)}function pS(a,e){return we(a.node1,e)*a.getValue()}function dS(a,e){return we(a.node1,e)}function we(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function _a(a){return a.getValue()}function be(a,e,t){for(var r=0,i=a.length,n=-1;++n<i;){var o=+e(a[n],t);isNaN(o)||(r+=o)}return r}function gS(a,e,t){D(a,function(r){D(r,function(i){if(i.inEdges.length){var n=be(i.inEdges,pS,t)/be(i.inEdges,_a);if(isNaN(n)){var o=i.inEdges.length;n=o?be(i.inEdges,dS,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-we(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-we(i,t))*e;i.setLayout({y:l},!0)}}})})}function yS(a,e){var t=e==="vertical"?"x":"y";D(a,function(r){r.outEdges.sort(function(i,n){return i.node2.getLayout()[t]-n.node2.getLayout()[t]}),r.inEdges.sort(function(i,n){return i.node1.getLayout()[t]-n.node1.getLayout()[t]})}),D(a,function(r){var i=0,n=0;D(r.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),D(r.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}function mS(a){a.eachSeriesByType("sankey",function(e){var t=e.getGraph(),r=t.nodes,i=t.edges;if(r.length){var n=1/0,o=-1/0;D(r,function(s){var l=s.getLayout().value;l<n&&(n=l),l>o&&(o=l)}),D(r,function(s){var l=new wt({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 SS(a){a.registerChartView(q0),a.registerSeriesModel(Q0),a.registerLayout(tS),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 nv=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 _;O(x)?(_=x.slice(),x.unshift(b)):O(x.value)?(_=F({},x),_.value=_.value.slice(),x.value.unshift(b)):_=x,y.push(_)}),e.data=y}var m=this.defaultValueDimensions,S=[{name:v,type:en(p),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:en(d),dimsDef:m.slice()}];return zr(this,{coordDimensions:S,dimensionsCount:m.length+1,encodeDefaulter:ct(af,S,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),ov=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}(bt);re(ov,nv,!0);var xS=ov,bS=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=nl(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),sv(h,v,n,u)):v=nl(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}(St),_S=function(){function a(){}return a}(),wS=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 _S},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();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])},e}(qt);function nl(a,e,t,r,i){var n=a.ends,o=new wS({shape:{points:i?AS(n,r,a):n}});return sv(a,o,e,t,i),o}function sv(a,e,t,r,i){var n=t.hostModel,o=Va[i?"initProps":"updateProps"];o(e,{shape:{points:a.ends}},n,r),e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(r),l=s.getModel("emphasis");Ot(e,s),mt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function AS(a,e,t){return G(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}var TS=bS,_r=D;function DS(a){var e=LS(a);_r(e,function(t){var r=t.seriesModels;!r.length||(CS(t),_r(r,function(i,n){IS(i,t.boxOffsetList[n],t.boxWidthList[n])}))})}function LS(a){var e=[],t=[];return a.eachSeriesByType("boxplot",function(r){var i=r.getBaseAxis(),n=Wt(t,i);n<0&&(n=t.length,t[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(r)}),e}function CS(a){var e=a.axis,t=a.seriesModels,r=t.length,i=a.boxWidthList=[],n=a.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;_r(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}_r(t,function(p){var d=p.get("boxWidth");O(d)||(d=[d,d]),o.push([B(d[0],s)||0,B(d[1],s)||0])});var c=s*.8-2,v=c/r*.3,h=(c-v*(r-1))/r,f=h/2-c/2;_r(t,function(p,d){n.push(f),f+=v+h,i.push(Math.min(Math.max(h,o[d][0]),o[d][1]))})}function IS(a,e,t){var r=a.coordinateSystem,i=a.getData(),n=t/2,o=a.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var v=0;v<i.count();v++){var h=i.get(u,v),f=S(h,c[2],v),p=S(h,c[0],v),d=S(h,c[1],v),g=S(h,c[3],v),y=S(h,c[4],v),m=[];x(m,d,!1),x(m,g,!0),m.push(p,d,y,g),b(m,p),b(m,y),b(m,f),i.setItemLayout(v,{initBaseline:f[s],ends:m})}function S(_,w,A){var L=i.get(w,A),T=[];T[o]=_,T[s]=L;var C;return isNaN(_)||isNaN(L)?C=[NaN,NaN]:(C=r.dataToPoint(T),C[o]+=e),C}function x(_,w,A){var L=w.slice(),T=w.slice();L[o]+=n,T[o]-=n,A?_.push(L,T):_.push(T,L)}function b(_,w){var A=w.slice(),L=w.slice();A[o]-=n,L[o]+=n,_.push(A,L)}}function MS(a,e){e=e||{};for(var t=[],r=[],i=e.boundIQR,n=i==="none"||i===0,o=0;o<a.length;o++){var s=$e(a[o].slice()),l=Ja(s,.25),u=Ja(s,.5),c=Ja(s,.75),v=s[0],h=s[s.length-1],f=(i==null?1.5:i)*(c-l),p=n?v:Math.max(v,l-f),d=n?h:Math.min(h,c+f),g=e.itemNameFormatter,y=ut(g)?g({value:o}):tt(g)?g.replace("{value}",o+""):o+"";t.push([y,p,l,u,c,d]);for(var m=0;m<s.length;m++){var S=s[m];if(S<p||S>d){var x=[y,S];r.push(x)}}}return{boxData:t,outliers:r}}var PS={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==nf){var r="";Zu(r)}var i=MS(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function ES(a){a.registerSeriesModel(xS),a.registerChartView(TS),a.registerLayout(DS),a.registerTransform(PS)}var VS=["color","borderColor"],RS=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){Fa(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&&ol(u,v))return;var h=Ii(v,c,!0);ee(h,{shape:{points:v.ends}},t,c),Mi(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&&ol(u,f)){n.remove(h);return}h?(pt(h,{shape:{points:f.ends}},t,c),_e(h)):h=Ii(f),Mi(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(),sl(t,this.group);var r=t.get("clip",!0)?zn(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=Ii(s);Mi(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){sl(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}(St),kS=function(){function a(){}return a}(),NS=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 kS},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}(qt);function Ii(a,e,t){var r=a.ends;return new NS({shape:{points:t?zS(r,a):r},z2:100})}function ol(a,e){for(var t=!0,r=0;r<e.ends.length;r++)if(a.contain(e.ends[r][0],e.ends[r][1])){t=!1;break}return t}function Mi(a,e,t,r){var i=e.getItemModel(t);a.useStyle(e.getItemVisual(t,"style")),a.style.strokeNoScale=!0,a.__simpleBox=r,Ot(a,i)}function zS(a,e){return G(a,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var BS=function(){function a(){}return a}(),Pi=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new BS},e.prototype.buildPath=function(t,r){for(var i=r.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3},e}(qt);function sl(a,e,t,r){var i=a.getData(),n=i.getLayout("largePoints"),o=new Pi({shape:{points:n},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new Pi({shape:{points:n},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new Pi({shape:{points:n},__sign:0,ignoreCoarsePointer:!0});e.add(l),Ei(1,o,a),Ei(-1,s,a),Ei(0,l,a),r&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Ei(a,e,t,r){var i=t.get(["itemStyle",a>0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]);a===0&&(i=t.get(["itemStyle","borderColorDoji"]));var n=t.getModel("itemStyle").getItemStyle(VS);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var GS=RS,lv=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}(bt);re(lv,nv,!0);var OS=lv;function FS(a){!a||!O(a.series)||D(a.series,function(e){Bt(e)&&e.type==="k"&&(e.type="candlestick")})}var WS=["itemStyle","borderColor"],HS=["itemStyle","borderColor0"],$S=["itemStyle","borderColorDoji"],US=["itemStyle","color"],YS=["itemStyle","color0"],XS={seriesType:"candlestick",plan:Bn(),performRawSeries:!0,reset:function(a,e){function t(n,o){return o.get(n>0?US:YS)}function r(n,o){return o.get(n===0?$S:n>0?WS:HS)}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)}}}}}},ZS=XS,jS={seriesType:"candlestick",plan:Bn(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=KS(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),_=m.get(v,y),w=m.get(h,y),A=Math.min(x,b),L=Math.max(x,b),T=k(A,S),C=k(L,S),M=k(_,S),P=k(w,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:ll(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]=Qa(q[i]+r/2,1,!1),it[i]=Qa(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]=Qa(U[i],1),U}}function p(d,g){for(var y=of(d.count*4),m=0,S,x=[],b=[],_,w=g.getStore(),A=!!a.get(["itemStyle","borderColorDoji"]);(_=d.next())!=null;){var L=w.get(s,_),T=w.get(u,_),C=w.get(c,_),M=w.get(v,_),P=w.get(h,_);if(isNaN(L)||isNaN(M)||isNaN(P)){y[m++]=NaN,m+=3;continue}y[m++]=ll(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 ll(a,e,t,r,i,n){var o;return t>r?o=-1:t<r?o=1:o=n?0:e>0?a.get(i,e-1)<=r?1:-1:1,o}function KS(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(Ct(a.get("barMaxWidth"),i),i),o=B(Ct(a.get("barMinWidth"),1),i),s=a.get("barWidth");return s!=null?B(s,i):Math.max(Math.min(i/2,n),o)}var qS=jS;function JS(a){a.registerChartView(GS),a.registerSeriesModel(OS),a.registerPreprocessor(FS),a.registerVisual(ZS),a.registerLayout(qS)}function ul(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 QS=function(a){V(e,a);function e(t,r){var i=a.call(this)||this,n=new Gu(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;s<n;s++){var l=Gt(r,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/n*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}ul(o,t)},e.prototype.updateEffectAnimation=function(t){for(var r=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var s=n[o];if(r[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}ul(i,t)},e.prototype.highlight=function(){Vn(this)},e.prototype.downplay=function(){Rn(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,r){var i=this,n=t.hostModel;this.childAt(0).updateData(t,r);var o=this.childAt(1),s=t.getItemModel(r),l=t.getItemVisual(r,"symbol"),u=Nr(t.getItemVisual(r,"symbolSize")),c=t.getItemVisual(r,"style"),v=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",v)});var f=Fr(t.getItemVisual(r,"symbolOffset"),u);f&&(o.x=f[0],o.y=f[1]);var p=t.getItemVisual(r,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var d={};d.showEffectOn=n.get("showEffectOn"),d.rippleScale=s.get(["rippleEffect","scale"]),d.brushType=s.get(["rippleEffect","brushType"]),d.period=s.get(["rippleEffect","period"])*1e3,d.effectOffset=r/t.count(),d.z=n.getShallow("z")||0,d.zlevel=n.getShallow("zlevel")||0,d.symbolType=l,d.color=v,d.rippleEffectColor=s.get(["rippleEffect","color"]),d.rippleNumber=s.get(["rippleEffect","number"]),d.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?d.showEffectOn!=="render"&&i.startEffectAnimation(d):g==="normal"&&d.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=d,mt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Z),t1=QS,e1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Ea(t1)},e.prototype.render=function(t,r,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var r=t.coordinateSystem,i=r&&r.getArea&&r.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,r,i){var n=t.getData();this.group.dirty();var o=Pa("").reset(t,r,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var r=t.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=sf(r.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(St),r1=e1,a1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return ir(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,r,i){return i.point(r.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(bt),i1=a1;function n1(a){a.registerChartView(r1),a.registerSeriesModel(i1),a.registerLayout(Pa("effectScatter"))}var o1=function(a){V(e,a);function e(t,r,i){var n=a.call(this)||this;return n.add(n.createLine(t,r,i)),n._updateEffectSymbol(t,r),n}return e.prototype.createLine=function(t,r,i){return new ro(t,r,i)},e.prototype._updateEffectSymbol=function(t,r){var i=t.getItemModel(r),n=i.getModel("effect"),o=n.get("symbolSize"),s=n.get("symbol");O(o)||(o=[o,o]);var l=t.getItemVisual(r,"style"),u=n.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=Gt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(n.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,n,r))},e.prototype._updateEffectAnimation=function(t,r,i){var n=this.childAt(1);if(!!n){var o=t.getItemLayout(i),s=r.get("period")*1e3,l=r.get("loop"),u=r.get("roundTrip"),c=r.get("constantSpeed"),v=Nt(r.get("delay"),function(f){return f/t.count()*s/3});if(n.ignore=!0,this._updateAnimationPoints(n,o),c>0&&(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 pr(t.__p1,t.__cp1)+pr(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=Hu,c=lf;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<t.__t?(t.scaleY=pr(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*pr(r,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,r){this.childAt(0).updateLayout(t,r);var i=t.getItemModel(r).getModel("effect");this._updateEffectAnimation(t,i,r)},e}(Z),uv=o1,s1=function(a){V(e,a);function e(t,r,i){var n=a.call(this)||this;return n._createPolyline(t,r,i),n}return e.prototype._createPolyline=function(t,r,i){var n=t.getItemLayout(r),o=new De({shape:{points:n}});this.add(o),this._updateCommonStl(t,r,i)},e.prototype.updateData=function(t,r,i){var n=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(r)}};pt(o,s,n,r),this._updateCommonStl(t,r,i)},e.prototype._updateCommonStl=function(t,r,i){var n=this.childAt(0),o=t.getItemModel(r),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var v=o.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),c=v.get("disabled"),l=v.get("focus"),u=v.get("blurScope")}n.useStyle(t.getItemVisual(r,"style")),n.style.fill=null,n.style.strokeNoScale=!0;var h=n.ensureState("emphasis");h.style=s,mt(this,l,u,c)},e.prototype.updateLayout=function(t,r){var i=this.childAt(0);i.setShape("points",t.getItemLayout(r))},e}(Z),cv=s1,l1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,r,i){return new cv(t,r,i)},e.prototype._updateAnimationPoints=function(t,r){this._points=r;for(var i=[0],n=0,o=1;o<r.length;o++){var s=r[o-1],l=r[o];n+=pr(s,l),i.push(n)}if(n===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var r=t.__t<1?t.__t:2-t.__t,i=this._points,n=this._offsets,o=i.length;if(!!n){var s=this._lastFrame,l;if(r<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(n[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(n[l]>r);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}(uv),u1=l1,c1=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),v1=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 c1},e.prototype.buildPath=function(t,r){var i=r.segs,n=r.curveness,o;if(r.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){t.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)t.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],v=i[o++],h=i[o++];if(t.moveTo(u,c),n>0){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;u<n.length;){var c=n[u++];if(c>0)for(var v=n[u++],h=n[u++],f=1;f<c;f++){var p=n[u++],d=n[u++];if(Po(v,h,p,d,s,t,r))return l}l++}else for(var l=0,u=0;u<n.length;){var v=n[u++],h=n[u++],p=n[u++],d=n[u++];if(o>0){var g=(v+p)/2-(h-d)*o,y=(h+d)/2-(p-v)*o;if(uf(v,h,g,y,p,d,s,t,r))return l}else if(Po(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;u<i.length;){var c=i[u++],v=i[u++];n=Math.min(c,n),s=Math.max(c,s),o=Math.min(v,o),l=Math.max(v,l)}t=this._rect=new xt(n,o,s,l)}return t},e}(qt),h1=function(){function a(){this.group=new Z}return a.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},a.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},a.prototype.incrementalUpdate=function(e,t){var r=this._newAdded[0],i=t.getLayout("linesPoints"),n=r&&r.shape.segs;if(n&&n.length<2e4){var o=n.length,s=new Float32Array(o+i.length);s.set(n),s.set(i,o),r.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,t),l.__startIndex=e.start}},a.prototype.remove=function(){this._clear()},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new v1({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},a.prototype._setCommon=function(e,t,r){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("style");n&&n.stroke&&e.setStyle("stroke",n.stroke),e.setStyle("fill",null);var o=lt(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),f1=h1,p1={seriesType:"lines",plan:Bn(),reset:function(a){var e=a.coordinateSystem;if(!!e){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;c<i.end;c++)u+=a.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var v=0,h=[],c=i.start;c<i.end;c++){var f=a.getLineCoords(c,o);t&&(s[v++]=f);for(var p=0;p<f;p++)h=e.dataToPoint(o[p],!1,h),s[v++]=h[0],s[v++]=h[1]}n.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var d=n.getItemModel(c),f=a.getLineCoords(c,o),g=[];if(t)for(var y=0;y<f;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=d.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}n.setItemLayout(c,g)}}}}}},vv=p1,d1=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._updateLineDraw(n,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var v=t.get("clip",!0)&&zn(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=vv.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(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new f1:new ao(o?n?u1:cv:n?uv:ro),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}(St),g1=d1,y1=typeof Uint32Array=="undefined"?Array:Uint32Array,m1=typeof Float64Array=="undefined"?Array:Float64Array;function cl(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(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),In([i,t[0],t[1]])}))}var S1=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||[],cl(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(cl(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=Ki(this._flatCoords,r.flatCoords),this._flatCoordsOffset=Ki(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");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;o<n;o++)r[o]=r[o]||[],r[o][0]=this._flatCoords[i+o*2],r[o][1]=this._flatCoords[i+o*2+1];return n}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)r[o]=r[o]||[],r[o][0]=s[o][0],r[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var r=0;if(this._flatCoords&&(r=this._flatCoords.length),le(t[0])){for(var i=t.length,n=new y1(i),o=new m1(i),s=0,l=0,u=0,c=0;c<i;){u++;var v=t[c++];n[l++]=s+r,n[l++]=v;for(var h=0;h<v;h++){var f=t[c++],p=t[c++];o[s++]=f,o[s++]=p}}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=new zt(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(n,o,s,l){if(n instanceof Array)return NaN;i.hasItemOption=!0;var u=n.value;if(u!=null)return u instanceof Array?u[l]:u}),i},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),Rt("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}(bt),x1=S1;function Qr(a){return a instanceof Array||(a=[a,a]),a}var b1={seriesType:"lines",reset:function(a){var e=Qr(a.get("symbol")),t=Qr(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=Qr(s.getShallow("symbol",!0)),u=Qr(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}}},_1=b1;function w1(a){a.registerChartView(g1),a.registerSeriesModel(x1),a.registerLayout(vv),a.registerVisual(_1)}var A1=256,T1=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Eo.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;p<f;++p){var d=e[p],g=d[0],y=d[1],m=d[2],S=i(m);h.globalAlpha=S,h.drawImage(s,g-c,y-c)}if(!v.width||!v.height)return v;for(var x=h.getImageData(0,0,v.width,v.height),b=x.data,_=0,w=b.length,A=this.minOpacity,L=this.maxOpacity,T=L-A;_<w;){var S=b[_+3]/256,C=Math.floor(S*(A1-1))*4;if(S>0){var M=o(S)?l:u;S>0&&(S=S*T+A),b[_++]=M[C],b[_++]=M[C+1],b[_++]=M[C+2],b[_++]=M[C+3]*S*256}else _+=4}return h.putImageData(x,0,0),v},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Eo.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}(),D1=T1;function L1(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<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(s=n-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&t[s]}}function C1(a,e){var t=a[1]-a[0];return e=[(e[0]-a[0])/t,(e[1]-a[0])/t],function(r){return r>=e[0]&&r<=e[1]}}function vl(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var I1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n;r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):vl(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&&(vl(o)?this.render(r,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Fa(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,i,n,o){var s=t.coordinateSystem,l=Wa(s,"cartesian2d"),u,c,v,h;if(l){var f=s.getAxis("x"),p=s.getAxis("y");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=Vt(t),_=t.getModel("emphasis"),w=_.get("focus"),A=_.get("blurScope"),L=_.get("disabled"),T=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],C=i;C<n;C++){var M=void 0,P=g.getItemVisual(C,"style");if(l){var I=g.get(T[0],C),E=g.get(T[1],C);if(isNaN(g.get(T[2],C))||isNaN(I)||isNaN(E)||I<v[0]||I>v[1]||E<h[0]||E>h[1])continue;var R=s.dataToPoint([I,E]);M=new It({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 It({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"]),w=N.get("focus"),A=N.get("blurScope"),L=N.get("disabled"),b=Vt(k)}M.shape.r=x;var H=t.getRawValue(C),$="-";H&&H[2]!=null&&($=H[2]+""),Zt(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,mt(M,w,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 D1;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(w,A,L){var T=t.dataToPoint([w,A]);return T[0]-=h,T[1]-=f,T.push(L),T}),x=i.getExtent(),b=i.type==="visualMap.continuous"?C1(x,i.option.range):L1(x,i.getPieceList(),i.option.selected);u.update(S,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var _=new ue({style:{width:g,height:y,x:h,y:f,image:u.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(St),M1=I1,P1=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 ir(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=$u.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}(bt),E1=P1;function V1(a){a.registerChartView(M1),a.registerSeriesModel(E1)}var R1=["itemStyle","borderWidth"],hl=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Vi=new We,k1=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:hl[+c],categoryDim:hl[1-+c]};return o.diff(s).add(function(f){if(!!o.hasValue(f)){var p=pl(o,f),d=fl(o,f,p,h),g=dl(o,h,d);o.setItemGraphicEl(f,g),n.add(g),yl(g,h,d)}}).update(function(f,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(f)){n.remove(d);return}var g=pl(o,f),y=fl(o,f,g,h),m=yv(o,y);d&&m!==d.__pictorialShapeStr&&(n.remove(d),o.setItemGraphicEl(f,null),d=null),d?W1(d,h,y):d=dl(o,h,y,!0),o.setItemGraphicEl(f,d),d.__pictorialSymbolMeta=y,n.add(d),yl(d,h,y)}).remove(function(f){var p=s.getItemGraphicEl(f);p&&gl(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){gl(n,lt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(St);function fl(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};N1(t,n,i,r,h),z1(a,e,i,n,o,h.boundingLength,h.pxSign,c,r,h),B1(t,h.symbolScale,u,r,h);var f=h.symbolSize,p=Fr(t.get("symbolOffset"),f);return G1(t,f,i,n,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,r,h),h}function N1(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=[Ri(s,o[0])-l,Ri(s,o[1])-l];v[1]<v[0]&&v.reverse(),c=v[u]}else o!=null?c=Ri(s,o)-l:e?c=r.coordSysExtent[n.index][u]-l:c=t[n.wh];i.boundingLength=c,e&&(i.repeatCutLength=t[n.wh]),i.pxSign=c>0?1:-1}function Ri(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function z1(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 B1(a,e,t,r,i){var n=a.get(R1)||0;n&&(Vi.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Vi.updateTransform(),n/=Vi.getLineScale(),n*=e[r.valueDim.index]),i.valueLineWidth=n||0}function G1(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=Nt(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),_=S?0:x*2,w=cf(r),A=w?r:ml((y+_)/b),L=y-A*d;x=L/2/(S?A:Math.max(A-1,1)),b=d+x*2,_=S?0:x*2,!w&&r!=="fixed"&&(A=u?ml((Math.abs(u)+_)/b):0),g=A*b-_,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 hv(a){var e=a.symbolPatternSize,t=Gt(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function fv(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(io(a,function(d){d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,c<u?tr(d,null,p(c),t,r):tr(d,null,{scaleX:0,scaleY:0},t,r,function(){i.remove(d)}),c++});c<u;c++){var h=hv(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var f=p(c);tr(h,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},t,r)}function p(d){var g=s.slice(),y=t.pxSign,m=d;return(t.symbolRepeatDirection==="start"?y>0: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 pv(a,e,t,r){var i=a.__pictorialBundle,n=a.__pictorialMainPath;n?tr(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=hv(t),i.add(n),tr(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 dv(a,e,t){var r=F({},e.barRectShape),i=a.__pictorialBarRect;i?tr(i,null,{shape:r},e,t):(i=a.__pictorialBarRect=new It({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,a.add(i))}function gv(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 It({shape:n}),a.__pictorialBundle.setClipPath(i),a.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],Va[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function pl(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=O1,t.isAnimationEnabled=F1,t}function O1(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function F1(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function dl(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?fv(i,e,t):pv(i,e,t),dv(i,t,r),gv(i,e,t,r),i.__pictorialShapeStr=yv(a,t),i.__pictorialSymbolMeta=t,i}function W1(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?fv(a,e,t,!0):pv(a,e,t,!0),dv(a,t,!0),gv(a,e,t,!0)}function gl(a,e,t,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var n=[];io(r,function(o){n.push(o)}),r.__pictorialMainPath&&n.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),D(n,function(o){va(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function yv(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function io(a,e,t){D(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function tr(a,e,t,r,i,n){e&&a.attr(e),r.symbolClip&&!i?t&&a.attr(t):t&&Va[i?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,n)}function yl(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");io(a,function(d){if(d instanceof ue){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;Zt(p,Vt(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:rn(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),mt(a,c,v,n.get("disabled"))}function ml(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}var H1=k1,$1=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=Ha(Vo.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}(Vo),U1=$1;function Y1(a){a.registerChartView(H1),a.registerSeriesModel(U1),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,ct(hf,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,vf("pictorialBar"))}var X1=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 Oa(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<w.length;A++){var L=n.getItemLayout(w[A]),T=L.x,C=L.y0,M=L.y;x.push(T,C),b.push(T,C+M),_=n.getItemVisual(w[A],"style")}var P,I=n.getItemLayout(w[0]),E=t.getModel("label"),R=E.get("margin"),k=t.getModel("emphasis");if(g==="add"){var N=p[y]=new Z;P=new ff({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),N.add(P),s.add(N),t.isAnimationEnabled()&&P.setClipPath(Z1(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)}Zt(P,Vt(t),{labelDataIndex:w[A-1],defaultText:n.getName(w[A-1]),inheritColor:_.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(_),n.setItemGraphicEl(y,P),Ot(P,t),mt(P,k.get("focus"),k.get("blurScope"),k.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(St);function Z1(a,e,t){var r=new It({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return ee(r,{shape:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}var j1=X1,ki=2,K1=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 Ra(K(this.getData,this),K(this.getRawData,this))},e.prototype.fixData=function(t){var r=t.length,i={},n=tn(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;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var v=o[l].dataList[c][0]+"";i[v]=l}for(var v in i)i.hasOwnProperty(v)&&i[v]!==l&&(i[v]=l,t[r]=[v,0,u],r++)}return t},e.prototype.getInitialData=function(t,r){for(var i=this.getReferringComponents("singleAxis",or).models[0],n=i.get("type"),o=Kt(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=nt(),c=0,v=0;v<s.length;++v)l.push(s[v][ki]),u.get(s[v][ki])||(u.set(s[v][ki],c),c++);var h=Mn(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:en(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new zt(h,this);return f.initData(s),f},e.prototype.getLayerSeries=function(){for(var t=this.getData(),r=t.count(),i=[],n=0;n<r;++n)i[n]=n;var o=t.mapDimension("single"),s=tn(i,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(v,h){return t.get(o,v)-t.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,r,i){O(t)||(t=t?[t]:[]);for(var n=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var v=Number.MAX_VALUE,h=-1,f=o[c].indices.length,p=0;p<f;++p){var d=n.get(t[0],o[c].indices[p]),g=Math.abs(d-r);g<=v&&(u=d,v=g,h=o[c].indices[p])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=n.getName(t),s=n.get(n.mapDimension("value"),t);return Rt("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(bt),q1=K1;function J1(a,e){a.eachSeriesByType("themeRiver",function(t){var r=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=t.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=B(s[0],o.height),s[1]=B(s[1],o.height);var u=o.height-s[0]-s[1];Sl(r,t,u)}else{s[0]=B(s[0],o.width),s[1]=B(s[1],o.width);var c=o.width-s[0]-s[1];Sl(r,t,c)}r.setLayout("layoutInfo",n)})}function Sl(a,e,t){if(!!a.count())for(var r=e.coordinateSystem,i=e.getLayerSeries(),n=a.mapDimension("single"),o=a.mapDimension("value"),s=G(i,function(g){return G(g.indices,function(y){var m=r.dataToPoint(a.get(n,y));return m[1]=a.get(o,y),m})}),l=Q1(s),u=l.y0,c=t/l.max,v=i.length,h=i[0].indices.length,f,p=0;p<h;++p){f=u[p]*c,a.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:f,y:s[0][p][1]*c});for(var d=1;d<v;++d)f+=s[d-1][p][1]*c,a.setItemLayout(i[d].indices[p],{layerIndex:d,x:s[d][p][0],y0:f,y:s[d][p][1]*c})}}function Q1(a){for(var e=a.length,t=a[0].length,r=[],i=[],n=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=a[l][o][1];s>n&&(n=s),r.push(s)}for(var u=0;u<t;++u)i[u]=(n-r[u])/2;n=0;for(var c=0;c<t;++c){var v=r[c]+i[c];v>n&&(n=v)}return{y0:i,max:n}}function tx(a){a.registerChartView(j1),a.registerSeriesModel(q1),a.registerLayout(J1),a.registerProcessor(Na("themeRiver"))}var ex=2,rx=4,ax=function(a){V(e,a);function e(t,r,i,n){var o=a.call(this)||this;o.z2=ex,o.textConfig={inside:!0},lt(o).seriesIndex=r.seriesIndex;var s=new ft({z2:rx,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=Cn(f,o));var p=Ro(l.getModel("itemStyle"),v,!0);F(v,p),D(Qi,function(m){var S=s.ensureState(m),x=l.getModel([m,"itemStyle"]);S.style=x.getItemStyle();var b=Ro(x,v);b&&(S.shape=b)}),t?(s.setShape(v),s.shape.r=c.r0,ee(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;mt(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)<p);h.ignore=!d,D(pf,function(y){var m=y==="normal"?i.getModel("label"):i.getModel([y,"label"]),S=y==="normal",x=S?h:h.ensureState(y),b=t.getFormattedLabel(f,y);S&&(b=b||r.node.name),x.style=dt(m,{},null,y!=="normal",!0),b&&(x.style.text=b);var _=m.get("show");_!=null&&!S&&(x.ignore=!_);var w=g(m,"position"),A=S?v:v.states[y],L=A.style.fill;A.textConfig={outsideFill:m.get("color")==="inherit"?L:null,inside:w!=="outside"};var T,C=g(m,"distance")||0,M=g(m,"align");w==="outside"?(T=o.r+C,M=l>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=ko(-l),I>Math.PI/2&&I<Math.PI*1.5&&(I+=Math.PI)):P==="tangential"?(I=Math.PI/2-l,I>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):le(P)&&(I=P*Math.PI/180),x.rotation=ko(I)});function g(y,m){var S=y.get(m);return S==null?n.get(m):S}h.dirtyStyle()},e}(Dr),xl=ax,yn="sunburstRootToNode",bl="sunburstHighlight",ix="sunburstUnhighlight";function nx(a){a.registerAction({type:yn,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(i,n){var o=Mr(e,[yn],i);if(o){var s=i.getViewRoot();s&&(e.direction=Kn(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),a.registerAction({type:bl,update:"none"},function(e,t,r){e=F({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n){var o=Mr(e,[bl],n);o&&(e.dataIndex=o.node.dataIndex)}r.dispatchAction(F(e,{type:"highlight"}))}),a.registerAction({type:ix,update:"updateView"},function(e,t,r){e=F({},e),r.dispatchAction(F(e,{type:"downplay"}))})}var ox=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 Oa(S,m,x,x).add(b).update(b).remove(ct(b,null)).execute();function x(_){return _.getId()}function b(_,w){var A=_==null?null:m[_],L=w==null?null:S[w];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 xl(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 xl(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";Wu(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:yn,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}(St),sx=ox,lx=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};mv(i);var n=this._levelModels=G(t.levels||[],function(l){return new jt(l,this,r)},this),o=jn.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=Xa(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(){Nc(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}(bt);function mv(a){var e=0;D(a.children,function(r){mv(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 ux=lx,_l=Math.PI/180;function cx(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")*_l,p=r.get("minAngle")*_l,d=r.getData().tree.root,g=r.getViewRoot(),y=g.depth,m=r.get("sort");m!=null&&Sv(g,m);var S=0;D(g.children,function(R){!isNaN(R.getValue())&&S++});var x=g.getValue(),b=Math.PI/(x||S)*2,_=g.depth>0,w=g.height-(_?-1:1),A=(h-v)/(w||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;$<p&&($=p),N=k+C*$;var U=R.depth-y-(_?-1:1),Q=v+A*U,et=v+A*(U+1),q=r.getLevelModel(R);if(q){var it=q.get("r0",!0),Tt=q.get("r",!0),J=q.get("radius",!0);J!=null&&(it=J[0],Tt=J[1]),it!=null&&(Q=B(it,l/2)),Tt!=null&&(et=B(Tt,l/2))}R.setLayout({angle:$,startAngle:k,endAngle:N,clockwise:L,cx:u,cy:c,r0:Q,r:et})}if(R.children&&R.children.length){var Y=0;D(R.children,function(at){Y+=M(at,k+Y)})}return N-k}};if(_){var P=v,I=v+A,E=Math.PI*2;d.setLayout({angle:E,startAngle:f,endAngle:f+E,clockwise:L,cx:u,cy:c,r0:P,r:I})}M(g,f)})}function Sv(a,e){var t=a.children||[];a.children=vx(t,e),t.length&&D(a.children,function(r){Sv(r,e)})}function vx(a,e){if(ut(e)){var t=G(a,function(i,n){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:n}});return t.sort(function(i,n){return e(i.params,n.params)}),G(t,function(i){return a[i.index]})}else{var r=e==="asc";return a.sort(function(i,n){var o=(i.getValue()-n.getValue())*(r?1:-1);return o===0?(i.dataIndex-n.dataIndex)*(r?-1:1):o})}}function hx(a){var e={};function t(r,i,n){for(var o=r;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&tt(s)&&(s=df(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 fx(a){a.registerChartView(sx),a.registerSeriesModel(ux),a.registerLayout(ct(cx,"sunburst")),a.registerProcessor(ct(Na,"sunburst")),a.registerVisual(hx),nx(a)}var wl={color:"fill",borderColor:"stroke"},px={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},he=Mt(),dx=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 ir(null,this)},e.prototype.getDataParams=function(t,r,i){var n=a.prototype.getDataParams.call(this,t,r);return i&&(n.info=he(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}(bt),gx=dx;function yx(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(yx,a)}}}function Sx(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 xx(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(Sx,a)}}}function bx(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 _x(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(bx,a)}}}function wx(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 Ax(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(wx,a)}}}function Tx(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)}}}}function xv(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||z(a,"text")))}function bv(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 Al(o,a),D(o.rich,function(l){Al(l,l)}),{textConfig:i,textContent:n}}function Al(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 Tl(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";Dl(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){Dl(s,s)}),r}function Dl(a,e){!e||(z(e,"fill")&&(a.textFill=e.fill),z(e,"stroke")&&(a.textStroke=e.fill),z(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),z(e,"font")&&(a.font=e.font),z(e,"fontStyle")&&(a.fontStyle=e.fontStyle),z(e,"fontWeight")&&(a.fontWeight=e.fontWeight),z(e,"fontSize")&&(a.fontSize=e.fontSize),z(e,"fontFamily")&&(a.fontFamily=e.fontFamily),z(e,"align")&&(a.textAlign=e.align),z(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),z(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),z(e,"width")&&(a.textWidth=e.width),z(e,"height")&&(a.textHeight=e.height),z(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),z(e,"padding")&&(a.textPadding=e.padding),z(e,"borderColor")&&(a.textBorderColor=e.borderColor),z(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),z(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),z(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),z(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),z(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),z(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),z(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),z(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),z(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),z(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}var _v={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Ll=gt(_v);Nu(Lr,function(a,e){return a[e]=1,a},{});Lr.join(", ");var wa=["","style","shape","extra"],ar=Mt();function no(a,e,t,r,i){var n=a+"Animation",o=ju(a,r,i)||{},s=ar(e).userDuring;return o.duration>0&&(o.during=s?K(Mx,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),F(o,t[n]),o}function la(a,e,t,r){r=r||{};var i=r.dataIndex,n=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=ar(a),u=e.style;l.userDuring=e.during;var c={},v={};if(Ex(a,e,v),Il("shape",e,v),Il("extra",e,v),!n&&s&&(Px(a,e,c),Cl("shape",a,e,c),Cl("extra",a,e,c),Vx(a,e,u,c)),v.style=u,Dx(a,v,o),Cx(a,e),s)if(n){var h={};D(wa,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=no("enter",a,e,t,i);f.duration>0&&a.animateFrom(h,f)}else Lx(a,e,i||0,t,c);wv(a,e),u?a.dirty():a.markRedraw()}function wv(a,e){for(var t=ar(a).leaveToProps,r=0;r<wa.length;r++){var i=wa[r],n=i?e[i]:e;n&&n.leaveTo&&(t||(t=ar(a).leaveToProps={}),i&&(t[i]=t[i]||{}),F(i?t[i]:t,n.leaveTo))}}function ja(a,e,t,r){if(a){var i=a.parent,n=ar(a).leaveToProps;if(n){var o=no("update",a,e,t,0);o.done=function(){i.remove(a),r&&r()},a.animateTo(n,o)}else i.remove(a),r&&r()}}function Ge(a){return a==="all"}function Dx(a,e,t){var r=e.style;if(!a.isGroup&&r){if(t){a.useStyle({});for(var i=a.animators,n=0;n<i.length;n++){var o=i[n];o.targetName==="style"&&o.changeTarget(a.style)}}a.setStyle(r)}e&&(e.style=null,e&&a.attr(e),e.style=r)}function Lx(a,e,t,r,i){if(i){var n=no("update",a,e,r,t);n.duration>0&&a.animateFrom(i,n)}}function Cx(a,e){z(e,"silent")&&(a.silent=e.silent),z(e,"ignore")&&(a.ignore=e.ignore),a instanceof er&&z(e,"invisible")&&(a.invisible=e.invisible),a instanceof qt&&z(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var ne={},Ix={setTransform:function(a,e){return ne.el[a]=e,this},getTransform:function(a){return ne.el[a]},setShape:function(a,e){var t=ne.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){var e=ne.el.shape;if(e)return e[a]},setStyle:function(a,e){var t=ne.el,r=t.style;return r&&(r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){var e=ne.el.style;if(e)return e[a]},setExtra:function(a,e){var t=ne.el.extra||(ne.el.extra={});return t[a]=e,this},getExtra:function(a){var e=ne.el.extra;if(e)return e[a]}};function Mx(){var a=this,e=a.el;if(!!e){var t=ar(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}ne.el=e,r(Ix)}}function Cl(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]={}),Ge(l))F(o,n);else for(var u=de(l),c=0;c<u.length;c++){var v=u[c],h=n[v];o[v]=h}else if(Ge(s)||Wt(s,a)>=0){!o&&(o=r[a]={});for(var f=gt(n),c=0;c<f.length;c++){var v=f[c],h=n[v];Rx(i[v],h)&&(o[v]=h)}}}}}function Il(a,e,t){var r=e[a];if(!!r)for(var i=t[a]={},n=gt(r),o=0;o<n.length;o++){var s=n[o];i[s]=gf(r[s])}}function Px(a,e,t){for(var r=e.transition,i=Ge(r)?Lr:de(r||[]),n=0;n<i.length;n++){var o=i[n];if(!(o==="style"||o==="shape"||o==="extra")){var s=a[o];t[o]=s}}}function Ex(a,e,t){for(var r=0;r<Ll.length;r++){var i=Ll[r],n=_v[i],o=e[i];o&&(t[n[0]]=o[0],t[n[1]]=o[1])}for(var r=0;r<Lr.length;r++){var s=Lr[r];e[s]!=null&&(t[s]=e[s])}}function Vx(a,e,t,r){if(!!t){var i=a.style,n;if(i){var o=t.transition,s=e.transition;if(o&&!Ge(o)){var l=de(o);!n&&(n=r.style={});for(var u=0;u<l.length;u++){var c=l[u],v=i[c];n[c]=v}}else if(a.getAnimationStyleProps&&(Ge(s)||Ge(o)||Wt(s,"style")>=0)){var h=a.getAnimationStyleProps(),f=h?h.style:null;if(f){!n&&(n=r.style={});for(var p=gt(t),u=0;u<p.length;u++){var c=p[u];if(f[c]){var v=i[c];n[c]=v}}}}}}}function Rx(a,e){return yf(a)?a!==e:a!=null&&isFinite(a)}var Av=Mt(),kx=["percent","easing","shape","style","extra"];function Tv(a){a.stopAnimation("keyframe"),a.attr(Av(a))}function Aa(a,e,t){if(!(!t.isAnimationEnabled()||!e)){if(O(e)){D(e,function(s){Aa(a,s,t)});return}var r=e.keyframes,i=e.duration;if(t&&i==null){var n=ju("enter",t,0);i=n&&n.duration}if(!(!r||!i)){var o=Av(a);D(wa,function(s){if(!(s&&!a[s])){var l;r.sort(function(u,c){return u.percent-c.percent}),D(r,function(u){var c=a.animators,v=s?u[s]:u;if(!!v){var h=gt(v);if(s||(h=Kt(h,function(d){return Wt(kx,d)<0})),!!h.length){l||(l=a.animate(s,e.loop,!0),l.scope="keyframe");for(var f=0;f<c.length;f++)c[f]!==l&&c[f].targetName===l.targetName&&c[f].stopTracks(h);s&&(o[s]=o[s]||{});var p=s?o[s]:o;D(h,function(d){p[d]=((s?a[s]:a)||{})[d]}),l.whenWithKeys(i*u.percent,v,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(i).start(e.easing)}})}}}var fe="emphasis",Se="normal",oo="blur",so="select",Ae=[Se,fe,oo,so],Ni={normal:["itemStyle"],emphasis:[fe,"itemStyle"],blur:[oo,"itemStyle"],select:[so,"itemStyle"]},zi={normal:["label"],emphasis:[fe,"label"],blur:[oo,"label"],select:[so,"label"]},Nx=["x","y"],zx="e\0\0",Ut={normal:{},emphasis:{},blur:{},select:{}},Bx={cartesian2d:mx,geo:xx,single:_x,polar:Ax,calendar:Tx};function mn(a){return a instanceof qt}function Sn(a){return a instanceof er}function Gx(a,e){e.copyTransform(a),Sn(e)&&Sn(a)&&(e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel,e.invisible=a.invisible,e.ignore=a.ignore,mn(e)&&mn(a)&&e.setShape(a.shape))}var Ox=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){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=Ml(t,s,r,i);o||l.removeAll(),s.diff(o).add(function(v){Bi(i,null,v,u(v,n),t,l,s)}).remove(function(v){var h=o.getItemGraphicEl(v);h&&ja(h,he(h).option,t)}).update(function(v,h){var f=o.getItemGraphicEl(h);Bi(i,f,v,u(v,n),t,l,s)}).execute();var c=t.get("clip",!0)?zn(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,i,n,o){var s=r.getData(),l=Ml(r,s,i,n),u=this._progressiveEls=[];function c(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var v=t.start;v<t.end;v++){var h=Bi(null,null,v,l(v,o),r,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){Fa(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,r,i,n){var o=r.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(St),Fx=Ox;function lo(a){var e=a.type,t;if(e==="path"){var r=a.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,n=Cv(r);t=xf(n,null,i,r.layout||"center"),he(t).customPathData=n}else if(e==="image")t=new ue({}),he(t).customImagePath=a.style.image;else if(e==="text")t=new ft({});else if(e==="group")t=new Z;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Ku(e);if(!o){var s="";Zu(s)}t=new o}return he(t).customGraphicType=e,t.name=a.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function uo(a,e,t,r,i,n,o){Tv(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),r&&r.transition==null&&(r.transition=Nx);var l=r&&r.style;if(l){if(e.type==="text"){var u=l;z(u,"textFill")&&(u.fill=u.textFill),z(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,v=mn(e)?l.decal:null;a&&v&&(v.dirty=!0,c=Cn(v,a)),l.__decalPattern=c}if(Sn(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}la(e,r,n,{dataIndex:t,isInit:o,clearStyle:!0}),Aa(e,r.keyframeAnimation,n)}function Dv(a,e,t,r,i){var n=e.isGroup?null:e,o=i&&i[a].cfg;if(n){var s=n.ensureState(a);if(r===!1){var l=n.getState(a);l&&(l.style=null)}else s.style=r||null;o&&(s.textConfig=o),rr(n)}}function Wx(a,e,t){if(!a.isGroup){var r=a,i=t.currentZ,n=t.currentZLevel;r.z=i,r.zlevel=n;var o=e.z2;o!=null&&(r.z2=o||0);for(var s=0;s<Ae.length;s++)Hx(r,e,Ae[s])}}function Hx(a,e,t){var r=t===Se,i=r?e:Ta(e,t),n=i?i.z2:null,o;n!=null&&(o=r?a:a.ensureState(t),o.z2=n||0)}function Ml(a,e,t,r){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms(n):Bx[n.type](n));for(var s=st({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:_,ordinalRawValue:b,styleEmphasis:w,visual:T,barLayout:C,currentSeriesIndices:M,font:P},o.api||{}),l={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:$x(a.getData())},u,c,v={},h={},f={},p={},d=0;d<Ae.length;d++){var g=Ae[d];f[g]=a.getModel(Ni[g]),p[g]=a.getModel(zi[g])}function y(I){return I===u?c||(c=e.getItemModel(I)):e.getItemModel(I)}function m(I,E){return e.hasItemOption?I===u?v[E]||(v[E]=y(I).getModel(Ni[E])):y(I).getModel(Ni[E]):f[E]}function S(I,E){return e.hasItemOption?I===u?h[E]||(h[E]=y(I).getModel(zi[E])):y(I).getModel(zi[E]):p[E]}return function(I,E){return u=I,c=null,v={},h={},i&&i(st({dataIndexInside:I,dataIndex:e.getRawIndex(I),actionType:E?E.type:null},l),s)};function x(I,E){return E==null&&(E=u),e.getStore().get(e.getDimensionIndex(I||0),E)}function b(I,E){E==null&&(E=u),I=I||0;var R=e.getDimensionInfo(I);if(!R){var k=e.getDimensionIndex(I);return k>=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 _(I,E){E==null&&(E=u);var R=e.getItemVisual(E,"style"),k=R&&R.fill,N=R&&R.opacity,H=m(E,Se).getItemStyle();k!=null&&(H.fill=k),N!=null&&(H.opacity=N);var $={inheritColor:tt(k)?k:"#000"},U=S(E,Se),Q=dt(U,null,$,!1,!0);Q.text=U.getShallow("show")?Ct(a.getFormattedLabel(E,Se),rn(e,E)):null;var et=No(U,$,!1);return L(I,H),H=Tl(H,Q,et),I&&A(H,I),H.legacy=!0,H}function w(I,E){E==null&&(E=u);var R=m(E,fe).getItemStyle(),k=S(E,fe),N=dt(k,null,null,!0,!0);N.text=k.getShallow("show")?Gr(a.getFormattedLabel(E,fe),a.getFormattedLabel(E,Se),rn(e,E)):null;var H=No(k,null,!0);return L(I,R),R=Tl(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(wl,I)){var R=e.getItemVisual(E,"style");return R?R[wl[I]]:null}if(z(px,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 Sf(I,t)}}function $x(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 Bi(a,e,t,r,i,n,o){if(!r){n.remove(e);return}var s=co(a,e,t,r,i,n);return s&&o.setItemGraphicEl(t,s),s&&mt(s,r.focus,r.blurScope,r.emphasisDisabled),s}function co(a,e,t,r,i,n){var o=-1,s=e;e&&Lv(e,r,i)&&(o=Wt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=lo(r),s&&Gx(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ut.normal.cfg=Ut.normal.conOpt=Ut.emphasis.cfg=Ut.emphasis.conOpt=Ut.blur.cfg=Ut.blur.conOpt=Ut.select.cfg=Ut.select.conOpt=null,Ut.isLegacy=!1,Yx(u,t,r,i,l,Ut),Ux(u,t,r,i,l),uo(a,u,t,r,Ut,i,l),z(r,"info")&&(he(u).info=r.info);for(var c=0;c<Ae.length;c++){var v=Ae[c];if(v!==Se){var h=Ta(r,v),f=vo(r,h,v);Dv(v,u,h,f,Ut)}}return Wx(u,r,i),r.type==="group"&&Xx(a,u,t,r,i),o>=0?n.replaceAt(u,o):n.add(u),u}function Lv(a,e,t){var r=he(a),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&qx(n)&&Cv(n)!==r.customPathData||i==="image"&&z(o,"image")&&o.image!==r.customImagePath}function Ux(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&&Lv(o,n,r)&&(o=null),o||(o=lo(n),a.setClipPath(o)),uo(null,o,e,n,null,r,i)}}function Yx(a,e,t,r,i,n){if(!a.isGroup){Pl(t,null,n),Pl(t,fe,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=lo(o),a.setTextContent(c)),uo(null,c,e,o,null,r,i);for(var v=o&&o.style,h=0;h<Ae.length;h++){var f=Ae[h];if(f!==Se){var p=n[f].conOpt;Dv(f,c,p,vo(o,p,f),null)}}v?c.dirty():c.markRedraw()}}}}function Pl(a,e,t){var r=e?Ta(a,e):a,i=e?vo(a,r,fe):a.style,n=a.type,o=r?r.textConfig:null,s=a.textContent,l=s?e?Ta(s,e):s:null;if(i&&(t.isLegacy||xv(i,n,!!o,!!l))){t.isLegacy=!0;var u=bv(i,n,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var v=e?t[e]:t.normal;v.cfg=o,v.conOpt=l}function Ta(a,e){return e?a?a[e]:null:a}function vo(a,e,t){var r=e&&e.style;return r==null&&t===fe&&a&&(r=a.styleEmphasis),r}function Xx(a,e,t,r,i){var n=r.children,o=n?n.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){jx({api:a,oldChildren:e.children()||[],newChildren:n||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var v=n[c],h=e.childAt(c);v?(v.ignore==null&&(v.ignore=!1),co(a,h,t,v,i,e)):h.ignore=!0}for(var f=e.childCount()-1;f>=c;f--){var p=e.childAt(f);Zx(e,p,i)}}}function Zx(a,e,t){e&&ja(e,he(a).option,t)}function jx(a){new Oa(a.oldChildren,a.newChildren,El,El,a).add(Vl).update(Vl).remove(Kx).execute()}function El(a,e){var t=a&&a.name;return t!=null?t:zx+e}function Vl(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,i=e!=null?t.oldChildren[e]:null;co(t.api,i,t.dataIndex,r,t.seriesModel,t.group)}function Kx(a){var e=this.context,t=e.oldChildren[a];t&&ja(t,he(t).option,e.seriesModel)}function Cv(a){return a&&(a.pathData||a.d)}function qx(a){return a&&(z(a,"pathData")||z(a,"d"))}function Jx(a){a.registerChartView(Fx),a.registerSeriesModel(gx)}var Qx=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=qu(n),p=eb[h](s,l,v,c);p.style=f,t.graphicKey=p.type,t.pointer=p}var d=n.get(["label","margin"]),g=tb(r,i,n,l,d);bf(t,i,n,o,g)},e}(Ju);function tb(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=nr();za(h,h,s),He(h,h,[r.cx,r.cy]),u=Qe([o,-i],h);var f=e.getModel("axisLabel").get("rotate")||0,p=Fe.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 eb={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:Qu(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:zo(e.cx,e.cy,r[0],r[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:zo(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},rb=Qx,ab=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}(Ht),ib=ab,ho=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",or).models[0]},e.type="polarAxis",e}(Ht);re(ho,ka);var nb=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}(ho),ob=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}(ho),fo=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}(ce);fo.prototype.dataToRadius=ce.prototype.dataToCoord;fo.prototype.radiusToData=ce.prototype.coordToData;var sb=fo,lb=Mt(),po=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=_f(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=lb(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}(ce);po.prototype.dataToAngle=ce.prototype.dataToCoord;po.prototype.angleToData=ce.prototype.coordToData;var ub=po,Iv=["radius","angle"],cb=function(){function a(e){this.dimensions=Iv,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new sb,this._angleAxis=new ub,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=u<o?1:-1;u<o||u>s;)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=Rl(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=Rl(t);return i===this?this.pointToData(r):null},a}();function Rl(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var vb=cb;function hb(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 fb(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(Bo(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),D(Bo(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),fa(r.scale,r.model),fa(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 pb(a){return a.mainType==="angleAxis"}function kl(a,e){if(a.type=e.get("type"),a.scale=kn(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),pb(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:Iv,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,i){var n=new vb(i+"");n.update=fb;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");kl(o,l),kl(s,u),hb(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",or).models[0];r.coordinateSystem=i.coordinateSystem}}),t}},gb=db,yb=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function ta(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 ea(a){var e=a.getRadiusAxis();return e.inverse?0:1}function Nl(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 mb=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});Nl(u),Nl(s),D(yb,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Sb[c](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(Wr),Sb={axisLine:function(a,e,t,r,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=ea(t),l=s?0:1,u;n[l]===0?u=new We({shape:{cx:t.cx,cy:t.cy,r:n[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Pu({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[ea(t)],u=G(r,function(c){return new te({shape:ta(t,[l,l+s],c.coord)})});a.add(Qt(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[ea(t)],c=[],v=0;v<i.length;v++)for(var h=0;h<i[v].length;h++)c.push(new te({shape:ta(t,[u,u+l],i[v][h].coord)}));a.add(Qt(c,{style:st(s.getModel("lineStyle").getLineStyle(),st(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(a,e,t,r,i,n,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");D(o,function(v,h){var f=l,p=v.tickValue,d=n[ea(t)],g=t.coordToPoint([d+u,v.coord]),y=t.cx,m=t.cy,S=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",x=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];Bt(b)&&b.textStyle&&(f=new jt(b.textStyle,l,l.ecModel))}var _=new ft({silent:Fe.isLabelSilent(e),style:dt(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(_),c){var w=Fe.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=v.rawLabel,lt(_).eventData=w}},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<r.length;v++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new te({shape:ta(t,n,r[v].coord)}))}for(var v=0;v<c.length;v++)a.add(Qt(c[v],{style:st({stroke:l[v%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(a,e,t,r,i,n){if(!!i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new te({shape:ta(t,n,i[u][c].coord)}));a.add(Qt(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(a,e,t,r,i,n){if(!!r.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],v=Math.PI/180,h=-r[0].coord*v,f=Math.min(n[0],n[1]),p=Math.max(n[0],n[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var m=g===y?r[0].coord:r[g].coord,S=u++%l.length;c[S]=c[S]||[],c[S].push(new Dr({shape:{cx:t.cx,cy:t.cy,r0:f,r:p,startAngle:h,endAngle:-m*v,clockwise:d},silent:!0})),h=-m*v}for(var g=0;g<c.length;g++)a.add(Qt(c[g],{style:st({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},xb=mb,bb=["axisLine","axisTickLabel","axisName"],_b=["splitLine","splitArea","minorSplitLine"],wb=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=this._axisGroup,n=this._axisGroup=new Z;this.group.add(n);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),v=l.getExtent()[0],h=o.getExtent(),f=Tb(s,t,v),p=new Fe(t,f);D(bb,p.add,p),n.add(p.getGroup()),Nn(i,n,t),D(_b,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&Ab[d](this.group,t,s,v,h,u,c)},this)}},e.type="radiusAxis",e}(Wr),Ab={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<n.length;v++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new We({shape:{cx:t.cx,cy:t.cy,r:Math.max(n[v].coord,0)}}))}for(var v=0;v<c.length;v++)a.add(Qt(c[v],{style:st({stroke:l[v%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(a,e,t,r,i,n,o){if(!!o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var v=0;v<o[c].length;v++)u.push(new We({shape:{cx:t.cx,cy:t.cy,r:o[c][v].coord}}));a.add(Qt(u,{style:st({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(a,e,t,r,i,n){if(!!n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],v=n[0].coord,h=1;h<n.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new Dr({shape:{cx:t.cx,cy:t.cy,r0:v,r:n[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),v=n[h].coord}for(var h=0;h<c.length;h++)a.add(Qt(c[h],{style:st({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function Tb(a,e,t){return{position:[a.cx,a.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var Db=wb;function Mv(a){return a.get("stack")||"__ec_stack_"+a.seriesIndex}function Pv(a,e){return e.dim+a.model.componentIndex}function Lb(a,e,t){var r={},i=Cb(Kt(e.getSeriesByType(a),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(a,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Pv(s,l),c=Mv(n),v=i[u][c],h=v.offset,f=v.width,p=s.getOtherAxis(l),d=n.coordinateSystem.cx,g=n.coordinateSystem.cy,y=n.get("barMinHeight")||0,m=n.get("barMinAngle")||0;r[c]=r[c]||[];for(var S=o.mapDimension(p.dim),x=o.mapDimension(l.dim),b=tc(o,S),_=l.dim!=="radius"||!n.get("roundCap",!0),w=p.dataToCoord(0),A=0,L=o.count();A<L;A++){var T=o.get(S,A),C=o.get(x,A),M=T>=0?"p":"n",P=w;b&&(r[c][C]||(r[c][C]={p:w,n:w}),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)-w,H=l.dataToCoord(C);Math.abs(N)<y&&(N=(N<0?-1:1)*y),I=P,E=P+N,R=H-h,k=R-f,b&&(r[c][C][M]=E)}else{var $=p.dataToCoord(T,_)-w,U=l.dataToCoord(C);Math.abs($)<m&&($=($<0?-1:1)*m),I=U+h,E=I+f,R=P,k=P+$,b&&(r[c][C][M]=k)}o.setItemLayout(A,{cx:d,cy:g,r0:I,r:E,startAngle:-R*Math.PI/180,endAngle:-k*Math.PI/180,clockwise:R>=k})}}})}function Cb(a){var e={};D(a,function(r,i){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Pv(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=Mv(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<v&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,c--)}),v=(u-s)/(c+(c-1)*l),v=Math.max(v,0);var h=0,f;D(n,function(d,g){d.width||(d.width=v),f=d,h+=d.width*(1+l)}),f&&(h-=f.width*l);var p=-h/2;D(n,function(d,g){t[i][g]=t[i][g]||{offset:p,width:d.width},p+=d.width*(1+l)})}),t}var Ib={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Mb={splitNumber:5},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.type="polar",e}(Jt);function Eb(a){j(Gn),Wr.registerAxisPointerClass("PolarAxisPointer",rb),a.registerCoordinateSystem("polar",gb),a.registerComponentModel(ib),a.registerComponentView(Pb),pa(a,"angle",nb,Ib),pa(a,"radius",ob,Mb),a.registerComponentView(xb),a.registerComponentView(Db),a.registerLayout(ct(Lb,"bar"))}function xn(a,e){e=e||{};var t=a.coordinateSystem,r=a.axis,i={},n=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var v={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=v[n],a.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Nt(e.labelInside,a.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var h=e.rotate;return h==null&&(h=a.get(["axisLabel","rotate"])),i.labelRotation=n==="top"?-h:h,i.z2=1,i}var Vb=["axisLine","axisTickLabel","axisName"],Rb=["splitArea","splitLine"],kb=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,i,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Z;var l=xn(t),u=new Fe(t,l);D(Vb,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),D(Rb,function(c){t.get([c,"show"])&&Nb[c](this,this.group,this._axisGroup,t)},this),Nn(s,this._axisGroup,t),a.prototype.render.call(this,t,r,i,n)},e.prototype.remove=function(){wf(this)},e.type="singleAxis",e}(Wr),Nb={splitLine:function(a,e,t,r){var i=r.axis;if(!i.scale.isBlank()){var n=r.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=r.coordinateSystem.getRect(),c=i.isHorizontal(),v=[],h=0,f=i.getTicksCoords({tickModel:n}),p=[],d=[],g=0;g<f.length;++g){var y=i.toGlobalCoord(f[g].coord);c?(p[0]=y,p[1]=u.y,d[0]=y,d[1]=u.y+u.height):(p[0]=u.x,p[1]=y,d[0]=u.x+u.width,d[1]=y);var m=new te({shape:{x1:p[0],y1:p[1],x2:d[0],y2:d[1]},silent:!0});Af(m.shape,l);var S=h++%s.length;v[S]=v[S]||[],v[S].push(m)}for(var x=o.getLineStyle(["color"]),g=0;g<v.length;++g)e.add(Qt(v[g],{style:st({stroke:s[g%s.length]},x),silent:!0}))}},splitArea:function(a,e,t,r){Tf(a,t,r,r)}},zb=kb,Ev=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Ht);re(Ev,ka.prototype);var Gi=Ev,Bb=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.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,r){return this.coordinateSystem.pointToData(t)[0]},e}(ce),Gb=Bb,Vv=["single"],Ob=function(){function a(e,t,r){this.type="single",this.dimension="single",this.dimensions=Vv,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var i=this.dimension,n=new Gb(i,kn(e),[0,0],e.get("type"),e.get("position")),o=n.type==="category";n.onBand=o&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},a.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var i=r.getData();D(i.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(i,n)},this),fa(this._axis.scale,this._axis.model)}},this)},a.prototype.resize=function(e,t){this._rect=ae({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},a.prototype.getRect=function(){return this._rect},a.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),i=r?[0,e.width]:[0,e.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),this._updateAxisTransform(t,r?e.x:e.y)},a.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),i=r[0]+r[1],n=e.isHorizontal();e.toGlobalCoord=n?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=n?function(o){return o-t}:function(o){return i-o+t}},a.prototype.getAxis=function(){return this._axis},a.prototype.getBaseAxis=function(){return this._axis},a.prototype.getAxes=function(){return[this._axis]},a.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},a.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),i=r.orient;return i==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),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=zl(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=zl(t);return i===this?this.pointToData(r):null},a}();function zl(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Fb(a,e){var t=[];return a.eachComponent("singleAxis",function(r,i){var n=new Ob(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",or).models[0];r.coordinateSystem=i&&i.coordinateSystem}}),t}var Wb={create:Fb,dimensions:Vv},Hb=Wb,Bl=["x","y"],$b=["width","height"],Ub=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=Oi(l,1-Da(s)),c=l.dataToPoint(r)[0],v=n.get("type");if(v&&v!=="none"){var h=qu(n),f=Yb[v](s,c,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=xn(i);Df(r,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=xn(r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Lf(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=Da(o),u=Oi(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=Oi(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}(Ju),Yb={line:function(a,e,t){var r=Qu([e,t[0]],[e,t[1]],Da(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:Cf([e-r/2,t[0]],[r,i],Da(a))}}};function Da(a){return a.isHorizontal()?0:1}function Oi(a,e){var t=a.getRect();return[t[Bl[e]],t[Bl[e]]+t[$b[e]]]}var Xb=Ub,Zb=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}(Jt);function jb(a){j(Gn),Wr.registerAxisPointerClass("SingleAxisPointer",Xb),a.registerComponentView(Zb),a.registerComponentView(zb),a.registerComponentModel(Gi),pa(a,"single",Gi,Gi.defaultOption),a.registerCoordinateSystem("single",Hb)}var Kb=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var n=If(t);a.prototype.init.apply(this,arguments),Gl(t,n)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),Gl(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}(Ht);function Gl(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 Mf(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});ec(a,e,{type:"box",ignoreSize:i})}var qb=Kb,Jb=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 It({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 De({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?Pf(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:dt(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=Go(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<v[h].length-1;d++){var g=v[h][d].slice(),y=this._firstDayOfMonth[d];if(p){var m=this._firstDayPoints[d];g[f]=(m[f]+v[0][d+1][f])/2}var S=o.get("formatter"),x=s[+y.m-1],b={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:x},_=this._formatterLabel(S,b),w=new ft({z2:30,style:F(dt(o,{text:_}),this._monthTextPositionControl(g,p,i,u,l))});n.add(w)}}},e.prototype._weekTextPositionControl=function(t,r,i,n,o){var s="center",l="middle",u=t[0],c=t[1],v=i==="start";return r==="horizontal"?(u=u+n+(v?1:-1)*o[0]/2,s=v?"right":"left"):(c=c+n+(v?1:-1)*o[1]/2,l=v?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,i,n,o){var s=t.getModel("dayLabel");if(!!s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),v=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||tt(c)){c&&(r=Go(c)||r);var f=r.get(["time","dayOfWeekShort"]);c=f||G(r.get(["time","dayOfWeekAbbr"]),function(b){return b[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];v=B(v,Math.min(d[1],d[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,v=-v);for(var g=0;g<7;g++){var y=l.getNextNDay(p,g),m=l.dataToRect([y.time],!1).center,S=g;S=Math.abs((g+h)%7);var x=new ft({z2:30,style:F(dt(s,{text:c[S]}),this._weekTextPositionControl(m,n,u,v,d))});o.add(x)}}},e.type="calendar",e}(Jt),Qb=Jb,Fi=864e5,t_=function(){function a(e,t,r){this.type="calendar",this.dimensions=a.dimensions,this.getDimensionsInfo=a.getDimensionsInfo,this._model=e}return a.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},a.prototype.getRangeInfo=function(){return this._rangeInfo},a.prototype.getModel=function(){return this._model},a.prototype.getRect=function(){return this._rect},a.prototype.getCellWidth=function(){return this._sw},a.prototype.getCellHeight=function(){return this._sh},a.prototype.getOrient=function(){return this._orient},a.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},a.prototype.getDateInfo=function(e){e=Ef(e);var t=e.getFullYear(),r=e.getMonth()+1,i=r<10?"0"+r:""+r,n=e.getDate(),o=n<10?"0"+n:""+n,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},a.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},a.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,i=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];D([0,1],function(v){c(n,v)&&(o[i[v]]=n[v]*s[v])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=ae(o,l);D([0,1],function(v){c(n,v)||(n[v]=u[i[v]]/s[v])});function c(v,h){return v[h]!=null&&v[h]!=="auto"}this._sw=n[0],this._sh=n[1]},a.prototype.dataToPoint=function(e,t){O(e)&&(e=e[0]),t==null&&(t=!0);var r=this.getDateInfo(e),i=this._rangeInfo,n=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+Fi))return[NaN,NaN];var o=r.day,s=this._getRangeInfo([i.start.time,n]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},a.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},a.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},a.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,i):this._getDateByWeeksAndDay(t,r-1,i)},a.prototype.convertToPixel=function(e,t,r){var i=Ol(t);return i===this?i.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=Ol(t);return i===this?i.pointToData(r):null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(O(e)&&e.length===1&&(e=e[0]),O(e))t=e;else{var r=e.toString();if(/^\d{4}$/.test(r)&&(t=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var i=this.getDateInfo(r),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(t=[r,r])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var i=Math.floor(t[1].time/Fi)-Math.floor(t[0].time/Fi)+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&&t<i.fweek||e===i.weeks&&t>i.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 Ol(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}var e_=t_;function r_(a){a.registerComponentModel(qb),a.registerComponentView(Qb),a.registerCoordinateSystem("calendar",e_)}function a_(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 Fl(a,e){var t;return D(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function i_(a,e,t){var r=F({},t),i=a[e],n=t.$action||"merge";n==="merge"?i?(Ft(i,r,!0),ec(i,r,{ignoreSize:!0}),Rf(t,i),ra(t,i),ra(t,i,"shape"),ra(t,i,"style"),ra(t,i,"extra"),t.clipPath=i.clipPath):a[e]=r:n==="replace"?a[e]=r:n==="remove"&&i&&(a[e]=null)}var Rv=["transition","enterFrom","leaveTo"],n_=Rv.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function ra(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?Rv:n_,i=0;i<r.length;i++){var n=r[i];a[n]==null&&e[n]!=null&&(a[n]=e[n])}}function o_(a,e){if(!!a&&(a.hv=e.hv=[Fl(e,["left","right"]),Fl(e,["top","bottom"])],a.type==="group")){var t=a,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var s_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var i=this.option.elements;this.option.elements=null,a.prototype.mergeOption.call(this,t,r),this.option.elements=i},e.prototype.optionUpdated=function(t,r){var i=this.option,n=(r?i:t).elements,o=i.elements=r?[]:i.elements,s=[];this._flatten(n,s,null);var l=Vf(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];D(l,function(c,v){var h=c.newOption;!h||(u.push(h),a_(c,h),i_(o,v,h),o_(o[v],h))},this),i.elements=Kt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,r,i){D(t,function(n){if(!!n){i&&(n.parentOption=i),r.push(n);var o=n.children;o&&o.length&&this._flatten(o,r,n),delete n.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Ht),Wl={path:null,compoundPath:null,group:Z,image:ue,text:ft},Yt=Mt(),l_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=nt()},e.prototype.render=function(t,r,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(!!r){var i=this._elMap,n=this.group,o=t.get("z"),s=t.get("zlevel");D(r,function(l){var u=ve(l.id,null),c=u!=null?i.get(u):null,v=ve(l.parentId,null),h=v!=null?i.get(v):n,f=l.type,p=l.style;f==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var d=l.textContent,g=l.textConfig;if(p&&xv(p,f,!!g,!!d)){var y=bv(p,f,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var m=u_(l),S=l.$action||"merge",x=S==="merge",b=S==="replace";if(x){var _=!c,w=c;_?w=Hl(u,h,l.type,i):(w&&(Yt(w).isNew=!1),Tv(w)),w&&(la(w,m,t,{isInit:_}),$l(w,l,o,s))}else if(b){ua(c,l,i,t);var A=Hl(u,h,l.type,i);A&&(la(A,m,t,{isInit:!0}),$l(A,l,o,s))}else S==="remove"&&(wv(c,l),ua(c,l,i,t));var L=i.get(u);if(L&&d)if(x){var T=L.getTextContent();T?T.attr(d):L.setTextContent(new ft(d))}else b&&L.setTextContent(new ft(d));if(L){var C=l.clipPath;if(C){var M=C.type,P=void 0,_=!1;if(x){var I=L.getClipPath();_=!I||Yt(I).type!==M,P=_?bn(M):I}else b&&(_=!0,P=bn(M));L.setClipPath(P),la(P,C,t,{isInit:_}),Aa(P,C.keyframeAnimation,t)}var E=Yt(L);L.setTextConfig(g),E.option=l,c_(L,t,l),Vu({el:L,componentModel:t,itemName:L.name,itemTooltipOption:l.tooltip}),Aa(L,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var i=t.option.elements,n=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],c=0;c<i.length;c++){var v=i[c],h=ve(v.id,null),f=h!=null?o.get(h):null;if(!(!f||!f.isGroup)){var p=f.parent,d=p===n,g=Yt(f),y=Yt(p);g.width=B(g.option.width,d?s:y.width)||0,g.height=B(g.option.height,d?l:y.height)||0}}for(var c=i.length-1;c>=0;c--){var v=i[c],h=ve(v.id,null),f=h!=null?o.get(h):null;if(!!f){var p=f.parent,y=Yt(p),m=p===n?{width:s,height:l}:{width:y.width,height:y.height},S={},x=Pn(f,v,m,null,{hv:v.hv,boundingMode:v.bounding},S);if(!Yt(f).isNew&&x){for(var b=v.transition,_={},w=0;w<u.length;w++){var A=u[w],L=S[A];b&&(Ge(b)||Wt(b,A)>=0)?_[A]=L:f[A]=L}pt(f,_,t,0)}else f.attr(S)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(i){ua(i,Yt(i).option,r,t._lastGraphicModel)}),this._elMap=nt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Jt);function bn(a){var e=z(Wl,a)?Wl[a]:Ku(a),t=new e({});return Yt(t).type=a,t}function Hl(a,e,t,r){var i=bn(t);return e.add(i),r.set(a,i),Yt(i).id=a,Yt(i).isNew=!0,i}function ua(a,e,t,r){var i=a&&a.parent;i&&(a.type==="group"&&a.traverse(function(n){ua(n,e,t,r)}),ja(a,e,r),t.removeKey(Yt(a).id))}function $l(a,e,t,r){a.isGroup||D([["cursor",er.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(i){var n=i[0];z(e,n)?a[n]=Ct(e[n],i[1]):a[n]==null&&(a[n]=i[1])}),D(gt(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 u_(a){return a=F({},a),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(kf),function(e){delete a[e]}),a}function c_(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 v_(a){a.registerComponentModel(s_),a.registerComponentView(l_),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 h_=["rect","polygon","keep","clear"];function f_(a,e){var t=de(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),p_(s),e&&!s.length&&s.push.apply(s,h_)}}function p_(a){var e={};D(a,function(t){e[t]=1}),a.length=0,D(e,function(t,r){a.push(r)})}var Ul=D;function Yl(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function _n(a,e,t){var r={};return Ul(e,function(n){var o=r[n]=i();Ul(a[n],function(s,l){if(!!wt.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new wt(u),l==="opacity"&&(u=vt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new wt(u))}})}),r;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function kv(a,e,t){var r;D(t,function(i){e.hasOwnProperty(i)&&Yl(e[i])&&(r=!0)}),r&&D(t,function(i){e.hasOwnProperty(i)&&Yl(e[i])?a[i]=vt(e[i]):delete a[i]})}function d_(a,e,t,r,i,n){var o={};D(a,function(v){var h=wt.prepareVisualTypes(e[v]);o[v]=h});var s;function l(v){return rc(t,s,v)}function u(v,h){ac(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;y<m;y++){var S=g[y];d[S]&&d[S].applyVisual(v,l,u)}}}function g_(a,e,t,r){var i={};return D(a,function(n){var o=wt.prepareVisualTypes(e[n]);i[n]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(b){return rc(s,v,b)}function c(b,_){ac(s,v,b,_)}for(var v,h=s.getStore();(v=o.next())!=null;){var f=s.getRawDataItem(v);if(!(f&&f.visualMap===!1))for(var p=r!=null?h.get(l,v):v,d=t(p),g=e[d],y=i[d],m=0,S=y.length;m<S;m++){var x=y[m];g[x]&&g[x].applyVisual(p,u,c)}}}}}function y_(a){var e=a.brushType,t={point:function(r){return Xl[e].point(r,t,a)},rect:function(r){return Xl[e].rect(r,t,a)}};return t}var Xl={lineX:Zl(0),lineY:Zl(1),rect:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])},rect:function(a,e,t){return a&&t.boundingRect.intersect(a)}},polygon:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])&&Ne(t.range,a[0],a[1])},rect:function(a,e,t){var r=t.range;if(!a||r.length<=1)return!1;var i=a.x,n=a.y,o=a.width,s=a.height,l=r[0];if(Ne(r,i,n)||Ne(r,i+o,n)||Ne(r,i,n+s)||Ne(r,i+o,n+s)||xt.create(a).contain(l[0],l[1])||Ur(i,n,i+o,n,r)||Ur(i,n,i,n+s,r)||Ur(i+o,n,i+o,n+s,r)||Ur(i,n+s,i+o,n+s,r))return!0}}};function Zl(a){var e=["x","y"],t=["width","height"];return{point:function(r,i,n){if(r){var o=n.range,s=r[a];return hr(s,o)}},rect:function(r,i,n){if(r){var o=n.range,s=[r[e[a]],r[e[a]]+r[t[a]]];return s[1]<s[0]&&s.reverse(),hr(s[0],o)||hr(s[1],o)||hr(o[0],s)||hr(o[1],s)}}}}function hr(a,e){return e[0]<=a&&a<=e[1]}var jl=["inBrush","outOfBrush"],Wi="__ecBrushSelect",wn="__ecInBrushSelectEvent";function Nv(a){a.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new Nf(e.option,a);t.setInputRanges(e.areas,a)})}function m_(a,e,t){var r=[],i,n;a.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Nv(a),a.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:vt(o.areas),selected:[]};r.push(l);var u=o.option,c=u.brushLink,v=[],h=[],f=[],p=!1;s||(i=u.throttleType,n=u.throttleDelay);var d=G(o.areas,function(b){var _=__[b.brushType],w=st({boundingRect:_?_(b):void 0},b);return w.selectors=y_(w),w}),g=_n(o.option,jl,function(b){b.mappingMethod="fixed"});O(c)&&D(c,function(b){v[b]=1});function y(b){return c==="all"||!!v[b]}function m(b){return!!b.length}a.eachSeries(function(b,_){var w=f[_]=[];b.subType==="parallel"?S(b,_):x(b,_,w)});function S(b,_){var w=b.coordinateSystem;p=p||w.hasAxisBrushed(),y(_)&&w.eachActiveState(b.getData(),function(A,L){A==="active"&&(h[L]=1)})}function x(b,_,w){if(!(!b.brushSelector||b_(o,_))&&(D(d,function(L){o.brushTargetManager.controlSeries(L,b,a)&&w.push(L),p=p||m(w)}),y(_)&&m(w))){var A=b.getData();A.each(function(L){Kl(b,w,A,L)&&(h[L]=1)})}}a.eachSeries(function(b,_){var w={seriesId:b.id,seriesIndex:_,seriesName:b.name,dataIndex:[]};l.selected.push(w);var A=f[_],L=b.getData(),T=y(_)?function(C){return h[C]?(w.dataIndex.push(L.getRawIndex(C)),"inBrush"):"outOfBrush"}:function(C){return Kl(b,A,L,C)?(w.dataIndex.push(L.getRawIndex(C)),"inBrush"):"outOfBrush"};(y(_)?p:m(A))&&d_(jl,g,L,T)})}),S_(e,i,n,r,t)}function S_(a,e,t,r,i){if(!!i){var n=a.getZr();if(!n[wn]){n[Wi]||(n[Wi]=x_);var o=Uu(n,Wi,t,e);o(a,r)}}}function x_(a,e){if(!a.isDisposed()){var t=a.getZr();t[wn]=!0,a.dispatchAction({type:"brushSelect",batch:e}),t[wn]=!1}}function Kl(a,e,t,r){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(a.brushSelector(r,t,o.selectors,o))return!0}}function b_(a,e){var t=a.option.seriesIndex;return t!=null&&t!=="all"&&(O(t)?Wt(t,e)<0:e!==t)}var __={rect:function(a){return ql(a.range)},polygon:function(a){for(var e,t=a.range,r=0,i=t.length;r<i;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=t[r];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&ql(e)}};function ql(a){return new xt(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}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.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new Xu(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){Nv(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}(Jt),A_=w_,T_="#ddd",D_=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&&kv(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:T_},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=G(t,function(r){return Jl(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Jl(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}(Ht);function Jl(a,e){return Ft({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new jt(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var L_=D_,C_=["rect","polygon","lineX","lineY","keep","clear"],I_=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:C_.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}(zf),M_=I_;function P_(a){a.registerComponentView(A_),a.registerComponentModel(L_),a.registerPreprocessor(f_),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,m_),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"},Oe),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Oe),Bf("brush",M_)}var E_=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=ve(Gf(u),""),h;Bt(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 zt([{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}(Ht),Ql=E_,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=Ha(Ql.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}(Ql);re(zv,ic.prototype);var V_=zv,R_=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}(Jt),k_=R_,N_=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}(ce),z_=N_,Hi=Math.PI,tu=Mt(),B_=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.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 Rt("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=O_(t,r),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":tt(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Hi/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*Hi/180;var m,S,x,b=h.get("position",!0),_=f&&h.get("showPlayBtn",!0),w=f&&h.get("showPrevBtn",!0),A=f&&h.get("showNextBtn",!0),L=0,T=v;b==="left"||b==="bottom"?(_&&(m=[0,0],L+=g),w&&(S=[L,0],L+=g),A&&(x=[T-p,0],T-=g)):(_&&(m=[T-p,0],T-=g),w&&(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=nr(),l=o.x,u=o.y+o.height;He(s,s,[-l,-u]),za(s,s,-Hi/2),He(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]+=_[w][A]-b[w][A]}},e.prototype._createAxis=function(t,r){var i=r.getData(),n=r.get("axisType"),o=G_(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 z_("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 te({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 te({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=eu(v,h,r,d);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),ti(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:dt(f,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=dt(p),y.ensureState("progress").style=dt(d),r.add(y),ti(y),tu(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=an(Ct(n.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],S=F_(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),ti(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),ru(v,u._progressLine,s,i,n,!0)},onUpdate:function(v){ru(v,u._progressLine,s,i,n)}};this._currentPointer=eu(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=$e(n.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(r||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var r=t.model;t._changeTimeline(r.getCurrentIndex()+(r.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var r=this._mainGroup.getLocalTransform();return Qe(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),i=1/0,n,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<i&&(i=c,n=l)}),n},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var r=this.model.getCurrentIndex();t==="+"?t=r+1:t==="-"&&(t=r-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),r=this._tickSymbols,i=this._tickLabels;if(r)for(var n=0;n<r.length;n++)r&&r[n]&&r[n].toggleState("progress",n<t);if(i)for(var n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",tu(i[n]).dataIndex<=t)},e.type="timeline.slider",e}(k_);function G_(a,e){if(e=e||a.get("type"),e)switch(e){case"category":return new Ff({ordinalMeta:a.getCategories(),extent:[1/0,-1/0]});case"time":return new Of({locale:a.ecModel.getLocaleModel(),useUTC:a.ecModel.get("useUTC")});default:return new ji}}function O_(a,e){return ae(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},a.get("padding"))}function F_(a,e,t,r){var i=r.style,n=Wf(a.get(["controlStyle",e]),r||{},new xt(t[0],t[1],t[2],t[3]));return i&&n.setStyle(i),n}function eu(a,e,t,r,i,n){var o=e.get("color");if(i)i.setColor(o),t.add(i),n&&n.onUpdate(i);else{var s=a.get("symbol");i=Gt(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),r=Ft({rectHover:!0,z2:100},r,!0);var u=Nr(a.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var c=Fr(a.get("symbolOffset"),u);c&&(r.x=(r.x||0)+c[0],r.y=(r.y||0)+c[1]);var v=a.get("symbolRotate");return r.rotation=(v||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function ru(a,e,t,r,i,n){if(!a.dragging){var o=i.getModel("checkpointStyle"),s=r.dataToCoord(i.getData().get("value",t));if(n||!o.get("animation",!0))a.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};a.stopAnimation(null,!0),a.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}var W_=B_;function H_(a){a.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),st({currentIndex:i.option.currentIndex},e)}),a.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function $_(a){var e=a&&a.timeline;O(e)||(e=e?[e]:[]),D(e,function(t){!t||U_(t)})}function U_(a){var e=a.type,t={number:"value",time:"time"};if(t[e]&&(a.axisType=t[e],delete a.type),au(a),Be(a,"controlPosition")){var r=a.controlStyle||(a.controlStyle={});Be(r,"position")||(r.position=a.controlPosition),r.position==="none"&&!Be(r,"show")&&(r.show=!1,delete r.position),delete a.controlPosition}D(a.data||[],function(i){Bt(i)&&!O(i)&&(!Be(i,"value")&&Be(i,"name")&&(i.value=i.name),au(i))})}function au(a){var e=a.itemStyle||(a.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=a.label||a.label||{},i=r.normal||(r.normal={}),n={normal:1,emphasis:1};D(r,function(o,s){!n[s]&&!Be(i,s)&&(i[s]=o)}),t.label&&!Be(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function Be(a,e){return a.hasOwnProperty(e)}function Y_(a){a.registerComponentModel(V_),a.registerComponentView(W_),a.registerSubTypeDefaulter("timeline",function(){return"slider"}),H_(a),a.registerPreprocessor($_)}function go(a,e){if(!a)return!1;for(var t=O(a)?a:[a],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function aa(a){Ga(a,"label",["show"])}var ia=Mt(),Bv=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Hf.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,i,n){var o=this.mainType;i||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=ia(s)[o];if(!l||!l.data){ia(s)[o]=null;return}u?u._mergeOption(l,r,!0):(n&&aa(l),D(l.data,function(c){c instanceof Array?(aa(c[0]),aa(c[1])):aa(c)}),u=this.createMarkerModelFromSeries(l,this,r),F(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),ia(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return Rt("section",{header:this.name,blocks:[Rt("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,r){return ia(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Ht);re(Bv,ic.prototype);var Te=Bv,X_=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="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Te),Z_=X_;function An(a){return!(isNaN(parseFloat(a.x))&&isNaN(parseFloat(a.y)))}function j_(a){return!isNaN(parseFloat(a.x))&&!isNaN(parseFloat(a.y))}function na(a,e,t,r,i,n){var o=[],s=tc(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=yo(e,l,a),c=e.indicesOfNearest(l,u)[0];o[i]=e.get(t,c),o[n]=e.get(l,c);var v=e.get(r,c),h=$f(e.get(r,c));return h=Math.min(h,20),h>=0&&(o[n]=+o[n].toFixed(h)),[o,v]}var $i={min:ct(na,"min"),max:ct(na,"max"),average:ct(na,"average"),median:ct(na,"median")};function Rr(a,e){if(!!e){var t=a.getData(),r=a.coordinateSystem,i=r&&r.dimensions;if(!j_(e)&&!O(e.coord)&&O(i)){var n=Gv(e,t,r,a);if(e=vt(e),e.type&&$i[e.type]&&n.baseAxis&&n.valueAxis){var o=Wt(i,n.baseAxis.dim),s=Wt(i,n.valueAxis.dim),l=$i[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++)$i[u[c]]&&(u[c]=yo(t,t.mapDimension(i[c]),u[c]));return e}}function Gv(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(K_(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 K_(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function kr(a,e){return a&&a.containData&&e.coord&&!An(e)?a.containData(e.coord):!0}function q_(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!An(e)&&!An(t)?a.containZone(e.coord,t.coord):!0}function Ov(a,e){return a?function(t,r,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return da(o,e[n])}:function(t,r,i,n){return da(t.value,e[n])}}function yo(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 Ui=Mt(),J_=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){Ui(s).keep=!1}),r.eachSeries(function(s){var l=Te.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,i)}),o.each(function(s){!Ui(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){Ui(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var i=this;D(t,function(n){var o=Te.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?Uf(l):Yf(l))})}})},e.type="marker",e}(Jt),mo=J_;function iu(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 Q_=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=Te.getMarkerModelFromSeries(n,"markPoint");o&&(iu(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 Ea),v=tw(o,t,r);r.setData(v),iu(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(),_=$a(l,"color");b.fill||(b.fill=_),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}(mo);function tw(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 zt(r,t),n=G(t.get("data"),ct(Rr,e));a&&(n=Kt(n,ct(kr,a)));var o=Ov(!!a,r);return i.initData(n,null,o),i}var ew=Q_;function rw(a){a.registerComponentModel(Z_),a.registerComponentView(ew),a.registerPreprocessor(function(e){go(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var aw=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}(Te),iw=aw,oa=Mt(),nw=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=Nt(r.yAxis,r.xAxis);else{var u=Gv(r,i,e,a);s=u.valueAxis;var c=Xf(i,u.valueDataDim);l=yo(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&&le(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 n=[]}var g=[Rr(a,n[0]),Rr(a,n[1]),F({},n[2])];return g[2].type=g[2].type||null,Ft(g[2],g[0]),Ft(g[2],g[1]),g};function La(a){return!isNaN(a)&&!isFinite(a)}function nu(a,e,t,r){var i=1-a,n=r.dimensions[a];return La(e[i])&&La(t[i])&&e[a]===t[a]&&r.getAxis(n).containData(e[a])}function ow(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(nu(1,t,r,a)||nu(0,t,r,a)))return!0}return kr(a,e[0])&&kr(a,e[1])}function Yi(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(Wa(n,"cartesian2d")){var f=n.getAxis("x"),p=n.getAxis("y"),c=n.dimensions;La(a.get(c[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):La(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 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.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=Te.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=oa(o).from,u=oa(o).to;l.each(function(c){Yi(l,c,!0,n,i),Yi(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 ao);this.group.add(c.group);var v=lw(o,t,r),h=v.from,f=v.to,p=v.line;oa(r).from=h,oa(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,_){var w=x.getItemModel(b);Yi(x,b,_,t,n);var A=w.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=$a(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ct(w.get("symbolOffset",!0),m[_?0:1]),symbolRotate:Ct(w.get("symbolRotate",!0),y[_?0:1]),symbolSize:Ct(w.get("symbolSize"),g[_?0:1]),symbol:Ct(w.get("symbol",!0),d[_?0:1]),style:A})}this.markKeep(c),c.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(mo);function lw(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 zt(r,t),n=new zt(r,t),o=new zt([],t),s=G(t.get("data"),ct(nw,e,a,t));a&&(s=Kt(s,ct(ow,a)));var l=Ov(!!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 uw=sw;function cw(a){a.registerComponentModel(iw),a.registerComponentView(uw),a.registerPreprocessor(function(e){go(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var vw=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}(Te),hw=vw,sa=Mt(),fw=function(a,e,t,r){var i=r[0],n=r[1];if(!(!i||!n)){var o=Rr(a,i),s=Rr(a,n),l=o.coord,u=s.coord;l[0]=Nt(l[0],-1/0),l[1]=Nt(l[1],-1/0),u[0]=Nt(u[0],1/0),u[1]=Nt(u[1],1/0);var c=In([{},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 Ca(a){return!isNaN(a)&&!isFinite(a)}function ou(a,e,t,r){var i=1-a;return Ca(e[i])&&Ca(t[i])}function pw(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 Wa(a,"cartesian2d")?t&&r&&(ou(1,t,r)||ou(0,t,r))?!0:q_(a,i,n):kr(a,i)||kr(a,n)}function su(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(Wa(n,"cartesian2d")){var m=n.getAxis("x"),S=n.getAxis("y"),d=a.get(t[0],e),g=a.get(t[1],e);Ca(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Ca(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 lu=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],dw=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=Te.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(lu,function(v){return su(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=gw(o,t,r);r.setData(v),v.each(function(h){var f=G(lu,function(A){return su(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))];$e(m),$e(S);var x=!(g[0]>m[1]||g[1]<m[0]||y[0]>S[1]||y[1]<S[0]),b=!x;v.setItemLayout(h,{points:f,allClipped:b});var _=v.getItemModel(h).getModel("itemStyle").getItemStyle(),w=$a(l,"color");_.fill||(_.fill=w,tt(_.fill)&&(_.fill=ha(_.fill,.4))),_.stroke||(_.stroke=w),v.setItemVisual(h,"style",_)}),v.diff(sa(c).data).add(function(h){var f=v.getItemLayout(h);if(!f.allClipped){var p=new pe({shape:{points:f.points}});v.setItemGraphicEl(h,p),c.group.add(p)}}).update(function(h,f){var p=sa(c).data.getItemGraphicEl(f),d=v.getItemLayout(h);d.allClipped?p&&c.group.remove(p):(p?pt(p,{shape:{points:d.points}},r,h):p=new pe({shape:{points:d.points}}),v.setItemGraphicEl(h,p),c.group.add(p))}).remove(function(h){var f=sa(c).data.getItemGraphicEl(h);c.group.remove(f)}).execute(),v.eachItemGraphicEl(function(h,f){var p=v.getItemModel(f),d=v.getItemVisual(f,"style");h.useStyle(v.getItemVisual(f,"style")),Zt(h,Vt(p),{labelFetcher:r,labelDataIndex:f,defaultText:v.getName(f)||"",inheritColor:tt(d.fill)?ha(d.fill,1):"#000"}),Ot(h,p),mt(h,null,null,p.get(["emphasis","disabled"])),lt(h).dataModel=r}),sa(c).data=v,c.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e}(mo);function gw(a,e,t){var r,i,n=["x0","y0","x1","y1"];if(a){var o=G(a&&a.dimensions,function(u){var c=e.getData(),v=c.getDimensionInfo(c.mapDimension(u))||{};return F(F({},v),{name:u,ordinalMeta:null})});i=G(n,function(u,c){return{name:u,type:o[c%2].type}}),r=new zt(i,t)}else i=[{name:"value",type:"float"}],r=new zt(i,t);var s=G(t.get("data"),ct(fw,e,a,t));a&&(s=Kt(s,ct(pw,a)));var l=a?function(u,c,v,h){var f=u.coord[Math.floor(h/2)][h%2];return da(f,i[h])}:function(u,c,v,h){return da(u.value,i[h])};return r.initData(s,null,l),r.hasItemOption=!0,r}var yw=dw;function mw(a){a.registerComponentModel(hw),a.registerComponentView(yw),a.registerPreprocessor(function(e){go(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Sw={get:function(a,e,t){var r=vt((xw[a]||{})[e]);return t&&O(r)?r[r.length-1]:r}},xw={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Fv=Sw,uu=wt.mapVisual,bw=wt.eachVisual,_w=O,cu=D,ww=$e,Aw=_t,Tw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&kv(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=K(t,this),this.controllerVisuals=_n(this.option.controller,r,t),this.targetVisuals=_n(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,r=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,n){r.push(n)}):r=de(t),r},e.prototype.eachTargetSeries=function(t,r){D(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(r,n)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(i){i===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],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=ww([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={});Ft(n,i),Ft(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){_w(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]={},cu(p,function(g,y){if(!!wt.isValidType(y)){var m=Fv.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";cu(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=uu(S.symbol,function(_){return _==="none"?g:_});var x=S.symbolSize;if(x!=null){var b=-1/0;bw(x,function(_){_>b&&(b=_)}),S.symbolSize=uu(x,function(_){return Aw(_,[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}(Ht),Ia=Tw,vu=[20,140],Dw=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]=vu[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=vu[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=$e((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]<t[0]&&(r[0]=t[0]),r[1]<t[0]&&(r[1]=t[0]),r},e.prototype.getValueState=function(t){var r=this.option.range,i=this.getExtent();return(r[0]<=i[0]||r[0]<=t)&&(r[1]>=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=hu(this,"outOfRange",this.getExtent()),i=hu(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;l<c&&(!i.length||r[l]<=i[0]);l++)r[l]<i[s]&&o(r[l],"outOfRange");for(var v=1;s<u;s++,v=0)v&&n.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var v=1;l<c;l++)(!i.length||i[i.length-1]<r[l])&&(v&&(n.length&&o(n[n.length-1].value,"outOfRange"),v=0),o(r[l],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Ha(Ia.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Ia);function hu(a,e,t){if(t[0]===t[1])return t.slice();for(var r=200,i=(t[1]-t[0])/r,n=t[0],o=[],s=0;s<=r&&n<t[1];s++)o.push(n),n+=i;return o.push(t[1]),o}var Lw=Dw,Cw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r},e.prototype.render=function(t,r,i,n){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,i,n)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,i=Zf(r.get("padding")||0),n=t.getBoundingRect();t.add(new It({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,i){i=i||{};var n=i.forceState,o=this.visualMapModel,s={};if(r==="color"){var l=o.get("contentColor");s.color=l}function u(f){return s[f]}function c(f,p){s[f]=p}var v=o.controllerVisuals[n||o.getValueState(t)],h=wt.prepareVisualTypes(v);return D(h,function(f){var p=v[f];i.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",p=v.__alphaForOpacity),wt.dependsOn(f,r)&&p&&p.applyVisual(t,u,c)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,i=this.api;Pn(t,r.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},e.prototype.doRender=function(t,r,i,n){},e.type="visualMap",e}(Jt),Wv=Cw,fu=[["left","right","width"],["top","bottom","height"]];function Hv(a,e,t){var r=a.option,i=r.align;if(i!=null&&i!=="auto")return i;for(var n={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=fu[o],l=[0,null,10],u={},c=0;c<3;c++)u[fu[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:r[s[c]];var v=[["x","width",3],["y","height",0]][o],h=ae(u,n,r.padding);return s[(h.margin[v[2]]||0)+h[v[0]]+h[v[1]]*.5<n[v[1]]*.5?0:1]}function ca(a,e){return D(a||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),a}var oe=_t,Iw=D,pu=Math.min,Xi=Math.max,Mw=12,Pw=6,Ew=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,r,i,n){this._api=i,(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,r=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(r);var i=t.get("text");this._renderEndsText(r,i,0),this._renderEndsText(r,i,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,i){if(!!r){var n=r[1-i];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),v=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new ft({style:dt(f,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":v,align:h==="horizontal"?v:"center",text:n})}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,i=this._shapes,n=r.itemSize,o=this._orient,s=this._useHandle,l=Hv(r,this.api,n),u=i.mainGroup=this._createBarGroup(l),c=new Z;u.add(c),c.add(i.outOfRange=du()),c.add(i.inRange=du(null,s?yu(this._orient):null,K(this._dragHandle,this,"all",!1),K(this._dragHandle,this,"all",!0))),c.setClipPath(new It({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var v=r.textStyleModel.getTextRect("\u56FD"),h=Xi(v.width,v.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(r,u,0,n,h,o),this._createHandle(r,u,1,n,h,o)),this._createIndicator(r,u,n,h,o),t.add(u)},e.prototype._createHandle=function(t,r,i,n,o,s){var l=K(this._dragHandle,this,i,!1),u=K(this._dragHandle,this,i,!0),c=an(t.get("handleSize"),n[0]),v=Gt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=yu(this._orient);v.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){nn(y.event)}}),v.x=n[0]/2,v.useStyle(t.getModel("handleStyle").getItemStyle()),v.setStyle({strokeNoScale:!0,strokeFirst:!0}),v.style.lineWidth*=2,v.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),fr(v,!0),r.add(v);var f=this.visualMapModel.textStyleModel,p=new ft({cursor:h,draggable:!0,drift:l,onmousemove:function(y){nn(y.event)},ondragend:u,style:dt(f,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var d=[c,0],g=this._shapes;g.handleThumbs[i]=v,g.handleLabelPoints[i]=d,g.handleLabels[i]=p},e.prototype._createIndicator=function(t,r,i,n,o){var s=an(t.get("indicatorSize"),i[0]),l=Gt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ue){var c=l.style;l.useStyle(F({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);r.add(l);var v=this.visualMapModel.textStyleModel,h=new ft({silent:!0,invisible:!0,style:dt(v,{x:0,y:0,text:""})});this.group.add(h);var f=[(o==="horizontal"?n/2:Pw)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=f,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,i,n){if(!!this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():gu(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[oe(r[0],i,n,!0),oe(r[1],i,n,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Yu(r,n,o,t,0);var s=i.getExtent();this._dataInterval=[oe(n[0],o,s,!0),oe(n[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,i=r.getExtent(),n=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,i,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Dn(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var i=100,n=[],o=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[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();Iw([0,1],function(c){var v=o[c];v.setStyle("fill",r.handlesColor[c]),v.y=t[c];var h=oe(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=Qe(i.handleLabelPoints[c],ei(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=oe(t,s,u,!0),g=l[0]-p/2,y={x:v.x,y:v.y};v.y=d,v.x=g;var m=Qe(c.indicatorLabelPoint,ei(v,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),b=this._orient,_=b==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:_?x:"middle",align:_?"center":x});var w={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(w,L),S.animateTo(A,L)}else v.attr(w),S.attr(A);this._firstShowIndicator=!1;var T=this._shapes.handleLabels;if(T)for(var C=0;C<T.length;C++)this._api.enterBlur(T[C])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);n[1]=pu(Xi(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,r){var i=this.visualMapModel,n=i.itemSize;if(!!i.option.hoverLink){var o=[0,n[1]],s=i.getExtent();t=pu(Xi(o[0],t),o[1]);var l=Vw(i,s,o),u=[t-l,t+l],c=oe(t,o,s,!0),v=[oe(u[0],o,s,!0),oe(u[1],o,s,!0)];u[0]<o[0]&&(v[0]=-1/0),u[1]>o[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||gu(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(v));var p=jf(h,f);this._dispatchHighDown("downplay",ca(p[0],i)),this._dispatchHighDown("highlight",ca(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if(zu(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<r.length;i++)this._api.leaveBlur(r[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ca(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,r,i,n){var o=ei(r,n?null:this.group);return O(t)?Qe(t,o,i):Kf(t,o,i)},e.prototype._dispatchHighDown=function(t,r){r&&r.length&&this.api.dispatchAction({type:t,batch:r})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(Wv);function du(a,e,t,r){return new pe({shape:{points:a},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){nn(i.event)},ondragend:r})}function Vw(a,e,t){var r=Mw/2,i=a.get("hoverLinkDataSize");return i&&(r=oe(i,e,t,!0)/2),r}function gu(a){var e=a.get("hoverLinkOnHandle");return!!(e==null?a.get("realtime"):e)}function yu(a){return a==="vertical"?"ns-resize":"ew-resize"}var Rw=Ew,kw={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Nw=function(a,e){e.eachComponent({mainType:"visualMap",query:a},function(t){t.setSelected(a.selected)})},zw=[{createOnAllSeries:!0,reset:function(a,e){var t=[];return e.eachComponent("visualMap",function(r){var i=a.pipelineContext;!r.isTargetSeries(a)||i&&i.large||t.push(g_(r.stateList,r.targetVisuals,K(r.getValueState,r),r.getDataDimensionIndex(a.getData())))}),t}},{createOnAllSeries:!0,reset:function(a,e){var t=a.getData(),r=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(a)){var n=i.getVisualMeta(K(Bw,null,a,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(n.dimension=o,r.push(n))}}),a.getData().setVisual("visualMeta",r)}}];function Bw(a,e,t,r){for(var i=e.targetVisuals[r],n=wt.prepareVisualTypes(i),o={color:$a(a.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,v,h)}return o.color;function v(f){return o[f]}function h(f,p){o[f]=p}}var mu=D;function Gw(a){var e=a&&a.visualMap;O(e)||(e=e?[e]:[]),mu(e,function(t){if(!!t){Ke(t,"splitList")&&!Ke(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&O(r)&&mu(r,function(i){Bt(i)&&(Ke(i,"start")&&!Ke(i,"min")&&(i.min=i.start),Ke(i,"end")&&!Ke(i,"max")&&(i.max=i.end))})}})}function Ke(a,e){return a&&a.hasOwnProperty&&a.hasOwnProperty(e)}var Su=!1;function $v(a){Su||(Su=!0,a.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(kw,Nw),D(zw,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(Gw))}function Uv(a){a.registerComponentModel(Lw),a.registerComponentView(Rw),$v(a)}var Ow=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=[],Fw[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=wt.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]=Fv.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=wt.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=wt.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=Ha(Ia.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}(Ia),Fw={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];o<i;s+=n,o++){var l=o===i-1?r[1]:s+n;a.push({interval:[s,l],close:[1,1]})}e.maxOpen&&a.push({interval:[r[1],1/0],close:[0,0]}),Oo(a),D(a,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(a){var e=this.option;D(e.categories,function(t){a.push({text:this.formatValueText(t,!0),value:t})},this),xu(e,a)},pieces:function(a){var e=this.option;D(e.pieces,function(t,r){Bt(t)||(t={value:t});var i={text:"",index:r};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],v=0;v<2;v++){for(var h=[["gte","gt","min"],["lte","lt","max"]][v],f=0;f<3&&o[v]==null;f++)o[v]=t[h[f]],s[v]=l[f],c[v]=f===2;o[v]==null&&(o[v]=u[v])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=wt.retrieveVisuals(t),a.push(i)},this),xu(e,a),Oo(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 xu(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}var Ww=Ow,Hw=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=Nt(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),qf(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:ca(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return Hv(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:dt(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(Gt(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}(Wv),$w=Hw;function Yv(a){a.registerComponentModel(Ww),a.registerComponentView($w),$v(a)}function Uw(a){j(Uv),j(Yv)}var Yw={label:{enabled:!0},decal:{show:!1}},bu=Mt(),Xw={};function Zw(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=vt(Yw);Ft(r.label,a.getLocaleModel().get("aria"),!1),Ft(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)),bu(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=qi(h.ecModel,h.name,Xw,a.getSeriesCount()),S=f.getVisual("decal");f.setVisual("decal",x(S,m))}else{var p=h.getRawData(),d={},g=bu(h).scope;f.each(function(b){var _=f.getRawIndex(b);d[_]=b});var y=p.count();p.each(function(b){var _=d[b],w=p.getName(b)||b+"",A=qi(h.ecModel,w,g,y),L=f.getItemVisual(_,"decal");f.setItemVisual(_,"decal",x(L,A))})}function x(b,_){var w=b?F(F({},_),b):_;return w.dirty=!0,w}})}}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(L<d){var T=void 0,C=A.get("name"),M=C?"withName":"withoutName";T=h>1?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;N<P.count();N++)if(N<f){var H=P.getName(N),$=P.getValues(N),U=c.get(["data",H?"withName":"withoutName"]);k.push(o(U,{name:H,value:$.join(E)}))}T+=k.join(E)+R,S.push(T)}});var b=c.getModel(["series","multiple","separator"]),_=b.get("middle"),w=b.get("end");g+=S.join(_)+w,v.setAttribute("aria-label",g)}}}function o(u,c){if(!tt(u))return u;var v=u;return D(c,function(h,f){v=v.replace(new RegExp("\\{\\s*"+f+"\\s*\\}","g"),h)}),v}function s(){var u=a.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return a.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function jw(a){if(!(!a||!a.aria)){var e=a.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},D(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function Kw(a){a.registerPreprocessor(jw),a.registerVisual(a.PRIORITY.VISUAL.ARIA,Zw)}j([Jf]);j([Pd]);j([Qf,tp,ep,Od,ag,Xg,Ay,cm,Bm,Xm,i0,Y0,SS,ES,JS,n1,w1,V1,Y1,tx,fx,Jx]);j(rp);j(Eb);j(Pc);j(jb);j(av);j(r_);j(v_);j(ap);j(ip);j(Gn);j(P_);j(np);j(Y_);j(rw);j(cw);j(mw);j(op);j(sp);j(lp);j(up);j(Uw);j(Uv);j(Yv);j(Kw);j(cp);j(vp);j(hp);j(fp);const qw={type:"line",symbol:"circle",symbolSize:6,triggerLineEvent:!0};var eA=_u({name:"subject-echarts",setup(){const a=Xv({index:-1,sum:{practiceRate:0,passNum:0,noPassNum:0,noMemberNum:0},practiceThisWeeks:[],colors:[{color:"#FF8057",borderColor:"rgba(255,128,87,0.5)",text:"\u8FBE\u6807\u7387",select:!0,key:"practiceRate"},{color:"#2FC58D",borderColor:"rgba(47,197,141,0.5)",text:"\u8FBE\u6807",select:!0,key:"passNum"},{color:"#4A99FF",borderColor:"rgba(74,153,255,0.5)",text:"\u672A\u8FBE\u6807",select:!0,key:"noPassNum"},{color:"#9884BA",borderColor:"rgba(152,132,186,0.5)",text:"\u672A\u7EDF\u8BA1",select:!0,key:"noMemberNum"}]}),e=Zv(()=>a.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=pp(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,...qw,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};jv(()=>{Kv("setAccomanyEcharts",r),bo({api:"setAccomanyEcharts"})}),qv(()=>{Jv("setAccomanyEcharts",r)});const o=()=>{const s=location.origin+location.pathname+"#/exercise-record";console.log("\u{1F680} ~ url:",s),bo({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:Up},null),W("div",null,[ye("\u603B\u4F53\u60C5\u51B5")])])]),W("div",{class:X.content,onClick:()=>o()},[W(Hp,{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},[ye("\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},[ye("\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},[ye("\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:$p},null),W("div",null,[ye("\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},[ye("\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},[ye("\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{eA as default};