!/**
 * Highcharts Gantt JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/treegrid
 * @requires highcharts
 *
 * Tree Grid
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Jon Arild Nygård
 *
 * 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.StackItem,t._Highcharts.Axis,t._Highcharts.Color):"function"==typeof define&&define.amd?define("highcharts/modules/treegrid",["highcharts/highcharts"],function(t){return e(t,t.StackItem,t.Axis,t.Color)}):"object"==typeof exports?exports["highcharts/modules/treegrid"]=e(t._Highcharts,t._Highcharts.StackItem,t._Highcharts.Axis,t._Highcharts.Color):t.Highcharts=e(t.Highcharts,t.Highcharts.StackItem,t.Highcharts.Axis,t.Highcharts.Color)}("u"<typeof window?this:window,function(t,e,i,r){return function(){"use strict";var n,o,s,a,l={184:function(t){t.exports=e},532:function(t){t.exports=i},620:function(t){t.exports=r},944:function(e){e.exports=t}},d={};function h(t){var e=d[t];if(void 0!==e)return e.exports;var i=d[t]={exports:{}};return l[t](i,i.exports,h),i.exports}h.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return h.d(e,{a:e}),e},h.d=function(t,e){for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var c={};h.d(c,{default:function(){return tb}});var u=h(944),f=h.n(u),p=h(184),v=h.n(p),g=function(t,e,i){if(i||2==arguments.length)for(var r,n=0,o=e.length;n<o;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))},m=f().doc;function k(t,e,i,r){void 0===r&&(r={});var n="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});var o=n.hcEvents;f().Point&&t instanceof f().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);var s=t.addEventListener;s&&s.call(t,e,i,!!f().supportsPassiveEvents&&{passive:void 0===r.passive?-1!==e.indexOf("touch"):r.passive,capture:!1}),o[e]||(o[e]=[]);var a={fn:i,order:"number"==typeof r.order?r.order:1/0};return o[e].push(a),o[e].sort(function(t,e){return t.order-e.order}),function(){L(t,e,i)}}function x(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}function y(t){return null!=t}function b(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function P(t,e){var i;for(i in t||(t={}),e)t[i]=e[i];return t}function O(t,e,i,r){if(i=i||{},(null==m?void 0:m.createEvent)&&(t.dispatchEvent||t.fireEvent&&t!==f())){var n=m.createEvent("Events");n.initEvent(e,!0,!0),i=P(n,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||P(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e});for(var o=[],s=t,a=!1;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[e]&&(o.length&&(a=!0),o.unshift.apply(o,s.hcEvents[e])),s=Object.getPrototypeOf(s);a&&o.sort(function(t,e){return t.order-e.order}),o.forEach(function(e){!1===e.fn.call(t,i,t)&&i.preventDefault()})}r&&!i.defaultPrevented&&r.call(t,i)}f().win;var A=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,r=t.length;for(i=0;i<r;i++)if(e(t[i],i))return t[i]};function E(t){return T(t)&&"number"==typeof t.nodeType}function G(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function w(t){return"string"==typeof t}function B(t){var e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function T(t,e){return!!t&&"object"==typeof t&&(!e||!B(t))}function I(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var r,n=g([t],e,!0),o={},s=function(t,e){return"object"!=typeof t&&(t={}),M(e,function(i,r){if("__proto__"!==r&&"constructor"!==r){var n;!T(i,!0)||(n=null==i?void 0:i.constructor,T(i,!0)&&!E(i)&&(null==n?void 0:n.name)&&"Object"!==n.name)||E(i)?t[r]=e[r]:t[r]=s(t[r]||{},i)}}),t};!0===t&&(o=n[1],n=Array.prototype.slice.call(n,2));var a=n.length;for(r=0;r<a;r++)o=s(o,n[r]);return o}function M(t,e,i){for(var r in t)Object.hasOwnProperty.call(t,r)&&e.call(i||t[r],t[r],r,t)}function S(){for(var t=arguments,e=t.length,i=0;i<e;i++){var r=t[i];if(null!=r)return r}}function L(t,e,i){function r(e,i){var r=t.removeEventListener;r&&r.call(t,e,i,!1)}function n(i){var n,o;t.nodeName&&(e?(n={})[e]=!0:n=i,M(n,function(t,e){if(i[e])for(o=i[e].length;o--;)r(e,i[e][o].fn)}))}var o="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(o,"hcEvents")){var s=o.hcEvents;if(e){var a=s[e]||[];i?(s[e]=a.filter(function(t){return i!==t.fn}),r(e,i)):(n(s),s[e]=[])}else n(s),delete o.hcEvents}}function N(t,e,i){var r=t[e];t[e]=function(){var t=arguments,e=this;return i.apply(this,[function(){return r.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}!function(t){function e(){void 0!==this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function i(){var t;Object.keys((null==(t=this.options.breaks)?void 0:t[0])||{}).length&&(this.options.ordinal=!1)}function r(){var t=this.brokenAxis;if(null==t?void 0:t.hasBreaks){for(var e=this.tickPositions,i=this.tickPositions.info,r=[],n=0;n<e.length;n++)t.isInAnyBreak(e[n])||r.push(e[n]);this.tickPositions=r,this.tickPositions.info=i}}function n(){this.brokenAxis||(this.brokenAxis=new d(this))}function o(){var t,e,i=this.isDirty,r=this.options.connectNulls,n=this.points,o=this.xAxis,s=this.yAxis;if(i)for(var a=n.length;a--;){var l=n[a],d=(null!==l.y||!1!==r)&&((null==(t=null==o?void 0:o.brokenAxis)?void 0:t.isInAnyBreak(l.x,!0))||(null==(e=null==s?void 0:s.brokenAxis)?void 0:e.isInAnyBreak(l.y,!0)));l.visible=!d&&!1!==l.options.visible}}function s(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,S(this.pointArrayMap,["y"]))}function a(t,e){var i,r,n,o,s=this,a=s.points;if(null==(i=null==t?void 0:t.brokenAxis)?void 0:i.hasBreaks){var l=t.brokenAxis;e.forEach(function(e){r=(null==l?void 0:l.breakArray)||[],n=t.isXAxis?t.min:S(s.options.threshold,t.min),a.forEach(function(i){var s;o=null!=(s=i["stack"+e.toUpperCase()])?s:i[e],r.forEach(function(e){if(G(n)&&G(o)){var r="";n<e.from&&o>e.to||n>e.from&&o<e.from?r="pointBreak":(n<e.from&&o>e.from&&o<e.to||n>e.from&&o>e.to&&o<e.from)&&(r="pointInBreak"),r&&O(t,r,{point:i,brk:e})}})})})}}function l(){var t,e=this.currentDataGrouping,i=null==e?void 0:e.gapSize,r=this.points.slice(),n=this.yAxis,o=this.options.gapSize,s=r.length-1;if(o&&s>0){"value"!==this.options.gapUnit&&(o*=this.basePointRange),i&&i>o&&i>=this.basePointRange&&(o=i);for(var a=void 0,l=void 0;s--;)if(l&&!1!==l.visible||(l=r[s+1]),a=r[s],!1!==l.visible&&!1!==a.visible){if(l.x-a.x>o){var d=(a.x+l.x)/2;r.splice(s+1,0,{isNull:!0,x:d}),n.stacking&&this.options.stacking&&((n.stacking.stacks[this.stackKey][d]=new(v())(n,n.options.stackLabels,!1,d,null!=(t=this.stack)?t:"")).total=0)}l=a}}return this.getGraphPath(r)}t.compose=function(t,d){if(!t.keepProps.includes("brokenAxis")){t.keepProps.push("brokenAxis"),k(t,"init",n),k(t,"afterInit",e),k(t,"afterSetTickPositions",r),k(t,"afterSetOptions",i);var h=d.prototype;h.drawBreaks=a,h.gappedPath=l,k(d,"afterGeneratePoints",o),k(d,"afterRender",s)}return t};var d=function(){function t(t){this.axis=t}return t.isInBreak=function(t,e){var i=t.repeat||1/0,r=t.from,n=t.to-t.from,o=e>=r?(e-r)%i:i-(r-e)%i;return t.inclusive?o<=n:o<n&&0!==o},t.lin2Val=function(e){var i=this.min||0,r=this.brokenAxis,n=null==r?void 0:r.breakArray;if(!(null==n?void 0:n.length)||!G(e))return e;var o=e;if(e>i)for(var s=0;s<n.length;s++){var a=n[s];if(a.from>o)break;a.to<=o&&a.to>i?o+=a.len:t.isInBreak(a,o)&&(o+=a.len)}else if(e<i)for(var l=0;l<n.length;l++){var a=n[l];if(a.from>i)break;a.from>=o&&a.from<i?o-=a.len:t.isInBreak(a,o)&&(o-=a.len)}return o},t.val2Lin=function(e){var i=this.min||0,r=this.brokenAxis,n=null==r?void 0:r.breakArray;if(!(null==n?void 0:n.length)||!G(e))return e;var o=e;if(e>i)for(var s=0;s<n.length;s++){var a=n[s];if(a.to<=e&&a.to>i)o-=a.len;else if(a.from>e)break;else if(t.isInBreak(a,e)){o-=e-a.from;break}}else if(e<i)for(var l=0;l<n.length;l++){var a=n[l];if(a.from>=e&&a.from<i)o+=a.len;else if(a.from>i)break;else if(t.isInBreak(a,e)){o+=a.to-e;break}}return o},t.prototype.findBreakAt=function(t,e){return A(e,function(e){return e.from<t&&t<e.to})},t.prototype.isInAnyBreak=function(e,i){var r,n,o,s=this.axis,a=s.options.breaks||[],l=a.length;if(l&&G(e)){for(;l--;)t.isInBreak(a[l],e)&&(r=!0,n||(n=S(a[l].showPoints,!s.isXAxis)));o=r&&i?r&&!n:r}return o},t.prototype.setBreaks=function(e,i){var r,n=this,o=n.axis,s=o.chart.time,a=B(e)&&!!Object.keys((null==e?void 0:e[0])||{}).length;o.isDirty=(null!=(r=n.hasBreaks)&&r)!==a,n.hasBreaks=a,null==e||e.forEach(function(t){t.from=s.parse(t.from)||0,t.to=s.parse(t.to)||0}),e!==o.options.breaks&&(o.options.breaks=o.userOptions.breaks=e),o.forceRedraw=!0,o.series.forEach(function(t){t.isDirty=!0}),a||o.val2lin!==t.val2Lin||(delete o.val2lin,delete o.lin2val),a&&(o.userOptions.ordinal=!1,o.lin2val=t.lin2Val,o.val2lin=t.val2Lin,o.setExtremes=function(t,e,i,r,s){var a;if(n.hasBreaks&&!(null==(a=o.treeGrid)?void 0:a.tree)){for(var l=this.brokenAxis.breakArray||[],d=void 0;d=n.findBreakAt(t,l);)t=d.to;for(;d=n.findBreakAt(e,l);)e=d.from;e<t&&(e=t)}o.constructor.prototype.setExtremes.call(this,t,e,i,r,s)},o.setAxisTranslation=function(){if(o.constructor.prototype.setAxisTranslation.call(this),n.unitLength=void 0,n.hasBreaks){var e,i,r,s,a,l,d,h,c,u,f=o.options.breaks||[],p=[],v=[],g=null!=(e=o.pointRangePadding)?e:0,m=0,k=null!=(i=o.userMin)?i:o.min,x=null!=(r=o.userMax)?r:o.max,y=null!=(s=o.dataMin)?s:k,b=null!=(a=o.dataMax)?a:x;G(o.threshold)&&(y=Math.min(null!=y?y:o.threshold,o.threshold),b=Math.max(null!=b?b:o.threshold,o.threshold)),(null==(l=o.treeGrid)?void 0:l.tree)||f.forEach(function(e){h=e.repeat||1/0,G(k)&&G(x)&&(t.isInBreak(e,k)&&(k+=e.to%h-k%h),t.isInBreak(e,x)&&(x-=x%h-e.from%h))}),G(y)&&G(b)&&f.forEach(function(t){for(c=t.from,h=t.repeat||1/0;c-h>y;)c-=h;for(;c<y;)c+=h;for(u=c;u<b;u+=h)p.push({value:u,move:"in"}),p.push({value:u+t.to-t.from,move:"out",size:t.breakSize})}),p.sort(function(t,e){return t.value===e.value?("in"!==t.move)-("in"!==e.move):t.value-e.value}),d=0,c=y,p.forEach(function(t){1===(d+="in"===t.move?1:-1)&&"in"===t.move&&(c=t.value),0===d&&G(c)&&(v.push({from:c,to:t.value,len:t.value-c-(t.size||0)}),G(k)&&G(x)&&c<x&&t.value>k&&(m+=t.value-c-(t.size||0)))}),n.breakArray=v,G(k)&&G(x)&&G(o.min)&&(n.unitLength=x-k-m+g,O(o,"afterBreaks"),o.staticScale?o.transA=o.staticScale:n.unitLength&&(o.transA*=(x-o.min+g)/n.unitLength),g&&(o.minPixelPadding=o.transA*(o.minPointOffset||0)),o.min=k,o.max=x)}}),S(i,!0)&&o.chart.redraw()},t}();t.Additions=d}(o||(o={}));var C=o,j=h(532),z=h.n(j),W=f().dateFormats;(n=s||(s={}))[n.top=0]="top",n[n.right=1]="right",n[n.bottom=2]="bottom",n[n.left=3]="left";function D(t,e){var i={width:0,height:0};if(e.forEach(function(e){var r,n=t[e],o=0,s=0;T(n,!0)&&(o=(r=T(n.label,!0)?n.label:{}).getBBox?r.getBBox().height:0,r.textStr&&!G(r.textPxLength)&&(r.textPxLength=r.getBBox().width),s=G(r.textPxLength)?Math.round(r.textPxLength):0,r.textStr&&(s=Math.round(r.getBBox().width)),i.height=Math.max(o,i.height),i.width=Math.max(s,i.width))}),"treegrid"===this.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode){var r=this.treeGrid.mapOfPosToGridNode[-1].height||0;i.width+=this.options.labels.indentation*(r-1)}return i}function H(t){var e=this.grid,i=3===this.side;if(i||t.apply(this),!(null==e?void 0:e.isColumn)){var r=(null==e?void 0:e.columns)||[];i&&(r=r.slice().reverse()),r.forEach(function(t){t.getOffset()})}i&&t.apply(this)}function R(t){if(!0===(this.options.grid||{}).enabled){var e=this.axisTitle,i=this.height,r=this.horiz,n=this.left,o=this.offset,a=this.opposite,l=this.options,d=this.top,h=this.width,c=this.tickSize(),u=null==e?void 0:e.getBBox().width,f=l.title.x,p=l.title.y,v=S(l.title.margin,r?5:10),g=e?this.chart.renderer.fontMetrics(e).f:0,m=(r?d+i:n)+(r?1:-1)*(a?-1:1)*(c?c[0]/2:0)+(this.side===s.bottom?g:0);t.titlePosition.x=r?n-(u||0)/2-v+f:m+(a?h:0)+o+f,t.titlePosition.y=r?m-(a?i:0)+(a?g:-g)/2+o+p:d-v+p}}function _(){var t,e=this.chart,i=this.options.grid,r=void 0===i?{}:i,n=this.userOptions;if(r.enabled&&((t=this.options).labels.align=S(t.labels.align,"center"),this.categories||(t.showLastLabel=!1),this.labelRotation=0,t.labels.rotation=0,t.minTickInterval=1),r.columns)for(var o=this.grid.columns=[],s=this.grid.columnIndex=0;++s<r.columns.length;){var a=I(n,r.columns[s],{isInternal:!0,linkedTo:0,scrollbar:{enabled:!1}},{grid:{columns:void 0}}),l=new(z())(this.chart,a,this.coll);l.grid.isColumn=!0,l.grid.columnIndex=s,b(e.axes,l),b(e[this.coll]||[],l),o.push(l)}}function F(){var t,e,i=this.axisTitle,r=this.grid,n=this.options;if(!0===(n.grid||{}).enabled){var o=this.min||0,a=this.max||0,l=this.ticks[this.tickPositions[0]];if(i&&!this.chart.styledMode&&(null==l?void 0:l.slotWidth)&&!this.options.title.style.width&&i.css({width:""+l.slotWidth+"px"}),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),this.rightWall&&this.rightWall.destroy(),(null==(t=this.grid)?void 0:t.isOuterAxis())&&this.axisLine){var d=n.lineWidth;if(d){var h=this.getLinePath(d),c=h[0],u=h[1],f=(this.tickSize("tick")||[1])[0]*(this.side===s.top||this.side===s.left?-1:1);if("M"===c[0]&&"L"===u[0]&&(this.horiz?(c[2]+=f,u[2]+=f):(c[1]+=f,u[1]+=f)),!this.horiz&&this.chart.marginRight){var p=["L",this.left,c[2]||0],v=[c,p],g=["L",this.chart.chartWidth-this.chart.marginRight,this.toPixels(a+this.tickmarkOffset)],m=[["M",u[1]||0,this.toPixels(a+this.tickmarkOffset)],g];this.grid.upperBorder||o%1==0||(this.grid.upperBorder=this.grid.renderBorder(v)),this.grid.upperBorder&&(this.grid.upperBorder.attr({stroke:n.lineColor,"stroke-width":n.lineWidth}),this.grid.upperBorder.animate({d:v})),this.grid.lowerBorder||a%1==0||(this.grid.lowerBorder=this.grid.renderBorder(m)),this.grid.lowerBorder&&(this.grid.lowerBorder.attr({stroke:n.lineColor,"stroke-width":n.lineWidth}),this.grid.lowerBorder.animate({d:m}))}this.grid.axisLineExtra?(this.grid.axisLineExtra.attr({stroke:n.lineColor,"stroke-width":n.lineWidth}),this.grid.axisLineExtra.animate({d:h})):this.grid.axisLineExtra=this.grid.renderBorder(h),this.axisLine[this.showAxis?"show":"hide"]()}}if(((null==r?void 0:r.columns)||[]).forEach(function(t){return t.render()}),!this.horiz&&this.chart.hasRendered&&(this.scrollbar||(null==(e=this.linkedParent)?void 0:e.scrollbar))&&this.tickPositions.length){for(var k=this.tickmarkOffset,x=this.tickPositions[this.tickPositions.length-1],y=this.tickPositions[0],b=void 0,P=void 0;(b=this.hiddenLabels.pop())&&b.element;)b.show();for(;(P=this.hiddenMarks.pop())&&P.element;)P.show();(b=this.ticks[y].label)&&(o-y>k?this.hiddenLabels.push(b.hide()):b.show()),(b=this.ticks[x].label)&&(x-a>k?this.hiddenLabels.push(b.hide()):b.show());var O=this.ticks[x].mark;O&&x-a<k&&x-a>0&&this.ticks[x].isLast&&this.hiddenMarks.push(O.hide())}}}function V(){var t,e=null==(t=this.tickPositions)?void 0:t.info,i=this.options,r=i.grid||{},n=this.userOptions.labels||{};r.enabled&&(this.horiz?(this.series.forEach(function(t){t.options.pointRange=0}),e&&i.dateTimeLabelFormats&&i.labels&&!y(n.align)&&(!1===i.dateTimeLabelFormats[e.unitName].range||e.count>1)&&(i.labels.align="left",y(n.x)||(i.labels.x=3))):"treegrid"!==this.type&&this.grid&&this.grid.columns&&(this.minPointOffset=this.tickInterval))}function X(t){var e,i=this.options,r=t.userOptions,n=i&&T(i.grid,!0)?i.grid:{};!0===n.enabled&&(e=I(!0,{className:"highcharts-grid-axis "+(r.className||""),dateTimeLabelFormats:{hour:{list:["%[HM]","%[H]"]},day:{list:["%[AeB]","%[aeb]","%[E]"]},week:{list:["Week %W","W%W"]},month:{list:["%[B]","%[b]","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"0.9em"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0,style:{textOverflow:"ellipsis"}},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},r),"xAxis"===this.coll&&(y(r.linkedTo)&&!y(r.tickPixelInterval)&&(e.tickPixelInterval=350),!(!y(r.tickPixelInterval)&&y(r.linkedTo))||y(r.tickPositioner)||y(r.tickInterval)||y(r.units)||(e.tickPositioner=function(t,i){var r,n,o=null==(n=null==(r=this.linkedParent)?void 0:r.tickPositions)?void 0:n.info;if(o){for(var s=e.units||[],a=void 0,l=1,d="year",h=0;h<s.length;h++){var c=s[h];if(c&&c[0]===o.unitName){a=h;break}}var f=G(a)&&s[a+1];if(f){d=f[0]||"year";var p=f[1];l=(null==p?void 0:p[0])||1}else"year"===o.unitName&&(l=10*o.count);var v=u.timeUnits[d];return this.tickInterval=v*l,this.chart.time.getTimeTicks({unitRange:v,count:l,unitName:d},t,i,this.options.startOfWeek)}})),I(!0,this.options,e),this.horiz&&(i.minPadding=S(r.minPadding,0),i.maxPadding=S(r.maxPadding,0)),G(i.grid.borderWidth)&&(i.tickWidth=i.lineWidth=n.borderWidth))}function q(t){var e=t.userOptions,i=(null==e?void 0:e.grid)||{},r=i.columns;i.enabled&&r&&I(!0,this.options,r[0])}function U(){(this.grid.columns||[]).forEach(function(t){return t.setScale()})}function K(t){var e=this.horiz,i=this.maxLabelDimensions,r=this.options.grid,n=void 0===r?{}:r;if(n.enabled&&i){var o=2*this.options.labels.distance,s=e?n.cellHeight||o+i.height:o+i.width;B(t.tickSize)?t.tickSize[0]=s:t.tickSize=[s,0]}}function Y(){this.axes.forEach(function(t){var e;((null==(e=t.grid)?void 0:e.columns)||[]).forEach(function(t){t.setAxisSize(),t.setAxisTranslation()})})}function J(t){var e=this.grid;(e.columns||[]).forEach(function(e){return e.destroy(t.keepEvents)}),e.columns=void 0}function Q(t){var e=t.userOptions||{},i=e.grid||{};i.enabled&&y(i.borderColor)&&(e.tickColor=e.lineColor=i.borderColor),this.grid||(this.grid=new ti(this)),this.hiddenLabels=[],this.hiddenMarks=[]}function Z(t){var e=this.label,i=this.axis,r=i.reversed,n=i.chart,o=i.options.grid||{},a=i.options.labels,l=a.align,d=s[i.side],h=t.tickmarkOffset,c=i.tickPositions,u=this.pos-h,f=G(c[t.index+1])?c[t.index+1]-h:(i.max||0)+h,p=i.tickSize("tick"),v=p?p[0]:0,g=p?p[1]/2:0;if(!0===o.enabled){var m,k=void 0,x=void 0,y=void 0;if("top"===d?m=(k=i.top+i.offset)-v:"bottom"===d?k=(m=n.chartHeight-i.bottom+i.offset)+v:(k=i.top+i.len-(i.translate(r?f:u)||0),m=i.top+i.len-(i.translate(r?u:f)||0)),"right"===d?y=(x=n.chartWidth-i.right+i.offset)+v:"left"===d?x=(y=i.left+i.offset)-v:(x=Math.round(i.left+(i.translate(r?f:u)||0))-g,y=Math.min(Math.round(i.left+(i.translate(r?u:f)||0))-g,i.left+i.len)),this.slotWidth=y-x,t.pos.x="left"===l?x:"right"===l?y:x+(y-x)/2,t.pos.y=m+(k-m)/2,e){var b=n.renderer.fontMetrics(e),P=e.getBBox().height;if(a.useHTML)t.pos.y+=b.b+-(P/2);else{var O=Math.round(P/b.h);t.pos.y+=(b.b-(b.h-b.f))/2+-((O-1)*b.h/2)}}t.pos.x+=i.horiz&&a.x||0}}function $(t){var e,i=t.axis,r=t.value;if(null==(e=i.options.grid)?void 0:e.enabled){var n=i.tickPositions,o=(i.linkedParent||i).series[0],s=r===n[0],a=r===n[n.length-1],l=o&&A(o.options.data,function(t){return t[i.isXAxis?"x":"y"]===r}),d=void 0;l&&o.is("gantt")&&(d=I(l),f().seriesTypes.gantt.prototype.pointClass.setGanttPointAliases(d,i.chart)),t.isFirst=s,t.isLast=a,t.point=d}}function tt(){var t,e,i=this.options,r=i.grid||{},n=this.categories,o=this.tickPositions,s=o[0],a=o[1],l=o[o.length-1],d=o[o.length-2],h=null==(t=this.linkedParent)?void 0:t.min,c=null==(e=this.linkedParent)?void 0:e.max,u=h||this.min,f=c||this.max,p=this.tickInterval,v=G(u)&&u>=s+p&&u<a,g=G(u)&&s<u&&s+p>u,m=G(f)&&l>f&&l-p<f,k=G(f)&&f<=l-p&&f>d;!0===r.enabled&&!n&&(this.isXAxis||this.isLinked)&&((g||v)&&!i.startOnTick&&(o[0]=u),(m||k)&&!i.endOnTick&&(o[o.length-1]=f))}function te(t){var e,i=this.options.grid;return!0===(void 0===i?{}:i).enabled&&this.categories?this.tickInterval:t.apply(this,(e=arguments,Array.prototype.slice.call(e,1)))}var ti=function(){function t(t){this.axis=t}return t.prototype.isOuterAxis=function(){var t,e=this.axis,i=e.chart,r=e.grid.columnIndex,n=(null==(t=e.linkedParent)?void 0:t.grid.columns)||e.grid.columns||[],o=r?e.linkedParent:e,s=-1,a=0;return 3===e.side&&!i.inverted&&n.length?!e.linkedParent:((i[e.coll]||[]).forEach(function(t,i){t.side!==e.side||t.options.isInternal||(a=i,t===o&&(s=i))}),a===s&&(!G(r)||n.length===r))},t.prototype.renderBorder=function(t){var e=this.axis,i=e.chart.renderer,r=e.options,n=i.path(t).addClass("highcharts-axis-line").add(e.axisGroup);return i.styledMode||n.attr({stroke:r.lineColor,"stroke-width":r.lineWidth,zIndex:7}),n},t}();W.E=function(t){return this.dateFormat("%a",t,!0).charAt(0)},W.W=function(t){var e=this.toParts(t),i=(e[7]+6)%7,r=e.slice(0);r[2]=e[2]-i+3;var n=this.toParts(this.makeTime(r[0],0,1));return 4!==n[7]&&(e[1]=0,e[2]=1+(11-n[7])%7),(1+Math.floor((this.makeTime(r[0],r[1],r[2])-this.makeTime(n[0],n[1],n[2]))/6048e5)).toString()};var tr=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)0>e.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]]);return i};function tn(t,e,i,r,n,o){var s,a,l=o&&o.after,d=o&&o.before,h={data:r,depth:i-1,id:t,level:i,parent:e||""},c=0,u=0;"function"==typeof d&&d(h,o);var f=(n[t]||[]).map(function(e){var r=tn(e.id,t,i+1,e,n,o),l=e.start||NaN,d=!0===e.milestone?l:e.end||NaN;return s=!G(s)||l<s?l:s,a=!G(a)||d>a?d:a,c=c+1+r.descendants,u=Math.max(r.height+1,u),r});return r&&(r.start=S(r.start,s),r.end=S(r.end,a)),P(h,{children:f,descendants:c,height:u}),"function"==typeof l&&l(h,o),h}var to=function(t,e){var i,r;return tn("",null,1,null,(i=[],Object.keys(r=t.reduce(function(t,e){var r=e.parent,n=void 0===r?"":r,o=e.id;return void 0===t[n]&&(t[n]=[]),t[n].push(e),o&&i.push(o),t},{})).forEach(function(t){var e;if(""!==t&&-1===i.indexOf(t)){var n=r[t].map(function(t){return tr(t,[])});(e=r[""]).push.apply(e,n),delete r[t]}}),r),e)};function ts(){this.treeGrid||(this.treeGrid=new td(this))}function ta(t,e,i,r,n,o,s,a,l){var d,h,c,u,f=S(null==(d=this.options)?void 0:d.labels,o),p=this.pos,v=this.axis,g="treegrid"===v.type,m=t.apply(this,[e,i,r,n,f,s,a,l]);if(g){var k=f&&T(f.symbol,!0)?f.symbol:{},x=k.width,y=k.padding,b=void 0===y?5*!v.linkedParent:y,P=f&&G(f.indentation)?f.indentation:0;u=(null==(c=null==(h=v.treeGrid.mapOfPosToGridNode)?void 0:h[p])?void 0:c.depth)||1,m.x+=(void 0===x?0:x)+2*b+(u-1)*P}return m}function tl(t){var e,i,r,n,o,s,a,l,d,h,c,u,f,p,v,g=this.pos,m=this.axis,x=this.label,y=this.treeGrid,b=this.options,P=null==y?void 0:y.labelIcon,O=null==x?void 0:x.element,A=m.treeGrid,E=m.options,w=m.chart,B=m.tickPositions,I=A.mapOfPosToGridNode,M=S(null==b?void 0:b.labels,null==E?void 0:E.labels),N=M&&T(M.symbol,!0)?M.symbol:{},C=null==I?void 0:I[g],j=C||{},z=j.descendants,W=j.depth,D=C&&z&&z>0,H="treegrid"===m.type&&O,R=B.indexOf(g)>-1,_="highcharts-treegrid-node-",F=_+"level-",V=w.styledMode;(H&&C&&x.removeClass(RegExp(F+".*")).addClass(F+W),t.apply(this,Array.prototype.slice.call(arguments,1)),H&&D)?(v=A.isCollapsed(C),e={color:!V&&x.styles.color||"",collapsed:v,group:x.parentGroup,options:N,renderer:x.renderer,show:R,xy:x.xy},n=!(r=this.treeGrid).labelIcon,o=e.renderer,s=e.xy,l=(a=e.options).width||0,d=a.height||0,h=5*(null!=(i=a.padding)?!i:!this.axis.linkedParent),c={x:s.x-l/2-h,y:s.y-d/2},u=e.collapsed?90:180,f=e.show&&G(c.y),(p=r.labelIcon)||(r.labelIcon=p=o.path(o.symbols[a.type](a.x||0,a.y||0,l,d)).addClass("highcharts-label-icon").add(e.group)),p[f?"show":"hide"](),o.styledMode||p.attr({cursor:"pointer",fill:S(e.color,"#666666"),"stroke-width":1,stroke:a.lineColor,strokeWidth:a.lineWidth||0}),p[n?"attr":"animate"]({translateX:c.x,translateY:c.y,rotation:u}),x.addClass(_+(v?"collapsed":"expanded")).removeClass(_+(v?"expanded":"collapsed")),V||x.css({cursor:"pointer"}),[x,P].forEach(function(t){t&&!t.attachedTreeGridEvents&&(k(t.element,"mouseover",function(){x.addClass("highcharts-treegrid-node-active"),x.renderer.styledMode||x.css({textDecoration:"underline"})}),k(t.element,"mouseout",function(){var t;t=T(M.style)?M.style:{},x.removeClass("highcharts-treegrid-node-active"),x.renderer.styledMode||x.css({textDecoration:t.textDecoration||"none"})}),k(t.element,"click",function(){y.toggleCollapse()}),t.attachedTreeGridEvents=!0)})):P&&(L(O),null==x||x.css({cursor:"default"}),P.destroy(),y.labelIcon=void 0)}var td=function(){function t(t){this.tick=t}return t.compose=function(t){var e=t.prototype;e.toggleCollapse||(k(t,"init",ts),N(e,"getLabelPosition",ta),N(e,"renderLabel",tl),e.collapse=function(t){this.treeGrid.collapse(t)},e.expand=function(t){this.treeGrid.expand(t)},e.toggleCollapse=function(t){this.treeGrid.toggleCollapse(t)})},t.prototype.collapse=function(t){var e=this.tick,i=e.pos,r=e.axis,n=r.treeGrid,o=r.brokenAxis,s=n.mapOfPosToGridNode;o&&s&&o.setBreaks(n.collapse(s[i]),null==t||t)},t.prototype.destroy=function(){var t;null==(t=this.labelIcon)||t.destroy()},t.prototype.expand=function(t){var e=this.tick,i=e.pos,r=e.axis,n=r.treeGrid,o=r.brokenAxis,s=n.mapOfPosToGridNode;o&&s&&o.setBreaks(n.expand(s[i]),null==t||t)},t.prototype.toggleCollapse=function(t){void 0===t&&(t=!0);var e,i,r=this.tick,n=r.axis,o=r.pos,s=n.brokenAxis,a=n.treeGrid;if(s&&a.mapOfPosToGridNode){var l=!!(n.scrollbar&&n.staticScale),d=n.pos+n.len+(a.pendingSizeAdjustment||0);if(a.pendingSizeAdjustment=0,s.setBreaks(a.toggleCollapse(a.mapOfPosToGridNode[o]),l&&t),l){var h=n.toValue(n.toPixels(n.dataMax)),c=n.toValue(d)-n.tickmarkOffset,u=null!=(e=n.userMin)?e:n.min;if(a.adjustedMax=h!==n.dataMax?h-n.tickmarkOffset:void 0,c>n.dataMax){var f=d-n.toPixels(n.dataMax+n.tickmarkOffset);c=null!=(i=a.adjustedMax)?i:n.dataMax,(u=n.toValue(n.toPixels(u-n.tickmarkOffset)-f)+n.tickmarkOffset)<n.dataMin&&(f=n.toPixels(n.dataMin)-n.toPixels(u),u=n.dataMin,a.pendingSizeAdjustment=f)}n.setExtremes(x(u),x(c),!1,!1,{trigger:"toggleCollapse"})}t&&n.chart.redraw()}},t}(),th=h(620),tc=function(t){var e,i,r,n,o,s,a={};if(T(t))for(n=G(t.from)?t.from:1,s=t.levels,i={},e=T(t.defaults)?t.defaults:{},B(s)&&(i=s.reduce(function(t,i){var r,o,s;return T(i)&&G(i.level)&&(o=S((s=I({},i)).levelIsConstant,e.levelIsConstant),delete s.levelIsConstant,delete s.level,T(t[r=i.level+(o?0:n-1)])?I(!0,t[r],s):t[r]=s),t},{})),o=G(t.to)?t.to:1,r=0;r<=o;r++)a[r]=I({},e,T(i[r])?i[r]:{});return a};function tu(t){return{from:t.collapseStart||0,to:t.collapseEnd||0,showPoints:!1}}function tf(t,e,i){var r,n,o=[],s=[],a={},l=e||!1,d={},h=-1,c=to(t,{after:function(t){var e=d[t.pos],i=0,r=0;e.children.forEach(function(t){r+=(t.descendants||0)+1,i=Math.max((t.height||0)+1,i)}),e.descendants=r,e.height=i,e.collapsed&&s.push(e)},before:function(t){var e,i,r=T(t.data,!0)?t.data:{},n=w(r.name)?r.name:"",s=a[t.parent],c=T(s,!0)?d[s.pos]:null;l&&T(c,!0)&&(e=A(c.children,function(t){return t.name===n}))?(i=e.pos,e.nodes.push(t)):i=h++,!d[i]&&(d[i]=e={depth:c?c.depth+1:0,name:n,id:r.id,nodes:[t],children:[],pos:i},-1!==i&&o.push(n),T(c,!0)&&c.children.push(e)),w(t.id)&&(a[t.id]=t),e&&!0===r.collapsed&&(e.collapsed=!0),t.pos=i}});return r=d,{categories:o,mapOfIdToNode:a,mapOfPosToGridNode:d=(n=function(t,e,r){var o=t.nodes,s=e+(-1===e?0:i-1),a=(s-e)/2,l=e+a;return o.forEach(function(t){var i=t.data;T(i,!0)&&(i.y=e+(i.seriesIndex||0),delete i.seriesIndex),t.pos=l}),r[l]=t,t.pos=l,t.tickmarkOffset=a+.5,t.collapseStart=s+.5,t.children.forEach(function(t){n(t,s+1,r),s=(t.collapseEnd||0)-.5}),t.collapseEnd=s+.5,r})(r["-1"],-1,{}),collapsedNodes:s,tree:c}}function tp(t){var e=t.target;e.axes.filter(function(t){return"treegrid"===t.type}).forEach(function(i){var r,n,o,s=i.options,a=s.labels,l=i.uniqueNames,d=e.time.parse(s.max),h=!i.treeGrid.mapOfPosToGridNode||i.series.some(function(t){return!t.hasRendered||t.isDirtyData||t.isDirty}),c=0;if(h){var u=[];if(n=i.series.reduce(function(t,i){var r=i.options.data||[],n=r[0],o=Array.isArray(n)&&!n.find(function(t){return"object"==typeof t});return u.push(o),i.visible&&(r.forEach(function(r){var n;(o||(null==(n=i.options.keys)?void 0:n.length))&&(r=i.pointClass.prototype.optionsToObject.call({series:i},r),i.pointClass.setGanttPointAliases(r,e)),T(r,!0)&&(r.seriesIndex=c,t.push(r))}),!0===l&&c++),t},[]),d&&n.length<d)for(var f=n.length;f<=d;f++)n.push({name:f+"​"});i.categories=(o=tf(n,l||!1,!0===l?c:1)).categories,i.treeGrid.mapOfPosToGridNode=o.mapOfPosToGridNode,i.hasNames=!0,i.treeGrid.tree=o.tree,i.series.forEach(function(t,e){var i=(t.options.data||[]).map(function(i){var r;return(u[e]||B(i)&&(null==(r=t.options.keys)?void 0:r.length))&&n.forEach(function(t){var e,r=B(e=i)?e:[e];r.indexOf(t.x||0)>=0&&r.indexOf(t.x2||0)>=0&&(i=t)}),T(i,!0)?I(i):i});t.visible&&t.setData(i,!1)}),i.treeGrid.mapOptionsToLevel=tc({defaults:a,from:1,levels:null==a?void 0:a.levels,to:null==(r=i.treeGrid.tree)?void 0:r.height}),"beforeRender"===t.type&&(i.treeGrid.collapsedNodes=o.collapsedNodes)}})}function tv(t,e){var i,r,n,o=this.treeGrid.mapOptionsToLevel||{},s="treegrid"===this.type,l=this.ticks,d=l[e];s&&this.treeGrid.mapOfPosToGridNode?((i=o[(n=this.treeGrid.mapOfPosToGridNode[e]).depth])&&(r={labels:i}),!d&&a?l[e]=d=new a(this,e,void 0,void 0,{category:n.name,tickmarkOffset:n.tickmarkOffset,options:r}):(d.parameters.category=n.name,d.options=r,d.addLabel())):t.apply(this,Array.prototype.slice.call(arguments,1))}function tg(t,e,i,r){var n=this,o="treegrid"===i.type;n.treeGrid||(n.treeGrid=new tx(n)),o&&(k(e,"beforeRender",tp),k(e,"beforeRedraw",tp),k(e,"addSeries",function(t){if(t.options.data){var e=tf(t.options.data,i.uniqueNames||!1,1);n.treeGrid.collapsedNodes=(n.treeGrid.collapsedNodes||[]).concat(e.collapsedNodes)}}),k(n,"foundExtremes",function(){var t;null==(t=n.treeGrid.collapsedNodes)||t.forEach(function(t){var e=n.treeGrid.collapse(t);n.brokenAxis&&(n.brokenAxis.setBreaks(e,!1),n.treeGrid.collapsedNodes&&(n.treeGrid.collapsedNodes=n.treeGrid.collapsedNodes.filter(function(e){return t.collapseStart!==e.collapseStart||t.collapseEnd!==e.collapseEnd})))})}),k(n,"afterBreaks",function(){"yAxis"===n.coll&&!n.staticScale&&n.chart.options.chart.height&&(n.isDirty=!0)}),i=I({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10}},uniqueNames:!1},i,{reversed:!0})),t.apply(n,[e,i,r]),o&&(n.hasNames=!0,n.options.showLastLabel=!0)}function tm(t){var e,i,r,n,o,s,a,l=this.options,d=this.chart.time,h="number"==typeof l.linkedTo?null==(e=this.chart[this.coll])?void 0:e[l.linkedTo]:void 0;if("treegrid"===this.type){if(this.min=null!=(r=null!=(i=this.userMin)?i:d.parse(l.min))?r:this.dataMin,this.max=null!=(o=null!=(n=this.userMax)?n:d.parse(l.max))?o:this.dataMax,O(this,"foundExtremes"),this.setAxisTranslation(),this.tickInterval=1,this.tickmarkOffset=.5,this.tickPositions=this.treeGrid.mapOfPosToGridNode?this.treeGrid.getTickPositions():[],h){var c=h.getExtremes();this.min=null!=(s=c.min)?s:c.dataMin,this.max=null!=(a=c.max)?a:c.dataMax,this.tickPositions=h.tickPositions}this.linkedParent=h}else t.apply(this,Array.prototype.slice.call(arguments,1))}function tk(t){var e=this;"treegrid"===this.type&&e.visible&&e.tickPositions.forEach(function(t){var i,r=e.ticks[t];(null==(i=r.label)?void 0:i.attachedTreeGridEvents)&&(L(r.label.element),r.label.attachedTreeGridEvents=!1)}),t.apply(e,Array.prototype.slice.call(arguments,1))}var tx=function(){function t(t){this.pendingSizeAdjustment=0,this.axis=t}return t.compose=function(t,e,i,r){if(!t.keepProps.includes("treeGrid")){var n,o,s,l=t.prototype;t.keepProps.push("treeGrid"),N(l,"generateTick",tv),N(l,"init",tg),N(l,"setTickInterval",tm),N(l,"redraw",tk),l.utils={getNode:tn},a||(a=r)}return n=t,o=e,s=r,n.keepProps.includes("grid")||(n.keepProps.push("grid"),n.prototype.getMaxLabelDimensions=D,N(n.prototype,"unsquish",te),N(n.prototype,"getOffset",H),k(n,"init",Q),k(n,"afterGetTitlePosition",R),k(n,"afterInit",_),k(n,"afterRender",F),k(n,"afterSetAxisTranslation",V),k(n,"afterSetOptions",X),k(n,"afterSetOptions",q),k(n,"afterSetScale",U),k(n,"afterTickSize",K),k(n,"trimTicks",tt),k(n,"destroy",J),k(o,"afterSetChartSize",Y),k(s,"afterGetLabelPosition",Z),k(s,"labelFormat",$)),C.compose(t,i),td.compose(r),t},t.prototype.setCollapsedStatus=function(t){var e=this.axis,i=e.chart;e.series.forEach(function(e){var r=e.options.data;if(t.id&&r){var n=i.get(t.id),o=r[e.data.indexOf(n)];n&&o&&(n.collapsed=t.collapsed,o.collapsed=t.collapsed)}})},t.prototype.collapse=function(t){var e=this.axis,i=e.options.breaks||[],r=tu(t);return i.push(r),t.collapsed=!0,e.treeGrid.setCollapsedStatus(t),i},t.prototype.expand=function(t){var e,i=this.axis,r=tu(t);return t.collapsed=!1,i.treeGrid.setCollapsedStatus(t),(null==(e=i.options.breaks)?void 0:e.reduce(function(t,e){return(e.to!==r.to||e.from!==r.from)&&t.push(e),t},[]))||[]},t.prototype.getTickPositions=function(){var t=this.axis,e=Math.floor(t.min/t.tickInterval)*t.tickInterval,i=Math.ceil(t.max/t.tickInterval)*t.tickInterval;return Object.keys(t.treeGrid.mapOfPosToGridNode||{}).reduce(function(r,n){var o,s=+n;return s>=e&&s<=i&&!(null==(o=t.brokenAxis)?void 0:o.isInAnyBreak(s))&&r.push(s),r},[])},t.prototype.isCollapsed=function(t){var e=this.axis.options.breaks||[],i=tu(t);return e.some(function(t){return t.from===i.from&&t.to===i.to})},t.prototype.toggleCollapse=function(t){return this.isCollapsed(t)?this.expand(t):this.collapse(t)},t}(),ty=f();tx.compose(ty.Axis,ty.Chart,ty.Series,ty.Tick);var tb=f();return c.default}()});