/* Highcharts JS v10.2.1 (2022-08-29) (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(u){a(u);a.Highcharts=u;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function u(a,c,f,g){a.hasOwnProperty(c)||(a[c]=g.apply(null,f),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:c,module:a[c]}})))}a=a?a._modules:{};u(a, "Series/ColorMapComposition.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,c){var f=a.seriesTypes.column.prototype,g=c.addEvent,e=c.defined,m;(function(a){function c(d){this.moveToTopOnHover&&this.graphic&&this.graphic.attr({zIndex:d&&"hover"===d.state?1:0})}var m=[];a.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&Infinity!==this.value&&-Infinity!==this.value&&(void 0===this.value||!isNaN(this.value))}};a.seriesMembers= {colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(d){var b={};!e(d.color)||d.state&&"normal"!==d.state||(b[this.colorProp||"fill"]=d.color);return b},pointAttribs:f.pointAttribs};a.compose=function(d){var b=d.prototype.pointClass;-1===m.indexOf(b)&&(m.push(b),g(b,"afterSetState",c));return d}})(m||(m={}));return m});u(a,"Series/Treemap/TreemapAlgorithmGroup.js", [],function(){return function(){function a(a,f,g,e){this.height=a;this.width=f;this.plot=e;this.startDirection=this.direction=g;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,g){return Math.max(a/g,g/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/DrawPointUtilities.js",[a["Core/Utilities.js"]], function(a){function c(a){switch(a.series&&a.series.type){case "treemap":return f(a.plotY)&&null!==a.y;default:return!a.isNull}}var f=a.isNumber;return{draw:function(a,e){var f=e.animatableAttribs,g=e.onComplete,k=e.css,n=e.renderer,d=a.series&&a.series.chart.hasRendered?void 0:a.series&&a.series.options.animation,b=a.graphic;e.attribs=e.attribs||{};e.attribs["class"]=a.getClassName();if(c(a))b||(a.graphic=b="text"===e.shapeType?n.text():n[e.shapeType](e.shapeArgs||{}),b.add(e.group)),k&&b.css(k), b.attr(e.attribs).animate(f,e.isNew?!1:d,g);else if(b){var y=function(){a.graphic=b=b&&b.destroy();"function"===typeof g&&g()};Object.keys(f).length?b.animate(f,void 0,function(){return y()}):y()}},shouldDraw:c}});u(a,"Series/Treemap/TreemapPoint.js",[a["Series/DrawPointUtilities.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,c,f){var g=this&&this.__extends||function(){var a=function(d,y){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__= d}||function(a,d){for(var l in d)d.hasOwnProperty(l)&&(a[l]=d[l])};return a(d,y)};return function(d,y){function b(){this.constructor=d}a(d,y);d.prototype=null===y?Object.create(y):(b.prototype=y.prototype,new b)}}(),e=c.series.prototype.pointClass,m=c.seriesTypes;c=m.pie.prototype.pointClass;var v=f.extend,k=f.isNumber,n=f.pick;f=function(d){function b(){var a=null!==d&&d.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}g(b,d);b.prototype.draw= function(d){a.draw(this,d)};b.prototype.getClassName=function(){var a=e.prototype.getClassName.call(this),d=this.series,b=d.options;this.node.level<=d.nodeMap[d.rootNode].level?a+=" highcharts-above-level":this.node.isLeaf||n(b.interactByLeaf,!b.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){e.prototype.setState.call(this, a);this.graphic&&this.graphic.attr({zIndex:"hover"===a?1:0})};b.prototype.shouldDraw=function(){return a.shouldDraw(this)};return b}(m.scatter.prototype.pointClass);v(f.prototype,{setVisible:c.prototype.setVisible});return f});u(a,"Series/Treemap/TreemapUtilities.js",[a["Core/Utilities.js"]],function(a){var c=a.objectEach,f;(function(a){function e(a,f,c){void 0===c&&(c=this);a=f.call(c,a);!1!==a&&e(a,f,c)}a.AXIS_MAX=100;a.isBoolean=function(a){return"boolean"===typeof a};a.eachObject=function(a,f, e){e=e||this;c(a,function(c,d){f.call(e,c,d,a)})};a.recursive=e})(f||(f={}));return f});u(a,"Series/TreeUtilities.js",[a["Core/Color/Color.js"],a["Core/Utilities.js"]],function(a,c){function f(a,b){var d=b.before,e=b.idRoot,r=b.mapIdToNode[e],l=b.points[a.i],p=l&&l.options||{},w=[],x=0;a.levelDynamic=a.level-(!1!==b.levelIsConstant?0:r.level);a.name=n(l&&l.name,"");a.visible=e===a.id||!0===b.visible;"function"===typeof d&&(a=d(a,b));a.children.forEach(function(d,l){var p=g({},b);g(p,{index:l,siblings:a.children.length, visible:a.visible});d=f(d,p);w.push(d);d.visible&&(x+=d.val)});d=n(p.value,x);a.visible=0<=d&&(0f.lP.lR&&q.algorithmCalcPoints(a,!1,f,h,t);e===g&&q.algorithmCalcPoints(a,!0,f,h,t);e+=1});return h};b.prototype.alignDataLabel=function(a,b,c){var h=c.style;h&&!D(h.textOverflow)&&b.text&&b.getBBox().width>b.text.textWidth&&b.css({textOverflow:"ellipsis",width:h.width+="px"});l.prototype.alignDataLabel.apply(this, arguments);a.dataLabel&&a.dataLabel.attr({zIndex:(a.node.zIndex||0)+1})};b.prototype.buildNode=function(a,b,c,d,f){var h=this,q=[],t=h.points[b],e=0,g;(d[a]||[]).forEach(function(b){g=h.buildNode(h.points[b].id,b,c+1,d,a);e=Math.max(g.height+1,e);q.push(g)});b={id:a,i:b,children:q,height:e,level:c,parent:f,visible:!1};h.nodeMap[b.id]=b;t&&(t.node=b);return b};b.prototype.calculateChildrenAreas=function(a,b){var h=this,c=h.options,d=h.mapOptionsToLevel[a.level+1],q=z(h[d&&d.layoutAlgorithm]&&d.layoutAlgorithm, c.layoutAlgorithm),e=c.alternateStartingDirection,f=[];a=a.children.filter(function(a){return!a.ignore});d&&d.layoutStartingDirection&&(b.direction="vertical"===d.layoutStartingDirection?0:1);f=h[q](b,a);a.forEach(function(a,c){c=f[c];a.values=A(c,{val:a.childrenTotal,direction:e?1-b.direction:b.direction});a.pointValues=A(c,{x:c.x/h.axisRatio,y:k.AXIS_MAX-c.y-c.height,width:c.width/h.axisRatio});a.children.length&&h.calculateChildrenAreas(a,a.values)})};b.prototype.createList=function(a){var b=this.chart, h=[];if(b.breadcrumbs){var c=0;h.push({level:c,levelOptions:b.series[0]});b=a.target.nodeMap[a.newRootId];for(var d=[];b.parent||""===b.parent;)d.push(b),b=a.target.nodeMap[b.parent];d.reverse().forEach(function(a){h.push({level:++c,levelOptions:a})});1>=h.length&&(h.length=0)}return h};b.prototype.drawDataLabels=function(){var a=this,b=a.mapOptionsToLevel,c,d;a.points.filter(function(a){return a.node.visible}).forEach(function(h){d=b[h.node.level];c={style:{}};h.node.isLeaf||(c.enabled=!1);d&&d.dataLabels&& (c=A(c,d.dataLabels),a._hasPointLabels=!0);h.shapeArgs&&(c.style.width=h.shapeArgs.width,h.dataLabel&&h.dataLabel.css({width:h.shapeArgs.width+"px"}));h.dlOptions=A(c,h.options.dataLabels)});r.prototype.drawDataLabels.call(this)};b.prototype.drawPoints=function(){var a=this,b=a.chart,c=b.renderer,d=b.styledMode,e=a.options,f=d?{}:e.shadow,g=e.borderRadius,k=b.pointCount{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:p?0:.1,halo:!1,opacity:.75,shadow:!1}}});return b}(w);F(n.prototype,{buildKDTree:a,colorAttribs:c.seriesMembers.colorAttribs,colorKey:"colorValue",directTouch:!0,drawLegendSymbol:g.drawRectangle,getExtremesFromAll:!0,getSymbol:a,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"], pointClass:v,trackerGroups:["group","dataLabelsGroup"],utils:{recursive:k.recursive}});c.compose(n);e.registerSeriesType("treemap",n);"";return n});u(a,"masters/modules/treemap.src.js",[a["Core/Globals.js"],a["Extensions/Breadcrumbs.js"]],function(a,c){a.Breadcrumbs=c})}); //# sourceMappingURL=treemap.js.map