/*
 Highcharts JS v11.1.0 (2023-06-05)

 Highcharts funnel module

 (c) 2010-2021 Torstein Honsi

 License: www.highcharts.com/license
*/
'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/funnel",["highcharts"],function(g){a(g);a.Highcharts=g;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function g(a,y,D,p){a.hasOwnProperty(y)||(a[y]=p.apply(null,D),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:y,module:a[y]}})))}a=a?a._modules:
    {};g(a,"Series/Funnel/FunnelSeries.js",[a["Core/Chart/Chart.js"],a["Core/Globals.js"],a["Extensions/BorderRadius.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,y,D,p,g){const {noop:S}=y,{series:P,seriesTypes:{pie:I}}=p,{addEvent:U,extend:V,fireEvent:W,isArray:X,merge:Y,pick:Q,relativeLength:Z}=g;class E extends I{constructor(){super(...arguments);this.points=this.options=this.data=void 0}alignDataLabel(u,a,c,n,e){var q=u.series;n=q.options.reversed;let h=u.dlBox||u.shapeArgs,
    z=c.align,H=c.verticalAlign,p=((q.options||{}).dataLabels||{}).inside;var A=q.center[1];q=q.getWidthAt((n?2*A-u.plotY:u.plotY)-h.height/2+a.height);q="middle"===H?(h.topWidth-h.bottomWidth)/4:(q-h.bottomWidth)/2;A=h.y;let r=h.x;const v=Q(a.height,a.getBBox().height);"middle"===H?A=h.y-h.height/2+v/2:"top"===H&&(A=h.y-h.height+v+c.padding);if("top"===H&&!n||"bottom"===H&&n||"middle"===H)"right"===z?r=h.x-c.padding+q:"left"===z&&(r=h.x+c.padding-q);n={x:r,y:n?A-h.height:A,width:h.bottomWidth,height:h.height};
    c.verticalAlign="bottom";p&&!u.visible||P.prototype.alignDataLabel.call(this,u,a,c,n,e);p&&(!u.visible&&u.dataLabel&&(u.dataLabel.placed=!1),u.contrastColor&&a.css({color:u.contrastColor}))}drawDataLabels(){let a=this.data,z=this.options.dataLabels.distance,c,n,e,q=a.length,h,g;for(this.center[2]-=2*z;q--;)e=a[q],n=(c=e.half)?1:-1,g=e.plotY,e.labelDistance=Q(e.options.dataLabels&&e.options.dataLabels.distance,z),this.maxLabelDistance=Math.max(e.labelDistance,this.maxLabelDistance||0),h=this.getX(g,
    c,e),e.labelPosition={natural:{x:0,y:g},computed:{},alignment:c?"right":"left",connectorPosition:{breakAt:{x:h+(e.labelDistance-5)*n,y:g},touchingSliceAt:{x:h+e.labelDistance*n,y:g}}};p.seriesTypes[this.options.dataLabels.inside?"column":"pie"].prototype.drawDataLabels.call(this)}translate(){function a(a,b){return/%$/.test(a)?b*parseInt(a,10)/100:parseInt(a,10)}let z=0,c=this;var n=c.chart;let e=c.options,q=e.reversed,h=e.ignoreHiddenPoint,g=D.optionsToObject(e.borderRadius),p=n.plotWidth;n=n.plotHeight;
    let y=0,A=e.center,r=a(A[0],p),v=a(A[1],n),E=a(e.width,p),B,C=a(e.height,n),J=a(e.neckWidth,p),R=a(e.neckHeight,n),K=v-C/2+C-R,M=c.data,t,N,I=Z(g.radius,E),O=g.scope,F,G,L=a=>{const b=Math.tan(a/2),d=Math.cos(F),T=Math.sin(F);let f=I,c=f/b;a=Math.tan((Math.PI-a)/3.2104);c>G&&(c=G,f=c*b);a*=f;return{dx:[c*d,(c-a)*d,c-a,c],dy:[c*T,(c-a)*T,c-a,c].map(b=>q?-b:b)}},P="left"===e.dataLabels.position?1:0,w,l,x,f,d,m,k;c.getWidthAt=function(a){const b=v-C/2;return a>K||C===R?J:J+(E-J)*(1-(a-b)/(C-R))};c.getX=
        function(a,b,d){return r+(b?-1:1)*(c.getWidthAt(q?2*v-a:a)/2+d.labelDistance)};c.center=[r,v,C];c.centerX=r;M.forEach(function(a){!a.y||!a.isValid()||h&&!1===a.visible||(z+=a.y)});M.forEach(function(a){k=null;N=z?a.y/z:0;l=v-C/2+y*C;d=l+N*C;B=c.getWidthAt(l);w=r-B/2;x=w+B;B=c.getWidthAt(d);f=r-B/2;m=f+B;l>K?(w=f=r-J/2,x=m=r+J/2):d>K&&(k=d,B=c.getWidthAt(K),f=r-B/2,m=f+B,d=K);q&&(l=2*v-l,d=2*v-d,null!==k&&(k=2*v-k));if(!I||"point"!==O&&0!==a.index&&a.index!==M.length-1&&null===k)t=[["M",w,l],["L",
        x,l],["L",m,d]],null!==k&&t.push(["L",m,k],["L",f,k]),t.push(["L",f,d]);else{var b=Math.abs(d-l);const c=x-m;var e=m-f;const h=Math.sqrt(c*c+b*b);F=Math.atan(b/c);G=h/2;null!==k&&(G=Math.min(G,Math.abs(k-d)/2));1<=e&&(G=Math.min(G,e/2));b=L(F);t="stack"===O&&0!==a.index?[["M",w,l],["L",x,l]]:[["M",w+b.dx[0],l+b.dy[0]],["C",w+b.dx[1],l+b.dy[1],w+b.dx[2],l,w+b.dx[3],l],["L",x-b.dx[3],l],["C",x-b.dx[2],l,x-b.dx[1],l+b.dy[1],x-b.dx[0],l+b.dy[0]]];null!==k?(e=L(Math.PI/2),b=L(Math.PI/2+F),t.push(["L",
        m+b.dx[0],d-b.dy[0]],["C",m+b.dx[1],d-b.dy[1],m,d+b.dy[2],m,d+b.dy[3]]),"stack"===O&&a.index!==M.length-1?t.push(["L",m,k],["L",f,k]):t.push(["L",m,k-e.dy[3]],["C",m,k-e.dy[2],m-e.dx[2],k,m-e.dx[3],k],["L",f+e.dx[3],k],["C",f+e.dx[2],k,f,k-e.dy[2],f,k-e.dy[3]]),t.push(["L",f,d+b.dy[3]],["C",f,d+b.dy[2],f-b.dx[1],d-b.dy[1],f-b.dx[0],d-b.dy[0]])):1<=e?(b=L(Math.PI-F),"stack"===O&&0===a.index?t.push(["L",m,d],["L",f,d]):t.push(["L",m+b.dx[0],d-b.dy[0]],["C",m+b.dx[1],d-b.dy[1],m-b.dx[2],d,m-b.dx[3],
        d],["L",f+b.dx[3],d],["C",f+b.dx[2],d,f-b.dx[1],d-b.dy[1],f-b.dx[0],d-b.dy[0]])):(b=L(Math.PI-2*F),t.push(["L",f+b.dx[0],d-b.dy[0]],["C",f+b.dx[1],d-b.dy[1],f-b.dx[1],d-b.dy[1],f-b.dx[0],d-b.dy[0]]))}t.push(["Z"]);a.shapeType="path";a.shapeArgs={d:t};a.percentage=100*N;a.plotX=r;a.plotY=(l+(k||d))/2;a.tooltipPos=[r,a.plotY];a.dlBox={x:f,y:l,topWidth:x-w,bottomWidth:m-f,height:Math.abs(Q(k,d)-l),width:NaN};a.slice=S;a.half=P;!a.isValid()||h&&!1===a.visible||(y+=N)});W(c,"afterTranslate")}sortByAngle(a){a.sort(function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   c){return a.plotY-c.plotY})}}E.defaultOptions=Y(I.defaultOptions,{animation:!1,borderRadius:0,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,size:!0,dataLabels:{connectorWidth:1,verticalAlign:"middle"},states:{select:{color:"#cccccc",borderColor:"#000000"}}});V(E.prototype,{animate:S});U(a,"afterHideAllOverlappingLabels",function(){this.series.forEach(function(a){let g=a.options&&a.options.dataLabels;X(g)&&(g=g[0]);a.is("pie")&&a.placeDataLabels&&g&&!g.inside&&
a.placeDataLabels()})});p.registerSeriesType("funnel",E);"";return E});g(a,"Series/Pyramid/PyramidSeries.js",[a["Series/Funnel/FunnelSeries.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,g,D){({merge:D}=D);class p extends a{constructor(){super(...arguments);this.points=this.options=this.data=void 0}}p.defaultOptions=D(a.defaultOptions,{neckWidth:"0%",neckHeight:"0%",reversed:!0});g.registerSeriesType("pyramid",p);"";return p});g(a,"masters/modules/funnel.src.js",[],function(){})});