Files
qhmes/web-dist/js/Map-DuzXmOjQ.js
2026-06-16 18:19:57 +08:00

4 lines
252 KiB
Java

var Hr=(r,e,t)=>new Promise((a,n)=>{var i=l=>{try{s(t.next(l))}catch(u){n(u)}},o=l=>{try{s(t.throw(l))}catch(u){n(u)}},s=l=>l.done?a(l.value):Promise.resolve(l.value).then(i,o);s((t=t.apply(r,e)).next())});import{_ as Nl,au as El}from"./index-X7Y8jykP.js";import{useECharts as Rl}from"./useECharts-BKJWOWs-.js";import{m as Vl}from"./data-A0kLGLbM.js";import{x as Ct,B as Nt,T as Ko,y as Pe,o as ot,z as Tt,A as nt,p as Y,D as kl,E as Dt,F as Ol,H as Gl,I as zl,b as N,J as jo,K as Qo,M as Jn,N as Bl,O as Fl,Q as bt,i as Gt,R as Et,u as ht,k as Hl,_ as V,U as Ie,w as dt,G as st,P as gt,h as Dr,V as Lr,W as Ar,C as yt,X as W,Y as Ul,$ as _e,a0 as an,a1 as Cr,a2 as nn,a3 as Jo,a4 as ts,a5 as es,a6 as rs,a7 as ur,a8 as $l,a9 as Wl,aa as Ma,ab as as,ac as xt,g as Ut,ad as vr,ae as rt,af as Pa,f as $,ag as G,ah as B,ai as Mr,aj as on,ak as Lt,m as lt,al as Jt,am as $t,an as ns,ao as Se,ap as Zl,aq as _t,ar as Bt,as as Yl,at as Xl,au as ze,Z as Pr,av as Nr,c as Be,t as pt,aw as be,ax as vt,ay as ti,az as ql,aA as Kl,aB as is,aC as ei,aD as je,aE as ri,aF as jl,aG as te,aH as zt,aI as Ql,aJ as sn,aK as ee,aL as os,aM as Na,aN as ss,aO as Ot,aP as ai,q as Wt,aQ as qe,aR as jt,aS as Ke,aT as Jl,aU as tu,aV as ye,aW as ni,aX as Ea,aY as eu,aZ as St,l as fr,L as ls,a_ as Ra,r as ru,a$ as ln,b0 as un,b1 as vn,b2 as fn,b3 as Er,b4 as au,b5 as us,b6 as nu,b7 as we,b8 as vs,b9 as cn,ba as hn,bb as iu,bc as ou,bd as pn,be as Te,bf as Xt,v as fs,bg as su,bh as dn,bi as lu,bj as uu,bk as cs,bl as vu,bm as Va,bn as ka,bo as fu,bp as cu,bq as Oa,br as Ur,bs as hs,bt as et,bu as gn,bv as yn,bw as mn,bx as $r,by as hu,bz as pu,bA as Ne,bB as du,bC as ii,bD as gu,bE as ps,bF as oi,bG as Rr,d as Vr,bH as yu,bI as ds,bJ as gs,bK as si,bL as mu,bM as Su,a as Ga,bN as bu,bO as Sn,bP as li,bQ as ui,bR as vi,bS as Pt,bT as xu,bU as Iu,bV as _u,bW as wu,bX as Tu,bY as Du,bZ as Lu,b_ as Au,b$ as Cu,c0 as Mu,c1 as Pu,c2 as Nu,c3 as ys,c4 as Eu,c5 as Ru,c6 as Vu,c7 as kr,c8 as ku,c9 as Ou,ca as Gu,cb as zu,cc as Bu,cd as Fu,ce as Hu,cf as Uu,cg as $u,ch as Wu,ci as ms,cj as Zu,ck as Or,cl as Le,cm as Qe,cn as xe,co as Yu,cp as Xu,cq as qu,cr as Ku,cs as ju,ct as Qu,cu as za,cv as Ju,cw as tv,cx as ev,cy as Ss,cz as cr,cA as rv,cB as av,cC as nv,cD as iv,cE as bn,cF as ov,cG as sv,cH as bs,cI as lv,cJ as uv,cK as vv,cL as fv,cM as cv,cN as fi,cO as hv,cP as qt,cQ as Fe,cR as pv,cS as ci,cT as dv,cU as gv,cV as yv,cW as mv,cX as xs,cY as Is,cZ as _s,c_ as Sv,c$ as bv,d0 as Gr,d1 as xv,d2 as Iv,d3 as _v,d4 as wv,d5 as Tv,d6 as Dv,d7 as Lv,d8 as Av,d9 as Cv,da as Mv,db as Pv,dc as Nv,dd as Ev,de as ws,df as xn,dg as Rv,dh as Vv,di as kv,dj as hi,dk as Ov,dl as hr,dm as In,dn as Gv,dp as _n,dq as Wr,dr as zv,ds as Bv,dt as Fv,du as Hv,dv as Uv,dw as $v,dx as Wv,dy as Zv,dz as Yv,dA as Xv,dB as qv,dC as Kv,dD as jv,dE as Qv,dF as Jv,dG as tf,dH as ef,dI as rf,dJ as af,dK as nf,dL as of,dM as sf,dN as lf,dO as uf,dP as vf,dQ as ff}from"./echarts-O0zoDaFZ.js";import{i as cf}from"./install-65EkHmmZ.js";import{e as hf,o as pf,r as df,C as gf,z as yf,T as mf}from"./vue-vendor-DNhG1Cve.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./useTimeout-D5AmIBZw.js";import"./useEventListener-BRXjwk7A.js";import"./useBreakpoint-DXhPW7nV.js";import"./breakpointEnum-BhAg6bcX.js";function Sf(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function bf(r,e){var t=r.label,a=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:Sf(a&&a.shape.points)}}var pi=["align","verticalAlign","width","height","fontSize"],ct=new Ko,Zr=Ct(),xf=Ct();function Je(r,e,t){for(var a=0;a<t.length;a++){var n=t[a];e[n]!=null&&(r[n]=e[n])}}var tr=["x","y","rotation"],If=(function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,a,n,i){var o=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),v=n.getBoundingRect().plain();Nt.applyTransform(v,v,u),u?ct.setLocalTransform(u):(ct.x=ct.y=ct.rotation=ct.originX=ct.originY=0,ct.scaleX=ct.scaleY=1),ct.rotation=Pe(ct.rotation);var f=n.__hostTarget,c;if(f){c=f.getBoundingRect().plain();var h=f.getComputedTransform();Nt.applyTransform(c,c,h)}var d=c&&f.getTextGuideLine();this._labelList.push({label:n,labelLine:d,seriesModel:a,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:v,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:d&&d.ignore,x:ct.x,y:ct.y,scaleX:ct.scaleX,scaleY:ct.scaleY,rotation:ct.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var a=e.__model,n=a.get("labelLayout");(ot(n)||Tt(n).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=nt(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,a,o,n)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),a=e.getHeight();function n(y,x){return function(){Jn(y,x)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,v=void 0;ot(o.layoutOption)?v=o.layoutOption(bf(o,l)):v=o.layoutOption,v=v||{},o.computedLayoutOption=v;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:v.x!=null||v.y!=null?null:u.attachedPos,rotation:v.rotate!=null?v.rotate*f:u.attachedRot,offset:[v.dx||0,v.dy||0]});var c=!1;if(v.x!=null?(s.x=Y(v.x,t),s.setStyle("x",0),c=!0):(s.x=u.x,s.setStyle("x",u.style.x)),v.y!=null?(s.y=Y(v.y,a),s.setStyle("y",0),c=!0):(s.y=u.y,s.setStyle("y",u.style.y)),v.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:v.labelLinePoints}),c=!1)}var d=Zr(s);d.needsUpdateLabelLine=c,s.rotation=v.rotate!=null?v.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<pi.length;p++){var g=pi[p];s.setStyle(g,v[g]!=null?v[g]:u.style[g])}if(v.draggable){if(s.draggable=!0,s.cursor="move",l){var S=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);S=m.getItemModel(o.dataIndex)}s.on("drag",n(l,S.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),a=e.getHeight(),n=kl(this._labelList),i=Dt(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=Dt(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});Ol(i,0,t),Gl(o,0,a);var s=Dt(n,function(l){return l.layoutOption.hideOverlap});zl(s)},r.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(t){var a=t.__model,n=t.ignoreLabelLineUpdate,i=a.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!n,l=o.getTextContent();!s&&l&&(s=Zr(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,a),i&&e._animateLabels(o,a)})})},r.prototype._updateLabelLine=function(e,t){var a=e.getTextContent(),n=nt(e),i=n.dataIndex;if(a&&i!=null){var o=t.getData(n.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var v=o.getVisual("drawType");l.stroke=u[v]}var f=s.getModel("labelLine");jo(e,Qo(s),l),Jn(e,f)}},r.prototype._animateLabels=function(e,t){var a=e.getTextContent(),n=e.getTextGuideLine();if(a&&(e.forceLabelAnimation||!a.ignore&&!a.invisible&&!e.disableLabelAnimation&&!Bl(e))){var i=Zr(a),o=i.oldLayout,s=nt(e),l=s.dataIndex,u={x:a.x,y:a.y,rotation:a.rotation},v=t.getData(s.dataType);if(o){a.attr(o);var c=e.prevStates;c&&(Et(c,"select")>=0&&a.attr(i.oldLayoutSelect),Et(c,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),ht(a,u,t,l)}else if(a.attr(u),!Fl(a).valueAnimation){var f=bt(a.style.opacity,1);a.style.opacity=0,Gt(a,{style:{opacity:f}},t,l)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};Je(h,u,tr),Je(h,a.states.select,tr)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Je(d,u,tr),Je(d,a.states.emphasis,tr)}Hl(a,l,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=xf(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),ht(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,Gt(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},r})(),Yr=Ct();function _f(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Yr(t).labelManager;n||(n=Yr(t).labelManager=new If),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Yr(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var wf=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Ie(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,a,n){return n.point(a.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})(dt),Ts=4,Tf=(function(){function r(){}return r})(),Df=(function(r){V(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new Tf},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<Ts,v=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<n.length;){var c=n[f++],h=n[f++];isNaN(c)||isNaN(h)||v&&!v.contain(c,h)||(s.x=c-i[0]/2,s.y=h-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,a=t.points,n=t.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<a.length;){var l=a[s++],u=a[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,a){for(var n=this.shape,i=n.points,o=n.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var v=u*2,f=i[v]-s/2,c=i[v+1]-l/2;if(t>=f&&a>=c&&t<=f+s&&a<=c+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,v=-1/0,f=-1/0,c=0;c<n.length;){var h=n[c++],d=n[c++];l=Math.min(h,l),v=Math.max(h,v),u=Math.min(d,u),f=Math.max(d,f)}t=this._rect=new Nt(l-o/2,u-s/2,v-l+o,f-u+s)}return t},e})(gt),Lf=(function(){function r(){this.group=new st}return r.prototype.updateData=function(e,t){this._clear();var a=this._create();a.setShape({points:e.getLayout("points")}),this._setCommon(a,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var n=(a.endIndex-a.startIndex)*2,i=a.startIndex*4*2;t=new Float32Array(t.buffer,i,n)}a.setShape("points",t),a.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,a){var n=this._newAdded[0],i=t.getLayout("points"),o=n&&n.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),n.endIndex=e.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,a)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Df({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,a){var n=t.hostModel;a=a||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=a.clipShape||null,e.symbolProxy=Dr(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<Ts;e.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=nt(e);u.seriesIndex=n.seriesIndex,e.on("mousemove",function(v){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),Af=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Lr("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new Lf:new Ar,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(yt);function Cf(r){W(Ul),r.registerSeriesModel(wf),r.registerChartView(Af),r.registerLayout(Lr("scatter"))}function Mf(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],a,n;a=t.pop();)if(n=a.children,a.isExpand&&n.length)for(var i=n.length,o=i-1;o>=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Pf(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){Rf(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=Vf(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function Nf(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function di(r){return arguments.length?r:Gf}function Ee(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function Ef(r,e){return _e(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Rf(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function Vf(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,f=s.hierNode.modifier;s=Xr(s),i=qr(i),s&&i;){n=Xr(n),o=qr(o),n.hierNode.ancestor=r;var c=s.hierNode.prelim+f-i.hierNode.prelim-u+a(s,i);c>0&&(Of(kf(s,r,t),r,c),u+=c,l+=c),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!Xr(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=f-l),i&&!qr(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=r)}return t}function Xr(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function qr(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function kf(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function Of(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function Gf(r,e){return r.parentNode===e.parentNode?1:2}var zf=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),Bf=(function(r){V(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zf},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,v=u==="TB"||u==="BT"?0:1,f=1-v,c=Y(a.forkPosition,1),h=[];h[v]=o[v],h[f]=o[f]+(l[f]-o[f])*c,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[v]=s[v],t.lineTo(h[0],h[1]),h[v]=l[v],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var d=1;d<i-1;d++){var p=n[d];t.moveTo(p[0],p[1]),h[v]=p[v],t.lineTo(h[0],h[1])}},e})(gt),Ff=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new st,t}return e.prototype.init=function(t,a){this._controller=new an(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,n){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,n),this._updateController(t,a,n);var u=this._data;i.diff(u).add(function(v){gi(i,v)&&yi(i,v,null,s,t)}).update(function(v,f){var c=u.getItemGraphicEl(f);if(!gi(i,v)){c&&Si(u,f,c,s,t);return}yi(i,v,c,s,t)}).remove(function(v){var f=u.getItemGraphicEl(v);f&&Si(u,v,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,f){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,a){var n=t.getData(),i=[];n.each(function(f){var c=n.getItemLayout(f);c&&!isNaN(c.x)&&!isNaN(c.y)&&i.push([+c.x,+c.y])});var o=[],s=[];Cr(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var v=t.coordinateSystem=new nn;v.zoomLimit=t.get("scaleLimit"),v.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),v.setCenter(t.get("center"),a),v.setZoom(t.get("zoom")),this.group.attr({x:v.x,y:v.y,scaleX:v.scaleX,scaleY:v.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,v,f){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(v,f)&&!Jo(u,n,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){ts(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){es(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var a=t.getData(),n=this._getNodeGlobalScale(t);a.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var a=t.coordinateSystem;if(a.type!=="view")return 1;var n=this._nodeScaleRatio,i=a.scaleX||1,o=a.getZoom(),s=(o-1)*n+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e})(yt);function gi(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function yi(r,e,t,a,n){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",v=r.tree.root,f=o.parentNode===v?o:o.parentNode||o,c=r.getItemGraphicEl(f.dataIndex),h=f.getLayout(),d=c?{x:c.__oldX,y:c.__oldY,rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:h,p=o.getLayout();i?(t=new rs(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,a.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ht(t,{x:p.x,y:p.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var S=v.children[0],m=S.getLayout(),y=S.children.length,x=void 0,b=void 0;if(p.x===m.x&&o.isExpand===!0&&S.children.length){var I={x:(S.children[0].getLayout().x+S.children[y-1].getLayout().x)/2,y:(S.children[0].getLayout().y+S.children[y-1].getLayout().y)/2};x=Math.atan2(I.y-m.y,I.x-m.x),x<0&&(x=Math.PI*2+x),b=I.x<m.x,b&&(x=x-Math.PI)}else x=Math.atan2(p.y-m.y,p.x-m.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=p.x<m.x,b&&(x=x-Math.PI)):(b=p.x>m.x,b||(x=x-Math.PI));var _=b?"left":"right",T=s.getModel("label"),w=T.get("rotate"),D=w*(Math.PI/180),L=g.getTextContent();L&&(g.setTextConfig({position:T.get("position")||_,rotation:w==null?-x:D,origin:"center"}),L.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),A=C==="relative"?ur(o.getAncestorsIndices(),o.getDescendantIndices()):C==="ancestor"?o.getAncestorsIndices():C==="descendant"?o.getDescendantIndices():null;A&&(nt(t).focus=A),Hf(n,o,v,t,d,h,p,a),t.__edge&&(t.onHoverStateChange=function(M){if(M!=="blur"){var P=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);P&&P.hoverState===$l||Wl(t.__edge,M)}})}function Hf(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),v=r.get("layout"),f=r.getOrient(),c=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new as({shape:Ba(v,f,c,n,n)})),ht(p,{shape:Ba(v,f,c,i,o)},r));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,S=[],m=0;m<g.length;m++){var y=g[m].getLayout();S.push([y.x,y.y])}p||(p=a.__edge=new Bf({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:h}})),ht(p,{shape:{parentPoint:[o.x,o.y],childPoints:S}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(xt({strokeNoScale:!0,fill:null},d)),Ut(p,l,"lineStyle"),vr(p),s.add(p))}function mi(r,e,t,a,n){var i=e.tree.root,o=Ds(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var v=e.getItemGraphicEl(s.dataIndex),f=v.__edge,c=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),h=a.get("edgeShape"),d=a.get("layout"),p=a.get("orient"),g=a.get(["lineStyle","curveness"]);c&&(h==="curve"?Ma(c,{shape:Ba(d,p,g,l,l),style:{opacity:0}},a,{cb:function(){t.remove(c)},removeOpt:n}):h==="polyline"&&a.get("layout")==="orthogonal"&&Ma(c,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){t.remove(c)},removeOpt:n}))}}function Ds(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,a;a=t.getLayout(),a==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:a}}function Si(r,e,t,a,n){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=Ds(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};Ma(t,{x:s.x+1,y:s.y+1},n,{cb:function(){a.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){mi(u,r,a,n,l)}),mi(i,r,a,n,l)}function Ba(r,e,t,a,n){var i,o,s,l,u,v,f,c;if(r==="radial"){u=a.rawX,f=a.rawY,v=n.rawX,c=n.rawY;var h=Ee(u,f),d=Ee(u,f+(c-f)*t),p=Ee(v,c+(f-c)*t),g=Ee(v,c);return{x1:h.x||0,y1:h.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=a.x,f=a.y,v=n.x,c=n.y,(e==="LR"||e==="RL")&&(i=u+(v-u)*t,o=f,s=v+(u-v)*t,l=c),(e==="TB"||e==="BT")&&(i=u,o=f+(c-f)*t,s=v,l=c+(f-c)*t);return{x1:u,y1:f,x2:v,y2:c,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var At=Ct();function Ls(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,As(e,t,r),N(t,function(a){N(e.TRANSFERABLE_METHODS,function(n){a.wrapMethod(n,rt(Uf,r))})}),e.wrapMethod("cloneShallow",rt(Wf,r)),N(e.CHANGABLE_METHODS,function(a){e.wrapMethod(a,rt($f,r))}),Pa(t[e.dataType]===e)}function Uf(r,e){if(Xf(this)){var t=$({},At(this).datas);t[this.dataType]=e,As(e,t,r)}else wn(e,this.dataType,At(this).mainData,r);return e}function $f(r,e){return r.struct&&r.struct.update(),e}function Wf(r,e){return N(At(e).datas,function(t,a){t!==e&&wn(t.cloneShallow(),a,e,r)}),e}function Zf(r){var e=At(this).mainData;return r==null||e==null?e:At(e).datas[r]}function Yf(){var r=At(this).mainData;return r==null?[{data:r}]:G(Tt(At(r).datas),function(e){return{type:e,data:At(r).datas[e]}})}function Xf(r){return At(r).mainData===r}function As(r,e,t){At(r).datas={},N(e,function(a,n){wn(a,n,r,t)})}function wn(r,e,t,a){At(t).datas[e]=r,At(r).mainData=t,r.dataType=e,a.struct&&(r[a.structAttr]=a.struct,a.struct[a.datasAttr[e]]=r),r.getLinkedData=Zf,r.getLinkedDataAll=Yf}var qf=(function(){function r(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 r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,a){ot(e)&&(a=t,t=e,e=null),e=e||{},lt(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=t.call(a,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,a);n==="postorder"&&t.call(a,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var a=0;a<this.children.length;a++){var n=this.children[a];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t<n;t++){var i=a[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,a=this.children,n=a.length;t<n;t++){var i=a[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],a=e?this:this.parentNode;a;)t.push(a),a=a.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r})(),Tn=(function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,a){this.root.eachNode(e,t,a)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,a=0,n=t.length;a<n;a++)t[a].dataIndex=-1;for(var a=0,n=e.count();a<n;a++)t[e.getRawIndex(a)].dataIndex=a},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,a){var n=new r(t),i=[],o=1;s(e);function s(v,f){var c=v.value;o=Math.max(o,B(c)?c.length:1),i.push(v);var h=new qf(Mr(v.name,""),n);f?Kf(h,f):n.root=h,n._nodes.push(h);var d=v.children;if(d)for(var p=0;p<d.length;p++)s(d[p],h)}n.root.updateDepthAndHeight(0);var l=on(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Lt(l,t);return u.initData(i),a&&a(u),Ls({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},r})();function Kf(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function He(r,e,t){if(r&&Et(e,r.type)>=0){var a=t.getData().tree.root,n=r.targetNode;if(lt(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function Cs(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Dn(r,e){var t=Cs(r);return Et(t,e)>=0}function zr(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var jf=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Jt(n,this,this.ecModel),o=Tn.createTree(a,this,s);function s(f){f.wrapMethod("getItemModel",function(c,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(c.parentModel=i),c})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var c=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=c&&c.collapsed!=null?!c.collapsed:f.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return $t("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=zr(n,this),a.collapsed=!n.isExpand,a},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})(dt);function Qf(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=n.pop();)e(i,t)}function Ae(r,e){for(var t=[r],a;a=t.pop();)if(e(a),a.isExpand){var n=a.children;if(n.length)for(var i=n.length-1;i>=0;i--)t.push(n[i])}}function Jf(r,e){r.eachSeriesByType("tree",function(t){tc(t,e)})}function tc(r,e){var t=Ef(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=di(function(y,x){return(y.parentNode===x.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=di());var s=r.getData().tree.root,l=s.children[0];if(l){Mf(s),Qf(l,Pf,o),s.hierNode.modifier=-l.hierNode.prelim,Ae(l,Nf);var u=l,v=l,f=l;Ae(l,function(y){var x=y.getLayout().x;x<u.getLayout().x&&(u=y),x>v.getLayout().x&&(v=y),y.depth>f.depth&&(f=y)});var c=u===v?1:o(u,v)/2,h=c-u.getLayout().x,d=0,p=0,g=0,S=0;if(a==="radial")d=n/(v.getLayout().x+c+h),p=i/(f.depth-1||1),Ae(l,function(y){g=(y.getLayout().x+h)*d,S=(y.depth-1)*p;var x=Ee(g,S);y.setLayout({x:x.x,y:x.y,rawX:g,rawY:S},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(p=i/(v.getLayout().x+c+h),d=n/(f.depth-1||1),Ae(l,function(y){S=(y.getLayout().x+h)*p,g=m==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:g,y:S},!0)})):(m==="TB"||m==="BT")&&(d=n/(v.getLayout().x+c+h),p=i/(f.depth-1||1),Ae(l,function(y){g=(y.getLayout().x+h)*d,S=m==="TB"?(y.depth-1)*p:i-(y.depth-1)*p,y.setLayout({x:g,y:S},!0)}))}}}function ec(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");$(s,o)})})}function rc(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=ns(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function ac(r){r.registerChartView(Ff),r.registerSeriesModel(jf),r.registerLayout(Jf),r.registerVisual(ec),rc(r)}var bi=["treemapZoomToNode","treemapRender","treemapMove"];function nc(r){for(var e=0;e<bi.length;e++)r.registerAction({type:bi[e],update:"updateView"},Se);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,a){a.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=He(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Dn(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function Ms(r){var e=r.getData(),t=e.tree,a={};t.eachNode(function(n){for(var i=n;i&&i.depth>1;)i=i.parentNode;var o=Zl(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var ic=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};Ps(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Jt({itemStyle:o},this,a);i=t.levels=oc(i,a);var l=G(i||[],function(f){return new Jt(f,s,a)},this),u=Tn.createTree(n,this,v);function v(f){f.wrapMethod("getItemModel",function(c,h){var d=u.getNodeByDataIndex(h),p=d?l[d.depth]:null;return c.parentModel=p||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return $t("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=zr(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},$(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=_t(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Ms(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e})(dt);function Ps(r){var e=0;N(r.children,function(a){Ps(a);var n=a.value;B(n)&&(n=n[0]),e+=n});var t=r.value;B(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),B(r.value)?r.value[0]=t:r.value=t}function oc(r,e){var t=Bt(e.get("color")),a=Bt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;N(r,function(s){var l=new Jt(s),u=l.get("color"),v=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var sc=8,xi=8,Kr=5,lc=(function(){function r(e){this.group=new st,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),v=l.getModel(["itemStyle","textStyle"]),f={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,f,u),this._renderContent(e,f,s,l,u,v,n),Yl(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=Mr(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+sc*2,t.emptyItemWidth);t.totalWidth+=s+xi,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),f=Xl(t.pos,t.box),c=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],S=g.node,m=g.width,y=g.text;c>f.width&&(c-=m-u,m=u,y=null);var x=new ze({shape:{points:uc(l,0,m,v,p===h.length-1,p===0)},style:xt(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Pr({style:Be(i,{text:y})}),textConfig:{position:"inside"},z2:Nr*1e4,onclick:rt(s,S)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=Be(o,{text:y}),x.ensureState("emphasis").style=d,pt(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),vc(x,e,S),l+=m+xi}},r.prototype.remove=function(){this.group.removeAll()},r})();function uc(r,e,t,a,n,i){var o=[[n?r:r-Kr,e],[r+t,e],[r+t,e+a],[n?r:r-Kr,e+a]];return!i&&o.splice(2,0,[r+t+Kr,e+a/2]),!n&&o.push([r,e+a/2]),o}function vc(r,e,t){nt(r).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&&zr(t,e)}}var fc=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:a,aborted:a})}return this},r})();function cc(){return new fc}var Fa=st,Ii=ee,_i=3,wi="label",Ti="upperLabel",hc=Nr*10,pc=Nr*2,dc=Nr*3,oe=jl([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Di=function(r){var e=oe(r);return e.stroke=e.fill=e.lineWidth=null,e},pr=Ct(),gc=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Ce(),t}return e.prototype.render=function(t,a,n,i){var o=a.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Et(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=a;var s=["treemapZoomToNode","treemapRootToNode"],l=He(i,s,t),u=i&&i.type,v=t.layoutInfo,f=!this._oldTree,c=this._storage,h=u==="treemapRootToNode"&&l&&c?{rootNodeGroup:c.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(v),p=t.get("animation"),g=this._doRender(d,t,h);p&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,h):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var a=this._containerGroup;return a||(a=this._containerGroup=new Fa,this._initEvents(a),this.group.add(a)),a.x=t.x,a.y=t.y,a},e.prototype._doRender=function(t,a,n){var i=a.getData().tree,o=this._oldTree,s=Ce(),l=Ce(),u=this._storage,v=[];function f(m,y,x,b){return yc(a,l,u,n,s,v,m,y,x,b)}p(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var c=g(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var h=this.seriesModel.layoutInfo,d=i.root.getLayout();d.width===h.width&&d.height===h.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:c,renderFinally:S};function p(m,y,x,b,I){b?(y=m,N(m,function(w,D){!w.isRemoved()&&T(D,D)})):new be(y,m,_,_).add(T).update(T).remove(rt(T,null)).execute();function _(w){return w.getId()}function T(w,D){var L=w!=null?m[w]:null,C=D!=null?y[D]:null,A=f(L,C,x,I);A&&p(L&&L.viewChildren||[],C&&C.viewChildren||[],A,b,I+1)}}function g(m){var y=Ce();return m&&N(m,function(x,b){var I=y[b];N(x,function(_){_&&(I.push(_),pr(_).willDelete=!0)})}),y}function S(){N(c,function(m){N(m,function(y){y.parent&&y.parent.remove(y)})}),N(v,function(m){m.invisible=!0,m.dirty()})}},e.prototype._doAnimation=function(t,a,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(ot(o)?0:o)||0,u=(ot(s)?null:s)||"cubicOut",v=cc();N(a.willDeleteEls,function(f,c){N(f,function(h,d){if(!h.invisible){var p=h.parent,g,S=pr(p);if(i&&i.direction==="drillDown")g=p===i.rootNodeGroup?{shape:{x:0,y:0,width:S.nodeWidth,height:S.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,y=0;S.willDelete||(m=S.nodeWidth/2,y=S.nodeHeight/2),g=c==="nodeGroup"?{x:m,y,style:{opacity:0}}:{shape:{x:m,y,width:0,height:0},style:{opacity:0}}}g&&v.add(h,g,l,0,u)}})}),N(this._storage,function(f,c){N(f,function(h,d){var p=a.lastsForAnimation[c][d],g={};p&&(h instanceof st?p.oldX!=null&&(g.x=h.x,g.y=h.y,h.x=p.oldX,h.y=p.oldY):(p.oldShape&&(g.shape=$({},h.shape),h.setShape(p.oldShape)),p.fadein?(h.setStyle("opacity",0),g.style={opacity:1}):h.style.opacity!==1&&(g.style={opacity:1})),v.add(h,g,l,0,u))})},this),this._state="animating",v.finished(vt(function(){this._state="ready",a.renderFinally()},this)).start()},e.prototype._resetController=function(t){var a=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),a||(a=this._controller=new an(t.getZr()),a.enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),a.on("pan",vt(this._onPan,this)),a.on("zoom",vt(this._onZoom,this)));var i=new Nt(0,0,t.getWidth(),t.getHeight());a.setPointerChecker(function(o,s,l){return i.contain(s,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>_i||Math.abs(t.dy)>_i)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Nt(s.x,s.y,s.width,s.height),u=null,v=this._controllerHost;u=v.zoomLimit;var f=v.zoom=v.zoom||1;if(f*=i,u){var c=u.min||0,h=u.max||1/0;f=Math.max(Math.min(h,f),c)}var d=f/v.zoom;v.zoom=f;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=ql();ti(g,g,[-a,-n]),Kl(g,g,[d,d]),ti(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),v=l.get("target",!0)||"blank";u&&is(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new lc(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(Dn(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ce(),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,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e})(yt);function Ce(){return{nodeGroup:[],background:[],content:[]}}function yc(r,e,t,a,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),f=r.getData(),c=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var h=v.width,d=v.height,p=v.borderWidth,g=v.invisible,S=o.getRawIndex(),m=s&&s.getRawIndex(),y=o.viewChildren,x=v.upperHeight,b=y&&y.length,I=c.getModel("itemStyle"),_=c.getModel(["emphasis","itemStyle"]),T=c.getModel(["blur","itemStyle"]),w=c.getModel(["select","itemStyle"]),D=I.get("borderRadius")||0,L=Q("nodeGroup",Fa);if(!L)return;if(l.add(L),L.x=v.x||0,L.y=v.y||0,L.markRedraw(),pr(L).nodeWidth=h,pr(L).nodeHeight=d,v.isAboveViewRoot)return L;var C=Q("background",Ii,u,pc);C&&U(L,C,b&&v.upperLabelHeight);var A=c.getModel("emphasis"),M=A.get("focus"),P=A.get("blurScope"),E=A.get("disabled"),R=M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():M;if(b)ei(L)&&je(L,!1),C&&(je(C,!E),f.setItemGraphicEl(o.dataIndex,C),ri(C,R,P));else{var k=Q("content",Ii,u,dc);k&&F(L,k),C.disableMorphing=!0,C&&ei(C)&&je(C,!1),je(L,!E),f.setItemGraphicEl(o.dataIndex,L);var z=c.getShallow("cursor");z&&k.attr("cursor",z),ri(L,R,P)}return L;function U(H,O,K){var Z=nt(O);if(Z.dataIndex=o.dataIndex,Z.seriesIndex=r.seriesIndex,O.setShape({x:0,y:0,width:h,height:d,r:D}),g)X(O);else{O.invisible=!1;var J=o.getVisual("style"),it=J.stroke,ft=Di(I);ft.fill=it;var tt=oe(_);tt.fill=_.get("borderColor");var ut=oe(T);ut.fill=T.get("borderColor");var It=oe(w);if(It.fill=w.get("borderColor"),K){var Mt=h-2*p;j(O,it,J.opacity,{x:p,y:0,width:Mt,height:x})}else O.removeTextContent();O.setStyle(ft),O.ensureState("emphasis").style=tt,O.ensureState("blur").style=ut,O.ensureState("select").style=It,vr(O)}H.add(O)}function F(H,O){var K=nt(O);K.dataIndex=o.dataIndex,K.seriesIndex=r.seriesIndex;var Z=Math.max(h-2*p,0),J=Math.max(d-2*p,0);if(O.culling=!0,O.setShape({x:p,y:p,width:Z,height:J,r:D}),g)X(O);else{O.invisible=!1;var it=o.getVisual("style"),ft=it.fill,tt=Di(I);tt.fill=ft,tt.decal=it.decal;var ut=oe(_),It=oe(T),Mt=oe(w);j(O,ft,it.opacity,null),O.setStyle(tt),O.ensureState("emphasis").style=ut,O.ensureState("blur").style=It,O.ensureState("select").style=Mt,vr(O)}H.add(O)}function X(H){!H.invisible&&i.push(H)}function j(H,O,K,Z){var J=c.getModel(Z?Ti:wi),it=Mr(c.get("name"),null),ft=J.getShallow("show");te(H,zt(c,Z?Ti:wi),{defaultText:ft?it:null,inheritColor:O,defaultOpacity:K,labelFetcher:r,labelDataIndex:o.dataIndex});var tt=H.getTextContent();if(tt){var ut=tt.style,It=Ql(ut.padding||0);Z&&(H.setTextConfig({layoutRect:Z}),tt.disableLabelLayout=!0),tt.beforeUpdate=function(){var ne=Math.max((Z?Z.width:H.shape.width)-It[1]-It[3],0),De=Math.max((Z?Z.height:H.shape.height)-It[0]-It[2],0);(ut.width!==ne||ut.height!==De)&&tt.setStyle({width:ne,height:De})},ut.truncateMinChar=2,ut.lineOverflow="truncate",q(ut,Z,v);var Mt=tt.getState("emphasis");q(Mt?Mt.style:null,Z,v)}}function q(H,O,K){var Z=H?H.text:null;if(!O&&K.isLeafRoot&&Z!=null){var J=r.get("drillDownIcon",!0);H.text=J?J+" "+Z:Z}}function Q(H,O,K,Z){var J=m!=null&&t[H][m],it=n[H];return J?(t[H][m]=null,mt(it,J)):g||(J=new O,J instanceof sn&&(J.z2=mc(K,Z)),Rt(it,J)),e[H][S]=J}function mt(H,O){var K=H[S]={};O instanceof Fa?(K.oldX=O.x,K.oldY=O.y):K.oldShape=$({},O.shape)}function Rt(H,O){var K=H[S]={},Z=o.parentNode,J=O instanceof st;if(Z&&(!a||a.direction==="drillDown")){var it=0,ft=0,tt=n.background[Z.getRawIndex()];!a&&tt&&tt.oldShape&&(it=tt.oldShape.width,ft=tt.oldShape.height),J?(K.oldX=0,K.oldY=ft):K.oldShape={x:it,y:ft,width:0,height:0}}K.fadein=!J}}function mc(r,e){return r*hc+e}var Sc="itemStyle",Ns=Ct();const bc={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Es(t,{},r.getViewRoot().getAncestors(),r)}};function Es(r,e,t,a){var n=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(Sc),l=xc(s,e,a),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),v=s.get("borderColor"),f=s.get("borderColorSaturation"),c;f!=null&&(c=Li(l),v=Ic(f,c)),u.stroke=v;var h=r.viewChildren;if(!h||!h.length)c=Li(l),u.fill=c;else{var d=_c(r,n,i,s,l,h);N(h,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var S=wc(n,l,p,g,d,a);Es(p,S,t,a)}})}}}function xc(r,e,t){var a=$({},e),n=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function Li(r){var e=jr(r,"color");if(e){var t=jr(r,"colorAlpha"),a=jr(r,"colorSaturation");return a&&(e=os(e,null,null,a)),t&&(e=Na(e,t)),e}}function Ic(r,e){return e!=null?os(e,null,null,r):null}function jr(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function _c(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Qr(e,"color")||n.color!=null&&n.color!=="none"&&(Qr(e,"colorAlpha")||Qr(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var v=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(v==="index"||v==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new ss(f);return Ns(c).drColorMappingBy=v,c}}}function Qr(r,e){var t=r.get(e);return B(t)&&t.length?{name:e,range:t}:null}function wc(r,e,t,a,n,i){var o=$({},e);if(n){var s=n.type,l=s==="color"&&Ns(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Ue=Math.max,dr=Math.min,Ai=Ot,Ln=N,Rs=["itemStyle","borderWidth"],Tc=["itemStyle","gapWidth"],Dc=["upperLabel","show"],Lc=["upperLabel","height"];const Ac={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=_e(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=Y(Ai(s.width,l[0]),n),v=Y(Ai(s.height,l[1]),i),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],h=He(a,c,r),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,p=r.getViewRoot(),g=Cs(p);if(f!=="treemapMove"){var S=f==="treemapZoomToNode"?Rc(r,h,p,u,v):d?[d.width,d.height]:[u,v],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var y={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:S[0],height:S[1],area:S[0]*S[1]};p.setLayout(x),Vs(p,y,!1,0),x=p.getLayout(),Ln(g,function(I,_){var T=(g[_+1]||p).getValue();I.setLayout($({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var b=r.getData().tree.root;b.setLayout(Vc(s,d,h),!0),r.setLayoutInfo(s),ks(b,new Nt(-s.x,-s.y,n,i),g,p,0)}};function Vs(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(Rs),u=s.get(Tc)/2,v=Os(s),f=Math.max(l,v),c=l-u,h=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:v},!0),n=Ue(n-2*c,0),i=Ue(i-c-h,0);var d=n*i,p=Cc(r,s,d,e,t,a);if(p.length){var g={x:c,y:h,width:n,height:i},S=dr(n,i),m=1/0,y=[];y.area=0;for(var x=0,b=p.length;x<b;){var I=p[x];y.push(I),y.area+=I.getLayout().area;var _=Ec(y,S,e.squareRatio);_<=m?(x++,m=_):(y.area-=y.pop().getLayout().area,Ci(y,S,g,u,!1),S=dr(g.width,g.height),y.length=y.area=0,m=1/0)}if(y.length&&Ci(y,S,g,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(t=!0)}for(var x=0,b=p.length;x<b;x++)Vs(p[x],e,t,a+1)}}}function Cc(r,e,t,a,n,i){var o=r.children||[],s=a.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=a.leafDepth!=null&&a.leafDepth<=i;if(n&&!l)return r.viewChildren=[];o=Dt(o,function(h){return!h.isRemoved()}),Pc(o,s);var u=Nc(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=Mc(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var v=0,f=o.length;v<f;v++){var c=o[v].getValue()/u.sum*t;o[v].setLayout({area:c})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function Mc(r,e,t,a,n){if(!a)return t;for(var i=r.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return a==="asc"?n.splice(0,o-s):n.splice(s,o-s),t}function Pc(r,e){return e&&r.sort(function(t,a){var n=e==="asc"?t.getValue()-a.getValue():a.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-a.dataIndex:a.dataIndex-t.dataIndex:n}),r}function Nc(r,e,t){for(var a=0,n=0,i=e.length;n<i;n++)a+=e[n].getValue();var o=r.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],Ln(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function Ec(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Ue(u*a/l,l/(u*n)):1/0}function Ci(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?r.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var f=0,c=r.length;f<c;f++){var h=r[f],d={},p=v?h.getLayout().area/v:0,g=d[l[o]]=Ue(v-2*a,0),S=t[s[i]]+t[l[i]]-u,m=f===c-1||S<p?S:p,y=d[l[i]]=Ue(m-2*a,0);d[s[o]]=t[s[o]]+dr(a,g/2),d[s[i]]=u+dr(a,y/2),u+=m,h.setLayout(d,!0)}t[s[o]]+=v,t[l[o]]-=v}function Rc(r,e,t,a,n){var i=(e||{}).node,o=[a,n];if(!i||i===t)return o;for(var s,l=a*n,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var v=0,f=s.children,c=0,h=f.length;c<h;c++)v+=f[c].getValue();var d=i.getValue();if(d===0)return o;u*=v/d;var p=s.getModel(),g=p.get(Rs),S=Math.max(g,Os(p));u+=4*g*g+(3*g+S)*Math.pow(u,.5),u>ai&&(u=ai),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[a*m,n*m]}function Vc(r,e,t){if(e)return{x:e.x,y:e.y};var a={x:0,y:0};if(!t)return a;var n=t.node,i=n.getLayout();if(!i)return a;for(var o=[i.width/2,i.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function ks(r,e,t,a,n){var i=r.getLayout(),o=t[n],s=o&&o===r;if(!(o&&!s||n===t.length&&r!==a)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new Nt(e.x-i.x,e.y-i.y,e.width,e.height);Ln(r.viewChildren||[],function(u){ks(u,l,t,a,n+1)})}}function Os(r){return r.get(Dc)?r.get(Lc):0}function kc(r){r.registerSeriesModel(ic),r.registerChartView(gc),r.registerVisual(bc),r.registerLayout(Ac),nc(r)}function Oc(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),n=t.getGraph(),i=n.data,o=a.mapArray(a.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){Wt(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function Gc(r){var e={};r.eachSeriesByType("graph",function(t){var a=t.getCategoriesData(),n=t.getData(),i={};a.each(function(o){var s=a.getName(o);i["ec-"+s]=o;var l=a.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),a.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],f=0;f<v.length;f++){var c=l.getShallow(v[f],!0);c!=null&&a.setItemVisual(o,v[f],c)}}),a.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){lt(l)&&(l=i["ec-"+l]);var u=a.getItemVisual(l,"style"),v=n.ensureUniqueItemVisual(o,"style");$(v,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],c=0;c<f.length;c++)n.setItemVisual(o,f[c],a.getItemVisual(l,f[c]))}})})}function er(r){return r instanceof Array||(r=[r,r]),r}function zc(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),a=e.getEdgeData(),n=er(e.get("edgeSymbol")),i=er(e.get("edgeSymbolSize"));a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",i&&i[0]),a.setVisual("toSymbolSize",i&&i[1]),a.setVisual("style",e.getModel("lineStyle").getLineStyle()),a.each(function(o){var s=a.getItemModel(o),l=t.getEdgeByIndex(o),u=er(s.getShallow("symbol",!0)),v=er(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),c=a.ensureUniqueItemVisual(o,"style");switch($(c,f),c.stroke){case"source":{var h=l.node1.getVisual("style");c.stroke=h&&h.fill;break}case"target":{var h=l.node2.getVisual("style");c.stroke=h&&h.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),v[0]&&l.setVisual("fromSymbolSize",v[0]),v[1]&&l.setVisual("toSymbolSize",v[1])})})}var Ha="-->",Br=function(r){return r.get("autoCurveness")||null},Gs=function(r,e){var t=Br(r),a=20,n=[];if(Wt(t))a=t;else if(B(t)){r.__curvenessList=t;return}e>a&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=n},$e=function(r,e,t){var a=[r.id,r.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,a,n].join(Ha)},zs=function(r){var e=r.split(Ha);return[e[0],e[2],e[1]].join(Ha)},Bc=function(r,e){var t=$e(r.node1,r.node2,e);return e.__edgeMap[t]},Fc=function(r,e){var t=Ua($e(r.node1,r.node2,e),e),a=Ua($e(r.node2,r.node1,e),e);return t+a},Ua=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function Hc(r){Br(r)&&(r.__curvenessList=[],r.__edgeMap={},Gs(r))}function Uc(r,e,t,a){if(Br(t)){var n=$e(r,e,t),i=t.__edgeMap,o=i[zs(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(a)}}function An(r,e,t,a){var n=Br(e),i=B(n);if(!n)return null;var o=Bc(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=Fc(r,e);Gs(e,u),r.lineStyle=r.lineStyle||{};var v=$e(r.node1,r.node2,e),f=e.__curvenessList,c=i||u%2?0:1;if(o.isForward)return f[c+s];var h=zs(v),d=Ua(h,e),p=f[s+d+c];return a?i?n&&n[0]===0?(d+c)%2?p:-p:((d%2?0:1)+c)%2?p:-p:(d+c)%2?p:-p:f[s+d+c]}function Bs(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(a){var n=a.getModel();a.setLayout([+n.get("x"),+n.get("y")])}),Cn(t,r)}}function Cn(r,e){r.eachEdge(function(t,a){var n=qe(t.getModel().get(["lineStyle","curveness"]),-An(t,e,a,!0),0),i=jt(t.node1.getLayout()),o=jt(t.node2.getLayout()),s=[i,o];+n&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(s)})}function $c(r,e){r.eachSeriesByType("graph",function(t){var a=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var i=t.getData(),o=[];N(n.dimensions,function(c){o=o.concat(i.mapDimensionsAll(c))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,v=0;v<o.length;v++){var f=i.get(o[v],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,n.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}Cn(i.graph,t)}else(!a||a==="none")&&Bs(t)})}function Re(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,a=e.scaleX,n=e.getZoom(),i=(n-1)*t+1;return i/a}function Ve(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var Mi=Math.PI,Jr=[];function Mn(r,e,t,a){var n=r.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,v=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var c=n.pointToData(a),h=c[0],d=c[1],p=[h-l,d-u];Ke(p,p),Jl(p,p,v),t.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);Fs(t,g,l,u)}Wc[e](r,s,o,v,l,u,f),s.eachEdge(function(S,m){var y=qe(S.getModel().get(["lineStyle","curveness"]),An(S,r,m),0),x=jt(S.node1.getLayout()),b=jt(S.node2.getLayout()),I,_=(x[0]+b[0])/2,T=(x[1]+b[1])/2;+y&&(y*=3,I=[l*y+_*(1-y),u*y+T*(1-y)]),S.setLayout([x,b,I])})}}}var Wc={value:function(r,e,t,a,n,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(v){var f=v.getValue("value"),c=u*(l?f:1)/2;s+=c,v.setLayout([a*Math.cos(s)+n,a*Math.sin(s)+i]),s+=c})},symbolSize:function(r,e,t,a,n,i,o){var s=0;Jr.length=o;var l=Re(r);e.eachNode(function(f){var c=Ve(f);isNaN(c)&&(c=2),c<0&&(c=0),c*=l;var h=Math.asin(c/2/a);isNaN(h)&&(h=Mi/2),Jr[f.dataIndex]=h,s+=h*2});var u=(2*Mi-s)/o/2,v=0;e.eachNode(function(f){var c=u+Jr[f.dataIndex];v+=c,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([a*Math.cos(v)+n,a*Math.sin(v)+i]),v+=c})}};function Fs(r,e,t,a){var n=r.getGraphicEl();if(n){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=n.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-a,l[0]-t);u<0&&(u=Math.PI*2+u);var v=l[0]<t;v&&(u=u-Math.PI);var f=v?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var c=s.ensureState("emphasis");$(c.textConfig||(c.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Zc(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Mn(e,"symbolSize")})}var fe=Ea;function Yc(r,e,t){for(var a=r,n=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,v=0;v<a.length;v++){var f=a[v];f.p||(f.p=tu(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=jt(f.p),f.edges=null}var c=t.friction==null?.6:t.friction,h=c,d,p;return{warmUp:function(){h=c*.8},setFixed:function(g){a[g].fixed=!0},setUnfixed:function(g){a[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(a,n);for(var S=[],m=a.length,y=0;y<n.length;y++){var x=n[y];if(!x.ignoreForceLayout){var b=x.n1,I=x.n2;ye(S,I.p,b.p);var _=ni(S)-x.d,T=I.w/(b.w+I.w);isNaN(T)&&(T=0),Ke(S,S),!b.fixed&&fe(b.p,b.p,S,T*_*h),!I.fixed&&fe(I.p,I.p,S,-(1-T)*_*h)}}for(var y=0;y<m;y++){var w=a[y];w.fixed||(ye(S,l,w.p),fe(w.p,w.p,S,u*h))}for(var y=0;y<m;y++)for(var b=a[y],D=y+1;D<m;D++){var I=a[D];ye(S,I.p,b.p);var _=ni(S);_===0&&(eu(S,Math.random()-.5,Math.random()-.5),_=1);var L=(b.rep+I.rep)/_/_;!b.fixed&&fe(b.pp,b.pp,S,L),!I.fixed&&fe(I.pp,I.pp,S,-L)}for(var C=[],y=0;y<m;y++){var w=a[y];w.fixed||(ye(C,w.p,w.pp),fe(w.p,w.p,C,h),St(w.pp,w.p))}h=h*.992;var A=h<.01;p&&p(a,n,A),g&&g(A)}}}function Xc(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var a=e.preservedPoints||{},n=e.getGraph(),i=n.data,o=n.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(y){var x=i.getId(y);i.setItemLayout(y,a[x]||[NaN,NaN])}):!l||l==="none"?Bs(e):l==="circular"&&Mn(e,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),f=s.get("repulsion"),c=s.get("edgeLength"),h=B(f)?f:[f,f],d=B(c)?c:[c,c];d=[d[1],d[0]];var p=i.mapArray("value",function(y,x){var b=i.getItemLayout(x),I=fr(y,u,h);return isNaN(I)&&(I=(h[0]+h[1])/2),{w:I,rep:I,fixed:i.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(y,x){var b=n.getEdgeByIndex(x),I=fr(y,v,d);isNaN(I)&&(I=(d[0]+d[1])/2);var _=b.getModel(),T=qe(b.getModel().get(["lineStyle","curveness"]),-An(b,e,x,!0),0);return{n1:p[b.node1.dataIndex],n2:p[b.node2.dataIndex],d:I,curveness:T,ignoreForceLayout:_.get("ignoreForceLayout")}}),S=t.getBoundingRect(),m=Yc(p,g,{rect:S,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(y,x){for(var b=0,I=y.length;b<I;b++)y[b].fixed&&St(y[b].p,n.getNodeByIndex(b).getLayout())}),m.afterStep(function(y,x,b){for(var I=0,_=y.length;I<_;I++)y[I].fixed||n.getNodeByIndex(I).setLayout(y[I].p),a[i.getId(I)]=y[I].p;for(var I=0,_=x.length;I<_;I++){var T=x[I],w=n.getEdgeByIndex(I),D=T.n1.p,L=T.n2.p,C=w.getLayout();C=C?C.slice():[],C[0]=C[0]||[],C[1]=C[1]||[],St(C[0],D),St(C[1],L),+T.curveness&&(C[2]=[(D[0]+L[0])/2-(D[1]-L[1])*T.curveness,(D[1]+L[1])/2-(L[0]-D[0])*T.curveness]),w.setLayout(C)}}),e.forceLayout=m,e.preservedPoints=a,m.step()}else e.forceLayout=null})}function qc(r,e,t){var a=$(r.getBoxLayoutParams(),{aspect:t});return _e(a,{width:e.getWidth(),height:e.getHeight()})}function Kc(r,e){var t=[];return r.eachSeriesByType("graph",function(a){var n=a.get("coordinateSystem");if(!n||n==="view"){var i=a.getData(),o=i.mapArray(function(g){var S=i.getItemModel(g);return[+S.get("x"),+S.get("y")]}),s=[],l=[];Cr(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),v=qc(a,e,u);isNaN(u)&&(s=[v.x,v.y],l=[v.x+v.width,v.y+v.height]);var f=l[0]-s[0],c=l[1]-s[1],h=v.width,d=v.height,p=a.coordinateSystem=new nn;p.zoomLimit=a.get("scaleLimit"),p.setBoundingRect(s[0],s[1],f,c),p.setViewRect(v.x,v.y,h,d),p.setCenter(a.get("center"),e),p.setZoom(a.get("zoom")),t.push(p)}}),t}var Pi=ls.prototype,ta=as.prototype,Hs=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();(function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(Hs);function ea(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var jc=(function(r){V(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-line",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Hs},e.prototype.buildPath=function(t,a){ea(a)?Pi.buildPath.call(this,t,a):ta.buildPath.call(this,t,a)},e.prototype.pointAt=function(t){return ea(this.shape)?Pi.pointAt.call(this,t):ta.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var a=this.shape,n=ea(a)?[a.x2-a.x1,a.y2-a.y1]:ta.tangentAt.call(this,t);return Ke(n,n)},e})(gt),ra=["fromSymbol","toSymbol"];function Ni(r){return"_"+r+"Type"}function Ei(r,e,t){var a=e.getItemVisual(t,r);if(!a||a==="none")return a;var n=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=vn(n),u=fn(o||0,l);return a+l+u+(i||"")+(s||"")}function Ri(r,e,t){var a=e.getItemVisual(t,r);if(!(!a||a==="none")){var n=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=vn(n),u=fn(o||0,l),v=Dr(a,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return v.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,v.name=r,v}}function Qc(r){var e=new jc({name:"line",subPixelOptimize:!0});return $a(e.shape,r),e}function $a(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var Pn=(function(r){V(e,r);function e(t,a,n){var i=r.call(this)||this;return i._createLine(t,a,n),i}return e.prototype._createLine=function(t,a,n){var i=t.hostModel,o=t.getItemLayout(a),s=Qc(o);s.shape.percent=0,Gt(s,{shape:{percent:1}},i,a),this.add(s),N(ra,function(l){var u=Ri(l,t,a);this.add(u),this[Ni(l)]=Ei(l,t,a)},this),this._updateCommonStl(t,a,n)},e.prototype.updateData=function(t,a,n){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(a),l={shape:{}};$a(l.shape,s),ht(o,l,i,a),N(ra,function(u){var v=Ei(u,t,a),f=Ni(u);if(this[f]!==v){this.remove(this.childOfName(u));var c=Ri(u,t,a);this.add(c)}this[f]=v},this),this._updateCommonStl(t,a,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,a,n){var i=t.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,v=n&&n.labelStatesModels,f=n&&n.emphasisDisabled,c=n&&n.focus,h=n&&n.blurScope;if(!n||t.hasItemOption){var d=t.getItemModel(a),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=p.get("disabled"),c=p.get("focus"),h=p.get("blurScope"),v=zt(d)}var g=t.getItemVisual(a,"style"),S=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,N(ra,function(I){var _=this.childOfName(I);if(_){_.setColor(S),_.style.opacity=g.opacity;for(var T=0;T<Ra.length;T++){var w=Ra[T],D=o.getState(w);if(D){var L=D.style||{},C=_.ensureState(w),A=C.style||(C.style={});L.stroke!=null&&(A[_.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(A.opacity=L.opacity)}}_.markRedraw()}},this);var m=i.getRawValue(a);te(this,v,{labelDataIndex:a,labelFetcher:{getFormattedLabel:function(I,_){return i.getFormattedLabel(I,_,t.dataType)}},inheritColor:S||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(a):isFinite(m)?ru(m):m)+""});var y=this.getTextContent();if(y){var x=v.normal;y.__align=y.style.align,y.__verticalAlign=y.style.verticalAlign,y.__position=x.get("position")||"middle";var b=x.get("distance");B(b)||(b=[b,b]),y.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),pt(this,c,h,f)},e.prototype.highlight=function(){ln(this)},e.prototype.downplay=function(){un(this)},e.prototype.updateLayout=function(t,a){this.setLinePoints(t.getItemLayout(a))},e.prototype.setLinePoints=function(t){var a=this.childOfName("line");$a(a.shape,t),a.dirty()},e.prototype.beforeUpdate=function(){var t=this,a=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(!a&&!n&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,v=l.pointAt(0),f=l.pointAt(u),c=ye([],f,v);Ke(c,c);function h(D,L){var C=D.__specifiedRotation;if(C==null){var A=l.tangentAt(L);D.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(A[1],A[0]))}else D.attr("rotation",C)}if(a&&(a.setPosition(v),h(a,0),a.scaleX=a.scaleY=o*u,a.markRedraw()),n&&(n.setPosition(f),h(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,p=void 0,g=i.__labelDistance,S=g[0]*o,m=g[1]*o,y=u/2,x=l.tangentAt(y),b=[x[1],-x[0]],I=l.pointAt(y);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var _=x[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(x[1],x[0]);f[0]<v[0]&&(T=Math.PI+T),i.rotation=T}var w=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=m,p="top";break;default:w=0,p="middle"}switch(i.__position){case"end":i.x=c[0]*S+f[0],i.y=c[1]*m+f[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*S+v[0],i.y=-c[1]*m+v[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=S*_+v[0],i.y=v[1]+w,d=x[0]<0?"right":"left",i.originX=-S*_,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=I[0],i.y=I[1]+w,d="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-S*_+f[0],i.y=f[1]+w,d=x[0]>=0?"right":"left",i.originX=S*_,i.originY=-w;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e})(st),Nn=(function(){function r(e){this.group=new st,this._LineCtor=e||Pn}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=Vi(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Vi(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!Jc(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var i=t.getItemLayout(n);if(aa(i)){var o=new this._LineCtor(t,n,this._seriesScope);o.traverse(a),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){Er(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,a){var n=e.getItemLayout(t);if(aa(n)){var i=new this._LineCtor(e,t,a);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,a,n,i){var o=e.getItemGraphicEl(a);if(!aa(t.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(t,n,i):o=new this._LineCtor(t,n,i),t.setItemGraphicEl(n,o),this.group.add(o)},r})();function Jc(r){return r.animators&&r.animators.length>0}function Vi(r){var e=r.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:zt(e)}}function ki(r){return isNaN(r[0])||isNaN(r[1])}function aa(r){return r&&!ki(r[0])&&!ki(r[1])}var na=[],ia=[],oa=[],ce=us,sa=nu,Oi=Math.abs;function Gi(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){na[0]=ce(a[0],n[0],i[0],v),na[1]=ce(a[1],n[1],i[1],v);var f=Oi(sa(na,e)-l);f<o&&(o=f,s=v)}for(var c=0;c<32;c++){var h=s+u;ia[0]=ce(a[0],n[0],i[0],s),ia[1]=ce(a[1],n[1],i[1],s),oa[0]=ce(a[0],n[0],i[0],h),oa[1]=ce(a[1],n[1],i[1],h);var f=sa(ia,e)-l;if(Oi(f)<.01)break;var d=sa(oa,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function la(r,e){var t=[],a=au,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[jt(u[0]),jt(u[1])],u[2]&&u.__original.push(jt(u[2])));var c=u.__original;if(u[2]!=null){if(St(n[0],c[0]),St(n[1],c[2]),St(n[2],c[1]),v&&v!=="none"){var h=Ve(s.node1),d=Gi(n,c[0],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(f&&f!=="none"){var h=Ve(s.node2),d=Gi(n,c[1],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}St(u[0],n[0]),St(u[1],n[2]),St(u[2],n[1])}else{if(St(i[0],c[0]),St(i[1],c[1]),ye(o,i[1],i[0]),Ke(o,o),v&&v!=="none"){var h=Ve(s.node1);Ea(i[0],i[0],o,h*e)}if(f&&f!=="none"){var h=Ve(s.node2);Ea(i[1],i[1],o,-h*e)}St(u[0],i[0]),St(u[1],i[1])}})}function zi(r){return r.type==="view"}var th=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new Ar,i=new Nn,o=this.group;this._controller=new an(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(zi(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):ht(u,v,t)}la(t.getGraph(),Re(t));var f=t.getData();s.updateData(f);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");f.graph.eachNode(function(y){var x=y.dataIndex,b=y.getGraphicEl(),I=y.getModel();if(b){b.off("drag").off("dragend");var _=I.get("draggable");_&&b.on("drag",function(w){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(x),f.setItemLayout(x,[b.x,b.y]);break;case"circular":f.setItemLayout(x,[b.x,b.y]),y.setLayout({fixed:!0},!0),Mn(t,"symbolSize",y,[w.offsetX,w.offsetY]),i.updateLayout(t);break;case"none":default:f.setItemLayout(x,[b.x,b.y]),Cn(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(x)}),b.setDraggable(_,!!I.get("cursor"));var T=I.get(["emphasis","focus"]);T==="adjacency"&&(nt(b).focus=y.getAdjacentDataIndices())}}),f.graph.eachEdge(function(y){var x=y.getGraphicEl(),b=y.getModel().get(["emphasis","focus"]);x&&b==="adjacency"&&(nt(x).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),S=f.getLayout("cx"),m=f.getLayout("cy");f.graph.eachNode(function(y){Fs(y,g,S,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,f){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(v,f)&&!Jo(u,n,t)}),!zi(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){ts(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){es(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),la(t.getGraph(),Re(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=Re(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){la(t.getGraph(),Re(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e})(yt);function he(r){return"_EC_"+r}var eh=(function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[he(e)]){var n=new se(e,t);return n.hostGraph=this,this.nodes.push(n),a[he(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[he(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Wt(e)&&(e=this.nodes[e]),Wt(t)&&(t=this.nodes[t]),e instanceof se||(e=n[he(e)]),t instanceof se||(t=n[he(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Us(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof se&&(e=e.id),t instanceof se&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i<n;i++)a[i].dataIndex>=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof se||(t=this._nodesMap[he(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var v=u[o],f=v.node1===l?v.node2:v.node1;if(!f.__visited){if(e.call(n,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,a=this.nodes,n=this.edges,i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)a[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=n[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,a=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<a.length;n++){var i=a[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r})(),se=(function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var a=this.edges[t];a.dataIndex<0||(e.edge.push(a.dataIndex),e.node.push(a.node1.dataIndex,a.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=_t(),t=_t(),a=0;a<this.edges.length;a++){var n=this.edges[a];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var i=[n.node1],o=[n.node2],s=0;s<i.length;){var l=i[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),i.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var v=o[s];s++,t.set(v.dataIndex,!0);for(var u=0;u<v.outEdges.length;u++)e.set(v.outEdges[u].dataIndex,!0),o.push(v.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r})(),Us=(function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a==null?-1:a}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=_t(),t=_t();e.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i<a.length;){var o=a[i];i++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),a.push(o.inEdges[s].node1)}for(i=0;i<n.length;){var l=n[i];i++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),n.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},r})();function $s(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}we(se,$s("hostGraph","data"));we(Us,$s("hostGraph","edgeData"));function Ws(r,e,t,a,n){for(var i=new eh(a),o=0;o<r.length;o++)i.addNode(Ot(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var v=e[o],f=v.source,c=v.target;i.addEdge(f,c,u)&&(l.push(v),s.push(Ot(Mr(v.id,null),f+" > "+c)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=Ie(r,t);else{var p=vs.get(h),g=p?p.dimensions||[]:[];Et(g,"value")<0&&g.concat(["value"]);var S=on(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new Lt(S,t),d.initData(r)}var m=new Lt(["value"],t);return m.initData(l,s),n&&n(d,m),Ls({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var rh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new cn(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),hn(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){Hc(this);var s=Ws(i,n,this,!0,l);return N(s.edges,function(u){Uc(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,v){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),S=p[g];return S&&(S.parentModel=d.parentModel,d.parentModel=S),d});var f=Jt.prototype.getModel;function c(d,p){var g=f.call(this,d,p);return g.resolveParentPath=h,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=c,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},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,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),$t("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var f=iu({series:this,dataIndex:t,multipleSeries:a});return f},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(n){return n.value!=null?n:$({value:0},n)}),a=new Lt(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.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})(dt),ah={type:"graphRoam",event:"graphRoam",update:"none"};function nh(r){r.registerChartView(th),r.registerSeriesModel(rh),r.registerProcessor(Oc),r.registerVisual(Gc),r.registerVisual(zc),r.registerLayout($c),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Zc),r.registerLayout(Xc),r.registerCoordinateSystem("graphView",{dimensions:nn.dimensions,create:Kc}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Se),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Se),r.registerAction(ah,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=ns(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var ih=["itemStyle","opacity"],oh=(function(r){V(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new pn,s=new Pr;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),v=s.get(ih);v=v==null?1:v,n||Te(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Gt(i,{style:{opacity:v}},o,a)):ht(i,{style:{opacity:v},shape:{points:l.points}},o,a),Ut(i,s),this._updateLabel(t,a),pt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),v=u.label,f=t.getItemVisual(a,"style"),c=f.fill;te(o,zt(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:f.opacity,defaultText:t.getName(a)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:c,outsideFill:c});var h=v.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Xt(h[0][0],h[0][1]):null},ht(o,{style:{x:v.x,y:v.y}},s,a),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),jo(n,Qo(l),{stroke:c})},e})(ze),sh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new oh(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var v=o.getItemGraphicEl(u);v.updateData(i,l),s.add(v),i.setItemGraphicEl(l,v)}).remove(function(l){var u=o.getItemGraphicEl(l);ou(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(yt),lh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new cn(vt(this.getData,this),vt(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return fs(this,{coordDimensions:["value"],encodeDefaulter:rt(su,this)})},e.prototype._defaultLabelLine=function(t){hn(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e})(dt);function uh(r,e){return _e(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function vh(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();o<s;o++)n[o]=o;return ot(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return i?a[l]-a[u]:a[u]-a[l]}),n}function fh(r){var e=r.hostModel,t=e.get("orient");r.each(function(a){var n=r.getItemModel(a),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=r.getItemLayout(a),u=l.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,c,h,d;if(v)o==="insideLeft"?(c=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(c=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,f="right"):(c=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),d=[[c,h],[c,h]];else{var p=void 0,g=void 0,S=void 0,m=void 0,y=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,S=p-y,c=S-5,f="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,S=p+y,c=S+5,f="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-y,h=m-5,f="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+y,h=m+5,f="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-y,h=m-5,f="center"):(S=p+y,c=S+5,f="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(m=g+y,h=m+5,f="center"):(S=p+y,c=S+5,f="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-y,h=m-5,f="center"):(S=p-y,c=S-5,f="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+y,h=m+5,f="center"):(S=p-y,c=S-5,f="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+y,h=m+5,f="center"):(S=p+y,c=S+5,f="left")),t==="horizontal"?(S=p,c=S):(m=g,h=m),d=[[p,g],[S,m]]}l.label={linePoints:d,x:c,y:h,verticalAlign:"middle",textAlign:f,inside:v}})}function ch(r,e){r.eachSeriesByType("funnel",function(t){var a=t.getData(),n=a.mapDimension("value"),i=t.get("sort"),o=uh(t,e),s=t.get("orient"),l=o.width,u=o.height,v=vh(a,i),f=o.x,c=o.y,h=s==="horizontal"?[Y(t.get("minSize"),u),Y(t.get("maxSize"),u)]:[Y(t.get("minSize"),l),Y(t.get("maxSize"),l)],d=a.getDataExtent(n),p=t.get("min"),g=t.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var S=t.get("funnelAlign"),m=t.get("gap"),y=s==="horizontal"?l:u,x=(y-m*(a.count()-1))/a.count(),b=function(M,P){if(s==="horizontal"){var E=a.get(n,M)||0,R=fr(E,[p,g],h,!0),k=void 0;switch(S){case"top":k=c;break;case"center":k=c+(u-R)/2;break;case"bottom":k=c+(u-R);break}return[[P,k],[P,k+R]]}var z=a.get(n,M)||0,U=fr(z,[p,g],h,!0),F;switch(S){case"left":F=f;break;case"center":F=f+(l-U)/2;break;case"right":F=f+l-U;break}return[[F,P],[F+U,P]]};i==="ascending"&&(x=-x,m=-m,s==="horizontal"?f+=l:c+=u,v=v.reverse());for(var I=0;I<v.length;I++){var _=v[I],T=v[I+1],w=a.getItemModel(_);if(s==="horizontal"){var D=w.get(["itemStyle","width"]);D==null?D=x:(D=Y(D,l),i==="ascending"&&(D=-D));var L=b(_,f),C=b(T,f+D);f+=D+m,a.setItemLayout(_,{points:L.concat(C.slice().reverse())})}else{var A=w.get(["itemStyle","height"]);A==null?A=x:(A=Y(A,u),i==="ascending"&&(A=-A));var L=b(_,c),C=b(T,c+A);c+=A+m,a.setItemLayout(_,{points:L.concat(C.slice().reverse())})}}fh(a)})}function hh(r){r.registerChartView(sh),r.registerSeriesModel(lh),r.registerLayout(ch),r.registerProcessor(dn("funnel"))}var ph=.3,dh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new st,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.dimensions,f=Fi(t);s.diff(l).add(c).update(h).remove(d).execute();function c(g){var S=Bi(s,o,g,v,u);ua(S,s,g,f)}function h(g,S){var m=l.getItemGraphicEl(S),y=Zs(s,g,v,u);s.setItemGraphicEl(g,m),ht(m,{shape:{points:y}},t,g),Te(m),ua(m,s,g,f)}function d(g){var S=l.getItemGraphicEl(g);o.remove(S)}if(!this._initialized){this._initialized=!0;var p=gh(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},e.prototype.incrementalPrepareRender=function(t,a,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,a,n){for(var i=a.getData(),o=a.coordinateSystem,s=o.dimensions,l=Fi(a),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var f=Bi(i,this._dataGroup,v,s,o);f.incremental=!0,ua(f,i,v,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(yt);function gh(r,e,t){var a=r.model,n=r.getRect(),i=new ee({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=a.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),Gt(i,{shape:{width:n.width,height:n.height}},e,t),i}function Zs(r,e,t,a){for(var n=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);yh(s,a.getAxis(o).type)||n.push(a.dataToPoint(s,o))}return n}function Bi(r,e,t,a,n){var i=Zs(r,t,a,n),o=new pn({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function Fi(r){var e=r.get("smooth",!0);return e===!0&&(e=ph),e=lu(e),uu(e)&&(e=0),{smooth:e}}function ua(r,e,t,a){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",a.smooth);var n=e.getItemModel(t),i=n.getModel("emphasis");Ut(r,n,"lineStyle"),pt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function yh(r,e){return e==="category"?r==null:r==null||isNaN(r)}var mh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,a){return Ie(null,this,{useEncodeDefaulter:vt(Sh,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var a=this.coordinateSystem,n=this.getData(),i=[];return a.eachActiveState(n,function(o,s){t===o&&i.push(n.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e})(dt);function Sh(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return N(e.dimensions,function(a){var n=bh(a);t[a]=n}),t}}function bh(r){return+r.replace("dim","")}var xh=["lineStyle","opacity"],Ih={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,a={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(n,i){t.eachActiveState(i,function(o,s){var l=a[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(xh,!0);u!=null&&(l=u)}var v=i.ensureUniqueItemVisual(s,"style");v.opacity=l},n.start,n.end)}}}};function _h(r){W(cs),r.registerChartView(dh),r.registerSeriesModel(mh),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Ih)}var wh=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r})(),Th=(function(r){V(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new wh},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){ln(this)},e.prototype.downplay=function(){un(this)},e})(gt),Dh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,v=l.height,f=t.getData(),c=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new Th,g=nt(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var S=d.getModel(),m=S.getModel("lineStyle"),y=m.get("curveness"),x=d.node1.getLayout(),b=d.node1.getModel(),I=b.get("localX"),_=b.get("localY"),T=d.node2.getLayout(),w=d.node2.getModel(),D=w.get("localX"),L=w.get("localY"),C=d.getLayout(),A,M,P,E,R,k,z,U;p.shape.extent=Math.max(1,C.dy),p.shape.orient=h,h==="vertical"?(A=(I!=null?I*u:x.x)+C.sy,M=(_!=null?_*v:x.y)+x.dy,P=(D!=null?D*u:T.x)+C.ty,E=L!=null?L*v:T.y,R=A,k=M*(1-y)+E*y,z=P,U=M*y+E*(1-y)):(A=(I!=null?I*u:x.x)+x.dx,M=(_!=null?_*v:x.y)+C.sy,P=D!=null?D*u:T.x,E=(L!=null?L*v:T.y)+C.ty,R=A*(1-y)+P*y,k=M,z=A*y+P*(1-y),U=E),p.setShape({x1:A,y1:M,x2:P,y2:E,cpx1:R,cpy1:k,cpx2:z,cpy2:U}),p.useStyle(m.getItemStyle()),Hi(p.style,h,d);var F=""+S.get("value"),X=zt(S,"edgeLabel");te(p,X,{labelFetcher:{getFormattedLabel:function(Q,mt,Rt,H,O,K){return t.getFormattedLabel(Q,mt,"edge",H,qe(O,X.normal&&X.normal.get("formatter"),F),K)}},labelDataIndex:d.dataIndex,defaultText:F}),p.setTextConfig({position:"inside"});var j=S.getModel("emphasis");Ut(p,S,"lineStyle",function(Q){var mt=Q.getItemStyle();return Hi(mt,h,d),mt}),s.add(p),c.setItemGraphicEl(d.dataIndex,p);var q=j.get("focus");pt(p,q==="adjacency"?d.getAdjacentDataIndices():q==="trajectory"?d.getTrajectoryDataIndices():q,j.get("blurScope"),j.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),S=g.get("localX"),m=g.get("localY"),y=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new ee({shape:{x:S!=null?S*u:p.x,y:m!=null?m*v:p.y,width:p.dx,height:p.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});te(b,zt(g),{labelFetcher:{getFormattedLabel:function(_,T){return t.getFormattedLabel(_,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),Ut(b,g),s.add(b),f.setItemGraphicEl(d.dataIndex,b),nt(b).dataType="node";var I=y.get("focus");pt(b,I==="adjacency"?d.getAdjacentDataIndices():I==="trajectory"?d.getTrajectoryDataIndices():I,y.get("blurScope"),y.get("disabled"))}),f.eachItemGraphicEl(function(d,p){var g=f.getItemModel(p);g.get("draggable")&&(d.drift=function(S,m){i._focusAdjacencyDisabled=!0,this.shape.x+=S,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/v})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(Lh(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e})(yt);function Hi(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");lt(a)&&lt(n)&&(r.fill=new vu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function Lh(r,e,t){var a=new ee({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Gt(a,{shape:{width:r.width+20}},e,t),a}var Ah=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new Jt(o[l],this,a));var u=Ws(i,n,this,!0,v);return u.data;function v(f,c){f.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var S=g.depth,m=p.levelModels[S];m&&(h.parentModel=m)}return h}),c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),S=g.node1.getLayout();if(S){var m=S.depth,y=p.levelModels[m];y&&(h.parentModel=y)}return h})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return $t("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),f=v.getLayout().value,c=this.getDataParams(t,n).data.name;return $t("nameValue",{name:c!=null?c+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e})(dt);function Ch(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=Mh(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;Nh(u);var f=Dt(u,function(p){return p.getLayout().value===0}),c=f.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),d=t.get("nodeAlign");Ph(u,v,a,n,o,s,c,h,d)})}function Mh(r,e){return _e(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Ph(r,e,t,a,n,i,o,s,l){Eh(r,e,t,n,i,s,l),Oh(r,e,i,n,a,o,s),Zh(r,s)}function Nh(r){N(r,function(e){var t=Qt(e.outEdges,gr),a=Qt(e.inEdges,gr),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function Eh(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],v=[],f=0,c=0;c<e.length;c++)s[c]=1;for(var c=0;c<r.length;c++)l[c]=r[c].inEdges.length,l[c]===0&&u.push(r[c]);for(var h=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),S=g.depth!=null&&g.depth>=0;S&&g.depth>h&&(h=g.depth),p.setLayout({depth:S?g.depth:f},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var m=0;m<p.outEdges.length;m++){var y=p.outEdges[m],x=e.indexOf(y);s[x]=0;var b=y.node2,I=r.indexOf(b);--l[I]===0&&v.indexOf(b)<0&&v.push(b)}}++f,u=v,v=[]}for(var c=0;c<s.length;c++)if(s[c]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var _=h>f-1?h:f-1;o&&o!=="left"&&Rh(r,o,i,_);var T=i==="vertical"?(n-t)/_:(a-t)/_;kh(r,T,i)}function Ys(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Rh(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var v=l.inEdges[u];n.indexOf(v.node1)<0&&n.push(v.node1)}}i=n,n=[],++o}N(r,function(f){Ys(f)||f.setLayout({depth:Math.max(0,a-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Vh(r,a)}function Vh(r,e){N(r,function(t){!Ys(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function kh(r,e,t){N(r,function(a){var n=a.getLayout().depth*e;t==="vertical"?a.setLayout({y:n},!0):a.setLayout({x:n},!0)})}function Oh(r,e,t,a,n,i,o){var s=Gh(r,o);zh(s,e,t,a,n,o),va(s,n,t,a,o);for(var l=1;i>0;i--)l*=.99,Bh(s,l,o),va(s,n,t,a,o),Wh(s,l,o),va(s,n,t,a,o)}function Gh(r,e){var t=[],a=e==="vertical"?"y":"x",n=Va(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),N(n.keys,function(i){t.push(n.buckets.get(i))}),t}function zh(r,e,t,a,n,i){var o=1/0;N(r,function(s){var l=s.length,u=0;N(s,function(f){u+=f.getLayout().value});var v=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;v<o&&(o=v)}),N(r,function(s){N(s,function(l,u){var v=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:v},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:v},!0))})}),N(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function va(r,e,t,a,n){var i=n==="vertical"?"x":"y";N(r,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,v=0,f=o.length,c=n==="vertical"?"dx":"dy",h=0;h<f;h++)l=o[h],u=v-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]+l.getLayout()[c]+e;var d=n==="vertical"?a:t;if(u=v-e-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),v=s;for(var h=f-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[c]+e-v,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]}})}function Bh(r,e,t){N(r.slice().reverse(),function(a){N(a,function(n){if(n.outEdges.length){var i=Qt(n.outEdges,Fh,t)/Qt(n.outEdges,gr);if(isNaN(i)){var o=n.outEdges.length;i=o?Qt(n.outEdges,Hh,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-re(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-re(n,t))*e;n.setLayout({y:l},!0)}}})})}function Fh(r,e){return re(r.node2,e)*r.getValue()}function Hh(r,e){return re(r.node2,e)}function Uh(r,e){return re(r.node1,e)*r.getValue()}function $h(r,e){return re(r.node1,e)}function re(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function gr(r){return r.getValue()}function Qt(r,e,t){for(var a=0,n=r.length,i=-1;++i<n;){var o=+e(r[i],t);isNaN(o)||(a+=o)}return a}function Wh(r,e,t){N(r,function(a){N(a,function(n){if(n.inEdges.length){var i=Qt(n.inEdges,Uh,t)/Qt(n.inEdges,gr);if(isNaN(i)){var o=n.inEdges.length;i=o?Qt(n.inEdges,$h,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-re(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-re(n,t))*e;n.setLayout({y:l},!0)}}})})}function Zh(r,e){var t=e==="vertical"?"x":"y";N(r,function(a){a.outEdges.sort(function(n,i){return n.node2.getLayout()[t]-i.node2.getLayout()[t]}),a.inEdges.sort(function(n,i){return n.node1.getLayout()[t]-i.node1.getLayout()[t]})}),N(r,function(a){var n=0,i=0;N(a.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),N(a.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function Yh(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),a=t.nodes,n=t.edges;if(a.length){var i=1/0,o=-1/0;N(a,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),N(a,function(s){var l=new ss({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),v=s.getModel().get(["itemStyle","color"]);v!=null?(s.setVisual("color",v),s.setVisual("style",{fill:v})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&N(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Xh(r){r.registerChartView(Dh),r.registerSeriesModel(Ah),r.registerLayout(Ch),r.registerVisual(Yh),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Xs=(function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[v],c=u[1-v],h=[n,i],d=h[v].get("type"),p=h[1-v].get("type"),g=e.data;if(g&&l){var S=[];N(g,function(x,b){var I;B(x)?(I=x.slice(),x.unshift(b)):B(x.value)?(I=$({},x),I.value=I.value.slice(),x.value.unshift(b)):I=x,S.push(I)}),e.data=S}var m=this.defaultValueDimensions,y=[{name:f,type:ka(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:ka(p),dimsDef:m.slice()}];return fs(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:rt(fu,y,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})(),qs=(function(r){V(e,r);function e(){var t=r!==null&&r.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})(dt);we(qs,Xs,!0);var qh=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),f=Ui(v,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,v){var f=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(f);return}var c=i.getItemLayout(u);f?(Te(f),Ks(c,f,i,u)):f=Ui(c,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e})(yt),Kh=(function(){function r(){}return r})(),jh=(function(r){V(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new Kh},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e})(gt);function Ui(r,e,t,a,n){var i=r.ends,o=new jh({shape:{points:n?Qh(i,a,r):i}});return Ks(r,o,e,t,n),o}function Ks(r,e,t,a,n){var i=t.hostModel,o=cu[n?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,a),e.useStyle(t.getItemVisual(a,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(a),l=s.getModel("emphasis");Ut(e,s),pt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Qh(r,e,t){return G(r,function(a){return a=a.slice(),a[e]=t.initBaseline,a})}var Oe=N;function Jh(r){var e=tp(r);Oe(e,function(t){var a=t.seriesModels;a.length&&(ep(t),Oe(a,function(n,i){rp(n,t.boxOffsetList[i],t.boxWidthList[i])}))})}function tp(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(a){var n=a.getBaseAxis(),i=Et(t,n);i<0&&(i=t.length,t[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(a)}),e}function ep(r){var e=r.axis,t=r.seriesModels,a=t.length,n=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Oe(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Oe(t,function(d){var p=d.get("boxWidth");B(p)||(p=[p,p]),o.push([Y(p[0],s)||0,Y(p[1],s)||0])});var v=s*.8-2,f=v/a*.3,c=(v-f*(a-1))/a,h=c/2-v/2;Oe(t,function(d,p){i.push(h),h+=f+c,n.push(Math.min(Math.max(c,o[p][0]),o[p][1]))})}function rp(r,e,t){var a=r.coordinateSystem,n=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),v=n.mapDimensionsAll(l[s]);if(u==null||v.length<5)return;for(var f=0;f<n.count();f++){var c=n.get(u,f),h=y(c,v[2],f),d=y(c,v[0],f),p=y(c,v[1],f),g=y(c,v[3],f),S=y(c,v[4],f),m=[];x(m,p,!1),x(m,g,!0),m.push(d,p,S,g),b(m,d),b(m,S),b(m,h),n.setItemLayout(f,{initBaseline:h[s],ends:m})}function y(I,_,T){var w=n.get(_,T),D=[];D[o]=I,D[s]=w;var L;return isNaN(I)||isNaN(w)?L=[NaN,NaN]:(L=a.dataToPoint(D),L[o]+=e),L}function x(I,_,T){var w=_.slice(),D=_.slice();w[o]+=i,D[o]-=i,T?I.push(w,D):I.push(D,w)}function b(I,_){var T=_.slice(),w=_.slice();T[o]-=i,w[o]+=i,I.push(T,w)}}function ap(r,e){e=e||{};for(var t=[],a=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<r.length;o++){var s=Oa(r[o].slice()),l=Ur(s,.25),u=Ur(s,.5),v=Ur(s,.75),f=s[0],c=s[s.length-1],h=(n==null?1.5:n)*(v-l),d=i?f:Math.max(f,l-h),p=i?c:Math.min(c,v+h),g=e.itemNameFormatter,S=ot(g)?g({value:o}):lt(g)?g.replace("{value}",o+""):o+"";t.push([S,d,l,u,v,p]);for(var m=0;m<s.length;m++){var y=s[m];if(y<d||y>p){var x=[S,y];a.push(x)}}}return{boxData:t,outliers:a}}var np={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==hs){var a="";et(a)}var n=ap(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function ip(r){r.registerSeriesModel(qs),r.registerChartView(qh),r.registerLayout(Jh),r.registerTransform(np)}var op=["itemStyle","borderColor"],sp=["itemStyle","borderColor0"],lp=["itemStyle","borderColorDoji"],up=["itemStyle","color"],vp=["itemStyle","color0"];function En(r,e){return e.get(r>0?up:vp)}function Rn(r,e){return e.get(r===0?lp:r>0?op:sp)}var fp={seriesType:"candlestick",plan:gn(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=En(s,o),l.stroke=Rn(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");$(u,l)}}}}}},cp=["color","borderColor"],hp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){Er(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(v){if(a.hasValue(v)){var f=a.getItemLayout(v);if(s&&$i(u,f))return;var c=fa(f,v,!0);Gt(c,{shape:{points:f.ends}},t,v),ca(c,a,v,o),i.add(c),a.setItemGraphicEl(v,c)}}).update(function(v,f){var c=n.getItemGraphicEl(f);if(!a.hasValue(v)){i.remove(c);return}var h=a.getItemLayout(v);if(s&&$i(u,h)){i.remove(c);return}c?(ht(c,{shape:{points:h.ends}},t,v),Te(c)):c=fa(h),ca(c,a,v,o),i.add(c),a.setItemGraphicEl(v,c)}).remove(function(v){var f=n.getItemGraphicEl(v);f&&i.remove(f)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),Wi(t,this.group);var a=t.get("clip",!0)?yn(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=fa(s);ca(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){Wi(a,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})(yt),pp=(function(){function r(){}return r})(),dp=(function(r){V(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new pp},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e})(gt);function fa(r,e,t){var a=r.ends;return new dp({shape:{points:t?gp(a,r):a},z2:100})}function $i(r,e){for(var t=!0,a=0;a<e.ends.length;a++)if(r.contain(e.ends[a][0],e.ends[a][1])){t=!1;break}return t}function ca(r,e,t,a){var n=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=a,Ut(r,n);var i=e.getItemLayout(t).sign;N(r.states,function(s,l){var u=n.getModel(l),v=En(i,u),f=Rn(i,u)||v,c=s.style||(s.style={});v&&(c.fill=v),f&&(c.stroke=f)});var o=n.getModel("emphasis");pt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function gp(r,e){return G(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var yp=(function(){function r(){}return r})(),ha=(function(r){V(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new yp},e.prototype.buildPath=function(t,a){for(var n=a.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e})(gt);function Wi(r,e,t,a){var n=r.getData(),i=n.getLayout("largePoints"),o=new ha({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new ha({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new ha({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),pa(1,o,r),pa(-1,s,r),pa(0,l,r),a&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function pa(r,e,t,a){var n=Rn(r,t)||En(r,t),i=t.getModel("itemStyle").getItemStyle(cp);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var js=(function(r){V(e,r);function e(){var t=r!==null&&r.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,a,n){var i=a.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e})(dt);we(js,Xs,!0);function mp(r){!r||!B(r.series)||N(r.series,function(e){mn(e)&&e.type==="k"&&(e.type="candlestick")})}var Sp={seriesType:"candlestick",plan:gn(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=bp(r,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=G(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],f=l[2],c=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:h};function h(p,g){for(var S,m=g.getStore();(S=p.next())!=null;){var y=m.get(s,S),x=m.get(u,S),b=m.get(v,S),I=m.get(f,S),_=m.get(c,S),T=Math.min(x,b),w=Math.max(x,b),D=R(T,y),L=R(w,y),C=R(I,y),A=R(_,y),M=[];k(M,L,0),k(M,D,1),M.push(U(A),U(L),U(C),U(D));var P=g.getItemModel(S),E=!!P.get(["itemStyle","borderColorDoji"]);g.setItemLayout(S,{sign:Zi(m,S,x,b,v,E),initBaseline:x>b?L[i]:D[i],ends:M,brushRect:z(I,_,y)})}function R(F,X){var j=[];return j[n]=X,j[i]=F,isNaN(X)||isNaN(F)?[NaN,NaN]:e.dataToPoint(j)}function k(F,X,j){var q=X.slice(),Q=X.slice();q[n]=$r(q[n]+a/2,1,!1),Q[n]=$r(Q[n]-a/2,1,!0),j?F.push(q,Q):F.push(Q,q)}function z(F,X,j){var q=R(F,j),Q=R(X,j);return q[n]-=a/2,Q[n]-=a/2,{x:q[0],y:q[1],width:a,height:Q[1]-q[1]}}function U(F){return F[n]=$r(F[n],1),F}}function d(p,g){for(var S=hu(p.count*4),m=0,y,x=[],b=[],I,_=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(I=p.next())!=null;){var w=_.get(s,I),D=_.get(u,I),L=_.get(v,I),C=_.get(f,I),A=_.get(c,I);if(isNaN(w)||isNaN(C)||isNaN(A)){S[m++]=NaN,m+=3;continue}S[m++]=Zi(_,I,D,L,v,T),x[n]=w,x[i]=C,y=e.dataToPoint(x,null,b),S[m++]=y?y[0]:NaN,S[m++]=y?y[1]:NaN,x[i]=A,y=e.dataToPoint(x,null,b),S[m++]=y?y[1]:NaN}g.setLayout("largePoints",S)}}};function Zi(r,e,t,a,n,i){var o;return t>a?o=-1:t<a?o=1:o=i?0:e>0?r.get(n,e-1)<=a?1:-1:1,o}function bp(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=Y(bt(r.get("barMaxWidth"),n),n),o=Y(bt(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?Y(s,n):Math.max(Math.min(n/2,i),o)}function xp(r){r.registerChartView(hp),r.registerSeriesModel(js),r.registerPreprocessor(mp),r.registerVisual(fp),r.registerLayout(Sp)}function Yi(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var Ip=(function(r){V(e,r);function e(t,a){var n=r.call(this)||this,i=new rs(t,a),o=new st;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=Dr(a,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}Yi(o,t)},e.prototype.updateEffectAnimation=function(t){for(var a=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(a[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Yi(n,t)},e.prototype.highlight=function(){ln(this)},e.prototype.downplay=function(){un(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,a){var n=this,i=t.hostModel;this.childAt(0).updateData(t,a);var o=this.childAt(1),s=t.getItemModel(a),l=t.getItemVisual(a,"symbol"),u=vn(t.getItemVisual(a,"symbolSize")),v=t.getItemVisual(a,"style"),f=v&&v.fill,c=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var h=fn(t.getItemVisual(a,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var d=t.getItemVisual(a,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=a/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=l,p.color=f,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&n.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=p,pt(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e})(st),_p=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Ar(Ip)},e.prototype.render=function(t,a,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,n=a&&a.getArea&&a.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,a,n){var i=t.getData();this.group.dirty();var o=Lr("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var a=t.coordinateSystem;a&&a.getRoamTransform&&(this.group.transform=pu(a.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(yt),wp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return Ie(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,a,n){return n.point(a.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})(dt);function Tp(r){r.registerChartView(_p),r.registerSeriesModel(wp),r.registerLayout(Lr("effectScatter"))}var Qs=(function(r){V(e,r);function e(t,a,n){var i=r.call(this)||this;return i.add(i.createLine(t,a,n)),i._updateEffectSymbol(t,a),i}return e.prototype.createLine=function(t,a,n){return new Pn(t,a,n)},e.prototype._updateEffectSymbol=function(t,a){var n=t.getItemModel(a),i=n.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");B(o)||(o=[o,o]);var l=t.getItemVisual(a,"style"),u=i.get("color")||l&&l.stroke,v=this.childAt(1);this._symbolType!==s&&(this.remove(v),v=Dr(s,-.5,-.5,1,1,u),v.z2=100,v.culling=!0,this.add(v)),v&&(v.setStyle("shadowColor",u),v.setStyle(i.getItemStyle(["color"])),v.scaleX=o[0],v.scaleY=o[1],v.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,a))},e.prototype._updateEffectAnimation=function(t,a,n){var i=this.childAt(1);if(i){var o=t.getItemLayout(n),s=a.get("period")*1e3,l=a.get("loop"),u=a.get("roundTrip"),v=a.get("constantSpeed"),f=Ot(a.get("delay"),function(h){return h/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),v>0&&(s=this._getLineLength(i)/v*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var c=void 0;ot(f)?c=f(n):c=f,i.__t>0&&(c=-s*i.__t),this._animateSymbol(i,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Ne(t.__p1,t.__cp1)+Ne(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=us,v=du;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var f=t.__t<1?v(a[0],i[0],n[0],o):v(n[0],i[0],a[0],1-o),c=t.__t<1?v(a[1],i[1],n[1],o):v(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(c,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Ne(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*Ne(a,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,a){this.childAt(0).updateLayout(t,a);var n=t.getItemModel(a).getModel("effect");this._updateEffectAnimation(t,n,a)},e})(st),Js=(function(r){V(e,r);function e(t,a,n){var i=r.call(this)||this;return i._createPolyline(t,a,n),i}return e.prototype._createPolyline=function(t,a,n){var i=t.getItemLayout(a),o=new pn({shape:{points:i}});this.add(o),this._updateCommonStl(t,a,n)},e.prototype.updateData=function(t,a,n){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(a)}};ht(o,s,i,a),this._updateCommonStl(t,a,n)},e.prototype._updateCommonStl=function(t,a,n){var i=this.childAt(0),o=t.getItemModel(a),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),v=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(a,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var c=i.ensureState("emphasis");c.style=s,pt(this,l,u,v)},e.prototype.updateLayout=function(t,a){var n=this.childAt(0);n.setShape("points",t.getItemLayout(a))},e})(st),Dp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,a,n){return new Js(t,a,n)},e.prototype._updateAnimationPoints=function(t,a){this._points=a;for(var n=[0],i=0,o=1;o<a.length;o++){var s=a[o-1],l=a[o];i+=Ne(s,l),n.push(i)}if(i===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var a=t.__t<1?t.__t:2-t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var s=this._lastFrame,l;if(a<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>a);l++);l=Math.min(l-1,o-2)}var v=(a-i[l])/(i[l+1]-i[l]),f=n[l],c=n[l+1];t.x=f[0]*(1-v)+v*c[0],t.y=f[1]*(1-v)+v*c[1];var h=t.__t<1?c[0]-f[0]:f[0]-c[0],d=t.__t<1?c[1]-f[1]:f[1]-c[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e})(Qs),Lp=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),Ap=(function(r){V(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}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 Lp},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o<n.length;){var s=n[o++];if(s>0){t.moveTo(n[o++],n[o++]);for(var l=1;l<s;l++)t.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],v=n[o++],f=n[o++],c=n[o++];if(t.moveTo(u,v),i>0){var h=(u+f)/2-(v-c)*i,d=(v+c)/2-(f-u)*i;t.quadraticCurveTo(h,d,f,c)}else t.lineTo(f,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u<i.length;){var v=i[u++];if(v>0)for(var f=i[u++],c=i[u++],h=1;h<v;h++){var d=i[u++],p=i[u++];if(ii(f,c,d,p,s,t,a))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],c=i[u++],d=i[u++],p=i[u++];if(o>0){var g=(f+d)/2-(c-p)*o,S=(c+p)/2-(d-f)*o;if(gu(f,c,g,S,d,p,s,t,a))return l}else if(ii(f,c,d,p,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<n.length;){var v=n[u++],f=n[u++];i=Math.min(v,i),s=Math.max(v,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new Nt(i,o,s,l)}return t},e})(gt),Cp=(function(){function r(){this.group=new st}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var a=this._newAdded[0],n=t.getLayout("linesPoints"),i=a&&a.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),a.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Ap({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,a){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=nt(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),tl={seriesType:"lines",plan:gn(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v<n.end;v++)u+=r.getLineCoordsCount(v);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,c=[],v=n.start;v<n.end;v++){var h=r.getLineCoords(v,o);t&&(s[f++]=h);for(var d=0;d<h;d++)c=e.dataToPoint(o[d],!1,c),s[f++]=c[0],s[f++]=c[1]}i.setLayout("linesPoints",s)}else for(var v=n.start;v<n.end;v++){var p=i.getItemModel(v),h=r.getLineCoords(v,o),g=[];if(t)for(var S=0;S<h;S++)g.push(e.dataToPoint(o[S]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=p.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])}i.setItemLayout(v,g)}}}}}},Mp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=n.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(v||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&yn(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=tl.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new Cp:new Nn(o?i?Dp:Js:i?Qs:Pn),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e})(yt),Pp=typeof Uint32Array=="undefined"?Array:Uint32Array,Np=typeof Float64Array=="undefined"?Array:Float64Array;function Xi(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=G(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),ps([n,t[0],t[1]])}))}var Ep=(function(r){V(e,r);function e(){var t=r!==null&&r.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||[],Xi(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Xi(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=ur(this._flatCoords,a.flatCoords),this._flatCoordsOffset=ur(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)a[o]=a[o]||[],a[o][0]=this._flatCoords[n+o*2],a[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)a[o]=a[o]||[],a[o][0]=s[o][0],a[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var a=0;if(this._flatCoords&&(a=this._flatCoords.length),Wt(t[0])){for(var n=t.length,i=new Pp(n),o=new Np(n),s=0,l=0,u=0,v=0;v<n;){u++;var f=t[v++];i[l++]=s+a,i[l++]=f;for(var c=0;c<f;c++){var h=t[v++],d=t[v++];o[s++]=h,o[s++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,a){var n=new Lt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),$t("nameValue",{name:v.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"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},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})(dt);function rr(r){return r instanceof Array||(r=[r,r]),r}var Rp={seriesType:"lines",reset:function(r){var e=rr(r.get("symbol")),t=rr(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=rr(s.getShallow("symbol",!0)),u=rr(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function Vp(r){r.registerChartView(Mp),r.registerSeriesModel(Ep),r.registerLayout(tl),r.registerVisual(Rp)}var kp=256,Op=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=oi.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,f=this.canvas,c=f.getContext("2d"),h=e.length;f.width=t,f.height=a;for(var d=0;d<h;++d){var p=e[d],g=p[0],S=p[1],m=p[2],y=n(m);c.globalAlpha=y,c.drawImage(s,g-v,S-v)}if(!f.width||!f.height)return f;for(var x=c.getImageData(0,0,f.width,f.height),b=x.data,I=0,_=b.length,T=this.minOpacity,w=this.maxOpacity,D=w-T;I<_;){var y=b[I+3]/256,L=Math.floor(y*(kp-1))*4;if(y>0){var C=o(y)?l:u;y>0&&(y=y*D+T),b[I++]=C[L],b[I++]=C[L+1],b[I++]=C[L+2],b[I++]=C[L+3]*y*256}else I+=4}return c.putImageData(x,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=oi.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r})();function Gp(r,e,t){var a=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s<n;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===n)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<n&&t[s]}}function zp(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(a){return a>=e[0]&&a<=e[1]}}function qi(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Bp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):qi(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(qi(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Er(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=Rr(s,"cartesian2d"),u,v,f,c;if(l){var h=s.getAxis("x"),d=s.getAxis("y");u=h.getBandWidth()+.5,v=d.getBandWidth()+.5,f=h.scale.getExtent(),c=d.scale.getExtent()}for(var p=this.group,g=t.getData(),S=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),b=zt(t),I=t.getModel("emphasis"),_=I.get("focus"),T=I.get("blurScope"),w=I.get("disabled"),D=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],L=n;L<i;L++){var C=void 0,A=g.getItemVisual(L,"style");if(l){var M=g.get(D[0],L),P=g.get(D[1],L);if(isNaN(g.get(D[2],L))||isNaN(M)||isNaN(P)||M<f[0]||M>f[1]||P<c[0]||P>c[1])continue;var E=s.dataToPoint([M,P]);C=new ee({shape:{x:E[0]-u/2,y:E[1]-v/2,width:u,height:v},style:A})}else{if(isNaN(g.get(D[1],L)))continue;C=new ee({z2:1,shape:s.dataToRect([g.get(D[0],L)]).contentShape,style:A})}if(g.hasItemOption){var R=g.getItemModel(L),k=R.getModel("emphasis");S=k.getModel("itemStyle").getItemStyle(),m=R.getModel(["blur","itemStyle"]).getItemStyle(),y=R.getModel(["select","itemStyle"]).getItemStyle(),x=R.get(["itemStyle","borderRadius"]),_=k.get("focus"),T=k.get("blurScope"),w=k.get("disabled"),b=zt(R)}C.shape.r=x;var z=t.getRawValue(L),U="-";z&&z[2]!=null&&(U=z[2]+""),te(C,b,{labelFetcher:t,labelDataIndex:L,defaultOpacity:A.opacity,defaultText:U}),C.ensureState("emphasis").style=S,C.ensureState("blur").style=m,C.ensureState("select").style=y,pt(C,_,T,w),C.incremental=o,o&&(C.states.emphasis.hoverLayer=!0),p.add(C),g.setItemGraphicEl(L,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new Op;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var v=t.getViewRect().clone(),f=t.getRoamTransform();v.applyTransform(f);var c=Math.max(v.x,0),h=Math.max(v.y,0),d=Math.min(v.width+v.x,i.getWidth()),p=Math.min(v.height+v.y,i.getHeight()),g=d-c,S=p-h,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],y=l.mapArray(m,function(_,T,w){var D=t.dataToPoint([_,T]);return D[0]-=c,D[1]-=h,D.push(w),D}),x=n.getExtent(),b=n.type==="visualMap.continuous"?zp(x,n.option.range):Gp(x,n.getPieceList(),n.option.selected);u.update(y,g,S,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var I=new Vr({style:{width:g,height:S,x:c,y:h,image:u.canvas},silent:!0});this.group.add(I)},e.type="heatmap",e})(yt),Fp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return Ie(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=vs.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})(dt);function Hp(r){r.registerChartView(Bp),r.registerSeriesModel(Fp)}var Up=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,f=u.boundaryGap;s.x=0,s.y=v.y+f[0];function c(g){return g.name}var h=new be(this._layersSeries||[],l,c,c),d=[];h.add(vt(p,this,"add")).update(vt(p,this,"update")).remove(vt(p,this,"remove")).execute();function p(g,S,m){var y=o._layers;if(g==="remove"){s.remove(y[S]);return}for(var x=[],b=[],I,_=l[S].indices,T=0;T<_.length;T++){var w=i.getItemLayout(_[T]),D=w.x,L=w.y0,C=w.y;x.push(D,L),b.push(D,L+C),I=i.getItemVisual(_[T],"style")}var A,M=i.getItemLayout(_[0]),P=t.getModel("label"),E=P.get("margin"),R=t.getModel("emphasis");if(g==="add"){var k=d[S]=new st;A=new yu({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),k.add(A),s.add(k),t.isAnimationEnabled()&&A.setClipPath($p(A.getBoundingRect(),t,function(){A.removeClipPath()}))}else{var k=y[m];A=k.childAt(0),s.add(k),d[S]=k,ht(A,{shape:{points:x,stackedOnPoints:b}},t),Te(A)}te(A,zt(t),{labelDataIndex:_[T-1],defaultText:i.getName(_[T-1]),inheritColor:I.fill},{normal:{verticalAlign:"middle"}}),A.setTextConfig({position:null,local:!0});var z=A.getTextContent();z&&(z.x=M.x-E,z.y=M.y0+M.y/2),A.useStyle(I),i.setItemGraphicEl(S,A),Ut(A,t),pt(A,R.get("focus"),R.get("blurScope"),R.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e})(yt);function $p(r,e,t){var a=new ee({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Gt(a,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),a}var da=2,Wp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new cn(vt(this.getData,this),vt(this.getRawData,this))},e.prototype.fixData=function(t){var a=t.length,n={},i=Va(t,function(c){return n.hasOwnProperty(c[0]+"")||(n[c[0]+""]=-1),c[2]}),o=[];i.buckets.each(function(c,h){o.push({name:h,dataList:c})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,v=0;v<o[l].dataList.length;++v){var f=o[l].dataList[v][0]+"";n[f]=l}for(var f in n)n.hasOwnProperty(f)&&n[f]!==l&&(n[f]=l,t[a]=[f,0,u],a++)}return t},e.prototype.getInitialData=function(t,a){for(var n=this.getReferringComponents("singleAxis",ds).models[0],i=n.get("type"),o=Dt(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=_t(),v=0,f=0;f<s.length;++f)l.push(s[f][da]),u.get(s[f][da])||(u.set(s[f][da],v),v++);var c=on(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:ka(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new Lt(c,this);return h.initData(s),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),a=t.count(),n=[],i=0;i<a;++i)n[i]=i;var o=t.mapDimension("single"),s=Va(n,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,v){u.sort(function(f,c){return t.get(o,f)-t.get(o,c)}),l.push({name:v,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,a,n){B(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,v=0;v<l;++v){for(var f=Number.MAX_VALUE,c=-1,h=o[v].indices.length,d=0;d<h;++d){var p=i.get(t[0],o[v].indices[d]),g=Math.abs(p-a);g<=f&&(u=p,f=g,c=o[v].indices[d])}s.push(c)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return $t("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})(dt);function Zp(r,e){r.eachSeriesByType("themeRiver",function(t){var a=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var s=t.get("boundaryGap"),l=n.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=Y(s[0],o.height),s[1]=Y(s[1],o.height);var u=o.height-s[0]-s[1];Ki(a,t,u)}else{s[0]=Y(s[0],o.width),s[1]=Y(s[1],o.width);var v=o.width-s[0]-s[1];Ki(a,t,v)}a.setLayout("layoutInfo",i)})}function Ki(r,e,t){if(r.count())for(var a=e.coordinateSystem,n=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=G(n,function(g){return G(g.indices,function(S){var m=a.dataToPoint(r.get(i,S));return m[1]=r.get(o,S),m})}),l=Yp(s),u=l.y0,v=t/l.max,f=n.length,c=n[0].indices.length,h,d=0;d<c;++d){h=u[d]*v,r.setItemLayout(n[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:h,y:s[0][d][1]*v});for(var p=1;p<f;++p)h+=s[p-1][d][1]*v,r.setItemLayout(n[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:h,y:s[p][d][1]*v})}}function Yp(r){for(var e=r.length,t=r[0].length,a=[],n=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),a.push(s)}for(var u=0;u<t;++u)n[u]=(i-a[u])/2;i=0;for(var v=0;v<t;++v){var f=a[v]+n[v];f>i&&(i=f)}return{y0:n,max:i}}function Xp(r){r.registerChartView(Up),r.registerSeriesModel(Wp),r.registerLayout(Zp),r.registerProcessor(dn("themeRiver"))}var qp=2,Kp=4,ji=(function(r){V(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=qp,o.textConfig={inside:!0},nt(o).seriesIndex=a.seriesIndex;var s=new Pr({z2:Kp,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;nt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),v=a.getLayout(),f=$({},v);f.label=null;var c=a.getVisual("style");c.lineJoin="bevel";var h=a.getVisual("decal");h&&(c.decal=gs(h,o));var d=si(l.getModel("itemStyle"),f,!0);$(f,d),N(Ra,function(m){var y=s.ensureState(m),x=l.getModel([m,"itemStyle"]);y.style=x.getItemStyle();var b=si(x,f);b&&(y.shape=b)}),t?(s.setShape(f),s.shape.r=v.r0,Gt(s,{shape:{r:v.r}},n,a.dataIndex)):(ht(s,{shape:f},n),Te(s)),s.useStyle(c),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),S=g==="relative"?ur(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;pt(this,S,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),v=Math.sin(l),f=this,c=f.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)<d);c.ignore=!p,N(Su,function(S){var m=S==="normal"?n.getModel("label"):n.getModel([S,"label"]),y=S==="normal",x=y?c:c.ensureState(S),b=t.getFormattedLabel(h,S);y&&(b=b||a.node.name),x.style=Be(m,{},null,S!=="normal",!0),b&&(x.style.text=b);var I=m.get("show");I!=null&&!y&&(x.ignore=!I);var _=g(m,"position"),T=y?f:f.states[S],w=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?w:null,inside:_!=="outside"};var D,L=g(m,"distance")||0,C=g(m,"align"),A=g(m,"rotate"),M=Math.PI*.5,P=Math.PI*1.5,E=Pe(A==="tangential"?Math.PI/2-l:l),R=E>M&&!mu(E-M)&&E<P;_==="outside"?(D=o.r+L,C=R?"right":"left"):!C||C==="center"?(s===2*Math.PI&&o.r0===0?D=0:D=(o.r+o.r0)/2,C="center"):C==="left"?(D=o.r0+L,C=R?"right":"left"):C==="right"&&(D=o.r-L,C=R?"left":"right"),x.style.align=C,x.style.verticalAlign=g(m,"verticalAlign")||"middle",x.x=D*u+o.cx,x.y=D*v+o.cy;var k=0;A==="radial"?k=Pe(-l)+(R?Math.PI:0):A==="tangential"?k=Pe(Math.PI/2-l)+(R?Math.PI:0):Wt(A)&&(k=A*Math.PI/180),x.rotation=Pe(k)});function g(S,m){var y=S.get(m);return y==null?i.get(m):y}c.dirtyStyle()},e})(Ga),Wa="sunburstRootToNode",Qi="sunburstHighlight",jp="sunburstUnhighlight";function Qp(r){r.registerAction({type:Wa,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(n,i){var o=He(e,[Wa],n);if(o){var s=n.getViewRoot();s&&(e.direction=Dn(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),r.registerAction({type:Qi,update:"none"},function(e,t,a){e=$({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=He(e,[Qi],i);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction($(e,{type:"highlight"}))}),r.registerAction({type:jp,update:"updateView"},function(e,t,a){e=$({},e),a.dispatchAction($(e,{type:"downplay"}))})}var Jp=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=a;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,f=t.get("renderLabelForZeroData"),c=[];u.eachNode(function(m){c.push(m)});var h=this._oldChildren||[];d(c,h),S(l,u),this._initEvents(),this._oldChildren=c;function d(m,y){if(m.length===0&&y.length===0)return;new be(y,m,x,x).add(b).update(b).remove(rt(b,null)).execute();function x(I){return I.getId()}function b(I,_){var T=I==null?null:m[I],w=_==null?null:y[_];p(T,w)}}function p(m,y){if(!f&&m&&!m.getValue()&&(m=null),m!==l&&y!==l){if(y&&y.piece)m?(y.piece.updateData(!1,m,t,a,n),s.setItemGraphicEl(m.dataIndex,y.piece)):g(y);else if(m){var x=new ji(m,t,a,n);v.add(x),s.setItemGraphicEl(m.dataIndex,x)}}}function g(m){m&&m.piece&&(v.remove(m.piece),m.piece=null)}function S(m,y){y.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new ji(m,t,a,n),v.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(y.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var v=l.get("target",!0)||"_blank";is(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Wa,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e})(yt),td=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};el(n);var i=this._levelModels=G(t.levels||[],function(l){return new Jt(l,this,a)},this),o=Tn.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var f=o.getNodeByDataIndex(v),c=i[f.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=zr(n,this),a},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 a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){Ms(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})(dt);function el(r){var e=0;N(r.children,function(a){el(a);var n=a.value;B(n)&&(n=n[0]),e+=n});var t=r.value;B(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),B(r.value)?r.value[0]=t:r.value=t}var Ji=Math.PI/180;function ed(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");B(i)||(i=[0,i]),B(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=Y(n[0],o),v=Y(n[1],s),f=Y(i[0],l/2),c=Y(i[1],l/2),h=-a.get("startAngle")*Ji,d=a.get("minAngle")*Ji,p=a.getData().tree.root,g=a.getViewRoot(),S=g.depth,m=a.get("sort");m!=null&&rl(g,m);var y=0;N(g.children,function(E){!isNaN(E.getValue())&&y++});var x=g.getValue(),b=Math.PI/(x||y)*2,I=g.depth>0,_=g.height-(I?-1:1),T=(c-f)/(_||1),w=a.get("clockwise"),D=a.get("stillShowZeroSum"),L=w?1:-1,C=function(E,R){if(E){var k=R;if(E!==p){var z=E.getValue(),U=x===0&&D?b:z*b;U<d&&(U=d),k=R+L*U;var F=E.depth-S-(I?-1:1),X=f+T*F,j=f+T*(F+1),q=a.getLevelModel(E);if(q){var Q=q.get("r0",!0),mt=q.get("r",!0),Rt=q.get("radius",!0);Rt!=null&&(Q=Rt[0],mt=Rt[1]),Q!=null&&(X=Y(Q,l/2)),mt!=null&&(j=Y(mt,l/2))}E.setLayout({angle:U,startAngle:R,endAngle:k,clockwise:w,cx:u,cy:v,r0:X,r:j})}if(E.children&&E.children.length){var H=0;N(E.children,function(O){H+=C(O,R+H)})}return k-R}};if(I){var A=f,M=f+T,P=Math.PI*2;p.setLayout({angle:P,startAngle:h,endAngle:h+P,clockwise:w,cx:u,cy:v,r0:A,r:M})}C(g,h)})}function rl(r,e){var t=r.children||[];r.children=rd(t,e),t.length&&N(r.children,function(a){rl(a,e)})}function rd(r,e){if(ot(e)){var t=G(r,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(n,i){return e(n.params,i.params)}),G(t,function(n){return r[n.index]})}else{var a=e==="asc";return r.sort(function(n,i){var o=(n.getValue()-i.getValue())*(a?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(a?-1:1):o})}}function ad(r){var e={};function t(a,n,i){for(var o=a;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&lt(s)&&(s=bu(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");$(u,l)})})}function nd(r){r.registerChartView(Jp),r.registerSeriesModel(td),r.registerLayout(rt(ed,"sunburst")),r.registerProcessor(rt(dn,"sunburst")),r.registerVisual(ad),Qp(r)}var to={color:"fill",borderColor:"stroke"},id={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ft=Ct(),od=(function(r){V(e,r);function e(){var t=r!==null&&r.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,a){return Ie(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=Ft(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(dt);function sd(r,e){return e=e||[0,0],G(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function ld(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:vt(sd,r)}}}function ud(r,e){return e=e||[0,0],G([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function vd(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:vt(ud,r)}}}function fd(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function cd(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:vt(fd,r)}}}function hd(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function pd(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:vt(hd,r)}}}function dd(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}var Ht="emphasis",Kt="normal",Vn="blur",kn="select",ae=[Kt,Ht,Vn,kn],ga={normal:["itemStyle"],emphasis:[Ht,"itemStyle"],blur:[Vn,"itemStyle"],select:[kn,"itemStyle"]},ya={normal:["label"],emphasis:[Ht,"label"],blur:[Vn,"label"],select:[kn,"label"]},gd=["x","y"],yd="e\0\0",wt={normal:{},emphasis:{},blur:{},select:{}},md={cartesian2d:ld,geo:vd,single:cd,polar:pd,calendar:dd};function Za(r){return r instanceof gt}function Ya(r){return r instanceof sn}function Sd(r,e){e.copyTransform(r),Ya(e)&&Ya(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,Za(e)&&Za(r)&&e.setShape(r.shape))}var bd=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=eo(t,s,a,n);o||l.removeAll(),s.diff(o).add(function(f){ma(n,null,f,u(f,i),t,l,s)}).remove(function(f){var c=o.getItemGraphicEl(f);c&&Sn(c,Ft(c).option,t)}).update(function(f,c){var h=o.getItemGraphicEl(c);ma(n,h,f,u(f,i),t,l,s)}).execute();var v=t.get("clip",!0)?yn(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,a,n,i,o){var s=a.getData(),l=eo(a,s,n,i),u=this._progressiveEls=[];function v(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var c=ma(null,null,f,l(f,o),a,this.group,s);c&&(c.traverse(v),u.push(c))}},e.prototype.eachRendered=function(t){Er(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,a,n,i){var o=a.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e})(yt);function On(r){var e=r.type,t;if(e==="path"){var a=r.shape,n=a.width!=null&&a.height!=null?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,i=il(a);t=_u(i,null,n,a.layout||"center"),Ft(t).customPathData=i}else if(e==="image")t=new Vr({}),Ft(t).customImagePath=r.style.image;else if(e==="text")t=new Pr({});else if(e==="group")t=new st;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=wu(e);if(!o){var s="";et(s)}t=new o}return Ft(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Gn(r,e,t,a,n,i,o){Tu(e);var s=n&&n.normal.cfg;s&&e.setTextConfig(s),a&&a.transition==null&&(a.transition=gd);var l=a&&a.style;if(l){if(e.type==="text"){var u=l;Pt(u,"textFill")&&(u.fill=u.textFill),Pt(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,f=Za(e)?l.decal:null;r&&f&&(f.dirty=!0,v=gs(f,r)),l.__decalPattern=v}if(Ya(e)&&l){var v=l.__decalPattern;v&&(l.decal=v)}Du(e,a,i,{dataIndex:t,isInit:o,clearStyle:!0}),Lu(e,a.keyframeAnimation,i)}function al(r,e,t,a,n){var i=e.isGroup?null:e,o=n&&n[r].cfg;if(i){var s=i.ensureState(r);if(a===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),vr(i)}}function xd(r,e,t){if(!r.isGroup){var a=r,n=t.currentZ,i=t.currentZLevel;a.z=n,a.zlevel=i;var o=e.z2;o!=null&&(a.z2=o||0);for(var s=0;s<ae.length;s++)Id(a,e,ae[s])}}function Id(r,e,t){var a=t===Kt,n=a?e:yr(e,t),i=n?n.z2:null,o;i!=null&&(o=a?r:r.ensureState(t),o.z2=i||0)}function eo(r,e,t,a){var n=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):md[i.type](i));for(var s=xt({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:x,style:I,ordinalRawValue:b,styleEmphasis:_,visual:D,barLayout:L,currentSeriesIndices:C,font:A},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:_d(r.getData())},u,v,f={},c={},h={},d={},p=0;p<ae.length;p++){var g=ae[p];h[g]=r.getModel(ga[g]),d[g]=r.getModel(ya[g])}function S(M){return M===u?v||(v=e.getItemModel(M)):e.getItemModel(M)}function m(M,P){return e.hasItemOption?M===u?f[P]||(f[P]=S(M).getModel(ga[P])):S(M).getModel(ga[P]):h[P]}function y(M,P){return e.hasItemOption?M===u?c[P]||(c[P]=S(M).getModel(ya[P])):S(M).getModel(ya[P]):d[P]}return function(M,P){return u=M,v=null,f={},c={},n&&n(xt({dataIndexInside:M,dataIndex:e.getRawIndex(M),actionType:P?P.type:null},l),s)};function x(M,P){return P==null&&(P=u),e.getStore().get(e.getDimensionIndex(M||0),P)}function b(M,P){P==null&&(P=u),M=M||0;var E=e.getDimensionInfo(M);if(!E){var R=e.getDimensionIndex(M);return R>=0?e.getStore().get(R,P):void 0}var k=e.get(E.name,P),z=E&&E.ordinalMeta;return z?z.categories[k]:k}function I(M,P){P==null&&(P=u);var E=e.getItemVisual(P,"style"),R=E&&E.fill,k=E&&E.opacity,z=m(P,Kt).getItemStyle();R!=null&&(z.fill=R),k!=null&&(z.opacity=k);var U={inheritColor:lt(R)?R:"#000"},F=y(P,Kt),X=Be(F,null,U,!1,!0);X.text=F.getShallow("show")?bt(r.getFormattedLabel(P,Kt),li(e,P)):null;var j=ui(F,U,!1);return w(M,z),z=vi(z,X,j),M&&T(z,M),z.legacy=!0,z}function _(M,P){P==null&&(P=u);var E=m(P,Ht).getItemStyle(),R=y(P,Ht),k=Be(R,null,null,!0,!0);k.text=R.getShallow("show")?qe(r.getFormattedLabel(P,Ht),r.getFormattedLabel(P,Kt),li(e,P)):null;var z=ui(R,null,!0);return w(M,E),E=vi(E,k,z),M&&T(E,M),E.legacy=!0,E}function T(M,P){for(var E in P)Pt(P,E)&&(M[E]=P[E])}function w(M,P){M&&(M.textFill&&(P.textFill=M.textFill),M.textPosition&&(P.textPosition=M.textPosition))}function D(M,P){if(P==null&&(P=u),Pt(to,M)){var E=e.getItemVisual(P,"style");return E?E[to[M]]:null}if(Pt(id,M))return e.getItemVisual(P,M)}function L(M){if(i.type==="cartesian2d"){var P=i.getBaseAxis();return xu(xt({axis:P},M))}}function C(){return t.getCurrentSeriesIndices()}function A(M){return Iu(M,t)}}function _d(r){var e={};return N(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function ma(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=zn(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&pt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function zn(r,e,t,a,n,i){var o=-1,s=e;e&&nl(e,a,n)&&(o=Et(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=On(a),s&&Sd(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),wt.normal.cfg=wt.normal.conOpt=wt.emphasis.cfg=wt.emphasis.conOpt=wt.blur.cfg=wt.blur.conOpt=wt.select.cfg=wt.select.conOpt=null,wt.isLegacy=!1,Td(u,t,a,n,l,wt),wd(u,t,a,n,l),Gn(r,u,t,a,wt,n,l),Pt(a,"info")&&(Ft(u).info=a.info);for(var v=0;v<ae.length;v++){var f=ae[v];if(f!==Kt){var c=yr(a,f),h=Bn(a,c,f);al(f,u,c,h,wt)}}return xd(u,a,n),a.type==="group"&&Dd(r,u,t,a,n),o>=0?i.replaceAt(u,o):i.add(u),u}function nl(r,e,t){var a=Ft(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&Md(i)&&il(i)!==a.customPathData||n==="image"&&Pt(o,"image")&&o.image!==a.customImagePath}function wd(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&nl(o,i,a)&&(o=null),o||(o=On(i),r.setClipPath(o)),Gn(null,o,e,i,null,a,n)}}function Td(r,e,t,a,n,i){if(!r.isGroup){ro(t,null,i),ro(t,Ht,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var v=r.getTextContent();if(o===!1)v&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=On(o),r.setTextContent(v)),Gn(null,v,e,o,null,a,n);for(var f=o&&o.style,c=0;c<ae.length;c++){var h=ae[c];if(h!==Kt){var d=i[h].conOpt;al(h,v,d,Bn(o,d,h),null)}}f?v.dirty():v.markRedraw()}}}}function ro(r,e,t){var a=e?yr(r,e):r,n=e?Bn(r,a,Ht):r.style,i=r.type,o=a?a.textConfig:null,s=r.textContent,l=s?e?yr(s,e):s:null;if(n&&(t.isLegacy||Au(n,i,!!o,!!l))){t.isLegacy=!0;var u=Cu(n,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var v=l;!v.type&&(v.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function yr(r,e){return e?r?r[e]:null:r}function Bn(r,e,t){var a=e&&e.style;return a==null&&t===Ht&&r&&(a=r.styleEmphasis),a}function Dd(r,e,t,a,n){var i=a.children,o=i?i.length:0,s=a.$mergeChildren,l=s==="byName"||a.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Ad({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++){var f=i[v],c=e.childAt(v);f?(f.ignore==null&&(f.ignore=!1),zn(r,c,t,f,n,e)):c.ignore=!0}for(var h=e.childCount()-1;h>=v;h--){var d=e.childAt(h);Ld(e,d,n)}}}function Ld(r,e,t){e&&Sn(e,Ft(r).option,t)}function Ad(r){new be(r.oldChildren,r.newChildren,ao,ao,r).add(no).update(no).remove(Cd).execute()}function ao(r,e){var t=r&&r.name;return t!=null?t:yd+e}function no(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;zn(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function Cd(r){var e=this.context,t=e.oldChildren[r];t&&Sn(t,Ft(t).option,e.seriesModel)}function il(r){return r&&(r.pathData||r.d)}function Md(r){return r&&(Pt(r,"pathData")||Pt(r,"d"))}function Pd(r){r.registerChartView(bd),r.registerSeriesModel(od)}function Xa(r,e){e=e||{};var t=r.coordinateSystem,a=r.axis,n={},i=a.position,o=a.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var f={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=f[i],r.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Ot(e.labelInside,r.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var c=e.rotate;return c==null&&(c=r.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-c:c,n.z2=1,n}var Nd=["axisLine","axisTickLabel","axisName"],Ed=["splitArea","splitLine"],Rd=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,a,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new st;var l=Xa(t),u=new Mu(t,l);N(Nd,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),N(Ed,function(v){t.get([v,"show"])&&Vd[v](this,this.group,this._axisGroup,t)},this),Pu(s,this._axisGroup,t),r.prototype.render.call(this,t,a,n,i)},e.prototype.remove=function(){Nu(this)},e.type="singleAxis",e})(ys),Vd={splitLine:function(r,e,t,a){var n=a.axis;if(!n.scale.isBlank()){var i=a.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=a.coordinateSystem.getRect(),v=n.isHorizontal(),f=[],c=0,h=n.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g<h.length;++g){var S=n.toGlobalCoord(h[g].coord);v?(d[0]=S,d[1]=u.y,p[0]=S,p[1]=u.y+u.height):(d[0]=u.x,d[1]=S,p[0]=u.x+u.width,p[1]=S);var m=new ls({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});Ru(m.shape,l);var y=c++%s.length;f[y]=f[y]||[],f[y].push(m)}for(var x=o.getLineStyle(["color"]),g=0;g<f.length;++g)e.add(Vu(f[g],{style:xt({stroke:s[g%s.length]},x),silent:!0}))}},splitArea:function(r,e,t,a){Eu(r,t,a,a)}},lr=(function(r){V(e,r);function e(){var t=r!==null&&r.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})(kr);we(lr,ku.prototype);var kd=(function(r){V(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,a){return this.coordinateSystem.pointToData(t)[0]},e})(Ou),ol=["single"],Od=(function(){function r(e,t,a){this.type="single",this.dimension="single",this.dimensions=ol,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=this.dimension,i=new kd(n,Gu(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(a){if(a.coordinateSystem===this){var n=a.getData();N(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),zu(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=_e({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()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,a=t.isHorizontal(),n=a?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),this._updateAxisTransform(t,a?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var a=e.getExtent(),n=a[0]+a[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return n-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return n-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),a=this.getAxis(),n=a.orient;return n==="horizontal"?a.contain(a.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=io(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=io(t);return n===this?this.pointToData(a):null},r})();function io(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Gd(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new Od(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",ds).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var zd={create:Gd,dimensions:ol},oo=["x","y"],Bd=["width","height"],Fd=(function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=Sa(l,1-mr(s)),v=l.dataToPoint(a)[0],f=i.get("type");if(f&&f!=="none"){var c=Bu(i),h=Hd[f](s,v,u);h.style=c,t.graphicKey=h.type,t.pointer=h}var d=Xa(n);Fu(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Xa(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Hu(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=mr(o),u=Sa(s,l),v=[t.x,t.y];v[l]+=a[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var f=Sa(s,1-l),c=(f[1]+f[0])/2,h=[c,c];return h[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e})(Uu),Hd={line:function(r,e,t){var a=Wu([e,t[0]],[e,t[1]],mr(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:$u([e-a/2,t[0]],[a,n],mr(r))}}};function mr(r){return r.isHorizontal()?0:1}function Sa(r,e){var t=r.getRect();return[t[oo[e]],t[oo[e]]+t[Bd[e]]]}var Ud=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(Or);function $d(r){W(ms),ys.registerAxisPointerClass("SingleAxisPointer",Fd),r.registerComponentView(Ud),r.registerComponentView(Rd),r.registerComponentModel(lr),Zu(r,"single",lr,lr.defaultOption),r.registerCoordinateSystem("single",zd)}var Wd=["rect","polygon","keep","clear"];function Zd(r,e){var t=Bt(r?r.brush:[]);if(t.length){var a=[];N(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;B(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Yd(s),e&&!s.length&&s.push.apply(s,Wd)}}function Yd(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,a){r.push(a)})}function Xd(r){var e=r.brushType,t={point:function(a){return so[e].point(a,t,r)},rect:function(a){return so[e].rect(a,t,r)}};return t}var so={lineX:lo(0),lineY:lo(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Le(t.range,r[0],r[1])},rect:function(r,e,t){var a=t.range;if(!r||a.length<=1)return!1;var n=r.x,i=r.y,o=r.width,s=r.height,l=a[0];if(Le(a,n,i)||Le(a,n+o,i)||Le(a,n,i+s)||Le(a,n+o,i+s)||Nt.create(r).contain(l[0],l[1])||Qe(n,i,n+o,i,a)||Qe(n,i,n,i+s,a)||Qe(n+o,i,n+o,i+s,a)||Qe(n,i+s,n+o,i+s,a))return!0}}};function lo(r){var e=["x","y"],t=["width","height"];return{point:function(a,n,i){if(a){var o=i.range,s=a[r];return Me(s,o)}},rect:function(a,n,i){if(a){var o=i.range,s=[a[e[r]],a[e[r]]+a[t[r]]];return s[1]<s[0]&&s.reverse(),Me(s[0],o)||Me(s[1],o)||Me(o[0],s)||Me(o[1],s)}}}}function Me(r,e){return e[0]<=r&&r<=e[1]}var uo=["inBrush","outOfBrush"],ba="__ecBrushSelect",qa="__ecInBrushSelectEvent";function sl(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new qu(e.option,r);t.setInputRanges(e.areas,r)})}function qd(r,e,t){var a=[],n,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),sl(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:xe(o.areas),selected:[]};a.push(l);var u=o.option,v=u.brushLink,f=[],c=[],h=[],d=!1;s||(n=u.throttleType,i=u.throttleDelay);var p=G(o.areas,function(b){var I=Jd[b.brushType],_=xt({boundingRect:I?I(b):void 0},b);return _.selectors=Xd(_),_}),g=Yu(o.option,uo,function(b){b.mappingMethod="fixed"});B(v)&&N(v,function(b){f[b]=1});function S(b){return v==="all"||!!f[b]}function m(b){return!!b.length}r.eachSeries(function(b,I){var _=h[I]=[];b.subType==="parallel"?y(b,I):x(b,I,_)});function y(b,I){var _=b.coordinateSystem;d=d||_.hasAxisBrushed(),S(I)&&_.eachActiveState(b.getData(),function(T,w){T==="active"&&(c[w]=1)})}function x(b,I,_){if(!(!b.brushSelector||Qd(o,I))&&(N(p,function(w){o.brushTargetManager.controlSeries(w,b,r)&&_.push(w),d=d||m(_)}),S(I)&&m(_))){var T=b.getData();T.each(function(w){vo(b,_,T,w)&&(c[w]=1)})}}r.eachSeries(function(b,I){var _={seriesId:b.id,seriesIndex:I,seriesName:b.name,dataIndex:[]};l.selected.push(_);var T=h[I],w=b.getData(),D=S(I)?function(L){return c[L]?(_.dataIndex.push(w.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return vo(b,T,w,L)?(_.dataIndex.push(w.getRawIndex(L)),"inBrush"):"outOfBrush"};(S(I)?d:m(T))&&Xu(uo,g,w,D)})}),Kd(e,n,i,a,t)}function Kd(r,e,t,a,n){if(n){var i=r.getZr();if(!i[qa]){i[ba]||(i[ba]=jd);var o=Ku(i,ba,t,e);o(r,a)}}}function jd(r,e){if(!r.isDisposed()){var t=r.getZr();t[qa]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[qa]=!1}}function vo(r,e,t,a){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(r.brushSelector(a,t,o.selectors,o))return!0}}function Qd(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(B(t)?Et(t,e)<0:e!==t)}var Jd={rect:function(r){return fo(r.range)},polygon:function(r){for(var e,t=r.range,a=0,n=t.length;a<n;a++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[a];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&fo(e)}};function fo(r){return new Nt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var tg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new ju(a.getZr())).on("brush",vt(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){sl(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:xe(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:xe(n),$from:a})},e.type="brush",e})(Or),eg="#ddd",rg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&Qu(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:eg},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=G(t,function(a){return co(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=co(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})(kr);function co(r,e){return za({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Jt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var ag=["rect","polygon","lineX","lineY","keep","clear"],ng=(function(r){V(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,N(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return N(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:ag.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 a},e})(Ju);function ig(r){r.registerComponentView(tg),r.registerComponentModel(rg),r.registerPreprocessor(Zd),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,qd),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Se),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Se),tv("brush",ng)}function Fn(r,e){if(!r)return!1;for(var t=B(r)?r:[r],a=0;a<t.length;a++)if(t[a]&&t[a][e])return!0;return!1}function ar(r){hn(r,"label",["show"])}var nr=Ct(),Zt=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(ev.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,a){this._mergeOption(t,a,!1,!1)},e.prototype._mergeOption=function(t,a,n,i){var o=this.mainType;n||a.eachSeries(function(s){var l=s.get(this.mainType,!0),u=nr(s)[o];if(!l||!l.data){nr(s)[o]=null;return}u?u._mergeOption(l,a,!0):(i&&ar(l),N(l.data,function(v){v instanceof Array?(ar(v[0]),ar(v[1])):ar(v)}),u=this.createMarkerModelFromSeries(l,this,a),$(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),nr(s)[o]=u},this)},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return $t("section",{header:this.name,blocks:[$t("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,a){var n=Ss.prototype.getDataParams.call(this,t,a),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(t,a){return nr(t)[a]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(kr);we(Zt,Ss.prototype);var og=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(Zt);function Ka(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function sg(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function ir(r,e,t,a,n,i){var o=[],s=rv(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=Hn(e,l,r),v=e.indicesOfNearest(l,u)[0];o[n]=e.get(t,v),o[i]=e.get(l,v);var f=e.get(a,v),c=av(e.get(a,v));return c=Math.min(c,20),c>=0&&(o[i]=+o[i].toFixed(c)),[o,f]}var xa={min:rt(ir,"min"),max:rt(ir,"max"),average:rt(ir,"average"),median:rt(ir,"median")};function We(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!sg(e)&&!B(e.coord)&&B(n)){var i=ll(e,t,a,r);if(e=xe(e),e.type&&xa[e.type]&&i.baseAxis&&i.valueAxis){var o=Et(n,i.baseAxis.dim),s=Et(n,i.valueAxis.dim),l=xa[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!B(n))e.coord=[];else for(var u=e.coord,v=0;v<2;v++)xa[u[v]]&&(u[v]=Hn(t,t.mapDimension(n[v]),u[v]));return e}}function ll(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(lg(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function lg(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Ze(r,e){return r&&r.containData&&e.coord&&!Ka(e)?r.containData(e.coord):!0}function ug(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Ka(e)&&!Ka(t)?r.containZone(e.coord,t.coord):!0}function ul(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return cr(o,e[i])}:function(t,a,n,i){return cr(t.value,e[i])}}function Hn(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Ia=Ct(),Un=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=_t()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Ia(s).keep=!1}),a.eachSeries(function(s){var l=Zt.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Ia(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Ia(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;N(t,function(i){var o=Zt.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?nv(l):iv(l))})}})},e.type="marker",e})(Or);function ho(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=Y(i.get("x"),t.getWidth()),l=Y(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),v=r.get(a.dimensions[1],n);o=a.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var vg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Zt.getMarkerModelFromSeries(i,"markPoint");o&&(ho(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Ar),f=fg(o,t,a);a.setData(f),ho(a.getData(),t,i),f.each(function(c){var h=f.getItemModel(c),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),S=h.getShallow("symbolOffset"),m=h.getShallow("symbolKeepAspect");if(ot(d)||ot(p)||ot(g)||ot(S)){var y=a.getRawValue(c),x=a.getDataParams(c);ot(d)&&(d=d(y,x)),ot(p)&&(p=p(y,x)),ot(g)&&(g=g(y,x)),ot(S)&&(S=S(y,x))}var b=h.getModel("itemStyle").getItemStyle(),I=bn(l,"color");b.fill||(b.fill=I),f.setItemVisual(c,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:S,symbolKeepAspect:m,style:b})}),v.updateData(f),this.group.add(v.group),f.eachItemGraphicEl(function(c){c.traverse(function(h){nt(h).dataModel=a})}),this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e})(Un);function fg(r,e,t){var a;r?a=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return $($({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Lt(a,t),i=G(t.get("data"),rt(We,e));r&&(i=Dt(i,rt(Ze,r)));var o=ul(!!r,a);return n.initData(i,null,o),n}function cg(r){r.registerComponentModel(og),r.registerComponentView(vg),r.registerPreprocessor(function(e){Fn(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var hg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(Zt),or=Ct(),pg=function(r,e,t,a){var n=r.getData(),i;if(B(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Ot(a.yAxis,a.xAxis);else{var u=ll(a,n,e,r);s=u.valueAxis;var v=ov(n,u.valueDataDim);l=Hn(n,v,o)}var f=s.dim==="x"?0:1,c=1-f,h=xe(a),d={coord:[]};h.type=null,h.coord=[],h.coord[c]=-1/0,d.coord[c]=1/0;var p=t.get("precision");p>=0&&Wt(l)&&(l=+l.toFixed(Math.min(p,20))),h.coord[f]=d.coord[f]=l,i=[h,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[We(r,i[0]),We(r,i[1]),$({},i[2])];return g[2].type=g[2].type||null,za(g[2],g[0]),za(g[2],g[1]),g};function Sr(r){return!isNaN(r)&&!isFinite(r)}function po(r,e,t,a){var n=1-r,i=a.dimensions[r];return Sr(e[n])&&Sr(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function dg(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(po(1,t,a,r)||po(0,t,a,r)))return!0}return Ze(r,e[0])&&Ze(r,e[1])}function _a(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=Y(o.get("x"),n.getWidth()),u=Y(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var v=i.dimensions,f=r.get(v[0],e),c=r.get(v[1],e);s=i.dataToPoint([f,c])}if(Rr(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;Sr(r.get(v[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):Sr(r.get(v[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var gg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Zt.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=or(o).from,u=or(o).to;l.each(function(v){_a(l,v,!0,i,n),_a(u,v,!1,i,n)}),s.each(function(v){s.setItemLayout(v,[l.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Nn);this.group.add(v.group);var f=yg(o,t,a),c=f.from,h=f.to,d=f.line;or(a).from=c,or(a).to=h,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),S=a.get("symbolRotate"),m=a.get("symbolOffset");B(p)||(p=[p,p]),B(g)||(g=[g,g]),B(S)||(S=[S,S]),B(m)||(m=[m,m]),f.from.each(function(x){y(c,x,!0),y(h,x,!1)}),d.each(function(x){var b=d.getItemModel(x).getModel("lineStyle").getLineStyle();d.setItemLayout(x,[c.getItemLayout(x),h.getItemLayout(x)]),b.stroke==null&&(b.stroke=c.getItemVisual(x,"style").fill),d.setItemVisual(x,{fromSymbolKeepAspect:c.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(x,"symbolOffset"),fromSymbolRotate:c.getItemVisual(x,"symbolRotate"),fromSymbolSize:c.getItemVisual(x,"symbolSize"),fromSymbol:c.getItemVisual(x,"symbol"),toSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(x,"symbolOffset"),toSymbolRotate:h.getItemVisual(x,"symbolRotate"),toSymbolSize:h.getItemVisual(x,"symbolSize"),toSymbol:h.getItemVisual(x,"symbol"),style:b})}),v.updateData(d),f.line.eachItemGraphicEl(function(x){nt(x).dataModel=a,x.traverse(function(b){nt(b).dataModel=a})});function y(x,b,I){var _=x.getItemModel(b);_a(x,b,I,t,i);var T=_.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=bn(l,"color")),x.setItemVisual(b,{symbolKeepAspect:_.get("symbolKeepAspect"),symbolOffset:bt(_.get("symbolOffset",!0),m[I?0:1]),symbolRotate:bt(_.get("symbolRotate",!0),S[I?0:1]),symbolSize:bt(_.get("symbolSize"),g[I?0:1]),symbol:bt(_.get("symbol",!0),p[I?0:1]),style:T})}this.markKeep(v),v.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e})(Un);function yg(r,e,t){var a;r?a=G(r&&r.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return $($({},v),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Lt(a,t),i=new Lt(a,t),o=new Lt([],t),s=G(t.get("data"),rt(pg,e,r,t));r&&(s=Dt(s,rt(dg,r)));var l=ul(!!r,a);return n.initData(G(s,function(u){return u[0]}),null,l),i.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function mg(r){r.registerComponentModel(hg),r.registerComponentView(gg),r.registerPreprocessor(function(e){Fn(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Sg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(Zt),sr=Ct(),bg=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=We(r,n),s=We(r,i),l=o.coord,u=s.coord;l[0]=Ot(l[0],-1/0),l[1]=Ot(l[1],-1/0),u[0]=Ot(u[0],1/0),u[1]=Ot(u[1],1/0);var v=ps([{},o,s]);return v.coord=[o.coord,s.coord],v.x0=o.x,v.y0=o.y,v.x1=s.x,v.y1=s.y,v}};function br(r){return!isNaN(r)&&!isFinite(r)}function go(r,e,t,a){var n=1-r;return br(e[n])&&br(t[n])}function xg(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return Rr(r,"cartesian2d")?t&&a&&(go(1,t,a)||go(0,t,a))?!0:ug(r,n,i):Ze(r,n)||Ze(r,i)}function yo(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=Y(o.get(t[0]),n.getWidth()),u=Y(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var v=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),c=i.clampData(v),h=i.clampData(f),d=[];t[0]==="x0"?d[0]=c[0]>h[0]?f[0]:v[0]:d[0]=c[0]>h[0]?v[0]:f[0],t[1]==="y0"?d[1]=c[1]>h[1]?f[1]:v[1]:d[1]=c[1]>h[1]?v[1]:f[1],s=a.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),S=[p,g];i.clampData&&i.clampData(S,S),s=i.dataToPoint(S,!0)}if(Rr(i,"cartesian2d")){var m=i.getAxis("x"),y=i.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);br(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):br(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var mo=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Ig=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Zt.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(mo,function(f){return yo(s,l,f,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new st});this.group.add(v.group),this.markKeep(v);var f=_g(o,t,a);a.setData(f),f.each(function(c){var h=G(mo,function(T){return yo(f,c,T,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),S=p.getExtent(),m=[d.parse(f.get("x0",c)),d.parse(f.get("x1",c))],y=[p.parse(f.get("y0",c)),p.parse(f.get("y1",c))];Oa(m),Oa(y);var x=!(g[0]>m[1]||g[1]<m[0]||S[0]>y[1]||S[1]<y[0]),b=!x;f.setItemLayout(c,{points:h,allClipped:b});var I=f.getItemModel(c).getModel("itemStyle").getItemStyle(),_=bn(l,"color");I.fill||(I.fill=_,lt(I.fill)&&(I.fill=Na(I.fill,.4))),I.stroke||(I.stroke=_),f.setItemVisual(c,"style",I)}),f.diff(sr(v).data).add(function(c){var h=f.getItemLayout(c);if(!h.allClipped){var d=new ze({shape:{points:h.points}});f.setItemGraphicEl(c,d),v.group.add(d)}}).update(function(c,h){var d=sr(v).data.getItemGraphicEl(h),p=f.getItemLayout(c);p.allClipped?d&&v.group.remove(d):(d?ht(d,{shape:{points:p.points}},a,c):d=new ze({shape:{points:p.points}}),f.setItemGraphicEl(c,d),v.group.add(d))}).remove(function(c){var h=sr(v).data.getItemGraphicEl(c);v.group.remove(h)}).execute(),f.eachItemGraphicEl(function(c,h){var d=f.getItemModel(h),p=f.getItemVisual(h,"style");c.useStyle(f.getItemVisual(h,"style")),te(c,zt(d),{labelFetcher:a,labelDataIndex:h,defaultText:f.getName(h)||"",inheritColor:lt(p.fill)?Na(p.fill,1):"#000"}),Ut(c,d),pt(c,null,null,d.get(["emphasis","disabled"])),nt(c).dataModel=a}),sr(v).data=f,v.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e})(Un);function _g(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=G(r&&r.dimensions,function(u){var v=e.getData(),f=v.getDimensionInfo(v.mapDimension(u))||{};return $($({},f),{name:u,ordinalMeta:null})});n=G(i,function(u,v){return{name:u,type:o[v%2].type}}),a=new Lt(n,t)}else n=[{name:"value",type:"float"}],a=new Lt(n,t);var s=G(t.get("data"),rt(bg,e,r,t));r&&(s=Dt(s,rt(xg,r)));var l=r?function(u,v,f,c){var h=u.coord[Math.floor(c/2)][c%2];return cr(h,n[c])}:function(u,v,f,c){return cr(u.value,n[c])};return a.initData(s,null,l),a.hasItemOption=!0,a}function wg(r){r.registerComponentModel(Sg),r.registerComponentView(Ig),r.registerPreprocessor(function(e){Fn(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var So={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Tg=(function(){function r(e){var t=this._condVal=lt(e)?new RegExp(e):uv(e)?e:null;if(t==null){var a="";et(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return lt(t)?this._condVal.test(e):Wt(t)?this._condVal.test(e+""):!1},r})(),Dg=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),Lg=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r})(),Ag=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r})(),Cg=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),Mg=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,a=t(this.valueGetterParam),n=e?this.valueParser(a):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:a))return!1;return!0},r})();function $n(r,e){if(r===!0||r===!1){var t=new Dg;return t.value=r,t}var a="";return vl(r)||et(a),r.and?bo("and",r,e):r.or?bo("or",r,e):r.not?Pg(r,e):Ng(r,e)}function bo(r,e,t){var a=e[r],n="";B(a)||et(n),a.length||et(n);var i=r==="and"?new Lg:new Ag;return i.children=G(a,function(o){return $n(o,t)}),i.children.length||et(n),i}function Pg(r,e){var t=r.not,a="";vl(t)||et(a);var n=new Cg;return n.child=$n(t,e),n.child||et(a),n}function Ng(r,e){for(var t="",a=e.prepareGetValue(r),n=[],i=Tt(r),o=r.parser,s=o?bs(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=Pt(So,u)?So[u]:u,f=r[u],c=s?s(f):f,h=lv(v,c)||v==="reg"&&new Tg(c);h||et(t),n.push(h)}}n.length||et(t);var d=new Mg;return d.valueGetterParam=a,d.valueParser=s,d.getValue=e.getValue,d.subCondList=n,d}function vl(r){return mn(r)&&!sv(r)}var Eg=(function(){function r(e,t){this._cond=$n(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function Rg(r,e){return new Eg(r,e)}var Vg={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,a=Rg(r.config,{valueGetterAttrMap:_t({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Pt(s,"dimension")||et(l);var v=e.getDimensionInfo(u);return v||et(l),{dimIdx:v.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),a.evaluate()&&n.push(t);return{data:n}}},kg={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,a="",n=Bt(t);n.length||et(a);var i=[];N(n,function(v){var f=v.dimension,c=v.order,h=v.parser,d=v.incomparable;if(f==null&&et(a),c!=="asc"&&c!=="desc"&&et(a),d&&d!=="min"&&d!=="max"){var p="";et(p)}if(c!=="asc"&&c!=="desc"){var g="";et(g)}var S=e.getDimensionInfo(f);S||et(a);var m=h?bs(h):null;h&&!m&&et(a),i.push({dimIdx:S.index,parser:m,comparator:new vv(c,d)})});var o=e.sourceFormat;o!==hs&&o!==fv&&et(a);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(v,f){for(var c=0;c<i.length;c++){var h=i[c],d=e.retrieveValueFromItem(v,h.dimIdx),p=e.retrieveValueFromItem(f,h.dimIdx);h.parser&&(d=h.parser(d),p=h.parser(p));var g=h.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function Og(r){r.registerTransform(Vg),r.registerTransform(kg)}var Gg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,a,n){r.prototype.init.call(this,t,a,n),this._sourceManager=new cv(this),fi(this)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),fi(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:hv},e})(kr),zg=(function(r){V(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(Or);function Bg(r){r.registerComponentModel(Gg),r.registerComponentView(zg)}var wa=Math.sin,Ta=Math.cos,fl=Math.PI,ie=Math.PI*2,Fg=180/fl,cl=(function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){this._add("C",e,t,a,n,i,o)},r.prototype.quadraticCurveTo=function(e,t,a,n){this._add("Q",e,t,a,n)},r.prototype.arc=function(e,t,a,n,i,o){this.ellipse(e,t,a,a,0,n,i,o)},r.prototype.ellipse=function(e,t,a,n,i,o,s,l){var u=s-o,v=!l,f=Math.abs(u),c=qt(f-ie)||(v?u>=ie:-u>=ie),h=u>0?u%ie:u%ie+ie,d=!1;c?d=!0:qt(f)?d=!1:d=h>=fl==!!v;var p=e+a*Ta(o),g=t+n*wa(o);this._start&&this._add("M",p,g);var S=Math.round(i*Fg);if(c){var m=1/this._p,y=(v?1:-1)*(ie-m);this._add("A",a,n,S,1,+v,e+a*Ta(o+y),t+n*wa(o+y)),m>.01&&this._add("A",a,n,S,0,+v,p,g)}else{var x=e+a*Ta(s),b=t+n*wa(s);this._add("A",a,n,S,+d,+v,x,b)}},r.prototype.rect=function(e,t,a,n){this._add("M",e,t),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,n,i,o,s,l,u){for(var v=[],f=this._p,c=1;c<arguments.length;c++){var h=arguments[c];if(isNaN(h)){this._invalid=!0;return}v.push(Math.round(h*f)/f)}this._d.push(e+v.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r})(),Wn="none",Hg=Math.round;function Ug(r){var e=r.fill;return e!=null&&e!==Wn}function $g(r){var e=r.stroke;return e!=null&&e!==Wn}var ja=["lineCap","miterLimit","lineJoin"],Wg=G(ja,function(r){return"stroke-"+r.toLowerCase()});function Zg(r,e,t,a){var n=e.opacity==null?1:e.opacity;if(t instanceof Vr){r("opacity",n);return}if(Ug(e)){var i=Fe(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*n:i.opacity*n;o<1&&r("fill-opacity",o)}else r("fill",Wn);if($g(e)){var s=Fe(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,v=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*n:s.opacity*n,f=e.strokeFirst;if(u!==1&&r("stroke-width",u),f&&r("paint-order",f?"stroke":"fill"),v<1&&r("stroke-opacity",v),e.lineDash){var c=pv(t),h=c[0],d=c[1];h&&(d=Hg(d||0),r("stroke-dasharray",h.join(",")),(d||a)&&r("stroke-dashoffset",d))}for(var p=0;p<ja.length;p++){var g=ja[p];if(e[g]!==ci[g]){var S=e[g]||ci[g];S&&r(Wg[p],S)}}}}var hl="http://www.w3.org/2000/svg",pl="http://www.w3.org/1999/xlink",Yg="http://www.w3.org/2000/xmlns/",Xg="http://www.w3.org/XML/1998/namespace",xo="ecmeta_";function dl(r){return document.createElementNS(hl,r)}function at(r,e,t,a,n){return{tag:r,attrs:t||{},children:a,text:n,key:e}}function qg(r,e){var t=[];if(e)for(var a in e){var n=e[a],i=a;n!==!1&&(n!==!0&&n!=null&&(i+='="'+n+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function Kg(r){return"</"+r+">"}function Zn(r,e){e=e||{};var t=e.newline?`
`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return qg(o,s)+(o!=="style"?dv(l):l||"")+(i?""+t+G(i,function(u){return a(u)}).join(t)+t:"")+Kg(o)}return a(r)}function jg(r,e,t){t=t||{};var a=t.newline?`
`:"",n=" {"+a,i=a+"}",o=G(Tt(r),function(l){return l+n+G(Tt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=G(Tt(e),function(l){return"@keyframes "+l+n+G(Tt(e[l]),function(u){return u+n+G(Tt(e[l][u]),function(v){var f=e[l][u][v];return v==="d"&&(f='path("'+f+'")'),v+":"+f+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(a)}function Qa(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Io(r,e,t,a){return at("svg","root",{width:r,height:e,xmlns:hl,"xmlns:xlink":pl,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var Qg=0;function gl(){return Qg++}var _o={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"},le="transform-origin";function Jg(r,e,t){var a=$({},r.shape);$(a,e),r.buildPath(t,a);var n=new cl;return n.reset(Is(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function ty(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[le]=t+"px "+a+"px")}var ey={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function yl(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function ry(r,e,t){var a=r.shape.paths,n={},i,o;if(N(a,function(l){var u=Qa(t.zrId);u.animation=!0,Fr(l,{},u,!0);var v=u.cssAnims,f=u.cssNodes,c=Tt(v),h=c.length;if(h){o=c[h-1];var d=v[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var S in f){var m=f[S].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=yl(n,t);return i.replace(o,s)}}function wo(r){return lt(r)?_o[r]?"cubic-bezier("+_o[r]+")":yv(r)?r:"":""}function Fr(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof gv){var s=ry(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var v=n[u],f=[v.getMaxTime()/1e3+"s"],c=wo(v.getClip().easing),h=v.getDelay();c?f.push(c):f.push("linear"),h&&f.push(h/1e3+"s"),v.getLoop()&&f.push("infinite");var d=f.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(v)}function p(m){var y=m[1],x=y.length,b={},I={},_={},T="animation-timing-function";function w(H,O,K){for(var Z=H.getTracks(),J=H.getMaxTime(),it=0;it<Z.length;it++){var ft=Z[it];if(ft.needsAnimate()){var tt=ft.keyframes,ut=ft.propName;if(K&&(ut=K(ut)),ut)for(var It=0;It<tt.length;It++){var Mt=tt[It],ne=Math.round(Mt.time/J*100)+"%",De=wo(Mt.easing),Qn=Mt.rawValue;(lt(Qn)||Wt(Qn))&&(O[ne]=O[ne]||{},O[ne][ut]=Mt.rawValue,De&&(O[ne][T]=De))}}}}for(var D=0;D<x;D++){var L=y[D],C=L.targetName;C?C==="shape"&&w(L,I):!a&&w(L,b)}for(var A in b){var M={};mv(M,r),$(M,b[A]);var P=xs(M),E=b[A][T];_[A]=P?{transform:P}:{},ty(_[A],M),E&&(_[A][T]=E)}var R,k=!0;for(var A in I){_[A]=_[A]||{};var z=!R,E=I[A][T];z&&(R=new _s);var U=R.len();R.reset(),_[A].d=Jg(r,I[A],R);var F=R.len();if(!z&&U!==F){k=!1;break}E&&(_[A][T]=E)}if(!k)for(var A in _)delete _[A].d;if(!a)for(var D=0;D<x;D++){var L=y[D],C=L.targetName;C==="style"&&w(L,_,function(Z){return ey[Z]})}for(var X=Tt(_),j=!0,q,D=1;D<X.length;D++){var Q=X[D-1],mt=X[D];if(_[Q][le]!==_[mt][le]){j=!1;break}q=_[Q][le]}if(j&&q){for(var A in _)_[A][le]&&delete _[A][le];e[le]=q}if(Dt(X,function(H){return Tt(_[H]).length>0}).length){var Rt=yl(_,t);return Rt+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var S=t.zrId+"-cls-"+gl();t.cssNodes["."+S]={animation:o.join(",")},e.class=S}}function ay(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};To(a,e,t)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=Sv(l))}var u=n.lineWidth;if(u){var v=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/v}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),To(a,e,t)}}function To(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+gl(),t.cssStyleCache[n]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var Ye=Math.round;function ml(r){return r&&lt(r.src)}function Sl(r){return r&&ot(r.toDataURL)}function Yn(r,e,t,a){Zg(function(n,i){var o=n==="fill"||n==="stroke";o&&ws(i)?xl(e,r,n,a):o&&xn(i)?Il(t,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),vy(t,r,a)}function Xn(r,e){var t=Rv(e);t&&(t.each(function(a,n){a!=null&&(r[(xo+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[xo+"silent"]="true"))}function Do(r){return qt(r[0]-1)&&qt(r[1])&&qt(r[2])&&qt(r[3]-1)}function ny(r){return qt(r[4])&&qt(r[5])}function qn(r,e,t){if(e&&!(ny(e)&&Do(e))){var a=1e4;r.transform=Do(e)?"translate("+Ye(e[4]*a)/a+" "+Ye(e[5]*a)/a+")":Ev(e)}}function Lo(r,e,t){for(var a=r.points,n=[],i=0;i<a.length;i++)n.push(Ye(a[i][0]*t)/t),n.push(Ye(a[i][1]*t)/t);e.points=n.join(" ")}function Ao(r){return!r.smooth}function iy(r){var e=G(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,a,n){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(a[o[1]]=Ye(s*n)/n)}}}var oy={circle:[iy(["cx","cy","r"])],polyline:[Lo,Ao],polygon:[Lo,Ao]};function sy(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function bl(r,e){var t=r.style,a=r.shape,n=oy[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&Is(r)||4;if(n&&!e.willUpdate&&!(n[1]&&!n[1](a))&&!(o&&sy(r))&&!(l<1)){s=r.type;var v=Math.pow(10,u);n[0](a,i,v)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var c=r.path;f&&(c.beginPath(),r.buildPath(c,r.shape),r.pathUpdated());var h=c.getVersion(),d=r,p=d.__svgPathBuilder;(d.__svgPathVersion!==h||!p||l!==d.__svgPathStrokePercent)&&(p||(p=d.__svgPathBuilder=new cl),p.reset(u),c.rebuildPath(p,l),p.generateStr(),d.__svgPathVersion=h,d.__svgPathStrokePercent=l),i.d=p.getStr()}return qn(i,r.transform),Yn(i,t,r,e),Xn(i,r),e.animation&&Fr(r,i,e),e.emphasis&&ay(r,i,e),at(s,r.id+"",i)}function ly(r,e){var t=r.style,a=t.image;if(a&&!lt(a)&&(ml(a)?a=a.src:Sl(a)&&(a=a.toDataURL())),!!a){var n=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:a,width:o,height:s};return n&&(l.x=n),i&&(l.y=i),qn(l,r.transform),Yn(l,t,r,e),Xn(l,r),e.animation&&Fr(r,l,e),at("image",r.id+"",l)}}function uy(r,e){var t=r.style,a=t.text;if(a!=null&&(a+=""),!(!a||isNaN(t.x)||isNaN(t.y))){var n=t.font||xv,i=t.x||0,o=Iv(t.y||0,_v(n),t.textBaseline),s=wv[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Tv(t)){var u="",v=t.fontStyle,f=Dv(t.fontSize);if(!parseFloat(f))return;var c=t.fontFamily||Lv,h=t.fontWeight;u+="font-size:"+f+";font-family:"+c+";",v&&v!=="normal"&&(u+="font-style:"+v+";"),h&&h!=="normal"&&(u+="font-weight:"+h+";"),l.style=u}else l.style="font: "+n;return a.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),qn(l,r.transform),Yn(l,t,r,e),Xn(l,r),e.animation&&Fr(r,l,e),at("text",r.id+"",l,void 0,a)}}function Co(r,e){if(r instanceof gt)return bl(r,e);if(r instanceof Vr)return ly(r,e);if(r instanceof bv)return uy(r,e)}function vy(r,e,t){var a=r.style;if(Vv(a)){var n=kv(r),i=t.shadowCache,o=i[n];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var v=a.shadowOffsetX||0,f=a.shadowOffsetY||0,c=a.shadowBlur,h=Fe(a.shadowColor),d=h.opacity,p=h.color,g=c/2/l,S=c/2/u,m=g+" "+S;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=at("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[at("feDropShadow","",{dx:v/l,dy:f/u,stdDeviation:m,"flood-color":p,"flood-opacity":d})]),i[n]=o}e.filter=Gr(o)}}function xl(r,e,t,a){var n=r[t],i,o={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(Av(n))i="linearGradient",o.x1=n.x,o.y1=n.y,o.x2=n.x2,o.y2=n.y2;else if(Cv(n))i="radialGradient",o.cx=bt(n.x,.5),o.cy=bt(n.y,.5),o.r=bt(n.r,.5);else return;for(var s=n.colorStops,l=[],u=0,v=s.length;u<v;++u){var f=Mv(s[u].offset)*100+"%",c=s[u].color,h=Fe(c),d=h.color,p=h.opacity,g={offset:f};g["stop-color"]=d,p<1&&(g["stop-opacity"]=p),l.push(at("stop",u+"",g))}var S=at(i,"",o,l),m=Zn(S),y=a.gradientCache,x=y[m];x||(x=a.zrId+"-g"+a.gradientIdx++,y[m]=x,o.id=x,a.defs[x]=at(i,x,o,l)),e[t]=Gr(x)}function Il(r,e,t,a){var n=r.style[t],i=r.getBoundingRect(),o={},s=n.repeat,l=s==="no-repeat",u=s==="repeat-x",v=s==="repeat-y",f;if(Pv(n)){var c=n.imageWidth,h=n.imageHeight,d=void 0,p=n.image;if(lt(p)?d=p:ml(p)?d=p.src:Sl(p)&&(d=p.toDataURL()),typeof Image=="undefined"){var g="Image width/height must been given explictly in svg-ssr renderer.";Pa(c,g),Pa(h,g)}else if(c==null||h==null){var S=function(D,L){if(D){var C=D.elm,A=c||L.width,M=h||L.height;D.tag==="pattern"&&(u?(M=1,A/=i.width):v&&(A=1,M/=i.height)),D.attrs.width=A,D.attrs.height=M,C&&(C.setAttribute("width",A),C.setAttribute("height",M))}},m=Nv(d,null,r,function(D){l||S(I,D),S(f,D)});m&&m.width&&m.height&&(c=c||m.width,h=h||m.height)}f=at("image","img",{href:d,width:c,height:h}),o.width=c,o.height=h}else n.svgElement&&(f=xe(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(f){var y,x;l?y=x=1:u?(x=1,y=o.width/i.width):v?(y=1,x=o.height/i.height):o.patternUnits="userSpaceOnUse",y!=null&&!isNaN(y)&&(o.width=y),x!=null&&!isNaN(x)&&(o.height=x);var b=xs(n);b&&(o.patternTransform=b);var I=at("pattern","",o,[f]),_=Zn(I),T=a.patternCache,w=T[_];w||(w=a.zrId+"-p"+a.patternIdx++,T[_]=w,o.id=w,I=a.defs[w]=at("pattern",w,o,[f])),e[t]=Gr(w)}}function fy(r,e,t){var a=t.clipPathCache,n=t.defs,i=a[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=at("clipPath",i,o,[bl(r,t)])}e["clip-path"]=Gr(i)}function Mo(r){return document.createTextNode(r)}function ve(r,e,t){r.insertBefore(e,t)}function Po(r,e){r.removeChild(e)}function No(r,e){r.appendChild(e)}function _l(r){return r.parentNode}function wl(r){return r.nextSibling}function Da(r,e){r.textContent=e}var Eo=58,cy=120,hy=at("","");function Ja(r){return r===void 0}function kt(r){return r!==void 0}function py(r,e,t){for(var a={},n=e;n<=t;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function ke(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function Xe(r){var e,t=r.children,a=r.tag;if(kt(a)){var n=r.elm=dl(a);if(Kn(hy,r),B(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&No(n,Xe(i))}else kt(r.text)&&!mn(r.text)&&No(n,Mo(r.text))}else r.elm=Mo(r.text);return r.elm}function Tl(r,e,t,a,n){for(;a<=n;++a){var i=t[a];i!=null&&ve(r,Xe(i),e)}}function xr(r,e,t,a){for(;t<=a;++t){var n=e[t];if(n!=null)if(kt(n.tag)){var i=_l(n.elm);Po(i,n.elm)}else Po(r,n.elm)}}function Kn(r,e){var t,a=e.elm,n=r&&r.attrs||{},i=e.attrs||{};if(n!==i){for(t in i){var o=i[t],s=n[t];s!==o&&(o===!0?a.setAttribute(t,""):o===!1?a.removeAttribute(t):t==="style"?a.style.cssText=o:t.charCodeAt(0)!==cy?a.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?a.setAttributeNS(Yg,t,o):t.charCodeAt(3)===Eo?a.setAttributeNS(Xg,t,o):t.charCodeAt(5)===Eo?a.setAttributeNS(pl,t,o):a.setAttribute(t,o))}for(t in n)t in i||a.removeAttribute(t)}}function dy(r,e,t){for(var a=0,n=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],v=t[l],f,c,h,d;a<=i&&n<=l;)o==null?o=e[++a]:s==null?s=e[--i]:u==null?u=t[++n]:v==null?v=t[--l]:ke(o,u)?(ge(o,u),o=e[++a],u=t[++n]):ke(s,v)?(ge(s,v),s=e[--i],v=t[--l]):ke(o,v)?(ge(o,v),ve(r,o.elm,wl(s.elm)),o=e[++a],v=t[--l]):ke(s,u)?(ge(s,u),ve(r,s.elm,o.elm),s=e[--i],u=t[++n]):(Ja(f)&&(f=py(e,a,i)),c=f[u.key],Ja(c)?ve(r,Xe(u),o.elm):(h=e[c],h.tag!==u.tag?ve(r,Xe(u),o.elm):(ge(h,u),e[c]=void 0,ve(r,h.elm,o.elm))),u=t[++n]);(a<=i||n<=l)&&(a>i?(d=t[l+1]==null?null:t[l+1].elm,Tl(r,d,t,n,l)):xr(r,e,a,i))}function ge(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(Kn(r,e),Ja(e.text)?kt(a)&&kt(n)?a!==n&&dy(t,a,n):kt(n)?(kt(r.text)&&Da(t,""),Tl(t,null,n,0,n.length-1)):kt(a)?xr(t,a,0,a.length-1):kt(r.text)&&Da(t,""):r.text!==e.text&&(kt(a)&&xr(t,a,0,a.length-1),Da(t,e.text)))}function gy(r,e){if(ke(r,e))ge(r,e);else{var t=r.elm,a=_l(t);Xe(e),a!==null&&(ve(a,e.elm,wl(t)),xr(a,[r],0,0))}return e}var yy=0,my=(function(){function r(e,t,a){if(this.type="svg",this.refreshHover=Ro(),this.configLayer=Ro(),this.storage=t,this._opts=a=$({},a),this.root=e,this._id="zr"+yy++,this._oldVNode=Io(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=dl("svg");Kn(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",gy(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return Co(e,Qa(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=Qa(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Sy(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=at("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=G(Tt(i.defs),function(c){return i.defs[c]});if(u.length&&o.push(at("defs","defs",{},u)),e.animation){var v=jg(i.cssNodes,i.cssAnims,{newline:!0});if(v){var f=at("style","stl",{},[],v);o.push(f)}}return Io(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Zn(this.renderToVNode({animation:bt(e.cssAnimation,!0),emphasis:bt(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:bt(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var n=e.length,i=[],o=0,s,l,u=0,v=0;v<n;v++){var f=e[v];if(!f.invisible){var c=f.__clipPaths,h=c&&c.length||0,d=l&&l.length||0,p=void 0;for(p=Math.max(h-1,d-1);p>=0&&!(c&&l&&c[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=i[o-1];for(var S=p+1;S<h;S++){var m={};fy(c[S],m,t);var y=at("g","clip-g-"+u++,m,[]);(s?s.children:a).push(y),i[o++]=y,s=y}l=c;var x=Co(f,t);x&&(s?s.children:a).push(x)}}},r.prototype.resize=function(e,t){var a=this._opts,n=this.root,i=this._viewport;if(e!=null&&(a.width=e),t!=null&&(a.height=t),n&&i&&(i.style.display="none",e=hi(n,0,a),t=hi(n,1,a),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(xn(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))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),a="data:image/svg+xml;";return e?(t=Ov(t),t&&a+"base64,"+t):a+"charset=UTF-8,"+encodeURIComponent(t)},r})();function Ro(r){return function(){}}function Sy(r,e,t,a){var n;if(t&&t!=="none")if(n=at("rect","bg",{width:r,height:e,x:"0",y:"0"}),ws(t))xl({fill:t},n.attrs,"fill",a);else if(xn(t))Il({style:{fill:t},dirty:Se,getBoundingRect:function(){return{width:r,height:e}}},n.attrs,"fill",a);else{var i=Fe(t),o=i.color,s=i.opacity;n.attrs.fill=o,s<1&&(n.attrs["fill-opacity"]=s)}return n}function by(r){r.registerPainter("svg",my)}var Vt=_s.CMD;function me(r,e){return Math.abs(r-e)<1e-5}function tn(r){var e=r.data,t=r.len(),a=[],n,i=0,o=0,s=0,l=0;function u(A,M){n&&n.length>2&&a.push(n),n=[A,M]}function v(A,M,P,E){me(A,P)&&me(M,E)||n.push(A,M,P,E,P,E)}function f(A,M,P,E,R,k){var z=Math.abs(M-A),U=Math.tan(z/4)*4/3,F=M<A?-1:1,X=Math.cos(A),j=Math.sin(A),q=Math.cos(M),Q=Math.sin(M),mt=X*R+P,Rt=j*k+E,H=q*R+P,O=Q*k+E,K=R*U*F,Z=k*U*F;n.push(mt-K*j,Rt+Z*X,H+K*Q,O-Z*q,H,O)}for(var c,h,d,p,g=0;g<t;){var S=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(S===Vt.L||S===Vt.C||S===Vt.Q)&&(n=[s,l])),S){case Vt.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Vt.L:c=e[g++],h=e[g++],v(i,o,c,h),i=c,o=h;break;case Vt.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Vt.Q:c=e[g++],h=e[g++],d=e[g++],p=e[g++],n.push(i+2/3*(c-i),o+2/3*(h-o),d+2/3*(c-d),p+2/3*(h-p),d,p),i=d,o=p;break;case Vt.A:var y=e[g++],x=e[g++],b=e[g++],I=e[g++],_=e[g++],T=e[g++]+_;g+=1;var w=!e[g++];c=Math.cos(_)*b+y,h=Math.sin(_)*I+x,m?(s=c,l=h,u(s,l)):v(i,o,c,h),i=Math.cos(T)*b+y,o=Math.sin(T)*I+x;for(var D=(w?-1:1)*Math.PI/2,L=_;w?L>T:L<T;L+=D){var C=w?Math.max(L+D,T):Math.min(L+D,T);f(L,C,y,x,b,I)}break;case Vt.R:s=i=e[g++],l=o=e[g++],c=s+e[g++],h=l+e[g++],u(c,l),v(c,l,c,h),v(c,h,s,h),v(s,h,s,l),v(s,l,c,l);break;case Vt.Z:n&&v(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&a.push(n),a}function en(r,e,t,a,n,i,o,s,l,u){if(me(r,t)&&me(e,a)&&me(n,o)&&me(i,s)){l.push(o,s);return}var v=2/u,f=v*v,c=o-r,h=s-e,d=Math.sqrt(c*c+h*h);c/=d,h/=d;var p=t-r,g=a-e,S=n-o,m=i-s,y=p*p+g*g,x=S*S+m*m;if(y<f&&x<f){l.push(o,s);return}var b=c*p+h*g,I=-c*S-h*m,_=y-b*b,T=x-I*I;if(_<f&&b>=0&&T<f&&I>=0){l.push(o,s);return}var w=[],D=[];hr(r,t,n,o,.5,w),hr(e,a,i,s,.5,D),en(w[0],D[0],w[1],D[1],w[2],D[2],w[3],D[3],l,u),en(w[4],D[4],w[5],D[5],w[6],D[6],w[7],D[7],l,u)}function xy(r,e){var t=tn(r),a=[];e=e||1;for(var n=0;n<t.length;n++){var i=t[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var v=i[u++],f=i[u++],c=i[u++],h=i[u++],d=i[u++],p=i[u++];en(s,l,v,f,c,h,d,p,o,e),s=d,l=p}a.push(o)}return a}function Dl(r,e,t){var a=r[e],n=r[1-e],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var v=o*s,f=t-v;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function Vo(r,e,t){for(var a=r.r0,n=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*n,u=n-a,v=l>Math.abs(u),f=Dl([l,u],v?0:1,e),c=(v?s:u)/f.length,h=0;h<f.length;h++)for(var d=(v?u:s)/f[h],p=0;p<f[h];p++){var g={};v?(g.startAngle=i+c*h,g.endAngle=i+c*(h+1),g.r0=a+d*p,g.r=a+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=a+c*h,g.r=a+c*(h+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function Iy(r,e,t){for(var a=r.width,n=r.height,i=a>n,o=Dl([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",f=r[s]/o.length,c=0;c<o.length;c++)for(var h=r[l]/o[c],d=0;d<o[c];d++){var p={};p[u]=c*f,p[v]=d*h,p[s]=f,p[l]=h,p.x+=r.x,p.y+=r.y,t.push(p)}}function ko(r,e,t,a){return r*a-t*e}function _y(r,e,t,a,n,i,o,s){var l=t-r,u=a-e,v=o-n,f=s-i,c=ko(v,f,l,u);if(Math.abs(c)<1e-6)return null;var h=r-n,d=e-i,p=ko(h,d,v,f)/c;return p<0||p>1?null:new Xt(p*l+r,p*u+e)}function wy(r,e,t){var a=new Xt;Xt.sub(a,t,e),a.normalize();var n=new Xt;Xt.sub(n,r,e);var i=n.dot(a);return i}function pe(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Ty(r,e,t){for(var a=r.length,n=[],i=0;i<a;i++){var o=r[i],s=r[(i+1)%a],l=_y(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:wy(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:r},{points:r}];n.sort(function(g,S){return g.projPt-S.projPt});var u=n[0],v=n[n.length-1];if(v.idx<u.idx){var f=u;u=v,v=f}for(var c=[u.pt.x,u.pt.y],h=[v.pt.x,v.pt.y],d=[c],p=[h],i=u.idx+1;i<=v.idx;i++)pe(d,r[i].slice());pe(d,h),pe(d,c);for(var i=v.idx+1;i<=u.idx+a;i++)pe(p,r[i%a].slice());return pe(p,c),pe(p,h),[{points:d},{points:p}]}function Oo(r){var e=r.points,t=[],a=[];Cr(e,t,a);var n=new Nt(t[0],t[1],a[0]-t[0],a[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,u=new Xt,v=new Xt;return i>o?(u.x=v.x=s+i/2,u.y=l,v.y=l+o):(u.y=v.y=l+o/2,u.x=s,v.x=s+i),Ty(e,u,v)}function Ir(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);Ir(r,i[0],n,a),Ir(r,i[1],t-n,a)}return a}function Dy(r,e){for(var t=[],a=0;a<e;a++)t.push(In(r));return t}function Ly(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function Ay(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function Cy(r,e){var t=[],a=r.shape,n;switch(r.type){case"rect":Iy(a,e,t),n=ee;break;case"sector":Vo(a,e,t),n=Ga;break;case"circle":Vo({r0:0,r:a.r,startAngle:0,endAngle:Math.PI*2,cx:a.cx,cy:a.cy},e,t),n=Ga;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=G(xy(r.getUpdatedPathProxy(),o),function(S){return Ay(S)}),l=s.length;if(l===0)Ir(Oo,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var v=0,f=G(s,function(S){var m=[],y=[];Cr(S,m,y);var x=(y[1]-m[1])*(y[0]-m[0]);return v+=x,{poly:S,area:x}});f.sort(function(S,m){return m.area-S.area});for(var c=e,u=0;u<l;u++){var h=f[u];if(c<=0)break;var d=u===l-1?c:Math.ceil(h.area/v*e);d<0||(Ir(Oo,{points:h.poly},d,t),c-=d)}}n=ze;break}if(!n)return Dy(r,e);for(var p=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),Ly(r,g),p.push(g)}return p}function My(r,e){var t=r.length,a=e.length;if(t===a)return[r,e];for(var n=[],i=[],o=t<a?r:e,s=Math.min(t,a),l=Math.abs(a-t)/6,u=(s-2)/6,v=Math.ceil(l/u)+1,f=[o[0],o[1]],c=l,h=2;h<s;){var d=o[h-2],p=o[h-1],g=o[h++],S=o[h++],m=o[h++],y=o[h++],x=o[h++],b=o[h++];if(c<=0){f.push(g,S,m,y,x,b);continue}for(var I=Math.min(c,v-1)+1,_=1;_<=I;_++){var T=_/I;hr(d,g,m,x,T,n),hr(p,S,y,b,T,i),d=n[3],p=i[3],f.push(n[1],i[1],n[2],i[2],d,p),g=n[5],S=i[5],m=n[6],y=i[6]}c-=I-1}return o===r?[f,e]:[r,f]}function Go(r,e){for(var t=r.length,a=r[t-2],n=r[t-1],i=[],o=0;o<e.length;)i[o++]=a,i[o++]=n;return i}function Py(r,e){for(var t,a,n,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],v=void 0,f=void 0;l?u?(t=My(l,u),v=t[0],f=t[1],a=v,n=f):(f=Go(n||l,l),v=l):(v=Go(a||u,u),f=u),i.push(v),o.push(f)}return[i,o]}function zo(r){for(var e=0,t=0,a=0,n=r.length,i=0,o=n-2;i<n;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],v=r[i+1],f=s*v-u*l;e+=f,t+=(s+u)*f,a+=(l+v)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,a/e/3,e]}function Ny(r,e,t,a){for(var n=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<n;u++){for(var v=u*6,f=0,c=0;c<s;c+=2){var h=c===0?v:(v+c-2)%l+2,d=r[h]-t[0],p=r[h+1]-t[1],g=e[c]-a[0],S=e[c+1]-a[1],m=g-d,y=S-p;f+=m*m+y*y}f<i&&(i=f,o=u)}return o}function Ey(r){for(var e=[],t=r.length,a=0;a<t;a+=2)e[a]=r[t-a-2],e[a+1]=r[t-a-1];return e}function Ry(r,e,t,a){for(var n=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=zo(s),v=zo(l);i==null&&(i=u[2]<0!=v[2]<0);var f=[],c=[],h=0,d=1/0,p=[],g=s.length;i&&(s=Ey(s));for(var S=Ny(s,l,u,v)*6,m=g-2,y=0;y<m;y+=2){var x=(S+y)%m+2;f[y+2]=s[x]-u[0],f[y+3]=s[x+1]-u[1]}f[0]=s[S]-u[0],f[1]=s[S+1]-u[1];for(var b=a/t,I=-a/2;I<=a/2;I+=b){for(var _=Math.sin(I),T=Math.cos(I),w=0,y=0;y<s.length;y+=2){var D=f[y],L=f[y+1],C=l[y]-v[0],A=l[y+1]-v[1],M=C*T-A*_,P=C*_+A*T;p[y]=M,p[y+1]=P;var E=M-D,R=P-L;w+=E*E+R*R}if(w<d){d=w,h=I;for(var k=0;k<p.length;k++)c[k]=p[k]}}n.push({from:f,to:c,fromCp:u,toCp:v,rotation:-h})}return n}function _r(r){return r.__isCombineMorphing}var Ll="__mOriginal_";function wr(r,e,t){var a=Ll+e,n=r[a]||r[e];r[a]||(r[a]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=n.apply(this,l),o&&o.apply(this,l),u}}function Ge(r,e){var t=Ll+e;r[t]&&(r[e]=r[t],r[t]=null)}function Bo(r,e){for(var t=0;t<r.length;t++)for(var a=r[t],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=e[0]*i+e[2]*o+e[4],a[n++]=e[1]*i+e[3]*o+e[5]}}function Al(r,e){var t=r.getUpdatedPathProxy(),a=e.getUpdatedPathProxy(),n=Py(tn(t),tn(a)),i=n[0],o=n[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&Bo(i,s),l&&Bo(o,l),wr(e,"updateTransform",{replace:u}),e.transform=null;var v=Ry(i,o,10,Math.PI),f=[];wr(e,"buildPath",{replace:function(c){for(var h=e.__morphT,d=1-h,p=[],g=0;g<v.length;g++){var S=v[g],m=S.from,y=S.to,x=S.rotation*h,b=S.fromCp,I=S.toCp,_=Math.sin(x),T=Math.cos(x);Gv(p,b,I,h);for(var w=0;w<m.length;w+=2){var D=m[w],L=m[w+1],C=y[w],A=y[w+1],M=D*d+C*h,P=L*d+A*h;f[w]=M*T-P*_+p[0],f[w+1]=M*_+P*T+p[1]}var E=f[0],R=f[1];c.moveTo(E,R);for(var w=2;w<m.length;){var C=f[w++],A=f[w++],k=f[w++],z=f[w++],U=f[w++],F=f[w++];E===C&&R===A&&k===U&&z===F?c.lineTo(U,F):c.bezierCurveTo(C,A,k,z,U,F),E=U,R=F}}}})}function jn(r,e,t){if(!r||!e)return e;var a=t.done,n=t.during;Al(r,e),e.__morphT=0;function i(){Ge(e,"buildPath"),Ge(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},xt({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),a&&a()}},t)),e}function Vy(r,e,t,a,n,i){var o=16;r=n===t?0:Math.round(32767*(r-t)/(n-t)),e=i===a?0:Math.round(32767*(e-a)/(i-a));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var v=0,f=0;(r&u)>0&&(v=1),(e&u)>0&&(f=1),s+=u*u*(3*v^f),f===0&&(v===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Tr(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=G(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(f,t),a=Math.max(v,a),n=Math.max(f,n),[v,f]}),o=G(i,function(s,l){return{cp:s,z:Vy(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Cl(r){return Cy(r.path,r.count)}function rn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function ky(r,e,t){var a=[];function n(b){for(var I=0;I<b.length;I++){var _=b[I];_r(_)?n(_.childrenRef()):_ instanceof gt&&a.push(_)}}n(r);var i=a.length;if(!i)return rn();var o=t.dividePath||Cl,s=o({path:e,count:i});if(s.length!==i)return rn();a=Tr(a),s=Tr(s);for(var l=t.done,u=t.during,v=t.individualDelay,f=new Ko,c=0;c<i;c++){var h=a[c],d=s[c];d.parent=e,d.copyTransform(f),v||Al(h,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(b){for(var I=0;I<s.length;I++)s[I].addSelfToZr(b)}wr(e,"addSelfToZr",{after:function(b){p(b)}}),wr(e,"removeSelfFromZr",{after:function(b){for(var I=0;I<s.length;I++)s[I].removeSelfFromZr(b)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Ge(e,"addSelfToZr"),Ge(e,"removeSelfFromZr")}var S=s.length;if(v)for(var m=S,y=function(){m--,m===0&&(g(),l&&l())},c=0;c<S;c++){var x=v?xt({delay:(t.delay||0)+v(c,S,a[c],s[c]),done:y},t):t;jn(a[c],s[c],x)}else e.__morphT=0,e.animateTo({__morphT:1},xt({during:function(b){for(var I=0;I<S;I++){var _=s[I];_.__morphT=e.__morphT,_.dirtyShape()}u&&u(b)},done:function(){g();for(var b=0;b<r.length;b++)Ge(r[b],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:a,toIndividuals:s,count:S}}function Oy(r,e,t){var a=e.length,n=[],i=t.dividePath||Cl;function o(h){for(var d=0;d<h.length;d++){var p=h[d];_r(p)?o(p.childrenRef()):p instanceof gt&&n.push(p)}}if(_r(r)){o(r.childrenRef());var s=n.length;if(s<a)for(var l=0,u=s;u<a;u++)n.push(In(n[l++%s]));n.length=a}else{n=i({path:r,count:a});for(var v=r.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(v);if(n.length!==a)return rn()}n=Tr(n),e=Tr(e);for(var f=t.individualDelay,u=0;u<a;u++){var c=f?xt({delay:(t.delay||0)+f(u,a,n[u],e[u])},t):t;jn(n[u],e[u],c)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function Fo(r){return B(r[0])}function Ho(r,e){for(var t=[],a=r.length,n=0;n<a;n++)t.push({one:r[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%a].many.push(e[n][o])}for(var s=0,n=a-1;n>=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var Gy={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a<r.count;a++){var n=In(r.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function La(r,e,t,a,n,i){if(!r.length||!e.length)return;var o=_n("update",a,n);if(!(o&&o.duration>0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;Fo(r)&&(u=r,v=e),Fo(e)&&(u=e,v=r);function f(S,m,y,x,b){var I=S.many,_=S.one;if(I.length===1&&!b){var T=m?I[0]:_,w=m?_:I[0];if(_r(T))f({many:[T],one:w},!0,y,x,!0);else{var D=s?xt({delay:s(y,x)},l):l;jn(T,w,D),i(T,w,T,w,D)}}else for(var L=xt({dividePath:Gy[t],individualDelay:s&&function(R,k,z,U){return s(R+y,x)}},l),C=m?ky(I,_,L):Oy(_,I,L),A=C.fromIndividuals,M=C.toIndividuals,P=A.length,E=0;E<P;E++){var D=s?xt({delay:s(E,P)},l):l;i(A[E],M[E],m?I[E]:S.one,m?S.one:I[E],D)}}for(var c=u?u===r:r.length>e.length,h=u?Ho(v,u):Ho(c?e:r,[c?r:e]),d=0,p=0;p<h.length;p++)d+=h[p].many.length;for(var g=0,p=0;p<h.length;p++)f(h[p],c,g,d),g+=h[p].many.length}function ue(r){if(!r)return[];if(B(r)){for(var e=[],t=0;t<r.length;t++)e.push(ue(r[t]));return e}var a=[];return r.traverse(function(n){n instanceof gt&&!n.disableMorphing&&!n.invisible&&!n.ignore&&a.push(n)}),a}var Ml=1e4,zy=0,Uo=1,$o=2,By=Ct();function Fy(r,e){for(var t=r.dimensions,a=0;a<t.length;a++){var n=r.getDimensionInfo(t[a]);if(n&&n.otherDims[e]===0)return t[a]}}function Hy(r,e,t){var a=r.getDimensionInfo(t),n=a&&a.ordinalMeta;if(a){var i=r.get(a.name,e);return n&&n.categories[i]||i+""}}function Wo(r,e,t,a){var n=a?"itemChildGroupId":"itemGroupId",i=Fy(r,n);if(i){var o=Hy(r,e,i);return o}var s=r.getRawDataItem(e),l=a?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!a)return t||r.getId(e)}function Zo(r){var e=[];return N(r,function(t){var a=t.data,n=t.dataGroupId;if(!(a.count()>Ml))for(var i=a.getIndices(),o=0;o<i.length;o++)e.push({data:a,groupId:Wo(a,o,n,!1),childGroupId:Wo(a,o,n,!0),divide:t.divide,dataIndex:o})}),e}function Aa(r,e,t){r.traverse(function(a){a instanceof gt&&Gt(a,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function Ca(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function de(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Uy(r,e,t){var a=_n("update",t,e);a&&r.traverse(function(n){if(n instanceof sn){var i=zv(n);i&&n.animateFrom({style:i},a)}})}function $y(r,e){var t=r.length;if(t!==e.length)return!1;for(var a=0;a<t;a++){var n=r[a],i=e[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function Pl(r,e,t){var a=Zo(r),n=Zo(e);function i(y,x,b,I,_){(b||y)&&x.animateFrom({style:b&&b!==y?$($({},b.style),y.style):y.style},_)}var o=!1,s=zy,l=_t(),u=_t();a.forEach(function(y){y.groupId&&l.set(y.groupId,!0),y.childGroupId&&u.set(y.childGroupId,!0)});for(var v=0;v<n.length;v++){var f=n[v].groupId;if(u.get(f)){s=Uo;break}var c=n[v].childGroupId;if(c&&l.get(c)){s=$o;break}}function h(y,x){return function(b){var I=b.data,_=b.dataIndex;return x?I.getId(_):y?s===Uo?b.childGroupId:b.groupId:s===$o?b.childGroupId:b.groupId}}var d=$y(a,n),p={};if(!d)for(var v=0;v<n.length;v++){var g=n[v],S=g.data.getItemGraphicEl(g.dataIndex);S&&(p[S.id]=!0)}function m(y,x){var b=a[x],I=n[y],_=I.data.hostModel,T=b.data.getItemGraphicEl(b.dataIndex),w=I.data.getItemGraphicEl(I.dataIndex);if(T===w){w&&Uy(w,I.dataIndex,_);return}T&&p[T.id]||w&&(de(w),T?(de(T),Ca(T),o=!0,La(ue(T),ue(w),I.divide,_,y,i)):Aa(w,_,y))}new be(a,n,h(!0,d),h(!1,d),null,"multiple").update(m).updateManyToOne(function(y,x){var b=n[y],I=b.data,_=I.hostModel,T=I.getItemGraphicEl(b.dataIndex),w=Dt(G(x,function(D){return a[D].data.getItemGraphicEl(a[D].dataIndex)}),function(D){return D&&D!==T&&!p[D.id]});T&&(de(T),w.length?(N(w,function(D){de(D),Ca(D)}),o=!0,La(ue(w),ue(T),b.divide,_,y,i)):Aa(T,_,b.dataIndex))}).updateOneToMany(function(y,x){var b=a[x],I=b.data.getItemGraphicEl(b.dataIndex);if(!(I&&p[I.id])){var _=Dt(G(y,function(w){return n[w].data.getItemGraphicEl(n[w].dataIndex)}),function(w){return w&&w!==I}),T=n[y[0]].data.hostModel;_.length&&(N(_,function(w){return de(w)}),I?(de(I),Ca(I),o=!0,La(ue(I),ue(_),b.divide,T,y[0],i)):N(_,function(w){return Aa(w,T,y[0])}))}}).updateManyToMany(function(y,x){new be(x,y,function(b){return a[b].data.getId(a[b].dataIndex)},function(b){return n[b].data.getId(n[b].dataIndex)}).update(function(b,I){m(y[b],x[I])}).execute()}).execute(),o&&N(e,function(y){var x=y.data,b=x.hostModel,I=b&&t.getViewOfSeriesModel(b),_=_n("update",b,0);I&&b.isAnimationEnabled()&&_&&_.duration>0&&I.group.traverse(function(T){T instanceof gt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},_)})})}function Yo(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Xo(r){return B(r)?r.sort().join(","):r}function Yt(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Wy(r,e){var t=_t(),a=_t(),n=_t();return N(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=Yo(i),v=Xo(u);a.set(v,{dataGroupId:s,data:l}),B(u)&&N(u,function(f){n.set(f,{key:v,dataGroupId:s,data:l})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=Yo(i),u=Xo(l),v=a.get(u);if(v)t.set(u,{oldSeries:[{dataGroupId:v.dataGroupId,divide:Yt(v.data),data:v.data}],newSeries:[{dataGroupId:o,divide:Yt(s),data:s}]});else if(B(l)){var f=[];N(l,function(d){var p=a.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Yt(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Yt(s)}]})}else{var c=n.get(l);if(c){var h=t.get(c.key);h||(h={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:Yt(c.data)}],newSeries:[]},t.set(c.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Yt(s)})}}}}),t}function qo(r,e){for(var t=0;t<r.length;t++){var a=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(a)return t}}function Zy(r,e,t,a){var n=[],i=[];N(Bt(r.from),function(o){var s=qo(e.oldSeries,o);s>=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Yt(e.oldData[s]),groupIdDim:o.dimension})}),N(Bt(r.to),function(o){var s=qo(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Yt(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&Pl(n,i,a)}function Yy(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){N(Bt(a.seriesTransition),function(n){N(Bt(n.to),function(i){for(var o=a.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Wr]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,a){var n=By(t);if(n.oldSeries&&a.updatedSeries&&a.optionChanged){var i=a.seriesTransition;if(i)N(Bt(i),function(h){Zy(h,n,a,t)});else{var o=Wy(n,a);N(o.keys(),function(h){var d=o.get(h);Pl(d.oldSeries,d.newSeries,t)})}N(a.updatedSeries,function(h){h[Wr]&&(h[Wr]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],v=n.oldData=[],f=0;f<s.length;f++){var c=s[f].getData();c.count()<Ml&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),v.push(c))}})}W([Bv]);W([by]);W([Fv,Hv,Uv,Cf,$v,Wv,ac,kc,nh,cf,hh,_h,Xh,ip,xp,Tp,Vp,Hp,Zv,Xp,nd,Pd]);W(Yv);W(Xv);W(qv);W($d);W(cs);W(Kv);W(jv);W(Qv);W(Jv);W(ms);W(ig);W(tf);W(ef);W(cg);W(mg);W(wg);W(rf);W(af);W(nf);W(of);W(sf);W(lf);W(uf);W(vf);W(Og);W(Bg);W(Yy);W(_f);const Xy=hf({props:{width:{type:String,default:"100%"},height:{type:String,default:"calc(100vh - 78px)"}},setup(){const r=df(null),{setOptions:e}=Rl(r);return pf(()=>Hr(null,null,function*(){const t=yield(yield Nl(()=>Hr(null,null,function*(){const{default:a}=yield import("./china-Dgrv2CBN.js");return{default:a}}),[])).default;ff("china",t),e({visualMap:[{min:0,max:1e3,left:"left",top:"bottom",text:["",""],calculable:!1,orient:"horizontal",inRange:{color:["#e0ffff","#006edd"],symbolSize:[30,100]}}],tooltip:{trigger:"item",backgroundColor:"rgba(0, 0, 0, .6)",textStyle:{color:"#fff",fontSize:12}},series:[{name:"iphone4",type:"map",map:"china",label:{show:!0,color:"rgb(249, 249, 249)",fontSize:10},itemStyle:{areaColor:"#2f82ce",borderColor:"#0DAAC1"},data:Vl}]})})),{chartRef:r}}});function qy(r,e,t,a,n,i){return yf(),gf("div",{ref:"chartRef",style:mf({height:r.height,width:r.width})},null,4)}const lm=El(Xy,[["render",qy]]);export{lm as default};