/**
 * Highcharts JS v11.2.0 (2023-10-30)
 *
 * Item series type for Highcharts
 *
 * (c) 2019 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/item-series",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function s(t,e,s,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,s),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}s(e,"Series/Item/ItemPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{series:{prototype:{pointClass:s}},seriesTypes:{pie:{prototype:{pointClass:i}}}}=t,{extend:o}=e;class r extends i{constructor(){super(...arguments),this.options=void 0,this.series=void 0}}return o(r.prototype,{haloPath:s.prototype.haloPath}),r}),s(e,"Series/Item/ItemSeriesDefaults.js",[e["Core/Series/SeriesDefaults.js"],e["Core/Utilities.js"]],function(t,e){let{merge:s}=e,i={endAngle:void 0,innerSize:"40%",itemPadding:.1,layout:"vertical",marker:s(t.marker,{radius:null}),rows:void 0,crisp:!1,showInLegend:!0,startAngle:void 0};return i}),s(e,"Series/Item/ItemSeries.js",[e["Series/Item/ItemPoint.js"],e["Series/Item/ItemSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,s,i){let{pie:o}=s.seriesTypes,{defined:r,extend:a,fireEvent:n,isNumber:l,merge:h,pick:d}=i;class p extends o{constructor(){super(...arguments),this.data=void 0,this.options=void 0,this.points=void 0}animate(t){let e=this.group;e&&(t?e.attr({opacity:0}):e.animate({opacity:1},this.options.animation))}drawDataLabels(){if(this.center&&this.slots)super.drawDataLabels();else for(let t of this.points)t.destroyElements({dataLabel:1})}drawPoints(){let t=this.options,e=this.chart.renderer,s=t.marker,i=this.borderWidth,o=i%2?.5:1,n=this.getRows(),l=Math.ceil(this.total/n),h=this.chart.plotWidth/l,p=this.chart.plotHeight/n,u=this.itemSize||Math.min(h,p),c=0;for(let i of this.points){let f,g,m,y,v,w;let S=i.marker||{},M=S.symbol||s.symbol,A=d(S.radius,s.radius),C=r(A)?2*A:u,b=C*t.itemPadding;if(i.graphics=g=i.graphics||[],this.chart.styledMode||(m=this.pointAttribs(i,i.selected&&"select")),!i.isNull&&i.visible){i.graphic||(i.graphic=e.g("point").add(this.group));for(let s=0;s<(i.y||0);++s){if(this.center&&this.slots){let t=this.slots.shift();y=t.x-u/2,v=t.y-u/2}else"horizontal"===t.layout?(y=h*(c%l),v=p*Math.floor(c/l)):(y=h*Math.floor(c/n),v=p*(c%n));y+=b,v+=b,w=Math.round(C-2*b),this.options.crisp&&(y=Math.round(y)-o,v=Math.round(v)+o),f={x:y,y:v,width:w,height:w},void 0!==A&&(f.r=A),m&&a(f,m);let r=g[s];r?r.animate(f):r=e.symbol(M,void 0,void 0,void 0,void 0,{backgroundSize:"within"}).attr(f).add(i.graphic),r.isActive=!0,g[s]=r,++c}}for(let t=0;t<g.length;t++){let e=g[t];if(!e)return;e.isActive?e.isActive=!1:(e.destroy(),g.splice(t,1),t--)}}}getRows(){let t=this.chart,e=this.total||0,s=this.options.rows,i;if(!s){if(i=t.plotWidth/t.plotHeight,s=Math.sqrt(e),i>1)for(s=Math.ceil(s);s>0&&!(e/s/s>i);)s--;else for(s=Math.floor(s);s<e&&!(e/s/s<i);)s++}return s}getSlots(){let t=this.center,e=t[2],s=this.slots=this.slots||[],i=this.endAngleRad-this.startAngleRad,o=this.options.rows,r=i%(2*Math.PI)==0,a=this.total||0,n=t[3],l,h,d,p,u,c,f,g,m=0,y,v=Number.MAX_VALUE,w,S,M,A=(e-n)/e;for(;v>a+(S&&r?S.length:0);){w=v,s.length=0,v=0,S=M,M=[],y=e/++m/2,o?(n=(y-o)/y*e)>=0?y=o:(n=0,A=1):y=Math.floor(y*A);for(let t=y;t>0;t--)u=Math.ceil((p=i*(d=(n+t/y*(e-n-m))/2))/m),M.push({rowRadius:d,rowLength:p,colCount:u}),v+=u+1}if(!S)return;let C=w-this.total-(r?S.length:0),b=t=>{C>0&&(t.row.colCount--,C--)};for(;C>0;)S.map(t=>({angle:t.colCount/t.rowLength,row:t})).sort((t,e)=>e.angle-t.angle).slice(0,Math.min(C,Math.ceil(S.length/2))).forEach(b);for(let e of S){let o=e.rowRadius,r=e.colCount;for(g=0,c=r?i/r:0;g<=r;g+=1)f=this.startAngleRad+g*c,l=t[0]+Math.cos(f)*o,h=t[1]+Math.sin(f)*o,s.push({x:l,y:h,angle:f})}return s.sort((t,e)=>t.angle-e.angle),this.itemSize=m,s}translate(t){0===this.total&&l(this.options.startAngle)&&l(this.options.endAngle)&&(this.center=this.getCenter()),this.slots||(this.slots=[]),l(this.options.startAngle)&&l(this.options.endAngle)?(super.translate(t),this.slots=this.getSlots()):(this.generatePoints(),n(this,"afterTranslate"))}}return p.defaultOptions=h(o.defaultOptions,e),a(p.prototype,{markerAttribs:void 0,pointClass:t}),s.registerSeriesType("item",p),p}),s(e,"masters/modules/item-series.src.js",[],function(){})});//# sourceMappingURL=item-series.js.map