!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * Treegraph chart series type
 * @module highcharts/modules/treegraph
 * @requires highcharts
 * @requires highcharts/modules/treemap
 *
 *  (c) 2010-2026 Highsoft AS
 *  Author: Paweł Lysy Grzegorz Blachliński
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.SVGRenderer,t._Highcharts.Point,t._Highcharts.Color,t._Highcharts.SVGElement):"function"==typeof define&&define.amd?define("highcharts/modules/treegraph",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry,t.SVGRenderer,t.Point,t.Color,t.SVGElement)}):"object"==typeof exports?exports["highcharts/modules/treegraph"]=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.SVGRenderer,t._Highcharts.Point,t._Highcharts.Color,t._Highcharts.SVGElement):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.SVGRenderer,t.Highcharts.Point,t.Highcharts.Color,t.Highcharts.SVGElement)}("u"<typeof window?this:window,function(t,e,o,i,n,r){return function(){"use strict";var s,a,l,h,p={28:function(t){t.exports=r},260:function(t){t.exports=i},512:function(t){t.exports=e},540:function(t){t.exports=o},620:function(t){t.exports=n},944:function(e){e.exports=t}},d={};function c(t){var e=d[t];if(void 0!==e)return e.exports;var o=d[t]={exports:{}};return p[t](o,o.exports,c),o.exports}c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var o in e)c.o(e,o)&&!c.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var u={};c.d(u,{default:function(){return th}});var f=c(944),v=c.n(f);function y(t){var e=t.x1,o=t.y1,i=t.x2,n=t.y2,r=t.bendAt,s=t.width,a=t.inverted,l=void 0!==a&&a,h=t.radius;if(t.parentVisible){var p=null!=r?r:(void 0===s?0:s)/2;return function(t,e){for(var o=[],i=0;i<t.length;i++){var n=t[i][1],r=t[i][2];if("number"==typeof n&&"number"==typeof r)if(0===i)o.push(["M",n,r]);else if(i===t.length-1)o.push(["L",n,r]);else if(e){var s=t[i-1],a=t[i+1];if(s&&a){var l=s[1],h=s[2],p=a[1],d=a[2];if("number"==typeof l&&"number"==typeof p&&"number"==typeof h&&"number"==typeof d&&l!==p&&h!==d){var c=l<p?1:-1,u=h<d?1:-1;o.push(["L",n-c*Math.min(Math.abs(n-l),e),r-u*Math.min(Math.abs(r-h),e)],["C",n,r,n,r,n+c*Math.min(Math.abs(n-p),e),r+u*Math.min(Math.abs(r-d),e)])}}}else o.push(["L",n,r])}return o}([["M",e,o],["L",e+p*(l?-1:1),o],["L",e+p*(l?-1:1),n],["L",i,n]],h)}return[["M",e,o],["L",e,o],["C",e,o,e,n,e,n],["L",e,n],["C",e,o,e,n,e,n],["L",e,n]]}var g=c(512),b=c.n(g),m=c(540),x=c.n(m),P=(s=function(t,e){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mod=0,e.shift=0,e.change=0,e.children=[],e.preX=0,e.hidden=!1,e.wasVisited=!1,e.collapsed=!1,e}return P(e,t),e.prototype.nextLeft=function(){return this.getLeftMostChild()||this.thread},e.prototype.nextRight=function(){return this.getRightMostChild()||this.thread},e.prototype.getAncestor=function(t,e){return t.ancestor.children[0]===this.children[0]?t.ancestor:e},e.prototype.getLeftMostSibling=function(){var t=this.getParent();if(t)for(var e=0,o=t.children;e<o.length;e++){var i=o[e];if(i&&i.point.visible)return i}},e.prototype.hasChildren=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].point.visible)return!0;return!1},e.prototype.getLeftSibling=function(){var t=this.getParent();if(t){for(var e=t.children,o=this.relativeXPosition-1;o>=0;o--)if(e[o]&&e[o].point.visible)return e[o]}},e.prototype.getLeftMostChild=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].point.visible)return t[e]},e.prototype.getRightMostChild=function(){for(var t=this.children,e=t.length-1;e>=0;e--)if(t[e].point.visible)return t[e]},e.prototype.getParent=function(){return this.parentNode},e.prototype.getFirstChild=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].point.visible)return t[e]},e}(b().seriesTypes.treemap.prototype.NodeClass),L=c(260),O=c.n(L),w=function(t,e,o){if(o||2==arguments.length)for(var i,n=0,r=e.length;n<r;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))},C=v().doc;function T(t,e,o,i){void 0===i&&(i={});var n="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});var r=n.hcEvents;v().Point&&t instanceof v().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);var s=t.addEventListener;s&&s.call(t,e,o,!!v().supportsPassiveEvents&&{passive:void 0===i.passive?-1!==e.indexOf("touch"):i.passive,capture:!1}),r[e]||(r[e]=[]);var a={fn:o,order:"number"==typeof i.order?i.order:1/0};return r[e].push(a),r[e].sort(function(t,e){return t.order-e.order}),function(){!function(t,e,o){function i(e,o){var i=t.removeEventListener;i&&i.call(t,e,o,!1)}function n(o){var n,r;t.nodeName&&(e?(n={})[e]=!0:n=o,B(n,function(t,e){if(o[e])for(r=o[e].length;r--;)i(e,o[e][r].fn)}))}var r="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(r,"hcEvents")){var s=r.hcEvents;if(e){var a=s[e]||[];o?(s[e]=a.filter(function(t){return o!==t.fn}),i(e,o)):(n(s),s[e]=[])}else n(s),delete r.hcEvents}}(t,e,o)}}function _(t,e,o){void 0===e&&(e=0);var i=e%2/2,n=o?-1:1;return(Math.round(t*n-i)+i)*n}v().win;function M(t,e){var o;for(o in t||(t={}),e)t[o]=e[o];return t}function S(t){return N(t)&&"number"==typeof t.nodeType}function A(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function X(t){var e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function N(t,e){return!!t&&"object"==typeof t&&(!e||!X(t))}function E(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];var i,n=w([t],e,!0),r={},s=function(t,e){return"object"!=typeof t&&(t={}),B(e,function(o,i){if("__proto__"!==i&&"constructor"!==i){var n;!N(o,!0)||(n=null==o?void 0:o.constructor,N(o,!0)&&!S(o)&&(null==n?void 0:n.name)&&"Object"!==n.name)||S(o)?t[i]=e[i]:t[i]=s(t[i]||{},o)}}),t};!0===t&&(r=n[1],n=Array.prototype.slice.call(n,2));var a=n.length;for(i=0;i<a;i++)r=s(r,n[i]);return r}function B(t,e,o){for(var i in t)Object.hasOwnProperty.call(t,i)&&e.call(o||t[i],t[i],i,t)}function R(){for(var t=arguments,e=t.length,o=0;o<e;o++){var i=t[o];if(null!=i)return i}}function j(t,e,o){return/%$/.test(t)?e*parseFloat(t)/100+(o||0):parseFloat(t)}function H(t){return X(t)?t:[t]}Array.prototype.find;var W=(a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),V=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dataLabelOnHidden=!0,e.isLink=!1,e.setState=O().prototype.setState,e}return W(e,t),e.prototype.draw=function(){t.prototype.draw.apply(this,arguments);var e=this.graphic;e&&e.animate({visibility:this.visible?"inherit":"hidden"}),this.renderCollapseButton()},e.prototype.renderCollapseButton=function(){var t=this.series,e=this.graphic&&this.graphic.parentGroup,o=t.mapOptionsToLevel[this.node.level||0]||{},i=E(t.options.collapseButton,o.collapseButton,this.options.collapseButton),n=i.width,r=i.height,s=i.shape,a=i.style,l=this.series.chart,h=this.visible&&(this.collapsed||!i.onlyOnHover||"hover"===this.state)?1:0;if(this.shapeArgs)if(this.collapseButtonOptions=i,this.collapseButton)if(this.node.children.length&&i.enabled){var p=this.getCollapseBtnPosition(i),d=p.x,c=p.y;this.collapseButton.attr({text:this.collapsed?"+":"-",rotation:90*!!l.inverted,rotationOriginX:n/2,rotationOriginY:r/2,visibility:this.visible?"inherit":"hidden"}).animate({x:d,y:c,opacity:h})}else this.collapseButton.destroy(),delete this.collapseButton;else{if(!this.node.children.length||!i.enabled)return;var u=this.getCollapseBtnPosition(i),d=u.x,c=u.y,f=i.fillColor||this.color||"#cccccc";this.collapseButton=l.renderer.label(this.collapsed?"+":"-",d,c,s).attr({height:r-4,width:n-4,padding:2,fill:f,rotation:90*!!l.inverted,rotationOriginX:n/2,rotationOriginY:r/2,stroke:i.lineColor||"#ffffff","stroke-width":i.lineWidth,"text-align":"center",align:"center",zIndex:1,opacity:h,visibility:this.visible?"inherit":"hidden"}).addClass("highcharts-tracker").addClass("highcharts-collapse-button").removeClass("highcharts-no-tooltip").css(E({color:"string"==typeof f?l.renderer.getContrast(f):"#333333"},a)).add(e),this.collapseButton.element.point=this}},e.prototype.toggleCollapse=function(t){var e=this.series;this.update({collapsed:null!=t?t:!this.collapsed},!1,void 0,!1),function(t,e,o,i){if(o=o||{},(null==C?void 0:C.createEvent)&&(t.dispatchEvent||t.fireEvent&&t!==v())){var n=C.createEvent("Events");n.initEvent(e,!0,!0),o=M(n,o),t.dispatchEvent?t.dispatchEvent(o):t.fireEvent(e,o)}else if(t.hcEvents){o.target||M(o,{preventDefault:function(){o.defaultPrevented=!0},target:t,type:e});for(var r=[],s=t,a=!1;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[e]&&(r.length&&(a=!0),r.unshift.apply(r,s.hcEvents[e])),s=Object.getPrototypeOf(s);a&&r.sort(function(t,e){return t.order-e.order}),r.forEach(function(e){!1===e.fn.call(t,o,t)&&o.preventDefault()})}}(e,"toggleCollapse"),e.redraw()},e.prototype.destroy=function(){this.collapseButton&&(this.collapseButton.destroy(),delete this.collapseButton,this.collapseButton=void 0),this.linkToParent&&(this.linkToParent.destroy(),delete this.linkToParent),t.prototype.destroy.apply(this,arguments)},e.prototype.getCollapseBtnPosition=function(t){var e=this.series.chart.inverted,o=t.width,i=t.height,n=this.shapeArgs||{},r=n.x,s=n.y,a=n.width,l=n.height;return{x:(void 0===r?0:r)+t.x+(e?-(.3*i):(void 0===a?0:a)+-.3*o),y:(void 0===s?0:s)+(void 0===l?0:l)/2-i/2+t.y}},e}(b().seriesTypes.treemap.prototype.pointClass);T(V,"mouseOut",function(){var t=this.collapseButton,e=this.collapseButtonOptions;t&&(null==e?void 0:e.onlyOnHover)&&!this.collapsed&&t.animate({opacity:0})}),T(V,"mouseOver",function(){var t,e;this.collapseButton&&this.visible&&this.collapseButton.animate({opacity:1},null==(e=null==(t=this.series.options.states)?void 0:t.hover)?void 0:e.animation)}),T(V,"click",function(){this.toggleCollapse()});var D=c(620),z=function(t){var e,o,i,n,r,s,a={};if(N(t))for(n=A(t.from)?t.from:1,s=t.levels,o={},e=N(t.defaults)?t.defaults:{},X(s)&&(o=s.reduce(function(t,o){var i,r,s;return N(o)&&A(o.level)&&(r=R((s=E({},o)).levelIsConstant,e.levelIsConstant),delete s.levelIsConstant,delete s.level,N(t[i=o.level+(r?0:n-1)])?E(!0,t[i],s):t[i]=s),t},{})),r=A(t.to)?t.to:1,i=0;i<=r;i++)a[i]=E({},e,N(o[i])?o[i]:{});return a},I=function(t,e){var o=t.chart,i=t.options,n=i.nodeDistance,r=void 0===n?0:n,s=i.nodeWidth,a=void 0===s?0:s,l=o.plotSizeX,h=void 0===l?1:l;if("auto"===a){if("string"==typeof r&&/%$/.test(r))return h/(e+parseFloat(r)/100*(e-1));var p=Number(r);return(h+p)/(e||1)-p}return j(a,h)},Y=function(t){var e,o;return N(t)&&(o=N(t.options)?t.options:{},e=R(t.rootNode,o.rootId,""),N(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e},F=(l=function(t,e){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),G=function(t){function e(e,o,i,n){var r=t.call(this,e,o,i)||this;return r.dataLabelOnNull=!0,r.formatPrefix="link",r.isLink=!0,r.node={},r.formatPrefix="link",r.dataLabelOnNull=!0,n&&(r.fromNode=n.node.parentNode.point,r.visible=n.visible,r.toNode=n,r.id=r.toNode.id+"-"+r.fromNode.id),r}return F(e,t),e.prototype.update=function(t,e,o,i){var n={id:this.id,formatPrefix:this.formatPrefix};O().prototype.update.call(this,t,!this.isLink&&e,o,i),this.visible=this.toNode.visible,M(this,n),R(e,!0)&&this.series.chart.redraw(o)},e}(b().seriesTypes.column.prototype.pointClass),$=function(){function t(){}return t.createDummyNode=function(t,e,o){var i=new k;return i.id=t.id+"-"+o,i.ancestor=t,i.children.push(e),i.parent=t.id,i.parentNode=t,i.point=e.point,i.level=e.level-o,i.relativeXPosition=e.relativeXPosition,i.visible=e.visible,t.children[e.relativeXPosition]=i,e.oldParentNode=t,e.relativeXPosition=0,e.parentNode=i,e.parent=i.id,i},t.prototype.calculatePositions=function(t){var e=t.nodeList;this.resetValues(e);var o=t.tree;o&&(this.calculateRelativeX(o,0),this.beforeLayout(e),this.firstWalk(o),this.secondWalk(o,-o.preX),this.afterLayout(e))},t.prototype.beforeLayout=function(e){for(var o=0;o<e.length;o++)for(var i=e[o],n=0,r=i.children;n<r.length;n++){var s=r[n];if(s&&s.level-i.level>1)for(var a=s.level-i.level-1;a>0;)s=t.createDummyNode(i,s,a),a--}},t.prototype.resetValues=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.mod=0,o.ancestor=o,o.shift=0,o.thread=void 0,o.change=0,o.preX=0}},t.prototype.calculateRelativeX=function(t,e){for(var o=t.children,i=0,n=o.length;i<n;++i)this.calculateRelativeX(o[i],i);t.relativeXPosition=e},t.prototype.firstWalk=function(t){var e;if(t.hasChildren()){for(var o=t.getLeftMostChild(),i=0,n=t.children;i<n.length;i++){var r=n[i];this.firstWalk(r),o=this.apportion(r,o)}this.executeShifts(t);var s=t.getLeftMostChild(),a=t.getRightMostChild(),l=(s.preX+a.preX)/2;(e=t.getLeftSibling())?(t.preX=e.preX+1,t.mod=t.preX-l):t.preX=l}else(e=t.getLeftSibling())?(t.preX=e.preX+1,t.mod=t.preX):t.preX=0},t.prototype.secondWalk=function(t,e){var o,i;t.yPosition=t.preX+e,t.xPosition=null!=(i=null==(o=t.point)?void 0:o.x)?i:t.level;for(var n=0,r=t.children;n<r.length;n++){var s=r[n];this.secondWalk(s,e+t.mod)}},t.prototype.executeShifts=function(t){for(var e=0,o=0,i=t.children.length-1;i>=0;i--){var n=t.children[i];n.preX+=e,n.mod+=e,o+=n.change,e+=n.shift+o}},t.prototype.apportion=function(t,e){var o=t.getLeftSibling();if(o){for(var i=t,n=t,r=o,s=i.getLeftMostSibling(),a=i.mod,l=n.mod,h=r.mod,p=s.mod;r&&r.nextRight()&&i&&i.nextLeft();){r=r.nextRight(),s=s.nextLeft(),i=i.nextLeft(),(n=n.nextRight()).ancestor=t;var d=r.preX+h-(i.preX+a)+1;d>0&&(this.moveSubtree(t.getAncestor(r,e),t,d),a+=d,l+=d),h+=r.mod,a+=i.mod,p+=s.mod,l+=n.mod}r&&r.nextRight()&&!n.nextRight()&&(n.thread=r.nextRight(),n.mod+=h-l),i&&i.nextLeft()&&!s.nextLeft()&&(s.thread=i.nextLeft(),s.mod+=a-p),e=t}return e},t.prototype.moveSubtree=function(t,e,o){var i=e.relativeXPosition-t.relativeXPosition;e.change-=o/i,e.shift+=o,e.preX+=o,e.mod+=o,t.change+=o/i},t.prototype.afterLayout=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.oldParentNode&&(o.relativeXPosition=o.parentNode.relativeXPosition,o.parent=o.oldParentNode.parent,o.parentNode=o.oldParentNode,o.oldParentNode.children.splice(o.relativeXPosition,1,o),o.oldParentNode=void 0)}},t}(),q={reversed:!1,marker:{radius:10,lineWidth:0,symbol:"circle",fillOpacity:1,states:{}},link:{color:"#666666",lineWidth:1,radius:10,cursor:"default",type:"curved"},collapseButton:{onlyOnHover:!0,enabled:!0,lineWidth:1,x:0,y:0,height:18,width:18,shape:"circle",style:{cursor:"pointer",fontWeight:"bold",fontSize:"1em"}},fillSpace:!1,tooltip:{linkFormat:"{point.fromNode.id} → {point.toNode.id}",pointFormat:"{point.id}"},dataLabels:{defer:!0,linkTextPath:{attributes:{startOffset:"50%"}},enabled:!0,linkFormatter:function(){return""},pointFormat:void 0,padding:5,style:{textOverflow:"none"}},nodeDistance:30,nodeWidth:void 0},K=c(28),U=c.n(K),J=v().deg2rad;function Q(t,e){var o=this;e=E(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);var i=this.renderer.url,n=this.text||this,r=n.textPath,s=e.attributes,a=e.enabled;if(t=t||r&&r.path,r&&r.undo(),t&&a){var l=T(n,"afterModifyTree",function(e){if(t&&a){var r=t.attr("id");r||t.attr("id",r=(0,f.uniqueKey)());var l={x:0,y:0};null!=s.dx&&(l.dx=s.dx,delete s.dx),null!=s.dy&&(l.dy=s.dy,delete s.dy),n.attr(l),o.attr({transform:""}),o.box&&(o.box=o.box.destroy());var h=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:M(s,{"text-anchor":s.textAnchor,href:""+i+"#".concat(r)}),children:h}}});n.textPath={path:t,undo:l}}else n.attr({dx:0,dy:0}),delete n.textPath;return this.added&&(n.textCache="",this.renderer.buildText(n)),this}function Z(t){var e,o=t.bBox,i=null==(e=this.element)?void 0:e.querySelector("textPath");if(i){for(var n=[],r=this.renderer.fontMetrics(this.element),s=r.b,a=r.h-s,l=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),h=i.innerHTML.replace(l,"").split(/<tspan class="highcharts-br"[^>]*>/),p=h.length,d=function(t,e){var o=e.x,n=e.y,r=(i.getRotationOfChar(t)-90)*J,l=Math.cos(r),h=Math.sin(r);return[[o-a*l,n-a*h],[o+s*l,n+s*h]]},c=0,u=0;u<p;u++){for(var f=h[u].length,v=0;v<f;v+=5)try{var y=c+v+u,g=d(y,i.getStartPositionOfChar(y)),b=g[0],m=g[1];0===v?(n.push(m),n.push(b)):(0===u&&n.unshift(m),u===p-1&&n.push(b))}catch(t){break}c+=f-1;try{var y=c+u,x=i.getEndPositionOfChar(y),P=d(y,x),b=P[0],m=P[1];n.unshift(m),n.unshift(b)}catch(t){break}}n.length&&n.push(n[0].slice()),o.polygon=n}return o}function tt(t){var e,o=t.labelOptions,i=t.point,n=o[i.formatPrefix+"TextPath"]||o.textPath;n&&!o.useHTML&&(this.setTextPath((null==(e=i.getDataLabelPath)?void 0:e.call(i,this))||i.graphic,n),i.dataLabelPath&&!n.enabled&&(i.dataLabelPath=i.dataLabelPath.destroy()))}var te=(h=function(t,e){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),to={default:y,orthogonal:y,straight:function(t){var e=t.x1,o=t.y1,i=t.x2,n=t.y2,r=t.width,s=t.inverted;return t.parentVisible?[["M",e,o],["L",e+(void 0===r?0:r)*(void 0!==s&&s?-1:1),n],["L",i,n]]:[["M",e,o],["L",e,n],["L",e,n]]},curved:function(t){var e=t.x1,o=t.y1,i=t.x2,n=t.y2,r=t.offset,s=void 0===r?0:r,a=t.width,l=void 0===a?0:a,h=t.inverted,p=void 0!==h&&h;return t.parentVisible?[["M",e,o],["C",e+s,o,e-s+l*(p?-1:1),n,e+l*(p?-1:1),n],["L",i,n]]:[["M",e,o],["C",e,o,e,n,e,n],["L",i,n]]}},ti=b().series.prototype,tn=b().seriesTypes,tr=tn.treemap,ts=tn.column,ta=x().prototype.symbols;({compose:function(t){T(t,"afterGetBBox",Z),T(t,"beforeAddingDataLabel",tt);var e=t.prototype;e.setTextPath||(e.setTextPath=Q)}}).compose(U());var tl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nodeList=[],e.links=[],e}return te(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.layoutAlgorithm=new $;var e=this,o=this.chart.labelCollectors;o.some(function(t){return"collectorFunc"===t.name})||o.push(function(){var t=[];if(e.options.dataLabels&&!H(e.options.dataLabels)[0].allowOverlap)for(var o=0,i=e.links||[];o<i.length;o++){var n=i[o];n.dataLabel&&t.push(n.dataLabel)}return t})},e.prototype.getLayoutModifiers=function(){var t,e=this,o=this.chart,i=this,n=o.plotSizeX,r=o.plotSizeY,s=(null==(t=i.options.link)?void 0:t.lineWidth)||0,a=function(t){for(var e=t.length,o=t[0];e--;)t[e]>o&&(o=t[e]);return o}(this.points.map(function(t){return t.node.xPosition})),l=1/0,h=-1/0,p=1/0,d=-1/0,c=0,u=0,f=0,v=0;this.points.forEach(function(t){if(!e.options.fillSpace||t.visible){var o,y=t.node,g=i.mapOptionsToLevel[t.node.level]||{},b=E(e.options.marker,g.marker,t.options.marker),m=null!=(o=b.width)?o:I(e,a),x=j(b.radius||0,Math.min(n,r)),P=Math.max(b.lineWidth||0,s),k=b.symbol,L="circle"!==k&&b.height?j(b.height,r):2*x,O="circle"!==k&&m?j(m,n):2*x;y.nodeSizeX=O,y.nodeSizeY=L,y.xPosition<=l&&(l=y.xPosition,u=Math.max(O+P,u)),y.xPosition>=h&&(h=y.xPosition,c=Math.max(O+P,c)),y.yPosition<=p&&(p=y.yPosition,v=Math.max(L+P,v)),y.yPosition>=d&&(d=y.yPosition,f=Math.max(L+P,f))}});var y=d===p?1:(r-(v+f)/2)/(d-p),g=d===p?r/2:-y*p+v/2,b=h===l?1:(n-(c+c)/2)/(h-l),m=h===l?n/2:-b*l+u/2;return{ax:b,bx:m,ay:y,by:g}},e.prototype.getLinks=function(){var t=this,e=this,o=[];return this.data.forEach(function(i){var n,r=e.mapOptionsToLevel[null!=(n=i.node.level)?n:0]||{};if(i.node.parent){var s=E(r,i.options);if(!i.linkToParent||i.linkToParent.destroyed){var a=new e.LinkClass(e,s,void 0,i);i.linkToParent=a}else i.collapsed=R(i.collapsed,(t.mapOptionsToLevel[i.node.level]||{}).collapsed),i.linkToParent.visible=i.linkToParent.toNode.visible;i.linkToParent.index=o.push(i.linkToParent)-1}else i.linkToParent&&(e.links.splice(i.linkToParent.index),i.linkToParent.destroy(),delete i.linkToParent)}),o},e.prototype.buildTree=function(e,o,i,n,r){var s,a=this.points[o];return i=null!=(s=null==a?void 0:a.level)?s:i,t.prototype.buildTree.call(this,e,o,i,n,r)},e.prototype.markerAttribs=function(){return{}},e.prototype.setCollapsedStatus=function(t,e){var o=this,i=t.point;i&&(i.collapsed=R(i.collapsed,(this.mapOptionsToLevel[t.level]||{}).collapsed),i.visible=e,e=!1!==e&&!i.collapsed),t.children.forEach(function(t){o.setCollapsedStatus(t,e)})},e.prototype.drawTracker=function(){ts.prototype.drawTracker.apply(this,arguments),ts.prototype.drawTracker.call(this,this.links)},e.prototype.translate=function(){var t,e=this,o=this.options,i=Y(this);ti.translate.call(this);var n=this.tree=this.getTree();t=this.nodeMap[i],""===i||t&&t.children.length||(this.setRootNode("",!1),i=this.rootNode,t=this.nodeMap[i]),this.mapOptionsToLevel=z({from:t.level+1,levels:o.levels,to:n.height,defaults:{levelIsConstant:this.options.levelIsConstant,colorByPoint:o.colorByPoint}}),this.setCollapsedStatus(n,!0),this.links=this.getLinks(),this.setTreeValues(n),this.layoutAlgorithm.calculatePositions(this),this.layoutModifier=this.getLayoutModifiers(),this.points.forEach(function(t){e.translateNode(t)}),this.points.forEach(function(t){t.linkToParent&&e.translateLink(t.linkToParent)}),o.colorByPoint||this.setColorRecursive(this.tree)},e.prototype.translateLink=function(t){var e,o,i,n,r,s,a,l,h,p=t.fromNode,d=t.toNode,c=(null==(e=this.options.link)?void 0:e.lineWidth)||0,u=R(null==(o=this.options.link)?void 0:o.curveFactor,.5),f=d.x!==d.node.level||p.x!==p.node.level,v=R(null==(i=t.options.link)?void 0:i.type,null==(n=this.options.link)?void 0:n.type,"default");if(p.shapeArgs&&d.shapeArgs){var y=p.shapeArgs.width||0,g=this.chart.inverted,b=_((p.shapeArgs.y||0)+(p.shapeArgs.height||0)/2,c),m=_((d.shapeArgs.y||0)+(d.shapeArgs.height||0)/2,c),x=_((p.shapeArgs.x||0)+y,c),P=_(d.shapeArgs.x||0,c);g&&(x-=Math.round(y),P+=Math.round(d.shapeArgs.width||0));var k=d.node.xPosition-p.node.xPosition,L=Math.abs(P-x)+y,O=(f?L:L/k)-y,w=_((P+x)/2,c),C=j(null!=(l=null!=(s=null==(r=t.options.link)?void 0:r.bendAt)?s:null==(a=this.options.link)?void 0:a.bendAt)?l:"50%",L-y);t.shapeType="path",t.plotX=w,t.plotY=m,t.shapeArgs={d:to[v]({x1:x,y1:b,x2:P,y2:m,width:O,offset:O*u*(g?-1:1),inverted:g,parentVisible:d.visible,radius:null==(h=this.options.link)?void 0:h.radius,bendAt:C})},t.dlBox={x:(x+P)/2,y:(b+m)/2,height:c,width:0},t.tooltipPos=g?[(this.chart.plotSizeY||0)-t.dlBox.y,(this.chart.plotSizeX||0)-t.dlBox.x]:[t.dlBox.x,t.dlBox.y]}},e.prototype.drawNodeLabels=function(t){for(var e,o,i,n,r,s,a=this.mapOptionsToLevel,l=0;l<t.length;l++){var h=t[l];if(s=a[h.node.level],r={style:{}},s&&s.dataLabels&&(r=E(r,s.dataLabels),this.hasDataLabels=function(){return!0}),h.shapeArgs&&this.options.dataLabels){var p={},d=h.shapeArgs,c=d.width,u=void 0===c?0:c,f=d.height,v=void 0===f?0:f;this.chart.inverted&&(u=(e=[v,u])[0],v=e[1]),(null==(o=H(this.options.dataLabels)[0].style)?void 0:o.width)||(p.width=""+u+"px"),(null==(i=H(this.options.dataLabels)[0].style)?void 0:i.lineClamp)||(p.lineClamp=Math.floor(v/16)),M(r.style,p),null==(n=h.dataLabel)||n.css(p)}h.dlOptions=E(r,h.options.dataLabels)}ti.drawDataLabels.call(this,t)},e.prototype.alignDataLabel=function(e,o){var i=e.visible;e.visible=!0,t.prototype.alignDataLabel.apply(this,arguments),o.animate({opacity:+(!1!==i)},void 0,function(){i||o.hide()}),e.visible=i},e.prototype.drawDataLabels=function(){this.options.dataLabels&&(this.options.dataLabels=H(this.options.dataLabels),this.drawNodeLabels(this.points),ti.drawDataLabels.call(this,this.links))},e.prototype.destroy=function(){if(this.links){for(var t=0,e=this.links;t<e.length;t++)e[t].destroy();this.links.length=0}return ti.destroy.apply(this,arguments)},e.prototype.pointAttribs=function(t,e){var o,i=t&&this.mapOptionsToLevel[null!=(o=t.node.level)?o:0]||{},n=t&&t.options,r=i.states&&i.states[e]||{};t&&(t.options.marker=E(this.options.marker,i.marker,t.options.marker));var s=R(r&&r.link&&r.link.color,n&&n.link&&n.link.color,i&&i.link&&i.link.color,this.options.link&&this.options.link.color),a=R(r&&r.link&&r.link.lineWidth,n&&n.link&&n.link.lineWidth,i&&i.link&&i.link.lineWidth,this.options.link&&this.options.link.lineWidth),l=ti.pointAttribs.call(this,t,e);return t&&(t.isLink&&(l.stroke=s,l["stroke-width"]=a,delete l.fill),t.visible||(l.opacity=0)),l},e.prototype.drawPoints=function(){tr.prototype.drawPoints.apply(this,arguments),ts.prototype.drawPoints.call(this,this.links)},e.prototype.translateNode=function(t){var e=this.chart,o=t.node,i=t.plotX,n=void 0===i?0:i,r=e.plotSizeY,s=e.plotSizeX,a=this.layoutModifier,l=a.ax,h=a.bx,p=a.ay,d=a.by,c=this.isCartesian?e.inverted?s-n:n:l*o.xPosition+h,u=p*o.yPosition+d,f=this.mapOptionsToLevel[o.level]||{},v=E(this.options.marker,f.marker,t.options.marker).symbol,y=o.nodeSizeY,g=o.nodeSizeX,b=this.options.reversed,m=o.x=e.inverted?s-g/2-c:c-g/2,x=o.y=b?u-y/2:r-u-y/2,P=R(t.options.borderRadius,f.borderRadius,this.options.borderRadius),k=ta[v||"circle"];if(void 0===k?(t.hasImage=!0,t.shapeType="image",t.imageUrl=v.match(/^url\((.*?)\)$/)[1]):t.shapeType="path",!t.visible&&t.linkToParent){var L=t.linkToParent.fromNode;if(L){var O=L.shapeArgs||{},w=O.x,C=void 0===w?0:w,T=O.y,_=void 0===T?0:T,S=O.width,A=O.height;t.shapeArgs||(t.shapeArgs={}),t.hasImage||M(t.shapeArgs,{d:k(C,_,void 0===S?0:S,void 0===A?0:A,P?{r:P}:void 0)}),M(t.shapeArgs,{x:C,y:_}),t.plotX=L.plotX,t.plotY=L.plotY}}else t.plotX=m,t.plotY=x,t.shapeArgs={x:m,y:x,width:g,height:y,cursor:t.node.isLeaf?"default":"pointer"},t.hasImage||(t.shapeArgs.d=k(m,x,g,y,P?{r:P}:void 0));t.tooltipPos=e.inverted?[r-x-y/2,s-m-g/2]:[m+g/2,x]},e.defaultOptions=E(tr.defaultOptions,q),e}(tr);M(tl.prototype,{forceDL:!0,pointClass:V,NodeClass:k,LinkClass:G,isCartesian:!1}),b().registerSeriesType("treegraph",tl);var th=v();return u.default}()});