/* Highcharts JS v9.1.1 (2021-06-03) (c) 2014-2021 Highsoft AS Authors: Jon Arild Nygard / Oystein Moseng 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/treemap",["highcharts"],function(n){a(n);a.Highcharts=n;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function n(a,e,c,t){a.hasOwnProperty(e)||(a[e]=t.apply(null,c))}a=a?a._modules:{};n(a,"Mixins/ColorMapSeries.js",[a["Core/Globals.js"],a["Core/Series/Point.js"],a["Core/Utilities.js"]],function(a,e,c){var t= c.defined;c=c.addEvent;var g=a.noop;a=a.seriesTypes;c(e,"afterSetState",function(a){this.moveToTopOnHover&&this.graphic&&this.graphic.attr({zIndex:a&&"hover"===a.state?1:0})});return{colorMapPointMixin:{dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value}},colorMapSeriesMixin:{pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:g,parallelArrays:["x", "y","value"],colorKey:"value",pointAttribs:a.column.prototype.pointAttribs,colorAttribs:function(a){var c={};!t(a.color)||a.state&&"normal"!==a.state||(c[this.colorProp||"fill"]=a.color);return c}}}});n(a,"Series/Treemap/TreemapAlgorithmGroup.js",[],function(){return function(){function a(a,c,t,g){this.height=a;this.width=c;this.plot=g;this.startDirection=this.direction=t;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}()});n(a,"Mixins/DrawPoint.js",[],function(){var a=function(a){return"function"===typeof a},e=function(c){var e=this,g=c.animatableAttribs,k=c.onComplete,r=c.css,l=c.renderer,m=this.series&&this.series.chart.hasRendered?void 0:this.series&&this.series.options.animation,b=this.graphic;if(this.shouldDraw())b||(this.graphic= b=l[c.shapeType](c.shapeArgs).add(c.group)),b.css(r).attr(c.attribs).animate(g,c.isNew?!1:m,k);else if(b){var f=function(){e.graphic=b=b&&b.destroy();a(k)&&k()};Object.keys(g).length?b.animate(g,void 0,function(){f()}):f()}};return{draw:e,drawPoint:function(a){(a.attribs=a.attribs||{})["class"]=this.getClassName();e.call(this,a)},isFn:a}});n(a,"Series/Treemap/TreemapPoint.js",[a["Mixins/DrawPoint.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,e,c){var t=this&&this.__extends|| function(){var a=function(b,c){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,c)};return function(b,c){function f(){this.constructor=b}a(b,c);b.prototype=null===c?Object.create(c):(f.prototype=c.prototype,new f)}}(),g=e.series.prototype.pointClass,k=e.seriesTypes;e=k.pie.prototype.pointClass;var r=c.extend,l=c.isNumber,m=c.pick;c=function(a){function b(){var b=null!==a&&a.apply(this,arguments)|| this;b.name=void 0;b.node=void 0;b.options=void 0;b.series=void 0;b.value=void 0;return b}t(b,a);b.prototype.getClassName=function(){var a=g.prototype.getClassName.call(this),b=this.series,c=b.options;this.node.level<=b.nodeMap[b.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||m(c.interactByLeaf,!c.allowTraversingTree)?this.node.isLeaf||(a+=" highcharts-internal-node"):a+=" highcharts-internal-node-interactive";return a};b.prototype.isValid=function(){return!(!this.id&&!l(this.value))}; b.prototype.setState=function(a){g.prototype.setState.call(this,a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})};b.prototype.shouldDraw=function(){return l(this.plotY)&&null!==this.y};return b}(k.scatter.prototype.pointClass);r(c.prototype,{draw:a.drawPoint,setVisible:e.prototype.setVisible});return c});n(a,"Series/Treemap/TreemapUtilities.js",[a["Core/Utilities.js"]],function(a){var e=a.objectEach,c;(function(a){function c(a,e,l){void 0===l&&(l=this);a=e.call(l,a);!1!==a&&c(a,e,l)}a.AXIS_MAX= 100;a.isBoolean=function(a){return"boolean"===typeof a};a.eachObject=function(a,c,l){l=l||this;e(a,function(m,b){c.call(l,m,b,a)})};a.recursive=c})(c||(c={}));return c});n(a,"Mixins/TreeSeries.js",[a["Core/Color/Color.js"],a["Core/Utilities.js"]],function(a,e){var c=e.extend,t=e.isArray,g=e.isNumber,k=e.isObject,r=e.merge,l=e.pick;return{getColor:function(c,b){var f=b.index,e=b.mapOptionsToLevel,m=b.parentColor,k=b.parentColorIndex,g=b.series,y=b.colors,t=b.siblings,q=g.points,r=g.chart.options.chart, w;if(c){q=q[c.i];c=e[c.level]||{};if(e=q&&c.colorByPoint){var n=q.index%(y?y.length:r.colorCount);var D=y&&y[n]}if(!g.chart.styledMode){y=q&&q.options.color;r=c&&c.color;if(w=m)w=(w=c&&c.colorVariation)&&"brightness"===w.key?a.parse(m).brighten(f/t*w.to).get():m;w=l(y,r,D,w,g.color)}var F=l(q&&q.options.colorIndex,c&&c.colorIndex,n,k,b.colorIndex)}return{color:w,colorIndex:F}},getLevelOptions:function(a){var b=null;if(k(a)){b={};var f=g(a.from)?a.from:1;var e=a.levels;var l={};var m=k(a.defaults)? a.defaults:{};t(e)&&(l=e.reduce(function(a,b){if(k(b)&&g(b.level)){var e=r({},b);var l="boolean"===typeof e.levelIsConstant?e.levelIsConstant:m.levelIsConstant;delete e.levelIsConstant;delete e.level;b=b.level+(l?0:f-1);k(a[b])?c(a[b],e):a[b]=e}return a},{}));e=g(a.to)?a.to:1;for(a=0;a<=e;a++)b[a]=r({},m,k(l[a])?l[a]:{})}return b},setTreeValues:function M(a,e){var b=e.before,f=e.idRoot,g=e.mapIdToNode[f],k=e.points[a.i],r=k&&k.options||{},q=0,n=[];a.levelDynamic=a.level-(("boolean"===typeof e.levelIsConstant? e.levelIsConstant:1)?0:g.level);a.name=l(k&&k.name,"");a.visible=f===a.id||("boolean"===typeof e.visible?e.visible:!1);"function"===typeof b&&(a=b(a,e));a.children.forEach(function(b,f){var l=c({},e);c(l,{index:f,siblings:a.children.length,visible:a.visible});b=M(b,l);n.push(b);b.visible&&(q+=b.val)});a.visible=0v.lP.lR&&h.algorithmCalcPoints(a,!1,v,d,e);f===g&&h.algorithmCalcPoints(a, !0,v,d,e);f+=1});return d};b.prototype.alignDataLabel=function(a,b,c){var d=c.style;d&&!C(d.textOverflow)&&b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:d.width+="px"});y.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})};b.prototype.buildNode=function(a,b,c,e,z){var d=this,h=[],p=d.points[b],u=0,f;(e[a]||[]).forEach(function(b){f=d.buildNode(d.points[b].id,b,c+1,e,a);u=Math.max(f.height+1,u);h.push(f)}); b={id:a,i:b,children:h,height:u,level:c,parent:z,visible:!1};d.nodeMap[b.id]=b;p&&(p.node=b);return b};b.prototype.calculateChildrenAreas=function(a,b){var d=this,h=d.options,c=d.mapOptionsToLevel[a.level+1],e=x(d[c&&c.layoutAlgorithm]&&c.layoutAlgorithm,h.layoutAlgorithm),f=h.alternateStartingDirection,g=[];a=a.children.filter(function(a){return!a.ignore});c&&c.layoutStartingDirection&&(b.direction="vertical"===c.layoutStartingDirection?0:1);g=d[e](b,a);a.forEach(function(a,h){h=g[h];a.values=A(h, {val:a.childrenTotal,direction:f?1-b.direction:b.direction});a.pointValues=A(h,{x:h.x/d.axisRatio,y:m.AXIS_MAX-h.y-h.height,width:h.width/d.axisRatio});a.children.length&&d.calculateChildrenAreas(a,a.values)})};b.prototype.drawDataLabels=function(){var a=this,b=a.mapOptionsToLevel,c,e;a.points.filter(function(a){return a.node.visible}).forEach(function(d){e=b[d.node.level];c={style:{}};d.node.isLeaf||(c.enabled=!1);e&&e.dataLabels&&(c=A(c,e.dataLabels),a._hasPointLabels=!0);d.shapeArgs&&(c.style.width= d.shapeArgs.width,d.dataLabel&&d.dataLabel.css({width:d.shapeArgs.width+"px"}));d.dlOptions=A(c,d.options.dataLabels)});B.prototype.drawDataLabels.call(this)};b.prototype.drawPoints=function(){var a=this,b=a.chart,c=b.renderer,e=b.styledMode,f=a.options,U=e?{}:f.shadow,g=f.borderRadius,k=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:g.neutralColor10,borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:g.neutralColor40,brightness:F?0:.1,halo:!1,opacity:.75,shadow:!1}}});return b}(q);E(b.prototype,{buildKDTree:a,colorKey:"colorValue",directTouch:!0,drawLegendSymbol:n.drawRectangle,getExtremesFromAll:!0,getSymbol:a,optionalAxis:"colorAxis",parallelArrays:["x","y","value", "colorValue"],pointArrayMap:["value"],pointClass:l,trackerGroups:["group","dataLabelsGroup"],utils:{recursive:m.recursive}});k.registerSeriesType("treemap",b);"";return b});n(a,"masters/modules/treemap.src.js",[],function(){})}); //# sourceMappingURL=treemap.js.map