/*
 Highcharts JS v7.0.1 (2018-12-19)
 Gantt series

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

 License: www.highcharts.com/license
*/
(function(C){"object"===typeof module&&module.exports?module.exports=C:"function"===typeof define&&define.amd?define(function(){return C}):C("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(C){(function(c){var v=c.addEvent,x=c.PlotLineOrBand,k=c.merge,m={currentDateIndicator:!0,color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:void 0,rotation:0,style:{fontSize:"10px"}}};v(c.Axis,"afterSetOptions",function(){var c=this.options,q=c.currentDateIndicator;q&&("object"===
typeof q?(q.label&&q.label.format&&(q.label.formatter=void 0),q=k(m,q)):q=k(m),q.value=new Date,c.plotLines||(c.plotLines=[]),c.plotLines.push(q))});v(x,"render",function(){var k=this.options,q,n;k.currentDateIndicator&&k.label&&(q=k.label.format,n=k.label.formatter,k.value=new Date,k.label.text="function"===typeof n?n(this):c.dateFormat(q,new Date),this.label&&this.label.attr({text:k.label.text}))})})(C);(function(c){var v=function(a){return Array.prototype.slice.call(a,1)},x=c.dateFormat,k=c.defined,
m=c.isArray,t=c.isNumber,q=function(a){return c.isObject(a,!0)},n=c.merge,B=c.pick,a=c.wrap,g=c.Axis,f=c.Tick,A={top:0,right:1,bottom:2,left:3,0:"top",1:"right",2:"bottom",3:"left"};g.prototype.isNavigatorAxis=function(){return/highcharts-navigator-[xy]axis/.test(this.options.className)};g.prototype.isOuterAxis=function(){var a=this,e=-1,b=!0;a.chart.axes.forEach(function(d,h){d.side!==a.side||d.isNavigatorAxis()||(d===a?e=h:0<=e&&h>e&&(b=!1))});return b};g.prototype.getMaxLabelDimensions=function(a,
e){var b={width:0,height:0};e.forEach(function(d){d=a[d];var e;q(d)&&(e=q(d.label)?d.label:{},d=e.getBBox?e.getBBox().height:0,e=t(e.textPxLength)?e.textPxLength:0,b.height=Math.max(d,b.height),b.width=Math.max(e,b.width))});return b};c.dateFormats={W:function(a){a=new Date(a);var e;a.setHours(0,0,0,0);a.setDate(a.getDate()-(a.getDay()||7));e=new Date(a.getFullYear(),0,1);return Math.ceil(((a-e)/864E5+1)/7)},E:function(a){return x("%a",a,!0).charAt(0)}};a(g.prototype,"autoLabelAlign",function(a){return this.chart.isStock?
"left":a.apply(this,v(arguments))});a(f.prototype,"getLabelPosition",function(a,e,b,d,h,l,f,c){var r=this.axis,w=r.reversed,u=r.chart,p=r.options,z=p&&q(p.grid)?p.grid:{},p=l.align,g=A[r.side],y=r.tickPositions,I=this.pos-f,J=t(y[c+1])?y[c+1]-f:r.max+f,G=r.tickSize("tick",!0),y=m(G)?G[0]:0,G=G&&G[1]/2,n;!0===z.enabled?("top"===g?(z=r.top+r.offset,n=z-y):"bottom"===g?(n=u.chartHeight-r.bottom+r.offset,z=n+y):(z=r.top+r.len-r.translate(w?J:I),n=r.top+r.len-r.translate(w?I:J)),"right"===g?(g=u.chartWidth-
r.right+r.offset,w=g+y):"left"===g?(w=r.left+r.offset,g=w-y):(g=Math.round(r.left+r.translate(w?J:I))-G,w=Math.round(r.left+r.translate(w?I:J))-G),this.slotWidth=w-g,w={x:"left"===p?g:"right"===p?w:g+(w-g)/2,y:n+(z-n)/2},u=u.renderer.fontMetrics(l.style.fontSize,d.element),p=d.getBBox().height,l.useHTML?w.y+=u.b+-(p/2):(p=Math.round(p/u.h),w.y+=(u.b-(u.h-u.f))/2+-((p-1)*u.h/2)),w.x+=r.horiz&&l.x||0):w=a.apply(this,v(arguments));return w});a(g.prototype,"tickSize",function(a){var e=this.maxLabelDimensions,
b=this.options,d=b&&q(b.grid)?b.grid:{},b=a.apply(this,v(arguments));!0===d.enabled&&(d=2*Math.abs(this.defaultLeftAxisOptions.labels.x),e=d+(this.horiz?e.height:e.width),m(b)?b[0]=e:b=[e]);return b});a(g.prototype,"getTitlePosition",function(a){var e=this.options;if(!0===(e&&q(e.grid)?e.grid:{}).enabled){var b=this.axisTitle,d=b&&b.getBBox().width,h=this.horiz,l=this.left,r=this.top,f=this.width,c=this.height,u=e.title,e=this.opposite,g=this.offset,p=this.tickSize()||[0],F=u.x||0,D=u.y||0,y=B(u.margin,
h?5:10),b=this.chart.renderer.fontMetrics(u.style&&u.style.fontSize,b).f,p=(h?r+c:l)+p[0]/2*(e?-1:1)*(h?1:-1)+(this.side===A.bottom?b:0);return{x:h?l-d/2-y+F:p+(e?f:0)+g+F,y:h?p-(e?c:0)+(e?b:-b)/2+g+D:r-y+D}}return a.apply(this,v(arguments))});a(g.prototype,"unsquish",function(a){var e=this.options;return!0===(e&&q(e.grid)?e.grid:{}).enabled&&this.categories?this.tickInterval:a.apply(this,v(arguments))});c.addEvent(g,"afterSetOptions",function(a){var e=this.options;a=a.userOptions;var b,d=e&&q(e.grid)?
e.grid:{};!0===d.enabled&&(b=n(!0,{className:"highcharts-grid-axis "+(a.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"}},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]]},a),"xAxis"===
this.coll&&(k(a.linkedTo)&&!k(a.tickPixelInterval)&&(b.tickPixelInterval=350),k(a.tickPixelInterval)||!k(a.linkedTo)||k(a.tickPositioner)||k(a.tickInterval)||(b.tickPositioner=function(d,e){var a=this.linkedParent&&this.linkedParent.tickPositions&&this.linkedParent.tickPositions.info;if(a){var h,l,f,g,p=b.units;for(g=0;g<p.length;g++)if(p[g][0]===a.unitName){h=g;break}if(p[h][1])return p[h+1]&&(f=p[h+1][0],l=(p[h+1][1]||[1])[0]),a=c.timeUnits[f],this.tickInterval=a*l,this.getTimeTicks({unitRange:a,
count:l,unitName:f},d,e,this.options.startOfWeek)}})),n(!0,this.options,b),this.horiz&&(e.minPadding=B(a.minPadding,0),e.maxPadding=B(a.maxPadding,0)),t(e.grid.borderWidth)&&(e.tickWidth=e.lineWidth=d.borderWidth))});a(g.prototype,"setAxisTranslation",function(a){var e=this.options,b=e&&q(e.grid)?e.grid:{},d=this.tickPositions&&this.tickPositions.info,h=this.userOptions.labels||{};this.horiz&&(!0===b.enabled&&this.series.forEach(function(b){b.options.pointRange=0}),d&&(!1===e.dateTimeLabelFormats[d.unitName].range||
1<d.count)&&!k(h.align)&&(e.labels.align="left",k(h.x)||(e.labels.x=3)));a.apply(this,v(arguments))});a(g.prototype,"trimTicks",function(a){var e=this.options,b=e&&q(e.grid)?e.grid:{},d=this.categories,h=this.tickPositions,l=h[0],f=h[h.length-1],c=this.linkedParent&&this.linkedParent.min||this.min,g=this.linkedParent&&this.linkedParent.max||this.max,u=this.tickInterval,A=l>c,p=f<g,l=l<c&&l+u>c,f=f>g&&f-u<g;!0!==b.enabled||d||!this.horiz&&!this.isLinked||(!A&&!l||e.startOnTick||(h[0]=c),!p&&!f||e.endOnTick||
(h[h.length-1]=g));a.apply(this,v(arguments))});a(g.prototype,"render",function(a){var e=this.options,b=e&&q(e.grid)?e.grid:{},d,h,l,f,c,g=this.chart.renderer,w=this.horiz;if(!0===b.enabled){if(b=2*Math.abs(this.defaultLeftAxisOptions.labels.x),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),b=this.maxLabelDimensions.width+b,d=e.lineWidth,this.rightWall&&this.rightWall.destroy(),a.apply(this),a=this.axisGroup.getBBox(),this.isOuterAxis()&&this.axisLine&&(w&&(b=a.height-
1),d)){a=this.getLinePath(d);f=a.indexOf("M")+1;c=a.indexOf("L")+1;h=a.indexOf("M")+2;l=a.indexOf("L")+2;if(this.side===A.top||this.side===A.left)b=-b;w?(a[h]+=b,a[l]+=b):(a[f]+=b,a[c]+=b);this.axisLineExtra?this.axisLineExtra.animate({d:a}):this.axisLineExtra=g.path(a).attr({stroke:e.lineColor,"stroke-width":d,zIndex:7}).addClass("highcharts-axis-line").add(this.axisGroup);this.axisLine[this.showAxis?"show":"hide"](!0)}}else a.apply(this)});a(g.prototype,"init",function(f,e,b){function d(b){var a=
b.options,d=25/11,e=b.chart.renderer.fontMetrics(a.labels.style.fontSize);a.labels||(a.labels={});a.labels.align=B(a.labels.align,"center");b.categories||(a.showLastLabel=!1);b.horiz&&(a.tickLength=h.cellHeight||e.h*d);b.labelRotation=0;a.labels.rotation=0}var h=b&&q(b.grid)?b.grid:{},l,r,z;if(h.enabled)if(k(h.borderColor)&&(b.tickColor=b.lineColor=h.borderColor),m(h.columns))for(r=0,z=h.columns.length;z--;)l=n(b,h.columns[z],{type:"category"}),delete l.grid.columns,l=new g(e,l),l.isColumn=!0,l.columnIndex=
r,a(l,"labelFormatter",function(b){var a=this.axis,d=a.tickPositions,e=this.value,h=e===d[0],d=e===d[d.length-1],f=c.find(a.series[0].options.data,function(b){return b[a.isXAxis?"x":"y"]===e});this.isFirst=h;this.isLast=d;this.point=f;return b.call(this)}),r++;else f.apply(this,v(arguments)),d(this);else f.apply(this,v(arguments))})})(C);(function(c){var v=c.Chart,x=c.pick;c.addEvent(c.Axis,"afterSetOptions",function(){this.horiz||!c.isNumber(this.options.staticScale)||this.chart.options.chart.height||
(this.staticScale=this.options.staticScale)});v.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(k){var m=k.chart,v=!!m.initiatedScale&&m.options.animation,q=k.options.staticScale,n;k.staticScale&&c.defined(k.min)&&(n=x(k.unitLength,k.max+k.tickInterval-k.min)*q,n=Math.max(n,q),q=n-m.plotHeight,1<=Math.abs(q)&&(m.plotHeight=n,m.redrawTrigger="adjustHeight",m.setSize(void 0,m.chartHeight+q,v)),k.series.forEach(function(c){(c=c.sharedClipKey&&
m[c.sharedClipKey])&&c.attr({height:m.plotHeight})}))}),this.initiatedScale=!0);this.redrawTrigger=null};c.addEvent(v,"render",v.prototype.adjustHeight)})(C);var K=function(c){var v=c.extend,x=c.isNumber,k=c.pick,m=function(c,n){var q=c.reduce(function(a,c){var f=k(c.parent,"");void 0===a[f]&&(a[f]=[]);a[f].push(c);return a},{});Object.keys(q).forEach(function(a,c){var f=q[a];""!==a&&-1===n.indexOf(a)&&(f.forEach(function(a){c[""].push(a)}),delete c[a])});return q},t=function(c,n,m,a,g,f){var A=0,
u=0,e=f&&f.after,b=f&&f.before;n={data:a,depth:m-1,id:c,level:m,parent:n};var d,h;"function"===typeof b&&b(n,f);b=(g[c]||[]).map(function(b){var a=t(b.id,c,m+1,b,g,f),e=b.start;b=!0===b.milestone?e:b.end;d=!x(d)||e<d?e:d;h=!x(h)||b>h?b:h;A=A+1+a.descendants;u=Math.max(a.height+1,u);return a});a&&(a.start=k(a.start,d),a.end=k(a.end,h));v(n,{children:b,descendants:A,height:u});"function"===typeof e&&e(n,f);return n};return{getListOfParents:m,getNode:t,getTree:function(c,n){var k=c.map(function(a){return a.id});
c=m(c,k);return t("",null,1,null,c,n)}}}(C),L=function(c){var v=c.extend,x=c.isArray,k=c.isObject,m=c.isNumber,t=c.merge,q=c.pick;return{getColor:function(n,k){var a=k.index,g=k.mapOptionsToLevel,f=k.parentColor,A=k.parentColorIndex,u=k.series,e=k.colors,b=k.siblings,d=u.points,h=u.chart.options.chart,l,r,z,E;if(n){d=d[n.i];n=g[n.level]||{};if(g=d&&n.colorByPoint)r=d.index%(e?e.length:h.colorCount),l=e&&e[r];if(!u.chart.styledMode){e=d&&d.options.color;h=n&&n.color;if(z=f)z=(z=n&&n.colorVariation)&&
"brightness"===z.key?c.color(f).brighten(a/b*z.to).get():f;z=q(e,h,l,z,u.color)}E=q(d&&d.options.colorIndex,n&&n.colorIndex,r,A,k.colorIndex)}return{color:z,colorIndex:E}},getLevelOptions:function(c){var n=null,a,g,f,A;if(k(c))for(n={},f=m(c.from)?c.from:1,A=c.levels,g={},a=k(c.defaults)?c.defaults:{},x(A)&&(g=A.reduce(function(c,e){var b,d;k(e)&&m(e.level)&&(d=t({},e),b="boolean"===typeof d.levelIsConstant?d.levelIsConstant:a.levelIsConstant,delete d.levelIsConstant,delete d.level,e=e.level+(b?0:
f-1),k(c[e])?v(c[e],d):c[e]=d);return c},{})),A=m(c.to)?c.to:1,c=0;c<=A;c++)n[c]=t({},a,k(g[c])?g[c]:{});return n},setTreeValues:function B(a,c){var f=c.before,g=c.idRoot,u=c.mapIdToNode[g],e=c.points[a.i],b=e&&e.options||{},d=0,h=[];v(a,{levelDynamic:a.level-(("boolean"===typeof c.levelIsConstant?c.levelIsConstant:1)?0:u.level),name:q(e&&e.name,""),visible:g===a.id||("boolean"===typeof c.visible?c.visible:!1)});"function"===typeof f&&(a=f(a,c));a.children.forEach(function(b,e){var f=v({},c);v(f,
{index:e,siblings:a.children.length,visible:a.visible});b=B(b,f);h.push(b);b.visible&&(d+=b.val)});a.visible=0<d||a.visible;f=q(b.value,d);v(a,{children:h,childrenTotal:d,isLeaf:a.visible&&!d,val:f});return a},updateRootId:function(c){var a;k(c)&&(a=k(c.options)?c.options:{},a=q(c.rootNode,a.rootId,""),k(c.userOptions)&&(c.userOptions.rootId=a),c.rootNode=a);return a}}}(C);(function(c){function v(){return Array.prototype.slice.call(arguments,1)}function x(a){a.apply(this);this.drawBreaks(this.xAxis,
["x"]);this.drawBreaks(this.yAxis,m(this.pointArrayMap,["y"]))}var k=c.addEvent,m=c.pick,t=c.wrap,q=c.extend,n=c.isArray,B=c.fireEvent,a=c.Axis,g=c.Series;q(a.prototype,{isInBreak:function(a,c){var f=a.repeat||Infinity,e=a.from,b=a.to-a.from;c=c>=e?(c-e)%f:f-(e-c)%f;return a.inclusive?c<=b:c<b&&0!==c},isInAnyBreak:function(a,c){var f=this.options.breaks,e=f&&f.length,b,d,h;if(e){for(;e--;)this.isInBreak(f[e],a)&&(b=!0,d||(d=m(f[e].showPoints,this.isXAxis?!1:!0)));h=b&&c?b&&!d:b}return h}});k(a,"afterInit",
function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});k(a,"afterSetTickPositions",function(){if(this.isBroken){var a=this.tickPositions,c=this.tickPositions.info,g=[],e;for(e=0;e<a.length;e++)this.isInAnyBreak(a[e])||g.push(a[e]);this.tickPositions=g;this.tickPositions.info=c}});k(a,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});a.prototype.setBreaks=function(c,g){function f(a){var d=a,e,c;for(c=0;c<b.breakArray.length;c++)if(e=b.breakArray[c],
e.to<=a)d-=e.len;else if(e.from>=a)break;else if(b.isInBreak(e,a)){d-=a-e.from;break}return d}function e(a){var d,e;for(e=0;e<b.breakArray.length&&!(d=b.breakArray[e],d.from>=a);e++)d.to<a?a+=d.len:b.isInBreak(d,a)&&(a+=d.len);return a}var b=this,d=n(c)&&!!c.length;b.isDirty=b.isBroken!==d;b.isBroken=d;b.options.breaks=b.userOptions.breaks=c;b.forceRedraw=!0;d||b.val2lin!==f||(delete b.val2lin,delete b.lin2val);d&&(b.userOptions.ordinal=!1,b.val2lin=f,b.lin2val=e,b.setExtremes=function(b,d,e,c,f){if(this.isBroken){for(;this.isInAnyBreak(b);)b-=
this.closestPointRange;for(;this.isInAnyBreak(d);)d-=this.closestPointRange}a.prototype.setExtremes.call(this,b,d,e,c,f)},b.setAxisTranslation=function(d){a.prototype.setAxisTranslation.call(this,d);this.unitLength=null;if(this.isBroken){d=b.options.breaks;var e=[],c=[],h=0,f,g,k=b.userMin||b.min,p=b.userMax||b.max,F=m(b.pointRangePadding,0),D,y;d.forEach(function(a){g=a.repeat||Infinity;b.isInBreak(a,k)&&(k+=a.to%g-k%g);b.isInBreak(a,p)&&(p-=p%g-a.from%g)});d.forEach(function(b){D=b.from;for(g=b.repeat||
Infinity;D-g>k;)D-=g;for(;D<k;)D+=g;for(y=D;y<p;y+=g)e.push({value:y,move:"in"}),e.push({value:y+(b.to-b.from),move:"out",size:b.breakSize})});e.sort(function(b,a){return b.value===a.value?("in"===b.move?0:1)-("in"===a.move?0:1):b.value-a.value});f=0;D=k;e.forEach(function(b){f+="in"===b.move?1:-1;1===f&&"in"===b.move&&(D=b.value);0===f&&(c.push({from:D,to:b.value,len:b.value-D-(b.size||0)}),h+=b.value-D-(b.size||0))});b.breakArray=c;b.unitLength=p-k-h+F;B(b,"afterBreaks");b.staticScale?b.transA=
b.staticScale:b.unitLength&&(b.transA*=(p-b.min+F)/b.unitLength);F&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=k;b.max=p}});m(g,!0)&&this.chart.redraw()};t(g.prototype,"generatePoints",function(a){a.apply(this,v(arguments));var c=this.xAxis,f=this.yAxis,e=this.points,b,d=e.length,h=this.options.connectNulls,g;if(c&&f&&(c.options.breaks||f.options.breaks))for(;d--;)b=e[d],g=null===b.y&&!1===h,g||!c.isInAnyBreak(b.x,!0)&&!f.isInAnyBreak(b.y,!0)||(e.splice(d,1),this.data[d]&&this.data[d].destroyElements())});
c.Series.prototype.drawBreaks=function(a,c){var f=this,e=f.points,b,d,h,g;a&&c.forEach(function(c){b=a.breakArray||[];d=a.isXAxis?a.min:m(f.options.threshold,a.min);e.forEach(function(e){g=m(e["stack"+c.toUpperCase()],e[c]);b.forEach(function(b){h=!1;if(d<b.from&&g>b.to||d>b.from&&g<b.from)h="pointBreak";else if(d<b.from&&g>b.from&&g<b.to||d>b.from&&g>b.to&&g<b.from)h="pointInBreak";h&&B(a,h,{point:e,brk:b})})})})};c.Series.prototype.gappedPath=function(){var a=this.currentDataGrouping,g=a&&a.totalRange,
a=this.options.gapSize,k=this.points.slice(),e=k.length-1,b=this.yAxis;if(a&&0<e)for("value"!==this.options.gapUnit&&(a*=this.closestPointRange),g&&g>a&&(a=g);e--;)k[e+1].x-k[e].x>a&&(g=(k[e].x+k[e+1].x)/2,k.splice(e+1,0,{isNull:!0,x:g}),this.options.stacking&&(g=b.stacks[this.stackKey][g]=new c.StackItem(b,b.options.stackLabels,!1,g,this.stack),g.total=0));return this.getGraphPath(k)};t(c.seriesTypes.column.prototype,"drawPoints",x);t(c.Series.prototype,"drawPoints",x)})(C);(function(c,v,x){var k=
function(b){return Array.prototype.slice.call(b,1)},m=c.defined,t=c.extend,q=c.find,n=c.fireEvent,B=x.getLevelOptions,a=c.merge,g=c.isNumber,f=function(b){return c.isObject(b,!0)},A=c.isString,u=c.pick,e=c.wrap;x=c.Axis;var b=c.Tick,d=function(b,a){var d,c;for(d in a)a.hasOwnProperty(d)&&(c=a[d],e(b,d,c))},h=function(b,a){var d=b.collapseStart;b=b.collapseEnd;b>=a&&(d-=.5);return{from:d,to:b,showPoints:!1}},l=function(b){return Object.keys(b.mapOfPosToGridNode).reduce(function(a,d){d=+d;b.min<=d&&
b.max>=d&&!b.isInAnyBreak(d)&&a.push(d);return a},[])},r=function(b,a){var d=b.options.breaks||[],e=h(a,b.max);return d.some(function(b){return b.from===e.from&&b.to===e.to})},z=function(b,a){var d=b.options.breaks||[];b=h(a,b.max);d.push(b);return d},E=function(b,a){var d=b.options.breaks||[],e=h(a,b.max);return d.reduce(function(b,a){a.to===e.to&&a.from===e.from||b.push(a);return b},[])},w=function(b,a){var d=b.labelIcon,e=!d,h=a.renderer,g=a.xy,f=a.options,l=f.width,r=f.height,p=g.x-l/2-f.padding,
g=g.y-r/2,k=a.collapsed?90:180,w=a.show&&c.isNumber(g);e&&(b.labelIcon=d=h.path(h.symbols[f.type](f.x,f.y,l,r)).addClass("highcharts-label-icon").add(a.group));w||d.attr({y:-9999});h.styledMode||d.attr({"stroke-width":1,fill:u(a.color,"#666666")}).css({cursor:"pointer",stroke:f.lineColor,strokeWidth:f.lineWidth});d[e?"attr":"animate"]({translateX:p,translateY:g,rotation:k})},H=function(b,a,d){var e=[],c=[],h={},g={},l=-1,r="boolean"===typeof a?a:!1;b=v.getTree(b,{after:function(b){b=g[b.pos];var a=
0,d=0;b.children.forEach(function(b){d+=b.descendants+1;a=Math.max(b.height+1,a)});b.descendants=d;b.height=a;b.collapsed&&c.push(b)},before:function(b){var a=f(b.data)?b.data:{},d=A(a.name)?a.name:"",c=h[b.parent],c=f(c)?g[c.pos]:null,p=function(b){return b.name===d},k;r&&f(c)&&(k=q(c.children,p))?(p=k.pos,k.nodes.push(b)):p=l++;g[p]||(g[p]=k={depth:c?c.depth+1:0,name:d,nodes:[b],children:[],pos:p},-1!==p&&e.push(d),f(c)&&c.children.push(k));A(b.id)&&(h[b.id]=b);!0===a.collapsed&&(k.collapsed=!0);
b.pos=p}});g=function(b,a){var d=function(b,e,c){var h=e+(-1===e?0:a-1),g=(h-e)/2,l=e+g;b.nodes.forEach(function(b){var a=b.data;f(a)&&(a.y=e+a.seriesIndex,delete a.seriesIndex);b.pos=l});c[l]=b;b.pos=l;b.tickmarkOffset=g+.5;b.collapseStart=h+.5;b.children.forEach(function(b){d(b,h+1,c);h=b.collapseEnd-.5});b.collapseEnd=h+.5;return c};return d(b["-1"],-1,{})}(g,d);return{categories:e,mapOfIdToNode:h,mapOfPosToGridNode:g,collapsedNodes:c,tree:b}};d(x.prototype,{init:function(b,d,e){var h=this,g,f=
"treegrid"===e.type;f&&(e=a({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},e,{reversed:!0,grid:{columns:void 0}}));b.apply(h,[d,e]);f&&(c.addEvent(h.chart,"beforeRender",function(){var b=h.options&&h.options.labels;h.updateYNames();h.series.forEach(function(b){b.yData=b.options.data.map(function(b){return b.y})});h.mapOptionsToLevel=B({defaults:b,from:1,levels:b.levels,
to:h.tree.height});g=c.addEvent(h,"foundExtremes",function(){h.collapsedNodes.forEach(function(b){b=z(h,b);h.setBreaks(b,!1)});g()})}),h.hasNames=!0,h.options.showLastLabel=!0)},getMaxLabelDimensions:function(b){var a=this.options,d=a&&a.labels,a=d&&g(d.indentation)?a.labels.indentation:0,d=b.apply(this,k(arguments)),e;"treegrid"===this.options.type&&(e=this.mapOfPosToGridNode[-1].height,d.width+=a*(e-1));return d},generateTick:function(a,d){var e=f(this.mapOptionsToLevel)?this.mapOptionsToLevel:
{},c=this.ticks,h=c[d],g,l;"treegrid"===this.options.type?(l=this.mapOfPosToGridNode[d],(e=e[l.depth])&&(g={labels:e}),h?(h.parameters.category=l.name,h.options=g,h.addLabel()):c[d]=new b(this,d,null,void 0,{category:l.name,tickmarkOffset:l.tickmarkOffset,options:g})):a.apply(this,k(arguments))},setTickInterval:function(b){var a=this.options;"treegrid"===a.type?(this.min=u(this.userMin,a.min,this.dataMin),this.max=u(this.userMax,a.max,this.dataMax),n(this,"foundExtremes"),this.setAxisTranslation(!0),
this.tickmarkOffset=.5,this.tickInterval=1,this.tickPositions=l(this)):b.apply(this,k(arguments))}});d(b.prototype,{getLabelPosition:function(b,a,d,e,c,h,l,r,k){var p=u(this.options&&this.options.labels,h);h=this.pos;var w=this.axis,z="treegrid"===w.options.type;b=b.apply(this,[a,d,e,c,p,l,r,k]);z&&(a=p&&f(p.symbol)?p.symbol:{},p=p&&g(p.indentation)?p.indentation:0,h=(h=(w=w.mapOfPosToGridNode)&&w[h])&&h.depth||1,b.x+=a.width+2*a.padding+(h-1)*p);return b},renderLabel:function(b){var a=this,d=a.pos,
e=a.axis,h=a.label,g=e.mapOfPosToGridNode,l=e.options,p=u(a.options&&a.options.labels,l&&l.labels),z=p&&f(p.symbol)?p.symbol:{},n=(g=g&&g[d])&&g.depth,l="treegrid"===l.type,A=!(!h||!h.element),q=-1<e.tickPositions.indexOf(d),d=e.chart.styledMode;l&&g&&A&&h.addClass("highcharts-treegrid-node-level-"+n);b.apply(a,k(arguments));l&&g&&A&&0<g.descendants&&(e=r(e,g),w(a,{color:!d&&h.styles.color,collapsed:e,group:h.parentGroup,options:z,renderer:h.renderer,show:q,xy:h.xy}),z="highcharts-treegrid-node-"+
(e?"expanded":"collapsed"),h.addClass("highcharts-treegrid-node-"+(e?"collapsed":"expanded")).removeClass(z),d||h.css({cursor:"pointer"}),[h,a.labelIcon].forEach(function(b){b.attachedTreeGridEvents||(c.addEvent(b.element,"mouseover",function(){var b=h;b.addClass("highcharts-treegrid-node-active");b.renderer.styledMode||b.css({textDecoration:"underline"})}),c.addEvent(b.element,"mouseout",function(){var b=h,a=p,a=m(a.style)?a.style:{};b.removeClass("highcharts-treegrid-node-active");b.renderer.styledMode||
b.css({textDecoration:a.textDecoration})}),c.addEvent(b.element,"click",function(){a.toggleCollapse()}),b.attachedTreeGridEvents=!0)}))}});t(b.prototype,{collapse:function(b){var a=this.axis,d=z(a,a.mapOfPosToGridNode[this.pos]);a.setBreaks(d,u(b,!0))},expand:function(b){var a=this.axis,d=E(a,a.mapOfPosToGridNode[this.pos]);a.setBreaks(d,u(b,!0))},toggleCollapse:function(b){var a=this.axis,d;d=a.mapOfPosToGridNode[this.pos];d=r(a,d)?E(a,d):z(a,d);a.setBreaks(d,u(b,!0))}});x.prototype.updateYNames=
function(){var b=this.options,a=b.uniqueNames,d=!this.isXAxis,e=this.series,c=0;"treegrid"===b.type&&d&&(b=e.reduce(function(b,d){d.visible&&(d.options.data.forEach(function(a){f(a)&&(a.seriesIndex=c,b.push(a))}),!0===a&&c++);return b},[]),b=H(b,a,!0===a?c:1),this.categories=b.categories,this.mapOfPosToGridNode=b.mapOfPosToGridNode,this.collapsedNodes=b.collapsedNodes,this.hasNames=!0,this.tree=b.tree)};x.prototype.utils={getNode:v.getNode}})(C,K,L);K=function(c){function v(a,c,f){f=f||0;var g=a.length-
1;c-=1e-7;for(var k,e;f<=g;)if(k=g+f>>1,e=c-a[k].xMin,0<e)f=k+1;else if(0>e)g=k-1;else return k;return 0<f?f-1:0}function x(a,c){for(var g=v(a,c.x+1)+1;g--;){var k;if(k=a[g].xMax>=c.x)k=a[g],k=c.x<=k.xMax&&c.x>=k.xMin&&c.y<=k.yMax&&c.y>=k.yMin;if(k)return g}return-1}function k(a){var c=[];if(a.length){c.push("M",a[0].start.x,a[0].start.y);for(var f=0;f<a.length;++f)c.push("L",a[f].end.x,a[f].end.y)}return c}function m(a,c){a.yMin=q(a.yMin,c.yMin);a.yMax=t(a.yMax,c.yMax);a.xMin=q(a.xMin,c.xMin);a.xMax=
t(a.xMax,c.xMax)}var t=Math.min,q=Math.max,n=Math.abs,B=c.pick;return{straight:function(a,c){return{path:["M",a.x,a.y,"L",c.x,c.y],obstacles:[{start:a,end:c}]}},simpleConnect:c.extend(function(a,c,f){function g(b,a,d,c,e){b={x:b.x,y:b.y};b[a]=d[c||a]+(e||0);return b}function m(b,a,d){var c=n(a[d]-b[d+"Min"])>n(a[d]-b[d+"Max"]);return g(a,d,b,d+(c?"Max":"Min"),c?1:-1)}var e=[],b,d=B(f.startDirectionX,n(c.x-a.x)>n(c.y-a.y))?"x":"y",h=f.chartObstacles,l=x(h,a);f=x(h,c);var r;-1<f?(b=h[f],f=m(b,c,d),
b={start:f,end:c},r=f):r=c;-1<l&&(h=h[l],f=m(h,a,d),e.push({start:a,end:f}),f[d]>a[d]===f[d]>r[d]&&(d="y"===d?"x":"y",c=a[d]<c[d],e.push({start:f,end:g(f,d,h,d+(c?"Max":"Min"),c?1:-1)}),d="y"===d?"x":"y"));a=e.length?e[e.length-1].end:a;f=g(a,d,r);e.push({start:a,end:f});d=g(f,"y"===d?"x":"y",r);e.push({start:f,end:d});e.push(b);return{path:k(e),obstacles:e}},{requiresObstacles:!0}),fastAvoid:c.extend(function(a,c,f){function g(b,a,d){var c,e,h,g,f,l=b.x<a.x?1:-1;b.x<a.x?(c=b,e=a):(c=a,e=b);b.y<a.y?
(g=b,h=a):(g=a,h=b);for(f=0>l?t(v(y,e.x),y.length-1):0;y[f]&&(0<l&&y[f].xMin<=e.x||0>l&&y[f].xMax>=c.x);){if(y[f].xMin<=e.x&&y[f].xMax>=c.x&&y[f].yMin<=h.y&&y[f].yMax>=g.y)return d?{y:b.y,x:b.x<a.x?y[f].xMin-1:y[f].xMax+1,obstacle:y[f]}:{x:b.x,y:b.y<a.y?y[f].yMin-1:y[f].yMax+1,obstacle:y[f]};f+=l}return a}function u(b,a,d,c,e){var h=e.soft,f=e.hard,l=c?"x":"y",r={x:a.x,y:a.y},k={x:a.x,y:a.y};e=b[l+"Max"]>=h[l+"Max"];var h=b[l+"Min"]<=h[l+"Min"],w=b[l+"Max"]>=f[l+"Max"],f=b[l+"Min"]<=f[l+"Min"],p=
n(b[l+"Min"]-a[l]),z=n(b[l+"Max"]-a[l]);d=10>n(p-z)?a[l]<d[l]:z<p;k[l]=b[l+"Min"];r[l]=b[l+"Max"];b=g(a,k,c)[l]!==k[l];a=g(a,r,c)[l]!==r[l];d=b?a?d:!0:a?!1:d;d=h?e?d:!0:e?!1:d;return f?w?d:!0:w?!1:d}function e(b,a,d){if(b.x===a.x&&b.y===a.y)return[];var c=d?"x":"y",h,l,r,k,w=f.obstacleOptions.margin;h={soft:{xMin:H,xMax:p,yMin:F,yMax:D},hard:f.hardBounds};l=x(y,b);-1<l?(l=y[l],h=u(l,b,a,d,h),m(l,f.hardBounds),k=d?{y:b.y,x:l[h?"xMax":"xMin"]+(h?1:-1)}:{x:b.x,y:l[h?"yMax":"yMin"]+(h?1:-1)},r=x(y,k),
-1<r&&(r=y[r],m(r,f.hardBounds),k[c]=h?q(l[c+"Max"]-w+1,(r[c+"Min"]+l[c+"Max"])/2):t(l[c+"Min"]+w-1,(r[c+"Max"]+l[c+"Min"])/2),b.x===k.x&&b.y===k.y?(E&&(k[c]=h?q(l[c+"Max"],r[c+"Max"])+1:t(l[c+"Min"],r[c+"Min"])-1),E=!E):E=!1),b=[{start:b,end:k}]):(c=g(b,{x:d?a.x:b.x,y:d?b.y:a.y},d),b=[{start:b,end:{x:c.x,y:c.y}}],c[d?"x":"y"]!==a[d?"x":"y"]&&(h=u(c.obstacle,c,a,!d,h),m(c.obstacle,f.hardBounds),h={x:d?c.x:c.obstacle[h?"xMax":"xMin"]+(h?1:-1),y:d?c.obstacle[h?"yMax":"yMin"]+(h?1:-1):c.y},d=!d,b=b.concat(e({x:c.x,
y:c.y},h,d))));return b=b.concat(e(b[b.length-1].end,a,!d))}function b(b,a,d){var c=t(b.xMax-a.x,a.x-b.xMin)<t(b.yMax-a.y,a.y-b.yMin);d=u(b,a,d,c,{soft:f.hardBounds,hard:f.hardBounds});return c?{y:a.y,x:b[d?"xMax":"xMin"]+(d?1:-1)}:{x:a.x,y:b[d?"yMax":"yMin"]+(d?1:-1)}}var d=B(f.startDirectionX,n(c.x-a.x)>n(c.y-a.y)),h=d?"x":"y",l,r,z=[],E=!1,w=f.obstacleMetrics,H=t(a.x,c.x)-w.maxWidth-10,p=q(a.x,c.x)+w.maxWidth+10,F=t(a.y,c.y)-w.maxHeight-10,D=q(a.y,c.y)+w.maxHeight+10,y=f.chartObstacles;l=v(y,H);
w=v(y,p);y=y.slice(l,w+1);-1<(w=x(y,c))&&(r=b(y[w],c,a),z.push({end:c,start:r}),c=r);for(;-1<(w=x(y,c));)l=0>c[h]-a[h],r={x:c.x,y:c.y},r[h]=y[w][l?h+"Max":h+"Min"]+(l?1:-1),z.push({end:c,start:r}),c=r;a=e(a,c,d);a=a.concat(z.reverse());return{path:k(a),obstacles:a}},{requiresObstacles:!0})}}(C);(function(c){c.SVGRenderer.prototype.symbols.arrow=function(c,x,k,m){return["M",c,x+m/2,"L",c+k,x,"L",c,x+m/2,"L",c+k,x+m]};c.SVGRenderer.prototype.symbols["arrow-half"]=function(v,x,k,m){return c.SVGRenderer.prototype.symbols.arrow(v,
x,k/2,m)};c.SVGRenderer.prototype.symbols["triangle-left"]=function(c,x,k,m){return["M",c+k,x,"L",c,x+m/2,"L",c+k,x+m,"Z"]};c.SVGRenderer.prototype.symbols["arrow-filled"]=c.SVGRenderer.prototype.symbols["triangle-left"];c.SVGRenderer.prototype.symbols["triangle-left-half"]=function(v,x,k,m){return c.SVGRenderer.prototype.symbols["triangle-left"](v,x,k/2,m)};c.SVGRenderer.prototype.symbols["arrow-filled-half"]=c.SVGRenderer.prototype.symbols["triangle-left-half"]})(C);(function(c,v){function x(b){var a=
b.shapeArgs;return a?{xMin:a.x,xMax:a.x+a.width,yMin:a.y,yMax:a.y+a.height}:(a=b.graphic&&b.graphic.getBBox())?{xMin:b.plotX-a.width/2,xMax:b.plotX+a.width/2,yMin:b.plotY-a.height/2,yMax:b.plotY+a.height/2}:null}function k(b){for(var a=b.length,c=0,f,g,k=[],n=function(b,a,c){c=A(c,10);var d=b.yMax+c>a.yMin-c&&b.yMin-c<a.yMax+c,h=b.xMax+c>a.xMin-c&&b.xMin-c<a.xMax+c,f=d?b.xMin>a.xMax?b.xMin-a.xMax:a.xMin-b.xMax:Infinity,l=h?b.yMin>a.yMax?b.yMin-a.yMax:a.yMin-b.yMax:Infinity;return h&&d?c?n(b,a,Math.floor(c/
2)):Infinity:e(f,l)};c<a;++c)for(f=c+1;f<a;++f)g=n(b[c],b[f]),80>g&&k.push(g);k.push(80);return u(Math.floor(k.sort(function(b,a){return b-a})[Math.floor(k.length/10)]/2-1),1)}function m(b,a,c){this.init(b,a,c)}function t(b){this.init(b)}function q(b){if(b.options.pathfinder||b.series.reduce(function(b,a){a.options&&f(!0,a.options.connectors=a.options.connectors||{},a.options.pathfinder);return b||a.options&&a.options.pathfinder},!1))f(!0,b.options.connectors=b.options.connectors||{},b.options.pathfinder),
c.error('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}var n=c.defined,B=c.deg2rad,a=c.extend,g=c.addEvent,f=c.merge,A=c.pick,u=Math.max,e=Math.min;a(c.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});m.prototype={init:function(b,a,c){this.fromPoint=b;this.toPoint=a;this.options=c;this.chart=
b.series.chart;this.pathfinder=this.chart.pathfinder},renderPath:function(b,a,c){var d=this.chart,e=d.styledMode,h=d.pathfinder,f=!d.options.chart.forExport&&!1!==c,g=this.graphics&&this.graphics.path;h.group||(h.group=d.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(d.seriesGroup));h.group.translate(d.plotLeft,d.plotTop);g&&g.renderer||(g=d.renderer.path().add(h.group),e||g.attr({opacity:0}));g.attr(a);b={d:b};e||(b.opacity=1);g[f?"animate":"attr"](b,c);this.graphics=
this.graphics||{};this.graphics.path=g},addMarker:function(b,a,c){var d=this.fromPoint.series.chart,e=d.pathfinder,d=d.renderer,h="start"===b?this.fromPoint:this.toPoint,f=h.getPathfinderAnchorPoint(a),g,k;a.enabled&&(c="start"===b?{x:c[4],y:c[5]}:{x:c[c.length-5],y:c[c.length-4]},c=h.getRadiansToVector(c,f),f=h.getMarkerVector(c,a.radius,f),c=-c/B,a.width&&a.height?(g=a.width,k=a.height):g=k=2*a.radius,this.graphics=this.graphics||{},f={x:f.x-g/2,y:f.y-k/2,width:g,height:k,rotation:c,rotationOriginX:f.x,
rotationOriginY:f.y},this.graphics[b]?this.graphics[b].animate(f):(this.graphics[b]=d.symbol(a.symbol).addClass("highcharts-point-connecting-path-"+b+"-marker").attr(f).add(e.group),d.styledMode||this.graphics[b].attr({fill:a.color||this.fromPoint.color,stroke:a.lineColor,"stroke-width":a.lineWidth,opacity:0}).animate({opacity:1},h.series.options.animation)))},getPath:function(b){var a=this.pathfinder,e=this.chart,g=a.algorithms[b.type],k=a.chartObstacles;if("function"!==typeof g)c.error('"'+b.type+
'" is not a Pathfinder algorithm.');else return g.requiresObstacles&&!k&&(k=a.chartObstacles=a.getChartObstacles(b),e.options.connectors.algorithmMargin=b.algorithmMargin,a.chartObstacleMetrics=a.getObstacleMetrics(k)),g(this.fromPoint.getPathfinderAnchorPoint(b.startMarker),this.toPoint.getPathfinderAnchorPoint(b.endMarker),f({chartObstacles:k,lineObstacles:a.lineObstacles||[],obstacleMetrics:a.chartObstacleMetrics,hardBounds:{xMin:0,xMax:e.plotWidth,yMin:0,yMax:e.plotHeight},obstacleOptions:{margin:b.algorithmMargin},
startDirectionX:a.getAlgorithmStartDirection(b.startMarker)},b))},render:function(){var b=this.fromPoint,a=b.series,c=a.chart,g=c.pathfinder,k=f(c.options.connectors,a.options.connectors,b.options.connectors,this.options),z={};c.styledMode||(z.stroke=k.lineColor||b.color,z["stroke-width"]=k.lineWidth,k.dashStyle&&(z.dashstyle=k.dashStyle));z.class="highcharts-point-connecting-path highcharts-color-"+b.colorIndex;k=f(z,k);n(k.marker.radius)||(k.marker.radius=e(u(Math.ceil((k.algorithmMargin||8)/2)-
1,1),5));b=this.getPath(k);c=b.path;b.obstacles&&(g.lineObstacles=g.lineObstacles||[],g.lineObstacles=g.lineObstacles.concat(b.obstacles));this.renderPath(c,z,a.options.animation);this.addMarker("start",f(k.marker,k.startMarker),c);this.addMarker("end",f(k.marker,k.endMarker),c)},destroy:function(){this.graphics&&(c.objectEach(this.graphics,function(b){b.destroy()}),delete this.graphics)}};t.prototype={algorithms:v,init:function(b){this.chart=b;this.connections=[];g(b,"redraw",function(){this.pathfinder.update()})},
update:function(b){var a=this.chart,e=this,f=e.connections;e.connections=[];a.series.forEach(function(b){b.visible&&b.points.forEach(function(b){var d,h=b.options&&b.options.connect&&c.splat(b.options.connect);b.visible&&!1!==b.isInside&&h&&h.forEach(function(h){d=a.get("string"===typeof h?h:h.to);d instanceof c.Point&&d.series.visible&&d.visible&&!1!==d.isInside&&e.connections.push(new m(b,d,"string"===typeof h?{}:h))})})});for(var g=0,k,n,w=f.length,q=e.connections.length;g<w;++g){n=!1;for(k=0;k<
q;++k)if(f[g].fromPoint===e.connections[k].fromPoint&&f[g].toPoint===e.connections[k].toPoint){e.connections[k].graphics=f[g].graphics;n=!0;break}n||f[g].destroy()}delete this.chartObstacles;delete this.lineObstacles;e.renderConnections(b)},renderConnections:function(b){b?this.chart.series.forEach(function(b){var a=function(){var a=b.chart.pathfinder;(a&&a.connections||[]).forEach(function(a){a.fromPoint&&a.fromPoint.series===b&&a.render()});b.pathfinderRemoveRenderEvent&&(b.pathfinderRemoveRenderEvent(),
delete b.pathfinderRemoveRenderEvent)};!1===b.options.animation?a():b.pathfinderRemoveRenderEvent=g(b,"afterAnimate",a)}):this.connections.forEach(function(b){b.render()})},getChartObstacles:function(b){for(var a=[],c=this.chart.series,e=A(b.algorithmMargin,0),f,g=0,m=c.length;g<m;++g)if(c[g].visible)for(var w=0,q=c[g].points.length,p;w<q;++w)p=c[g].points[w],p.visible&&(p=x(p))&&a.push({xMin:p.xMin-e,xMax:p.xMax+e,yMin:p.yMin-e,yMax:p.yMax+e});a=a.sort(function(b,a){return b.xMin-a.xMin});n(b.algorithmMargin)||
(f=b.algorithmMargin=k(a),a.forEach(function(b){b.xMin-=f;b.xMax+=f;b.yMin-=f;b.yMax+=f}));return a},getObstacleMetrics:function(b){for(var a=0,c=0,e,f,g=b.length;g--;)e=b[g].xMax-b[g].xMin,f=b[g].yMax-b[g].yMin,a<e&&(a=e),c<f&&(c=f);return{maxHeight:c,maxWidth:a}},getAlgorithmStartDirection:function(b){var a="top"!==b.verticalAlign&&"bottom"!==b.verticalAlign;return"left"!==b.align&&"right"!==b.align?a?void 0:!1:a?!0:void 0}};c.Connection=m;c.Pathfinder=t;a(c.Point.prototype,{getPathfinderAnchorPoint:function(b){var a=
x(this),c,e;switch(b.align){case "right":c="xMax";break;case "left":c="xMin"}switch(b.verticalAlign){case "top":e="yMin";break;case "bottom":e="yMax"}return{x:c?a[c]:(a.xMin+a.xMax)/2,y:e?a[e]:(a.yMin+a.yMax)/2}},getRadiansToVector:function(b,a){n(a)||(a=x(this),a={x:(a.xMin+a.xMax)/2,y:(a.yMin+a.yMax)/2});return Math.atan2(a.y-b.y,b.x-a.x)},getMarkerVector:function(b,a,c){for(var e=2*Math.PI,d=x(this),f=d.xMax-d.xMin,g=d.yMax-d.yMin,h=Math.atan2(g,f),k=!1,f=f/2,n=g/2,m=d.xMin+f,d=d.yMin+n,q=m,u=
d,t={},v=1,A=1;b<-Math.PI;)b+=e;for(;b>Math.PI;)b-=e;e=Math.tan(b);b>-h&&b<=h?(A=-1,k=!0):b>h&&b<=Math.PI-h?A=-1:b>Math.PI-h||b<=-(Math.PI-h)?(v=-1,k=!0):v=-1;k?(q+=v*f,u+=A*f*e):(q+=g/(2*e)*v,u+=A*n);c.x!==m&&(q=c.x);c.y!==d&&(u=c.y);t.x=q+a*Math.cos(b);t.y=u-a*Math.sin(b);return t}});c.Chart.prototype.callbacks.push(function(b){!1!==b.options.connectors.enabled&&(q(b),this.pathfinder=new t(this),this.pathfinder.update(!0))})})(C,K);(function(c){var v=c.addEvent,x=c.defined,k=c.Color,m=c.seriesTypes.column,
t=c.correctFloat,q=c.isNumber,n=c.isObject,B=c.merge,a=c.pick,g=c.seriesType,f=c.Axis,A=c.Point,u=c.Series;g("xrange","column",{colorByPoint:!0,dataLabels:{verticalAlign:"middle",inside:!0,formatter:function(){var a=this.point.partialFill;n(a)&&(a=a.amount);x(a)||(a=0);return t(100*a)+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{point.x} - {point.x2}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cb\x3e{point.yCategory}\x3c/b\x3e\x3cbr/\x3e'},
borderRadius:3,pointRange:0},{type:"xrange",parallelArrays:["x","x2","y"],requireSorting:!1,animate:c.seriesTypes.line.prototype.animate,cropShoulder:1,getExtremesFromAll:!0,autoIncrement:c.noop,getColumnMetrics:function(){function a(){c.series.forEach(function(b){var a=b.xAxis;b.xAxis=b.yAxis;b.yAxis=a})}var b,c=this.chart;a();b=m.prototype.getColumnMetrics.call(this);a();return b},cropData:function(a,b,c,f){b=u.prototype.cropData.call(this,this.x2Data,b,c,f);b.xData=a.slice(b.start,b.end);return b},
translatePoint:function(c){var b=this.xAxis,e=this.yAxis,f=this.columnMetrics,g=this.options,k=g.minPointLength||0,m=c.plotX,u=a(c.x2,c.x+(c.len||0)),w=b.translate(u,0,0,0,1),u=Math.abs(w-m),t=this.chart.inverted,p=a(g.borderWidth,1)%2/2,v=f.offset,A=Math.round(f.width);k&&(k-=u,0>k&&(k=0),m-=k/2,w+=k/2);m=Math.max(m,-10);w=Math.min(Math.max(w,-10),b.len+10);x(c.options.pointWidth)&&(v-=(Math.ceil(c.options.pointWidth)-A)/2,A=Math.ceil(c.options.pointWidth));g.pointPlacement&&q(c.plotY)&&e.categories&&
(c.plotY=e.translate(c.y,0,1,0,1,g.pointPlacement));c.shapeArgs={x:Math.floor(Math.min(m,w))+p,y:Math.floor(c.plotY+v)+p,width:Math.round(Math.abs(w-m)),height:A,r:this.options.borderRadius};e=c.shapeArgs.x;g=e+c.shapeArgs.width;0>e||g>b.len?(e=Math.min(b.len,Math.max(0,e)),g=Math.max(0,Math.min(g,b.len)),b=g-e,c.dlBox=B(c.shapeArgs,{x:e,width:g-e,centerX:b?b/2:null})):c.dlBox=null;c.tooltipPos[0]+=t?0:u/2;c.tooltipPos[1]-=t?-u/2:f.width/2;if(b=c.partialFill)n(b)&&(b=b.amount),q(b)||(b=0),f=c.shapeArgs,
c.partShapeArgs={x:f.x,y:f.y,width:f.width,height:f.height,r:this.options.borderRadius},c.clipRectArgs={x:f.x,y:f.y,width:Math.max(Math.round(u*b+(c.plotX-m)),0),height:f.height}},translate:function(){m.prototype.translate.apply(this,arguments);this.points.forEach(function(a){this.translatePoint(a)},this)},drawPoint:function(a,b){var c=this.options,e=this.chart.renderer,f=a.graphic,g=a.shapeType,m=a.shapeArgs,u=a.partShapeArgs,q=a.clipRectArgs,t=a.partialFill,p=a.selected&&"select",v=c.stacking&&
!c.borderRadius;if(a.isNull)f&&(a.graphic=f.destroy());else{if(f)a.graphicOriginal[b](B(m));else a.graphic=f=e.g("point").addClass(a.getClassName()).add(a.group||this.group),a.graphicOriginal=e[g](m).addClass(a.getClassName()).addClass("highcharts-partfill-original").add(f);u&&(a.graphicOverlay?(a.graphicOverlay[b](B(u)),a.clipRect.animate(B(q))):(a.clipRect=e.clipRect(q.x,q.y,q.width,q.height),a.graphicOverlay=e[g](u).addClass("highcharts-partfill-overlay").add(f).clip(a.clipRect)));this.chart.styledMode||
(a.graphicOriginal.attr(this.pointAttribs(a,p)).shadow(c.shadow,null,v),u&&(n(t)||(t={}),n(c.partialFill)&&(t=B(t,c.partialFill)),b=t.fill||k(a.color||this.color).brighten(-.3).get(),a.graphicOverlay.attr(this.pointAttribs(a,p)).attr({fill:b}).shadow(c.shadow,null,v)))}},drawPoints:function(){var a=this,b=a.getAnimationVerb();a.points.forEach(function(c){a.drawPoint(c,b)})},getAnimationVerb:function(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}},{applyOptions:function(){var a,
b=A.prototype.applyOptions.apply(this,arguments),c=b.series;if(c.options.colorByPoint&&!b.options.color){a=c.options.colors||c.chart.options.colors;var f=b.y%(a?a.length:c.chart.options.chart.colorCount);a=a&&a[f];c.chart.styledMode||(b.color=a);b.options.colorIndex||(b.colorIndex=f)}return b},init:function(){A.prototype.init.apply(this,arguments);this.y||(this.y=0);return this},setState:function(){A.prototype.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())},
getLabelConfig:function(){var a=A.prototype.getLabelConfig.call(this),b=this.series.yAxis.categories;a.x2=this.x2;a.yCategory=this.yCategory=b&&b[this.y];return a},tooltipDateKeys:["x","x2"],isValid:function(){return"number"===typeof this.x&&"number"===typeof this.x2}});v(f,"afterGetSeriesExtremes",function(){var c=this.series,b,d;this.isXAxis&&(b=a(this.dataMax,-Number.MAX_VALUE),c.forEach(function(a){a.x2Data&&a.x2Data.forEach(function(a){a>b&&(b=a,d=!0)})}),d&&(this.dataMax=b))})})(C);(function(c){var v=
c.dateFormat,x=c.isObject,k=c.isNumber,m=c.merge,t=c.pick,q=c.seriesType,n=c.stop,B=c.seriesTypes.xrange;q("gantt","xrange",{grouping:!1,dataLabels:{enabled:!0,formatter:function(){var a=this.point.partialFill;x(a)&&(a=a.amount);if(k(a)&&0<a)return 100*a+"%"}},tooltip:{headerFormat:'\x3cspan style\x3d"font-size: 10px"\x3e{series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:null,pointFormatter:function(){var a=this.series,g=a.chart.tooltip,f=a.xAxis,k=f.options.dateTimeLabelFormats,n=f.options.startOfWeek,
e=a.tooltipOptions,b=e.xDateFormat,d=this.end?this.end-this.start:0,a=this.options.milestone,f="\x3cb\x3e"+(this.name||this.yCategory)+"\x3c/b\x3e";if(e.pointFormat)return this.tooltipFormatter(e.pointFormat);b||(b=c.splat(g.getDateFormat(d,this.start,n,k))[0]);g=v(b,this.start);k=v(b,this.end);f+="\x3cbr/\x3e";return a?f+("Date "+g+"\x3cbr/\x3e"):f+("Start: "+g+"\x3cbr/\x3e")+("End: "+k+"\x3cbr/\x3e")}},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){var c,f;B.prototype.translatePoint.call(this,a);a.options.milestone&&(c=a.shapeArgs,f=c.height,a.shapeArgs={x:c.x-f/2,y:c.y,width:f,height:f})},drawPoint:function(a,c){var f=this.options,g=this.chart.renderer,m=a.shapeArgs,e=a.plotY,b=a.graphic,d=a.selected&&"select",h=f.stacking&&!f.borderRadius;a.options.milestone?k(e)&&null!==a.y?(m=g.symbols.diamond(m.x,
m.y,m.width,m.height),b?(n(b),b[c]({d:m})):a.graphic=g.path(m).addClass(a.getClassName(),!0).add(a.group||this.group),this.chart.styledMode||a.graphic.attr(this.pointAttribs(a,d)).shadow(f.shadow,null,h)):b&&(a.graphic=b.destroy()):B.prototype.drawPoint.call(this,a,c)},setData:c.Series.prototype.setData,setGanttPointAliases:function(a){function c(c,g){void 0!==g&&(a[c]=g)}c("x",t(a.start,a.x));c("x2",t(a.end,a.x2));c("partialFill",t(a.completed,a.partialFill));c("connect",t(a.dependency,a.connect))}},
m(B.prototype.pointClass.prototype,{applyOptions:function(a,g){a=m(a);c.seriesTypes.gantt.prototype.setGanttPointAliases(a);return a=B.prototype.pointClass.prototype.applyOptions.call(this,a,g)}}))})(C);(function(c){var v=c.merge,x=c.splat,k=c.Chart;c.ganttChart=function(m,t,q){var n="string"===typeof m||m.nodeName,B=t.series,a=c.getOptions(),g,f=t;t=arguments[n?1:0];c.isArray(t.xAxis)||(t.xAxis=[t.xAxis||{},{}]);t.xAxis=t.xAxis.map(function(c,f){1===f&&(g=0);return v(a.xAxis,{grid:{enabled:!0},opposite:!0,
linkedTo:g},c,{type:"datetime"})});t.yAxis=x(t.yAxis||{}).map(function(c){return v(a.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:c.categories?c.type:"treegrid"},c)});t.series=null;t=v(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1}},t,{isGantt:!0});t.series=f.series=B;t.series.forEach(function(a){a.data.forEach(function(a){c.seriesTypes.gantt.prototype.setGanttPointAliases(a)})});return n?new k(m,t,q):new k(t,t)}})(C)});
//# sourceMappingURL=gantt.js.map
