e[i].y+e[i].height)return void d(i,n/2)}d(a-1,n/2)}function d(t,a){for(var n=t;n>=0;n--){if(e[n].y-a0&&e[n].y>e[n-1].y+e[n-1].height)break}}function g(e,t,a,n,o,i){for(var r=t?Number.MAX_VALUE:0,l=0,s=e.length;l=r&&(g=r-10),!t&&g<=r&&(g=r+10),e[l].x=a+g*i,r=g}}e.sort((function(e,t){return e.y-t.y}));for(var h,y=0,p=e.length,f=[],v=[],m=0;m=a?v.push(e[m]):f.push(e[m]);g(f,!1,t,a,n,o),g(v,!0,t,a,n,o)}function s(e,t,a,o,i,r,s,c){for(var d=[],g=[],h=Number.MAX_VALUE,y=-Number.MAX_VALUE,p=0;p0?"right":"left":E>0?"left":"right"}var U=u.get("rotate");P="number"===typeof U?U*(Math.PI/180):U?E<0?-_+Math.PI:-_:0,y=!!P,r.label={x:D,y:M,position:f,height:V.height,len:A,len2:S,linePoints:N,textAlign:w,verticalAlign:"middle",rotation:P,inside:G,labelDistance:v,labelAlignTo:m,labelMargin:x,bleedMargin:L,textRect:V,text:j,font:b},G||h.push(r.label)}})),!y&&e.get("avoidLabelOverlap")&&s(h,c,d,t,a,o,l,u)}e.exports=c},63798:function(e,t,a){var n=a(85669),o=n.parsePercent,i=n.linearMap,r=a(76172),l=a(17659),s=a(33051),u=2*Math.PI,c=Math.PI/180;function d(e,t){return r.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function g(e,t,a,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),n=t.mapDimension("value"),r=d(e,a),g=e.get("center"),h=e.get("radius");s.isArray(h)||(h=[0,h]),s.isArray(g)||(g=[g,g]);var y=o(r.width,a.getWidth()),p=o(r.height,a.getHeight()),f=Math.min(y,p),v=o(g[0],y)+r.x,m=o(g[1],p)+r.y,x=o(h[0],f/2),L=o(h[1],f/2),b=-e.get("startAngle")*c,I=e.get("minAngle")*c,A=0;t.each(n,(function(e){!isNaN(e)&&A++}));var S=t.getSum(n),D=Math.PI/(S||A)*2,M=e.get("clockwise"),N=e.get("roseType"),w=e.get("stillShowZeroSum"),_=t.getDataExtent(n);_[0]=0;var E=u,T=0,P=b,j=M?1:-1;if(t.each(n,(function(e,a){var n;if(isNaN(e))t.setItemLayout(a,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:M,cx:v,cy:m,r0:x,r:N?NaN:L,viewRect:r});else{n="area"!==N?0===S&&w?D:e*D:u/A,n"+i.map(n,(function(a,n){var o=t.get(t.mapDimension(a.dim),e);return l(a.name+" : "+o)})).join("
")},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),a=this.coordinateSystem,n=t.getValues(i.map(a.dimensions,(function(e){return t.mapDimension(e)})),e,!0),o=0,r=n.length;o=0&&(r[i[s].depth]=new l(i[s],this,t));if(n&&a){var u=o(n,a,this,!0,c);return u.data}function c(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var a=this.parentModel,n=a.getData().getItemLayout(t).depth,o=a.levelModels[n];return o||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var a=this.parentModel,n=a.getGraph().getEdgeByIndex(t),o=n.node1.getLayout().depth,i=a.levelModels[o];return i||this.parentModel})),e}))}},setNodePosition:function(e,t){var a=this.option.data[e];a.localX=t[0],a.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,a){if("edge"===a){var n=this.getDataParams(e,a),o=n.data,i=o.source+" -- "+o.target;return n.value&&(i+=" : "+n.value),r(i)}if("node"===a){var l=this.getGraph().getNodeByIndex(e),s=l.getLayout().value,c=this.getDataParams(e,a).data.name;if(s)i=c+" : "+s;return r(i)}return u.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var a=u.superCall(this,"getDataParams",e,t);if(null==a.value&&"node"===t){var n=this.getGraph().getNodeByIndex(e),o=n.getLayout().value;a.value=o}return a},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}})),c=u;e.exports=c},42978:function(e,t,a){var n=a(51177),o=a(70492),i=a(33051),r=["itemStyle","opacity"],l=["emphasis","itemStyle","opacity"],s=["lineStyle","opacity"],u=["emphasis","lineStyle","opacity"];function c(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function d(e,t,a){var n=e.getGraphicEl(),o=c(e,t);null!=a&&(null==o&&(o=1),o*=a),n.downplay&&n.downplay(),n.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",o)}))}function g(e,t){var a=c(e,t),n=e.getGraphicEl();n.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",a)})),n.highlight&&n.highlight()}var h=n.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var a=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+a,t.y2),e.bezierCurveTo(t.cpx2+a,t.cpy2,t.cpx1+a,t.cpy1,t.x1+a,t.y1)):(e.lineTo(t.x2,t.y2+a),e.bezierCurveTo(t.cpx2,t.cpy2+a,t.cpx1,t.cpy1+a,t.x1,t.y1+a)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}}),y=o.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,a){var o=this,i=e.getGraph(),r=this.group,l=e.layoutInfo,s=l.width,u=l.height,c=e.getData(),d=e.getData("edge"),g=e.get("orient");this._model=e,r.removeAll(),r.attr("position",[l.x,l.y]),i.eachEdge((function(t){var a=new h;a.dataIndex=t.dataIndex,a.seriesIndex=e.seriesIndex,a.dataType="edge";var o,i,l,c,y,p,f,v,m=t.getModel("lineStyle"),x=m.get("curveness"),L=t.node1.getLayout(),b=t.node1.getModel(),I=b.get("localX"),A=b.get("localY"),S=t.node2.getLayout(),D=t.node2.getModel(),M=D.get("localX"),N=D.get("localY"),w=t.getLayout();switch(a.shape.extent=Math.max(1,w.dy),a.shape.orient=g,"vertical"===g?(o=(null!=I?I*s:L.x)+w.sy,i=(null!=A?A*u:L.y)+L.dy,l=(null!=M?M*s:S.x)+w.ty,c=null!=N?N*u:S.y,y=o,p=i*(1-x)+c*x,f=l,v=i*x+c*(1-x)):(o=(null!=I?I*s:L.x)+L.dx,i=(null!=A?A*u:L.y)+w.sy,l=null!=M?M*s:S.x,c=(null!=N?N*u:S.y)+w.ty,y=o*(1-x)+l*x,p=i,f=o*x+l*(1-x),v=c),a.setShape({x1:o,y1:i,x2:l,y2:c,cpx1:y,cpy1:p,cpx2:f,cpy2:v}),a.setStyle(m.getItemStyle()),a.style.fill){case"source":a.style.fill=t.node1.getVisual("color");break;case"target":a.style.fill=t.node2.getVisual("color");break}n.setHoverStyle(a,t.getModel("emphasis.lineStyle").getItemStyle()),r.add(a),d.setItemGraphicEl(t.dataIndex,a)})),i.eachNode((function(t){var a=t.getLayout(),o=t.getModel(),i=o.get("localX"),l=o.get("localY"),d=o.getModel("label"),g=o.getModel("emphasis.label"),h=new n.Rect({shape:{x:null!=i?i*s:a.x,y:null!=l?l*u:a.y,width:a.dx,height:a.dy},style:o.getModel("itemStyle").getItemStyle()}),y=t.getModel("emphasis.itemStyle").getItemStyle();n.setLabelStyle(h.style,y,d,g,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),h.setStyle("fill",t.getVisual("color")),n.setHoverStyle(h,y),r.add(h),c.setItemGraphicEl(t.dataIndex,h),h.dataType="node"})),c.eachItemGraphicEl((function(t,n){var i=c.getItemModel(n);i.get("draggable")&&(t.drift=function(t,i){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=i,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(n),localX:this.shape.x/s,localY:this.shape.y/u})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),i.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(a)}))})),d.eachItemGraphicEl((function(t,n){var i=d.getItemModel(n);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),i.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(a)}))})),!this._data&&e.get("animation")&&r.setClipPath(p(r.getBoundingRect(),e,(function(){r.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,a,n){var o=e.getData(),c=o.graph,h=n.dataIndex,y=o.getItemModel(h),p=n.edgeDataIndex;if(null!=h||null!=p){var f=c.getNodeByIndex(h),v=c.getEdgeByIndex(p);if(c.eachNode((function(e){d(e,r,.1)})),c.eachEdge((function(e){d(e,s,.1)})),f){g(f,l);var m=y.get("focusNodeAdjacency");"outEdges"===m?i.each(f.outEdges,(function(e){e.dataIndex<0||(g(e,u),g(e.node2,l))})):"inEdges"===m?i.each(f.inEdges,(function(e){e.dataIndex<0||(g(e,u),g(e.node1,l))})):"allEdges"===m&&i.each(f.edges,(function(e){e.dataIndex<0||(g(e,u),e.node1!==f&&g(e.node1,l),e.node2!==f&&g(e.node2,l))}))}v&&(g(v,u),g(v.node1,l),g(v.node2,l))}},unfocusNodeAdjacency:function(e,t,a,n){var o=e.getGraph();o.eachNode((function(e){d(e,r)})),o.eachEdge((function(e){d(e,s)}))}});function p(e,t,a){var o=new n.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return n.initProps(o,{shape:{width:e.width+20}},t,a),o}e.exports=y},37655:function(e,t,a){var n=a(70492);a(35540),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))},55776:function(e,t,a){var n=a(76172),o=a(33051),i=a(32234),r=i.groupData;function l(e,t,a){e.eachSeriesByType("sankey",(function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=s(e,t);e.layoutInfo=i;var r=i.width,l=i.height,d=e.getGraph(),g=d.nodes,h=d.edges;c(g);var y=o.filter(g,(function(e){return 0===e.getLayout().value})),p=0!==y.length?0:e.get("layoutIterations"),f=e.get("orient"),v=e.get("nodeAlign");u(g,h,a,n,r,l,p,f,v)}))}function s(e,t){return n.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function u(e,t,a,n,o,i,r,l,s){d(e,t,a,o,i,l,s),f(e,t,i,o,n,r,l),_(e,l)}function c(e){o.each(e,(function(e){var t=N(e.outEdges,M),a=N(e.inEdges,M),n=e.getValue()||0,o=Math.max(t,a,n);e.setLayout({value:o},!0)}))}function d(e,t,a,n,o,i,r){for(var l=[],s=[],u=[],c=[],d=0,g=0,y=0;y=0;L&&x.depth>f&&(f=x.depth),m.setLayout({depth:L?x.depth:d},!0),"vertical"===i?m.setLayout({dy:a},!0):m.setLayout({dx:a},!0);for(var b=0;bd-1?f:d-1;r&&"left"!==r&&h(e,r,i,M);g="vertical"===i?(o-a)/M:(n-a)/M;p(e,g,i)}function g(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function h(e,t,a,n){if("right"===t){var i=[],r=e,l=0;while(r.length){for(var s=0;s0;i--)s*=.99,L(l,s,r),x(l,o,a,n,r),w(l,s,r),x(l,o,a,n,r)}function v(e,t){var a=[],n="vertical"===t?"y":"x",i=r(e,(function(e){return e.getLayout()[n]}));return i.keys.sort((function(e,t){return e-t})),o.each(i.keys,(function(e){a.push(i.buckets.get(e))})),a}function m(e,t,a,n,i,r){var l=1/0;o.each(e,(function(e){var t=e.length,s=0;o.each(e,(function(e){s+=e.getLayout().value}));var u="vertical"===r?(n-(t-1)*i)/s:(a-(t-1)*i)/s;u0&&(o=l.getLayout()[r]+s,"vertical"===i?l.setLayout({x:o},!0):l.setLayout({y:o},!0)),u=l.getLayout()[r]+l.getLayout()[d]+t;var h="vertical"===i?n:a;if(s=u-t-h,s>0)for(o=l.getLayout()[r]-s,"vertical"===i?l.setLayout({x:o},!0):l.setLayout({y:o},!0),u=o,g=c-2;g>=0;--g)l=e[g],s=l.getLayout()[r]+l.getLayout()[d]+t-u,s>0&&(o=l.getLayout()[r]-s,"vertical"===i?l.setLayout({x:o},!0):l.setLayout({y:o},!0)),u=l.getLayout()[r]}))}function L(e,t,a){o.each(e.slice().reverse(),(function(e){o.each(e,(function(e){if(e.outEdges.length){var n=N(e.outEdges,b,a)/N(e.outEdges,M,a);if(isNaN(n)){var o=e.outEdges.length;n=o?N(e.outEdges,I,a)/o:0}if("vertical"===a){var i=e.getLayout().x+(n-D(e,a))*t;e.setLayout({x:i},!0)}else{var r=e.getLayout().y+(n-D(e,a))*t;e.setLayout({y:r},!0)}}}))}))}function b(e,t){return D(e.node2,t)*e.getValue()}function I(e,t){return D(e.node2,t)}function A(e,t){return D(e.node1,t)*e.getValue()}function S(e,t){return D(e.node1,t)}function D(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function M(e){return e.getValue()}function N(e,t,a){var n=0,o=e.length,i=-1;while(++ir&&(r=t)})),o.each(a,(function(t){var a=new n({type:"color",mappingMethod:"linear",dataExtent:[i,r],visual:e.get("color")}),o=a.mapValueToVisual(t.getLayout().value),l=t.getModel().get("itemStyle.color");null!=l?t.setVisual("color",l):t.setVisual("color",o)}))}}))}e.exports=i},42213:function(e,t,a){var n=a(70492);a(517),a(79002);var o=a(34586),i=a(21149);a(84617),n.registerVisual(o("scatter","circle")),n.registerLayout(i("scatter"))},517:function(e,t,a){var n=a(40488),o=a(93321),i=o.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return n(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});e.exports=i},79002:function(e,t,a){var n=a(70492),o=a(68162),i=a(48066),r=a(21149);n.extendChartView({type:"scatter",render:function(e,t,a){var n=e.getData(),o=this._updateSymbolDraw(n,e);o.updateData(n,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,a){var n=e.getData(),o=this._updateSymbolDraw(n,e);o.incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(e,t,a){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,a){var n=e.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=r().reset(e);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(e){var t=e.coordinateSystem,a=t&&t.getArea&&t.getArea();return e.get("clip",!0)?a:null},_updateSymbolDraw:function(e,t){var a=this._symbolDraw,n=t.pipelineContext,r=n.large;return a&&r===this._isLargeDraw||(a&&a.remove(),a=this._symbolDraw=r?new i:new o,this._isLargeDraw=r,this.group.removeAll()),this.group.add(a.group),a},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})}}]);
//# sourceMappingURL=chunk-vendors-e24f3508.98c3e752.js.map