12 |
- (self["webpackChunkapp"]=self["webpackChunkapp"]||[]).push([[8938],{52755:function(e,t,i){var o=i(70492);i(6344),i(11243);var n=i(34586),a=i(21149);o.registerVisual(n("effectScatter","circle")),o.registerLayout(a("effectScatter"))},6344:function(e,t,i){var o=i(40488),n=i(93321),a=n.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return o(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});e.exports=a},11243:function(e,t,i){var o=i(70492),n=i(68162),a=i(53036),r=i(32892),l=i(21149),s=o.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new n(a)},render:function(e,t,i){var o=e.getData(),n=this._symbolDraw;n.updateData(o),this.group.add(n.group)},updateTransform:function(e,t,i){var o=e.getData();this.group.dirty();var n=l().reset(e);n.progress&&n.progress({start:0,end:o.count()},o),this._symbolDraw.updateLayout(o)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=r.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});e.exports=s},66614:function(e,t,i){var o=i(70492);i(51711),i(54260);var n=i(69274),a=i(95378),r=i(22528);o.registerVisual(n("funnel")),o.registerLayout(a),o.registerProcessor(r("funnel"))},51711:function(e,t,i){var o=i(70492),n=i(33051),a=i(23263),r=i(32234),l=r.defaultEmphasis,s=i(61772),c=s.makeSeriesEncodeForNameBased,d=i(72019),u=o.extendSeriesModel({type:"series.funnel",init:function(e){u.superApply(this,"init",arguments),this.legendVisualProvider=new d(n.bind(this.getData,this),n.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return a(this,{coordDimensions:["value"],encodeDefaulter:n.curry(c,this)})},_defaultLabelLine:function(e){l(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),i=u.superCall(this,"getDataParams",e),o=t.mapDimension("value"),n=t.getSum(o);return i.percent=n?+(t.get(o,e)/n*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}),g=u;e.exports=g},54260:function(e,t,i){var o=i(51177),n=i(33051),a=i(75797);function r(e,t){o.Group.call(this);var i=new o.Polygon,n=new o.Polyline,a=new o.Text;this.add(i),this.add(n),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore):(n.ignore=n.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var l=r.prototype,s=["itemStyle","opacity"];l.updateData=function(e,t,i){var a=this.childAt(0),r=e.hostModel,l=e.getItemModel(t),c=e.getItemLayout(t),d=e.getItemModel(t).get(s);d=null==d?1:d,a.useStyle({}),i?(a.setShape({points:c.points}),a.setStyle({opacity:0}),o.initProps(a,{style:{opacity:d}},r,t)):o.updateProps(a,{style:{opacity:d},shape:{points:c.points}},r,t);var u=l.getModel("itemStyle"),g=e.getItemVisual(t,"color");a.setStyle(n.defaults({lineJoin:"round",fill:g},u.getItemStyle(["opacity"]))),a.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),o.setHoverStyle(this)},l._updateLabel=function(e,t){var i=this.childAt(1),n=this.childAt(2),a=e.hostModel,r=e.getItemModel(t),l=e.getItemLayout(t),s=l.label,c=e.getItemVisual(t,"color");o.updateProps(i,{shape:{points:s.linePoints||s.linePoints}},a,t),o.updateProps(n,{style:{x:s.x,y:s.y}},a,t),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var d=r.getModel("label"),u=r.getModel("emphasis.label"),g=r.getModel("labelLine"),h=r.getModel("emphasis.labelLine");c=e.getItemVisual(t,"color");o.setLabelStyle(n.style,n.hoverStyle={},d,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:c,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!d.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!g.get("show"),i.hoverIgnore=!h.get("show"),i.setStyle({stroke:c}),i.setStyle(g.getModel("lineStyle").getLineStyle()),i.hoverStyle=h.getModel("lineStyle").getLineStyle()},n.inherits(r,o.Group);var c=a.extend({type:"funnel",render:function(e,t,i){var o=e.getData(),n=this._data,a=this.group;o.diff(n).add((function(e){var t=new r(o,e);o.setItemGraphicEl(e,t),a.add(t)})).update((function(e,t){var i=n.getItemGraphicEl(t);i.updateData(o,e),a.add(i),o.setItemGraphicEl(e,i)})).remove((function(e){var t=n.getItemGraphicEl(e);a.remove(t)})).execute(),this._data=o},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),d=c;e.exports=d},95378:function(e,t,i){var o=i(76172),n=i(85669),a=n.parsePercent,r=n.linearMap;function l(e,t){return o.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function s(e,t){for(var i=e.mapDimension("value"),o=e.mapArray(i,(function(e){return e})),n=[],a="ascending"===t,r=0,l=e.count();r<l;r++)n[r]=r;return"function"===typeof t?n.sort(t):"none"!==t&&n.sort((function(e,t){return a?o[e]-o[t]:o[t]-o[e]})),n}function c(e){e.each((function(t){var i,o,n,a,r=e.getItemModel(t),l=r.getModel("label"),s=l.get("position"),c=r.getModel("labelLine"),d=e.getItemLayout(t),u=d.points,g="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(g)"insideLeft"===s?(o=(u[0][0]+u[3][0])/2+5,n=(u[0][1]+u[3][1])/2,i="left"):"insideRight"===s?(o=(u[1][0]+u[2][0])/2-5,n=(u[1][1]+u[2][1])/2,i="right"):(o=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,n=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,i="center"),a=[[o,n],[o,n]];else{var h,p,f,m=c.get("length");"left"===s?(h=(u[3][0]+u[0][0])/2,p=(u[3][1]+u[0][1])/2,f=h-m,o=f-5,i="right"):"right"===s?(h=(u[1][0]+u[2][0])/2,p=(u[1][1]+u[2][1])/2,f=h+m,o=f+5,i="left"):"rightTop"===s?(h=u[1][0],p=u[1][1],f=h+m,o=f+5,i="top"):"rightBottom"===s?(h=u[2][0],p=u[2][1],f=h+m,o=f+5,i="bottom"):"leftTop"===s?(h=u[0][0],p=u[1][1],f=h-m,o=f-5,i="right"):"leftBottom"===s?(h=u[3][0],p=u[2][1],f=h-m,o=f-5,i="right"):(h=(u[1][0]+u[2][0])/2,p=(u[1][1]+u[2][1])/2,f=h+m,o=f+5,i="left");var y=p;a=[[h,p],[f,y]],n=y}d.label={linePoints:a,x:o,y:n,verticalAlign:"middle",textAlign:i,inside:g}}))}function d(e,t,i){e.eachSeriesByType("funnel",(function(e){var i=e.getData(),o=i.mapDimension("value"),n=e.get("sort"),d=l(e,t),u=s(i,n),g=[a(e.get("minSize"),d.width),a(e.get("maxSize"),d.width)],h=i.getDataExtent(o),p=e.get("min"),f=e.get("max");null==p&&(p=Math.min(h[0],0)),null==f&&(f=h[1]);var m=e.get("funnelAlign"),y=e.get("gap"),v=(d.height-y*(i.count()-1))/i.count(),x=d.y,w=function(e,t){var n,a=i.get(o,e)||0,l=r(a,[p,f],g,!0);switch(m){case"left":n=d.x;break;case"center":n=d.x+(d.width-l)/2;break;case"right":n=d.x+d.width-l;break}return[[n,t],[n+l,t]]};"ascending"===n&&(v=-v,y=-y,x+=d.height,u=u.reverse());for(var S=0;S<u.length;S++){var b=u[S],_=u[S+1],D=i.getItemModel(b),I=D.get("itemStyle.height");null==I?I=v:(I=a(I,d.height),"ascending"===n&&(I=-I));var M=w(b,x),L=w(_,x+I);x+=I+y,i.setItemLayout(b,{points:M.concat(L.slice().reverse())})}c(i)}))}e.exports=d},27539:function(e,t,i){i(37860),i(72826)},37860:function(e,t,i){var o=i(23263),n=i(93321),a=n.extend({type:"series.gauge",getInitialData:function(e,t){return o(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),r=a;e.exports=r},72826:function(e,t,i){var o=i(30931),n=i(51177),a=i(75797),r=i(85669),l=r.parsePercent,s=r.round,c=r.linearMap;function d(e,t){var i=e.get("center"),o=t.getWidth(),n=t.getHeight(),a=Math.min(o,n),r=l(i[0],t.getWidth()),s=l(i[1],t.getHeight()),c=l(e.get("radius"),a/2);return{cx:r,cy:s,r:c}}function u(e,t){return t&&("string"===typeof t?e=t.replace("{value}",null!=e?e:""):"function"===typeof t&&(e=t(e))),e}var g=2*Math.PI,h=a.extend({type:"gauge",render:function(e,t,i){this.group.removeAll();var o=e.get("axisLine.lineStyle.color"),n=d(e,i);this._renderMain(e,t,i,o,n)},dispose:function(){},_renderMain:function(e,t,i,o,a){for(var r=this.group,l=e.getModel("axisLine"),s=l.getModel("lineStyle"),c=e.get("clockwise"),d=-e.get("startAngle")/180*Math.PI,u=-e.get("endAngle")/180*Math.PI,h=(u-d)%g,p=d,f=s.get("width"),m=l.get("show"),y=0;m&&y<o.length;y++){var v=Math.min(Math.max(o[y][0],0),1),x=(u=d+h*v,new n.Sector({shape:{startAngle:p,endAngle:u,cx:a.cx,cy:a.cy,clockwise:c,r0:a.r-f,r:a.r},silent:!0}));x.setStyle({fill:o[y][1]}),x.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),r.add(x),p=u}var w=function(e){if(e<=0)return o[0][1];for(var t=0;t<o.length;t++)if(o[t][0]>=e&&(0===t?0:o[t-1][0])<e)return o[t][1];return o[t-1][1]};if(!c){var S=d;d=u,u=S}this._renderTicks(e,t,i,w,a,d,u,c),this._renderPointer(e,t,i,w,a,d,u,c),this._renderTitle(e,t,i,w,a),this._renderDetail(e,t,i,w,a)},_renderTicks:function(e,t,i,o,a,r,c,d){for(var g=this.group,h=a.cx,p=a.cy,f=a.r,m=+e.get("min"),y=+e.get("max"),v=e.getModel("splitLine"),x=e.getModel("axisTick"),w=e.getModel("axisLabel"),S=e.get("splitNumber"),b=x.get("splitNumber"),_=l(v.get("length"),f),D=l(x.get("length"),f),I=r,M=(c-r)/S,L=M/b,A=v.getModel("lineStyle").getLineStyle(),T=x.getModel("lineStyle").getLineStyle(),P=0;P<=S;P++){var E=Math.cos(I),k=Math.sin(I);if(v.get("show")){var N=new n.Line({shape:{x1:E*f+h,y1:k*f+p,x2:E*(f-_)+h,y2:k*(f-_)+p},style:A,silent:!0});"auto"===A.stroke&&N.setStyle({stroke:o(P/S)}),g.add(N)}if(w.get("show")){var G=u(s(P/S*(y-m)+m),w.get("formatter")),z=w.get("distance"),C=o(P/S);g.add(new n.Text({style:n.setTextStyle({},w,{text:G,x:E*(f-_-z)+h,y:k*(f-_-z)+p,textVerticalAlign:k<-.4?"top":k>.4?"bottom":"middle",textAlign:E<-.4?"left":E>.4?"right":"center"},{autoColor:C}),silent:!0}))}if(x.get("show")&&P!==S){for(var V=0;V<=b;V++){E=Math.cos(I),k=Math.sin(I);var R=new n.Line({shape:{x1:E*f+h,y1:k*f+p,x2:E*(f-D)+h,y2:k*(f-D)+p},silent:!0,style:T});"auto"===T.stroke&&R.setStyle({stroke:o((P+V/b)/S)}),g.add(R),I+=L}I-=L}else I+=M}},_renderPointer:function(e,t,i,a,r,s,d,u){var g=this.group,h=this._data;if(e.get("pointer.show")){var p=[+e.get("min"),+e.get("max")],f=[s,d],m=e.getData(),y=m.mapDimension("value");m.diff(h).add((function(t){var i=new o({shape:{angle:s}});n.initProps(i,{shape:{angle:c(m.get(y,t),p,f,!0)}},e),g.add(i),m.setItemGraphicEl(t,i)})).update((function(t,i){var o=h.getItemGraphicEl(i);n.updateProps(o,{shape:{angle:c(m.get(y,t),p,f,!0)}},e),g.add(o),m.setItemGraphicEl(t,o)})).remove((function(e){var t=h.getItemGraphicEl(e);g.remove(t)})).execute(),m.eachItemGraphicEl((function(e,t){var i=m.getItemModel(t),o=i.getModel("pointer");e.setShape({x:r.cx,y:r.cy,width:l(o.get("width"),r.r),r:l(o.get("length"),r.r)}),e.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",a(c(m.get(y,t),p,[0,1],!0))),n.setHoverStyle(e,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=m}else h&&h.eachItemGraphicEl((function(e){g.remove(e)}))},_renderTitle:function(e,t,i,o,a){var r=e.getData(),s=r.mapDimension("value"),d=e.getModel("title");if(d.get("show")){var u=d.get("offsetCenter"),g=a.cx+l(u[0],a.r),h=a.cy+l(u[1],a.r),p=+e.get("min"),f=+e.get("max"),m=e.getData().get(s,0),y=o(c(m,[p,f],[0,1],!0));this.group.add(new n.Text({silent:!0,style:n.setTextStyle({},d,{x:g,y:h,text:r.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:y,forceRich:!0})}))}},_renderDetail:function(e,t,i,o,a){var r=e.getModel("detail"),s=+e.get("min"),d=+e.get("max");if(r.get("show")){var g=r.get("offsetCenter"),h=a.cx+l(g[0],a.r),p=a.cy+l(g[1],a.r),f=l(r.get("width"),a.r),m=l(r.get("height"),a.r),y=e.getData(),v=y.get(y.mapDimension("value"),0),x=o(c(v,[s,d],[0,1],!0));this.group.add(new n.Text({silent:!0,style:n.setTextStyle({},r,{x:h,y:p,text:u(v,r.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(m)?null:m,textAlign:"center",textVerticalAlign:"middle"},{autoColor:x,forceRich:!0})}))}}}),p=h;e.exports=p},30931:function(e,t,i){var o=i(10712),n=o.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var i=Math.cos,o=Math.sin,n=t.r,a=t.width,r=t.angle,l=t.x-i(r)*a*(a>=n/3?1:2),s=t.y-o(r)*a*(a>=n/3?1:2);r=t.angle-Math.PI/2,e.moveTo(l,s),e.lineTo(t.x+i(r)*a,t.y+o(r)*a),e.lineTo(t.x+i(t.angle)*n,t.y+o(t.angle)*n),e.lineTo(t.x-i(r)*a,t.y-o(r)*a),e.lineTo(l,s)}});e.exports=n},55269:function(e,t,i){var o=i(70492),n=i(87587),a=i(33051),r=i(32234),l=r.defaultEmphasis,s=i(4272),c=i(78988),d=c.encodeHTML,u=i(19638),g=i(72019),h=o.extendSeriesModel({type:"series.graph",init:function(e){h.superApply(this,"init",arguments);var t=this;function i(){return t._categoriesData}this.legendVisualProvider=new g(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){h.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){h.superApply(this,"mergeDefaultAndTheme",arguments),l(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var i=e.edges||e.links||[],o=e.data||e.nodes||[],n=this;if(o&&i)return u(o,i,this,!0,a).data;function a(e,i){e.wrapMethod("getItemModel",(function(e){var t=n._categoriesModels,i=e.getShallow("category"),o=t[i];return o&&(o.parentModel=e.parentModel,e.parentModel=o),e}));var o=n.getModel("edgeLabel"),a=new s({label:o.option},o.parentModel,t),r=n.getModel("emphasis.edgeLabel"),l=new s({emphasis:{label:r.option}},r.parentModel,t);function c(e){return e=this.parsePath(e),e&&"label"===e[0]?a:e&&"emphasis"===e[0]&&"label"===e[1]?l:this.parentModel}i.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(c),e}))}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,i){if("edge"===i){var o=this.getData(),n=this.getDataParams(e,i),a=o.graph.getEdgeByIndex(e),r=o.getName(a.node1.dataIndex),l=o.getName(a.node2.dataIndex),s=[];return null!=r&&s.push(r),null!=l&&s.push(l),s=d(s.join(" > ")),n.value&&(s+=" : "+d(n.value)),s}return h.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=a.map(this.option.categories||[],(function(e){return null!=e.value?e:a.extend({value:0},e)})),t=new n(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return h.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,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,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),p=h;e.exports=p},39107:function(e,t,i){var o=i(70492),n=i(33051),a=i(68162),r=i(47145),l=i(9176),s=i(31194),c=i(61485),d=c.onIrrelevantElement,u=i(51177),g=i(13328),h=i(47181),p=h.getNodeGlobalScale,f="__focusNodeAdjacency",m="__unfocusNodeAdjacency",y=["itemStyle","opacity"],v=["lineStyle","opacity"];function x(e,t){var i=e.getVisual("opacity");return null!=i?i:e.getModel().get(t)}function w(e,t,i){var o=e.getGraphicEl(),n=x(e,t);null!=i&&(null==n&&(n=1),n*=i),o.downplay&&o.downplay(),o.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==i||(t=n),e.setStyle("opacity",t)}}))}function S(e,t){var i=x(e,t),o=e.getGraphicEl();o.traverse((function(e){!e.isGroup&&e.setStyle("opacity",i)})),o.highlight&&o.highlight()}var b=o.extendChartView({type:"graph",init:function(e,t){var i=new a,o=new r,n=this.group;this._controller=new l(t.getZr()),this._controllerHost={target:n},n.add(i.group),n.add(o.group),this._symbolDraw=i,this._lineDraw=o,this._firstRender=!0},render:function(e,t,i){var o=this,n=e.coordinateSystem;this._model=e;var a=this._symbolDraw,r=this._lineDraw,l=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?l.attr(s):u.updateProps(l,s,e)}g(e.getGraph(),p(e));var c=e.getData();a.updateData(c);var d=e.getEdgeData();r.updateData(d),this._updateNodeAndLinkScale(),this._updateController(e,t,i),clearTimeout(this._layoutTimeout);var h=e.forceLayout,y=e.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,y),c.eachItemGraphicEl((function(t,n){var a=c.getItemModel(n);t.off("drag").off("dragend");var r=a.get("draggable");r&&t.on("drag",(function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,y),h.setFixed(n),c.setItemLayout(n,t.position))}),this).on("dragend",(function(){h&&h.setUnfixed(n)}),this),t.setDraggable(r&&h),t[f]&&t.off("mouseover",t[f]),t[m]&&t.off("mouseout",t[m]),a.get("focusNodeAdjacency")&&(t.on("mouseover",t[f]=function(){o._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[m]=function(){o._dispatchUnfocus(i)}))}),this),c.graph.eachEdge((function(t){var n=t.getGraphicEl();n[f]&&n.off("mouseover",n[f]),n[m]&&n.off("mouseout",n[m]),t.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n[f]=function(){o._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),n.on("mouseout",n[m]=function(){o._dispatchUnfocus(i)}))}));var v="circular"===e.get("layout")&&e.get("circular.rotateLabel"),x=c.getLayout("cx"),w=c.getLayout("cy");c.eachItemGraphicEl((function(e,t){var i=c.getItemModel(t),o=i.get("label.rotate")||0,n=e.getSymbolPath();if(v){var a=c.getItemLayout(t),r=Math.atan2(a[1]-w,a[0]-x);r<0&&(r=2*Math.PI+r);var l=a[0]<x;l&&(r-=Math.PI);var s=l?"left":"right";u.modifyLabelStyle(n,{textRotation:-r,textPosition:s,textOrigin:"center"},{textPosition:s})}else u.modifyLabelStyle(n,{textRotation:o*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,o){var a=e.getData(),r=a.graph,l=o.dataIndex,s=o.edgeDataIndex,c=r.getNodeByIndex(l),d=r.getEdgeByIndex(s);(c||d)&&(r.eachNode((function(e){w(e,y,.1)})),r.eachEdge((function(e){w(e,v,.1)})),c&&(S(c,y),n.each(c.edges,(function(e){e.dataIndex<0||(S(e,v),S(e.node1,y),S(e.node2,y))}))),d&&(S(d,v),S(d.node1,y),S(d.node2,y)))},unfocusNodeAdjacency:function(e,t,i,o){var n=e.getData().graph;n.eachNode((function(e){w(e,y)})),n.eachEdge((function(e){w(e,v)}))},_startForceLayoutIteration:function(e,t){var i=this;(function o(){e.step((function(e){i.updateLayout(i._model),(i._layouting=!e)&&(t?i._layoutTimeout=setTimeout(o,16):o())}))})()},_updateController:function(e,t,i){var o=this._controller,n=this._controllerHost,a=this.group;o.setPointerChecker((function(t,o,n){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(o,n)&&!d(t,i,e)})),"view"===e.coordinateSystem.type?(o.enable(e.get("roam")),n.zoomLimit=e.get("scaleLimit"),n.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(t){s.updateViewOnPan(n,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){s.updateViewOnZoom(n,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),g(e.getGraph(),p(e)),this._lineDraw.updateLayout()}),this)):o.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),i=p(e),o=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",o)}))},updateLayout:function(e){g(e.getGraph(),p(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});e.exports=b},13328:function(e,t,i){var o=i(18554),n=i(45280),a=i(47181),r=a.getSymbolSize,l=[],s=[],c=[],d=o.quadraticAt,u=n.distSquare,g=Math.abs;function h(e,t,i){for(var o,n=e[0],a=e[1],r=e[2],h=1/0,p=i*i,f=.1,m=.1;m<=.9;m+=.1){l[0]=d(n[0],a[0],r[0],m),l[1]=d(n[1],a[1],r[1],m);var y=g(u(l,t)-p);y<h&&(h=y,o=m)}for(var v=0;v<32;v++){var x=o+f;s[0]=d(n[0],a[0],r[0],o),s[1]=d(n[1],a[1],r[1],o),c[0]=d(n[0],a[0],r[0],x),c[1]=d(n[1],a[1],r[1],x);y=u(s,t)-p;if(g(y)<.01)break;var w=u(c,t)-p;f/=2,y<0?w>=0?o+=f:o-=f:w>=0?o-=f:o+=f}return o}function p(e,t){var i=[],a=o.quadraticSubdivide,l=[[],[],[]],s=[[],[]],c=[];t/=2,e.eachEdge((function(e,o){var d=e.getLayout(),u=e.getVisual("fromSymbol"),g=e.getVisual("toSymbol");d.__original||(d.__original=[n.clone(d[0]),n.clone(d[1])],d[2]&&d.__original.push(n.clone(d[2])));var p=d.__original;if(null!=d[2]){if(n.copy(l[0],p[0]),n.copy(l[1],p[2]),n.copy(l[2],p[1]),u&&"none"!==u){var f=r(e.node1),m=h(l,p[0],f*t);a(l[0][0],l[1][0],l[2][0],m,i),l[0][0]=i[3],l[1][0]=i[4],a(l[0][1],l[1][1],l[2][1],m,i),l[0][1]=i[3],l[1][1]=i[4]}if(g&&"none"!==g){f=r(e.node2),m=h(l,p[1],f*t);a(l[0][0],l[1][0],l[2][0],m,i),l[1][0]=i[1],l[2][0]=i[2],a(l[0][1],l[1][1],l[2][1],m,i),l[1][1]=i[1],l[2][1]=i[2]}n.copy(d[0],l[0]),n.copy(d[1],l[2]),n.copy(d[2],l[1])}else{if(n.copy(s[0],p[0]),n.copy(s[1],p[1]),n.sub(c,s[1],s[0]),n.normalize(c,c),u&&"none"!==u){f=r(e.node1);n.scaleAndAdd(s[0],s[0],c,f*t)}if(g&&"none"!==g){f=r(e.node2);n.scaleAndAdd(s[1],s[1],c,-f*t)}n.copy(d[0],s[0]),n.copy(d[1],s[1])}}))}e.exports=p}}]);
- //# sourceMappingURL=chunk-vendors-3e2fe043.7e8fb004.js.map
|