/* Highcharts JS v8.1.2 (2020-06-16) (c) 2014-2019 Highsoft AS Authors: Jon Arild Nygard / Oystein Moseng License: www.highcharts.com/license */ (function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(w){c(w);c.Highcharts=w;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function w(c,d,x,k){c.hasOwnProperty(d)||(c[d]=k.apply(null,x))}c=c?c._modules:{};w(c,"mixins/tree-series.js",[c["parts/Color.js"],c["parts/Utilities.js"]],function(c,d){var x=d.extend,k=d.isArray,n=d.isNumber,p=d.isObject, g=d.merge,v=d.pick;return{getColor:function(f,h){var t=h.index,d=h.mapOptionsToLevel,g=h.parentColor,p=h.parentColorIndex,B=h.series,A=h.colors,x=h.siblings,m=B.points,k=B.chart.options.chart,y;if(f){m=m[f.i];f=d[f.level]||{};if(d=m&&f.colorByPoint){var u=m.index%(A?A.length:k.colorCount);var n=A&&A[u]}if(!B.chart.styledMode){A=m&&m.options.color;k=f&&f.color;if(y=g)y=(y=f&&f.colorVariation)&&"brightness"===y.key?c.parse(g).brighten(t/x*y.to).get():g;y=v(A,k,n,y,B.color)}var w=v(m&&m.options.colorIndex, f&&f.colorIndex,u,p,h.colorIndex)}return{color:y,colorIndex:w}},getLevelOptions:function(f){var h=null;if(p(f)){h={};var d=n(f.from)?f.from:1;var c=f.levels;var z={};var v=p(f.defaults)?f.defaults:{};k(c)&&(z=c.reduce(function(h,c){if(p(c)&&n(c.level)){var f=g({},c);var t="boolean"===typeof f.levelIsConstant?f.levelIsConstant:v.levelIsConstant;delete f.levelIsConstant;delete f.level;c=c.level+(t?0:d-1);p(h[c])?x(h[c],f):h[c]=f}return h},{}));c=n(f.to)?f.to:1;for(f=0;f<=c;f++)h[f]=g({},v,p(z[f])?z[f]: {})}return h},setTreeValues:function J(h,c){var d=c.before,g=c.idRoot,t=c.mapIdToNode[g],k=c.points[h.i],p=k&&k.options||{},m=0,n=[];x(h,{levelDynamic:h.level-(("boolean"===typeof c.levelIsConstant?c.levelIsConstant:1)?0:t.level),name:v(k&&k.name,""),visible:g===h.id||("boolean"===typeof c.visible?c.visible:!1)});"function"===typeof d&&(h=d(h,c));h.children.forEach(function(d,g){var k=x({},c);x(k,{index:g,siblings:h.children.length,visible:h.visible});d=J(d,k);n.push(d);d.visible&&(m+=d.val)});h.visible= 0{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:G.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}}},{pointArrayMap:["value"],directTouch:!0,optionalAxis:"colorAxis",getSymbol:g,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",trackerGroups:["group","dataLabelsGroup"],getListOfParents:function(a,b){a=B(a)?a:[];var e=B(b)?b:[];b=a.reduce(function(a,b,e){b=u(b.parent, "");"undefined"===typeof a[b]&&(a[b]=[]);a[b].push(e);return a},{"":[]});P(b,function(a,b,c){""!==b&&-1===e.indexOf(b)&&(a.forEach(function(a){c[""].push(a)}),delete c[b])});return b},getTree:function(){var a=this.data.map(function(a){return a.id});a=this.getListOfParents(this.data,a);this.nodeMap=[];return this.buildNode("",-1,0,a,null)},hasData:function(){return!!this.processedXData.length},init:function(a,b){var e=c.colorMapSeriesMixin;e&&(this.colorAttribs=e.colorAttribs);this.eventsToUnbind.push(f(this, "setOptions",function(a){a=a.userOptions;t(a.allowDrillToNode)&&!t(a.allowTraversingTree)&&(a.allowTraversingTree=a.allowDrillToNode,delete a.allowDrillToNode);t(a.drillUpButton)&&!t(a.traverseUpButton)&&(a.traverseUpButton=a.drillUpButton,delete a.drillUpButton)}));E.prototype.init.call(this,a,b);delete this.opacity;this.options.allowTraversingTree&&this.eventsToUnbind.push(f(this,"click",this.onClickDrillToNode))},buildNode:function(a,b,e,c,l){var r=this,q=[],d=r.points[b],f=0,C;(c[a]||[]).forEach(function(b){C= r.buildNode(r.points[b].id,b,e+1,c,a);f=Math.max(C.height+1,f);q.push(C)});b={id:a,i:b,children:q,height:f,level:e,parent:l,visible:!1};r.nodeMap[b.id]=b;d&&(d.node=b);return b},setTreeValues:function(a){var b=this,e=b.options,c=b.nodeMap[b.rootNode];e="boolean"===typeof e.levelIsConstant?e.levelIsConstant:!0;var l=0,I=[],q=b.points[a.i];a.children.forEach(function(a){a=b.setTreeValues(a);I.push(a);a.ignore||(l+=a.val)});M(I,function(a,b){return a.sortIndex-b.sortIndex});var d=u(q&&q.options.value, l);q&&(q.value=d);z(a,{children:I,childrenTotal:l,ignore:!(u(q&&q.visible,!0)&&0h.lP.lR&&l.algorithmCalcPoints(a,!1,h,c,f);g===k&&l.algorithmCalcPoints(a,!0,h,c,f);g+=1});return c},algorithmFill:function(a,b,e){var c=[],l,d=b.direction,f=b.x,g=b.y, h=b.width,k=b.height,p,m,n,t;e.forEach(function(e){l=e.val/b.val*b.height*b.width;p=f;m=g;0===d?(t=k,n=l/t,h-=n,f+=n):(n=h,t=l/n,k-=t,g+=t);c.push({x:p,y:m,width:n,height:t});a&&(d=1-d)});return c},strip:function(a,b){return this.algorithmLowAspectRatio(!1,a,b)},squarified:function(a,b){return this.algorithmLowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.algorithmFill(!0,a,b)},stripes:function(a,b){return this.algorithmFill(!1,a,b)},translate:function(){var a=this,b=a.options,e=Q(a); E.prototype.translate.call(a);var c=a.tree=a.getTree();var d=a.nodeMap[e];a.renderTraverseUpButton(e);a.mapOptionsToLevel=O({from:d.level+1,levels:b.levels,to:c.height,defaults:{levelIsConstant:a.options.levelIsConstant,colorByPoint:b.colorByPoint}});""===e||d&&d.children.length||(a.setRootNode("",!1),e=a.rootNode,d=a.nodeMap[e]);F(a.nodeMap[a.rootNode],function(b){var e=!1,c=b.parent;b.visible=!0;if(c||""===c)e=a.nodeMap[c];return e});F(a.nodeMap[a.rootNode].children,function(a){var b=!1;a.forEach(function(a){a.visible= !0;a.children.length&&(b=(b||[]).concat(a.children))});return b});a.setTreeValues(c);a.axisRatio=a.xAxis.len/a.yAxis.len;a.nodeMap[""].pointValues=e={x:0,y:0,width:100,height:100};a.nodeMap[""].values=e=D(e,{width:e.width*a.axisRatio,direction:"vertical"===b.layoutStartingDirection?0:1,val:c.val});a.calculateChildrenAreas(c,e);a.colorAxis||b.colorByPoint||a.setColorRecursive(a.tree);b.allowTraversingTree&&(b=d.pointValues,a.xAxis.setExtremes(b.x,b.x+b.width,!1),a.yAxis.setExtremes(b.y,b.y+b.height, !1),a.xAxis.setScale(),a.yAxis.setScale());a.setPointValues()},drawDataLabels:function(){var a=this,b=a.mapOptionsToLevel,c,d;a.points.filter(function(a){return a.node.visible}).forEach(function(e){d=b[e.node.level];c={style:{}};e.node.isLeaf||(c.enabled=!1);d&&d.dataLabels&&(c=D(c,d.dataLabels),a._hasPointLabels=!0);e.shapeArgs&&(c.style.width=e.shapeArgs.width,e.dataLabel&&e.dataLabel.css({width:e.shapeArgs.width+"px"}));e.dlOptions=D(c,e.options.dataLabels)});E.prototype.drawDataLabels.call(this)}, alignDataLabel:function(a,b,c){var e=c.style;!t(e.textOverflow)&&b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:e.width+="px"});G.column.prototype.alignDataLabel.apply(this,arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})},pointAttribs:function(a,b){var c=L(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},d=a&&c[a.node.level]||{};c=this.options;var f=b&&c.states[b]||{},g=a&&a.getClassName()||"";a={stroke:a&&a.borderColor||d.borderColor||f.borderColor|| c.borderColor,"stroke-width":u(a&&a.borderWidth,d.borderWidth,f.borderWidth,c.borderWidth),dashstyle:a&&a.borderDashStyle||d.borderDashStyle||f.borderDashStyle||c.borderDashStyle,fill:a&&a.color||this.color};-1!==g.indexOf("highcharts-above-level")?(a.fill="none",a["stroke-width"]=0):-1!==g.indexOf("highcharts-internal-node-interactive")?(b=u(f.opacity,c.opacity),a.fill=v(a.fill).setOpacity(b).get(),a.cursor="pointer"):-1!==g.indexOf("highcharts-internal-node")?a.fill="none":b&&(a.fill=v(a.fill).brighten(f.brightness).get()); return a},drawPoints:function(){var a=this,b=a.chart,c=b.renderer,d=b.styledMode,f=a.options,g=d?{}:f.shadow,h=f.borderRadius,k=b.pointCount