/** * Highcharts JS v11.2.0 (2023-10-30) * * (c) 2016-2021 Highsoft AS * Authors: Jon Arild Nygard * * 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/sunburst",["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 i(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Extensions/Breadcrumbs/BreadcrumbsDefaults.js",[],function(){return{lang:{mainBreadcrumb:"Main"},options:{buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"#334eff"}},buttonSpacing:5,floating:!1,format:void 0,relativeTo:"plotBox",rtl:!1,position:{align:"left",verticalAlign:"top",x:0,y:void 0},separator:{text:"/",style:{color:"#666666",fontSize:"0.8em"}},showFullPath:!0,style:{},useHTML:!1,zIndex:7}}}),i(e,"Extensions/Breadcrumbs/Breadcrumbs.js",[e["Extensions/Breadcrumbs/BreadcrumbsDefaults.js"],e["Core/Chart/Chart.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i,s){let{format:r}=i,{addEvent:o,defined:l,extend:a,fireEvent:n,isString:h,merge:d,objectEach:p,pick:u}=s,c=[];function v(){if(this.breadcrumbs){let t=this.resetZoomButton&&this.resetZoomButton.getBBox(),e=this.breadcrumbs.options;t&&"right"===e.position.align&&"plotBox"===e.relativeTo&&this.breadcrumbs.alignBreadcrumbsGroup(-t.width-e.buttonSpacing)}}function g(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function b(){let t=this.breadcrumbs;if(t&&!t.options.floating&&t.level){let e=t.options,i=e.buttonTheme,s=(i.height||0)+2*(i.padding||0)+e.buttonSpacing,r=e.position.verticalAlign;"bottom"===r?(this.marginBottom=(this.marginBottom||0)+s,t.yOffset=s):"middle"!==r?(this.plotTop+=s,t.yOffset=-s):t.yOffset=void 0}}function m(){this.breadcrumbs&&this.breadcrumbs.redraw()}function f(t){!0===t.resetSelection&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}class y{static compose(i,r){s.pushUnique(c,i)&&(o(e,"destroy",g),o(e,"afterShowResetZoom",v),o(e,"getMargins",b),o(e,"redraw",m),o(e,"selection",f)),s.pushUnique(c,r)&&a(r.lang,t.lang)}constructor(t,e){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];let i=d(t.options.drilldown&&t.options.drilldown.drillUpButton,y.defaultOptions,t.options.navigation&&t.options.navigation.breadcrumbs,e);this.chart=t,this.options=i||{}}updateProperties(t){this.setList(t),this.setLevel(),this.isDirty=!0}setList(t){this.list=t}setLevel(){this.level=this.list.length&&this.list.length-1}getLevel(){return this.level}getButtonText(t){let e=this.chart,i=this.options,s=e.options.lang,o=u(i.format,i.showFullPath?"{level.name}":"← {level.name}"),a=s&&u(s.drillUpText,s.mainBreadcrumb),n=i.formatter&&i.formatter(t)||r(o,{level:t.levelOptions},e)||"";return(h(n)&&!n.length||"← "===n)&&l(a)&&(n=i.showFullPath?a:"← "+a),n}redraw(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1}render(){let t=this.chart,e=this.options;!this.group&&e&&(this.group=t.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:e.zIndex}).add()),e.showFullPath?this.renderFullPathButtons():this.renderSingleButton(),this.alignBreadcrumbsGroup()}renderFullPathButtons(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()}renderSingleButton(){let t=this.chart,e=this.list,i=this.options,s=i.buttonSpacing;this.destroyListElements();let r=this.group?this.group.getBBox().width:s,o=e[e.length-2];!t.drillUpButton&&this.level>0?t.drillUpButton=this.renderButton(o,r,s):t.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())}alignBreadcrumbsGroup(t){if(this.group){let e=this.options,i=e.buttonTheme,s=e.position,r="chart"===e.relativeTo||"spacingBox"===e.relativeTo?void 0:"scrollablePlotBox",o=this.group.getBBox(),l=2*(i.padding||0)+e.buttonSpacing;s.width=o.width+l,s.height=o.height+l;let a=d(s);t&&(a.x+=t),this.options.rtl&&(a.x+=s.width),a.y=u(a.y,this.yOffset,0),this.group.align(a,!0,r)}}renderButton(t,e,i){let s=this,r=this.chart,o=s.options,l=d(o.buttonTheme),a=r.renderer.button(s.getButtonText(t),e,i,function(e){let i;let r=o.events&&o.events.click;r&&(i=r.call(s,e,t)),!1!==i&&(o.showFullPath?e.newLevel=t.level:e.newLevel=s.level-1,n(s,"up",e))},l).addClass("highcharts-breadcrumbs-button").add(s.group);return r.styledMode||a.attr(o.style),a}renderSeparator(t,e){let i=this.chart,s=this.options,r=s.separator,o=i.renderer.label(r.text,t,e,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return i.styledMode||o.css(r.style),o}update(t){d(!0,this.options,t),this.destroy(),this.isDirty=!0}updateSingleButton(){let t=this.chart,e=this.list[this.level-1];t.drillUpButton&&t.drillUpButton.attr({text:this.getButtonText(e)})}destroy(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0}destroyListElements(t){let e=this.elementList;p(e,(i,s)=>{(t||!e[s].updated)&&((i=e[s]).button&&i.button.destroy(),i.separator&&i.separator.destroy(),delete i.button,delete i.separator,delete e[s])}),t&&(this.elementList={})}destroySingleButton(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)}resetElementListState(){p(this.elementList,t=>{t.updated=!1})}updateListElements(){let t=this.elementList,e=this.options.buttonSpacing,i=this.list,s=this.options.rtl,r=s?-1:1,o=function(t,e){return r*t.getBBox().width+r*e},l=function(t,e,i){t.translate(e-t.getBBox().width,i)},a=this.group?o(this.group,e):e,n,h;for(let d=0,p=i.length;d{t.graphic=a=a&&a.destroy(),"function"==typeof s&&s()};Object.keys(i).length?a.animate(i,void 0,()=>e()):e()}}}}),i(e,"Series/Treemap/TreemapPoint.js",[e["Series/DrawPointUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{pie:{prototype:{pointClass:s}},scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{extend:o,isNumber:l,pick:a}=i;class n extends r{constructor(){super(...arguments),this.name=void 0,this.node=void 0,this.options=void 0,this.series=void 0,this.shapeType="rect",this.value=void 0}draw(e){t.draw(this,e)}getClassName(){let t=this.series,e=t.options,i=super.getClassName();return this.node.level<=t.nodeMap[t.rootNode].level?i+=" highcharts-above-level":this.node.isLeaf||a(e.interactByLeaf,!e.allowTraversingTree)?this.node.isLeaf||(i+=" highcharts-internal-node"):i+=" highcharts-internal-node-interactive",i}isValid(){return!!(this.id||l(this.value))}setState(t){super.setState.apply(this,arguments),this.graphic&&this.graphic.attr({zIndex:"hover"===t?1:0})}shouldDraw(){return l(this.plotY)&&null!==this.y}}return o(n.prototype,{setVisible:s.prototype.setVisible}),n}),i(e,"Series/Treemap/TreemapSeriesDefaults.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{isString:i}=e,s={allowTraversingTree:!1,animationLimit:250,borderRadius:0,showInLegend:!1,marker:void 0,colorByPoint:!1,dataLabels:{defer:!1,enabled:!0,formatter:function(){let t=this&&this.point?this.point:{},e=i(t.name)?t.name:"";return e},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:"",pointFormat:"{point.name}: {point.value}
"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:t.seriesTypes.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}},legendSymbol:"rectangle"};return s}),i(e,"Series/Treemap/TreemapUtilities.js",[e["Core/Utilities.js"]],function(t){var e;let{objectEach:i}=t;return(e||(e={})).recursive=function t(e,i,s){let r;!1!==(r=i.call(s||this,e))&&t(r,i,s)},e}),i(e,"Series/TreeUtilities.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){let{extend:i,isArray:s,isNumber:r,isObject:o,merge:l,pick:a}=e;return{getColor:function(e,i){let s,r,o,l,n,h;let d=i.index,p=i.mapOptionsToLevel,u=i.parentColor,c=i.parentColorIndex,v=i.series,g=i.colors,b=i.siblings,m=v.points,f=v.chart.options.chart;return e&&(s=m[e.i],r=p[e.level]||{},s&&r.colorByPoint&&(l=s.index%(g?g.length:f.colorCount),o=g&&g[l]),v.chart.styledMode||(n=a(s&&s.options.color,r&&r.color,o,u&&(e=>{let i=r&&r.colorVariation;return i&&"brightness"===i.key&&d&&b?t.parse(e).brighten(i.to*(d/b)).get():e})(u),v.color)),h=a(s&&s.options.colorIndex,r&&r.colorIndex,l,c,i.colorIndex)),{color:n,colorIndex:h}},getLevelOptions:function(t){let e={},i,n,h,d,p,u;if(o(t))for(d=r(t.from)?t.from:1,u=t.levels,n={},i=o(t.defaults)?t.defaults:{},s(u)&&(n=u.reduce((t,e)=>{let s,n,h;return o(e)&&r(e.level)&&(n=a((h=l({},e)).levelIsConstant,i.levelIsConstant),delete h.levelIsConstant,delete h.level,o(t[s=e.level+(n?0:d-1)])?l(!0,t[s],h):t[s]=h),t},{})),p=r(t.to)?t.to:1,h=0;h<=p;h++)e[h]=l({},i,o(n[h])?n[h]:{});return e},setTreeValues:function t(e,s){let r=s.before,o=s.idRoot,l=s.mapIdToNode,n=l[o],h=!1!==s.levelIsConstant,d=s.points,p=d[e.i],u=p&&p.options||{},c=[],v=0;e.levelDynamic=e.level-(h?0:n.level),e.name=a(p&&p.name,""),e.visible=o===e.id||!0===s.visible,"function"==typeof r&&(e=r(e,s)),e.children.forEach((r,o)=>{let l=i({},s);i(l,{index:o,siblings:e.children.length,visible:e.visible}),r=t(r,l),c.push(r),r.visible&&(v+=r.val)});let g=a(u.value,v);return e.visible=g>=0&&(v>0||e.visible),e.children=c,e.childrenTotal=v,e.isLeaf=e.visible&&!v,e.val=g,e},updateRootId:function(t){let e,i;return o(t)&&(i=o(t.options)?t.options:{},e=a(t.rootNode,i.rootId,""),o(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}}}),i(e,"Series/Treemap/TreemapSeries.js",[e["Extensions/Breadcrumbs/Breadcrumbs.js"],e["Core/Color/Color.js"],e["Series/ColorMapComposition.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Treemap/TreemapAlgorithmGroup.js"],e["Series/Treemap/TreemapNode.js"],e["Series/Treemap/TreemapPoint.js"],e["Series/Treemap/TreemapSeriesDefaults.js"],e["Series/Treemap/TreemapUtilities.js"],e["Series/TreeUtilities.js"],e["Core/Utilities.js"]],function(t,e,i,s,r,o,l,a,n,h,d,p){let{parse:u}=e,{noop:c}=s,{column:v,scatter:g}=r.seriesTypes,{getColor:b,getLevelOptions:m,updateRootId:f}=d,{addEvent:y,correctFloat:x,defined:T,error:S,extend:L,fireEvent:P,isArray:w,isNumber:C,isObject:A,isString:R,merge:B,pick:I,pushUnique:M,stableSort:O}=p,j=[],D=!1;function N(){let t;let e=this.xAxis,i=this.yAxis;e&&i&&(this.is("treemap")?(t={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,minPadding:0,max:100,maxPadding:0,startOnTick:!1,title:void 0,tickPositions:[]},L(i.options,t),L(e.options,t),D=!0):D&&(i.setOptions(i.userOptions),e.setOptions(e.userOptions),D=!1))}class U extends g{constructor(){super(...arguments),this.axisRatio=void 0,this.data=void 0,this.mapOptionsToLevel=void 0,this.nodeMap=void 0,this.nodeList=void 0,this.options=void 0,this.points=void 0,this.rootNode=void 0,this.tree=void 0,this.level=void 0}static compose(t){M(j,t)&&y(t,"afterBindAxes",N)}algorithmCalcPoints(t,e,i,s){let r=i.plot,o=i.elArr.length-1,l,a,n,h,d=i.lW,p=i.lH,u,c=0;for(let t of(e?(d=i.nW,p=i.nH):u=i.elArr[o],i.elArr))(e||cn.lP.lR&&this.algorithmCalcPoints(t,!1,n,s,r),d===a&&this.algorithmCalcPoints(t,!0,n,s,r),++d;return s}alignDataLabel(t,e,i){let s=i.style;s&&!T(s.textOverflow)&&e.text&&e.getBBox().width>e.text.textWidth&&e.css({textOverflow:"ellipsis",width:s.width+="px"}),v.prototype.alignDataLabel.apply(this,arguments),t.dataLabel&&t.dataLabel.attr({zIndex:(t.node.zIndex||0)+1})}calculateChildrenAreas(t,e){let i=this.options,s=this.mapOptionsToLevel,r=s[t.level+1],o=I(this[r&&r.layoutAlgorithm]&&r.layoutAlgorithm,i.layoutAlgorithm),l=i.alternateStartingDirection,a=t.children.filter(t=>!t.ignore),n=[];r&&r.layoutStartingDirection&&(e.direction="vertical"===r.layoutStartingDirection?0:1),n=this[o](e,a);let h=-1;for(let t of a){let i=n[++h];t.values=B(i,{val:t.childrenTotal,direction:l?1-e.direction:e.direction}),t.pointValues=B(i,{x:i.x/this.axisRatio,y:100-i.y-i.height,width:i.width/this.axisRatio}),t.children.length&&this.calculateChildrenAreas(t,t.values)}}createList(t){let e=this.chart,i=e.breadcrumbs,s=[];if(i){let i=0;s.push({level:i,levelOptions:e.series[0]});let r=t.target.nodeMap[t.newRootId],o=[];for(;r.parent||""===r.parent;)o.push(r),r=t.target.nodeMap[r.parent];for(let t of o.reverse())s.push({level:++i,levelOptions:t});s.length<=1&&(s.length=0)}return s}drawDataLabels(){let t,e;let i=this.mapOptionsToLevel,s=this.points.filter(function(t){return t.node.visible});for(let r of s)e=i[r.node.level],t={style:{}},r.node.isLeaf||(t.enabled=!1),e&&e.dataLabels&&(t=B(t,e.dataLabels),this.hasDataLabels=()=>!0),r.shapeArgs&&(t.style.width=r.shapeArgs.width,r.dataLabel&&r.dataLabel.css({width:r.shapeArgs.width+"px"})),r.dlOptions=B(t,r.options.dataLabels);super.drawDataLabels()}drawPoints(t=this.points){let e=this.chart,i=e.renderer,s=e.styledMode,r=this.options,o=s?{}:r.shadow,l=r.borderRadius,a=e.pointCount{let e=t.userOptions;T(e.allowDrillToNode)&&!T(e.allowTraversingTree)&&(e.allowTraversingTree=e.allowDrillToNode,delete e.allowDrillToNode),T(e.drillUpButton)&&!T(e.traverseUpButton)&&(e.traverseUpButton=e.drillUpButton,delete e.drillUpButton)});super.init(e,i),delete s.opacity,s.eventsToUnbind.push(o),s.options.allowTraversingTree&&(s.eventsToUnbind.push(y(s,"click",s.onClickDrillToNode)),s.eventsToUnbind.push(y(s,"setRootNode",function(t){let e=s.chart;e.breadcrumbs&&e.breadcrumbs.updateProperties(s.createList(t))})),s.eventsToUnbind.push(y(s,"update",function(t,e){let i=this.chart.breadcrumbs;i&&t.options.breadcrumbs&&i.update(t.options.breadcrumbs)})),s.eventsToUnbind.push(y(s,"destroy",function(t){let e=this.chart;e.breadcrumbs&&!t.keepEventsForUpdate&&(e.breadcrumbs.destroy(),e.breadcrumbs=void 0)}))),e.breadcrumbs||(e.breadcrumbs=new t(e,r)),s.eventsToUnbind.push(y(e.breadcrumbs,"up",function(t){let e=this.level-t.newLevel;for(let t=0;tr?0:(t.pointAttribs(e)["stroke-width"]||0)%2/2;for(let t of e){let{pointValues:e,visible:r}=t.node;if(e&&r){let{height:r,width:l,x:a,y:n}=e,h=o(t),d=Math.round(i.toPixels(a,!0))-h,p=Math.round(i.toPixels(a+l,!0))-h,u=Math.round(s.toPixels(n,!0))-h,c=Math.round(s.toPixels(n+r,!0))-h,v={x:Math.min(d,p),y:Math.min(u,c),width:Math.abs(p-d),height:Math.abs(c-u)};t.plotX=v.x+v.width/2,t.plotY=v.y+v.height/2,t.shapeArgs=v}else delete t.plotX,delete t.plotY}}setRootNode(t,e,i){let s=L({newRootId:t,previousRootId:this.rootNode,redraw:I(e,!0),series:this},i);P(this,"setRootNode",s,function(t){let e=t.series;e.idPreviousRoot=t.previousRootId,e.rootNode=t.newRootId,e.isDirty=!0,t.redraw&&e.chart.redraw()})}setState(t){this.options.inactiveOtherPoints=!0,super.setState(t,!1),this.options.inactiveOtherPoints=!1}setTreeValues(t){let e=this.options,i=this.rootNode,s=this.nodeMap,r=s[i],o="boolean"!=typeof e.levelIsConstant||e.levelIsConstant,l=[],a=this.points[t.i],n=0;for(let e of t.children)e=this.setTreeValues(e),l.push(e),e.ignore||(n+=e.val);O(l,(t,e)=>(t.sortIndex||0)-(e.sortIndex||0));let h=I(a&&a.options.value,n);return a&&(a.value=h),L(t,{children:l,childrenTotal:n,ignore:!(I(a&&a.visible,!0)&&h>0),isLeaf:t.visible&&!n,levelDynamic:t.level-(o?0:r.level),name:I(a&&a.name,""),sortIndex:I(a&&a.sortIndex,-h),val:h}),t}sliceAndDice(t,e){return this.algorithmFill(!0,t,e)}squarified(t,e){return this.algorithmLowAspectRatio(!0,t,e)}strip(t,e){return this.algorithmLowAspectRatio(!1,t,e)}stripes(t,e){return this.algorithmFill(!1,t,e)}translate(){let t=this,e=t.options,i=f(t),s,r,o,l;super.translate();let a=t.tree=t.getTree();s=t.nodeMap[i],""===i||s&&s.children.length||(t.setRootNode("",!1),i=t.rootNode,s=t.nodeMap[i]),t.mapOptionsToLevel=m({from:s.level+1,levels:e.levels,to:a.height,defaults:{levelIsConstant:t.options.levelIsConstant,colorByPoint:e.colorByPoint}}),h.recursive(t.nodeMap[t.rootNode],e=>{let i=e.parent,s=!1;return e.visible=!0,(i||""===i)&&(s=t.nodeMap[i]),s}),h.recursive(t.nodeMap[t.rootNode].children,t=>{let e=!1;for(let i of t)i.visible=!0,i.children.length&&(e=(e||[]).concat(i.children));return e}),t.setTreeValues(a),t.axisRatio=t.xAxis.len/t.yAxis.len,t.nodeMap[""].pointValues=r={x:0,y:0,width:100,height:100},t.nodeMap[""].values=o=B(r,{width:r.width*t.axisRatio,direction:"vertical"===e.layoutStartingDirection?0:1,val:a.val}),t.calculateChildrenAreas(a,o),t.colorAxis||e.colorByPoint||t.setColorRecursive(t.tree),e.allowTraversingTree&&(l=s.pointValues,t.xAxis.setExtremes(l.x,l.x+l.width,!1),t.yAxis.setExtremes(l.y,l.y+l.height,!1),t.xAxis.setScale(),t.yAxis.setScale()),t.setPointValues()}}return U.defaultOptions=B(g.defaultOptions,n),L(U.prototype,{buildKDTree:c,colorAttribs:i.seriesMembers.colorAttribs,colorKey:"colorValue",directTouch:!0,getExtremesFromAll:!0,getSymbol:c,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"],pointClass:a,NodeClass:l,trackerGroups:["group","dataLabelsGroup"],utils:h}),i.compose(U),r.registerSeriesType("treemap",U),U}),i(e,"Series/Sunburst/SunburstPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{series:{prototype:{pointClass:i}},seriesTypes:{treemap:{prototype:{pointClass:s}}}}=t,{correctFloat:r,extend:o,pInt:l}=e;class a extends s{constructor(){super(...arguments),this.node=void 0,this.options=void 0,this.series=void 0,this.shapeExisting=void 0,this.shapeType=void 0}getDataLabelPath(t){let e=this.series.chart.renderer,i=this.shapeExisting,s=i.r+l(t.options?.distance||0),o=i.start,a=i.end,n=o+(a-o)/2,h=n<0&&n>-Math.PI||n>Math.PI,d;return o===-Math.PI/2&&r(a)===r(1.5*Math.PI)&&(o=-Math.PI+Math.PI/360,a=-Math.PI/360,h=!0),a-o>Math.PI&&(h=!1,d=!0,a-o>2*Math.PI-.01&&(o+=.01,a-=.01)),this.dataLabelPath&&(this.dataLabelPath=this.dataLabelPath.destroy()),this.dataLabelPath=e.arc({open:!0,longArc:d?1:0}).attr({start:h?o:a,end:h?a:o,clockwise:+h,x:i.x,y:i.y,r:(s+i.innerR)/2}).add(e.defs),this.dataLabelPath}isValid(){return!0}}return o(a.prototype,{getClassName:i.prototype.getClassName,haloPath:i.prototype.haloPath,setState:i.prototype.setState}),a}),i(e,"Series/Sunburst/SunburstUtilities.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){let{seriesTypes:{treemap:i}}=t,{isNumber:s,isObject:r,merge:o}=e;function l(t,e){let i=[];if(s(t)&&s(e)&&t<=e)for(let s=t;s<=e;s++)i.push(s);return i}let a={calculateLevelSizes:function(t,e){let i=r(e)?e:{},a,n=0,h,d,p,u;if(r(t)){for(let e of(a=o({},t),d=l(s(i.from)?i.from:0,s(i.to)?i.to:0),p=Object.keys(a).filter(t=>-1===d.indexOf(+t)),h=u=s(i.diffRadius)?i.diffRadius:0,d)){let t=a[e],i=t.levelSize.unit,s=t.levelSize.value;"weight"===i?n+=s:"percentage"===i?(t.levelSize={unit:"pixels",value:s/100*h},u-=t.levelSize.value):"pixels"===i&&(u-=s)}for(let t of d){let e=a[t];if("weight"===e.levelSize.unit){let i=e.levelSize.value;a[t].levelSize={unit:"pixels",value:i/n*u}}}for(let t of p)a[t].levelSize={value:0,unit:"pixels"}}return a},getLevelFromAndTo:function({level:t,height:e}){return{from:t>0?t:1,to:t+e}},range:l,recursive:i.prototype.utils.recursive};return a}),i(e,"Series/Sunburst/SunburstNode.js",[e["Series/Treemap/TreemapNode.js"]],function(t){return class extends t{}}),i(e,"Series/Sunburst/SunburstSeriesDefaults.js",[],function(){return{center:["50%","50%"],clip:!1,colorByPoint:!1,opacity:1,dataLabels:{allowOverlap:!0,defer:!0,rotationMode:"circular",style:{textOverflow:"ellipsis"}},rootId:void 0,levelIsConstant:!0,levelSize:{value:1,unit:"weight"},slicedOffset:10}}),i(e,"Series/Sunburst/SunburstSeries.js",[e["Series/CenteredUtilities.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Sunburst/SunburstPoint.js"],e["Series/Sunburst/SunburstUtilities.js"],e["Series/TreeUtilities.js"],e["Core/Utilities.js"],e["Series/Sunburst/SunburstNode.js"],e["Series/Sunburst/SunburstSeriesDefaults.js"]],function(t,e,i,s,r,o,l,a,n){let{getCenter:h,getStartAndEndRadians:d}=t,{noop:p}=e,{column:u,treemap:c}=i.seriesTypes,{getColor:v,getLevelOptions:g,setTreeValues:b,updateRootId:m}=o,{defined:f,error:y,extend:x,fireEvent:T,isNumber:S,isObject:L,isString:P,merge:w,splat:C}=l,A=180/Math.PI,R=function(t,e,i,s){return{x:t+Math.cos(i)*s,y:e+Math.sin(i)*s}};function B(t,e){let i=e.mapIdToNode,s=t.parent,r=s?i[s]:void 0,o=e.series,l=o.chart,a=o.points,n=a[t.i],h=o.options.colors||l&&l.options.colors,d=v(t,{colors:h,colorIndex:o.colorIndex,index:e.index,mapOptionsToLevel:e.mapOptionsToLevel,parentColor:r&&r.color,parentColorIndex:r&&r.colorIndex,series:e.series,siblings:e.siblings});return t.color=d.color,t.colorIndex=d.colorIndex,n&&(n.color=t.color,n.colorIndex=t.colorIndex,t.sliced=t.id!==e.idRoot&&n.sliced),t}class I extends c{constructor(){super(...arguments),this.center=void 0,this.data=void 0,this.mapOptionsToLevel=void 0,this.nodeMap=void 0,this.options=void 0,this.points=void 0,this.shapeRoot=void 0,this.startAndEndRadians=void 0,this.tree=void 0}alignDataLabel(t,e,i){if(!i.textPath||!i.textPath.enabled)return super.alignDataLabel(t,e,i)}animate(t){let e;let i=this.chart,s=[i.plotWidth/2,i.plotHeight/2],r=i.plotLeft,o=i.plotTop,l=this.group;t?(e={translateX:s[0]+r,translateY:s[1]+o,scaleX:.001,scaleY:.001,rotation:10,opacity:.01},l.attr(e)):(e={translateX:r,translateY:o,scaleX:1,scaleY:1,rotation:0,opacity:1},l.animate(e,this.options.animation))}drawPoints(){let t=this,e=t.mapOptionsToLevel,i=t.shapeRoot,s=t.group,r=t.hasRendered,o=t.rootNode,l=t.idPreviousRoot,a=t.nodeMap,n=a[l],h=n&&n.shapeArgs,d=t.points,p=t.startAndEndRadians,c=t.chart,v=c&&c.options&&c.options.chart||{},g="boolean"!=typeof v.animation||v.animation,b=t.center,m={x:b[0],y:b[1]},y=b[3]/2,T=t.chart.renderer,P=!!(g&&r&&o!==l&&t.dataLabelsGroup),R,B=!1,I=!1;for(let n of(P&&(t.dataLabelsGroup.attr({opacity:0}),R=function(){B=!0,t.dataLabelsGroup&&t.dataLabelsGroup.animate({opacity:1,visibility:"inherit"})}),d)){let d,u;let v=n.node,b=e[v.level],P=n.shapeExisting||{},B=v.shapeArgs||{},M=!!(v.visible&&v.shapeArgs);B.borderRadius=t.options.borderRadius,d=r&&g?function(t,e){let i=e.point,s=e.radians,r=e.innerR,o=e.idRoot,l=e.idPreviousRoot,a=e.shapeExisting,n=e.shapeRoot,h=e.shapePreviousRoot,d=e.visible,p={},u={end:t.end,start:t.start,innerR:t.innerR,r:t.r,x:t.x,y:t.y};return d?!i.graphic&&h&&((p=o===i.id?{start:s.start,end:s.end}:h.end<=t.start?{start:s.end,end:s.end}:{start:s.start,end:s.start}).innerR=p.r=r):i.graphic&&(l===i.id?u={innerR:r,r:r}:n&&(u=n.end<=a.start?{innerR:r,r:r,start:s.end,end:s.end}:{innerR:r,r:r,start:s.start,end:s.start})),{from:p,to:u}}(B,{center:m,point:n,radians:p,innerR:y,idRoot:o,idPreviousRoot:l,shapeExisting:P,shapeRoot:i,shapePreviousRoot:h,visible:M}):{to:B,from:{}},x(n,{shapeExisting:B,tooltipPos:[B.plotX,B.plotY],drillId:function(t,e,i){let s;let r=t.node;return r.isLeaf||(s=e===t.id?i[e].parent:t.id),s}(n,o,a),name:""+(n.name||n.id||n.index),plotX:B.plotX,plotY:B.plotY,value:v.val,isInside:M,isNull:!M}),n.dlOptions=function(t){let e=t.point,i=L(t.shapeArgs)?t.shapeArgs:{},s=L(t.optionsPoint)?t.optionsPoint.dataLabels:{},r=C(L(t.level)?t.level.dataLabels:{})[0],o=w({style:{}},r,s),l,a,n=o.rotationMode;return S(o.rotation)||(("auto"===n||"circular"===n)&&(o.useHTML&&"circular"===n&&(n="auto"),e.innerArcLength<1&&e.outerArcLength>i.radius?(l=0,e.dataLabelPath&&"circular"===n&&(o.textPath={enabled:!0})):e.innerArcLength>1&&e.outerArcLength>1.5*i.radius?"circular"===n?o.textPath={enabled:!0,attributes:{dy:5}}:n="parallel":(e.dataLabel&&e.dataLabel.textPath&&"circular"===n&&(o.textPath={enabled:!1}),n="perpendicular")),"auto"!==n&&"circular"!==n&&(e.dataLabel&&e.dataLabel.textPath&&(o.textPath={enabled:!1}),l=i.end-(i.end-i.start)/2),"parallel"===n?o.style.width=Math.min(2.5*i.radius,(e.outerArcLength+e.innerArcLength)/2):!f(o.style.width)&&i.radius&&(o.style.width=1===e.node.level?2*i.radius:i.radius),"perpendicular"===n&&e.outerArcLength<16&&(o.style.width=1),o.style.width=Math.max(o.style.width-2*(o.padding||0),1),a=l*A%180,"parallel"===n&&(a-=90),a>90?a-=180:a<-90&&(a+=180),o.rotation=a),o.textPath&&(0===e.shapeExisting.innerR&&o.textPath.enabled?(o.rotation=0,o.textPath.enabled=!1,o.style.width=Math.max(2*e.shapeExisting.r-2*(o.padding||0),1)):e.dlOptions&&e.dlOptions.textPath&&!e.dlOptions.textPath.enabled&&"circular"===n&&(o.textPath.enabled=!0),o.textPath.enabled&&(o.rotation=0,o.style.width=Math.max((e.outerArcLength+e.innerArcLength)/2-2*(o.padding||0),1))),0===o.rotation&&(o.rotation=.001),o}({point:n,level:b,optionsPoint:n.options,shapeArgs:B}),!I&&M&&(I=!0,u=R),n.draw({animatableAttribs:d.to,attribs:x(d.from,!c.styledMode&&t.pointAttribs(n,n.selected&&"select")),onComplete:u,group:s,renderer:T,shapeType:"arc",shapeArgs:B})}P&&I?(t.hasRendered=!1,t.options.dataLabels.defer=!0,u.prototype.drawDataLabels.call(t),t.hasRendered=!0,B&&R()):u.prototype.drawDataLabels.call(t),t.idPreviousRoot=o}layoutAlgorithm(t,e,i){let s=t.start,r=t.end-s,o=t.val,l=t.x,a=t.y,n=i&&L(i.levelSize)&&S(i.levelSize.value)?i.levelSize.value:0,h=t.r,d=h+n,p=i&&S(i.slicedOffset)?i.slicedOffset:0;return(e||[]).reduce((t,e)=>{let i=1/o*e.val,u=i*r,c=s+u/2,v=R(l,a,c,p),g={x:e.sliced?v.x:l,y:e.sliced?v.y:a,innerR:h,r:d,radius:n,start:s,end:s+u};return t.push(g),s=g.end,t},[])}setRootNode(t,e,i){if(1===this.nodeMap[t].level&&1===this.nodeList.filter(t=>1===t.level).length){if(""===this.idPreviousRoot)return;t=""}super.setRootNode(t,e,i)}setShapeArgs(t,e,i){let s=t.level+1,r=i[s],o=t.children.filter(function(t){return t.visible}),l=[];l=this.layoutAlgorithm(e,o,r);let a=-1;for(let t of o){let e=l[++a],s=e.start+(e.end-e.start)/2,r=e.innerR+(e.r-e.innerR)/2,o=e.end-e.start,n=0===e.innerR&&o>6.28,h=n?{x:e.x,y:e.y}:R(e.x,e.y,s,r),d=t.val?t.childrenTotal>t.val?t.childrenTotal:t.val:t.childrenTotal;this.points[t.i]&&(this.points[t.i].innerArcLength=o*e.innerR,this.points[t.i].outerArcLength=o*e.r),t.shapeArgs=w(e,{plotX:h.x,plotY:h.y+4*Math.abs(Math.cos(s))}),t.values=w(e,{val:d}),t.children.length&&this.setShapeArgs(t,t.values,i)}}translate(){let t=this.options,e=this.center=this.getCenter(),i=this.startAndEndRadians=d(t.startAngle,t.endAngle),s=e[3]/2,o=e[2]/2,l=o-s,a=m(this),n=this.nodeMap,h,p=n&&n[a],u={};this.shapeRoot=p&&p.shapeArgs,this.processedXData||this.processData(),this.generatePoints(),T(this,"afterTranslate");let c=this.tree=this.getTree();p=(n=this.nodeMap)[a];let v=P(p.parent)?p.parent:"",f=n[v],{from:x,to:S}=r.getLevelFromAndTo(p);h=g({from:x,levels:this.options.levels,to:S,defaults:{colorByPoint:t.colorByPoint,dataLabels:t.dataLabels,levelIsConstant:t.levelIsConstant,levelSize:t.levelSize,slicedOffset:t.slicedOffset}}),h=r.calculateLevelSizes(h,{diffRadius:l,from:x,to:S}),b(c,{before:B,idRoot:a,levelIsConstant:t.levelIsConstant,mapOptionsToLevel:h,mapIdToNode:n,points:this.points,series:this});let L=n[""].shapeArgs={end:i.end,r:s,start:i.start,val:p.val,x:e[0],y:e[1]};for(let t of(this.setShapeArgs(f,L,h),this.mapOptionsToLevel=h,this.data))u[t.id]&&y(31,!1,this.chart),u[t.id]=!0}}return I.defaultOptions=w(c.defaultOptions,n),x(I.prototype,{axisTypes:[],drawDataLabels:p,getCenter:h,isCartesian:!1,onPointSupported:!0,pointAttribs:u.prototype.pointAttribs,pointClass:s,NodeClass:a,utils:r}),i.registerSeriesType("sunburst",I),I}),i(e,"masters/modules/sunburst.src.js",[e["Core/Globals.js"],e["Extensions/Breadcrumbs/Breadcrumbs.js"]],function(t,e){t.Breadcrumbs=e,e.compose(t.Chart,t.defaultOptions)})});//# sourceMappingURL=sunburst.js.map