/* Highcharts JS v7.0.0 (2018-12-11) Sankey diagram module (c) 2010-2018 Torstein Honsi License: www.highcharts.com/license */ (function(g){"object"===typeof module&&module.exports?module.exports=g:"function"===typeof define&&define.amd?define(function(){return g}):g("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(g){(function(c){c.NodesMixin={createNode:function(g){function r(b,a){return c.find(b,function(b){return b.id===a})}var d=r(this.nodes,g),k=this.pointClass,b;d||(b=this.options.nodes&&r(this.options.nodes,g),d=(new k).init(this,c.extend({className:"highcharts-node",isNode:!0,id:g,y:1},b)),d.linksTo= [],d.linksFrom=[],d.formatPrefix="node",d.name=d.name||d.options.id,d.getSum=function(){var b=0,a=0;d.linksTo.forEach(function(a){b+=a.weight});d.linksFrom.forEach(function(b){a+=b.weight});return Math.max(b,a)},d.offset=function(b,a){for(var e=0,f=0;fe&&(e=g.fromNode.column);a.column=e+1}b[a.column]||(b[a.column]=this.createNodeColumn());b[a.column].push(a)},this);for(var e=0;el;d&&(f=b.plotSizeY-f,n=b.plotSizeY-n,h=b.plotSizeX-h,p=-p,c=-c,q=l>h);a.shapeType="path";if(q)a.shapeArgs={d:["M",l+p,f,"C",l+p+B,f,h-B,n,h,n,"L",h+(k?p:0),n+c/2,"L",h,n+c,"C",h-B,n+c,l+p+B,f+c,l+p,f+c,"z"]};else{var k=h-20-c,q=h-20,w=h,v=l+p,u=v+20,C=u+c,H=f,x=f+c,F=x+20,y=F+(b.plotHeight-f-c),t=y+20,D=t+c,G=n,z=G+c,I=z+20,J=t+.7*c,K=w-.7*c,L=v+.7*c;a.shapeArgs={d:["M",v,H,"C",L,H,C,x-.7*c,C,F,"L",C,y,"C",C,J,L,D, v,D,"L",w,D,"C",K,D,k,J,k,y,"L",k,I,"C",k,z-.7*c,K,G,w,G,"L",w,z,"C",q,z,q,z,q,I,"L",q,y,"C",q,t,q,t,w,t,"L",v,t,"C",u,t,u,t,u,y,"L",u,F,"C",u,x,u,x,v,x,"z"]}}a.dlBox={x:l+(h-l+p)/2,y:f+(n-f)/2,height:c,width:0};a.y=a.plotY=1;a.color||(a.color=e.color)})});c+=A},this)},render:function(){var b=this.points;this.points=this.points.concat(this.nodes);c.seriesTypes.column.prototype.render.call(this);this.points=b},animate:c.Series.prototype.animate,destroy:function(){this.data=[].concat(this.points,this.nodes); c.Series.prototype.destroy.call(this)}},{getClassName:function(){return(this.isNode?"highcharts-node ":"highcharts-link ")+k.prototype.getClassName.call(this)},isValid:function(){return this.isNode||"number"===typeof this.weight}})})(g)}); //# sourceMappingURL=sankey.js.map