var Us=Object.defineProperty,$s=Object.defineProperties;var Zs=Object.getOwnPropertyDescriptors;var Mn=Object.getOwnPropertySymbols;var Xs=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable;var Pn=(a,e,t)=>e in a?Us(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ma=(a,e)=>{for(var t in e||(e={}))Xs.call(e,t)&&Pn(a,t,e[t]);if(Mn)for(var t of Mn(e))Ys.call(e,t)&&Pn(a,t,e[t]);return a},Pa=(a,e)=>$s(a,Zs(e));var se=(a,e,t)=>new Promise((r,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?r(l.value):Promise.resolve(l.value).then(i,o);s((t=t.apply(a,e)).next())});import{a as qs,r as le,G as Ks,e3 as We,H as Js,J as Qs,bs as En,o as Nn,h as Rn,l as js,i as Me}from"./index.d96edf17.js";import{T as So,m as xt,B as ht,i as nt,k as zr,g as et,p as O,a as tl,f as At,s as el,b as al,h as rl,c as N,d as bo,j as _o,l as kn,n as nl,o as il,r as Ht,q as Dt,t as _t,v as it,w as xo,x as ye,_ as B,P as dt,G as at,R as Fr,y as ba,V as Hr,z as wo,A as Io,C as Ao,D as ut,S as Lo,E as gr,H as ol,F as sl,I as Do,J as pt,K as Tt,L as ia,M as yr,N as tt,O as ll,Q as U,U as H,W,X as _a,Y as Wr,Z as St,$ as yt,a0 as Yt,a1 as Gt,a2 as vt,a3 as To,a4 as Pe,a5 as ul,a6 as ne,a7 as kt,a8 as vl,a9 as cl,aa as Ee,ab as Wt,ac as Rt,ad as xa,ae as lt,af as fl,ag as ge,ah as st,ai as Vn,aj as hl,ak as Co,al as pl,am as Bn,an as Ue,ao as Gn,ap as ie,aq as Ot,ar as dl,as as Ur,at as qt,au as Mo,av as mr,aw as Po,ax as Et,ay as On,az as zt,aA as wa,aB as Zt,aC as Fe,aD as gl,aE as yl,aF as pe,aG as zn,aH as ml,aI as ft,aJ as Sr,aK as Pt,aL as oa,aM as br,aN as Eo,aO as $r,aP as Zr,aQ as No,aR as Ro,aS as Ne,aT as Ia,aU as Sl,aV as ko,aW as bl,aX as Xr,aY as me,aZ as He,a_ as Vo,a$ as Yr,b0 as qr,b1 as _l,b2 as xl,b3 as Fn,b4 as Kr,b5 as wl,b6 as Hn,b7 as Re,b8 as Jr,b9 as Qr,ba as Se,bb as Ut,bc as Il,bd as Al,be as jr,bf as Ll,bg as Dl,bh as $,bi as Bo,bj as Tl,bk as _r,bl as xr,bm as Cl,bn as Ml,bo as wr,bp as Ea,bq as Go,br as j,bs as tn,bt as en,bu as an,bv as Na,bw as Pl,bx as Oo,by as El,bz as Ie,bA as Nl,bB as Wn,bC as Rl,bD as zo,bE as Ir,bF as Aa,bG as kl,bH as Fo,bI as Ho,bJ as Un,bK as Vl,bL as Bl,bM as rn,bN as $n,bO as Zn,bP as Xn,bQ as Lt,bR as Gl,bS as Ol,bT as zl,bU as Fl,bV as Hl,bW as Wl,bX as Ul,bY as $l,bZ as Zl,b_ as Xl,b$ as Yl,c0 as ql,c1 as Wo,c2 as Kl,c3 as Jl,c4 as Ql,c5 as La,c6 as jl,c7 as tu,c8 as eu,c9 as au,ca as ru,cb as nu,cc as iu,cd as ou,ce as su,cf as lu,cg as Uo,ch as uu,ci as Da,cj as be,ck as $e,cl as ke,cm as vu,cn as cu,co as fu,cp as hu,cq as pu,cr as du,cs as re,ct as gu,cu as yu,cv as $o,cw as mu,cx as Su,cy as bu,cz as sa,cA as _u,cB as xu,cC as nn,cD as wu,cE as Zo,cF as Iu,cG as Au,cH as Lu,cI as Du,cJ as Tu,cK as Cu,cL as Yn,cM as Mu,cN as Pu,cO as Xo,cP as Ar,cQ as Eu,cR as Yo,cS as Nu,cT as Ru,cU as ku,cV as Vu,cW as Ze,cX as Bu,cY as Gu,cZ as Ou,c_ as Xe,c$ as zu,d0 as la,d1 as on,d2 as Fu,d3 as sn,d4 as Ra,d5 as Hu,d6 as Wu,d7 as Uu,d8 as $u,d9 as Zu,da as Xu,db as Yu,dc as qu,dd as Ku,de as Ju,df as Qu,dg as ju,dh as tv,di as ev,dj as av,dk as rv,dl as nv,dm as iv,dn as ov,dp as sv,dq as lv,dr as uv,ds as vv,dt as cv,du as fv,dv as hv,u as pv,dw as qn}from"./useECharts.3bc533c1.js";import{u as dv}from"./useVContext.196d6a81.js";import{a as gv,h as Kn}from"./other.2ace3f8e.js";import{u as yv}from"./visualization.e2a861b8.js";function mv(a){if(a){for(var e=[],t=0;t=0&&r.attr(i.oldLayoutSelect),_t(f,"emphasis")>=0&&r.attr(i.oldLayoutEmphasis)),it(r,u,t,l)}else if(r.attr(u),!il(r).valueAnimation){var c=Ht(r.style.opacity,1);r.style.opacity=0,Dt(r,{style:{opacity:c}},t,l)}if(i.oldLayout=u,r.states.select){var h=i.oldLayoutSelect={};Ye(h,u,qe),Ye(h,r.states.select,qe)}if(r.states.emphasis){var d=i.oldLayoutEmphasis={};Ye(d,u,qe),Ye(d,r.states.emphasis,qe)}xo(r,l,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=bv(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),it(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,Dt(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},a}(),xv=_v,Va=xt();function wv(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){var n=Va(t).labelManager;n||(n=Va(t).labelManager=new xv),n.clearLabels()}),a.registerUpdateLifecycle("series:layoutlabels",function(e,t,r){var n=Va(t).labelManager;r.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}function Iv(a){var e=a;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],r,n;r=t.pop();)if(n=r.children,r.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 Av(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,n=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){Tv(a);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(a.hierNode.prelim=n.hierNode.prelim+e(a,n),a.hierNode.modifier=a.hierNode.prelim-i):a.hierNode.prelim=i}else n&&(a.hierNode.prelim=n.hierNode.prelim+e(a,n));a.parentNode.hierNode.defaultAncestor=Cv(a,n,a.parentNode.hierNode.defaultAncestor||r[0],e)}function Lv(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Qn(a){return arguments.length?a:Ev}function Ae(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function Dv(a,e){return ye(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Tv(a){for(var e=a.children,t=e.length,r=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=r,i.hierNode.modifier+=r,n+=i.hierNode.change,r+=i.hierNode.shift+n}}function Cv(a,e,t,r){if(e){for(var n=a,i=a,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=s.hierNode.modifier;s=Ba(s),i=Ga(i),s&&i;){n=Ba(n),o=Ga(o),n.hierNode.ancestor=a;var f=s.hierNode.prelim+c-i.hierNode.prelim-u+r(s,i);f>0&&(Pv(Mv(s,a,t),a,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!Ba(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),i&&!Ga(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=a)}return t}function Ba(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function Ga(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function Mv(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function Pv(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function Ev(a,e){return a.parentNode===e.parentNode?1:2}var Nv=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),Rv=function(a){B(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Nv},e.prototype.buildPath=function(t,r){var n=r.childPoints,i=n.length,o=r.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=r.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,f=O(r.forkPosition,1),h=[];h[v]=o[v],h[c]=o[c]+(l[c]-o[c])*f,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;dS.x,x||(b=b-Math.PI));var w=x?"left":"right",I=s.getModel("label"),L=I.get("rotate"),A=L*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:I.get("position")||w,rotation:L==null?-b:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),P=C==="relative"?gr(o.getAncestorsIndices(),o.getDescendantIndices()):C==="ancestor"?o.getAncestorsIndices():C==="descendant"?o.getDescendantIndices():null;P&&(et(t).focus=P),Vv(n,o,v,t,d,h,p,r),t.__edge&&(t.onHoverStateChange=function(T){if(T!=="blur"){var M=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);M&&M.hoverState===ol||sl(t.__edge,T)}})}function Vv(a,e,t,r,n,i,o,s){var l=e.getModel(),u=a.get("edgeShape"),v=a.get("layout"),c=a.getOrient(),f=a.get(["lineStyle","curveness"]),h=a.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=r.__edge=new Do({shape:Lr(v,c,f,n,n)})),it(p,{shape:Lr(v,c,f,i,o)},a));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,m=[],S=0;St&&(t=n.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,n=r.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var r=t.getData().tree.root,n=a.targetNode;if(yt(n)&&(n=r.getNodeById(n)),n&&r.contains(n))return{node:n};var i=a.targetNodeId;if(i!=null&&(n=r.getNodeById(i)))return{node:n}}}function Qo(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function vn(a,e){var t=Qo(a);return _t(t,e)>=0}function Ta(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var Xv=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},n=t.leaves||{},i=new Yt(n,this,this.ecModel),o=un.createTree(r,this,s);function s(c){c.wrapMethod("getItemModel",function(f,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(f.parentModel=i),f})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.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,r,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 Gt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ta(n,this),r.collapsed=!n.isExpand,r},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(vt),Yv=Xv;function qv(a,e,t){for(var r=[a],n=[],i;i=r.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function Kv(a,e){a.eachSeriesByType("tree",function(t){Jv(t,e)})}function Jv(a,e){var t=Dv(a,e);a.layoutInfo=t;var r=a.get("layout"),n=0,i=0,o=null;r==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Qn(function(y,b){return(y.parentNode===b.parentNode?1:2)/y.depth})):(n=t.width,i=t.height,o=Qn());var s=a.getData().tree.root,l=s.children[0];if(l){Iv(s),qv(l,Av,o),s.hierNode.modifier=-l.hierNode.prelim,_e(l,Lv);var u=l,v=l,c=l;_e(l,function(y){var b=y.getLayout().x;bv.getLayout().x&&(v=y),y.depth>c.depth&&(c=y)});var f=u===v?1:o(u,v)/2,h=f-u.getLayout().x,d=0,p=0,g=0,m=0;if(r==="radial")d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),_e(l,function(y){g=(y.getLayout().x+h)*d,m=(y.depth-1)*p;var b=Ae(g,m);y.setLayout({x:b.x,y:b.y,rawX:g,rawY:m},!0)});else{var S=a.getOrient();S==="RL"||S==="LR"?(p=i/(v.getLayout().x+f+h),d=n/(c.depth-1||1),_e(l,function(y){m=(y.getLayout().x+h)*p,g=S==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:g,y:m},!0)})):(S==="TB"||S==="BT")&&(d=n/(v.getLayout().x+f+h),p=i/(c.depth-1||1),_e(l,function(y){g=(y.getLayout().x+h)*d,m=S==="TB"?(y.depth-1)*p:i-(y.depth-1)*p,y.setLayout({x:g,y:m},!0)}))}}}function Qv(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");U(s,o)})})}function jv(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var n=e.dataIndex,i=r.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=To(i,e,void 0,r);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function tc(a){a.registerChartView(Bv),a.registerSeriesModel(Yv),a.registerLayout(Kv),a.registerVisual(Qv),jv(a)}var ri=["treemapZoomToNode","treemapRender","treemapMove"];function ec(a){for(var e=0;e1;)i=i.parentNode;var o=ul(a.ecModel,i.name||i.dataIndex+"",r);n.setVisual("decal",o)})}var ac=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var n={name:t.name,children:t.data};ts(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Yt({itemStyle:o},this,r);i=t.levels=rc(i,r);var l=H(i||[],function(c){return new Yt(c,s,r)},this),u=un.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(f,h){var d=u.getNodeByDataIndex(h),p=d?l[d.depth]:null;return f.parentModel=p||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Gt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Ta(n,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},U(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=ne(),this._idIndexMapCount=0);var n=r.get(t);return n==null&&r.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 r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){jo(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(vt);function ts(a){var e=0;N(a.children,function(r){ts(r);var n=r.value;W(n)&&(n=n[0]),e+=n});var t=a.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(a.value)?a.value[0]=t:a.value=t}function rc(a,e){var t=kt(e.get("color")),r=kt(e.get(["aria","decal","decals"]));if(!!t){a=a||[];var n,i;N(a,function(s){var l=new Yt(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=a[0]||(a[0]={});return n||(o.color=t.slice()),!i&&r&&(o.decal=r.slice()),a}}var nc=ac,ic=8,ni=8,Oa=5,oc=function(){function a(e){this.group=new at,e.add(this.group)}return a.prototype.render=function(e,t,r,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!r)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),v=l.getModel(["itemStyle","textStyle"]),c={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(r,c,u),this._renderContent(e,c,s,l,u,v,n),vl(o,c.pos,c.box)}},a.prototype._prepare=function(e,t,r){for(var n=e;n;n=n.parentNode){var i=_a(n.getModel().get("name"),""),o=r.getTextRect(i),s=Math.max(o.width+ic*2,t.emptyItemWidth);t.totalWidth+=s+ni,t.renderList.push({node:n,text:i,width:s})}},a.prototype._renderContent=function(e,t,r,n,i,o,s){for(var l=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),c=cl(t.pos,t.box),f=t.totalWidth,h=t.renderList,d=n.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],m=g.node,S=g.width,y=g.text;f>c.width&&(f-=S-u,S=u,y=null);var b=new Ee({shape:{points:sc(l,0,S,v,p===h.length-1,p===0)},style:pt(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new Wt({style:Rt(i,{text:y})}),textConfig:{position:"inside"},z2:xa*1e4,onclick:tt(s,m)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=Rt(o,{text:y}),b.ensureState("emphasis").style=d,lt(b,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(b),lc(b,e,m),l+=S+ni}},a.prototype.remove=function(){this.group.removeAll()},a}();function sc(a,e,t,r,n,i){var o=[[n?a:a-Oa,e],[a+t,e],[a+t,e+r],[n?a:a-Oa,e+r]];return!i&&o.splice(2,0,[a+t+Oa,e+r/2]),!n&&o.push([a,e+r/2]),o}function lc(a,e,t){et(a).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Ta(t,e)}}var uc=oc,vc=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:n,easing:i}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;noi||Math.abs(t.dy)>oi)){var r=this.seriesModel.getData().tree.root;if(!r)return;var n=r.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 r=t.originX,n=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new ht(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;r-=l.x,n-=l.y;var u=pl();Vn(u,u,[-r,-n]),hl(u,u,[t.scale,t.scale]),Vn(u,u,[r,n]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var r=this;t.on("click",function(n){if(r._state==="ready"){var i=r.seriesModel.get("nodeClick",!0);if(!!i){var o=r.findTarget(n.offsetX,n.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(i==="zoomToNode")r._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&&Co(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new uc(this.group))).render(t,r,n.node,function(o){i._state!=="animating"&&(vn(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=xe(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,r){var 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,r),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(ut);function xe(){return{nodeGroup:[],background:[],content:[]}}function gc(a,e,t,r,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),c=a.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var h=v.width,d=v.height,p=v.borderWidth,g=v.invisible,m=o.getRawIndex(),S=s&&s.getRawIndex(),y=o.viewChildren,b=v.upperHeight,x=y&&y.length,_=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),I=f.getModel(["blur","itemStyle"]),L=f.getModel(["select","itemStyle"]),A=_.get("borderRadius")||0,D=J("nodeGroup",Dr);if(!D)return;if(l.add(D),D.x=v.x||0,D.y=v.y||0,D.markRedraw(),ua(D).nodeWidth=h,ua(D).nodeHeight=d,v.isAboveViewRoot)return D;var C=J("background",ii,u,hc);C&&V(D,C,x&&v.upperLabelHeight);var P=f.getModel("emphasis"),T=P.get("focus"),M=P.get("blurScope"),E=P.get("disabled"),R=T==="ancestor"?o.getAncestorsIndices():T==="descendant"?o.getDescendantIndices():T;if(x)Bn(D)&&Ue(D,!1),C&&(Ue(C,!E),c.setItemGraphicEl(o.dataIndex,C),Gn(C,R,M));else{var k=J("content",ii,u,pc);k&&G(D,k),C.disableMorphing=!0,C&&Bn(C)&&Ue(C,!1),Ue(D,!E),c.setItemGraphicEl(o.dataIndex,D),Gn(D,R,M)}return D;function V(Z,F,K){var q=et(F);if(q.dataIndex=o.dataIndex,q.seriesIndex=a.seriesIndex,F.setShape({x:0,y:0,width:h,height:d,r:A}),g)z(F);else{F.invisible=!1;var Q=o.getVisual("style"),ct=Q.stroke,wt=ui(_);wt.fill=ct;var rt=te(w);rt.fill=w.get("borderColor");var It=te(I);It.fill=I.get("borderColor");var Nt=te(L);if(Nt.fill=L.get("borderColor"),K){var oe=h-2*p;X(F,ct,Q.opacity,{x:p,y:0,width:oe,height:b})}else F.removeTextContent();F.setStyle(wt),F.ensureState("emphasis").style=rt,F.ensureState("blur").style=It,F.ensureState("select").style=Nt,ia(F)}Z.add(F)}function G(Z,F){var K=et(F);K.dataIndex=o.dataIndex,K.seriesIndex=a.seriesIndex;var q=Math.max(h-2*p,0),Q=Math.max(d-2*p,0);if(F.culling=!0,F.setShape({x:p,y:p,width:q,height:Q,r:A}),g)z(F);else{F.invisible=!1;var ct=o.getVisual("style"),wt=ct.fill,rt=ui(_);rt.fill=wt,rt.decal=ct.decal;var It=te(w),Nt=te(I),oe=te(L);X(F,wt,ct.opacity,null),F.setStyle(rt),F.ensureState("emphasis").style=It,F.ensureState("blur").style=Nt,F.ensureState("select").style=oe,ia(F)}Z.add(F)}function z(Z){!Z.invisible&&i.push(Z)}function X(Z,F,K,q){var Q=f.getModel(q?li:si),ct=_a(f.get("name"),null),wt=Q.getShallow("show");ie(Z,Ot(f,q?li:si),{defaultText:wt?ct:null,inheritColor:F,defaultOpacity:K,labelFetcher:a,labelDataIndex:o.dataIndex});var rt=Z.getTextContent();if(!!rt){var It=rt.style,Nt=dl(It.padding||0);q&&(Z.setTextConfig({layoutRect:q}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var Tn=Math.max((q?q.width:Z.shape.width)-Nt[1]-Nt[3],0),Cn=Math.max((q?q.height:Z.shape.height)-Nt[0]-Nt[2],0);(It.width!==Tn||It.height!==Cn)&&rt.setStyle({width:Tn,height:Cn})},It.truncateMinChar=2,It.lineOverflow="truncate",Y(It,q,v);var oe=rt.getState("emphasis");Y(oe?oe.style:null,q,v)}}function Y(Z,F,K){var q=Z?Z.text:null;if(!F&&K.isLeafRoot&&q!=null){var Q=a.get("drillDownIcon",!0);Z.text=Q?Q+" "+q:q}}function J(Z,F,K,q){var Q=S!=null&&t[Z][S],ct=n[Z];return Q?(t[Z][S]=null,ot(ct,Q)):g||(Q=new F,Q instanceof Ur&&(Q.z2=yc(K,q)),Ct(ct,Q)),e[Z][m]=Q}function ot(Z,F){var K=Z[m]={};F instanceof Dr?(K.oldX=F.x,K.oldY=F.y):K.oldShape=U({},F.shape)}function Ct(Z,F){var K=Z[m]={},q=o.parentNode,Q=F instanceof at;if(q&&(!r||r.direction==="drillDown")){var ct=0,wt=0,rt=n.background[q.getRawIndex()];!r&&rt&&rt.oldShape&&(ct=rt.oldShape.width,wt=rt.oldShape.height),Q?(K.oldX=0,K.oldY=wt):K.oldShape={x:ct,y:wt,width:0,height:0}}K.fadein=!Q}}function yc(a,e){return a*fc+e}var mc=dc,Sc="itemStyle",es=xt(),bc={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||as(t,{},a.getViewRoot().getAncestors(),a)}};function as(a,e,t,r){var n=a.getModel(),i=a.getLayout(),o=a.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(Sc),l=_c(s,e,r),u=o.ensureUniqueItemVisual(a.dataIndex,"style"),v=s.get("borderColor"),c=s.get("borderColorSaturation"),f;c!=null&&(f=vi(l),v=xc(c,f)),u.stroke=v;var h=a.viewChildren;if(!h||!h.length)f=vi(l),u.fill=f;else{var d=wc(a,n,i,s,l,h);N(h,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var m=Ic(n,l,p,g,d,r);as(p,m,t,r)}})}}}function _c(a,e,t){var r=U({},e),n=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=a.get(i);n[i]=null,o!=null&&(r[i]=o)}),r}function vi(a){var e=za(a,"color");if(e){var t=za(a,"colorAlpha"),r=za(a,"colorSaturation");return r&&(e=Mo(e,null,null,r)),t&&(e=mr(e,t)),e}}function xc(a,e){return e!=null?Mo(e,null,null,a):null}function za(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function wc(a,e,t,r,n,i){if(!(!i||!i.length)){var o=Fa(e,"color")||n.color!=null&&n.color!=="none"&&(Fa(e,"colorAlpha")||Fa(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var v=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new Po(c);return es(f).drColorMappingBy=v,f}}}function Fa(a,e){var t=a.get(e);return W(t)&&t.length?{name:e,range:t}:null}function Ic(a,e,t,r,n,i){var o=U({},e);if(n){var s=n.type,l=s==="color"&&es(n).drColorMappingBy,u=l==="index"?r:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Be=Math.max,va=Math.min,ci=Et,cn=N,rs=["itemStyle","borderWidth"],Ac=["itemStyle","gapWidth"],Lc=["upperLabel","show"],Dc=["upperLabel","height"],Tc={seriesType:"treemap",reset:function(a,e,t,r){var n=t.getWidth(),i=t.getHeight(),o=a.option,s=ye(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=O(ci(s.width,l[0]),n),v=O(ci(s.height,l[1]),i),c=r&&r.type,f=["treemapZoomToNode","treemapRootToNode"],h=Ve(r,f,a),d=c==="treemapRender"||c==="treemapMove"?r.rootRect:null,p=a.getViewRoot(),g=Qo(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?Rc(a,h,p,u,v):d?[d.width,d.height]:[u,v],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var y={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),ns(p,y,!1,0),b=p.getLayout(),cn(g,function(_,w){var I=(g[w+1]||p).getValue();_.setLayout(U({dataExtent:[I,I],borderWidth:0,upperHeight:0},b))})}var x=a.getData().tree.root;x.setLayout(kc(s,d,h),!0),a.setLayoutInfo(s),is(x,new ht(-s.x,-s.y,n,i),g,p,0)}};function ns(a,e,t,r){var n,i;if(!a.isRemoved()){var o=a.getLayout();n=o.width,i=o.height;var s=a.getModel(),l=s.get(rs),u=s.get(Ac)/2,v=os(s),c=Math.max(l,v),f=l-u,h=c-u;a.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:v},!0),n=Be(n-2*f,0),i=Be(i-f-h,0);var d=n*i,p=Cc(a,s,d,e,t,r);if(!!p.length){var g={x:f,y:h,width:n,height:i},m=va(n,i),S=1/0,y=[];y.area=0;for(var b=0,x=p.length;b=0;l--){var u=n[r==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function Nc(a,e,t){for(var r=0,n=1/0,i=0,o=void 0,s=a.length;ir&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Be(u*r/l,l/(u*n)):1/0}function fi(a,e,t,r,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?a.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var c=0,f=a.length;cOn&&(u=On),i=s}ur&&(r=e);var i=r%2?r+2:r+3;n=[];for(var o=0;o0&&(x[0]=-x[0],x[1]=-x[1]);var w=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var I=-Math.atan2(b[1],b[0]);c[0].8?"left":f[0]<-.8?"right":"center",p=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":i.x=-f[0]*m+v[0],i.y=-f[1]*S+v[1],d=f[0]>.8?"right":f[0]<-.8?"left":"center",p=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=m*w+v[0],i.y=v[1]+L,d=b[0]<0?"right":"left",i.originX=-m*w,i.originY=-L;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+L,d="center",i.originY=-L;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-m*w+c[0],i.y=c[1]+L,d=b[0]>=0?"right":"left",i.originX=m*w,i.originY=-L;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(at),dn=tf,ef=function(){function a(e){this.group=new at,this._LineCtor=e||dn}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,n=r.group,i=r._lineData;r._lineData=e,i||n.removeAll();var o=yi(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()},a.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yi(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!af(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function yi(a){var e=a.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ot(e)}}function mi(a){return isNaN(a[0])||isNaN(a[1])}function Za(a){return a&&!mi(a[0])&&!mi(a[1])}var gn=ef,Xa=[],Ya=[],qa=[],ve=ko,Ka=bl,Si=Math.abs;function bi(a,e,t){for(var r=a[0],n=a[1],i=a[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){Xa[0]=ve(r[0],n[0],i[0],v),Xa[1]=ve(r[1],n[1],i[1],v);var c=Si(Ka(Xa,e)-l);c=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Ja(a,e){var t=[],r=Sl,n=[[],[],[]],i=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Zt(u[0]),Zt(u[1])],u[2]&&u.__original.push(Zt(u[2])));var f=u.__original;if(u[2]!=null){if(ft(n[0],f[0]),ft(n[1],f[2]),ft(n[2],f[1]),v&&v!=="none"){var h=De(s.node1),d=bi(n,f[0],h*e);r(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],r(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var h=De(s.node2),d=bi(n,f[1],h*e);r(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],r(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}ft(u[0],n[0]),ft(u[1],n[2]),ft(u[2],n[1])}else{if(ft(i[0],f[0]),ft(i[1],f[1]),pe(o,i[1],i[0]),Fe(o,o),v&&v!=="none"){var h=De(s.node1);Sr(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=De(s.node2);Sr(i[1],i[1],o,-h*e)}ft(u[0],i[0]),ft(u[1],i[1])}})}function _i(a){return a.type==="view"}var rf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var n=new Xr,i=new gn,o=this.group;this._controller=new Fr(r.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,r,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(_i(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):it(u,v,t)}Ja(t.getGraph(),Le(t));var c=t.getData();s.updateData(c);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,r,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");c.graph.eachNode(function(y){var b=y.dataIndex,x=y.getGraphicEl(),_=y.getModel();if(!!x){x.off("drag").off("dragend");var w=_.get("draggable");w&&x.on("drag",function(L){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(b),c.setItemLayout(b,[x.x,x.y]);break;case"circular":c.setItemLayout(b,[x.x,x.y]),y.setLayout({fixed:!0},!0),pn(t,"symbolSize",y,[L.offsetX,L.offsetY]),i.updateLayout(t);break;case"none":default:c.setItemLayout(b,[x.x,x.y]),hn(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(b)}),x.setDraggable(w&&!!h,!!_.get("cursor"));var I=_.get(["emphasis","focus"]);I==="adjacency"&&(et(x).focus=y.getAdjacentDataIndices())}}),c.graph.eachEdge(function(y){var b=y.getGraphicEl(),x=y.getModel().get(["emphasis","focus"]);!b||x==="adjacency"&&(et(b).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=c.getLayout("cx"),S=c.getLayout("cy");c.graph.eachNode(function(y){vs(y,g,m,S)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(r?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,c)&&!wo(u,n,t)}),!_i(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){Io(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ao(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(),Ja(t.getGraph(),Le(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),n=Le(t);r.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Ja(t.getGraph(),Le(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ut),nf=rf;function ce(a){return"_EC_"+a}var of=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(!r[ce(e)]){var n=new ee(e,t);return n.hostGraph=this,this.nodes.push(n),r[ce(e)]=n,n}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[ce(e)]},a.prototype.addEdge=function(e,t,r){var n=this._nodesMap,i=this._edgesMap;if(zt(e)&&(e=this.nodes[e]),zt(t)&&(t=this.nodes[t]),e instanceof ee||(e=n[ce(e)]),t instanceof ee||(t=n[ce(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new fs(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof ee&&(e=e.id),t instanceof ee&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,n=r.length,i=0;i=0&&e.call(t,r[i],i)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&e.call(t,r[i],i)},a.prototype.breadthFirstTraverse=function(e,t,r,n){if(t instanceof ee||(t=this._nodesMap[ce(t)]),!!t){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}me(ee,hs("hostGraph","data"));me(fs,hs("hostGraph","edgeData"));var sf=of;function ps(a,e,t,r,n){for(var i=new sf(r),o=0;o "+f)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar")d=He(a,t);else{var p=Vo.get(h),g=p?p.dimensions||[]:[];_t(g,"value")<0&&g.concat(["value"]);var m=Wr(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new St(m,t),d.initData(a)}var S=new St(["value"],t);return S.initData(l,s),n&&n(d,S),Ko({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var lf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function n(){return r._categoriesData}this.legendVisualProvider=new Yr(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),qr(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){Hc(this);var s=ps(i,n,this,!0,l);return N(s.edges,function(u){Wc(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"),m=p[g];return m&&(m.parentModel=d.parentModel,d.parentModel=m),d});var c=Yt.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}v.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,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,r,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),Gt("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=_l({series:this,dataIndex:t,multipleSeries:r});return c},e.prototype._updateCategoriesData=function(){var t=H(this.option.categories||[],function(n){return n.value!=null?n:U({value:0},n)}),r=new St(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(n){return r.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 a.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(vt),uf=lf,vf={type:"graphRoam",event:"graphRoam",update:"none"};function cf(a){a.registerChartView(nf),a.registerSeriesModel(uf),a.registerProcessor(Bc),a.registerVisual(Gc),a.registerVisual(Oc),a.registerLayout(Uc),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,Zc),a.registerLayout(Yc),a.registerCoordinateSystem("graphView",{dimensions:Hr.dimensions,create:Kc}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Pe),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Pe),a.registerAction(vf,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=To(i,e,void 0,r);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var ff=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),hf=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new ff},e.prototype.buildPath=function(t,r){var n=Math.cos,i=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-n(l)*s*(s>=o/3?1:2),v=r.y-i(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(r.x+n(l)*s,r.y+i(l)*s),t.lineTo(r.x+n(r.angle)*o,r.y+i(r.angle)*o),t.lineTo(r.x-n(l)*s,r.y-i(l)*s),t.lineTo(u,v)},e}(dt),pf=hf;function df(a,e){var t=a.get("center"),r=e.getWidth(),n=e.getHeight(),i=Math.min(r,n),o=O(t[0],e.getWidth()),s=O(t[1],e.getHeight()),l=O(a.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Je(a,e){var t=a==null?"":a+"";return e&&(yt(e)?t=e.replace("{value}",t):nt(e)&&(t=e(a))),t}var gf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=df(t,n);this._renderMain(t,r,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),f=c.get("roundCap"),h=f?Hn:Re,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),m=[u,v];xl(m,!l),u=m[0],v=m[1];for(var S=v-u,y=u,b=0;d&&b=I&&(L===0?0:i[L-1][0])Math.PI/2&&(J+=Math.PI)):Y==="tangential"?J=-I-Math.PI/2:zt(Y)&&(J=Y*Math.PI/180),J===0?c.add(new Wt({style:Rt(y,{text:V,x:z,y:X,verticalAlign:M<-.8?"top":M>.8?"bottom":"middle",align:T<-.4?"left":T>.4?"right":"center"},{inheritColor:G}),silent:!0})):c.add(new Wt({style:Rt(y,{text:V,x:z,y:X,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:z,originY:X,rotation:J}))}if(S.get("show")&&E!==b){var R=S.get("distance");R=R?R+v:v;for(var ot=0;ot<=x;ot++){T=Math.cos(I),M=Math.sin(I);var Ct=new oa({shape:{x1:T*(d-R)+f,y1:M*(d-R)+h,x2:T*(d-w-R)+f,y2:M*(d-w-R)+h},silent:!0,style:C});C.stroke==="auto"&&Ct.setStyle({stroke:i((E+ot/x)/b)}),c.add(Ct),I+=A}I-=A}else I+=L}},e.prototype._renderPointer=function(t,r,n,i,o,s,l,u,v){var c=this.group,f=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),m=g.get("show"),S=t.getData(),y=S.mapDimension("value"),b=+t.get("min"),x=+t.get("max"),_=[b,x],w=[s,l];function I(A,D){var C=S.getItemModel(A),P=C.getModel("pointer"),T=O(P.get("width"),o.r),M=O(P.get("length"),o.r),E=t.get(["pointer","icon"]),R=P.get("offsetCenter"),k=O(R[0],o.r),V=O(R[1],o.r),G=P.get("keepAspect"),z;return E?z=Ne(E,k-T/2,V-M,T,M,null,G):z=new pf({shape:{angle:-Math.PI/2,width:T,r:M,x:k,y:V}}),z.rotation=-(D+Math.PI/2),z.x=o.cx,z.y=o.cy,z}function L(A,D){var C=g.get("roundCap"),P=C?Hn:Re,T=g.get("overlap"),M=T?g.get("width"):v/S.count(),E=T?o.r-M:o.r-(A+1)*M,R=T?o.r:o.r-A*M,k=new P({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:R}});return T&&(k.z2=x-S.get(y,A)%x),k}(m||p)&&(S.diff(f).add(function(A){var D=S.get(y,A);if(p){var C=I(A,s);Dt(C,{rotation:-((isNaN(+D)?w[0]:Pt(D,_,w,!0))+Math.PI/2)},t),c.add(C),S.setItemGraphicEl(A,C)}if(m){var P=L(A,s),T=g.get("clip");Dt(P,{shape:{endAngle:Pt(D,_,w,T)}},t),c.add(P),Fn(t.seriesIndex,S.dataType,A,P),d[A]=P}}).update(function(A,D){var C=S.get(y,A);if(p){var P=f.getItemGraphicEl(D),T=P?P.rotation:s,M=I(A,T);M.rotation=T,it(M,{rotation:-((isNaN(+C)?w[0]:Pt(C,_,w,!0))+Math.PI/2)},t),c.add(M),S.setItemGraphicEl(A,M)}if(m){var E=h[D],R=E?E.shape.endAngle:s,k=L(A,R),V=g.get("clip");it(k,{shape:{endAngle:Pt(C,_,w,V)}},t),c.add(k),Fn(t.seriesIndex,S.dataType,A,k),d[A]=k}}).execute(),S.each(function(A){var D=S.getItemModel(A),C=D.getModel("emphasis"),P=C.get("focus"),T=C.get("blurScope"),M=C.get("disabled");if(p){var E=S.getItemGraphicEl(A),R=S.getItemVisual(A,"style"),k=R.fill;if(E instanceof Kr){var V=E.style;E.useStyle(U({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},R))}else E.useStyle(R),E.type!=="pointer"&&E.setColor(k);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Pt(S.get(y,A),_,[0,1],!0))),E.z2EmphasisLift=0,Tt(E,D),lt(E,P,T,M)}if(m){var G=d[A];G.useStyle(S.getItemVisual(A,"style")),G.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,Tt(G,D),lt(G,P,T,M)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,r){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),v=Ne(s,r.cx-o/2+O(l[0],r.r),r.cy-o/2+O(l[1],r.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,r,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),f=new at,h=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){h[m]=new Wt({silent:!0}),d[m]=new Wt({silent:!0})}).update(function(m,S){h[m]=s._titleEls[S],d[m]=s._detailEls[S]}).execute(),l.each(function(m){var S=l.getItemModel(m),y=l.get(u,m),b=new at,x=i(Pt(y,[v,c],[0,1],!0)),_=S.getModel("title");if(_.get("show")){var w=_.get("offsetCenter"),I=o.cx+O(w[0],o.r),L=o.cy+O(w[1],o.r),A=h[m];A.attr({z2:g?0:2,style:Rt(_,{x:I,y:L,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:x})}),b.add(A)}var D=S.getModel("detail");if(D.get("show")){var C=D.get("offsetCenter"),P=o.cx+O(C[0],o.r),T=o.cy+O(C[1],o.r),M=O(D.get("width"),o.r),E=O(D.get("height"),o.r),R=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:x,A=d[m],k=D.get("formatter");A.attr({z2:g?0:2,style:Rt(D,{x:P,y:T,text:Je(y,k),width:isNaN(M)?null:M,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:R})}),wl(A,{normal:D},y,function(G){return Je(G,k)}),p&&xo(A,m,l,t,{getFormattedLabel:function(G,z,X,Y,J,ot){return Je(ot?ot.interpolatedValue:y,k)}}),b.add(A)}f.add(b)}),this.group.add(f),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(ut),yf=gf,mf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return Jr(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(vt),Sf=mf;function bf(a){a.registerChartView(yf),a.registerSeriesModel(Sf)}var _f=["itemStyle","opacity"],xf=function(a){B(e,a);function e(t,r){var n=a.call(this)||this,i=n,o=new Qr,s=new Wt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,r,!0),n}return e.prototype.updateData=function(t,r,n){var i=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),v=s.get(_f);v=v==null?1:v,n||Se(i),i.useStyle(t.getItemVisual(r,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Dt(i,{style:{opacity:v}},o,r)):it(i,{style:{opacity:v},shape:{points:l.points}},o,r),Tt(i,s),this._updateLabel(t,r),lt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),v=u.label,c=t.getItemVisual(r,"style"),f=c.fill;ie(o,Ot(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:c.opacity,defaultText:t.getName(r)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var h=v.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Ut(h[0][0],h[0][1]):null},it(o,{style:{x:v.x,y:v.y}},s,r),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),bo(n,_o(l),{stroke:f})},e}(Ee),wf=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new xf(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);Il(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}(ut),If=wf,Af=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yr(st(this.getData,this),st(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return Jr(this,{coordDimensions:["value"],encodeDefaulter:tt(Al,this)})},e.prototype._defaultLabelLine=function(t){qr(t,"labelLine",["show"]);var r=t.labelLine,n=t.emphasis.labelLine;r.show=r.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),n=a.prototype.getDataParams.call(this,t),i=r.mapDimension("value"),o=r.getSum(i);return n.percent=o?+(r.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}(vt),Lf=Af;function Df(a,e){return ye(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Tf(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=a.count();o=0&&(s[o[l].depth]=new Yt(o[l],this,r));if(i&&n){var u=ps(i,n,this,!0,v);return u.data}function v(c,f){c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var m=g.depth,S=p.levelModels[m];S&&(h.parentModel=S)}return h}),f.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),m=g.node1.getLayout();if(m){var S=m.depth,y=p.levelModels[S];y&&(h.parentModel=y)}return h})}},e.prototype.setNodePosition=function(t,r){var n=this.option.data||this.option.nodes,i=n[t];i.localX=r[0],i.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,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 Gt("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,f=this.getDataParams(t,n).data.name;return Gt("nameValue",{name:f!=null?f+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var n=a.prototype.getDataParams.call(this,t,r);if(n.value==null&&r==="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},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}(vt),Jf=Kf;function Qf(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),n=t.get("nodeGap"),i=jf(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;eh(u);var c=At(u,function(p){return p.getLayout().value===0}),f=c.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),d=t.get("nodeAlign");th(u,v,r,n,o,s,f,h,d)})}function jf(a,e){return ye(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function th(a,e,t,r,n,i,o,s,l){ah(a,e,t,n,i,s,l),oh(a,e,i,n,r,o,s),dh(a,s)}function eh(a){N(a,function(e){var t=Xt(e.outEdges,ca),r=Xt(e.inEdges,ca),n=e.getValue()||0,i=Math.max(t,r,n);e.setLayout({value:i},!0)})}function ah(a,e,t,r,n,i,o){for(var s=[],l=[],u=[],v=[],c=0,f=0;f=0;m&&g.depth>h&&(h=g.depth),p.setLayout({depth:m?g.depth:c},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var S=0;Sc-1?h:c-1;o&&o!=="left"&&rh(a,o,i,w);var I=i==="vertical"?(n-t)/w:(r-t)/w;ih(a,I,i)}function gs(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function rh(a,e,t,r){if(e==="right"){for(var n=[],i=a,o=0;i.length;){for(var s=0;s0;i--)l*=.99,uh(s,l,o),ja(s,n,t,r,o),ph(s,l,o),ja(s,n,t,r,o)}function sh(a,e){var t=[],r=e==="vertical"?"y":"x",n=_r(a,function(i){return i.getLayout()[r]});return n.keys.sort(function(i,o){return i-o}),N(n.keys,function(i){t.push(n.buckets.get(i))}),t}function lh(a,e,t,r,n,i){var o=1/0;N(a,function(s){var l=s.length,u=0;N(s,function(c){u+=c.getLayout().value});var v=i==="vertical"?(r-(l-1)*n)/u:(t-(l-1)*n)/u;v0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]+l.getLayout()[f]+e;var d=n==="vertical"?r: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=c-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[f]+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 uh(a,e,t){N(a.slice().reverse(),function(r){N(r,function(n){if(n.outEdges.length){var i=Xt(n.outEdges,vh,t)/Xt(n.outEdges,ca);if(isNaN(i)){var o=n.outEdges.length;i=o?Xt(n.outEdges,ch,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Kt(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Kt(n,t))*e;n.setLayout({y:l},!0)}}})})}function vh(a,e){return Kt(a.node2,e)*a.getValue()}function ch(a,e){return Kt(a.node2,e)}function fh(a,e){return Kt(a.node1,e)*a.getValue()}function hh(a,e){return Kt(a.node1,e)}function Kt(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function ca(a){return a.getValue()}function Xt(a,e,t){for(var r=0,n=a.length,i=-1;++ii&&(i=s)}),N(r,function(o){var s=new Po({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}),l=s.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",l),o.setVisual("style",{fill:l}))})}})}function yh(a){a.registerChartView(qf),a.registerSeriesModel(Jf),a.registerLayout(Qf),a.registerVisual(gh),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var ys=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,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",r=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],f=u[1-v],h=[n,i],d=h[v].get("type"),p=h[1-v].get("type"),g=e.data;if(g&&l){var m=[];N(g,function(b,x){var _;W(b)?(_=b.slice(),b.unshift(x)):W(b.value)?(_=U({},b),_.value=_.value.slice(),b.value.unshift(x)):_=b,m.push(_)}),e.data=m}var S=this.defaultValueDimensions,y=[{name:c,type:xr(d),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:xr(p),dimsDef:S.slice()}];return Jr(this,{coordDimensions:y,dimensionsCount:S.length+1,encodeDefaulter:tt(Cl,y,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),ms=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(vt);me(ms,ys,!0);var mh=ms,Sh=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,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),c=Ii(v,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var f=i.getItemLayout(u);c?(Se(c),Ss(f,c,i,u)):c=Ii(f,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var r=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&r.remove(i)})},e.type="boxplot",e}(ut),bh=function(){function a(){}return a}(),_h=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new bh},e.prototype.buildPath=function(t,r){var n=r.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();ip){var b=[m,y];r.push(b)}}}return{boxData:t,outliers:r}}var Mh={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Go){var r="";j(r)}var n=Ch(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function Ph(a){a.registerSeriesModel(mh),a.registerChartView(wh),a.registerVisual(Ih),a.registerLayout(Ah),a.registerTransform(Mh)}var Eh=["color","borderColor"],Nh=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){Ia(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),n=this._data,i=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),r.diff(n).add(function(v){if(r.hasValue(v)){var c=r.getItemLayout(v);if(s&&Ai(u,c))return;var f=tr(c,v,!0);Dt(f,{shape:{points:c.ends}},t,v),er(f,r,v,o),i.add(f),r.setItemGraphicEl(v,f)}}).update(function(v,c){var f=n.getItemGraphicEl(c);if(!r.hasValue(v)){i.remove(f);return}var h=r.getItemLayout(v);if(s&&Ai(u,h)){i.remove(f);return}f?(it(f,{shape:{points:h.ends}},t,v),Se(f)):f=tr(h),er(f,r,v,o),i.add(f),r.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),Di(t,this.group);var r=t.get("clip",!0)?tn(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var n=r.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=tr(s);er(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){Di(r,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ut),Rh=function(){function a(){}return a}(),kh=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new Rh},e.prototype.buildPath=function(t,r){var n=r.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}(dt);function tr(a,e,t){var r=a.ends;return new kh({shape:{points:t?Vh(r,a):r},z2:100})}function Ai(a,e){for(var t=!0,r=0;r0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]),i=t.getModel("itemStyle").getItemStyle(Eh);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var Gh=Nh,bs=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,r,n){var i=r.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",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(vt);me(bs,ys,!0);var Oh=bs;function zh(a){!a||!W(a.series)||N(a.series,function(e){en(e)&&e.type==="k"&&(e.type="candlestick")})}var Fh=["itemStyle","borderColor"],Hh=["itemStyle","borderColor0"],Wh=["itemStyle","color"],Uh=["itemStyle","color0"],$h={seriesType:"candlestick",plan:an(),performRawSeries:!0,reset:function(a,e){function t(i,o){return o.get(i>0?Wh:Uh)}function r(i,o){return o.get(i>0?Fh:Hh)}if(!e.isSeriesFiltered(a)){var n=a.pipelineContext.large;return!n&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,v=l.getItemStyle();v.fill=t(u,l),v.stroke=r(u,l)||v.fill;var c=o.ensureUniqueItemVisual(s,"style");U(c,v)}}}}}},Zh=$h,Xh={seriesType:"candlestick",plan:an(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=Yh(a,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=H(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],c=l[2],f=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?d:h};function h(p,g){for(var m,S=g.getStore();(m=p.next())!=null;){var y=S.get(s,m),b=S.get(u,m),x=S.get(v,m),_=S.get(c,m),w=S.get(f,m),I=Math.min(b,x),L=Math.max(b,x),A=M(I,y),D=M(L,y),C=M(_,y),P=M(w,y),T=[];E(T,D,0),E(T,A,1),T.push(k(P),k(D),k(C),k(A)),g.setItemLayout(m,{sign:Ci(S,m,b,x,v),initBaseline:b>x?D[i]:A[i],ends:T,brushRect:R(_,w,y)})}function M(V,G){var z=[];return z[n]=G,z[i]=V,isNaN(G)||isNaN(V)?[NaN,NaN]:e.dataToPoint(z)}function E(V,G,z){var X=G.slice(),Y=G.slice();X[n]=Na(X[n]+r/2,1,!1),Y[n]=Na(Y[n]-r/2,1,!0),z?V.push(X,Y):V.push(Y,X)}function R(V,G,z){var X=M(V,z),Y=M(G,z);return X[n]-=r/2,Y[n]-=r/2,{x:X[0],y:X[1],width:r,height:Y[1]-X[1]}}function k(V){return V[n]=Na(V[n],1),V}}function d(p,g){for(var m=Pl(p.count*4),S=0,y,b=[],x=[],_,w=g.getStore();(_=p.next())!=null;){var I=w.get(s,_),L=w.get(u,_),A=w.get(v,_),D=w.get(c,_),C=w.get(f,_);if(isNaN(I)||isNaN(D)||isNaN(C)){m[S++]=NaN,S+=3;continue}m[S++]=Ci(w,_,L,A,v),b[n]=I,b[i]=D,y=e.dataToPoint(b,null,x),m[S++]=y?y[0]:NaN,m[S++]=y?y[1]:NaN,b[i]=C,y=e.dataToPoint(b,null,x),m[S++]=y?y[1]:NaN}g.setLayout("largePoints",m)}}};function Ci(a,e,t,r,n){var i;return t>r?i=-1:t0?a.get(n,e-1)<=r?1:-1:1,i}function Yh(a,e){var t=a.getBaseAxis(),r,n=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),i=O(Ht(a.get("barMaxWidth"),n),n),o=O(Ht(a.get("barMinWidth"),1),n),s=a.get("barWidth");return s!=null?O(s,n):Math.max(Math.min(n/2,i),o)}var qh=Xh;function Kh(a){a.registerChartView(Gh),a.registerSeriesModel(Oh),a.registerPreprocessor(zh),a.registerVisual(Zh),a.registerLayout(qh)}function Mi(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var Jh=function(a){B(e,a);function e(t,r){var n=a.call(this)||this,i=new Lo(t,r),o=new at;return n.add(i),n.add(o),n.updateData(t,r),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/v*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;nt(c)?f=c(n):f=c,i.__t>0&&(f=-s*i.__t),this._animateSymbol(i,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,r,n,i,o){if(r>0){t.__t=0;var s=this,l=t.animate("",i).when(o?r*2:r,{__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 Ie(t.__p1,t.__cp1)+Ie(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,n){this.childAt(0).updateData(t,r,n),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=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=ko,v=Nl;s[0]=u(r[0],i[0],n[0],o),s[1]=u(r[1],i[1],n[1],o);var c=t.__t<1?v(r[0],i[0],n[0],o):v(n[0],i[0],r[0],1-o),f=t.__t<1?v(r[1],i[1],n[1],o):v(n[1],i[1],r[1],1-o);t.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;lr);l++);l=Math.min(l-1,o-2)}var v=(r-i[l])/(i[l+1]-i[l]),c=n[l],f=n[l+1];t.x=c[0]*(1-v)+v*f[0],t.y=c[1]*(1-v)+v*f[1];var h=t.__t<1?f[0]-c[0]:c[0]-f[0],d=t.__t<1?f[1]-c[1]:c[1]-f[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(_s),sp=op,lp=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),up=function(a){B(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new lp},e.prototype.buildPath=function(t,r){var n=r.segs,i=r.curveness,o;if(r.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var h=(u+c)/2-(v-f)*i,d=(v+f)/2-(c-u)*i;t.quadraticCurveTo(h,d,c,f)}else t.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var c=i[u++],f=i[u++],h=1;h0){var g=(c+d)/2-(f-p)*o,m=(f+p)/2-(d-c)*o;if(Rl(c,f,g,m,d,p,s,t,r))return l}else if(Wn(c,f,d,p,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var n=this.transformCoordToLocal(t,r),i=this.getBoundingRect();if(t=n[0],r=n[1],i.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,n=r.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),cp=vp,fp={seriesType:"lines",plan:an(),reset:function(a){var e=a.coordinateSystem;if(!!e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(n,i){var o=[];if(r){var s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v0&&(v||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var c=t.get("clip",!0)&&tn(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,n){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=ws.reset(t,r,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,r){var n=this._lineDraw,i=this._showEffect(r),o=!!r.get("polyline"),s=r.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 gn(o?i?sp:xs:i?_s:dn),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 r=t.getZr(),n=r.painter.getType()==="svg";!n&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(ut),pp=hp,dp=typeof Uint32Array=="undefined"?Array:Uint32Array,gp=typeof Float64Array=="undefined"?Array:Float64Array;function Pi(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=H(e,function(t){var r=[t[0].coord,t[1].coord],n={coords:r};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),zo([n,t[0],t[1]])}))}var yp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Pi(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Pi(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=gr(this._flatCoords,r.flatCoords),this._flatCoordsOffset=gr(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),n=r.option instanceof Array?r.option:r.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,r){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(vt),mp=yp;function Qe(a){return a instanceof Array||(a=[a,a]),a}var Sp={seriesType:"lines",reset:function(a){var e=Qe(a.get("symbol")),t=Qe(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=Qe(s.getShallow("symbol",!0)),u=Qe(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:r.hasItemOption?n:null}}},bp=Sp;function _p(a){a.registerChartView(pp),a.registerSeriesModel(mp),a.registerLayout(ws),a.registerVisual(bp)}var xp=256,wp=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ir.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),h=e.length;c.width=t,c.height=r;for(var d=0;d0){var C=o(y)?l:u;y>0&&(y=y*A+I),x[_++]=C[D],x[_++]=C[D+1],x[_++]=C[D+2],x[_++]=C[D+3]*y*256}else _+=4}return f.putImageData(b,0,0),c},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ir.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var n=e.getContext("2d");return n.clearRect(0,0,r,r),n.shadowOffsetX=r,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},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,n=r[t]||(r[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},a}(),Ip=wp;function Ap(a,e,t){var r=a[1]-a[0];e=H(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&r<=e[1]}}function Ei(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Dp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n){var i;r.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()):Ei(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,n,i){var o=r.coordinateSystem;o&&(Ei(o)?this.render(r,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Ia(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,n,i,o){var s=t.coordinateSystem,l=Aa(s,"cartesian2d"),u,v,c,f;if(l){var h=s.getAxis("x"),d=s.getAxis("y");u=h.getBandWidth()+.5,v=d.getBandWidth()+.5,c=h.scale.getExtent(),f=d.scale.getExtent()}for(var p=this.group,g=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=Ot(t),_=t.getModel("emphasis"),w=_.get("focus"),I=_.get("blurScope"),L=_.get("disabled"),A=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=n;Dc[1]||Mf[1])continue;var E=s.dataToPoint([T,M]);C=new qt({shape:{x:E[0]-u/2,y:E[1]-v/2,width:u,height:v},style:P})}else{if(isNaN(g.get(A[1],D)))continue;C=new qt({z2:1,shape:s.dataToRect([g.get(A[0],D)]).contentShape,style:P})}if(g.hasItemOption){var R=g.getItemModel(D),k=R.getModel("emphasis");m=k.getModel("itemStyle").getItemStyle(),S=R.getModel(["blur","itemStyle"]).getItemStyle(),y=R.getModel(["select","itemStyle"]).getItemStyle(),b=R.get(["itemStyle","borderRadius"]),w=k.get("focus"),I=k.get("blurScope"),L=k.get("disabled"),x=Ot(R)}C.shape.r=b;var V=t.getRawValue(D),G="-";V&&V[2]!=null&&(G=V[2]+""),ie(C,x,{labelFetcher:t,labelDataIndex:D,defaultOpacity:P.opacity,defaultText:G}),C.ensureState("emphasis").style=m,C.ensureState("blur").style=S,C.ensureState("select").style=y,lt(C,w,I,L),C.incremental=o,o&&(C.states.emphasis.hoverLayer=!0),p.add(C),g.setItemGraphicEl(D,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,r,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new Ip;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var v=t.getViewRect().clone(),c=t.getRoamTransform();v.applyTransform(c);var f=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-f,m=p-h,S=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],y=l.mapArray(S,function(w,I,L){var A=t.dataToPoint([w,I]);return A[0]-=f,A[1]-=h,A.push(L),A}),b=n.getExtent(),x=n.type==="visualMap.continuous"?Lp(b,n.option.range):Ap(b,n.getPieceList(),n.option.selected);u.update(y,g,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var _=new Kr({style:{width:g,height:m,x:f,y:h,image:u.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(ut),Tp=Dp,Cp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return He(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Vo.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}(vt),Mp=Cp;function Pp(a){a.registerChartView(Tp),a.registerSeriesModel(Mp)}var Ep=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;s.x=0,s.y=v.y+c[0];function f(g){return g.name}var h=new ge(this._layersSeries||[],l,f,f),d=[];h.add(st(p,this,"add")).update(st(p,this,"update")).remove(st(p,this,"remove")).execute();function p(g,m,S){var y=o._layers;if(g==="remove"){s.remove(y[m]);return}for(var b=[],x=[],_,w=l[m].indices,I=0;Ii&&(i=s),r.push(s)}for(var u=0;ui&&(i=c)}return{y0:n,max:i}}function Op(a){a.registerChartView(Rp),a.registerSeriesModel(Vp),a.registerLayout(Bp),a.registerProcessor(jr("themeRiver"))}var zp=2,Fp=4,Hp=function(a){B(e,a);function e(t,r,n,i){var o=a.call(this)||this;o.z2=zp,o.textConfig={inside:!0},et(o).seriesIndex=r.seriesIndex;var s=new Wt({z2:Fp,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,n,i),o}return e.prototype.updateData=function(t,r,n,i,o){this.node=r,r.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;et(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),v=r.getLayout(),c=U({},v);c.label=null;var f=r.getVisual("style");f.lineJoin="bevel";var h=r.getVisual("decal");h&&(f.decal=Ho(h,o));var d=Un(l.getModel("itemStyle"),c,!0);U(c,d),N(br,function(S){var y=s.ensureState(S),b=l.getModel([S,"itemStyle"]);y.style=b.getItemStyle();var x=Un(b,c);x&&(y.shape=x)}),t?(s.setShape(c),s.shape.r=v.r0,it(s,{shape:{r:v.r}},n,r.dataIndex)):(it(s,{shape:c},n),Se(s)),s.useStyle(f),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"),m=g==="ancestor"?r.getAncestorsIndices():g==="descendant"?r.getDescendantIndices():g;lt(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=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),c=this,f=c.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)Math.PI/2?"right":"left"):!C||C==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,C="center"):C==="left"?(A=o.r0+D,l>Math.PI/2&&(C="right")):C==="right"&&(A=o.r-D,l>Math.PI/2&&(C="left")),b.style.align=C,b.style.verticalAlign=g(S,"verticalAlign")||"middle",b.x=A*u+o.cx,b.y=A*v+o.cy;var P=g(S,"rotate"),T=0;P==="radial"?(T=-l,T<-Math.PI/2&&(T+=Math.PI)):P==="tangential"?(T=Math.PI/2-l,T>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI)):zt(P)&&(T=P*Math.PI/180),b.rotation=T});function g(m,S){var y=m.get(S);return y==null?i.get(S):y}f.dirtyStyle()},e}(Re),Ri=Hp,Pr="sunburstRootToNode",ki="sunburstHighlight",Wp="sunburstUnhighlight";function Up(a){a.registerAction({type:Pr,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(n,i){var o=Ve(e,[Pr],n);if(o){var s=n.getViewRoot();s&&(e.direction=vn(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),a.registerAction({type:ki,update:"none"},function(e,t,r){e=U({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=Ve(e,[ki],i);o&&(e.dataIndex=o.node.dataIndex)}r.dispatchAction(U(e,{type:"highlight"}))}),a.registerAction({type:Wp,update:"updateView"},function(e,t,r){e=U({},e),r.dispatchAction(U(e,{type:"downplay"}))})}var $p=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=r;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(S){f.push(S)});var h=this._oldChildren||[];d(f,h),m(l,u),this._initEvents(),this._oldChildren=f;function d(S,y){if(S.length===0&&y.length===0)return;new ge(y,S,b,b).add(x).update(x).remove(tt(x,null)).execute();function b(_){return _.getId()}function x(_,w){var I=_==null?null:S[_],L=w==null?null:y[w];p(I,L)}}function p(S,y){if(!c&&S&&!S.getValue()&&(S=null),S!==l&&y!==l){if(y&&y.piece)S?(y.piece.updateData(!1,S,t,r,n),s.setItemGraphicEl(S.dataIndex,y.piece)):g(y);else if(S){var b=new Ri(S,t,r,n);v.add(b),s.setItemGraphicEl(S.dataIndex,b)}}}function g(S){!S||S.piece&&(v.remove(S.piece),S.piece=null)}function m(S,y){y.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,r,n):(o.virtualPiece=new Ri(S,t,r,n),v.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(b){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(r){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===r.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var v=l.get("target",!0)||"_blank";Co(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Pr,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var n=r.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}(ut),Zp=$p,Xp=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var n={name:t.name,children:t.data};Is(n);var i=this._levelModels=H(t.levels||[],function(l){return new Yt(l,this,r)},this),o=un.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),f=i[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Ta(n,this),r},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){jo(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}(vt);function Is(a){var e=0;N(a.children,function(r){Is(r);var n=r.value;W(n)&&(n=n[0]),e+=n});var t=a.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(a.value)?a.value[0]=t:a.value=t}var Yp=Xp,Vi=Math.PI/180;function qp(a,e,t){e.eachSeriesByType(a,function(r){var n=r.get("center"),i=r.get("radius");W(i)||(i=[0,i]),W(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=O(n[0],o),v=O(n[1],s),c=O(i[0],l/2),f=O(i[1],l/2),h=-r.get("startAngle")*Vi,d=r.get("minAngle")*Vi,p=r.getData().tree.root,g=r.getViewRoot(),m=g.depth,S=r.get("sort");S!=null&&As(g,S);var y=0;N(g.children,function(E){!isNaN(E.getValue())&&y++});var b=g.getValue(),x=Math.PI/(b||y)*2,_=g.depth>0,w=g.height-(_?-1:1),I=(f-c)/(w||1),L=r.get("clockwise"),A=r.get("stillShowZeroSum"),D=L?1:-1,C=function(E,R){if(!!E){var k=R;if(E!==p){var V=E.getValue(),G=b===0&&A?x:V*x;G1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&yt(s)&&(s=Bl(s,(r.depth-1)/(i-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var n=r.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");U(u,l)})})}function Qp(a){a.registerChartView(Zp),a.registerSeriesModel(Yp),a.registerLayout(tt(qp,"sunburst")),a.registerProcessor(tt(jr,"sunburst")),a.registerVisual(Jp),Up(a)}var Bi={color:"fill",borderColor:"stroke"},jp={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Vt=xt(),td=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,r){return He(null,this)},e.prototype.getDataParams=function(t,r,n){var i=a.prototype.getDataParams.call(this,t,r);return n&&(i.info=Vt(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}(vt),ed=td;function ad(a,e){return e=e||[0,0],H(["x","y"],function(t,r){var n=this.getAxis(t),i=e[r],o=a[r]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function rd(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:st(ad,a)}}}function nd(a,e){return e=e||[0,0],H([0,1],function(t){var r=e[t],n=a[t]/2,i=[],o=[];return i[t]=r-n,o[t]=r+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function id(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:st(nd,a)}}}function od(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,n=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-n)-t.dataToCoord(r+n))}function sd(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:st(od,a)}}}function ld(a,e){return e=e||[0,0],H(["Radius","Angle"],function(t,r){var n="get"+t+"Axis",i=this[n](),o=e[r],s=a[r]/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 ud(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=a.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:st(ld,a)}}}function vd(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,n){return a.dataToPoint(r,n)}}}}var Bt="emphasis",$t="normal",yn="blur",mn="select",Jt=[$t,Bt,yn,mn],rr={normal:["itemStyle"],emphasis:[Bt,"itemStyle"],blur:[yn,"itemStyle"],select:[mn,"itemStyle"]},nr={normal:["label"],emphasis:[Bt,"label"],blur:[yn,"label"],select:[mn,"label"]},cd=["x","y"],fd="e\0\0",mt={normal:{},emphasis:{},blur:{},select:{}},hd={cartesian2d:rd,geo:id,single:sd,polar:ud,calendar:vd};function Er(a){return a instanceof dt}function Nr(a){return a instanceof Ur}function pd(a,e){e.copyTransform(a),Nr(e)&&Nr(a)&&(e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel,e.invisible=a.invisible,e.ignore=a.ignore,Er(e)&&Er(a)&&e.setShape(a.shape))}var dd=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=Gi(t,s,r,n);o||l.removeAll(),s.diff(o).add(function(c){ir(n,null,c,u(c,i),t,l,s)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&rn(f,Vt(f).option,t)}).update(function(c,f){var h=o.getItemGraphicEl(f);ir(n,h,c,u(c,i),t,l,s)}).execute();var v=t.get("clip",!0)?tn(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,n,i,o){var s=r.getData(),l=Gi(r,s,n,i),u=this._progressiveEls=[];function v(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c=0?e.getStore().get(R,M):void 0}var k=e.get(E.name,M),V=E&&E.ordinalMeta;return V?V.categories[k]:k}function _(T,M){M==null&&(M=u);var E=e.getItemVisual(M,"style"),R=E&&E.fill,k=E&&E.opacity,V=S(M,$t).getItemStyle();R!=null&&(V.fill=R),k!=null&&(V.opacity=k);var G={inheritColor:yt(R)?R:"#000"},z=y(M,$t),X=Rt(z,null,G,!1,!0);X.text=z.getShallow("show")?Ht(a.getFormattedLabel(M,$t),$n(e,M)):null;var Y=Zn(z,G,!1);return L(T,V),V=Xn(V,X,Y),T&&I(V,T),V.legacy=!0,V}function w(T,M){M==null&&(M=u);var E=S(M,Bt).getItemStyle(),R=y(M,Bt),k=Rt(R,null,null,!0,!0);k.text=R.getShallow("show")?wa(a.getFormattedLabel(M,Bt),a.getFormattedLabel(M,$t),$n(e,M)):null;var V=Zn(R,null,!0);return L(T,E),E=Xn(E,k,V),T&&I(E,T),E.legacy=!0,E}function I(T,M){for(var E in M)Lt(M,E)&&(T[E]=M[E])}function L(T,M){T&&(T.textFill&&(M.textFill=T.textFill),T.textPosition&&(M.textPosition=T.textPosition))}function A(T,M){if(M==null&&(M=u),Lt(Bi,T)){var E=e.getItemVisual(M,"style");return E?E[Bi[T]]:null}if(Lt(jp,T))return e.getItemVisual(M,T)}function D(T){if(i.type==="cartesian2d"){var M=i.getBaseAxis();return Gl(pt({axis:M},T))}}function C(){return t.getCurrentSeriesIndices()}function P(T){return Ol(T,t)}}function Sd(a){var e={};return N(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var n=r.coordDim,i=e[n]=e[n]||[];i[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function ir(a,e,t,r,n,i,o){if(!r){i.remove(e);return}var s=_n(a,e,t,r,n,i);return s&&o.setItemGraphicEl(t,s),s&<(s,r.focus,r.blurScope,r.emphasisDisabled),s}function _n(a,e,t,r,n,i){var o=-1,s=e;e&&Ds(e,r,n)&&(o=_t(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Sn(r),s&&pd(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),mt.normal.cfg=mt.normal.conOpt=mt.emphasis.cfg=mt.emphasis.conOpt=mt.blur.cfg=mt.blur.conOpt=mt.select.cfg=mt.select.conOpt=null,mt.isLegacy=!1,_d(u,t,r,n,l,mt),bd(u,t,r,n,l),bn(a,u,t,r,mt,n,l),Lt(r,"info")&&(Vt(u).info=r.info);for(var v=0;v=0?i.replaceAt(u,o):i.add(u),u}function Ds(a,e,t){var r=Vt(a),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==r.customGraphicType||n==="path"&&Ld(i)&&Ts(i)!==r.customPathData||n==="image"&&Lt(o,"image")&&o.image!==r.customImagePath}function bd(a,e,t,r,n){var i=t.clipPath;if(i===!1)a&&a.getClipPath()&&a.removeClipPath();else if(i){var o=a.getClipPath();o&&Ds(o,i,r)&&(o=null),o||(o=Sn(i),a.setClipPath(o)),bn(null,o,e,i,null,r,n)}}function _d(a,e,t,r,n,i){if(!a.isGroup){Oi(t,null,i),Oi(t,Bt,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=a.getTextContent();if(o===!1)v&&a.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=Sn(o),a.setTextContent(v)),bn(null,v,e,o,null,r,n);for(var c=o&&o.style,f=0;f=v;h--){var d=e.childAt(h);wd(e,d,n)}}}function wd(a,e,t){e&&rn(e,Vt(a).option,t)}function Id(a){new ge(a.oldChildren,a.newChildren,zi,zi,a).add(Fi).update(Fi).remove(Ad).execute()}function zi(a,e){var t=a&&a.name;return t!=null?t:fd+e}function Fi(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,n=e!=null?t.oldChildren[e]:null;_n(t.api,n,t.dataIndex,r,t.seriesModel,t.group)}function Ad(a){var e=this.context,t=e.oldChildren[a];t&&rn(t,Vt(t).option,e.seriesModel)}function Ts(a){return a&&(a.pathData||a.d)}function Ld(a){return a&&(Lt(a,"pathData")||Lt(a,"d"))}function Dd(a){a.registerChartView(gd),a.registerSeriesModel(ed)}function Rr(a,e){e=e||{};var t=a.coordinateSystem,r=a.axis,n={},i=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};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 c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[i],a.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Et(e.labelInside,a.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=e.rotate;return f==null&&(f=a.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-f:f,n.z2=1,n}var Td=["axisLine","axisTickLabel","axisName"],Cd=["splitArea","splitLine"],Md=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new at;var l=Rr(t),u=new Xl(t,l);N(Td,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),N(Cd,function(v){t.get([v,"show"])&&Pd[v](this,this.group,this._axisGroup,t)},this),Yl(s,this._axisGroup,t),a.prototype.render.call(this,t,r,n,i)},e.prototype.remove=function(){ql(this)},e.type="singleAxis",e}(Wo),Pd={splitLine:function(a,e,t,r){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=r.coordinateSystem.getRect(),v=n.isHorizontal(),c=[],f=0,h=n.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),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?r.y+r.height/2:r.x+r.width/2,n},a.prototype.convertToPixel=function(e,t,r){var n=Hi(t);return n===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=Hi(t);return n===this?this.pointToData(r):null},a}();function Hi(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Vd(a,e){var t=[];return a.eachComponent("singleAxis",function(r,n){var i=new kd(r,a,e);i.name="single_"+n,i.resize(r,e),r.coordinateSystem=i,t.push(i)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var n=r.getReferringComponents("singleAxis",Fo).models[0];r.coordinateSystem=n&&n.coordinateSystem}}),t}var Bd={create:Vd,dimensions:Ms},Gd=Bd,Wi=["x","y"],Od=["width","height"],zd=function(a){B(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,o){var s=n.axis,l=s.coordinateSystem,u=sr(l,1-ha(s)),v=l.dataToPoint(r)[0],c=i.get("type");if(c&&c!=="none"){var f=ru(i),h=Fd[c](s,v,u);h.style=f,t.graphicKey=h.type,t.pointer=h}var d=Rr(n);nu(r,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,r,n){var i=Rr(r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=iu(r.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,n,i){var o=n.axis,s=o.coordinateSystem,l=ha(o),u=sr(s,l),v=[t.x,t.y];v[l]+=r[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var c=sr(s,1-l),f=(c[1]+c[0])/2,h=[f,f];return h[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(ou),Fd={line:function(a,e,t){var r=su([e,t[0]],[e,t[1]],ha(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:lu([e-r/2,t[0]],[r,n],ha(a))}}};function ha(a){return a.isHorizontal()?0:1}function sr(a,e){var t=a.getRect();return[t[Wi[e]],t[Wi[e]]+t[Od[e]]]}var Hd=zd,Wd=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Da);function Ud(a){$(Uo),Wo.registerAxisPointerClass("SingleAxisPointer",Hd),a.registerComponentView(Wd),a.registerComponentView(Ed),a.registerComponentModel(or),uu(a,"single",or,or.defaultOption),a.registerCoordinateSystem("single",Gd)}var $d=["rect","polygon","keep","clear"];function Zd(a,e){var t=kt(a?a.brush:[]);if(!!t.length){var r=[];N(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var n=a&&a.toolbox;W(n)&&(n=n[0]),n||(n={feature:{}},a.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),Xd(s),e&&!s.length&&s.push.apply(s,$d)}}function Xd(a){var e={};N(a,function(t){e[t]=1}),a.length=0,N(e,function(t,r){a.push(r)})}function Yd(a){var e=a.brushType,t={point:function(r){return Ui[e].point(r,t,a)},rect:function(r){return Ui[e].rect(r,t,a)}};return t}var Ui={lineX:$i(0),lineY:$i(1),rect:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])},rect:function(a,e,t){return a&&t.boundingRect.intersect(a)}},polygon:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])&&be(t.range,a[0],a[1])},rect:function(a,e,t){var r=t.range;if(!a||r.length<=1)return!1;var n=a.x,i=a.y,o=a.width,s=a.height,l=r[0];if(be(r,n,i)||be(r,n+o,i)||be(r,n,i+s)||be(r,n+o,i+s)||ht.create(a).contain(l[0],l[1])||$e(n,i,n+o,i,r)||$e(n,i,n,i+s,r)||$e(n+o,i,n+o,i+s,r)||$e(n,i+s,n+o,i+s,r))return!0}}};function $i(a){var e=["x","y"],t=["width","height"];return{point:function(r,n,i){if(r){var o=i.range,s=r[a];return we(s,o)}},rect:function(r,n,i){if(r){var o=i.range,s=[r[e[a]],r[e[a]]+r[t[a]]];return s[1]e[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&Yi(e)}};function Yi(a){return new ht(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var tg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new pu(r.getZr())).on("brush",st(this._onBrush,this)).mount()},e.prototype.render=function(t,r,n,i){this.model=t,this._updateController(t,r,n,i)},e.prototype.updateTransform=function(t,r,n,i){Ps(r),this._updateController(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.updateTransform(t,r,n,i)},e.prototype.updateView=function(t,r,n,i){this._updateController(t,r,n,i)},e.prototype._updateController=function(t,r,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 r=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:ke(n),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:ke(n),$from:r})},e.type="brush",e}(Da),eg=tg,ag="#ddd",rg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var n=this.option;!r&&du(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:ag},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=H(t,function(r){return qi(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=qi(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}(La);function qi(a,e){return re({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Yt(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var ng=rg,ig=["rect","polygon","lineX","lineY","keep","clear"],og=function(a){B(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,n){var i,o,s;r.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,r,n){this.render(t,r,n)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),n={};return N(t.get("type",!0),function(i){r[i]&&(n[i]=r[i])}),n},e.prototype.onclick=function(t,r,n){var i=this._brushType,o=this._brushMode;n==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.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 r={show:!0,type:ig.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return r},e}(gu),sg=og;function lg(a){a.registerComponentView(eg),a.registerComponentModel(ng),a.registerPreprocessor(Zd),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,qd),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Pe),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Pe),yu("brush",sg)}function wn(a,e){if(!a)return!1;for(var t=W(a)?a:[a],r=0;r=0&&(o[i]=+o[i].toFixed(f)),[o,c]}var ur={min:tt(ea,"min"),max:tt(ea,"max"),average:tt(ea,"average"),median:tt(ea,"median")};function Oe(a,e){var t=a.getData(),r=a.coordinateSystem;if(e&&!cg(e)&&!W(e.coord)&&r){var n=r.dimensions,i=Ns(e,t,r,a);if(e=ke(e),e.type&&ur[e.type]&&i.baseAxis&&i.valueAxis){var o=_t(n,i.baseAxis.dim),s=_t(n,i.valueAxis.dim),l=ur[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],v=0;v<2;v++)ur[u[v]]&&(u[v]=In(t,t.mapDimension(n[v]),u[v]));e.coord=u}}return e}function Ns(a,e,t,r){var n={};return a.valueIndex!=null||a.valueDim!=null?(n.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,n.valueAxis=t.getAxis(fg(r,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function fg(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function ze(a,e){return a&&a.containData&&e.coord&&!Vr(e)?a.containData(e.coord):!0}function hg(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!Vr(e)&&!Vr(t)?a.containZone(e.coord,t.coord):!0}function Rs(a,e){return a?function(t,r,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return sa(o,e[i])}:function(t,r,n,i){return sa(t.value,e[i])}}function In(a,e,t){if(t==="average"){var r=0,n=0;return a.each(e,function(i,o){isNaN(i)||(r+=i,n++)}),r/n}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var vr=xt(),pg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=ne()},e.prototype.render=function(t,r,n){var i=this,o=this.markerGroupMap;o.each(function(s){vr(s).keep=!1}),r.eachSeries(function(s){var l=Qt.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,r,n)}),o.each(function(s){!vr(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){vr(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var n=this;N(t,function(i){var o=Qt.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?_u(l):xu(l))})}})},e.type="marker",e}(Da),An=pg;function Ki(a,e,t){var r=e.coordinateSystem;a.each(function(n){var i=a.getItemModel(n),o,s=O(i.get("x"),t.getWidth()),l=O(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,n));else if(r){var u=a.get(r.dimensions[0],n),v=a.get(r.dimensions[1],n);o=r.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(n,o)})}var dg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Qt.getMarkerModelFromSeries(i,"markPoint");o&&(Ki(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Xr),c=gg(o,t,r);r.setData(c),Ki(r.getData(),t,i),c.each(function(f){var h=c.getItemModel(f),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),m=h.getShallow("symbolOffset"),S=h.getShallow("symbolKeepAspect");if(nt(d)||nt(p)||nt(g)||nt(m)){var y=r.getRawValue(f),b=r.getDataParams(f);nt(d)&&(d=d(y,b)),nt(p)&&(p=p(y,b)),nt(g)&&(g=g(y,b)),nt(m)&&(m=m(y,b))}var x=h.getModel("itemStyle").getItemStyle(),_=nn(l,"color");x.fill||(x.fill=_),c.setItemVisual(f,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:m,symbolKeepAspect:S,style:x})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(f){f.traverse(function(h){et(h).dataModel=r})}),this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(An);function gg(a,e,t){var r;a?r=H(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return U(U({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new St(r,t),i=H(t.get("data"),tt(Oe,e));a&&(i=At(i,tt(ze,a)));var o=Rs(!!a,r);return n.initData(i,null,o),n}var yg=dg;function mg(a){a.registerComponentModel(vg),a.registerComponentView(yg),a.registerPreprocessor(function(e){wn(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Sg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,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}(Qt),bg=Sg,aa=xt(),_g=function(a,e,t,r){var n=a.getData(),i;if(W(r))i=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=Et(r.yAxis,r.xAxis);else{var u=Ns(r,n,e,a);s=u.valueAxis;var v=wu(n,u.valueDataDim);l=In(n,v,o)}var c=s.dim==="x"?0:1,f=1-c,h=ke(r),d={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,d.coord[f]=1/0;var p=t.get("precision");p>=0&&zt(l)&&(l=+l.toFixed(Math.min(p,20))),h.coord[c]=d.coord[c]=l,i=[h,d,{type:o,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[Oe(a,i[0]),Oe(a,i[1]),U({},i[2])];return g[2].type=g[2].type||null,re(g[2],g[0]),re(g[2],g[1]),g};function pa(a){return!isNaN(a)&&!isFinite(a)}function Ji(a,e,t,r){var n=1-a,i=r.dimensions[a];return pa(e[n])&&pa(t[n])&&e[a]===t[a]&&r.getAxis(i).containData(e[a])}function xg(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(Ji(1,t,r,a)||Ji(0,t,r,a)))return!0}return ze(a,e[0])&&ze(a,e[1])}function cr(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=O(o.get("x"),n.getWidth()),u=O(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var v=i.dimensions,c=a.get(v[0],e),f=a.get(v[1],e);s=i.dataToPoint([c,f])}if(Aa(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=i.dimensions;pa(a.get(v[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):pa(a.get(v[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var wg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Qt.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=aa(o).from,u=aa(o).to;l.each(function(v){cr(l,v,!0,i,n),cr(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,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new gn);this.group.add(v.group);var c=Ig(o,t,r),f=c.from,h=c.to,d=c.line;aa(r).from=f,aa(r).to=h,r.setData(d);var p=r.get("symbol"),g=r.get("symbolSize"),m=r.get("symbolRotate"),S=r.get("symbolOffset");W(p)||(p=[p,p]),W(g)||(g=[g,g]),W(m)||(m=[m,m]),W(S)||(S=[S,S]),c.from.each(function(b){y(f,b,!0),y(h,b,!1)}),d.each(function(b){var x=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[f.getItemLayout(b),h.getItemLayout(b)]),x.stroke==null&&(x.stroke=f.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:f.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(b,"symbolOffset"),fromSymbolRotate:f.getItemVisual(b,"symbolRotate"),fromSymbolSize:f.getItemVisual(b,"symbolSize"),fromSymbol:f.getItemVisual(b,"symbol"),toSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(b,"symbolOffset"),toSymbolRotate:h.getItemVisual(b,"symbolRotate"),toSymbolSize:h.getItemVisual(b,"symbolSize"),toSymbol:h.getItemVisual(b,"symbol"),style:x})}),v.updateData(d),c.line.eachItemGraphicEl(function(b){et(b).dataModel=r,b.traverse(function(x){et(x).dataModel=r})});function y(b,x,_){var w=b.getItemModel(x);cr(b,x,_,t,i);var I=w.getModel("itemStyle").getItemStyle();I.fill==null&&(I.fill=nn(l,"color")),b.setItemVisual(x,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ht(w.get("symbolOffset",!0),S[_?0:1]),symbolRotate:Ht(w.get("symbolRotate",!0),m[_?0:1]),symbolSize:Ht(w.get("symbolSize"),g[_?0:1]),symbol:Ht(w.get("symbol",!0),p[_?0:1]),style:I})}this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(An);function Ig(a,e,t){var r;a?r=H(a&&a.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return U(U({},v),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new St(r,t),i=new St(r,t),o=new St([],t),s=H(t.get("data"),tt(_g,e,a,t));a&&(s=At(s,tt(xg,a)));var l=Rs(!!a,r);return n.initData(H(s,function(u){return u[0]}),null,l),i.initData(H(s,function(u){return u[1]}),null,l),o.initData(H(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}var Ag=wg;function Lg(a){a.registerComponentModel(bg),a.registerComponentView(Ag),a.registerPreprocessor(function(e){wn(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Dg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,n){return new e(t,r,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}(Qt),Tg=Dg,ra=xt(),Cg=function(a,e,t,r){var n=Oe(a,r[0]),i=Oe(a,r[1]),o=n.coord,s=i.coord;o[0]=Et(o[0],-1/0),o[1]=Et(o[1],-1/0),s[0]=Et(s[0],1/0),s[1]=Et(s[1],1/0);var l=zo([{},n,i]);return l.coord=[n.coord,i.coord],l.x0=n.x,l.y0=n.y,l.x1=i.x,l.y1=i.y,l};function da(a){return!isNaN(a)&&!isFinite(a)}function Qi(a,e,t,r){var n=1-a;return da(e[n])&&da(t[n])}function Mg(a,e){var t=e.coord[0],r=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:r,x:e.x1,y:e.y1};return Aa(a,"cartesian2d")?t&&r&&(Qi(1,t,r)||Qi(0,t,r))?!0:hg(a,n,i):ze(a,n)||ze(a,i)}function ji(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=O(o.get(t[0]),n.getWidth()),u=O(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(t,e));else{var v=a.get(t[0],e),c=a.get(t[1],e),f=[v,c];i.clampData&&i.clampData(f,f),s=i.dataToPoint(f,!0)}if(Aa(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),v=a.get(t[0],e),c=a.get(t[1],e);da(v)?s[0]=h.toGlobalCoord(h.getExtent()[t[0]==="x0"?0:1]):da(c)&&(s[1]=d.toGlobalCoord(d.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var to=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Pg=function(a){B(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,n){r.eachSeries(function(i){var o=Qt.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=H(to,function(c){return ji(s,l,c,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new at});this.group.add(v.group),this.markKeep(v);var c=Eg(o,t,r);r.setData(c),c.each(function(f){var h=H(to,function(I){return ji(c,f,I,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),m=p.getExtent(),S=[d.parse(c.get("x0",f)),d.parse(c.get("x1",f))],y=[p.parse(c.get("y0",f)),p.parse(c.get("y1",f))];wr(S),wr(y);var b=!(g[0]>S[1]||g[1]y[1]||m[1]":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},kg=function(){function a(e){var t=this._condVal=yt(e)?new RegExp(e):Lu(e)?e:null;if(t==null){var r="";j(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return yt(t)?this._condVal.test(e):zt(t)?this._condVal.test(e+""):!1},a}(),Vg=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),Bg=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t=s)}}for(var c=this.__startIndex;c15)break}}T.prevElClipPaths&&m.restore()};if(S)if(S.length===0)I=g.__endIndex;else for(var A=h.dpr,D=0;D0&&e>n[0]){for(l=0;le);l++);s=r[n[l]]}if(n.splice(l+1,0,e),r[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},a.prototype.eachLayer=function(e,t){for(var r=this._zlevelList,n=0;n0?na:0),this._needsManuallyCompositing),v.__builtin__||Ou("ZLevel "+u+" has been used by unkown layer "+v.id),v!==i&&(v.__used=!0,v.__startIndex!==l&&(v.__dirty=!0),v.__startIndex=l,v.incremental?v.__drawIndex=-1:v.__drawIndex=l,t(l),i=v),n.__dirty&Ar&&!n.__inHover&&(v.__dirty=!0,v.incremental&&v.__drawIndex<0&&(v.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(c,f){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},a.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},a.prototype._clearLayer=function(e){e.clear()},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(t){t.setUnpainted()})},a.prototype.configLayer=function(e,t){if(t){var r=this._layerConfig;r[e]?re(r[e],t,!0):r[e]=t;for(var n=0;n2&&r.push(n),n=[P,T]}function v(P,T,M,E){de(P,M)&&de(T,E)||n.push(P,T,M,E,M,E)}function c(P,T,M,E,R,k){var V=Math.abs(T-P),G=Math.tan(V/4)*4/3,z=TI:D2&&r.push(n),r}function Gr(a,e,t,r,n,i,o,s,l,u){if(de(a,t)&&de(e,r)&&de(n,o)&&de(i,s)){l.push(o,s);return}var v=2/u,c=v*v,f=o-a,h=s-e,d=Math.sqrt(f*f+h*h);f/=d,h/=d;var p=t-a,g=r-e,m=n-o,S=i-s,y=p*p+g*g,b=m*m+S*S;if(y=0&&I=0){l.push(o,s);return}var L=[],A=[];la(a,t,n,o,.5,L),la(e,r,i,s,.5,A),Gr(L[0],A[0],L[1],A[1],L[2],A[2],L[3],A[3],l,u),Gr(L[4],A[4],L[5],A[5],L[6],A[6],L[7],A[7],l,u)}function ny(a,e){var t=Br(a),r=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),c=Vs([l,u],v?0:1,e),f=(v?s:u)/c.length,h=0;hn,o=Vs([r,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",c=a[s]/o.length,f=0;f1?null:new Ut(p*l+a,p*u+e)}function sy(a,e,t){var r=new Ut;Ut.sub(r,t,e),r.normalize();var n=new Ut;Ut.sub(n,a,e);var i=n.dot(r);return i}function fe(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function ly(a,e,t){for(var r=a.length,n=[],i=0;io?(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),ly(e,u,v)}function ga(a,e,t,r){if(t===1)r.push(e);else{var n=Math.floor(t/2),i=a(e);ga(a,i[0],n,r),ga(a,i[1],t-n,r)}return r}function uy(a,e){for(var t=[],r=0;r0)for(var x=r/t,_=-r/2;_<=r/2;_+=x){for(var w=Math.sin(_),I=Math.cos(_),L=0,y=0;y0;u/=2){var v=0,c=0;(a&u)>0&&(v=1),(e&u)>0&&(c=1),s+=u*u*(3*v^c),c===0&&(v===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function Sa(a){var e=1/0,t=1/0,r=-1/0,n=-1/0,i=H(a,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(c,t),r=Math.max(v,r),n=Math.max(c,n),[v,c]}),o=H(i,function(s,l){return{cp:s,z:my(s[0],s[1],e,t,r,n),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Os(a){return fy(a.path,a.count)}function Or(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Sy(a,e,t){var r=[];function n(x){for(var _=0;_=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 _y={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;co(a)&&(u=a,v=e),co(e)&&(u=e,v=a);function c(m,S,y,b,x){var _=m.many,w=m.one;if(_.length===1&&!x){var I=S?_[0]:w,L=S?w:_[0];if(ya(I))c({many:[I],one:L},!0,y,b,!0);else{var A=s?pt({delay:s(y,b)},l):l;Dn(I,L,A),i(I,L,I,L,A)}}else for(var D=pt({dividePath:_y[t],individualDelay:s&&function(R,k,V,G){return s(R+y,b)}},l),C=S?Sy(_,w,D):by(w,_,D),P=C.fromIndividuals,T=C.toIndividuals,M=P.length,E=0;Ee.length,h=u?fo(v,u):fo(f?e:a,[f?a:e]),d=0,p=0;pzs))for(var n=r.getIndices(),i=wy(r),o=0;o0&&b.group.traverse(function(_){_ instanceof dt&&!_.animators.length&&_.animateFrom({style:{opacity:0}},x)})})}function po(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function go(a){return W(a)?a.sort().join(","):a}function Ft(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function Ly(a,e){var t=ne(),r=ne(),n=ne();return N(a.oldSeries,function(i,o){var s=a.oldData[o],l=po(i),u=go(l);r.set(u,s),W(l)&&N(l,function(v){n.set(v,{data:s,key:u})})}),N(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.getData(),s=po(i),l=go(s),u=r.get(l);if(u)t.set(l,{oldSeries:[{divide:Ft(u),data:u}],newSeries:[{divide:Ft(o),data:o}]});else if(W(s)){var v=[];N(s,function(h){var d=r.get(h);d&&v.push({divide:Ft(d),data:d})}),v.length&&t.set(l,{oldSeries:v,newSeries:[{data:o,divide:Ft(o)}]})}else{var c=n.get(s);if(c){var f=t.get(c.key);f||(f={oldSeries:[{data:c.data,divide:Ft(c.data)}],newSeries:[]},t.set(c.key,f)),f.newSeries.push({data:o,divide:Ft(o)})}}}}),t}function yo(a,e){for(var t=0;t=0&&n.push({data:e.oldData[s],divide:Ft(e.oldData[s]),dim:o.dimension})}),N(kt(a.to),function(o){var s=yo(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({data:l,divide:Ft(l),dim:o.dimension})}}),n.length>0&&i.length>0&&Fs(n,i,r)}function Ty(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){N(kt(r.seriesTransition),function(n){N(kt(n.to),function(i){for(var o=r.updatedSeries,s=0;s=1&&s.value.pop(),s.value.length===0&&d())}function h(){a.setAddressId(null),v.emit("map:back"),t.value=!1,o.value=We(i.value),p()}function d(){return se(this,null,function*(){const b=[{value:1,label:"\u7A3B\u6E14\u7EFC\u5408\u79CD\u517B",color:"rgb(30,54,80 , 0.8)",type:"map",data:[{value:[105.198605,29.280154]}]},{value:2,label:"\u4F18\u54C1\u67D1\u6854\u79CD\u690D",color:"rgb(54,89,114,0.8)",type:"map",data:[{value:[105.383917,29.387026]},{value:[105.194187,29.364692]}]},{value:3,label:"\u9AD8\u7CB1\u4EA7\u4E1A",color:"rgba(147, 235, 248, 0.2)",type:"map",data:[{value:[105.116049,29.388207]}]},{value:4,label:"\u6CB9\u8336\u4EA7\u4E1A",color:"rgb(172,220,243 , 0.4)",type:"map",data:[{value:[105.385775,29.334638]}]},{value:5,label:"\u751F\u732A\u4EA7\u4E1A\u5206\u5E03\u70B9",icon:`image://${My}`,type:"dot",data:[{map:"",name:"\u732A",value:[105.292327,29.401826]},{map:"",name:"\u732A",value:[105.261267,29.234182]},{map:"",name:"\u732A",value:[105.289485,29.302531]},{map:"",name:"\u732A",value:[105.190754,29.340528]}]},{value:6,label:"\u8089\u7F8A\u4EA7\u4E1A\u5206\u5E03\u70B9",icon:`image://${Cy}`,type:"dot",data:[{map:"",name:"\u7F8A",value:[105.195498,29.420684]},{map:"",name:"\u7F8A",value:[105.103861,29.351481]},{map:"",name:"\u7F8A",value:[105.368813,29.303716]}]}],x=yield gv();b.forEach(A=>{const D=x.find(C=>C.value==A.value);A=Object.assign(A,D)});const _=b.reduce((A,D)=>{var C;return(C=D.data)==null||C.forEach(P=>{A.push({type:"nylx-key",name:D.label,value:P.value,key:D.key})}),A},[]),w=b.filter(A=>A.type==="dot").map(A=>{var D;return{type:"scatter",name:A.label,coordinateSystem:"geo",tooltip:{trigger:"item",show:!0},symbol:A.icon,symbolSize:[30,30],symbolOffset:[0,0],z:9999,data:(D=A.data)==null?void 0:D.map(C=>Pa(Ma({},C),{key:A.key}))}}),I=yield(yield En(()=>import("./nylx.1d1276f1.js"),[])).default,L=b.filter(A=>A.type==="map").map(A=>Object.assign(A,{name:A.label}));qn("lcxz",I),u={legend:{right:60,bottom:40,align:"right",orient:"vertical",itemWidth:18,itemHeight:18,selectedMode:!1,textStyle:{color:"#fff"},inactiveBorderColor:"rgba(0,0,0,0)",data:b.filter(A=>A.type==="dot").map(A=>({name:A.label,icon:A.icon}))},visualMap:{right:60,bottom:100,selectedMode:!1,orient:"vertical",pieces:b.filter(A=>A.type==="map"),color:"#fff",textStyle:{color:"#fff"},visibility:"off"},backgroundColor:"transparent",stateAnimation:{duration:100},geo:{show:!0,map:"lcxz",roam:!1,zoom:1,label:{emphasis:{show:!1}},itemStyle:{normal:{borderColor:"rgba(147, 235, 248, 1)",borderWidth:1,areaColor:{type:"radial",x:.5,y:.5,r:.8,colorStops:[{offset:0,color:"rgba(147, 235, 248, 0)"},{offset:1,color:"rgba(147, 235, 248, .2)"}],globalCoord:!1},shadowColor:"rgba(128, 217, 248, 1)",shadowOffsetX:-2,shadowOffsetY:2,shadowBlur:10},emphasis:{areaColor:"#389BB7",borderWidth:0}}},series:[...w,{type:"map",zoom:1,roam:!1,map:"lcxz",name:"nylx-key",showLegendSymbol:!1,select:{disabled:!0},legend:{show:!1},label:{show:!1,color:"#fff",normal:{show:!1}},itemStyle:{borderColor:"#fff",borderWidth:.1,emphasis:{label:{show:!1},areaColor:"rgba(128, 217, 248, 0.2)",borderWidth:0}},data:L},{type:"scatter",name:"nylx-key1",zoom:1,roam:!1,coordinateSystem:"geo",stateAnimation:{duration:300,easing:"bounceOut"},label:{show:!0,align:"center",formatter:function(A){var D=A.name,C=`{tline|${D}}`;return C},color:"#fff",rich:{fline:{padding:[0,25],color:"#fff",textShadowColor:"#030615",textShadowOffsetX:1,textShadowOffsetY:1,fontSize:14,fontWeight:400},tline:{padding:[0,27],color:"#ABF8FF",fontSize:12}}},itemStyle:{color:"#00FFF6"},symbol:mo,symbolSize:[100,34],symbolOffset:[0,-26],z:999,data:_}]},r(u)})}function p(){const b=[];c.value.map(x=>{b.push(Pa(Ma({},x),{value:[x.address_lng,x.address_lat],datas:x.areas,img:"image://https://www.makeapie.cn/asset/get/s/data-1619059442567-s5l7-f8Eu9.png"}))}),qn("lcxz",o.value),u={backgroundColor:"transparent",stateAnimation:{duration:100},geo:{map:"lcxz",aspectScale:.75,layoutCenter:["50%","50.5%"],layoutSize:"100%",silent:!0,roam:!1,z:0,label:{color:"#fff",show:!1},itemStyle:{areaColor:"rgba(0, 15, 40, 0.0)",shadowColor:"rgba(0, 0, 0, 1)",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:5,borderColor:"#fff",borderWidth:.1},emphasis:{itemStyle:{areaColor:"#2AB8FF",borderWidth:1,color:"green"},label:{show:!1}}},series:[{type:"map",zoom:1.1,roam:!1,map:"lcxz",select:{disabled:!0},label:{show:!1,color:"#fff",normal:{show:t.value,textStyle:{color:"#fff",fontSize:t.value?16:null}}},itemStyle:{borderColor:"rgba(147, 235, 248, 1)",borderWidth:1,areaColor:"rgb(30,54,80 , 0.8)"},emphasis:{label:{show:!0,color:"#fff"},itemStyle:{areaColor:"rgb(30,54,80 , 0.8)",borderColor:"rgba(147, 235, 248, 1)",borderWidth:1,shadowColor:"rgba(0, 255, 255, 1)",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:1}}},{tooltip:{show:!1},type:"effectScatter",coordinateSystem:"geo",rippleEffect:{scale:10,brushType:"stroke"},showEffectOn:"render",symbol:"circle",zlevel:1,symbolSize:[10,5],itemStyle:{color:x=>{var _=[{type:"linear",x:1,y:0,x2:0,y2:0,colorStops:[{offset:0,color:"#64fbc5"},{offset:1,color:"#018ace"}],global:!1},{type:"linear",x:1,y:0,x2:0,y2:0,colorStops:[{offset:0,color:"#61c0f1 "},{offset:1,color:"#6f2eb6"}],global:!1}];return _[x.dataIndex%_.length]}},data:b},{type:"scatter",coordinateSystem:"geo",tooltip:{trigger:"item",show:!0},symbol:(x,_)=>b[_.dataIndex].img,symbolSize:[21,30],symbolOffset:[0,-20],z:9999,data:b},{type:"scatter",coordinateSystem:"geo",label:{show:!0,align:"center",formatter:function(x){var _=x.name,w=`{tline|${_}}`;return w},color:"#fff",rich:{fline:{padding:[0,25],color:"#fff",textShadowColor:"#030615",textShadowOffsetX:1,textShadowOffsetY:1,fontSize:14,fontWeight:400},tline:{padding:[0,27],color:"#ABF8FF",fontSize:12}}},itemStyle:{color:"#00FFF6"},symbol:mo,symbolSize:[100,34],symbolOffset:[0,-46],z:999,data:[]}]},r(u)}function g(){return se(this,null,function*(){var b;try{const x=yield Kn({parent:a.getAddresId,type:1,per_page:100,industry:(b=s.value[0])==null?void 0:b.value});c.value=x!=null?x:[]}finally{p()}})}function m(){return se(this,null,function*(){const b=yield Kn({type:2}),x=yield(yield En(()=>import("./lcxz1.2c9ba3a3.js"),[])).default;x.features.reduce((_,w)=>{const I=b.find(L=>L.name==w.properties.name);return I&&_.push(Object.assign(w,{properties:I})),_},[]),i.value=x,o.value=We(i.value),g()})}let S=null;const y=["nylx-key","nylx-key1","\u8089\u7F8A\u4EA7\u4E1A\u5206\u5E03\u70B9","\u751F\u732A\u4EA7\u4E1A\u5206\u5E03\u70B9"];return Ks(()=>se(this,null,function*(){var b,x;yield d(),(b=n())==null||b.on("mousemove",_=>{var w;y.includes(_.seriesName)||S==_.name&&_.seriesType=="scatter"||_.seriesType=="scatter"&&(S=_.name,u.series[3].data=[_.data],(w=n())==null||w.setOption({series:u.series},!1))}),(x=n())==null||x.on("click",_=>se(this,null,function*(){var w;if(!l){if(y.includes(_.seriesName)){l=!0,s.value.push({type:"nylx",value:_.data.key}),yield m(),l=!1;return}if((_.seriesType=="effectScatter"||_.seriesType=="scatter")&&v.emit("base:click",_.data),_.seriesType=="map"){const I=i.value.features.filter(L=>L.properties.name==_.name);a.setAddressId((w=I[0].properties)==null?void 0:w.id),v.emit("map:click",We(I[0].properties)),I&&(t.value=!0,o.value=We({type:"FeatureCollection",features:I}))}}}))})),Js(()=>a.getAddresId,()=>{g()}),{chartRef:e,isBack:t,onBack:h,historyMap:s,historyBack:f}}}),Ry={class:"relative h-full overflow-hidden"},ky=Me("div",{class:"absolute left-0 w-full top-0 h-full flex items-center justify-center"},[Me("img",{class:"opacity-30 w-600px h-600px map1",src:Py,alt:"",srcset:""})],-1),Vy=Me("div",{class:"absolute left-0 w-full top-0 h-full flex items-center justify-center"},[Me("img",{class:"opacity-30 w-600px h-600px map",src:Ey,alt:"",srcset:""})],-1),By={ref:"chartRef",class:"w-full h-full z-99 absolute"};function Gy(a,e,t,r,n,i){return Nn(),Rn("div",Ry,[a.historyMap.length?(Nn(),Rn("div",{key:0,onClick:e[0]||(e[0]=(...o)=>a.historyBack&&a.historyBack(...o)),class:"absolute left-25px top-25px z-999 text-white border rounded-2px px-30px py-6px text-12px cursor-pointer"},"\u8FD4\u56DE")):js("",!0),ky,Vy,Me("div",By,null,512)])}var $y=Qs(Ny,[["render",Gy]]);export{$y as default};