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