chunk-vendors-0ff46c1f.fdc72f52.js 26 KB

12
  1. (self["webpackChunkapp"]=self["webpackChunkapp"]||[]).push([[1895],{81052:function(e,t,o){var i=o(70492);o(97908),o(37732),o(1969);var r=o(34586),n=o(92961);i.registerVisual(r("tree","circle")),i.registerLayout(n)},69387:function(e,t,o){var i=o(76172);function r(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};var t,o,i=[e];while(t=i.pop())if(o=t.children,t.isExpand&&o.length)for(var r=o.length,n=r-1;n>=0;n--){var a=o[n];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},i.push(a)}}function n(e,t){var o=e.isExpand?e.children:[],i=e.parentNode.children,r=e.hierNode.i?i[e.hierNode.i-1]:null;if(o.length){h(e);var n=(o[0].hierNode.prelim+o[o.length-1].hierNode.prelim)/2;r?(e.hierNode.prelim=r.hierNode.prelim+t(e,r),e.hierNode.modifier=e.hierNode.prelim-n):e.hierNode.prelim=n}else r&&(e.hierNode.prelim=r.hierNode.prelim+t(e,r));e.parentNode.hierNode.defaultAncestor=u(e,r,e.parentNode.hierNode.defaultAncestor||i[0],t)}function a(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function l(e){return arguments.length?e:v}function d(e,t){var o={};return e-=Math.PI/2,o.x=t*Math.cos(e),o.y=t*Math.sin(e),o}function s(e,t){return i.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function h(e){var t=e.children,o=t.length,i=0,r=0;while(--o>=0){var n=t[o];n.hierNode.prelim+=i,n.hierNode.modifier+=i,r+=n.hierNode.change,i+=n.hierNode.shift+r}}function u(e,t,o,i){if(t){var r=e,n=e,a=n.parentNode.children[0],l=t,d=r.hierNode.modifier,s=n.hierNode.modifier,h=a.hierNode.modifier,u=l.hierNode.modifier;while(l=p(l),n=c(n),l&&n){r=p(r),a=c(a),r.hierNode.ancestor=e;var v=l.hierNode.prelim+u-n.hierNode.prelim-s+i(l,n);v>0&&(g(f(l,e,o),e,v),s+=v,d+=v),u+=l.hierNode.modifier,s+=n.hierNode.modifier,d+=r.hierNode.modifier,h+=a.hierNode.modifier}l&&!p(r)&&(r.hierNode.thread=l,r.hierNode.modifier+=u-d),n&&!c(a)&&(a.hierNode.thread=n,a.hierNode.modifier+=s-h,o=e)}return o}function p(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function c(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function f(e,t,o){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:o}function g(e,t,o){var i=o/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=o,t.hierNode.modifier+=o,t.hierNode.prelim+=o,e.hierNode.change+=i}function v(e,t){return e.parentNode===t.parentNode?1:2}t.init=r,t.firstWalk=n,t.secondWalk=a,t.separation=l,t.radialCoordinate=d,t.getViewRect=s},55128:function(e,t){function o(e,t,o){var i,r=[e],n=[];while(i=r.pop())if(n.push(i),i.isExpand){var a=i.children;if(a.length)for(var l=0;l<a.length;l++)r.push(a[l])}while(i=n.pop())t(i,o)}function i(e,t){var o,i=[e];while(o=i.pop())if(t(o),o.isExpand){var r=o.children;if(r.length)for(var n=r.length-1;n>=0;n--)i.push(r[n])}}t.eachAfter=o,t.eachBefore=i},1969:function(e,t,o){var i=o(70492),r=o(60553),n=r.updateCenterAndZoom;i.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var o=e.dataIndex,i=t.getData().tree,r=i.getNodeByDataIndex(o);r.isExpand=!r.isExpand}))})),i.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var o=t.coordinateSystem,i=n(o,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}))},92961:function(e,t,o){var i=o(55128),r=i.eachAfter,n=i.eachBefore,a=o(69387),l=a.init,d=a.firstWalk,s=a.secondWalk,h=a.separation,u=a.radialCoordinate,p=a.getViewRect;function c(e,t){e.eachSeriesByType("tree",(function(e){f(e,t)}))}function f(e,t){var o=p(e,t);e.layoutInfo=o;var i=e.get("layout"),a=0,c=0,f=null;"radial"===i?(a=2*Math.PI,c=Math.min(o.height,o.width)/2,f=h((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(a=o.width,c=o.height,f=h());var g=e.getData().tree.root,v=g.children[0];if(v){l(g),r(v,d,f),g.hierNode.modifier=-v.hierNode.prelim,n(v,s);var m=v,y=v,x=v;n(v,(function(e){var t=e.getLayout().x;t<m.getLayout().x&&(m=e),t>y.getLayout().x&&(y=e),e.depth>x.depth&&(x=e)}));var w=m===y?1:f(m,y)/2,N=w-m.getLayout().x,_=0,b=0,I=0,M=0;if("radial"===i)_=a/(y.getLayout().x+w+N),b=c/(x.depth-1||1),n(v,(function(e){I=(e.getLayout().x+N)*_,M=(e.depth-1)*b;var t=u(I,M);e.setLayout({x:t.x,y:t.y,rawX:I,rawY:M},!0)}));else{var L=e.getOrient();"RL"===L||"LR"===L?(b=c/(y.getLayout().x+w+N),_=a/(x.depth-1||1),n(v,(function(e){M=(e.getLayout().x+N)*b,I="LR"===L?(e.depth-1)*_:a-(e.depth-1)*_,e.setLayout({x:I,y:M},!0)}))):"TB"!==L&&"BT"!==L||(_=a/(y.getLayout().x+w+N),b=c/(x.depth-1||1),n(v,(function(e){I=(e.getLayout().x+N)*_,M="TB"===L?(e.depth-1)*b:c-(e.depth-1)*b,e.setLayout({x:I,y:M},!0)})))}}}e.exports=c},17831:function(e,t,o){var i=o(70492);o(37670),o(45255),o(93663);var r=o(46188),n=o(29605);i.registerVisual(r),i.registerLayout(n)},2711:function(e,t,o){var i=o(51177),r=o(76172),n=o(33051),a=o(68833),l=a.wrapTreePathInfo,d=8,s=8,h=5;function u(e){this.group=new i.Group,e.add(this.group)}function p(e,t,o,i,r,n){var a=[[r?e:e-h,t],[e+o,t],[e+o,t+i],[r?e:e-h,t+i]];return!n&&a.splice(2,0,[e+o+h,t+i/2]),!r&&a.push([e,t+i/2]),a}function c(e,t,o){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:o&&o.dataIndex,name:o&&o.name},treePathInfo:o&&l(o,t)}}u.prototype={constructor:u,render:function(e,t,o,i){var n=e.getModel("breadcrumb"),a=this.group;if(a.removeAll(),n.get("show")&&o){var l=n.getModel("itemStyle"),d=l.getModel("textStyle"),s={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(o,s,d),this._renderContent(e,s,l,d,i),r.positionElement(a,s.pos,s.box)}},_prepare:function(e,t,o){for(var i=e;i;i=i.parentNode){var r=i.getModel().get("name"),n=o.getTextRect(r),a=Math.max(n.width+2*d,t.emptyItemWidth);t.totalWidth+=a+s,t.renderList.push({node:i,text:r,width:a})}},_renderContent:function(e,t,o,a,l){for(var d=0,h=t.emptyItemWidth,u=e.get("breadcrumb.height"),f=r.getAvailableSize(t.pos,t.box),g=t.totalWidth,v=t.renderList,m=v.length-1;m>=0;m--){var y=v[m],x=y.node,w=y.width,N=y.text;g>f.width&&(g-=w-h,w=h,N=null);var _=new i.Polygon({shape:{points:p(d,0,w,u,m===v.length-1,0===m)},style:n.defaults(o.getItemStyle(),{lineJoin:"bevel",text:N,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:n.curry(l,x)});this.group.add(_),c(_,e,x),d+=w+s}},remove:function(){this.group.removeAll()}};var f=u;e.exports=f},37670:function(e,t,o){var i=o(33051),r=o(93321),n=o(9327),a=o(4272),l=o(78988),d=l.encodeHTML,s=l.addCommas,h=o(68833),u=h.wrapTreePathInfo,p=r.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var o={name:e.name,children:e.data};c(o);var r=e.levels||[];r=e.levels=f(r,t);var l=i.map(r||[],(function(e){return new a(e,this,t)}),this),d=n.createTree(o,this,null,s);function s(e){e.wrapMethod("getItemModel",(function(e,t){var o=d.getNodeByDataIndex(t),i=l[o.depth];return i&&(e.parentModel=i),e}))}return d.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),o=this.getRawValue(e),r=i.isArray(o)?s(o[0]):s(o),n=t.getName(e);return d(n+": "+r)},getDataParams:function(e){var t=r.prototype.getDataParams.apply(this,arguments),o=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=u(o,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},i.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=i.createHashMap(),this._idIndexMapCount=0);var o=t.get(e);return null==o&&t.set(e,o=this._idIndexMapCount++),o},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 c(e){var t=0;i.each(e.children,(function(e){c(e);var o=e.value;i.isArray(o)&&(o=o[0]),t+=o}));var o=e.value;i.isArray(o)&&(o=o[0]),(null==o||isNaN(o))&&(o=t),o<0&&(o=0),i.isArray(e.value)?e.value[0]=o:e.value=o}function f(e,t){var o=t.get("color");if(o){var r;if(e=e||[],i.each(e,(function(e){var t=new a(e),o=t.get("color");(t.get("itemStyle.color")||o&&"none"!==o)&&(r=!0)})),!r){var n=e[0]||(e[0]={});n.color=o.slice()}return e}}e.exports=p},45255:function(e,t,o){var i=o(70492),r=o(33051),n=o(51177),a=o(4130),l=o(68833),d=o(2711),s=o(9176),h=o(60479),u=o(32892),p=o(34584),c=o(59066),f=o(78988),g=f.windowOpen,v=r.bind,m=n.Group,y=n.Rect,x=r.each,w=3,N=["label"],_=["emphasis","label"],b=["upperLabel"],I=["emphasis","upperLabel"],M=10,L=1,T=2,R=c([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),C=function(e){var t=R(e);return t.stroke=t.fill=t.lineWidth=null,t},D=i.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage=A(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,o,i){var n=t.findComponents({mainType:"series",subType:"treemap",query:i});if(!(r.indexOf(n,e)<0)){this.seriesModel=e,this.api=o,this.ecModel=t;var a=["treemapZoomToNode","treemapRootToNode"],d=l.retrieveTargetInfo(i,a,e),s=i&&i.type,h=e.layoutInfo,u=!this._oldTree,p=this._storage,c="treemapRootToNode"===s&&d&&p?{rootNodeGroup:p.nodeGroup[d.node.getRawIndex()],direction:i.direction}:null,f=this._giveContainerGroup(h),g=this._doRender(f,e,c);u||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?g.renderFinally():this._doAnimation(f,g,e,c),this._resetController(o),this._renderBreadcrumb(e,o,d)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new m,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,o){var i=t.getData().tree,n=this._oldTree,l=A(),d=A(),s=this._storage,h=[],u=r.curry(V,t,d,s,o,l,h);c(i.root?[i.root]:[],n&&n.root?[n.root]:[],e,i===n||!n,0);var p=f(s);return this._oldTree=i,this._storage=d,{lastsForAnimation:l,willDeleteEls:p,renderFinally:g};function c(e,t,o,i,n){function l(e){return e.getId()}function d(r,a){var l=null!=r?e[r]:null,d=null!=a?t[a]:null,s=u(l,d,o,n);s&&c(l&&l.viewChildren||[],d&&d.viewChildren||[],s,i,n+1)}i?(t=e,x(e,(function(e,t){!e.isRemoved()&&d(t,t)}))):new a(t,e,l,l).add(d).update(d).remove(r.curry(d,null)).execute()}function f(e){var t=A();return e&&x(e,(function(e,o){var i=t[o];x(e,(function(e){e&&(i.push(e),e.__tmWillDelete=1)}))})),t}function g(){x(p,(function(e){x(e,(function(e){e.parent&&e.parent.remove(e)}))})),x(h,(function(e){e.invisible=!0,e.dirty()}))}},_doAnimation:function(e,t,o,i){if(o.get("animation")){var n=o.get("animationDurationUpdate"),a=o.get("animationEasing"),l=p.createWrap();x(t.willDeleteEls,(function(e,t){x(e,(function(e,o){if(!e.invisible){var r,d=e.parent;if(i&&"drillDown"===i.direction)r=d===i.rootNodeGroup?{shape:{x:0,y:0,width:d.__tmNodeWidth,height:d.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var s=0,h=0;d.__tmWillDelete||(s=d.__tmNodeWidth/2,h=d.__tmNodeHeight/2),r="nodeGroup"===t?{position:[s,h],style:{opacity:0}}:{shape:{x:s,y:h,width:0,height:0},style:{opacity:0}}}r&&l.add(e,r,n,a)}}))})),x(this._storage,(function(e,o){x(e,(function(e,i){var d=t.lastsForAnimation[o][i],s={};d&&("nodeGroup"===o?d.old&&(s.position=e.position.slice(),e.attr("position",d.old)):(d.old&&(s.shape=r.extend({},e.shape),e.setShape(d.old)),d.fadein?(e.setStyle("opacity",0),s.style={opacity:1}):1!==e.style.opacity&&(s.style={opacity:1})),l.add(e,s,n,a))}))}),this),this._state="animating",l.done(v((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||(t=this._controller=new s(e.getZr()),t.enable(this.seriesModel.get("roam")),t.on("pan",v(this._onPan,this)),t.on("zoom",v(this._onZoom,this)));var o=new h(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,i){return o.contain(t,i)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>w||Math.abs(e.dy)>w)){var t=this.seriesModel.getData().tree.root;if(!t)return;var o=t.getLayout();if(!o)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x+e.dx,y:o.y+e.dy,width:o.width,height:o.height}})}},_onZoom:function(e){var t=e.originX,o=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var n=new h(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;t-=a.x,o-=a.y;var l=u.create();u.translate(l,l,[-t,-o]),u.scale(l,l,[e.scale,e.scale]),u.translate(l,l,[t,o]),n.applyTransform(l),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x,y:n.y,width:n.width,height:n.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var o=this.findTarget(e.offsetX,e.offsetY);if(o){var i=o.node;if(i.getLayout().isLeafRoot)this._rootToNode(o);else if("zoomToNode"===t)this._zoomToNode(o);else if("link"===t){var r=i.hostTree.data.getItemModel(i.dataIndex),n=r.get("link",!0),a=r.get("target",!0)||"blank";n&&g(n,a)}}}}}),this)},_renderBreadcrumb:function(e,t,o){function i(t){"animating"!==this._state&&(l.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}o||(o=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2),o||(o={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new d(this.group))).render(e,t,o.node,v(i,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=A(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var o,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var n=r.transformCoordToLocal(e,t),a=r.shape;if(!(a.x<=n[0]&&n[0]<=a.x+a.width&&a.y<=n[1]&&n[1]<=a.y+a.height))return!1;o={node:i,offsetX:n[0],offsetY:n[1]}}}),this),o}});function A(){return{nodeGroup:[],background:[],content:[]}}function V(e,t,o,i,a,l,d,s,h,u){if(d){var p=d.getLayout(),c=e.getData();if(c.setItemGraphicEl(d.dataIndex,null),p&&p.isInView){var f=p.width,g=p.height,v=p.borderWidth,x=p.invisible,w=d.getRawIndex(),M=s&&s.getRawIndex(),D=d.viewChildren,A=p.upperHeight,V=D&&D.length,W=d.getModel("itemStyle"),E=d.getModel("emphasis.itemStyle"),H=O("nodeGroup",m);if(H){if(h.add(H),H.attr("position",[p.x||0,p.y||0]),H.__tmNodeWidth=f,H.__tmNodeHeight=g,p.isAboveViewRoot)return H;var k=d.getModel(),G=O("background",y,u,L);if(G&&P(H,G,V&&p.upperLabelHeight),V)n.isHighDownDispatcher(H)&&n.setAsHighDownDispatcher(H,!1),G&&(n.setAsHighDownDispatcher(G,!0),c.setItemGraphicEl(d.dataIndex,G));else{var B=O("content",y,u,T);B&&z(H,B),G&&n.isHighDownDispatcher(G)&&n.setAsHighDownDispatcher(G,!1),n.setAsHighDownDispatcher(H,!0),c.setItemGraphicEl(d.dataIndex,H)}return H}}}function P(t,o,i){if(o.dataIndex=d.dataIndex,o.seriesIndex=e.seriesIndex,o.setShape({x:0,y:0,width:f,height:g}),x)Z(o);else{o.invisible=!1;var r=d.getVisual("borderColor",!0),a=E.get("borderColor"),l=C(W);l.fill=r;var s=R(E);if(s.fill=a,i){var h=f-2*v;q(l,s,r,h,A,{x:v,y:0,width:h,height:A})}else l.text=s.text=null;o.setStyle(l),n.setElementHoverStyle(o,s)}t.add(o)}function z(t,o){o.dataIndex=d.dataIndex,o.seriesIndex=e.seriesIndex;var i=Math.max(f-2*v,0),r=Math.max(g-2*v,0);if(o.culling=!0,o.setShape({x:v,y:v,width:i,height:r}),x)Z(o);else{o.invisible=!1;var a=d.getVisual("color",!0),l=C(W);l.fill=a;var s=R(E);q(l,s,a,i,r),o.setStyle(l),n.setElementHoverStyle(o,s)}t.add(o)}function Z(e){!e.invisible&&l.push(e)}function q(t,o,i,a,l,s){var h=k.get("name"),u=k.getModel(s?b:N),c=k.getModel(s?I:_),f=u.getShallow("show");n.setLabelStyle(t,o,u,c,{defaultText:f?h:null,autoColor:i,isRectText:!0,labelFetcher:e,labelDataIndex:d.dataIndex,labelProp:s?"upperLabel":"label"}),F(t,s,p),F(o,s,p),s&&(t.textRect=r.clone(s)),t.truncate=f&&u.get("ellipsis")?{outerWidth:a,outerHeight:l,minChar:2}:null}function F(t,o,i){var r=t.text;if(!o&&i.isLeafRoot&&null!=r){var n=e.get("drillDownIcon",!0);t.text=n?n+" "+r:r}}function O(e,i,r,n){var l=null!=M&&o[e][M],d=a[e];return l?(o[e][M]=null,X(d,l,e)):x||(l=new i({z:S(r,n)}),l.__tmDepth=r,l.__tmStorageName=e,Y(d,l,e)),t[e][w]=l}function X(e,t,o){var i=e[w]={};i.old="nodeGroup"===o?t.position.slice():r.extend({},t.shape)}function Y(e,t,o){var r=e[w]={},n=d.parentNode;if(n&&(!i||"drillDown"===i.direction)){var l=0,s=0,h=a.background[n.getRawIndex()];!i&&h&&h.old&&(l=h.old.width,s=h.old.height),r.old="nodeGroup"===o?[0,s]:{x:l,y:s,width:0,height:0}}r.fadein="nodeGroup"!==o}}function S(e,t){var o=e*M+t;return(o-1)/o}e.exports=D},93663:function(e,t,o){for(var i=o(70492),r=o(68833),n=function(){},a=["treemapZoomToNode","treemapRender","treemapMove"],l=0;l<a.length;l++)i.registerAction({type:a[l],update:"updateView"},n);i.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){function o(t,o){var i=["treemapZoomToNode","treemapRootToNode"],n=r.retrieveTargetInfo(e,i,t);if(n){var a=t.getViewRoot();a&&(e.direction=r.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}t.eachComponent({mainType:"series",subType:"treemap",query:e},o)}))},29605:function(e,t,o){var i=o(33051),r=o(60479),n=o(85669),a=n.parsePercent,l=n.MAX_SAFE_INTEGER,d=o(76172),s=o(68833),h=Math.max,u=Math.min,p=i.retrieve,c=i.each,f=["itemStyle","borderWidth"],g=["itemStyle","gapWidth"],v=["upperLabel","show"],m=["upperLabel","height"],y={seriesType:"treemap",reset:function(e,t,o,n){var l=o.getWidth(),h=o.getHeight(),u=e.option,f=d.getLayoutRect(e.getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()}),g=u.size||[],v=a(p(f.width,g[0]),l),m=a(p(f.height,g[1]),h),y=n&&n.type,w=["treemapZoomToNode","treemapRootToNode"],N=s.retrieveTargetInfo(n,w,e),_="treemapRender"===y||"treemapMove"===y?n.rootRect:null,b=e.getViewRoot(),I=s.getPathToRoot(b);if("treemapMove"!==y){var M="treemapZoomToNode"===y?L(e,N,b,v,m):_?[_.width,_.height]:[v,m],C=u.sort;C&&"asc"!==C&&"desc"!==C&&(C="desc");var D={squareRatio:u.squareRatio,sort:C,leafDepth:u.leafDepth};b.hostTree.clearLayouts();var A={x:0,y:0,width:M[0],height:M[1],area:M[0]*M[1]};b.setLayout(A),x(b,D,!1,0);A=b.getLayout();c(I,(function(e,t){var o=(I[t+1]||b).getValue();e.setLayout(i.extend({dataExtent:[o,o],borderWidth:0,upperHeight:0},A))}))}var V=e.getData().tree.root;V.setLayout(T(f,_,N),!0),e.setLayoutInfo(f),R(V,new r(-f.x,-f.y,l,h),I,b,0)}};function x(e,t,o,i){var r,n;if(!e.isRemoved()){var a=e.getLayout();r=a.width,n=a.height;var l=e.getModel(),d=l.get(f),s=l.get(g)/2,p=C(l),c=Math.max(d,p),v=d-s,m=c-s;l=e.getModel();e.setLayout({borderWidth:d,upperHeight:c,upperLabelHeight:p},!0),r=h(r-2*v,0),n=h(n-v-m,0);var y=r*n,N=w(e,l,y,t,o,i);if(N.length){var _={x:v,y:m,width:r,height:n},b=u(r,n),L=1/0,T=[];T.area=0;for(var R=0,D=N.length;R<D;){var A=N[R];T.push(A),T.area+=A.getLayout().area;var V=I(T,b,t.squareRatio);V<=L?(R++,L=V):(T.area-=T.pop().getLayout().area,M(T,b,_,s,!1),b=u(_.width,_.height),T.length=T.area=0,L=1/0)}if(T.length&&M(T,b,_,s,!0),!o){var S=l.get("childrenVisibleMin");null!=S&&y<S&&(o=!0)}for(R=0,D=N.length;R<D;R++)x(N[R],t,o,i+1)}}}function w(e,t,o,r,n,a){var l=e.children||[],d=r.sort;"asc"!==d&&"desc"!==d&&(d=null);var s=null!=r.leafDepth&&r.leafDepth<=a;if(n&&!s)return e.viewChildren=[];l=i.filter(l,(function(e){return!e.isRemoved()})),_(l,d);var h=b(t,l,d);if(0===h.sum)return e.viewChildren=[];if(h.sum=N(t,o,h.sum,d,l),0===h.sum)return e.viewChildren=[];for(var u=0,p=l.length;u<p;u++){var c=l[u].getValue()/h.sum*o;l[u].setLayout({area:c})}return s&&(l.length&&e.setLayout({isLeafRoot:!0},!0),l.length=0),e.viewChildren=l,e.setLayout({dataExtent:h.dataExtent},!0),l}function N(e,t,o,i,r){if(!i)return o;for(var n=e.get("visibleMin"),a=r.length,l=a,d=a-1;d>=0;d--){var s=r["asc"===i?a-d-1:d].getValue();s/o*t<n&&(l=d,o-=s)}return"asc"===i?r.splice(0,a-l):r.splice(l,a-l),o}function _(e,t){return t&&e.sort((function(e,o){var i="asc"===t?e.getValue()-o.getValue():o.getValue()-e.getValue();return 0===i?"asc"===t?e.dataIndex-o.dataIndex:o.dataIndex-e.dataIndex:i})),e}function b(e,t,o){for(var i=0,r=0,n=t.length;r<n;r++)i+=t[r].getValue();var a=e.get("visualDimension");if(t&&t.length)if("value"===a&&o)l=[t[t.length-1].getValue(),t[0].getValue()],"asc"===o&&l.reverse();else{var l=[1/0,-1/0];c(t,(function(e){var t=e.getValue(a);t<l[0]&&(l[0]=t),t>l[1]&&(l[1]=t)}))}else l=[NaN,NaN];return{sum:i,dataExtent:l}}function I(e,t,o){for(var i,r=0,n=1/0,a=0,l=e.length;a<l;a++)i=e[a].getLayout().area,i&&(i<n&&(n=i),i>r&&(r=i));var d=e.area*e.area,s=t*t*o;return d?h(s*r/d,d/(s*n)):1/0}function M(e,t,o,i,r){var n=t===o.width?0:1,a=1-n,l=["x","y"],d=["width","height"],s=o[l[n]],p=t?e.area/t:0;(r||p>o[d[a]])&&(p=o[d[a]]);for(var c=0,f=e.length;c<f;c++){var g=e[c],v={},m=p?g.getLayout().area/p:0,y=v[d[a]]=h(p-2*i,0),x=o[l[n]]+o[d[n]]-s,w=c===f-1||x<m?x:m,N=v[d[n]]=h(w-2*i,0);v[l[a]]=o[l[a]]+u(i,y/2),v[l[n]]=s+u(i,N/2),s+=w,g.setLayout(v,!0)}o[l[a]]+=p,o[d[a]]-=p}function L(e,t,o,i,r){var n,a=(t||{}).node,d=[i,r];if(!a||a===o)return d;var s=i*r,h=s*e.option.zoomToNodeRatio;while(n=a.parentNode){for(var u=0,p=n.children,c=0,g=p.length;c<g;c++)u+=p[c].getValue();var v=a.getValue();if(0===v)return d;h*=u/v;var m=n.getModel(),y=m.get(f),x=Math.max(y,C(m,y));h+=4*y*y+(3*y+x)*Math.pow(h,.5),h>l&&(h=l),a=n}h<s&&(h=s);var w=Math.pow(h/s,.5);return[i*w,r*w]}function T(e,t,o){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!o)return i;var r=o.node,n=r.getLayout();if(!n)return i;var a=[n.width/2,n.height/2],l=r;while(l){var d=l.getLayout();a[0]+=d.x,a[1]+=d.y,l=l.parentNode}return{x:e.width/2-a[0],y:e.height/2-a[1]}}function R(e,t,o,i,n){var a=e.getLayout(),l=o[n],d=l&&l===e;if(!(l&&!d||n===o.length&&e!==i)){e.setLayout({isInView:!0,invisible:!d&&!t.intersect(a),isAboveViewRoot:d},!0);var s=new r(t.x-a.x,t.y-a.y,t.width,t.height);c(e.viewChildren||[],(function(e){R(e,s,o,i,n+1)}))}}function C(e){return e.get(v)?e.get(m):0}e.exports=y},46188:function(e,t,o){var i=o(59937),r=o(21092),n=o(33051),a=n.isArray,l="itemStyle",d={seriesType:"treemap",reset:function(e,t,o,i){var r=e.getData().tree,a=r.root,d=e.getModel(l);if(!a.isRemoved()){var h=n.map(r.levelModels,(function(e){return e?e.get(l):null}));s(a,{},h,d,e.getViewRoot().getAncestors(),e)}}};function s(e,t,o,i,r,a){var d=e.getModel(),c=e.getLayout();if(c&&!c.invisible&&c.isInView){var g,m=e.getModel(l),y=o[e.depth],x=h(m,t,y,i),w=m.get("borderColor"),N=m.get("borderColorSaturation");null!=N&&(g=u(x,e),w=p(N,g)),e.setVisual("borderColor",w);var _=e.viewChildren;if(_&&_.length){var b=f(e,d,c,m,x,_);n.each(_,(function(e,t){if(e.depth>=r.length||e===r[e.depth]){var n=v(d,x,e,t,b,a);s(e,n,o,i,r,a)}}))}else g=u(x,e),e.setVisual("color",g)}}function h(e,t,o,i){var r=n.extend({},t);return n.each(["color","colorAlpha","colorSaturation"],(function(n){var a=e.get(n,!0);null==a&&o&&(a=o[n]),null==a&&(a=t[n]),null==a&&(a=i.get(n)),null!=a&&(r[n]=a)})),r}function u(e){var t=c(e,"color");if(t){var o=c(e,"colorAlpha"),i=c(e,"colorSaturation");return i&&(t=r.modifyHSL(t,null,null,i)),o&&(t=r.modifyAlpha(t,o)),t}}function p(e,t){return null!=t?r.modifyHSL(t,null,null,e):null}function c(e,t){var o=e[t];if(null!=o&&"none"!==o)return o}function f(e,t,o,r,n,a){if(a&&a.length){var l=g(t,"color")||null!=n.color&&"none"!==n.color&&(g(t,"colorAlpha")||g(t,"colorSaturation"));if(l){var d=t.get("visualMin"),s=t.get("visualMax"),h=o.dataExtent.slice();null!=d&&d<h[0]&&(h[0]=d),null!=s&&s>h[1]&&(h[1]=s);var u=t.get("colorMappingBy"),p={type:l.name,dataExtent:h,visual:l.range};"color"!==p.type||"index"!==u&&"id"!==u?p.mappingMethod="linear":(p.mappingMethod="category",p.loop=!0);var c=new i(p);return c.__drColorMappingBy=u,c}}}function g(e,t){var o=e.get(t);return a(o)&&o.length?{name:t,range:o}:null}function v(e,t,o,i,r,a){var l=n.extend({},t);if(r){var d=r.type,s="color"===d&&r.__drColorMappingBy,h="index"===s?i:"id"===s?a.mapIdToIndex(o.getId()):o.getValue(e.get("visualDimension"));l[d]=r.mapValueToVisual(h)}return l}e.exports=d}}]);
  2. //# sourceMappingURL=chunk-vendors-0ff46c1f.fdc72f52.js.map