/*
 Highcharts JS v7.2.0 (2019-09-03)

 Highcharts funnel module

 (c) 2010-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts"],function(c){a(c);a.Highcharts=c;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function c(a,c,y,F){a.hasOwnProperty(c)||(a[c]=F.apply(null,y))}a=a?a._modules:{};c(a,"modules/funnel.src.js",[a["parts/Globals.js"]],function(a){var c=a.seriesType,y=a.seriesTypes,F=a.fireEvent,H=a.noop,I=a.pick;c("funnel",
"pie",{animation:!1,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1},states:{select:{color:"#cccccc",borderColor:"#000000"}}},{animate:H,translate:function(){function a(a,b){return/%$/.test(a)?b*parseInt(a,10)/100:parseInt(a,10)}var p=0,b=this,f=b.chart,e=b.options,g=e.reversed,d=e.ignoreHiddenPoint,k=f.plotWidth;f=f.plotHeight;var c=0,q=e.center,h=a(q[0],k),v=a(q[1],f),y=a(e.width,k),r,t=a(e.height,f),z=a(e.neckWidth,
k),G=a(e.neckHeight,f),A=v-t/2+t-G;k=b.data;var C,D,J="left"===e.dataLabels.position?1:0,B,l,E,u,m,x,n;b.getWidthAt=function(a){var b=v-t/2;return a>A||t===G?z:z+(y-z)*(1-(a-b)/(t-G))};b.getX=function(a,d,e){return h+(d?-1:1)*(b.getWidthAt(g?2*v-a:a)/2+e.labelDistance)};b.center=[h,v,t];b.centerX=h;k.forEach(function(a){d&&!1===a.visible||(p+=a.y)});k.forEach(function(a){n=null;D=p?a.y/p:0;l=v-t/2+c*t;m=l+D*t;r=b.getWidthAt(l);B=h-r/2;E=B+r;r=b.getWidthAt(m);u=h-r/2;x=u+r;l>A?(B=u=h-z/2,E=x=h+z/2):
m>A&&(n=m,r=b.getWidthAt(A),u=h-r/2,x=u+r,m=A);g&&(l=2*v-l,m=2*v-m,null!==n&&(n=2*v-n));C=["M",B,l,"L",E,l,x,m];null!==n&&C.push(x,n,u,n);C.push(u,m,"Z");a.shapeType="path";a.shapeArgs={d:C};a.percentage=100*D;a.plotX=h;a.plotY=(l+(n||m))/2;a.tooltipPos=[h,a.plotY];a.dlBox={x:u,y:l,topWidth:E-B,bottomWidth:x-u,height:Math.abs(I(m,n)-l),width:NaN};a.slice=H;a.half=J;d&&!1===a.visible||(c+=D)});F(b,"afterTranslate")},sortByAngle:function(a){a.sort(function(a,b){return a.plotY-b.plotY})},drawDataLabels:function(){var a=
this.data,c=this.options.dataLabels.distance,b,f=a.length;for(this.center[2]-=2*c;f--;){var e=a[f];var g=(b=e.half)?1:-1;var d=e.plotY;e.labelDistance=I(e.options.dataLabels&&e.options.dataLabels.distance,c);this.maxLabelDistance=Math.max(e.labelDistance,this.maxLabelDistance||0);var k=this.getX(d,b,e);e.labelPosition={natural:{x:0,y:d},"final":{},alignment:b?"right":"left",connectorPosition:{breakAt:{x:k+(e.labelDistance-5)*g,y:d},touchingSliceAt:{x:k+e.labelDistance*g,y:d}}}}y[this.options.dataLabels.inside?
"column":"pie"].prototype.drawDataLabels.call(this)},alignDataLabel:function(c,p,b,f,e){var g=c.series;f=g.options.reversed;var d=c.dlBox||c.shapeArgs,k=b.align,w=b.verticalAlign,q=g.center[1];g=g.getWidthAt((f?2*q-c.plotY:c.plotY)-d.height/2+p.height);g="middle"===w?(d.topWidth-d.bottomWidth)/4:(g-d.bottomWidth)/2;q=d.y;var h=d.x;"middle"===w?q=d.y-d.height/2+p.height/2:"top"===w&&(q=d.y-d.height+p.height+b.padding);if("top"===w&&!f||"bottom"===w&&f||"middle"===w)"right"===k?h=d.x-b.padding+g:"left"===
k&&(h=d.x+b.padding-g);f={x:h,y:f?q-d.height:q,width:d.bottomWidth,height:d.height};b.verticalAlign="bottom";a.Series.prototype.alignDataLabel.call(this,c,p,b,f,e);b.inside&&c.contrastColor&&p.css({color:c.contrastColor})}});c("pyramid","funnel",{neckWidth:"0%",neckHeight:"0%",reversed:!0});""});c(a,"masters/modules/funnel.src.js",[],function(){})});
//# sourceMappingURL=funnel.js.map