chunk-vendors-cfbf2917.646264e0.js 26 KB

12
  1. (self["webpackChunkapp"]=self["webpackChunkapp"]||[]).push([[4135],{13594:function(e,t,i){var n=i(70492),a=i(33051);i(12906),i(25787),i(74026);var o=i(69274),r=i(23509),l=i(22528);n.registerVisual(a.curry(o,"sunburst")),n.registerLayout(a.curry(r,"sunburst")),n.registerProcessor(a.curry(l,"sunburst"))},54313:function(e,t,i){var n=i(33051),a=i(51177),o={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},r=2,l=4;function s(e,t,i){a.Group.call(this);var n=new a.Sector({z2:r});n.seriesIndex=t.seriesIndex;var o=new a.Text({z2:l,silent:e.getModel("label").get("silent")});function s(){o.ignore=o.hoverIgnore}function d(){o.ignore=o.normalIgnore}this.add(n),this.add(o),this.updateData(!0,e,"normal",t,i),this.on("emphasis",s).on("normal",d).on("mouseover",s).on("mouseout",d)}var d=s.prototype;d.updateData=function(e,t,i,o,r){this.node=t,t.piece=this,o=o||this._seriesModel,r=r||this._ecModel;var l=this.childAt(0);l.dataIndex=t.dataIndex;var s=t.getModel(),d=t.getLayout(),c=n.extend({},d);c.label=null;var h=u(t,o,r);g(t,o,h);var p,f=s.getModel("itemStyle").getItemStyle();if("normal"===i)p=f;else{var y=s.getModel(i+".itemStyle").getItemStyle();p=n.merge(y,f)}p=n.defaults({lineJoin:"bevel",fill:p.fill||h},p),e?(l.setShape(c),l.shape.r=d.r0,a.updateProps(l,{shape:{r:d.r}},o,t.dataIndex),l.useStyle(p)):"object"===typeof p.fill&&p.fill.type||"object"===typeof l.style.fill&&l.style.fill.type?(a.updateProps(l,{shape:c},o),l.useStyle(p)):a.updateProps(l,{shape:c,style:p},o),this._updateLabel(o,h,i);var v=s.getShallow("cursor");if(v&&l.attr("cursor",v),e){var m=o.getShallow("highlightPolicy");this._initEvents(l,t,o,m)}this._seriesModel=o||this._seriesModel,this._ecModel=r||this._ecModel,a.setHoverStyle(this)},d.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(i){i.piece&&(t.node===i?i.piece.updateData(!1,i,"emphasis"):p(i,t.node,e)?i.piece.childAt(0).trigger("highlight"):e!==o.NONE&&i.piece.childAt(0).trigger("downplay"))}))},d.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},d.onHighlight=function(){this.updateData(!1,this.node,"highlight")},d.onDownplay=function(){this.updateData(!1,this.node,"downplay")},d._updateLabel=function(e,t,i){var o=this.node.getModel(),r=o.getModel("label"),l="normal"===i||"emphasis"===i?r:o.getModel(i+".label"),s=o.getModel("emphasis.label"),d=n.retrieve(e.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);!1===P("show")&&(d="");var c=this.node.getLayout(),u=l.get("minAngle");null==u&&(u=r.get("minAngle")),u=u/180*Math.PI;var h=c.endAngle-c.startAngle;null!=u&&Math.abs(h)<u&&(d="");var p=this.childAt(1);a.setLabelStyle(p.style,p.hoverStyle||{},r,s,{defaultText:l.getShallow("show")?d:null,autoColor:t,useInsideStyle:!0});var g,f=(c.startAngle+c.endAngle)/2,y=Math.cos(f),v=Math.sin(f),m=P("position"),x=P("distance")||0,w=P("align");"outside"===m?(g=c.r+x,w=f>Math.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(g=c.r0+x,f>Math.PI/2&&(w="right")):"right"===w&&(g=c.r-x,f>Math.PI/2&&(w="left")):(g=(c.r+c.r0)/2,w="center"),p.attr("style",{text:d,textAlign:w,textVerticalAlign:P("verticalAlign")||"middle",opacity:P("opacity")});var I=g*y+c.cx,_=g*v+c.cy;p.attr("position",[I,_]);var S=P("rotate"),b=0;function P(e){var t=l.get(e);return null==t?r.get(e):t}"radial"===S?(b=-f,b<-Math.PI/2&&(b+=Math.PI)):"tangential"===S?(b=Math.PI/2-f,b>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI)):"number"===typeof S&&(b=S*Math.PI/180),p.attr("rotation",b)},d._initEvents=function(e,t,i,n){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onEmphasis(n)},r=function(){a.onNormal()},l=function(){a.onDownplay()},s=function(){a.onHighlight()};i.isAnimationEnabled()&&e.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",l).on("highlight",s)},n.inherits(s,a.Group);var c=s;function u(e,t,i){var n=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(n=null);var o=e.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===e.depth)return i.option.color[0];var r=i.option.color.length;return o=i.option.color[h(e)%r],o}function h(e){var t=e;while(t.depth>1)t=t.parentNode;var i=e.getAncestors()[0];return n.indexOf(i.children,t)}function p(e,t,i){return i!==o.NONE&&(i===o.SELF?e===t:i===o.ANCESTOR?e===t||e.isAncestorOf(t):e===t||e.isDescendantOf(t))}function g(e,t,i){var n=t.getData();n.setItemVisual(e.dataIndex,"color",i)}e.exports=c},12906:function(e,t,i){var n=i(33051),a=i(93321),o=i(9327),r=i(68833),l=r.wrapTreePathInfo,s=a.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var i={name:e.name,children:e.data};d(i);var n=e.levels||[],a={};return a.levels=n,o.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=l(i,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",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},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});function d(e){var t=0;n.each(e.children,(function(e){d(e);var i=e.value;n.isArray(i)&&(i=i[0]),t+=i}));var i=e.value;n.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=t),i<0&&(i=0),n.isArray(e.value)?e.value[0]=i:e.value=i}e.exports=s},25787:function(e,t,i){var n=i(33051),a=i(75797),o=i(54313),r=i(4130),l=i(78988),s=l.windowOpen,d="sunburstRootToNode",c=a.extend({type:"sunburst",init:function(){},render:function(e,t,i,a){var l=this;this.seriesModel=e,this.api=i,this.ecModel=t;var s=e.getData(),d=s.tree.root,c=e.getViewRoot(),u=this.group,h=e.get("renderLabelForZeroData"),p=[];c.eachNode((function(e){p.push(e)}));var g=this._oldChildren||[];if(v(p,g),w(d,c),a&&a.highlight&&a.highlight.piece){var f=e.getShallow("highlightPolicy");a.highlight.piece.onEmphasis(f)}else if(a&&a.unhighlight){var y=this.virtualPiece;!y&&d.children.length&&(y=d.children[0].piece),y&&y.onNormal()}function v(e,t){function i(e){return e.getId()}function a(i,n){var a=null==i?null:e[i],o=null==n?null:t[n];m(a,o)}0===e.length&&0===t.length||new r(t,e,i,i).add(a).update(a).remove(n.curry(a,null)).execute()}function m(i,n){if(h||!i||i.getValue()||(i=null),i!==d&&n!==d)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",e,t),s.setItemGraphicEl(i.dataIndex,n.piece)):x(n);else if(i){var a=new o(i,e,t);u.add(a),s.setItemGraphicEl(i.dataIndex,a)}}function x(e){e&&e.piece&&(u.remove(e.piece),e.piece=null)}function w(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",e,t):(l.virtualPiece=new o(i,e,t),u.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(e){l._rootToNode(n.parentNode)};n.piece._onclickEvent=a,l.virtualPiece.on("click",a)}else l.virtualPiece&&(u.remove(l.virtualPiece),l.virtualPiece=null)}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var i=!1,n=e.seriesModel.getViewRoot();n.eachNode((function(n){if(!i&&n.piece&&n.piece.childAt(0)===t.target){var a=n.getModel().get("nodeClick");if("rootToNode"===a)e._rootToNode(n);else if("link"===a){var o=n.getModel(),r=o.get("link");if(r){var l=o.get("target",!0)||"_blank";s(r,l)}}i=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:d,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var i=t.getData(),n=i.getItemLayout(0);if(n){var a=e[0]-n.cx,o=e[1]-n.cy,r=Math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),u=c;e.exports=u},74026:function(e,t,i){var n=i(70492),a=i(68833),o="sunburstRootToNode";n.registerAction({type:o,update:"updateView"},(function(e,t){function i(t,i){var n=a.retrieveTargetInfo(e,[o],t);if(n){var r=t.getViewRoot();r&&(e.direction=a.aboveViewRoot(r,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}t.eachComponent({mainType:"series",subType:"sunburst",query:e},i)}));var r="sunburstHighlight";n.registerAction({type:r,update:"updateView"},(function(e,t){function i(t,i){var n=a.retrieveTargetInfo(e,[r],t);n&&(e.highlight=n.node)}t.eachComponent({mainType:"series",subType:"sunburst",query:e},i)}));var l="sunburstUnhighlight";n.registerAction({type:l,update:"updateView"},(function(e,t){function i(t,i){e.unhighlight=!0}t.eachComponent({mainType:"series",subType:"sunburst",query:e},i)}))},23509:function(e,t,i){var n=i(85669),a=n.parsePercent,o=i(33051),r=Math.PI/180;function l(e,t,i,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),n=e.get("radius");o.isArray(n)||(n=[0,n]),o.isArray(t)||(t=[t,t]);var l=i.getWidth(),d=i.getHeight(),c=Math.min(l,d),u=a(t[0],l),h=a(t[1],d),p=a(n[0],c/2),g=a(n[1],c/2),f=-e.get("startAngle")*r,y=e.get("minAngle")*r,v=e.getData().tree.root,m=e.getViewRoot(),x=m.depth,w=e.get("sort");null!=w&&s(m,w);var I=0;o.each(m.children,(function(e){!isNaN(e.getValue())&&I++}));var _=m.getValue(),S=Math.PI/(_||I)*2,b=m.depth>0,P=m.height-(b?-1:1),M=(g-p)/(P||1),N=e.get("clockwise"),A=e.get("stillShowZeroSum"),D=N?1:-1,T=function(e,t){if(e){var i=t;if(e!==v){var n=e.getValue(),r=0===_&&A?S:n*S;r<y&&(r=y),i=t+D*r;var l=e.depth-x-(b?-1:1),s=p+M*l,d=p+M*(l+1),g=e.getModel();null!=g.get("r0")&&(s=a(g.get("r0"),c/2)),null!=g.get("r")&&(d=a(g.get("r"),c/2)),e.setLayout({angle:r,startAngle:t,endAngle:i,clockwise:N,cx:u,cy:h,r0:s,r:d})}if(e.children&&e.children.length){var f=0;o.each(e.children,(function(e){f+=T(e,t+f)}))}return i-t}};if(b){var L=p,R=p+M,E=2*Math.PI;v.setLayout({angle:E,startAngle:f,endAngle:f+E,clockwise:N,cx:u,cy:h,r0:L,r:R})}T(m,f)}))}function s(e,t){var i=e.children||[];e.children=d(i,t),i.length&&o.each(e.children,(function(e){s(e,t)}))}function d(e,t){if("function"===typeof t)return e.sort(t);var i="asc"===t;return e.sort((function(e,t){var n=(e.getValue()-t.getValue())*(i?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(i?-1:1):n}))}e.exports=l},90110:function(e,t,i){var n=i(70492);i(84066),i(16140),i(78244);var a=i(21330),o=i(9496),r=i(22528);n.registerLayout(a),n.registerVisual(o),n.registerProcessor(r("themeRiver"))},16140:function(e,t,i){var n=i(93321),a=i(55623),o=i(10381),r=o.getDimensionTypeByAxis,l=i(87587),s=i(33051),d=i(32234),c=d.groupData,u=i(78988),h=u.encodeHTML,p=i(72019),g=2,f=n.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){f.superApply(this,"init",arguments),this.legendVisualProvider=new p(s.bind(this.getData,this),s.bind(this.getRawData,this))},fixData:function(e){var t=e.length,i=c(e,(function(e){return e[2]})),n=[];i.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var a=n.length,o=-1,r=-1,l=0;l<a;++l){var s=n[l].dataList.length;s>o&&(o=s,r=l)}for(var d=0;d<a;++d)if(d!==r)for(var u=n[d].name,h=0;h<o;++h){for(var p=n[r].dataList[h][0],g=n[d].dataList.length,f=-1,y=0;y<g;++y){var v=n[d].dataList[y][0];if(v===p){f=y;break}}-1===f&&(e[t]=[],e[t][0]=p,e[t][1]=0,e[t][2]=u,t++)}return e},getInitialData:function(e,t){for(var i=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],n=i.get("type"),o=s.filter(e.data,(function(e){return void 0!==e[2]})),d=this.fixData(o||[]),c=[],u=this.nameMap=s.createHashMap(),h=0,p=0;p<d.length;++p)c.push(d[p][g]),u.get(d[p][g])||(u.set(d[p][g],h),h++);var f=a(d,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:r(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),y=new l(f,this);return y.initData(d),y},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),i=[],n=0;n<t;++n)i[n]=n;var a=e.mapDimension("single"),o=c(i,(function(t){return e.get("name",t)})),r=[];return o.buckets.each((function(t,i){t.sort((function(t,i){return e.get(a,t)-e.get(a,i)})),r.push({name:i,indices:t})})),r},getAxisTooltipData:function(e,t,i){s.isArray(e)||(e=e?[e]:[]);for(var n,a=this.getData(),o=this.getLayerSeries(),r=[],l=o.length,d=0;d<l;++d){for(var c=Number.MAX_VALUE,u=-1,h=o[d].indices.length,p=0;p<h;++p){var g=a.get(e[0],o[d].indices[p]),f=Math.abs(g-t);f<=c&&(n=g,c=f,u=o[d].indices[p])}r.push(u)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(e){var t=this.getData(),i=t.getName(e),n=t.get(t.mapDimension("value"),e);return(isNaN(n)||null==n)&&(n="-"),h(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),y=f;e.exports=y},78244:function(e,t,i){var n=i(70492),a=i(30633),o=a.Polygon,r=i(51177),l=i(33051),s=l.bind,d=l.extend,c=i(4130),u=n.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,i){var n=e.getData(),a=this.group,l=e.getLayerSeries(),u=n.getLayout("layoutInfo"),p=u.rect,g=u.boundaryGap;function f(e){return e.name}a.attr("position",[0,p.y+g[0]]);var y=new c(this._layersSeries||[],l,f,f),v={};function m(t,i,s){var c=this._layers;if("remove"!==t){for(var u,p,g,f=[],y=[],m=l[i].indices,x=0;x<m.length;x++){var w=n.getItemLayout(m[x]),I=w.x,_=w.y0,S=w.y;f.push([I,_]),y.push([I,_+S]),u=n.getItemVisual(m[x],"color")}var b=n.getItemLayout(m[0]),P=n.getItemModel(m[x-1]),M=P.getModel("label"),N=M.get("margin");if("add"===t){var A=v[i]=new r.Group;p=new o({shape:{points:f,stackedOnPoints:y,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),g=new r.Text({style:{x:b.x-N,y:b.y0+b.y/2}}),A.add(p),A.add(g),a.add(A),p.setClipPath(h(p.getBoundingRect(),e,(function(){p.removeClipPath()})))}else{A=c[s];p=A.childAt(0),g=A.childAt(1),a.add(A),v[i]=A,r.updateProps(p,{shape:{points:f,stackedOnPoints:y}},e),r.updateProps(g,{style:{x:b.x-N,y:b.y0+b.y/2}},e)}var D=P.getModel("emphasis.itemStyle"),T=P.getModel("itemStyle");r.setTextStyle(g.style,M,{text:M.get("show")?e.getFormattedLabel(m[x-1],"normal")||n.getName(m[x-1]):null,textVerticalAlign:"middle"}),p.setStyle(d({fill:u},T.getItemStyle(["color"]))),r.setHoverStyle(p,D.getItemStyle())}else a.remove(c[i])}y.add(s(m,this,"add")).update(s(m,this,"update")).remove(s(m,this,"remove")).execute(),this._layersSeries=l,this._layers=v},dispose:function(){}});function h(e,t,i){var n=new r.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return r.initProps(n,{shape:{width:e.width+20,height:e.height+20}},t,i),n}e.exports=u},21330:function(e,t,i){var n=i(33051),a=i(85669);function o(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.coordinateSystem,n={},o=i.getRect();n.rect=o;var l=e.get("boundaryGap"),s=i.getAxis();if(n.boundaryGap=l,"horizontal"===s.orient){l[0]=a.parsePercent(l[0],o.height),l[1]=a.parsePercent(l[1],o.height);var d=o.height-l[0]-l[1];r(t,e,d)}else{l[0]=a.parsePercent(l[0],o.width),l[1]=a.parsePercent(l[1],o.width);var c=o.width-l[0]-l[1];r(t,e,c)}t.setLayout("layoutInfo",n)}))}function r(e,t,i){if(e.count())for(var a,o=t.coordinateSystem,r=t.getLayerSeries(),s=e.mapDimension("single"),d=e.mapDimension("value"),c=n.map(r,(function(t){return n.map(t.indices,(function(t){var i=o.dataToPoint(e.get(s,t));return i[1]=e.get(d,t),i}))})),u=l(c),h=u.y0,p=i/u.max,g=r.length,f=r[0].indices.length,y=0;y<f;++y){a=h[y]*p,e.setItemLayout(r[0].indices[y],{layerIndex:0,x:c[0][y][0],y0:a,y:c[0][y][1]*p});for(var v=1;v<g;++v)a+=c[v-1][y][1]*p,e.setItemLayout(r[v].indices[y],{layerIndex:v,x:c[v][y][0],y0:a,y:c[v][y][1]*p})}}function l(e){for(var t=e.length,i=e[0].length,n=[],a=[],o=0,r={},l=0;l<i;++l){for(var s=0,d=0;s<t;++s)d+=e[s][l][1];d>o&&(o=d),n.push(d)}for(var c=0;c<i;++c)a[c]=(o-n[c])/2;o=0;for(var u=0;u<i;++u){var h=n[u]+a[u];h>o&&(o=h)}return r.y0=a,r.max=o,r}e.exports=o},9496:function(e,t,i){var n=i(33051),a=n.createHashMap;function o(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.getRawData(),n=e.get("color"),o=a();t.each((function(e){o.set(t.getRawIndex(e),e)})),i.each((function(a){var r=i.getName(a),l=n[(e.nameMap.get(r)-1)%n.length];i.setItemVisual(a,"color",l);var s=o.get(a);null!=s&&t.setItemVisual(s,"color",l)}))}))}e.exports=o},97908:function(e,t,i){var n=i(93321),a=i(9327),o=i(78988),r=o.encodeHTML,l=i(4272),s=n.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},i=e.leaves||{},n=new l(i,this,this.ecModel),o=a.createTree(t,this,{},r);function r(e){e.wrapMethod("getItemModel",(function(e,t){var i=o.getNodeByDataIndex(t);return i.children.length&&i.isExpand||(e.parentModel=n),e}))}var s=0;o.eachNode("preorder",(function(e){e.depth>s&&(s=e.depth)}));var d=e.expandAndCollapse,c=d&&e.initialTreeDepth>=0?e.initialTreeDepth:s;return o.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=c})),o.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){var t=this.getData().tree,i=t.root.children[0],n=t.getNodeByDataIndex(e),a=n.getValue(),o=n.name;while(n&&n!==i)o=n.parentNode.name+"."+o,n=n.parentNode;return r(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});e.exports=s},37732:function(e,t,i){var n=i(33051),a=i(51177),o=i(66351),r=i(69387),l=r.radialCoordinate,s=i(70492),d=i(3726),c=i(23845),u=i(31194),h=i(9176),p=i(61485),g=p.onIrrelevantElement,f=i(38175),y=(f.__DEV__,i(85669)),v=y.parsePercent,m=a.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.childPoints,n=i.length,a=t.parentPoint,o=i[0],r=i[n-1];if(1===n)return e.moveTo(a[0],a[1]),void e.lineTo(o[0],o[1]);var l=t.orient,s="TB"===l||"BT"===l?0:1,d=1-s,c=v(t.forkPosition,1),u=[];u[s]=a[s],u[d]=a[d]+(r[d]-a[d])*c,e.moveTo(a[0],a[1]),e.lineTo(u[0],u[1]),e.moveTo(o[0],o[1]),u[s]=o[s],e.lineTo(u[0],u[1]),u[s]=r[s],e.lineTo(u[0],u[1]),e.lineTo(r[0],r[1]);for(var h=1;h<n-1;h++){var p=i[h];e.moveTo(p[0],p[1]),u[s]=p[s],e.lineTo(u[0],u[1])}}}),x=s.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new a.Group,this._controller=new h(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,i,n){var a=e.getData(),o=e.layoutInfo,r=this._mainGroup,l=e.get("layout");"radial"===l?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]),this._updateViewCoordSys(e,o,l),this._updateController(e,t,i);var s=this._data,d={expandAndCollapse:e.get("expandAndCollapse"),layout:l,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(s).add((function(t){w(a,t)&&_(a,t,null,r,e,d)})).update((function(t,i){var n=s.getItemGraphicEl(i);w(a,t)?_(a,t,n,r,e,d):n&&b(s,i,n,r,e,d)})).remove((function(t){var i=s.getItemGraphicEl(t);i&&b(s,t,i,r,e,d)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===d.expandAndCollapse&&a.eachItemGraphicEl((function(t,n){t.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:n})}))})),this._data=a},_updateViewCoordSys:function(e){var t=e.getData(),i=[];t.each((function(e){var n=t.getItemLayout(e);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])}));var n=[],a=[];d.fromPoints(i,n,a);var o=this._min,r=this._max;a[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,a[1]=r?r[1]:a[1]+1);var l=e.coordinateSystem=new c;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1]),l.setCenter(e.get("center")),l.setZoom(e.get("zoom")),this.group.attr({position:l.position,scale:l.scale}),this._viewCoordSys=l,this._min=n,this._max=a},_updateController:function(e,t,i){var n=this._controller,a=this._controllerHost,o=this.group;n.setPointerChecker((function(t,n,a){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(n,a)&&!g(t,i,e)})),n.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){u.updateViewOnPan(a,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){u.updateViewOnZoom(a,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),i=this._getNodeGlobalScale(e),n=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",n)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=this._nodeScaleRatio,n=t.scale,a=n&&n[0]||1,o=t.getZoom(),r=(o-1)*i+1;return r/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function w(e,t){var i=e.getItemLayout(t);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==e.getItemVisual(t,"symbol")}function I(e,t,i){return i.itemModel=t,i.itemStyle=t.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=t.getModel("lineStyle").getLineStyle(),i.labelModel=t.getModel("label"),i.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function _(e,t,i,n,r,l){var s=!i,d=e.tree.getNodeByDataIndex(t),c=d.getModel(),u=(l=I(d,c,l),e.tree.root),h=d.parentNode===u?d:d.parentNode||d,p=e.getItemGraphicEl(h.dataIndex),g=h.getLayout(),f=p?{x:p.position[0],y:p.position[1],rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:g,y=d.getLayout();s?(i=new o(e,t,l),i.attr("position",[f.x,f.y])):i.updateData(e,t,l),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=y.rawX,i.__radialRawY=y.rawY,n.add(i),e.setItemGraphicEl(t,i),a.updateProps(i,{position:[y.x,y.y]},r);var v=i.getSymbolPath();if("radial"===l.layout){var m,x,w=u.children[0],_=w.getLayout(),b=w.children.length;if(y.x===_.x&&!0===d.isExpand){var P={};P.x=(w.children[0].getLayout().x+w.children[b-1].getLayout().x)/2,P.y=(w.children[0].getLayout().y+w.children[b-1].getLayout().y)/2,m=Math.atan2(P.y-_.y,P.x-_.x),m<0&&(m=2*Math.PI+m),x=P.x<_.x,x&&(m-=Math.PI)}else m=Math.atan2(y.y-_.y,y.x-_.x),m<0&&(m=2*Math.PI+m),0===d.children.length||0!==d.children.length&&!1===d.isExpand?(x=y.x<_.x,x&&(m-=Math.PI)):(x=y.x>_.x,x||(m-=Math.PI));var M=x?"left":"right",N=l.labelModel.get("rotate"),A=N*(Math.PI/180);v.setStyle({textPosition:l.labelModel.get("position")||M,textRotation:null==N?-m:A,textOrigin:"center",verticalAlign:"middle"})}S(r,d,u,i,f,g,y,n,l)}function S(e,t,i,o,r,l,s,d,c){var u=c.edgeShape,h=o.__edge;if("curve"===u)t.parentNode&&t.parentNode!==i&&(h||(h=o.__edge=new a.BezierCurve({shape:P(c,r,r),style:n.defaults({opacity:0,strokeNoScale:!0},c.lineStyle)})),a.updateProps(h,{shape:P(c,l,s),style:{opacity:1}},e));else if("polyline"===u&&"orthogonal"===c.layout&&t!==i&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var p=t.children,g=[],f=0;f<p.length;f++){var y=p[f].getLayout();g.push([y.x,y.y])}h||(h=o.__edge=new m({shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]],orient:c.orient,forkPosition:c.edgeForkPosition},style:n.defaults({opacity:0,strokeNoScale:!0},c.lineStyle)})),a.updateProps(h,{shape:{parentPoint:[s.x,s.y],childPoints:g},style:{opacity:1}},e)}d.add(h)}function b(e,t,i,n,o,r){var l,s=e.tree.getNodeByDataIndex(t),d=e.tree.root,c=s.getModel(),u=(r=I(s,c,r),s.parentNode===d?s:s.parentNode||s),h=r.edgeShape;while(l=u.getLayout(),null==l)u=u.parentNode===d?u:u.parentNode||u;a.updateProps(i,{position:[l.x+1,l.y+1]},o,(function(){n.remove(i),e.setItemGraphicEl(t,null)})),i.fadeOut(null,{keepLabel:!0});var p=e.getItemGraphicEl(u.dataIndex),g=p.__edge,f=i.__edge||(!1===u.isExpand||1===u.children.length?g:void 0);h=r.edgeShape;f&&("curve"===h?a.updateProps(f,{shape:P(r,l,l),style:{opacity:0}},o,(function(){n.remove(f)})):"polyline"===h&&"orthogonal"===r.layout&&a.updateProps(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},o,(function(){n.remove(f)})))}function P(e,t,i){var n,a,o,r,s,d,c,u,h=e.orient;if("radial"===e.layout){s=t.rawX,c=t.rawY,d=i.rawX,u=i.rawY;var p=l(s,c),g=l(s,c+(u-c)*e.curvature),f=l(d,u+(c-u)*e.curvature),y=l(d,u);return{x1:p.x,y1:p.y,x2:y.x,y2:y.y,cpx1:g.x,cpy1:g.y,cpx2:f.x,cpy2:f.y}}return s=t.x,c=t.y,d=i.x,u=i.y,"LR"!==h&&"RL"!==h||(n=s+(d-s)*e.curvature,a=c,o=d+(s-d)*e.curvature,r=u),"TB"!==h&&"BT"!==h||(n=s,a=c+(u-c)*e.curvature,o=d,r=u+(c-u)*e.curvature),{x1:s,y1:c,x2:d,y2:u,cpx1:n,cpy1:a,cpx2:o,cpy2:r}}e.exports=x}}]);
  2. //# sourceMappingURL=chunk-vendors-cfbf2917.646264e0.js.map