/* Highcharts JS v9.3.1 (2021-11-05) (c) 2016-2021 Highsoft AS Authors: Jon Arild Nygard 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/sunburst",["highcharts"],function(u){a(u);a.Highcharts=u;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function u(a,h,g,r){a.hasOwnProperty(h)||(a[h]=r.apply(null,g))}a=a?a._modules:{};u(a,"Series/ColorMapComposition.js",[a["Core/Utilities.js"]],function(a){var h=a.defined,g=a.wrap,r={pointArrayMap:["value"], axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],parallelArrays:["x","y","value"],colorKey:"value"},q;(function(a){function k(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value}function n(b){var d={};!h(b.color)||b.state&&"normal"!==b.state||(d[this.colorProp||"fill"]=b.color);return d}function p(b,t,a){b=b.call(this,t,a);t.moveToTopOnHover&&(b.zIndex="hover"===a?1:0);return b}a.colorMapSeriesMixin=r;var b=[];a.compose=function(d, t){t&&-1===b.indexOf(t)&&(b.push(t),t=t.prototype,t.dataLabelOnNull=!0,t.moveToTopOnHover=!0,t.isValid=k);-1===b.indexOf(d)&&(b.push(d),t=d.prototype,t.colorAttribs=n,g(t,"pointAttribs",p));return d};a.seriesColorAttribs=n})(q||(q={}));return q});u(a,"Series/Treemap/TreemapAlgorithmGroup.js",[],function(){return function(){function a(a,g,r,q){this.height=a;this.width=g;this.plot=q;this.startDirection=this.direction=r;this.lH=this.nH=this.lW=this.nW=this.total=0;this.elArr=[];this.lP={total:0,lH:0, nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/c,c/a)}}}a.prototype.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;0===this.direction?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW, this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};a.prototype.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0};return a}()});u(a,"Series/DrawPointComposition.js",[],function(){var a;(function(a){function g(a){var c=this,n=a.animatableAttribs,p=a.onComplete,b=a.css,d=a.renderer,t=this.series&&this.series.chart.hasRendered?void 0:this.series&&this.series.options.animation,x=this.graphic;a.attribs= a.attribs||{};a.attribs["class"]=this.getClassName();if(this.shouldDraw())x||(this.graphic=x=d[a.shapeType](a.shapeArgs).add(a.group)),x.css(b).attr(a.attribs).animate(n,a.isNew?!1:t,p);else if(x){var B=function(){c.graphic=x=x&&x.destroy();"function"===typeof p&&p()};Object.keys(n).length?x.animate(n,void 0,function(){B()}):B()}}function h(){return!this.isNull}var q=[];a.compose=function(a){if(-1===q.indexOf(a)){q.push(a);var c=a.prototype;c.draw=g;c.shouldDraw||(c.shouldDraw=h)}return a}})(a||(a= {}));return a});u(a,"Series/Treemap/TreemapPoint.js",[a["Series/DrawPointComposition.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,h,g){var r=this&&this.__extends||function(){var b=function(a,t){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d])};return b(a,t)};return function(a,t){function d(){this.constructor=a}b(a,t);a.prototype=null===t?Object.create(t):(d.prototype=t.prototype, new d)}}(),q=h.series.prototype.pointClass,k=h.seriesTypes;h=k.pie.prototype.pointClass;var c=g.extend,n=g.isNumber,p=g.pick;g=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.name=void 0;a.node=void 0;a.options=void 0;a.series=void 0;a.value=void 0;return a}r(a,b);a.prototype.getClassName=function(){var a=q.prototype.getClassName.call(this),b=this.series,d=b.options;this.node.level<=b.nodeMap[b.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||p(d.interactByLeaf, !d.allowTraversingTree)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a};a.prototype.isValid=function(){return!(!this.id&&!n(this.value))};a.prototype.setState=function(a){q.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})};a.prototype.shouldDraw=function(){return n(this.plotY)&&null!==this.y};return a}(k.scatter.prototype.pointClass);c(g.prototype,{setVisible:h.prototype.setVisible});a.compose(g);return g}); u(a,"Series/Treemap/TreemapUtilities.js",[a["Core/Utilities.js"]],function(a){var h=a.objectEach,g;(function(a){function g(a,c,n){void 0===n&&(n=this);a=c.call(n,a);!1!==a&&g(a,c,n)}a.AXIS_MAX=100;a.isBoolean=function(a){return"boolean"===typeof a};a.eachObject=function(a,c,n){n=n||this;h(a,function(p,b){c.call(n,p,b,a)})};a.recursive=g})(g||(g={}));return g});u(a,"Series/TreeUtilities.js",[a["Core/Color/Color.js"],a["Core/Utilities.js"]],function(a,h){function g(a,d){var b=d.before,n=d.idRoot,c= d.mapIdToNode[n],h=d.points[a.i],q=h&&h.options||{},k=[],w=0;a.levelDynamic=a.level-(!1!==d.levelIsConstant?0:c.level);a.name=p(h&&h.name,"");a.visible=n===a.id||!0===d.visible;"function"===typeof b&&(a=b(a,d));a.children.forEach(function(b,n){var c=r({},d);r(c,{index:n,siblings:a.children.length,visible:a.visible});b=g(b,c);k.push(b);b.visible&&(w+=b.val)});b=p(q.value,w);a.visible=0<=b&&(0g.lP.lR&&m.algorithmCalcPoints(a, !1,g,e,d);c===n&&m.algorithmCalcPoints(a,!0,g,e,d);c+=1});return e};b.prototype.alignDataLabel=function(a,b,l){var e=l.style;e&&!F(e.textOverflow)&&b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:e.width+="px"});z.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})};b.prototype.buildNode=function(a,b,l,f,d){var e=this,m=[],E=e.points[b],c=0,A;(f[a]||[]).forEach(function(b){A=e.buildNode(e.points[b].id,b,l+1,f, a);c=Math.max(A.height+1,c);m.push(A)});b={id:a,i:b,children:m,height:c,level:l,parent:d,visible:!1};e.nodeMap[b.id]=b;E&&(E.node=b);return b};b.prototype.calculateChildrenAreas=function(a,b){var e=this,m=e.options,f=e.mapOptionsToLevel[a.level+1],d=v(e[f&&f.layoutAlgorithm]&&f.layoutAlgorithm,m.layoutAlgorithm),c=m.alternateStartingDirection,g=[];a=a.children.filter(function(a){return!a.ignore});f&&f.layoutStartingDirection&&(b.direction="vertical"===f.layoutStartingDirection?0:1);g=e[d](b,a);a.forEach(function(a, m){m=g[m];a.values=C(m,{val:a.childrenTotal,direction:c?1-b.direction:b.direction});a.pointValues=C(m,{x:m.x/e.axisRatio,y:n.AXIS_MAX-m.y-m.height,width:m.width/e.axisRatio});a.children.length&&e.calculateChildrenAreas(a,a.values)})};b.prototype.drawDataLabels=function(){var a=this,b=a.mapOptionsToLevel,f,d;a.points.filter(function(a){return a.node.visible}).forEach(function(e){d=b[e.node.level];f={style:{}};e.node.isLeaf||(f.enabled=!1);d&&d.dataLabels&&(f=C(f,d.dataLabels),a._hasPointLabels=!0); e.shapeArgs&&(f.style.width=e.shapeArgs.width,e.dataLabel&&e.dataLabel.css({width:e.shapeArgs.width+"px"}));e.dlOptions=C(f,e.options.dataLabels)});B.prototype.drawDataLabels.call(this)};b.prototype.drawPoints=function(){var a=this,b=a.chart,f=b.renderer,d=b.styledMode,c=a.options,g=d?{}:c.shadow,n=c.borderRadius,h=b.pointCount{point.name}: {point.value}
"},ignoreHiddenPoint:!0, layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,drillUpButton:{position:{align:"right",x:-10,y:10}},traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:u?0:.1,halo:!1,opacity:.75,shadow:!1}}});return b}(L);J(p.prototype,{buildKDTree:a,colorKey:"colorValue",directTouch:!0,drawLegendSymbol:r.drawRectangle,getExtremesFromAll:!0, getSymbol:a,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"],pointClass:c,trackerGroups:["group","dataLabelsGroup"],utils:{recursive:n.recursive}});h.compose(p);q.registerSeriesType("treemap",p);"";return p});u(a,"Series/Sunburst/SunburstPoint.js",[a["Series/DrawPointComposition.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,h,g){var r=this&&this.__extends||function(){var a=function(c,g){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(c,g)};return function(c,g){function b(){this.constructor=c}a(c,g);c.prototype=null===g?Object.create(g):(b.prototype=g.prototype,new b)}}(),q=h.series.prototype.pointClass,k=g.correctFloat;g=g.extend;h=function(a){function c(){var c=null!==a&&a.apply(this,arguments)||this;c.node=void 0;c.options=void 0;c.series=void 0;c.shapeExisting=void 0;return c}r(c,a);c.prototype.getDataLabelPath=function(a){var b= this.series.chart.renderer,d=this.shapeExisting,c=d.start,g=d.end,h=c+(g-c)/2;h=0>h&&h>-Math.PI||h>Math.PI;var n=d.r+(a.options.distance||0);c===-Math.PI/2&&k(g)===k(1.5*Math.PI)&&(c=-Math.PI+Math.PI/360,g=-Math.PI/360,h=!0);if(g-c>Math.PI){h=!1;var p=!0}this.dataLabelPath&&(this.dataLabelPath=this.dataLabelPath.destroy());this.dataLabelPath=b.arc({open:!0,longArc:p?1:0}).add(a);this.dataLabelPath.attr({start:h?c:g,end:h?g:c,clockwise:+h,x:d.x,y:d.y,r:(n+d.innerR)/2});return this.dataLabelPath};c.prototype.isValid= function(){return!0};return c}(h.seriesTypes.treemap.prototype.pointClass);g(h.prototype,{getClassName:q.prototype.getClassName,haloPath:q.prototype.haloPath,setState:q.prototype.setState});a.compose(h);return h});u(a,"Series/Sunburst/SunburstUtilities.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,h){var g=a.seriesTypes.treemap,r=h.isNumber,q=h.isObject,k=h.merge,c;(function(a){function c(a,d){var b=[];if(r(a)&&r(d)&&a<=d)for(;a<=d;a++)b.push(a);return b}a.recursive=g.prototype.utils.recursive; a.calculateLevelSizes=function(a,d){d=q(d)?d:{};var b=0,g;if(q(a)){var h=k({},a);a=r(d.from)?d.from:0;var n=r(d.to)?d.to:0;var p=c(a,n);a=Object.keys(h).filter(function(a){return-1===p.indexOf(+a)});var u=g=r(d.diffRadius)?d.diffRadius:0;p.forEach(function(a){a=h[a];var d=a.levelSize.unit,c=a.levelSize.value;"weight"===d?b+=c:"percentage"===d?(a.levelSize={unit:"pixels",value:c/100*u},g-=a.levelSize.value):"pixels"===d&&(g-=c)});p.forEach(function(a){var d=h[a];"weight"===d.levelSize.unit&&(d=d.levelSize.value, h[a].levelSize={unit:"pixels",value:d/b*g})});a.forEach(function(a){h[a].levelSize={value:0,unit:"pixels"}})}return h};a.getLevelFromAndTo=function(a){var b=a.level;return{from:0f.innerArcLength&&f.outerArcLength>l.radius){var w=0;f.dataLabelPath&&"circular"===y&&(k.textPath={enabled:!0})}else 11.5*l.radius?"circular"===y?k.textPath={enabled:!0,attributes:{dy:5}}:y="parallel":(f.dataLabel&&f.dataLabel.textPathWrapper&&"circular"===y&&(k.textPath={enabled:!1}), y="perpendicular");"auto"!==y&&"circular"!==y&&(w=l.end-(l.end-l.start)/2);k.style.width="parallel"===y?Math.min(2.5*l.radius,(f.outerArcLength+f.innerArcLength)/2):l.radius;"perpendicular"===y&&f.series.chart.renderer.fontMetrics(k.style.fontSize).h>f.outerArcLength&&(k.style.width=1);k.style.width=Math.max(k.style.width-2*(k.padding||0),1);w=w*O%180;"parallel"===y&&(w-=90);90w&&(w+=180);k.rotation=w}k.textPath&&(0===f.shapeExisting.innerR&&k.textPath.enabled?(k.rotation=0,k.textPath.enabled= !1,k.style.width=Math.max(2*f.shapeExisting.r-2*(k.padding||0),1)):f.dlOptions&&f.dlOptions.textPath&&!f.dlOptions.textPath.enabled&&"circular"===y&&(k.textPath.enabled=!0),k.textPath.enabled&&(k.rotation=0,k.style.width=Math.max((f.outerArcLength+f.innerArcLength)/2-2*(k.padding||0),1)));0===k.rotation&&(k.rotation=.001);f.dlOptions=k;if(!x&&A){x=!0;var E=B}f.draw({animatableAttribs:M,attribs:K(t,!q.styledMode&&a.pointAttribs(f,f.selected&&"select")),onComplete:E,group:d,renderer:z,shapeType:"arc", shapeArgs:v})});k&&x?(a.hasRendered=!1,a.options.dataLabels.defer=!0,t.prototype.drawDataLabels.call(a),a.hasRendered=!0,w&&B()):t.prototype.drawDataLabels.call(a)};c.prototype.layoutAlgorithm=function(a,b,c){var f=a.start,d=a.end-f,g=a.val,e=a.x,h=a.y,l=c&&D(c.levelSize)&&I(c.levelSize.value)?c.levelSize.value:0,k=a.r,n=k+l,p=c&&I(c.slicedOffset)?c.slicedOffset:0;return(b||[]).reduce(function(a,b){var c=1/g*b.val*d,m=f+c/2,q=e+Math.cos(m)*p;m=h+Math.sin(m)*p;b={x:b.sliced?q:e,y:b.sliced?m:h,innerR:k, r:n,radius:l,start:f,end:f+c};a.push(b);f=b.end;return a},[])};c.prototype.setShapeArgs=function(a,b,c){var d=[],f=c[a.level+1];a=a.children.filter(function(a){return a.visible});d=this.layoutAlgorithm(b,a,f);a.forEach(function(a,b){b=d[b];var f=b.start+(b.end-b.start)/2,e=b.innerR+(b.r-b.innerR)/2,g=b.end-b.start;e=0===b.innerR&&6.28a.val?a.childrenTotal:a.val:a.childrenTotal;this.points[a.i]&&(this.points[a.i].innerArcLength= g*b.innerR,this.points[a.i].outerArcLength=g*b.r);a.shapeArgs=G(b,{plotX:e.x,plotY:e.y+4*Math.abs(Math.cos(f))});a.values=G(b,{val:h});a.children.length&&this.setShapeArgs(a,a.values,c)},this)};c.prototype.translate=function(){var a=this,c=a.options,g=a.center=b.call(a),h=a.startAndEndRadians=d(c.startAngle,c.endAngle),k=g[3]/2,p=g[2]/2-k,e=w(a),m=a.nodeMap,l=m&&m[e],r={};a.shapeRoot=l&&l.shapeArgs;t.prototype.translate.call(a);var u=a.tree=a.getTree();a.renderTraverseUpButton(e);m=a.nodeMap;l=m[e]; var z=F(l.parent)?l.parent:"";z=m[z];var x=q.getLevelFromAndTo(l);var B=x.from,D=x.to;x=S({from:B,levels:a.options.levels,to:D,defaults:{colorByPoint:c.colorByPoint,dataLabels:c.dataLabels,levelIsConstant:c.levelIsConstant,levelSize:c.levelSize,slicedOffset:c.slicedOffset}});x=q.calculateLevelSizes(x,{diffRadius:p,from:B,to:D});L(u,{before:n,idRoot:e,levelIsConstant:c.levelIsConstant,mapOptionsToLevel:x,mapIdToNode:m,points:a.points,series:a});c=m[""].shapeArgs={end:h.end,r:k,start:h.start,val:l.val, x:g[0],y:g[1]};this.setShapeArgs(z,c,x);a.mapOptionsToLevel=x;a.data.forEach(function(b){r[b.id]&&N(31,!1,a.chart);r[b.id]=!0});r={}};c.defaultOptions=G(z.defaultOptions,{center:["50%","50%"],colorByPoint:!1,opacity:1,dataLabels:{allowOverlap:!0,defer:!0,rotationMode:"auto",style:{textOverflow:"ellipsis"}},rootId:void 0,levelIsConstant:!0,levelSize:{value:1,unit:"weight"},slicedOffset:10});return c}(z);K(k.prototype,{drawDataLabels:a,pointAttribs:h.prototype.pointAttribs,pointClass:r,utils:q});g.registerSeriesType("sunburst", k);"";return k});u(a,"masters/modules/sunburst.src.js",[],function(){})}); //# sourceMappingURL=sunburst.js.map