/*
 Highcharts Gantt JS v7.1.3 (2019-08-14)

 Gantt series

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

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