/*
 Highcharts JS v10.3.2 (2022-11-28)

 Item series type for Highcharts

 (c) 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/item-series",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,e,c,b){a.hasOwnProperty(e)||(a[e]=b.apply(null,c),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:a[e]}})))}a=a?a._modules:{};
b(a,"Series/Item/ItemPoint.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,e){var c=this&&this.__extends||function(){var a=function(b,f){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f])};return a(b,f)};return function(b,f){function e(){this.constructor=b}a(b,f);b.prototype=null===f?Object.create(f):(e.prototype=f.prototype,new e)}}(),b=a.series;e=e.extend;a=function(a){function b(){var b=
null!==a&&a.apply(this,arguments)||this;b.options=void 0;b.series=void 0;return b}c(b,a);return b}(a.seriesTypes.pie.prototype.pointClass);e(a.prototype,{haloPath:b.prototype.pointClass.prototype.haloPath});return a});b(a,"Series/Item/ItemSeries.js",[a["Core/Globals.js"],a["Series/Item/ItemPoint.js"],a["Core/Defaults.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,b,c,y,g){var e=this&&this.__extends||function(){var a=function(b,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof
Array&&function(a,d){a.__proto__=d}||function(a,d){for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b])};return a(b,d)};return function(b,d){function x(){this.constructor=b}a(b,d);b.prototype=null===d?Object.create(d):(x.prototype=d.prototype,new x)}}(),f=c.defaultOptions,z=y.seriesTypes.pie,F=g.defined,A=g.extend,J=g.fireEvent,q=g.isNumber,B=g.merge,K=g.pick;c=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}e(c,b);c.prototype.animate=
function(a){a?this.group.attr({opacity:0}):this.group.animate({opacity:1},this.options.animation)};c.prototype.drawDataLabels=function(){this.center&&this.slots?a.seriesTypes.pie.prototype.drawDataLabels.call(this):this.points.forEach(function(a){a.destroyElements({dataLabel:1})})};c.prototype.drawPoints=function(){var a=this,b=this.options,c=a.chart.renderer,e=b.marker,f=this.borderWidth%2?.5:1,C=0,t=this.getRows(),g=Math.ceil(this.total/t),u=this.chart.plotWidth/g,v=this.chart.plotHeight/t,w=this.itemSize||
Math.min(u,v);this.points.forEach(function(d){var n,x,l=d.marker||{},p=l.symbol||e.symbol;l=K(l.radius,e.radius);var H=F(l)?2*l:w,r=H*b.itemPadding,I;d.graphics=n=d.graphics||[];a.chart.styledMode||(x=a.pointAttribs(d,d.selected&&"select"));if(!d.isNull&&d.visible){d.graphic||(d.graphic=c.g("point").add(a.group));for(var h=0;h<(d.y||0);h++){if(a.center&&a.slots){var m=a.slots.shift();var k=m.x-w/2;m=m.y-w/2}else"horizontal"===b.layout?(k=C%g*u,m=v*Math.floor(C/g)):(k=u*Math.floor(C/t),m=C%t*v);k+=
r;m+=r;var q=I=Math.round(H-2*r);a.options.crisp&&(k=Math.round(k)-f,m=Math.round(m)+f);k={x:k,y:m,width:I,height:q};"undefined"!==typeof l&&(k.r=l);n[h]?n[h].animate(k):(x&&A(k,x),n[h]=c.symbol(p,void 0,void 0,void 0,void 0,{backgroundSize:"within"}).attr(k).add(d.graphic));n[h].isActive=!0;C++}}n.forEach(function(a,b){a.isActive?a.isActive=!1:(a.destroy(),n.splice(b,1))})})};c.prototype.getRows=function(){var a=this.options.rows;if(!a){var b=this.chart.plotWidth/this.chart.plotHeight;a=Math.sqrt(this.total);
if(1<b)for(a=Math.ceil(a);0<a;){var c=this.total/a;if(c/a>b)break;a--}else for(a=Math.floor(a);a<this.total;){c=this.total/a;if(c/a<b)break;a++}}return a};c.prototype.getSlots=function(){function a(a){0<E&&(a.row.colCount--,E--)}for(var b=this.center,c=b[2],e=b[3],f,g=this.slots,t,q,u,v,w,y,n,D,l=0,p,G=this.endAngleRad-this.startAngleRad,r=Number.MAX_VALUE,z,h,m,k=this.options.rows,A=(c-e)/c,B=0===G%(2*Math.PI),F=this.total||0;r>F+(h&&B?h.length:0);)for(z=r,r=g.length=0,h=m,m=[],l++,p=c/l/2,k?(e=
(p-k)/p*c,0<=e?p=k:(e=0,A=1)):p=Math.floor(p*A),f=p;0<f;f--)u=(e+f/p*(c-e-l))/2,v=G*u,w=Math.ceil(v/l),m.push({rowRadius:u,rowLength:v,colCount:w}),r+=w+1;if(h){for(var E=z-this.total-(B?h.length:0);0<E;)h.map(function(a){return{angle:a.colCount/a.rowLength,row:a}}).sort(function(a,b){return b.angle-a.angle}).slice(0,Math.min(E,Math.ceil(h.length/2))).forEach(a);h.forEach(function(a){var c=a.rowRadius;y=(a=a.colCount)?G/a:0;for(D=0;D<=a;D+=1)n=this.startAngleRad+D*y,t=b[0]+Math.cos(n)*c,q=b[1]+Math.sin(n)*
c,g.push({x:t,y:q,angle:n})},this);g.sort(function(a,b){return a.angle-b.angle});this.itemSize=l;return g}};c.prototype.translate=function(b){0===this.total&&q(this.options.startAngle)&&q(this.options.endAngle)&&(this.center=this.getCenter());this.slots||(this.slots=[]);q(this.options.startAngle)&&q(this.options.endAngle)?(a.seriesTypes.pie.prototype.translate.apply(this,arguments),this.slots=this.getSlots()):(this.generatePoints(),J(this,"afterTranslate"))};c.defaultOptions=B(z.defaultOptions,{endAngle:void 0,
innerSize:"40%",itemPadding:.1,layout:"vertical",marker:B(f.plotOptions.line.marker,{radius:null}),rows:void 0,crisp:!1,showInLegend:!0,startAngle:void 0});return c}(z);A(c.prototype,{markerAttribs:void 0});c.prototype.pointClass=b;y.registerSeriesType("item",c);"";return c});b(a,"masters/modules/item-series.src.js",[],function(){})});
//# sourceMappingURL=item-series.js.map