/*
 Highcharts Gantt JS v7.2.1 (2019-10-31)

 Gantt series

 (c) 2016-2019 Lars A. V. Cabrera

 License: www.highcharts.com/license
*/
(function(l){"object"===typeof module&&module.exports?(l["default"]=l,module.exports=l):"function"===typeof define&&define.amd?define("highcharts/modules/gantt",["highcharts"],function(I){l(I);l.Highcharts=I;return l}):l("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(l){function I(a,d,G,y){a.hasOwnProperty(d)||(a[d]=y.apply(null,G))}l=l?l._modules:{};I(l,"parts-gantt/CurrentDateIndicator.js",[l["parts/Globals.js"]],function(a){var d=a.addEvent,G=a.PlotLineOrBand,y=a.merge,l=a.wrap,
C={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(d,v){return a.dateFormat(v,d)},rotation:0,style:{fontSize:"10px"}}};d(a.Axis,"afterSetOptions",function(){var a=this.options,d=a.currentDateIndicator;d&&(d="object"===typeof d?y(C,d):y(C),d.value=new Date,a.plotLines||(a.plotLines=[]),a.plotLines.push(d))});d(G,"render",function(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})});l(G.prototype,"getLabelText",function(a,
d){var q=this.options;return q.currentDateIndicator&&q.label&&"function"===typeof q.label.formatter?(q.value=new Date,q.label.formatter.call(this,q.value,q.label.format)):a.call(this,d)})});I(l,"parts-gantt/GridAxis.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){var G=d.defined,y=d.erase,l=d.isArray,C=d.isNumber,F=d.pick,v=a.addEvent,q=a.dateFormat,m=function(e){return d.isObject(e,!0)},D=a.merge,n=a.wrap,B=a.Chart,H=a.Axis,g=a.Tick,c=function(e){var b=e.options,h=b&&m(b.grid)?
b.grid:{},c=25/11,r=e.chart.renderer.fontMetrics(b.labels.style.fontSize);b.labels||(b.labels={});b.labels.align=F(b.labels.align,"center");e.categories||(b.showLastLabel=!1);e.horiz&&(b.tickLength=h.cellHeight||r.h*c);e.labelRotation=0;b.labels.rotation=0},t={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};H.prototype.isOuterAxis=function(){var e=this,b=e.columnIndex,h=e.linkedParent&&e.linkedParent.columns||e.columns,c=b?e.linkedParent:e,r=-1,f=0;e.chart[e.coll].forEach(function(b,
h){b.side!==e.side||b.options.isInternal||(f=h,b===c&&(r=h))});return f===r&&(C(b)?h.length===b:!0)};H.prototype.getMaxLabelDimensions=function(e,b){var h={width:0,height:0};b.forEach(function(b){b=e[b];if(m(b)){var c=m(b.label)?b.label:{};b=c.getBBox?c.getBBox().height:0;c.textStr&&!C(c.textPxLength)&&(c.textPxLength=c.getBBox().width);c=C(c.textPxLength)?Math.round(c.textPxLength):0;h.height=Math.max(b,h.height);h.width=Math.max(c,h.width)}});return h};a.dateFormats.W=function(e){e=new Date(e);
e.setHours(0,0,0,0);e.setDate(e.getDate()-(e.getDay()||7));var b=new Date(e.getFullYear(),0,1);return Math.ceil(((e-b)/864E5+1)/7)};a.dateFormats.E=function(e){return q("%a",e,!0).charAt(0)};v(g,"afterGetLabelPosition",function(e){var b=this.label,h=this.axis,c=h.reversed,r=h.chart,f=h.options,k=f&&m(f.grid)?f.grid:{};f=h.options.labels;var p=f.align,x=t[h.side],A=e.tickmarkOffset,z=h.tickPositions,J=this.pos-A;z=C(z[e.index+1])?z[e.index+1]-A:h.max+A;var g=h.tickSize("tick",!0);A=l(g)?g[0]:0;g=g&&
g[1]/2;if(!0===k.enabled){if("top"===x){k=h.top+h.offset;var u=k-A}else"bottom"===x?(u=r.chartHeight-h.bottom+h.offset,k=u+A):(k=h.top+h.len-h.translate(c?z:J),u=h.top+h.len-h.translate(c?J:z));"right"===x?(x=r.chartWidth-h.right+h.offset,c=x+A):"left"===x?(c=h.left+h.offset,x=c-A):(x=Math.round(h.left+h.translate(c?z:J))-g,c=Math.round(h.left+h.translate(c?J:z))-g);this.slotWidth=c-x;e.pos.x="left"===p?x:"right"===p?c:x+(c-x)/2;e.pos.y=u+(k-u)/2;r=r.renderer.fontMetrics(f.style.fontSize,b.element);
b=b.getBBox().height;f.useHTML?e.pos.y+=r.b+-(b/2):(b=Math.round(b/r.h),e.pos.y+=(r.b-(r.h-r.f))/2+-((b-1)*r.h/2));e.pos.x+=h.horiz&&f.x||0}});v(H,"afterTickSize",function(e){var b=this.maxLabelDimensions,h=this.options;!0===(h&&m(h.grid)?h.grid:{}).enabled&&(h=2*Math.abs(this.defaultLeftAxisOptions.labels.x),b=h+(this.horiz?b.height:b.width),l(e.tickSize)?e.tickSize[0]=b:e.tickSize=[b])});v(H,"afterGetTitlePosition",function(e){var b=this.options;if(!0===(b&&m(b.grid)?b.grid:{}).enabled){var h=this.axisTitle,
c=h&&h.getBBox().width,r=this.horiz,f=this.left,k=this.top,p=this.width,x=this.height,A=b.title;b=this.opposite;var z=this.offset,J=this.tickSize()||[0],g=A.x||0,u=A.y||0,R=F(A.margin,r?5:10);h=this.chart.renderer.fontMetrics(A.style&&A.style.fontSize,h).f;J=(r?k+x:f)+J[0]/2*(b?-1:1)*(r?1:-1)+(this.side===t.bottom?h:0);e.titlePosition.x=r?f-c/2-R+g:J+(b?p:0)+z+g;e.titlePosition.y=r?J-(b?x:0)+(b?h:-h)/2+z+u:k-R+u}});n(H.prototype,"unsquish",function(e){var b=this.options;return!0===(b&&m(b.grid)?b.grid:
{}).enabled&&this.categories?this.tickInterval:e.apply(this,Array.prototype.slice.call(arguments,1))});v(H,"afterSetOptions",function(e){var b=this.options;e=e.userOptions;var h=b&&m(b.grid)?b.grid:{};if(!0===h.enabled){var c=D(!0,{className:"highcharts-grid-axis "+(e.className||""),dateTimeLabelFormats:{hour:{list:["%H:%M","%H"]},day:{list:["%A, %e. %B","%a, %e. %b","%E"]},week:{list:["Week %W","W%W"]},month:{list:["%B","%b","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"13px"}},
margin:0,title:{text:null,reserveSpace:!1,rotation:0},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},e);"xAxis"===this.coll&&(G(e.linkedTo)&&!G(e.tickPixelInterval)&&(c.tickPixelInterval=350),G(e.tickPixelInterval)||!G(e.linkedTo)||G(e.tickPositioner)||G(e.tickInterval)||(c.tickPositioner=function(b,f){var e=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(e){var h,
w=c.units;for(h=0;h<w.length;h++)if(w[h][0]===e.unitName){var A=h;break}if(w[A][1]){if(w[A+1]){var z=w[A+1][0];var r=(w[A+1][1]||[1])[0]}e=a.timeUnits[z];this.tickInterval=e*r;return this.getTimeTicks({unitRange:e,count:r,unitName:z},b,f,this.options.startOfWeek)}}}));D(!0,this.options,c);this.horiz&&(b.minPadding=F(e.minPadding,0),b.maxPadding=F(e.maxPadding,0));C(b.grid.borderWidth)&&(b.tickWidth=b.lineWidth=h.borderWidth)}});v(H,"afterSetAxisTranslation",function(){var e=this.options,b=e&&m(e.grid)?
e.grid:{},h=this.tickPositions&&this.tickPositions.info,c=this.userOptions.labels||{};this.horiz&&(!0===b.enabled&&this.series.forEach(function(b){b.options.pointRange=0}),h&&(!1===e.dateTimeLabelFormats[h.unitName].range||1<h.count)&&!G(c.align)&&(e.labels.align="left",G(c.x)||(e.labels.x=3)))});v(H,"trimTicks",function(){var e=this.options,b=e&&m(e.grid)?e.grid:{},c=this.categories,w=this.tickPositions,r=w[0],f=w[w.length-1],k=this.linkedParent&&this.linkedParent.min||this.min,p=this.linkedParent&&
this.linkedParent.max||this.max,t=this.tickInterval;!0!==b.enabled||c||!this.horiz&&!this.isLinked||(r<k&&r+t>k&&!e.startOnTick&&(w[0]=k),f>p&&f-t<p&&!e.endOnTick&&(w[w.length-1]=p))});v(H,"afterRender",function(){var e=this.options,b=e&&m(e.grid)?e.grid:{},c=this.chart.renderer;if(!0===b.enabled){this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions);this.rightWall&&this.rightWall.destroy();if(this.isOuterAxis()&&this.axisLine){var w=e.lineWidth;if(w){var r=this.getLinePath(w);
var f=r.indexOf("M")+1;var k=r.indexOf("L")+1;b=r.indexOf("M")+2;var p=r.indexOf("L")+2;var g=(this.tickSize("tick")[0]-1)*(this.side===t.top||this.side===t.left?-1:1);this.horiz?(r[b]+=g,r[p]+=g):(r[f]+=g,r[k]+=g);this.axisLineExtra?this.axisLineExtra.animate({d:r}):(this.axisLineExtra=c.path(r).attr({zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup),c.styledMode||this.axisLineExtra.attr({stroke:e.lineColor,"stroke-width":w}));this.axisLine[this.showAxis?"show":"hide"](!0)}}(this.columns||
[]).forEach(function(b){b.render()})}});var u={afterGetOffset:function(){(this.columns||[]).forEach(function(e){e.getOffset()})},afterInit:function(){var e=this.chart,b=this.userOptions,h=this.options;h=h&&m(h.grid)?h.grid:{};h.enabled&&(c(this),n(this,"labelFormatter",function(b){var f=this.axis,e=f.tickPositions,c=this.value,h=(f.isLinked?f.linkedParent:f).series[0],k=c===e[0];e=c===e[e.length-1];h=h&&a.find(h.options.data,function(b){return b[f.isXAxis?"x":"y"]===c});this.isFirst=k;this.isLast=
e;this.point=h;return b.call(this)}));if(h.columns)for(var w=this.columns=[],r=this.columnIndex=0;++r<h.columns.length;){var f=D(b,h.columns[h.columns.length-r-1],{linkedTo:0,type:"category"});delete f.grid.columns;f=new H(this.chart,f,!0);f.isColumn=!0;f.columnIndex=r;y(e.axes,f);y(e[this.coll],f);w.push(f)}},afterSetOptions:function(e){e=(e=e.userOptions)&&m(e.grid)?e.grid:{};var b=e.columns;e.enabled&&b&&D(!0,this.options,b[b.length-1])},afterSetScale:function(){(this.columns||[]).forEach(function(e){e.setScale()})},
destroy:function(e){(this.columns||[]).forEach(function(b){b.destroy(e.keepEvents)})},init:function(e){var b=(e=e.userOptions)&&m(e.grid)?e.grid:{};b.enabled&&G(b.borderColor)&&(e.tickColor=e.lineColor=b.borderColor)}};Object.keys(u).forEach(function(e){v(H,e,u[e])});v(B,"afterSetChartSize",function(){this.axes.forEach(function(e){(e.columns||[]).forEach(function(b){b.setAxisSize();b.setAxisTranslation()})})})});I(l,"modules/static-scale.src.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,
d){var G=d.defined,y=d.isNumber,l=d.pick;d=a.Chart;a.addEvent(a.Axis,"afterSetOptions",function(){var a=this.chart.options&&this.chart.options.chart;!this.horiz&&y(this.options.staticScale)&&(!a.height||a.scrollablePlotArea&&a.scrollablePlotArea.minHeight)&&(this.staticScale=this.options.staticScale)});d.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(a){var d=a.chart,v=!!d.initiatedScale&&d.options.animation,q=a.options.staticScale;if(a.staticScale&&
G(a.min)){var m=l(a.unitLength,a.max+a.tickInterval-a.min)*q;m=Math.max(m,q);q=m-d.plotHeight;1<=Math.abs(q)&&(d.plotHeight=m,d.redrawTrigger="adjustHeight",d.setSize(void 0,d.chartHeight+q,v));a.series.forEach(function(a){(a=a.sharedClipKey&&d[a.sharedClipKey])&&a.attr({height:d.plotHeight})})}}),this.initiatedScale=!0);this.redrawTrigger=null};a.addEvent(d,"render",d.prototype.adjustHeight)});I(l,"parts-gantt/Tree.js",[l["parts/Utilities.js"]],function(a){var d=a.extend,G=a.isNumber,y=a.pick,l=
function(a,d){var q=a.reduce(function(a,D){var n=y(D.parent,"");void 0===a[n]&&(a[n]=[]);a[n].push(D);return a},{});Object.keys(q).forEach(function(a,D){var n=q[a];""!==a&&-1===d.indexOf(a)&&(n.forEach(function(a){D[""].push(a)}),delete D[a])});return q},C=function(a,v,q,m,D,n){var B=0,H=0,g=n&&n.after,c=n&&n.before;v={data:m,depth:q-1,id:a,level:q,parent:v};var t,u;"function"===typeof c&&c(v,n);c=(D[a]||[]).map(function(e){var b=C(e.id,a,q+1,e,D,n),c=e.start;e=!0===e.milestone?c:e.end;t=!G(t)||c<
t?c:t;u=!G(u)||e>u?e:u;B=B+1+b.descendants;H=Math.max(b.height+1,H);return b});m&&(m.start=y(m.start,t),m.end=y(m.end,u));d(v,{children:c,descendants:B,height:H});"function"===typeof g&&g(v,n);return v};return{getListOfParents:l,getNode:C,getTree:function(a,d){var q=a.map(function(a){return a.id});a=l(a,q);return C("",null,1,null,a,d)}}});I(l,"mixins/tree-series.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){var G=d.extend,l=d.isArray,E=d.isNumber,C=d.isObject,F=d.pick,v=a.merge;
return{getColor:function(d,m){var D=m.index,n=m.mapOptionsToLevel,B=m.parentColor,q=m.parentColorIndex,g=m.series,c=m.colors,t=m.siblings,u=g.points,e=g.chart.options.chart,b;if(d){u=u[d.i];d=n[d.level]||{};if(n=u&&d.colorByPoint){var h=u.index%(c?c.length:e.colorCount);var w=c&&c[h]}if(!g.chart.styledMode){c=u&&u.options.color;e=d&&d.color;if(b=B)b=(b=d&&d.colorVariation)&&"brightness"===b.key?a.color(B).brighten(D/t*b.to).get():B;b=F(c,e,w,b,g.color)}var r=F(u&&u.options.colorIndex,d&&d.colorIndex,
h,q,m.colorIndex)}return{color:b,colorIndex:r}},getLevelOptions:function(a){var d=null;if(C(a)){d={};var D=E(a.from)?a.from:1;var n=a.levels;var B={};var q=C(a.defaults)?a.defaults:{};l(n)&&(B=n.reduce(function(g,c){if(C(c)&&E(c.level)){var t=v({},c);var a="boolean"===typeof t.levelIsConstant?t.levelIsConstant:q.levelIsConstant;delete t.levelIsConstant;delete t.level;c=c.level+(a?0:D-1);C(g[c])?G(g[c],t):g[c]=t}return g},{}));n=E(a.to)?a.to:1;for(a=0;a<=n;a++)d[a]=v({},q,C(B[a])?B[a]:{})}return d},
setTreeValues:function n(a,d){var D=d.before,m=d.idRoot,g=d.mapIdToNode[m],c=d.points[a.i],t=c&&c.options||{},u=0,e=[];G(a,{levelDynamic:a.level-(("boolean"===typeof d.levelIsConstant?d.levelIsConstant:1)?0:g.level),name:F(c&&c.name,""),visible:m===a.id||("boolean"===typeof d.visible?d.visible:!1)});"function"===typeof D&&(a=D(a,d));a.children.forEach(function(b,c){var h=G({},d);G(h,{index:c,siblings:a.children.length,visible:a.visible});b=n(b,h);e.push(b);b.visible&&(u+=b.val)});a.visible=0<u||a.visible;
D=F(t.value,u);G(a,{children:e,childrenTotal:u,isLeaf:a.visible&&!u,val:D});return a},updateRootId:function(a){if(C(a)){var d=C(a.options)?a.options:{};d=F(a.rootNode,d.rootId,"");C(a.userOptions)&&(a.userOptions.rootId=d);a.rootNode=d}return d}}});I(l,"modules/broken-axis.src.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){var G=d.extend,l=d.isArray,E=d.pick;d=a.addEvent;var C=a.find,F=a.fireEvent,v=a.Axis,q=a.Series,m=function(a,d){return C(d,function(d){return d.from<a&&a<d.to})};
G(v.prototype,{isInBreak:function(a,d){var n=a.repeat||Infinity,D=a.from,g=a.to-a.from;d=d>=D?(d-D)%n:n-(D-d)%n;return a.inclusive?d<=g:d<g&&0!==d},isInAnyBreak:function(a,d){var n=this.options.breaks,D=n&&n.length,g;if(D){for(;D--;)if(this.isInBreak(n[D],a)){var c=!0;g||(g=E(n[D].showPoints,!this.isXAxis))}var t=c&&d?c&&!g:c}return t}});d(v,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});d(v,"afterSetTickPositions",function(){if(this.isBroken){var a=
this.tickPositions,d=this.tickPositions.info,B=[],m;for(m=0;m<a.length;m++)this.isInAnyBreak(a[m])||B.push(a[m]);this.tickPositions=B;this.tickPositions.info=d}});d(v,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});v.prototype.setBreaks=function(a,d){function n(c){var a=c,e;for(e=0;e<g.breakArray.length;e++){var b=g.breakArray[e];if(b.to<=c)a-=b.len;else if(b.from>=c)break;else if(g.isInBreak(b,c)){a-=c-b.from;break}}return a}function D(c){var a;for(a=0;a<g.breakArray.length;a++){var e=
g.breakArray[a];if(e.from>=c)break;else e.to<c?c+=e.len:g.isInBreak(e,c)&&(c+=e.len)}return c}var g=this,c=l(a)&&!!a.length;g.isDirty=g.isBroken!==c;g.isBroken=c;g.options.breaks=g.userOptions.breaks=a;g.forceRedraw=!0;c||g.val2lin!==n||(delete g.val2lin,delete g.lin2val);c&&(g.userOptions.ordinal=!1,g.val2lin=n,g.lin2val=D,g.setExtremes=function(c,a,e,b,h){if(this.isBroken){for(var w,r=this.options.breaks;w=m(c,r);)c=w.to;for(;w=m(a,r);)a=w.from;a<c&&(a=c)}v.prototype.setExtremes.call(this,c,a,e,
b,h)},g.setAxisTranslation=function(c){v.prototype.setAxisTranslation.call(this,c);this.unitLength=null;if(this.isBroken){c=g.options.breaks;var a=[],e=[],b=0,h,w=g.userMin||g.min,r=g.userMax||g.max,f=E(g.pointRangePadding,0),k;c.forEach(function(b){h=b.repeat||Infinity;g.isInBreak(b,w)&&(w+=b.to%h-w%h);g.isInBreak(b,r)&&(r-=r%h-b.from%h)});c.forEach(function(b){x=b.from;for(h=b.repeat||Infinity;x-h>w;)x-=h;for(;x<w;)x+=h;for(k=x;k<r;k+=h)a.push({value:k,move:"in"}),a.push({value:k+(b.to-b.from),
move:"out",size:b.breakSize})});a.sort(function(b,f){return b.value===f.value?("in"===b.move?0:1)-("in"===f.move?0:1):b.value-f.value});var p=0;var x=w;a.forEach(function(f){p+="in"===f.move?1:-1;1===p&&"in"===f.move&&(x=f.value);0===p&&(e.push({from:x,to:f.value,len:f.value-x-(f.size||0)}),b+=f.value-x-(f.size||0))});g.breakArray=e;g.unitLength=r-w-b+f;F(g,"afterBreaks");g.staticScale?g.transA=g.staticScale:g.unitLength&&(g.transA*=(r-g.min+f)/g.unitLength);f&&(g.minPixelPadding=g.transA*g.minPointOffset);
g.min=w;g.max=r}});E(d,!0)&&this.chart.redraw()};d(q,"afterGeneratePoints",function(){var a=this.xAxis,d=this.yAxis,m=this.points,q=m.length,g=this.options.connectNulls;if(a&&d&&(a.options.breaks||d.options.breaks))for(;q--;){var c=m[q];var t=null===c.y&&!1===g;t||!a.isInAnyBreak(c.x,!0)&&!d.isInAnyBreak(c.y,!0)||(m.splice(q,1),this.data[q]&&this.data[q].destroyElements())}});d(q,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,E(this.pointArrayMap,["y"]))});a.Series.prototype.drawBreaks=
function(a,d){var n=this,D=n.points,g,c,t,u;a&&d.forEach(function(e){g=a.breakArray||[];c=a.isXAxis?a.min:E(n.options.threshold,a.min);D.forEach(function(b){u=E(b["stack"+e.toUpperCase()],b[e]);g.forEach(function(e){t=!1;if(c<e.from&&u>e.to||c>e.from&&u<e.from)t="pointBreak";else if(c<e.from&&u>e.from&&u<e.to||c>e.from&&u>e.to&&u<e.from)t="pointInBreak";t&&F(a,t,{point:b,brk:e})})})})};a.Series.prototype.gappedPath=function(){var d=this.currentDataGrouping,n=d&&d.gapSize;d=this.options.gapSize;var m=
this.points.slice(),q=m.length-1,g=this.yAxis;if(d&&0<q)for("value"!==this.options.gapUnit&&(d*=this.basePointRange),n&&n>d&&n>=this.basePointRange&&(d=n);q--;)m[q+1].x-m[q].x>d&&(n=(m[q].x+m[q+1].x)/2,m.splice(q+1,0,{isNull:!0,x:n}),this.options.stacking&&(n=g.stacks[this.stackKey][n]=new a.StackItem(g,g.options.stackLabels,!1,n,this.stack),n.total=0));return this.getGraphPath(m)}});I(l,"parts-gantt/TreeGrid.js",[l["parts/Globals.js"],l["parts/Utilities.js"],l["parts-gantt/Tree.js"],l["mixins/tree-series.js"]],
function(a,d,l,y){var G=d.defined,C=d.extend,F=d.isNumber,v=d.isString,q=d.pick,m=a.addEvent,D=function(b){return Array.prototype.slice.call(b,1)},n=a.find,B=a.fireEvent,H=y.getLevelOptions,g=a.merge,c=function(b){return d.isObject(b,!0)},t=a.wrap;y=a.Axis;var u=a.Tick,e=function(b,f){var c;for(c in f)if(Object.hasOwnProperty.call(f,c)){var e=f[c];t(b,c,e)}},b=function(b,f){var c=b.collapseStart;b=b.collapseEnd;b>=f&&(c-=.5);return{from:c,to:b,showPoints:!1}},h=function(b){return Object.keys(b.mapOfPosToGridNode).reduce(function(f,
c){c=+c;b.min<=c&&b.max>=c&&!b.isInAnyBreak(c)&&f.push(c);return f},[])},w=function(f,c){var e=f.options.breaks||[],h=b(c,f.max);return e.some(function(b){return b.from===h.from&&b.to===h.to})},r=function(f,c){var e=f.options.breaks||[];f=b(c,f.max);e.push(f);return e},f=function(f,c){var e=f.options.breaks||[],h=b(c,f.max);return e.reduce(function(b,f){f.to===h.to&&f.from===h.from||b.push(f);return b},[])},k=function(b,f){var c=b.labelIcon,e=!c,h=f.renderer,k=f.xy,a=f.options,p=a.width,w=a.height,
r=k.x-p/2-a.padding;k=k.y-w/2;var g=f.collapsed?90:180,z=f.show&&F(k);e&&(b.labelIcon=c=h.path(h.symbols[a.type](a.x,a.y,p,w)).addClass("highcharts-label-icon").add(f.group));z||c.attr({y:-9999});h.styledMode||c.attr({"stroke-width":1,fill:q(f.color,"#666666")}).css({cursor:"pointer",stroke:a.lineColor,strokeWidth:a.lineWidth});c[e?"attr":"animate"]({translateX:r,translateY:k,rotation:g})},p=function(b,f,e){var h=[],k=[],a={},p={},w=-1,r="boolean"===typeof f?f:!1;b=l.getTree(b,{after:function(b){b=
p[b.pos];var f=0,c=0;b.children.forEach(function(b){c+=b.descendants+1;f=Math.max(b.height+1,f)});b.descendants=c;b.height=f;b.collapsed&&k.push(b)},before:function(b){var f=c(b.data)?b.data:{},e=v(f.name)?f.name:"",k=a[b.parent];k=c(k)?p[k.pos]:null;var g=function(b){return b.name===e},z;r&&c(k)&&(z=n(k.children,g))?(g=z.pos,z.nodes.push(b)):g=w++;p[g]||(p[g]=z={depth:k?k.depth+1:0,name:e,nodes:[b],children:[],pos:g},-1!==g&&h.push(e),c(k)&&k.children.push(z));v(b.id)&&(a[b.id]=b);!0===f.collapsed&&
(z.collapsed=!0);b.pos=g}});p=function(b,f){var e=function(b,h,k){var a=h+(-1===h?0:f-1),p=(a-h)/2,w=h+p;b.nodes.forEach(function(b){var f=b.data;c(f)&&(f.y=h+f.seriesIndex,delete f.seriesIndex);b.pos=w});k[w]=b;b.pos=w;b.tickmarkOffset=p+.5;b.collapseStart=a+.5;b.children.forEach(function(b){e(b,a+1,k);a=b.collapseEnd-.5});b.collapseEnd=a+.5;return k};return e(b["-1"],-1,{})}(p,e);return{categories:h,mapOfIdToNode:a,mapOfPosToGridNode:p,collapsedNodes:k,tree:b}},x=function(b){b.target.axes.filter(function(b){return"treegrid"===
b.options.type}).forEach(function(f){var e=f.options||{},h=e.labels,k,w=e.uniqueNames,z=0;if(!f.mapOfPosToGridNode||f.series.some(function(b){return!b.hasRendered||b.isDirtyData||b.isDirty})){e=f.series.reduce(function(b,f){f.visible&&(f.options.data.forEach(function(f){c(f)&&(f.seriesIndex=z,b.push(f))}),!0===w&&z++);return b},[]);var d=p(e,w,!0===w?z:1);f.categories=d.categories;f.mapOfPosToGridNode=d.mapOfPosToGridNode;f.hasNames=!0;f.tree=d.tree;f.series.forEach(function(b){var f=b.options.data.map(function(b){return c(b)?
g(b):b});b.visible&&b.setData(f,!1)});f.mapOptionsToLevel=H({defaults:h,from:1,levels:h.levels,to:f.tree.height});"beforeRender"===b.type&&(k=a.addEvent(f,"foundExtremes",function(){d.collapsedNodes.forEach(function(b){b=r(f,b);f.setBreaks(b,!1)});k()}))}})};e(y.prototype,{init:function(b,f,c){var e="treegrid"===c.type;e&&(m(f,"beforeRender",x),m(f,"beforeRedraw",x),c=g({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,padding:5}},uniqueNames:!1},c,{reversed:!0,grid:{columns:void 0}}));b.apply(this,[f,c]);e&&(this.hasNames=!0,this.options.showLastLabel=!0)},getMaxLabelDimensions:function(b){var f=this.options,c=f&&f.labels;f=c&&F(c.indentation)?f.labels.indentation:0;c=b.apply(this,D(arguments));if("treegrid"===this.options.type&&this.mapOfPosToGridNode){var e=this.mapOfPosToGridNode[-1].height;c.width+=f*(e-1)}return c},generateTick:function(b,f){var e=c(this.mapOptionsToLevel)?this.mapOptionsToLevel:
{},h=this.ticks,k=h[f],a;if("treegrid"===this.options.type){var p=this.mapOfPosToGridNode[f];(e=e[p.depth])&&(a={labels:e});k?(k.parameters.category=p.name,k.options=a,k.addLabel()):h[f]=new u(this,f,null,void 0,{category:p.name,tickmarkOffset:p.tickmarkOffset,options:a})}else b.apply(this,D(arguments))},setTickInterval:function(b){var f=this.options;"treegrid"===f.type?(this.min=q(this.userMin,f.min,this.dataMin),this.max=q(this.userMax,f.max,this.dataMax),B(this,"foundExtremes"),this.setAxisTranslation(!0),
this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=this.mapOfPosToGridNode?h(this):[]):b.apply(this,D(arguments))}});e(u.prototype,{getLabelPosition:function(b,f,e,h,k,a,p,w,r){var g=q(this.options&&this.options.labels,a);a=this.pos;var d=this.axis,x="treegrid"===d.options.type;b=b.apply(this,[f,e,h,k,g,p,w,r]);x&&(f=g&&c(g.symbol)?g.symbol:{},g=g&&F(g.indentation)?g.indentation:0,a=(a=(d=d.mapOfPosToGridNode)&&d[a])&&a.depth||1,b.x+=f.width+2*f.padding+(a-1)*g);return b},renderLabel:function(b){var f=
this,e=f.pos,h=f.axis,p=f.label,g=h.mapOfPosToGridNode,r=h.options,d=q(f.options&&f.options.labels,r&&r.labels),x=d&&c(d.symbol)?d.symbol:{},t=(g=g&&g[e])&&g.depth;r="treegrid"===r.type;var A=!(!p||!p.element),u=-1<h.tickPositions.indexOf(e);e=h.chart.styledMode;r&&g&&A&&p.addClass("highcharts-treegrid-node-level-"+t);b.apply(f,D(arguments));r&&g&&A&&0<g.descendants&&(h=w(h,g),k(f,{color:!e&&p.styles.color,collapsed:h,group:p.parentGroup,options:x,renderer:p.renderer,show:u,xy:p.xy}),x="highcharts-treegrid-node-"+
(h?"expanded":"collapsed"),p.addClass("highcharts-treegrid-node-"+(h?"collapsed":"expanded")).removeClass(x),e||p.css({cursor:"pointer"}),[p,f.labelIcon].forEach(function(b){b.attachedTreeGridEvents||(a.addEvent(b.element,"mouseover",function(){p.addClass("highcharts-treegrid-node-active");p.renderer.styledMode||p.css({textDecoration:"underline"})}),a.addEvent(b.element,"mouseout",function(){var b=G(d.style)?d.style:{};p.removeClass("highcharts-treegrid-node-active");p.renderer.styledMode||p.css({textDecoration:b.textDecoration})}),
a.addEvent(b.element,"click",function(){f.toggleCollapse()}),b.attachedTreeGridEvents=!0)}))}});C(u.prototype,{collapse:function(b){var f=this.axis,e=r(f,f.mapOfPosToGridNode[this.pos]);f.setBreaks(e,q(b,!0))},expand:function(b){var e=this.axis,c=f(e,e.mapOfPosToGridNode[this.pos]);e.setBreaks(c,q(b,!0))},toggleCollapse:function(b){var e=this.axis;var c=e.mapOfPosToGridNode[this.pos];c=w(e,c)?f(e,c):r(e,c);e.setBreaks(c,q(b,!0))}});y.prototype.utils={getNode:l.getNode}});I(l,"parts-gantt/PathfinderAlgorithms.js",
[l["parts/Utilities.js"]],function(a){function d(a,d,m){m=m||0;var n=a.length-1;d-=1e-7;for(var g,c;m<=n;)if(g=n+m>>1,c=d-a[g].xMin,0<c)m=g+1;else if(0>c)n=g-1;else return g;return 0<m?m-1:0}function l(a,n){for(var m=d(a,n.x+1)+1;m--;){var q;if(q=a[m].xMax>=n.x)q=a[m],q=n.x<=q.xMax&&n.x>=q.xMin&&n.y<=q.yMax&&n.y>=q.yMin;if(q)return m}return-1}function y(a){var d=[];if(a.length){d.push("M",a[0].start.x,a[0].start.y);for(var m=0;m<a.length;++m)d.push("L",a[m].end.x,a[m].end.y)}return d}function E(a,
d){a.yMin=q(a.yMin,d.yMin);a.yMax=v(a.yMax,d.yMax);a.xMin=q(a.xMin,d.xMin);a.xMax=v(a.xMax,d.xMax)}var C=a.extend,F=a.pick,v=Math.min,q=Math.max,m=Math.abs;return{straight:function(a,d){return{path:["M",a.x,a.y,"L",d.x,d.y],obstacles:[{start:a,end:d}]}},simpleConnect:C(function(a,d,q){function n(b,e,f,c,a){b={x:b.x,y:b.y};b[e]=f[c||e]+(a||0);return b}function g(b,e,f){var c=m(e[f]-b[f+"Min"])>m(e[f]-b[f+"Max"]);return n(e,f,b,f+(c?"Max":"Min"),c?1:-1)}var c=[],t=F(q.startDirectionX,m(d.x-a.x)>m(d.y-
a.y))?"x":"y",u=q.chartObstacles,e=l(u,a);q=l(u,d);if(-1<q){var b=u[q];q=g(b,d,t);b={start:q,end:d};var h=q}else h=d;-1<e&&(u=u[e],q=g(u,a,t),c.push({start:a,end:q}),q[t]>=a[t]===q[t]>=h[t]&&(t="y"===t?"x":"y",d=a[t]<d[t],c.push({start:q,end:n(q,t,u,t+(d?"Max":"Min"),d?1:-1)}),t="y"===t?"x":"y"));a=c.length?c[c.length-1].end:a;q=n(a,t,h);c.push({start:a,end:q});t=n(q,"y"===t?"x":"y",h);c.push({start:q,end:t});c.push(b);return{path:y(c),obstacles:c}},{requiresObstacles:!0}),fastAvoid:C(function(a,
n,B){function D(b,f,e){var c,a=b.x<f.x?1:-1;if(b.x<f.x){var h=b;var k=f}else h=f,k=b;if(b.y<f.y){var p=b;var g=f}else p=f,g=b;for(c=0>a?v(d(x,k.x),x.length-1):0;x[c]&&(0<a&&x[c].xMin<=k.x||0>a&&x[c].xMax>=h.x);){if(x[c].xMin<=k.x&&x[c].xMax>=h.x&&x[c].yMin<=g.y&&x[c].yMax>=p.y)return e?{y:b.y,x:b.x<f.x?x[c].xMin-1:x[c].xMax+1,obstacle:x[c]}:{x:b.x,y:b.y<f.y?x[c].yMin-1:x[c].yMax+1,obstacle:x[c]};c+=a}return f}function g(b,f,c,e,a){var h=a.soft,k=a.hard,p=e?"x":"y",g={x:f.x,y:f.y},d={x:f.x,y:f.y};
a=b[p+"Max"]>=h[p+"Max"];h=b[p+"Min"]<=h[p+"Min"];var w=b[p+"Max"]>=k[p+"Max"];k=b[p+"Min"]<=k[p+"Min"];var r=m(b[p+"Min"]-f[p]),x=m(b[p+"Max"]-f[p]);c=10>m(r-x)?f[p]<c[p]:x<r;d[p]=b[p+"Min"];g[p]=b[p+"Max"];b=D(f,d,e)[p]!==d[p];f=D(f,g,e)[p]!==g[p];c=b?f?c:!0:f?!1:c;c=h?a?c:!0:a?!1:c;return k?w?c:!0:w?!1:c}function c(b,e,a){if(b.x===e.x&&b.y===e.y)return[];var d=a?"x":"y",w=B.obstacleOptions.margin;var t={soft:{xMin:r,xMax:f,yMin:k,yMax:p},hard:B.hardBounds};var A=l(x,b);if(-1<A){A=x[A];t=g(A,b,
e,a,t);E(A,B.hardBounds);var z=a?{y:b.y,x:A[t?"xMax":"xMin"]+(t?1:-1)}:{x:b.x,y:A[t?"yMax":"yMin"]+(t?1:-1)};var u=l(x,z);-1<u&&(u=x[u],E(u,B.hardBounds),z[d]=t?q(A[d+"Max"]-w+1,(u[d+"Min"]+A[d+"Max"])/2):v(A[d+"Min"]+w-1,(u[d+"Max"]+A[d+"Min"])/2),b.x===z.x&&b.y===z.y?(h&&(z[d]=t?q(A[d+"Max"],u[d+"Max"])+1:v(A[d+"Min"],u[d+"Min"])-1),h=!h):h=!1);b=[{start:b,end:z}]}else d=D(b,{x:a?e.x:b.x,y:a?b.y:e.y},a),b=[{start:b,end:{x:d.x,y:d.y}}],d[a?"x":"y"]!==e[a?"x":"y"]&&(t=g(d.obstacle,d,e,!a,t),E(d.obstacle,
B.hardBounds),t={x:a?d.x:d.obstacle[t?"xMax":"xMin"]+(t?1:-1),y:a?d.obstacle[t?"yMax":"yMin"]+(t?1:-1):d.y},a=!a,b=b.concat(c({x:d.x,y:d.y},t,a)));return b=b.concat(c(b[b.length-1].end,e,!a))}function t(b,f,c){var e=v(b.xMax-f.x,f.x-b.xMin)<v(b.yMax-f.y,f.y-b.yMin);c=g(b,f,c,e,{soft:B.hardBounds,hard:B.hardBounds});return e?{y:f.y,x:b[c?"xMax":"xMin"]+(c?1:-1)}:{x:f.x,y:b[c?"yMax":"yMin"]+(c?1:-1)}}var u=F(B.startDirectionX,m(n.x-a.x)>m(n.y-a.y)),e=u?"x":"y",b=[],h=!1,w=B.obstacleMetrics,r=v(a.x,
n.x)-w.maxWidth-10,f=q(a.x,n.x)+w.maxWidth+10,k=v(a.y,n.y)-w.maxHeight-10,p=q(a.y,n.y)+w.maxHeight+10,x=B.chartObstacles;var A=d(x,r);w=d(x,f);x=x.slice(A,w+1);if(-1<(w=l(x,n))){var z=t(x[w],n,a);b.push({end:n,start:z});n=z}for(;-1<(w=l(x,n));)A=0>n[e]-a[e],z={x:n.x,y:n.y},z[e]=x[w][A?e+"Max":e+"Min"]+(A?1:-1),b.push({end:n,start:z}),n=z;a=c(a,n,u);a=a.concat(b.reverse());return{path:y(a),obstacles:a}},{requiresObstacles:!0})}});I(l,"parts-gantt/ArrowSymbols.js",[l["parts/Globals.js"]],function(a){a.SVGRenderer.prototype.symbols.arrow=
function(a,l,y,E){return["M",a,l+E/2,"L",a+y,l,"L",a,l+E/2,"L",a+y,l+E]};a.SVGRenderer.prototype.symbols["arrow-half"]=function(d,l,y,E){return a.SVGRenderer.prototype.symbols.arrow(d,l,y/2,E)};a.SVGRenderer.prototype.symbols["triangle-left"]=function(a,l,y,E){return["M",a+y,l,"L",a,l+E/2,"L",a+y,l+E,"Z"]};a.SVGRenderer.prototype.symbols["arrow-filled"]=a.SVGRenderer.prototype.symbols["triangle-left"];a.SVGRenderer.prototype.symbols["triangle-left-half"]=function(d,l,y,E){return a.SVGRenderer.prototype.symbols["triangle-left"](d,
l,y/2,E)};a.SVGRenderer.prototype.symbols["arrow-filled-half"]=a.SVGRenderer.prototype.symbols["triangle-left-half"]});I(l,"parts-gantt/Pathfinder.js",[l["parts/Globals.js"],l["parts/Utilities.js"],l["parts-gantt/PathfinderAlgorithms.js"]],function(a,d,l){function y(c){var b=c.shapeArgs;return b?{xMin:b.x,xMax:b.x+b.width,yMin:b.y,yMax:b.y+b.height}:(b=c.graphic&&c.graphic.getBBox())?{xMin:c.plotX-b.width/2,xMax:c.plotX+b.width/2,yMin:c.plotY-b.height/2,yMax:c.plotY+b.height/2}:null}function G(c){for(var b=
c.length,e=0,a,d,f=[],k=function(b,f,c){c=n(c,10);var e=b.yMax+c>f.yMin-c&&b.yMin-c<f.yMax+c,a=b.xMax+c>f.xMin-c&&b.xMin-c<f.xMax+c,h=e?b.xMin>f.xMax?b.xMin-f.xMax:f.xMin-b.xMax:Infinity,p=a?b.yMin>f.yMax?b.yMin-f.yMax:f.yMin-b.yMax:Infinity;return a&&e?c?k(b,f,Math.floor(c/2)):Infinity:u(h,p)};e<b;++e)for(a=e+1;a<b;++a)d=k(c[e],c[a]),80>d&&f.push(d);f.push(80);return t(Math.floor(f.sort(function(b,f){return b-f})[Math.floor(f.length/10)]/2-1),1)}function C(c,b,a){this.init(c,b,a)}function F(c){this.init(c)}
function v(e){if(e.options.pathfinder||e.series.reduce(function(b,e){e.options&&c(!0,e.options.connectors=e.options.connectors||{},e.options.pathfinder);return b||e.options&&e.options.pathfinder},!1))c(!0,e.options.connectors=e.options.connectors||{},e.options.pathfinder),a.error('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}var q=d.defined,m=d.extend,D=d.objectEach,n=d.pick,B=d.splat,H=a.deg2rad,g=a.addEvent,c=a.merge,t=Math.max,u=Math.min;
m(a.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});C.prototype={init:function(c,b,a){this.fromPoint=c;this.toPoint=b;this.options=a;this.chart=c.series.chart;this.pathfinder=this.chart.pathfinder},renderPath:function(c,b,a){var e=this.chart,h=e.styledMode,f=e.pathfinder,k=!e.options.chart.forExport&&!1!==a,p=this.graphics&&this.graphics.path;
f.group||(f.group=e.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(e.seriesGroup));f.group.translate(e.plotLeft,e.plotTop);p&&p.renderer||(p=e.renderer.path().add(f.group),h||p.attr({opacity:0}));p.attr(b);c={d:c};h||(c.opacity=1);p[k?"animate":"attr"](c,a);this.graphics=this.graphics||{};this.graphics.path=p},addMarker:function(c,b,a){var e=this.fromPoint.series.chart,h=e.pathfinder;e=e.renderer;var f="start"===c?this.fromPoint:this.toPoint,k=f.getPathfinderAnchorPoint(b);
if(b.enabled){a="start"===c?{x:a[4],y:a[5]}:{x:a[a.length-5],y:a[a.length-4]};a=f.getRadiansToVector(a,k);k=f.getMarkerVector(a,b.radius,k);a=-a/H;if(b.width&&b.height){var p=b.width;var d=b.height}else p=d=2*b.radius;this.graphics=this.graphics||{};k={x:k.x-p/2,y:k.y-d/2,width:p,height:d,rotation:a,rotationOriginX:k.x,rotationOriginY:k.y};this.graphics[c]?this.graphics[c].animate(k):(this.graphics[c]=e.symbol(b.symbol).addClass("highcharts-point-connecting-path-"+c+"-marker").attr(k).add(h.group),
e.styledMode||this.graphics[c].attr({fill:b.color||this.fromPoint.color,stroke:b.lineColor,"stroke-width":b.lineWidth,opacity:0}).animate({opacity:1},f.series.options.animation))}},getPath:function(e){var b=this.pathfinder,h=this.chart,d=b.algorithms[e.type],g=b.chartObstacles;if("function"!==typeof d)a.error('"'+e.type+'" is not a Pathfinder algorithm.');else return d.requiresObstacles&&!g&&(g=b.chartObstacles=b.getChartObstacles(e),h.options.connectors.algorithmMargin=e.algorithmMargin,b.chartObstacleMetrics=
b.getObstacleMetrics(g)),d(this.fromPoint.getPathfinderAnchorPoint(e.startMarker),this.toPoint.getPathfinderAnchorPoint(e.endMarker),c({chartObstacles:g,lineObstacles:b.lineObstacles||[],obstacleMetrics:b.chartObstacleMetrics,hardBounds:{xMin:0,xMax:h.plotWidth,yMin:0,yMax:h.plotHeight},obstacleOptions:{margin:e.algorithmMargin},startDirectionX:b.getAlgorithmStartDirection(e.startMarker)},e))},render:function(){var e=this.fromPoint,b=e.series,a=b.chart,d=a.pathfinder,g=c(a.options.connectors,b.options.connectors,
e.options.connectors,this.options),f={};a.styledMode||(f.stroke=g.lineColor||e.color,f["stroke-width"]=g.lineWidth,g.dashStyle&&(f.dashstyle=g.dashStyle));f["class"]="highcharts-point-connecting-path highcharts-color-"+e.colorIndex;g=c(f,g);q(g.marker.radius)||(g.marker.radius=u(t(Math.ceil((g.algorithmMargin||8)/2)-1,1),5));e=this.getPath(g);a=e.path;e.obstacles&&(d.lineObstacles=d.lineObstacles||[],d.lineObstacles=d.lineObstacles.concat(e.obstacles));this.renderPath(a,f,b.options.animation);this.addMarker("start",
c(g.marker,g.startMarker),a);this.addMarker("end",c(g.marker,g.endMarker),a)},destroy:function(){this.graphics&&(D(this.graphics,function(c){c.destroy()}),delete this.graphics)}};F.prototype={algorithms:l,init:function(c){this.chart=c;this.connections=[];g(c,"redraw",function(){this.pathfinder.update()})},update:function(c){var b=this.chart,e=this,d=e.connections;e.connections=[];b.series.forEach(function(f){f.visible&&!f.options.isInternal&&f.points.forEach(function(f){var c,k=f.options&&f.options.connect&&
B(f.options.connect);f.visible&&!1!==f.isInside&&k&&k.forEach(function(k){c=b.get("string"===typeof k?k:k.to);c instanceof a.Point&&c.series.visible&&c.visible&&!1!==c.isInside&&e.connections.push(new C(f,c,"string"===typeof k?{}:k))})})});for(var g=0,f,k,p=d.length,t=e.connections.length;g<p;++g){k=!1;for(f=0;f<t;++f)if(d[g].fromPoint===e.connections[f].fromPoint&&d[g].toPoint===e.connections[f].toPoint){e.connections[f].graphics=d[g].graphics;k=!0;break}k||d[g].destroy()}delete this.chartObstacles;
delete this.lineObstacles;e.renderConnections(c)},renderConnections:function(c){c?this.chart.series.forEach(function(b){var c=function(){var c=b.chart.pathfinder;(c&&c.connections||[]).forEach(function(c){c.fromPoint&&c.fromPoint.series===b&&c.render()});b.pathfinderRemoveRenderEvent&&(b.pathfinderRemoveRenderEvent(),delete b.pathfinderRemoveRenderEvent)};!1===b.options.animation?c():b.pathfinderRemoveRenderEvent=g(b,"afterAnimate",c)}):this.connections.forEach(function(b){b.render()})},getChartObstacles:function(c){for(var b=
[],a=this.chart.series,e=n(c.algorithmMargin,0),d,f=0,k=a.length;f<k;++f)if(a[f].visible&&!a[f].options.isInternal)for(var p=0,g=a[f].points.length,t;p<g;++p)t=a[f].points[p],t.visible&&(t=y(t))&&b.push({xMin:t.xMin-e,xMax:t.xMax+e,yMin:t.yMin-e,yMax:t.yMax+e});b=b.sort(function(b,f){return b.xMin-f.xMin});q(c.algorithmMargin)||(d=c.algorithmMargin=G(b),b.forEach(function(b){b.xMin-=d;b.xMax+=d;b.yMin-=d;b.yMax+=d}));return b},getObstacleMetrics:function(c){for(var b=0,a=0,e,d,f=c.length;f--;)e=c[f].xMax-
c[f].xMin,d=c[f].yMax-c[f].yMin,b<e&&(b=e),a<d&&(a=d);return{maxHeight:a,maxWidth:b}},getAlgorithmStartDirection:function(c){var b="top"!==c.verticalAlign&&"bottom"!==c.verticalAlign;return"left"!==c.align&&"right"!==c.align?b?void 0:!1:b?!0:void 0}};a.Connection=C;a.Pathfinder=F;m(a.Point.prototype,{getPathfinderAnchorPoint:function(c){var b=y(this);switch(c.align){case "right":var a="xMax";break;case "left":a="xMin"}switch(c.verticalAlign){case "top":var e="yMin";break;case "bottom":e="yMax"}return{x:a?
b[a]:(b.xMin+b.xMax)/2,y:e?b[e]:(b.yMin+b.yMax)/2}},getRadiansToVector:function(c,b){q(b)||(b=y(this),b={x:(b.xMin+b.xMax)/2,y:(b.yMin+b.yMax)/2});return Math.atan2(b.y-c.y,c.x-b.x)},getMarkerVector:function(c,b,a){var e=2*Math.PI,d=y(this),f=d.xMax-d.xMin,k=d.yMax-d.yMin,h=Math.atan2(k,f),g=!1;f/=2;var t=k/2,u=d.xMin+f;d=d.yMin+t;for(var q=u,m=d,n={},l=1,v=1;c<-Math.PI;)c+=e;for(;c>Math.PI;)c-=e;e=Math.tan(c);c>-h&&c<=h?(v=-1,g=!0):c>h&&c<=Math.PI-h?v=-1:c>Math.PI-h||c<=-(Math.PI-h)?(l=-1,g=!0):
l=-1;g?(q+=l*f,m+=v*f*e):(q+=k/(2*e)*l,m+=v*t);a.x!==u&&(q=a.x);a.y!==d&&(m=a.y);n.x=q+b*Math.cos(c);n.y=m-b*Math.sin(c);return n}});a.Chart.prototype.callbacks.push(function(c){!1!==c.options.connectors.enabled&&(v(c),this.pathfinder=new F(this),this.pathfinder.update(!0))})});I(l,"modules/xrange.src.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){var l=d.defined,y=d.isNumber,E=d.isObject,C=d.pick;d=a.addEvent;var F=a.color,v=a.seriesTypes.column,q=a.correctFloat,m=a.merge,D=a.seriesType,
n=a.Axis,B=a.Point,H=a.Series;D("xrange","column",{colorByPoint:!0,dataLabels:{formatter:function(){var a=this.point.partialFill;E(a)&&(a=a.amount);if(y(a)&&0<a)return q(100*a)+"%"},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:'<span style="font-size: 10px">{point.x} - {point.x2}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.yCategory}</b><br/>'},borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,
animate:a.seriesTypes.line.prototype.animate,cropShoulder:1,getExtremesFromAll:!0,autoIncrement:a.noop,buildKDTree:a.noop,getColumnMetrics:function(){function a(){c.series.forEach(function(c){var a=c.xAxis;c.xAxis=c.yAxis;c.yAxis=a})}var c=this.chart;a();var d=v.prototype.getColumnMetrics.call(this);a();return d},cropData:function(a,c,d,u){c=H.prototype.cropData.call(this,this.x2Data,c,d,u);c.xData=a.slice(c.start,c.end);return c},findPointIndex:function(d){var c=this.data,g=this.points,u=d.id,e;
if(u)var b=(e=a.find(c,function(b){return b.id===u}))?e.index:void 0;void 0===b&&(b=(e=a.find(c,function(c){return c.x===d.x&&c.x2===d.x2&&!(g[b]&&g[b].touched)}))?e.index:void 0);this.cropped&&b>=this.cropStart&&(b-=this.cropStart);return b},translatePoint:function(a){var c=this.xAxis,d=this.yAxis,g=this.columnMetrics,e=this.options,b=e.minPointLength||0,h=a.plotX,w=C(a.x2,a.x+(a.len||0)),r=c.translate(w,0,0,0,1);w=Math.abs(r-h);var f=this.chart.inverted,k=C(e.borderWidth,1)%2/2,p=g.offset,x=Math.round(g.width);
b&&(b-=w,0>b&&(b=0),h-=b/2,r+=b/2);h=Math.max(h,-10);r=Math.min(Math.max(r,-10),c.len+10);l(a.options.pointWidth)&&(p-=(Math.ceil(a.options.pointWidth)-x)/2,x=Math.ceil(a.options.pointWidth));e.pointPlacement&&y(a.plotY)&&d.categories&&(a.plotY=d.translate(a.y,0,1,0,1,e.pointPlacement));a.shapeArgs={x:Math.floor(Math.min(h,r))+k,y:Math.floor(a.plotY+p)+k,width:Math.round(Math.abs(r-h)),height:x,r:this.options.borderRadius};e=a.shapeArgs.x;b=e+a.shapeArgs.width;0>e||b>c.len?(e=Math.min(c.len,Math.max(0,
e)),b=Math.max(0,Math.min(b,c.len)),r=b-e,a.dlBox=m(a.shapeArgs,{x:e,width:b-e,centerX:r?r/2:null})):a.dlBox=null;f?(a.tooltipPos[1]+=w/2*(c.reversed?1:-1),a.tooltipPos[0]+=g.width/2,a.tooltipPos[1]=Math.max(Math.min(a.tooltipPos[1],c.len-1),0),a.tooltipPos[0]=Math.max(Math.min(a.tooltipPos[0],d.len-1),0)):(a.tooltipPos[0]+=w/2*(c.reversed?-1:1),a.tooltipPos[1]-=g.width/2,a.tooltipPos[0]=Math.max(Math.min(a.tooltipPos[0],c.len-1),0),a.tooltipPos[1]=Math.max(Math.min(a.tooltipPos[1],d.len-1),0));if(g=
a.partialFill)E(g)&&(g=g.amount),y(g)||(g=0),d=a.shapeArgs,a.partShapeArgs={x:d.x,y:d.y,width:d.width,height:d.height,r:this.options.borderRadius},h=Math.max(Math.round(w*g+a.plotX-h),0),a.clipRectArgs={x:c.reversed?d.x+w-h:d.x,y:d.y,width:h,height:d.height}},translate:function(){v.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},this)},drawPoint:function(a,c){var d=this.options,g=this.chart.renderer,e=a.graphic,b=a.shapeType,h=a.shapeArgs,w=a.partShapeArgs,
r=a.clipRectArgs,f=a.partialFill,k=d.stacking&&!d.borderRadius,p=a.state,x=d.states[p||"normal"]||{},A=void 0===p?"attr":c;p=this.pointAttribs(a,p);x=C(this.chart.options.chart.animation,x.animation);if(a.isNull)e&&(a.graphic=e.destroy());else{if(e)e.rect[c](h);else a.graphic=e=g.g("point").addClass(a.getClassName()).add(a.group||this.group),e.rect=g[b](m(h)).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(e);w&&(e.partRect?(e.partRect[c](m(w)),e.partialClipRect[c](m(r))):
(e.partialClipRect=g.clipRect(r.x,r.y,r.width,r.height),e.partRect=g[b](w).addClass("highcharts-partfill-overlay").add(e).clip(e.partialClipRect)));this.chart.styledMode||(e.rect[c](p,x).shadow(d.shadow,null,k),w&&(E(f)||(f={}),E(d.partialFill)&&(f=m(f,d.partialFill)),a=f.fill||F(p.fill).brighten(-.3).get()||F(a.color||this.color).brighten(-.3).get(),p.fill=a,e.partRect[A](p,x).shadow(d.shadow,null,k)))}},drawPoints:function(){var a=this,c=a.getAnimationVerb();a.points.forEach(function(d){a.drawPoint(d,
c)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{resolveColor:function(){var a=this.series;if(a.options.colorByPoint&&!this.options.color){var c=a.options.colors||a.chart.options.colors;var d=this.y%(c?c.length:a.chart.options.chart.colorCount);c=c&&c[d];a.chart.styledMode||(this.color=c);this.options.colorIndex||(this.colorIndex=d)}else this.color||(this.color=a.color)},init:function(){B.prototype.init.apply(this,arguments);this.y||
(this.y=0);return this},setState:function(){B.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},getLabelConfig:function(){var a=B.prototype.getLabelConfig.call(this),c=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=c&&c[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});d(n,"afterGetSeriesExtremes",function(){var a=this.series,c;if(this.isXAxis){var d=
C(this.dataMax,-Number.MAX_VALUE);a.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>d&&(d=a,c=!0)})});c&&(this.dataMax=d)}});""});I(l,"parts-gantt/GanttSeries.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){var l=d.isNumber,y=d.pick,E=d.splat,C=a.dateFormat,F=a.merge;d=a.seriesType;var v=a.seriesTypes.xrange;d("gantt","xrange",{grouping:!1,dataLabels:{enabled:!0},tooltip:{headerFormat:'<span style="font-size: 10px">{series.name}</span><br/>',pointFormat:null,pointFormatter:function(){var a=
this.series,d=a.chart.tooltip,l=a.xAxis,n=a.tooltipOptions.dateTimeLabelFormats,v=l.options.startOfWeek,y=a.tooltipOptions,g=y.xDateFormat;a=this.options.milestone;var c="<b>"+(this.name||this.yCategory)+"</b>";if(y.pointFormat)return this.tooltipFormatter(y.pointFormat);g||(g=E(d.getDateFormat(l.closestPointRange,this.start,v,n))[0]);d=C(g,this.start);l=C(g,this.end);c+="<br/>";return a?c+(d+"<br/>"):c+("Start: "+d+"<br/>End: ")+(l+"<br/>")}},connectors:{type:"simpleConnect",animation:{reversed:!0},
startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}},{pointArrayMap:["start","end","y"],keyboardMoveVertical:!1,translatePoint:function(a){v.prototype.translatePoint.call(this,a);if(a.options.milestone){var d=a.shapeArgs;var q=d.height;a.shapeArgs={x:d.x-q/2,y:d.y,width:q,height:q}}},drawPoint:function(a,d){var m=this.options,q=this.chart.renderer,y=a.shapeArgs,C=a.plotY,g=a.graphic,c=a.selected&&"select",t=m.stacking&&!m.borderRadius;
if(a.options.milestone)if(l(C)&&null!==a.y){y=q.symbols.diamond(y.x,y.y,y.width,y.height);if(g)g[d]({d:y});else a.graphic=q.path(y).addClass(a.getClassName(),!0).add(a.group||this.group);this.chart.styledMode||a.graphic.attr(this.pointAttribs(a,c)).shadow(m.shadow,null,t)}else g&&(a.graphic=g.destroy());else v.prototype.drawPoint.call(this,a,d)},setData:a.Series.prototype.setData,setGanttPointAliases:function(a){function d(d,m){void 0!==m&&(a[d]=m)}d("x",y(a.start,a.x));d("x2",y(a.end,a.x2));d("partialFill",
y(a.completed,a.partialFill));d("connect",y(a.dependency,a.connect))}},F(v.prototype.pointClass.prototype,{applyOptions:function(d,m){d=F(d);a.seriesTypes.gantt.prototype.setGanttPointAliases(d);return d=v.prototype.pointClass.prototype.applyOptions.call(this,d,m)},isValid:function(){return("number"===typeof this.start||"number"===typeof this.x)&&("number"===typeof this.end||"number"===typeof this.x2||this.milestone)}}));""});I(l,"parts-gantt/GanttChart.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],
function(a,d){var l=d.isArray,y=d.splat,E=a.merge,C=a.Chart;a.ganttChart=function(d,v,q){var m="string"===typeof d||d.nodeName,D=v.series,n=a.getOptions(),B,G=v;v=arguments[m?1:0];l(v.xAxis)||(v.xAxis=[v.xAxis||{},{}]);v.xAxis=v.xAxis.map(function(a,c){1===c&&(B=0);return E(n.xAxis,{grid:{enabled:!0},opposite:!0,linkedTo:B},a,{type:"datetime"})});v.yAxis=y(v.yAxis||{}).map(function(a){return E(n.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:a.categories?a.type:"treegrid"},a)});v.series=
null;v=E(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1}},v,{isGantt:!0});v.series=G.series=D;v.series.forEach(function(d){d.data.forEach(function(c){a.seriesTypes.gantt.prototype.setGanttPointAliases(c)})});return m?new C(d,v,q):new C(v,v)}});I(l,"parts/Scrollbar.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){function l(a,d,g){this.init(a,d,g)}var y=d.defined,E=d.destroyObjectProperties,C=d.pick,F=a.addEvent;d=a.Axis;var v=a.correctFloat,q=a.defaultOptions,m=a.fireEvent,
D=a.hasTouch,n=a.merge,B=a.removeEvent,H,g={height:a.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};q.scrollbar=n(!0,g,q.scrollbar);a.swapXY=H=function(a,d){var c=
a.length;if(d)for(d=0;d<c;d+=3){var e=a[d+1];a[d+1]=a[d+2];a[d+2]=e}return a};l.prototype={init:function(a,d,u){this.scrollbarButtons=[];this.renderer=a;this.userOptions=d;this.options=n(g,d);this.chart=u;this.size=C(this.options.size,this.options.height);d.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,d=this.options,g=this.size,e=this.chart.styledMode,b;this.group=b=a.g("scrollbar").attr({zIndex:d.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,
r:d.trackBorderRadius||0,height:g,width:g}).add(b);e||this.track.attr({fill:d.trackBackgroundColor,stroke:d.trackBorderColor,"stroke-width":d.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(b);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:g,width:g,r:d.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(H(["M",-3,g/4,"L",-3,2*g/3,"M",0,g/4,"L",0,2*g/3,
"M",3,g/4,"L",3,2*g/3],d.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);e||(this.scrollbar.attr({fill:d.barBackgroundColor,stroke:d.barBorderColor,"stroke-width":d.barBorderWidth}),this.scrollbarRifles.attr({stroke:d.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,
d,g,e){var b=this.options.vertical,c=0,w=this.rendered?"animate":"attr";this.x=a;this.y=d+this.trackBorderWidth;this.width=g;this.xOffset=this.height=e;this.yOffset=c;b?(this.width=this.yOffset=g=c=this.size,this.xOffset=d=0,this.barWidth=e-2*g,this.x=a+=this.options.margin):(this.height=this.xOffset=e=d=this.size,this.barWidth=g-2*e,this.y+=this.options.margin);this.group[w]({translateX:a,translateY:this.y});this.track[w]({width:g,height:e});this.scrollbarButtons[1][w]({translateX:b?0:g-d,translateY:b?
e-c:0})},drawScrollbarButton:function(a){var c=this.renderer,d=this.scrollbarButtons,e=this.options,b=this.size;var h=c.g().add(this.group);d.push(h);h=c.rect().addClass("highcharts-scrollbar-button").add(h);this.chart.styledMode||h.attr({stroke:e.buttonBorderColor,"stroke-width":e.buttonBorderWidth,fill:e.buttonBackgroundColor});h.attr(h.crisp({x:-.5,y:-.5,width:b+1,height:b+1,r:e.buttonBorderRadius},h.strokeWidth()));h=c.path(H(["M",b/2+(a?-1:1),b/2-3,"L",b/2+(a?-1:1),b/2+3,"L",b/2+(a?2:-2),b/2],
e.vertical)).addClass("highcharts-scrollbar-arrow").add(d[a]);this.chart.styledMode||h.attr({fill:e.buttonArrowColor})},setRange:function(a,d){var c=this.options,e=c.vertical,b=c.minWidth,h=this.barWidth,g,r=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(y(h)){a=Math.max(a,0);var f=Math.ceil(h*a);this.calculatedWidth=g=v(h*Math.min(d,1)-f);g<b&&(f=(h-b+g)*a,g=b);b=Math.floor(f+this.xOffset+this.yOffset);h=g/2-.5;this.from=a;this.to=d;e?(this.scrollbarGroup[r]({translateY:b}),
this.scrollbar[r]({height:g}),this.scrollbarRifles[r]({translateY:h}),this.scrollbarTop=b,this.scrollbarLeft=0):(this.scrollbarGroup[r]({translateX:b}),this.scrollbar[r]({width:g}),this.scrollbarRifles[r]({translateX:h}),this.scrollbarLeft=b,this.scrollbarTop=0);12>=g?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===c.showFull&&(0>=a&&1<=d?this.group.hide():this.group.show());this.rendered=!0}},initEvents:function(){var a=this;a.mouseMoveHandler=function(c){var d=a.chart.pointer.normalize(c),
e=a.options.vertical?"chartY":"chartX",b=a.initPositions;!a.grabbedCenter||c.touches&&0===c.touches[0][e]||(d=a.cursorToScrollbarPosition(d)[e],e=a[e],e=d-e,a.hasDragged=!0,a.updatePosition(b[0]+e,b[1]+e),a.hasDragged&&m(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:c.type,DOMEvent:c}))};a.mouseUpHandler=function(c){a.hasDragged&&m(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:c.type,DOMEvent:c});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=
function(c){c=a.chart.pointer.normalize(c);c=a.cursorToScrollbarPosition(c);a.chartX=c.chartX;a.chartY=c.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(c){var d=v(a.to-a.from)*a.options.step;a.updatePosition(v(a.from-d),v(a.to-d));m(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:c})};a.buttonToMaxClick=function(c){var d=(a.to-a.from)*a.options.step;a.updatePosition(a.from+d,a.to+d);m(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:c})};
a.trackClick=function(c){var d=a.chart.pointer.normalize(c),e=a.to-a.from,b=a.y+a.scrollbarTop,h=a.x+a.scrollbarLeft;a.options.vertical&&d.chartY>b||!a.options.vertical&&d.chartX>h?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);m(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:c})}},cursorToScrollbarPosition:function(a){var c=this.options;c=c.minWidth>this.calculatedWidth?c.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-c),chartY:(a.chartY-
this.y-this.yOffset)/(this.barWidth-c)}},updatePosition:function(a,d){1<d&&(a=v(1-v(d-a)),d=1);0>a&&(d=v(d-a),a=0);this.from=a;this.to=d},update:function(a){this.destroy();this.init(this.chart.renderer,n(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],d=this.scrollbarButtons,g=this.scrollbarGroup.element,e=this.mouseDownHandler,b=this.mouseMoveHandler,h=this.mouseUpHandler;a=[[d[a[0]].element,"click",this.buttonToMinClick],[d[a[1]].element,"click",this.buttonToMaxClick],
[this.track.element,"click",this.trackClick],[g,"mousedown",e],[g.ownerDocument,"mousemove",b],[g.ownerDocument,"mouseup",h]];D&&a.push([g,"touchstart",e],[g.ownerDocument,"touchmove",b],[g.ownerDocument,"touchend",h]);a.forEach(function(a){F.apply(null,a)});this._events=a},removeEvents:function(){this._events.forEach(function(a){B.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(a){this[a]&&
this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,E(a.scrollbarButtons))}};a.Scrollbar||(F(d,"afterInit",function(){var c=this;c.options&&c.options.scrollbar&&c.options.scrollbar.enabled&&(c.options.scrollbar.vertical=!c.horiz,c.options.startOnTick=c.options.endOnTick=!1,c.scrollbar=new l(c.chart.renderer,c.options.scrollbar,c.chart),F(c.scrollbar,"changed",function(d){var g=Math.min(C(c.options.min,c.min),c.min,c.dataMin),e=Math.max(C(c.options.max,c.max),
c.max,c.dataMax)-g;if(c.horiz&&!c.reversed||!c.horiz&&c.reversed){var b=g+e*this.to;g+=e*this.from}else b=g+e*(1-this.from),g+=e*(1-this.to);C(this.options.liveRedraw,a.svg&&!a.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===d.DOMType||!y(d.DOMType)?c.setExtremes(g,b,!0,"mousemove"!==d.DOMType,d):this.setRange(this.from,this.to)}))}),F(d,"afterRender",function(){var a=Math.min(C(this.options.min,this.min),this.min,C(this.dataMin,this.min)),d=Math.max(C(this.options.max,this.max),this.max,C(this.dataMax,
this.max)),g=this.scrollbar,e=this.axisTitleMargin+(this.titleOffset||0),b=this.chart.scrollbarsOffsets,h=this.options.margin||0;g&&(this.horiz?(this.opposite||(b[1]+=e),g.position(this.left,this.top+this.height+2+b[1]-(this.opposite?h:0),this.width,this.height),this.opposite||(b[1]+=h),e=1):(this.opposite&&(b[0]+=e),g.position(this.left+this.width+2+b[0]-(this.opposite?0:h),this.top,this.width,this.height),this.opposite&&(b[0]+=h),e=0),b[e]+=g.size+g.options.margin,isNaN(a)||isNaN(d)||!y(this.min)||
!y(this.max)||this.min===this.max?g.setRange(0,1):(b=(this.min-a)/(d-a),a=(this.max-a)/(d-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?g.setRange(b,a):g.setRange(1-a,1-b)))}),F(d,"afterGetOffset",function(){var a=this.horiz?2:1,d=this.scrollbar;d&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[a]+=d.size+d.options.margin)}),a.Scrollbar=l)});I(l,"parts/RangeSelector.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){function l(a){this.init(a)}var y=d.defined,
E=d.destroyObjectProperties,C=d.discardElement,F=d.extend,v=d.isNumber,q=d.objectEach,m=d.pick,D=d.pInt,n=d.splat,B=a.addEvent,H=a.Axis;d=a.Chart;var g=a.css,c=a.createElement,t=a.defaultOptions,u=a.fireEvent,e=a.merge;F(t,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});t.lang=e(t.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",
rangeSelectorTo:"To"});l.prototype={clickButton:function(a,c){var b=this.chart,d=this.buttonOptions[a],f=b.xAxis[0],e=b.scroller&&b.scroller.getUnionExtremes()||f||{},h=e.dataMin,g=e.dataMax,A=f&&Math.round(Math.min(f.max,m(g,f.max))),z=d.type;e=d._range;var q,l=d.dataGrouping;if(null!==h&&null!==g){b.fixedRange=e;l&&(this.forcedDataGrouping=!0,H.prototype.setDataGrouping.call(f||{chart:this.chart},l,!1),this.frozenStates=d.preserveDataGrouping);if("month"===z||"year"===z)if(f){z={range:d,max:A,chart:b,
dataMin:h,dataMax:g};var t=f.minFromRange.call(z);v(z.newMax)&&(A=z.newMax)}else e=d;else if(e)t=Math.max(A-e,h),A=Math.min(t+e,g);else if("ytd"===z)if(f)void 0===g&&(h=Number.MAX_VALUE,g=Number.MIN_VALUE,b.series.forEach(function(a){a=a.xData;h=Math.min(a[0],h);g=Math.max(a[a.length-1],g)}),c=!1),A=this.getYTDExtremes(g,h,b.time.useUTC),t=q=A.min,A=A.max;else{this.deferredYTDClick=a;return}else"all"===z&&f&&(t=h,A=g);t+=d._offsetMin;A+=d._offsetMax;this.setSelected(a);if(f)f.setExtremes(t,A,m(c,
1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d});else{var u=n(b.options.xAxis)[0];var y=u.range;u.range=e;var U=u.min;u.min=q;B(b,"load",function(){u.range=y;u.min=U})}}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,c=a.options.rangeSelector,d=c.buttons||
[].concat(b.defaultButtons),f=c.selected,e=function(){var a=b.minInput,f=b.maxInput;a&&a.blur&&u(a,"blur");f&&f.blur&&u(f,"blur")};b.chart=a;b.options=c;b.buttons=[];b.buttonOptions=d;this.unMouseDown=B(a.container,"mousedown",e);this.unResize=B(a,"resize",e);d.forEach(b.computeButtonRange);void 0!==f&&d[f]&&this.clickButton(f,!1);B(a,"load",function(){a.xAxis&&a.xAxis[0]&&B(a.xAxis[0],"setExtremes",function(f){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==f.trigger&&"updatedData"!==f.trigger&&
b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this,c=this.chart,d=c.xAxis[0],e=Math.round(d.max-d.min),f=!d.hasVisibleSeries,k=c.scroller&&c.scroller.getUnionExtremes()||d,g=k.dataMin,x=k.dataMax;c=a.getYTDExtremes(x,g,c.time.useUTC);var A=c.min,z=c.max,m=a.selected,n=v(m),q=a.options.allButtonsEnabled,l=a.buttons;a.buttonOptions.forEach(function(b,c){var k=b._range,h=b.type,p=b.count||1,r=l[c],w=0,t=b._offsetMax-b._offsetMin;b=c===m;var v=
k>x-g,u=k<d.minRange,J=!1,Q=!1;k=k===e;("month"===h||"year"===h)&&e+36E5>=864E5*{month:28,year:365}[h]*p-t&&e-36E5<=864E5*{month:31,year:366}[h]*p+t?k=!0:"ytd"===h?(k=z-A+t===e,J=!b):"all"===h&&(k=d.max-d.min>=x-g,Q=!b&&n&&k);h=!q&&(v||u||Q||f);p=b&&k||k&&!n&&!J||b&&a.frozenStates;h?w=3:p&&(n=!0,w=2);r.state!==w&&(r.setState(w),0===w&&m===c&&a.setSelected(null))})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=
d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=m(a.offsetMin,0);a._offsetMax=m(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,c){var b=this.chart.options.rangeSelector,d=this.chart.time,f=this[a+"Input"];y(c)&&(f.previousValue=f.HCTime,f.HCTime=c);f.value=d.dateFormat(b.inputEditDateFormat||"%Y-%m-%d",f.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(b.inputDateFormat||"%b %e, %Y",f.HCTime)})},showInput:function(a){var b=
this.inputGroup,c=this[a+"DateBox"];g(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){g(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(b){function d(){var a=z.value,b=(p.inputDateParser||Date.parse)(a),f=r.xAxis[0],c=r.scroller&&r.scroller.xAxis?r.scroller.xAxis:f,d=c.dataMin;c=c.dataMax;b!==z.previousValue&&(z.previousValue=b,v(b)||(b=a.split("-"),
b=Date.UTC(D(b[0]),D(b[1])-1,D(b[2]))),v(b)&&(r.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),A?b>w.maxInput.HCTime?b=void 0:b<d&&(b=d):b<w.minInput.HCTime?b=void 0:b>c&&(b=c),void 0!==b&&f.setExtremes(A?b:f.min,A?f.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var w=this,r=w.chart,f=r.renderer.style||{},k=r.renderer,p=r.options.rangeSelector,x=w.div,A="min"===b,z,m,n=this.inputGroup;this[b+"Label"]=m=k.label(t.lang[A?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(n);
n.offset+=m.width+5;this[b+"DateBox"]=k=k.label("",n.offset).addClass("highcharts-range-input").attr({padding:2,width:p.inputBoxWidth||90,height:p.inputBoxHeight||17,"text-align":"center"}).on("click",function(){w.showInput(b);w[b+"Input"].focus()});r.styledMode||k.attr({stroke:p.inputBoxBorderColor||"#cccccc","stroke-width":1});k.add(n);n.offset+=k.width+(A?10:0);this[b+"Input"]=z=c("input",{name:b,className:"highcharts-range-selector",type:"text"},{top:r.plotTop+"px"},x);r.styledMode||(m.css(e(f,
p.labelStyle)),k.css(e({color:"#333333"},f,p.inputStyle)),g(z,F({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:f.fontSize,fontFamily:f.fontFamily,top:"-9999em"},p.inputStyle)));z.onfocus=function(){w.showInput(b)};z.onblur=function(){z===a.doc.activeElement&&d();w.hideInput(b);z.blur()};z.onchange=d;z.onkeypress=function(a){13===a.keyCode&&d()}},getPosition:function(){var a=this.chart,c=a.options.rangeSelector;a="top"===c.verticalAlign?a.plotTop-a.axisOffset[0]:
0;return{buttonTop:a+c.buttonPosition.y,inputTop:a+c.inputPosition.y-10}},getYTDExtremes:function(a,c,d){var b=this.chart.time,f=new b.Date(a),e=b.get("FullYear",f);d=d?b.Date.UTC(e,0,1):+new b.Date(e,0,1);c=Math.max(c||0,d);f=f.getTime();return{max:Math.min(a||f,f),min:c}},render:function(a,d){var b=this,e=b.chart,f=e.renderer,k=e.container,g=e.options,h=g.exporting&&!1!==g.exporting.enabled&&g.navigation&&g.navigation.buttonOptions,A=t.lang,z=b.div,n=g.rangeSelector,q=m(g.chart.style&&g.chart.style.zIndex,
0)+1;g=n.floating;var l=b.buttons;z=b.inputGroup;var v=n.buttonTheme,u=n.buttonPosition,y=n.inputPosition,C=n.inputEnabled,B=v&&v.states,D=e.plotLeft,E=b.buttonGroup;var F=b.rendered;var G=b.options.verticalAlign,H=e.legend,I=H&&H.options,O=u.y,N=y.y,P=F||!1,S=P?"animate":"attr",M=0,K=0,L;if(!1!==n.enabled){F||(b.group=F=f.g("range-selector-group").attr({zIndex:7}).add(),b.buttonGroup=E=f.g("range-selector-buttons").add(F),b.zoomText=f.text(A.rangeSelectorZoom,0,15).add(E),e.styledMode||(b.zoomText.css(n.labelStyle),
v["stroke-width"]=m(v["stroke-width"],0)),b.buttonOptions.forEach(function(a,c){l[c]=f.button(a.text,0,0,function(f){var d=a.events&&a.events.click,e;d&&(e=d.call(a,f));!1!==e&&b.clickButton(c);b.isActive=!0},v,B&&B.hover,B&&B.select,B&&B.disabled).attr({"text-align":"center"}).add(E)}),!1!==C&&(b.div=z=c("div",null,{position:"relative",height:0,zIndex:q}),k.parentNode.insertBefore(z,k),b.inputGroup=z=f.g("input-group").add(F),z.offset=0,b.drawInput("min"),b.drawInput("max")));b.zoomText[S]({x:m(D+
u.x,D)});var T=m(D+u.x,D)+b.zoomText.getBBox().width+5;b.buttonOptions.forEach(function(a,b){l[b][S]({x:T});T+=l[b].width+m(n.buttonSpacing,5)});D=e.plotLeft-e.spacing[3];b.updateButtonStates();h&&this.titleCollision(e)&&"top"===G&&"right"===u.align&&u.y+E.getBBox().height-12<(h.y||0)+h.height&&(M=-40);"left"===u.align?L=u.x-e.spacing[3]:"right"===u.align&&(L=u.x+M-e.spacing[1]);E.align({y:u.y,width:E.getBBox().width,align:u.align,x:L},!0,e.spacingBox);b.group.placed=P;b.buttonGroup.placed=P;!1!==
C&&(M=h&&this.titleCollision(e)&&"top"===G&&"right"===y.align&&y.y-z.getBBox().height-12<(h.y||0)+h.height+e.spacing[0]?-40:0,"left"===y.align?L=D:"right"===y.align&&(L=-Math.max(e.axisOffset[1],-M)),z.align({y:y.y,width:z.getBBox().width,align:y.align,x:y.x+L-2},!0,e.spacingBox),k=z.alignAttr.translateX+z.alignOptions.x-M+z.getBBox().x+2,h=z.alignOptions.width,A=E.alignAttr.translateX+E.getBBox().x,L=E.getBBox().width+20,(y.align===u.align||A+L>k&&k+h>A&&O<N+z.getBBox().height)&&z.attr({translateX:z.alignAttr.translateX+
(e.axisOffset[1]>=-M?0:-M),translateY:z.alignAttr.translateY+E.getBBox().height+10}),b.setInputValue("min",a),b.setInputValue("max",d),b.inputGroup.placed=P);b.group.align({verticalAlign:G},!0,e.spacingBox);a=b.group.getBBox().height+20;d=b.group.alignAttr.translateY;"bottom"===G&&(H=I&&"bottom"===I.verticalAlign&&I.enabled&&!I.floating?H.legendHeight+m(I.margin,10):0,a=a+H-20,K=d-a-(g?0:n.y)-(e.titleOffset?e.titleOffset[2]:0)-10);if("top"===G)g&&(K=0),e.titleOffset&&e.titleOffset[0]&&(K=e.titleOffset[0]),
K+=e.margin[0]-e.spacing[0]||0;else if("middle"===G)if(N===O)K=0>N?d+void 0:d;else if(N||O)K=0>N||0>O?K-Math.min(N,O):d-a+NaN;b.group.translate(n.x,n.y+Math.floor(K));!1!==C&&(b.minInput.style.marginTop=b.group.translateY+"px",b.maxInput.style.marginTop=b.group.translateY+"px");b.rendered=!0}},getHeight:function(){var a=this.options,c=this.group,d=a.y,e=a.buttonPosition.y,f=a.inputPosition.y;if(a.height)return a.height;a=c?c.getBBox(!0).height+13+d:0;c=Math.min(f,e);if(0>f&&0>e||0<f&&0<e)a+=Math.abs(c);
return a},titleCollision:function(a){return!(a.options.title.text||a.options.subtitle.text)},update:function(a){var b=this.chart;e(!0,b.options.rangeSelector,a);this.destroy();this.init(b);b.rangeSelector.render()},destroy:function(){var a=this,c=a.minInput,d=a.maxInput;a.unMouseDown();a.unResize();E(a.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);d&&(d.onfocus=d.onblur=d.onchange=null);q(a,function(b,f){b&&"chart"!==f&&(b.destroy?b.destroy():b.nodeType&&C(this[f]));b!==l.prototype[f]&&(a[f]=null)},
this)}};H.prototype.minFromRange=function(){var a=this.range,c={month:"Month",year:"FullYear"}[a.type],d=this.max,e=this.chart.time,f=function(a,b){var f=new e.Date(a),d=e.get(c,f);e.set(c,f,d+b);d===e.get(c,f)&&e.set("Date",f,0);return f.getTime()-a};if(v(a)){var k=d-a;var g=a}else k=d+f(d,-a.count),this.chart&&(this.chart.fixedRange=d-k);var x=m(this.dataMin,Number.MIN_VALUE);v(k)||(k=x);k<=x&&(k=x,void 0===g&&(g=f(k,a.count)),this.newMax=Math.min(k+g,this.dataMax));v(d)||(k=void 0);return k};a.RangeSelector||
(B(d,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new l(this))}),B(d,"beforeRender",function(){var a=this.axes,c=this.rangeSelector;c&&(v(c.deferredYTDClick)&&(c.clickButton(c.deferredYTDClick),delete c.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),c.render(),a=c.options.verticalAlign,c.options.floating||("bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))}),B(d,"update",function(a){var b=
a.options.rangeSelector;a=this.rangeSelector;var c=this.extraBottomMargin,d=this.extraTopMargin;b&&b.enabled&&!y(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new l(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==c||this.extraTopMargin!==d)&&(this.isDirtyBox=!0)}),B(d,"render",function(){var a=
this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0))}),B(d,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))}),d.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();v(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector;if(d){var f=B(a.xAxis[0],"afterSetExtremes",
function(a){d.render(a.min,a.max)});var e=B(a,"redraw",b);b()}B(a,"destroy",function(){d&&(e(),f())})}),a.RangeSelector=l)});I(l,"parts/Navigator.js",[l["parts/Globals.js"],l["parts/Utilities.js"]],function(a,d){function l(a){this.init(a)}var y=d.defined,E=d.destroyObjectProperties,C=d.erase,F=d.extend,v=d.isArray,q=d.isNumber,m=d.pick,D=d.splat,n=a.addEvent,B=a.Axis;d=a.Chart;var H=a.color,g=a.defaultOptions,c=a.hasTouch,t=a.isTouchDevice,u=a.merge,e=a.removeEvent,b=a.Scrollbar,h=a.Series,w=function(a){for(var b=
[],f=1;f<arguments.length;f++)b[f-1]=arguments[f];b=[].filter.call(b,q);if(b.length)return Math[a].apply(0,b)};var r=void 0===a.seriesTypes.areaspline?"line":"areaspline";F(g,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:H("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:r,fillOpacity:.05,lineWidth:1,compare:null,
dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",
tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});a.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,e){a=e.width/2;b=Math.round(a/3)+.5;e=e.height;return["M",-a-1,.5,"L",a,.5,"L",a,
e+.5,"L",-a-1,e+.5,"L",-a-1,.5,"M",-b,4,"L",-b,e-3,"M",b-1,4,"L",b-1,e-3]};B.prototype.toFixedRange=function(b,c,d,e){var f=this.chart&&this.chart.fixedRange,k=(this.pointRange||0)/2;b=m(d,this.translate(b,!0,!this.horiz));c=m(e,this.translate(c,!0,!this.horiz));var g=f&&(c-b)/f;y(d)||(b=a.correctFloat(b+k));y(e)||(c=a.correctFloat(c-k));.7<g&&1.3>g&&(e?b=c-f:c=b+f);q(b)&&q(c)||(b=c=void 0);return{min:b,max:c}};l.prototype={drawHandle:function(a,b,c,d){var f=this.navigatorOptions.handles.height;this.handles[b][d](c?
{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-f)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-f/2-1)})},drawOutline:function(a,b,c,d){var f=this.navigatorOptions.maskInside,e=this.outline.strokeWidth(),k=e/2;e=e%2/2;var g=this.outlineHeight,p=this.scrollbarHeight,h=this.size,x=this.left-p,m=this.top;c?(x-=k,c=m+b+e,b=m+a+e,a=["M",x+g,m-p-e,"L",x+g,c,"L",x,c,"L",x,b,"L",x+g,b,"L",x+g,m+h+p].concat(f?
["M",x+g,c-k,"L",x+g,b+k]:[])):(a+=x+p-e,b+=x+p-e,m+=k,a=["M",x,m,"L",a,m,"L",a,m+g,"L",b,m+g,"L",b,m,"L",x+h+2*p,m].concat(f?["M",a-k,m,"L",b+k,m]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var f=this.left,e=this.top,g=this.height;if(c){var k=[f,f,f];var p=[e,e+a,e+b];var h=[g,g,g];var x=[a,b-a,this.size-b]}else k=[f,f+a,f+b],p=[e,e,e],h=[a,b-a,this.size-b],x=[g,g,g];this.shades.forEach(function(a,b){a[d]({x:k[b],y:p[b],width:h[b],height:x[b]})})},renderElements:function(){var a=this,
b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.renderer,g,h={cursor:d.inverted?"ns-resize":"ew-resize"};a.navigatorGroup=g=e.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(c,f){a.shades[f]=e.rect().addClass("highcharts-navigator-mask"+(1===f?"-inside":"-outside")).add(g);d.styledMode||a.shades[f].attr({fill:c?b.maskFill:"rgba(0,0,0,0)"}).css(1===f&&h)});a.outline=e.path().addClass("highcharts-navigator-outline").add(g);d.styledMode||a.outline.attr({"stroke-width":b.outlineWidth,
stroke:b.outlineColor});b.handles.enabled&&[0,1].forEach(function(c){b.handles.inverted=d.inverted;a.handles[c]=e.symbol(b.handles.symbols[c],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[c].attr({zIndex:7-c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(g);if(!d.styledMode){var f=b.handles;a.handles[c].attr({fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":f.lineWidth}).css(h)}})},update:function(a){(this.series||
[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();u(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(b,c,d,e){var f=this.chart,g=this.scrollbarHeight,k,h=this.xAxis,p=h.pointRange||0;var x=h.fake?f.xAxis[0]:h;var n=this.navigatorEnabled,l,r=this.rendered;var t=f.inverted;var u=f.xAxis[0].minRange,v=f.xAxis[0].options.maxRange;if(!this.hasDragged||y(d)){b=a.correctFloat(b-p/2);c=a.correctFloat(c+p/2);if(!q(b)||!q(c))if(r)d=
0,e=m(h.width,x.width);else return;this.left=m(h.left,f.plotLeft+g+(t?f.plotWidth:0));this.size=l=k=m(h.len,(t?f.plotHeight:f.plotWidth)-2*g);f=t?g:k+2*g;d=m(d,h.toPixels(b,!0));e=m(e,h.toPixels(c,!0));q(d)&&Infinity!==Math.abs(d)||(d=0,e=f);b=h.toValue(d,!0);c=h.toValue(e,!0);var w=Math.abs(a.correctFloat(c-b));a.correctFloat(w-p)<u?this.grabbedLeft?d=h.toPixels(c-u-p,!0):this.grabbedRight&&(e=h.toPixels(b+u+p,!0)):y(v)&&a.correctFloat(w-p)>v&&(this.grabbedLeft?d=h.toPixels(c-v-p,!0):this.grabbedRight&&
(e=h.toPixels(b+v+p,!0)));this.zoomedMax=Math.min(Math.max(d,e,0),l);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(d,e),0),l);this.range=this.zoomedMax-this.zoomedMin;l=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);n&&(this.navigatorGroup.attr({visibility:"visible"}),r=r&&!this.hasDragged?"animate":"attr",this.drawMasks(d,l,t,r),this.drawOutline(d,l,t,r),this.navigatorOptions.handles.enabled&&(this.drawHandle(d,0,t,r),this.drawHandle(l,1,t,r)));
this.scrollbar&&(t?(t=this.top-g,x=this.left-g+(n||!x.opposite?0:(x.titleOffset||0)+x.axisTitleMargin),g=k+2*g):(t=this.top+(n?this.height:-g),x=this.left-g),this.scrollbar.position(x,t,f,g),this.scrollbar.setRange(this.zoomedMin/(k||1),this.zoomedMax/(k||1)));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,d=b.container,e=[],g,h;a.mouseMoveHandler=g=function(b){a.onMouseMove(b)};a.mouseUpHandler=h=function(b){a.onMouseUp(b)};e=a.getPartsEvents("mousedown");e.push(n(b.renderTo,"mousemove",
g),n(d.ownerDocument,"mouseup",h));c&&(e.push(n(b.renderTo,"touchmove",g),n(d.ownerDocument,"touchend",h)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(n(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];["shades","handles"].forEach(function(f){b[f].forEach(function(d,e){c.push(n(d.element,a,function(a){b[f+"Mousedown"](a,e)}))})});return c},shadesMousedown:function(a,
b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,f=this.zoomedMin,e=this.left,g=this.size,k=this.range,h=a.chartX;c.inverted&&(h=a.chartY,e=this.top);if(1===b)this.grabbedCenter=h,this.fixedWidth=k,this.dragOffset=h-f;else{a=h-e-k/2;if(0===b)a=Math.max(0,a);else if(2===b&&a+k>=g)if(a=g-k,this.reversedExtremes){a-=k;var m=this.getUnionExtremes().dataMin}else var n=this.getUnionExtremes().dataMax;a!==f&&(this.fixedWidth=k,b=d.toFixedRange(a,a+k,m,n),y(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,
b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"}))}},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null},onMouseMove:function(b){var c=this,d=c.chart,f=c.left,e=c.navigatorSize,g=c.range,h=c.dragOffset,n=d.inverted;b.touches&&
0===b.touches[0].pageX||(b=d.pointer.normalize(b),d=b.chartX,n&&(f=c.top,d=b.chartY),c.grabbedLeft?(c.hasDragged=!0,c.render(0,0,d-f,c.otherHandlePos)):c.grabbedRight?(c.hasDragged=!0,c.render(0,0,c.otherHandlePos,d-f)):c.grabbedCenter&&(c.hasDragged=!0,d<h?d=h:d>e+h-g&&(d=e+h-g),c.render(0,0,d-h,d-h+g)),c.hasDragged&&c.scrollbar&&m(c.scrollbar.options.liveRedraw,a.svg&&!t&&!this.chart.isBoosting)&&(b.DOMType=b.type,setTimeout(function(){c.onMouseUp(b)},0)))},onMouseUp:function(a){var b=this.chart,
c=this.xAxis,d=this.scrollbar,e=a.DOMEvent||a;if(this.hasDragged&&(!d||!d.hasDragged)||"scrollbar"===a.trigger){d=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var f=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var g=this.fixedExtreme;this.zoomedMax===this.size&&(g=this.reversedExtremes?d.dataMin:d.dataMax);0===this.zoomedMin&&(f=this.reversedExtremes?d.dataMax:d.dataMin);c=c.toFixedRange(this.zoomedMin,this.zoomedMax,f,g);y(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,
c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e})}"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=
this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(function(a){e(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&e(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var c=a.options,d=c.navigator,e=d.enabled,f=c.scrollbar,g=f.enabled;c=e?d.height:0;var h=g?f.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=c;this.scrollbarHeight=h;this.scrollbarEnabled=g;this.navigatorEnabled=
e;this.navigatorOptions=d;this.scrollbarOptions=f;this.outlineHeight=c+h;this.opposite=m(d.opposite,!(e||!a.inverted));var l=this;e=l.baseSeries;f=a.xAxis.length;g=a.yAxis.length;var q=e&&e[0]&&e[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;l.navigatorEnabled?(l.xAxis=new B(a,u({breaks:q.options.breaks,ordinal:q.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:f,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,
maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[h,0,-h,0],width:c}:{offsets:[0,-h,0,h],height:c})),l.yAxis=new B(a,u(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:g,isInternal:!0,zoomEnabled:!1},a.inverted?{width:c}:{height:c})),e||d.series.data?l.updateNavigatorSeries(!1):0===a.series.length&&(l.unbindRedraw=n(a,"beforeRedraw",function(){0<a.series.length&&!l.series&&(l.setBaseSeries(),l.unbindRedraw())})),l.reversedExtremes=a.inverted&&!l.xAxis.reversed||!a.inverted&&l.xAxis.reversed,
l.renderElements(),l.addMouseEvents()):l.xAxis={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),f=d.len-2*h,g=w("min",d.options.min,e.dataMin);d=w("max",d.options.max,e.dataMax)-g;return c?b*d/f+g:f*(b-g)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:B.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=l.scrollbar=new b(a.renderer,u(a.options.scrollbar,{margin:l.navigatorEnabled?0:10,vertical:a.inverted}),
a),n(l.scrollbar,"changed",function(b){var c=l.size,d=c*this.to;c*=this.from;l.hasDragged=l.scrollbar.hasDragged;l.render(0,0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){l.onMouseUp(b)})}));l.addBaseSeriesEvents();l.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:m(d&&d.min,w("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:m(d&&d.max,w("max",
e.max,b.dataMax,c.dataMax,c.max))});return f},setBaseSeries:function(b,c){var d=this.chart,e=this.baseSeries=[];b=b||d.options&&d.options.navigator.baseSeries||(d.series.length?a.find(d.series,function(a){return!a.options.isInternal}).index:0);(d.series||[]).forEach(function(a,c){a.options.isInternal||!a.options.showInNavigator&&(c!==b&&a.options.id!==b||!1===a.options.showInNavigator)||e.push(a)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,c)},updateNavigatorSeries:function(a,b){var c=
this,d=c.chart,f=c.baseSeries,h,k,l=c.navigatorOptions.series,n,q={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,states:{inactive:{opacity:1}}},r=c.series=(c.series||[]).filter(function(a){var b=a.baseSeries;return 0>f.indexOf(b)?(b&&(e(b,"updatedData",c.updatedDataHandler),delete b.navigatorSeries),a.chart&&a.destroy(),!1):!0});f&&f.length&&f.forEach(function(a){var e=a.navigatorSeries,
p=F({color:a.color,visible:a.visible},v(l)?g.navigator.series:l);e&&!1===c.navigatorOptions.adaptToUpdatedData||(q.name="Navigator "+f.length,h=a.options||{},n=h.navigatorOptions||{},k=u(h,q,p,n),k.pointRange=m(p.pointRange,n.pointRange,g.plotOptions[k.type||"line"].pointRange),p=n.data||p.data,c.hasNavigatorData=c.hasNavigatorData||!!p,k.data=p||h.data&&h.data.slice(0),e&&e.options?e.update(k,b):(a.navigatorSeries=d.initSeries(k),a.navigatorSeries.baseSeries=a,r.push(a.navigatorSeries)))});if(l.data&&
(!f||!f.length)||v(l))c.hasNavigatorData=!1,l=D(l),l.forEach(function(a,b){q.name="Navigator "+(r.length+1);k=u(g.navigator.series,{color:d.series[b]&&!d.series[b].options.isInternal&&d.series[b].color||d.options.colors[b]||d.options.colors[0]},q,a);k.data=a.data;k.data&&(c.hasNavigatorData=!0,r.push(d.initSeries(k)))});a&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&n(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);b.forEach(function(b){n(b,
"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});n(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&n(b,"updatedData",this.updatedDataHandler);n(b,"remove",function(){this.navigatorSeries&&(C(a.series,this.navigatorSeries),y(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(a){return this.baseSeries.reduce(function(a,
b){return Math.min(a,b.xData?b.xData[0]:a)},a)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;"undefined"!==typeof a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax;b=b.max-b.min;var e=a.stickToMin,g=a.stickToMax,h=m(this.options.overscroll,0),l=a.series&&a.series[0],n=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==
this.eventArgs.trigger){if(e){var r=c;var t=r+b}g&&(t=d+h,e||(r=Math.max(t-b,a.getBaseSeriesMin(l&&l.xData?l.xData[0]:-Number.MAX_VALUE))));n&&(e||g)&&q(r)&&(this.min=this.userMin=r,this.max=this.userMax=t)}a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=q(this.xAxis.min)&&this.xAxis.min<=
c&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||(this.eventsToUnbind=[]);this.eventsToUnbind.push(n(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)}),n(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";
this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents();this.xAxis&&(C(this.chart.xAxis,this.xAxis),C(this.chart.axes,this.xAxis));this.yAxis&&(C(this.chart.yAxis,this.yAxis),C(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&
this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){E(a)},this)}};a.Navigator||(a.Navigator=l,n(B,"zoom",function(a){var b=this.chart.options,c=b.chart.zoomType,d=b.chart.pinchType,e=b.navigator;b=b.rangeSelector;this.isXAxis&&(e&&e.enabled||b&&b.enabled)&&("y"===c?a.zoomed=!1:(!t&&"xy"===c||t&&"xy"===d)&&this.options.range&&(c=this.previousZoom,y(a.newMin)?this.previousZoom=[this.min,this.max]:c&&(a.newMin=c[0],a.newMax=c[1],delete this.previousZoom)));void 0!==
a.zoomed&&a.preventDefault()}),n(d,"beforeShowResetZoom",function(){var a=this.options,b=a.navigator,c=a.rangeSelector;if((b&&b.enabled||c&&c.enabled)&&(!t&&"x"===a.chart.zoomType||t&&"x"===a.chart.pinchType))return!1}),n(d,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new l(this)}),n(d,"afterSetChartSize",function(){var a=this.legend,b=this.navigator;if(b){var c=a&&a.options;var d=b.xAxis;var e=b.yAxis;var g=b.scrollbarHeight;
this.inverted?(b.left=b.opposite?this.chartWidth-g-b.height:this.spacing[3]+g,b.top=this.plotTop+g):(b.left=this.plotLeft+g,b.top=b.navigatorOptions.top||this.chartHeight-b.height-g-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(c&&"bottom"===c.verticalAlign&&c.enabled&&!c.floating?a.legendHeight+m(c.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));d&&e&&(this.inverted?d.options.left=e.options.left=b.left:d.options.top=e.options.top=b.top,d.setAxisSize(),
e.setAxisSize())}}),n(d,"update",function(a){var b=a.options.navigator||{},c=a.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&&!c.enabled||(u(!0,this.options.navigator,b),u(!0,this.options.scrollbar,c),delete a.options.navigator,delete a.options.scrollbar)}),n(d,"afterUpdate",function(a){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new l(this),m(a.redraw,!0)&&this.redraw(a.animation))}),n(d,"afterAddSeries",
function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),n(h,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),d.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))}))});I(l,"masters/modules/gantt.src.js",[],function(){})});
//# sourceMappingURL=gantt.js.map