/*
 Highcharts JS v5.0.14 (2017-07-28)
 Highstock as a plugin for Highcharts

 (c) 2017 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(K){"object"===typeof module&&module.exports?module.exports=K:K(Highcharts)})(function(K){(function(a){var B=a.addEvent,m=a.Axis,t=a.Chart,w=a.css,C=a.dateFormat,G=a.defined,J=a.each,r=a.extend,q=a.noop,A=a.timeUnits,F=a.wrap;F(a.Series.prototype,"init",function(a){var d;a.apply(this,Array.prototype.slice.call(arguments,1));(d=this.xAxis)&&d.options.ordinal&&B(this,"updatedData",function(){delete d.ordinalIndex})});F(m.prototype,"getTimeTicks",function(a,d,b,e,D,n,g,f){var k=0,x,u,c={},h,
l,z,p=[],v=-Number.MAX_VALUE,I=this.options.tickPixelInterval;if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===b)return a.call(this,d,b,e,D);l=n.length;for(x=0;x<l;x++){z=x&&n[x-1]>e;n[x]<b&&(k=x);if(x===l-1||n[x+1]-n[x]>5*g||z){if(n[x]>v){for(u=a.call(this,d,n[k],n[x],D);u.length&&u[0]<=v;)u.shift();u.length&&(v=u[u.length-1]);p=p.concat(u)}k=x+1}if(z)break}a=u.info;if(f&&a.unitRange<=A.hour){x=p.length-1;for(k=1;k<x;k++)C("%d",p[k])!==C("%d",p[k-1])&&(c[p[k]]="day",h=!0);
h&&(c[p[0]]="day");a.higherRanks=c}p.info=a;if(f&&G(I)){f=a=p.length;x=[];var H;for(h=[];f--;)k=this.translate(p[f]),H&&(h[f]=H-k),x[f]=H=k;h.sort();h=h[Math.floor(h.length/2)];h<.6*I&&(h=null);f=p[a-1]>e?a-1:a;for(H=void 0;f--;)k=x[f],e=Math.abs(H-k),H&&e<.8*I&&(null===h||e<.8*h)?(c[p[f]]&&!c[p[f+1]]?(e=f+1,H=k):e=f,p.splice(e,1)):H=k}return p});r(m.prototype,{beforeSetTickPositions:function(){var a,d=[],b=!1,e,D=this.getExtremes(),n=D.min,g=D.max,f,E=this.isXAxis&&!!this.options.breaks,D=this.options.ordinal,
x=this.chart.options.chart.ignoreHiddenSeries;if(D||E){J(this.series,function(g,c){if(!(x&&!1===g.visible||!1===g.takeOrdinalPosition&&!E)&&(d=d.concat(g.processedXData),a=d.length,d.sort(function(h,c){return h-c}),a))for(c=a-1;c--;)d[c]===d[c+1]&&d.splice(c,1)});a=d.length;if(2<a){e=d[1]-d[0];for(f=a-1;f--&&!b;)d[f+1]-d[f]!==e&&(b=!0);!this.options.keepOrdinalPadding&&(d[0]-n>e||g-d[d.length-1]>e)&&(b=!0)}b?(this.ordinalPositions=d,e=this.ordinal2lin(Math.max(n,d[0]),!0),f=Math.max(this.ordinal2lin(Math.min(g,
d[d.length-1]),!0),1),this.ordinalSlope=g=(g-n)/(f-e),this.ordinalOffset=n-e*g):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=D&&b;this.groupIntervalFactor=null},val2lin:function(a,d){var b=this.ordinalPositions;if(b){var e=b.length,k,n;for(k=e;k--;)if(b[k]===a){n=k;break}for(k=e-1;k--;)if(a>b[k]||0===k){a=(a-b[k])/(b[k+1]-b[k]);n=k+a;break}d=d?n:this.ordinalSlope*(n||0)+this.ordinalOffset}else d=a;return d},lin2val:function(a,d){var b=this.ordinalPositions;if(b){var e=
this.ordinalSlope,k=this.ordinalOffset,n=b.length-1,g;if(d)0>a?a=b[0]:a>n?a=b[n]:(n=Math.floor(a),g=a-n);else for(;n--;)if(d=e*n+k,a>=d){e=e*(n+1)+k;g=(a-d)/(e-d);break}return void 0!==g&&void 0!==b[n]?b[n]+(g?g*(b[n+1]-b[n]):0):a}return a},getExtendedPositions:function(){var a=this.chart,d=this.series[0].currentDataGrouping,b=this.ordinalIndex,e=d?d.count+d.unitName:"raw",D=this.getExtremes(),n,g;b||(b=this.ordinalIndex={});b[e]||(n={series:[],chart:a,getExtremes:function(){return{min:D.dataMin,
max:D.dataMax}},options:{ordinal:!0},val2lin:m.prototype.val2lin,ordinal2lin:m.prototype.ordinal2lin},J(this.series,function(f){g={xAxis:n,xData:f.xData,chart:a,destroyGroupedData:q};g.options={dataGrouping:d?{enabled:!0,forced:!0,approximation:"open",units:[[d.unitName,[d.count]]]}:{enabled:!1}};f.processData.apply(g);n.series.push(g)}),this.beforeSetTickPositions.apply(n),b[e]=n.ordinalPositions);return b[e]},getGroupIntervalFactor:function(a,d,b){var e;b=b.processedXData;var k=b.length,n=[];e=
this.groupIntervalFactor;if(!e){for(e=0;e<k-1;e++)n[e]=b[e+1]-b[e];n.sort(function(g,a){return g-a});n=n[Math.floor(k/2)];a=Math.max(a,b[0]);d=Math.min(d,b[k-1]);this.groupIntervalFactor=e=k*n/(d-a)}return e},postProcessTickInterval:function(a){var d=this.ordinalSlope;return d?this.options.breaks?this.closestPointRange:a/(d/this.closestPointRange):a}});m.prototype.ordinal2lin=m.prototype.val2lin;F(t.prototype,"pan",function(a,d){var b=this.xAxis[0],e=d.chartX,k=!1;if(b.options.ordinal&&b.series.length){var n=
this.mouseDownX,g=b.getExtremes(),f=g.dataMax,E=g.min,x=g.max,u=this.hoverPoints,c=b.closestPointRange,n=(n-e)/(b.translationSlope*(b.ordinalSlope||c)),h={ordinalPositions:b.getExtendedPositions()},c=b.lin2val,l=b.val2lin,z;h.ordinalPositions?1<Math.abs(n)&&(u&&J(u,function(p){p.setState()}),0>n?(u=h,z=b.ordinalPositions?b:h):(u=b.ordinalPositions?b:h,z=h),h=z.ordinalPositions,f>h[h.length-1]&&h.push(f),this.fixedRange=x-E,n=b.toFixedRange(null,null,c.apply(u,[l.apply(u,[E,!0])+n,!0]),c.apply(z,[l.apply(z,
[x,!0])+n,!0])),n.min>=Math.min(g.dataMin,E)&&n.max<=Math.max(f,x)&&b.setExtremes(n.min,n.max,!0,!1,{trigger:"pan"}),this.mouseDownX=e,w(this.container,{cursor:"move"})):k=!0}else k=!0;k&&a.apply(this,Array.prototype.slice.call(arguments,1))})})(K);(function(a){function B(){return Array.prototype.slice.call(arguments,1)}function m(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,t(this.pointArrayMap,["y"]))}var t=a.pick,w=a.wrap,C=a.each,G=a.extend,J=a.isArray,r=a.fireEvent,
q=a.Axis,A=a.Series;G(q.prototype,{isInBreak:function(a,k){var d=a.repeat||Infinity,b=a.from,e=a.to-a.from;k=k>=b?(k-b)%d:d-(b-k)%d;return a.inclusive?k<=e:k<e&&0!==k},isInAnyBreak:function(a,k){var d=this.options.breaks,b=d&&d.length,e,q,n;if(b){for(;b--;)this.isInBreak(d[b],a)&&(e=!0,q||(q=t(d[b].showPoints,this.isXAxis?!1:!0)));n=e&&k?e&&!q:e}return n}});w(q.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var k=this.tickPositions,
d=this.tickPositions.info,b=[],e;for(e=0;e<k.length;e++)this.isInAnyBreak(k[e])||b.push(k[e]);this.tickPositions=b;this.tickPositions.info=d}});w(q.prototype,"init",function(a,k,d){var b=this;d.breaks&&d.breaks.length&&(d.ordinal=!1);a.call(this,k,d);a=this.options.breaks;b.isBroken=J(a)&&!!a.length;b.isBroken&&(b.val2lin=function(a){var d=a,e,g;for(g=0;g<b.breakArray.length;g++)if(e=b.breakArray[g],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},b.lin2val=
function(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},b.setExtremes=function(a,d,b,g,f){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(d);)d-=this.closestPointRange;q.prototype.setExtremes.call(this,a,d,b,g,f)},b.setAxisTranslation=function(a){q.prototype.setAxisTranslation.call(this,a);a=b.options.breaks;var d=[],k=[],g=0,f,e,x=b.userMin||b.min,u=b.userMax||b.max,c=t(b.pointRangePadding,
0),h,l;C(a,function(c){e=c.repeat||Infinity;b.isInBreak(c,x)&&(x+=c.to%e-x%e);b.isInBreak(c,u)&&(u-=u%e-c.from%e)});C(a,function(c){h=c.from;for(e=c.repeat||Infinity;h-e>x;)h-=e;for(;h<x;)h+=e;for(l=h;l<u;l+=e)d.push({value:l,move:"in"}),d.push({value:l+(c.to-c.from),move:"out",size:c.breakSize})});d.sort(function(c,p){return c.value===p.value?("in"===c.move?0:1)-("in"===p.move?0:1):c.value-p.value});f=0;h=x;C(d,function(c){f+="in"===c.move?1:-1;1===f&&"in"===c.move&&(h=c.value);0===f&&(k.push({from:h,
to:c.value,len:c.value-h-(c.size||0)}),g+=c.value-h-(c.size||0))});b.breakArray=k;b.unitLength=u-x-g+c;r(b,"afterBreaks");b.options.staticScale?b.transA=b.options.staticScale:b.unitLength&&(b.transA*=(u-b.min+c)/b.unitLength);c&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=x;b.max=u})});w(A.prototype,"generatePoints",function(a){a.apply(this,B(arguments));var k=this.xAxis,d=this.yAxis,b=this.points,e,q=b.length,n=this.options.connectNulls,g;if(k&&d&&(k.options.breaks||d.options.breaks))for(;q--;)e=
b[q],g=null===e.y&&!1===n,g||!k.isInAnyBreak(e.x,!0)&&!d.isInAnyBreak(e.y,!0)||(b.splice(q,1),this.data[q]&&this.data[q].destroyElements())});a.Series.prototype.drawBreaks=function(a,k){var d=this,b=d.points,e,q,n,g;a&&C(k,function(f){e=a.breakArray||[];q=a.isXAxis?a.min:t(d.options.threshold,a.min);C(b,function(d){g=t(d["stack"+f.toUpperCase()],d[f]);C(e,function(f){n=!1;if(q<f.from&&g>f.to||q>f.from&&g<f.from)n="pointBreak";else if(q<f.from&&g>f.from&&g<f.to||q>f.from&&g>f.to&&g<f.from)n="pointInBreak";
n&&r(a,n,{point:d,brk:f})})})})};a.Series.prototype.gappedPath=function(){var q=this.options.gapSize,k=this.points.slice(),d=k.length-1,b=this.yAxis,e;if(q&&0<d)for("value"!==this.options.gapUnit&&(q*=this.closestPointRange);d--;)k[d+1].x-k[d].x>q&&(e=(k[d].x+k[d+1].x)/2,k.splice(d+1,0,{isNull:!0,x:e}),this.options.stacking&&(e=b.stacks[this.stackKey][e]=new a.StackItem(b,b.options.stackLabels,!1,e,this.stack),e.total=0));return this.getGraphPath(k)};w(a.seriesTypes.column.prototype,"drawPoints",
m);w(a.Series.prototype,"drawPoints",m)})(K);(function(a){var B=a.arrayMax,m=a.arrayMin,t=a.Axis,w=a.defaultPlotOptions,C=a.defined,G=a.each,J=a.extend,r=a.format,q=a.isNumber,A=a.merge,F=a.pick,k=a.Point,d=a.Tooltip,b=a.wrap,e=a.Series.prototype,D=e.processData,n=e.generatePoints,g=e.destroy,f={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],
minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},E={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",
groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},x=a.defaultDataGroupingUnits=[["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]],["week",[1]],["month",[1,3,6]],["year",null]],u={sum:function(c){var a=c.length,l;if(!a&&c.hasNulls)l=null;else if(a)for(l=0;a--;)l+=c[a];return l},average:function(c){var a=c.length;c=u.sum(c);q(c)&&a&&(c/=a);return c},averages:function(){var c=[];G(arguments,function(a){c.push(u.average(a))});
return c},open:function(c){return c.length?c[0]:c.hasNulls?null:void 0},high:function(c){return c.length?B(c):c.hasNulls?null:void 0},low:function(c){return c.length?m(c):c.hasNulls?null:void 0},close:function(c){return c.length?c[c.length-1]:c.hasNulls?null:void 0},ohlc:function(c,a,l,g){c=u.open(c);a=u.high(a);l=u.low(l);g=u.close(g);if(q(c)||q(a)||q(l)||q(g))return[c,a,l,g]},range:function(c,a){c=u.low(c);a=u.high(a);if(q(c)||q(a))return[c,a];if(null===c&&null===a)return null}};e.groupData=function(c,
a,l,g){var p=this.data,v=this.options.data,h=[],d=[],b=[],z=c.length,y,e,k=!!a,n=[];g="function"===typeof g?g:u[g]||E[this.type]&&u[E[this.type].approximation]||u[f.approximation];var x=this.pointArrayMap,N=x&&x.length,A=0;e=0;var r,m;N?G(x,function(){n.push([])}):n.push([]);r=N||1;for(m=0;m<=z&&!(c[m]>=l[0]);m++);for(m;m<=z;m++){for(;void 0!==l[A+1]&&c[m]>=l[A+1]||m===z;){y=l[A];this.dataGroupInfo={start:e,length:n[0].length};e=g.apply(this,n);void 0!==e&&(h.push(y),d.push(e),b.push(this.dataGroupInfo));
e=m;for(y=0;y<r;y++)n[y].length=0,n[y].hasNulls=!1;A+=1;if(m===z)break}if(m===z)break;if(x){y=this.cropStart+m;var F=p&&p[y]||this.pointClass.prototype.applyOptions.apply({series:this},[v[y]]),C;for(y=0;y<N;y++)C=F[x[y]],q(C)?n[y].push(C):null===C&&(n[y].hasNulls=!0)}else y=k?a[m]:null,q(y)?n[0].push(y):null===y&&(n[0].hasNulls=!0)}return[h,d,b]};e.processData=function(){var c=this.chart,a=this.options.dataGrouping,l=!1!==this.allowDG&&a&&F(a.enabled,c.options.isStock),g=this.visible||!c.options.chart.ignoreHiddenSeries,
p;this.forceCrop=l;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==D.apply(this,arguments)&&l){this.destroyGroupedData();var v=this.processedXData,f=this.processedYData,d=c.plotSizeX,c=this.xAxis,b=c.options.ordinal,M=this.groupPixelWidth=c.getGroupPixelWidth&&c.getGroupPixelWidth();if(M){this.isDirty=p=!0;this.points=null;var y=c.getExtremes(),l=y.min,y=y.max,b=b&&c.getGroupIntervalFactor(l,y,this)||1,d=M*(y-l)/d*b,M=c.getTimeTicks(c.normalizeTimeTickInterval(d,a.units||x),Math.min(l,v[0]),
Math.max(y,v[v.length-1]),c.options.startOfWeek,v,this.closestPointRange),v=e.groupData.apply(this,[v,f,M,a.approximation]),f=v[0],b=v[1];if(a.smoothed){a=f.length-1;for(f[a]=Math.min(f[a],y);a--&&0<a;)f[a]+=d/2;f[0]=Math.max(f[0],l)}this.currentDataGrouping=M.info;this.closestPointRange=M.info.totalRange;this.groupMap=v[2];C(f[0])&&f[0]<c.dataMin&&g&&(c.min===c.dataMin&&(c.min=f[0]),c.dataMin=f[0]);this.processedXData=f;this.processedYData=b}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=
p}};e.destroyGroupedData=function(){var a=this.groupedData;G(a||[],function(c,l){c&&(a[l]=c.destroy?c.destroy():null)});this.groupedData=null};e.generatePoints=function(){n.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};b(k.prototype,"update",function(c){this.dataGroup?a.error(24):c.apply(this,[].slice.call(arguments,1))});b(d.prototype,"tooltipFooterHeaderFormatter",function(c,g,l){var f=g.series,p=f.tooltipOptions,v=f.options.dataGrouping,h=p.xDateFormat,
d,b=f.xAxis,e=a.dateFormat;return b&&"datetime"===b.options.type&&v&&q(g.key)?(c=f.currentDataGrouping,v=v.dateTimeLabelFormats,c?(b=v[c.unitName],1===c.count?h=b[0]:(h=b[1],d=b[2])):!h&&v&&(h=this.getXDateFormat(g,p,b)),h=e(h,g.key),d&&(h+=e(d,g.key+c.totalRange-1)),r(p[(l?"footer":"header")+"Format"],{point:J(g.point,{key:h}),series:f})):c.call(this,g,l)});e.destroy=function(){for(var a=this.groupedData||[],f=a.length;f--;)a[f]&&a[f].destroy();g.apply(this)};b(e,"setOptions",function(a,g){a=a.call(this,
g);var c=this.type,h=this.chart.options.plotOptions,p=w[c].dataGrouping;E[c]&&(p||(p=A(f,E[c])),a.dataGrouping=A(p,h.series&&h.series.dataGrouping,h[c].dataGrouping,g.dataGrouping));this.chart.options.isStock&&(this.requireSorting=!0);return a});b(t.prototype,"setScale",function(a){a.call(this);G(this.series,function(a){a.hasProcessed=!1})});t.prototype.getGroupPixelWidth=function(){var a=this.series,g=a.length,l,f=0,p=!1,v;for(l=g;l--;)(v=a[l].options.dataGrouping)&&(f=Math.max(f,v.groupPixelWidth));
for(l=g;l--;)(v=a[l].options.dataGrouping)&&a[l].hasProcessed&&(g=(a[l].processedXData||a[l].data).length,a[l].groupPixelWidth||g>this.chart.plotSizeX/f||g&&v.forced)&&(p=!0);return p?f:0};t.prototype.setDataGrouping=function(a,g){var c;g=F(g,!0);a||(a={forced:!1,units:null});if(this instanceof t)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else G(this.chart.options.series,function(c){c.dataGrouping=a},!1);g&&this.chart.redraw()}})(K);(function(a){var B=a.each,m=a.Point,
t=a.seriesType,w=a.seriesTypes;t("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'},threshold:null},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",translate:function(){var a=
this,m=a.yAxis,t=!!a.modifyValue,r=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];w.column.prototype.translate.apply(a);B(a.points,function(q){B([q.open,q.high,q.low,q.close,q.low],function(A,F){null!==A&&(t&&(A=a.modifyValue(A)),q[r[F]]=m.toPixels(A,!0))});q.tooltipPos[1]=q.plotHigh+m.pos-a.chart.plotTop})},drawPoints:function(){var a=this,m=a.chart;B(a.points,function(t){var r,q,A,F,k=t.graphic,d,b=!k;void 0!==t.plotY&&(k||(t.graphic=k=m.renderer.path().add(a.group)),q=k.strokeWidth()%
2/2,d=Math.round(t.plotX)-q,A=Math.round(t.shapeArgs.width/2),F=["M",d,Math.round(t.yBottom),"L",d,Math.round(t.plotHigh)],null!==t.open&&(r=Math.round(t.plotOpen)+q,F.push("M",d,r,"L",d-A,r)),null!==t.close&&(r=Math.round(t.plotClose)+q,F.push("M",d,r,"L",d+A,r)),k[b?"attr":"animate"]({d:F}).addClass(t.getClassName(),!0))})},animate:null},{getClassName:function(){return m.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(K);(function(a){var B=
a.defaultPlotOptions,m=a.each,t=a.merge;a=a.seriesType;a("candlestick","ohlc",t(B.column,{states:{hover:{lineWidth:2}},tooltip:B.ohlc.tooltip,threshold:null}),{drawPoints:function(){var a=this,t=a.chart;m(a.points,function(m){var w=m.graphic,r,q,A,F,k,d,b,e=!w;void 0!==m.plotY&&(w||(m.graphic=w=t.renderer.path().add(a.group)),k=w.strokeWidth()%2/2,d=Math.round(m.plotX)-k,r=m.plotOpen,q=m.plotClose,A=Math.min(r,q),r=Math.max(r,q),b=Math.round(m.shapeArgs.width/2),q=Math.round(A)!==Math.round(m.plotHigh),
F=r!==m.yBottom,A=Math.round(A)+k,r=Math.round(r)+k,k=[],k.push("M",d-b,r,"L",d-b,A,"L",d+b,A,"L",d+b,r,"Z","M",d,A,"L",d,q?Math.round(m.plotHigh):A,"M",d,r,"L",d,F?Math.round(m.yBottom):r),w[e?"attr":"animate"]({d:k}).addClass(m.getClassName(),!0))})}})})(K);(function(a){var B=a.addEvent,m=a.each,t=a.noop,w=a.seriesType,C=a.seriesTypes,G=a.TrackerMixin,J=a.SVGRenderer.prototype.symbols,r=a.stableSort;w("flags","column",{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},
threshold:null,y:-30},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,translate:function(){C.column.prototype.translate.apply(this);var a=this.options,A=this.chart,t=this.points,k=t.length-1,d,b,e=a.onSeries;d=e&&A.get(e);var a=a.onKey||"y",e=d&&d.options.step,w=d&&d.points,n=w&&w.length,g=this.xAxis,f=this.yAxis,E=g.getExtremes(),x=0,u,c,h;if(d&&d.visible&&n)for(x=(d.pointXOffset||0)+(d.barW||0)/2,d=d.currentDataGrouping,
c=w[n-1].x+(d?d.totalRange:0),r(t,function(a,c){return a.x-c.x}),a="plot"+a[0].toUpperCase()+a.substr(1);n--&&t[k]&&!(d=t[k],u=w[n],u.x<=d.x&&void 0!==u[a]&&(d.x<=c&&(d.plotY=u[a],u.x<d.x&&!e&&(h=w[n+1])&&void 0!==h[a]&&(d.plotY+=(d.x-u.x)/(h.x-u.x)*(h[a]-u[a]))),k--,n++,0>k)););m(t,function(a,c){var p;void 0===a.plotY&&(a.x>=E.min&&a.x<=E.max?a.plotY=A.chartHeight-g.bottom-(g.opposite?g.height:0)+g.offset-f.top:a.shapeArgs={});a.plotX+=x;(b=t[c-1])&&b.plotX===a.plotX&&(void 0===b.stackIndex&&(b.stackIndex=
0),p=b.stackIndex+1);a.stackIndex=p})},drawPoints:function(){var q=this.points,m=this.chart,t=m.renderer,k,d,b=this.options,e=b.y,r,n,g,f,E,x,u,c=this.yAxis;for(n=q.length;n--;)g=q[n],u=g.plotX>this.xAxis.len,k=g.plotX,f=g.stackIndex,r=g.options.shape||b.shape,d=g.plotY,void 0!==d&&(d=g.plotY+e-(void 0!==f&&f*b.stackDistance)),E=f?void 0:g.plotX,x=f?void 0:g.plotY,f=g.graphic,void 0!==d&&0<=k&&!u?(f||(f=g.graphic=t.label("",null,null,r,null,null,b.useHTML).attr({align:"flag"===r?"left":"center",width:b.width,
height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),g.graphic.div&&(g.graphic.div.point=g)),0<k&&(k-=f.strokeWidth()%2),f.attr({text:g.options.title||b.title||"A",x:k,y:d,anchorX:E,anchorY:x}),g.tooltipPos=m.inverted?[c.len+c.pos-m.plotLeft-d,this.xAxis.len-k]:[k,d+c.pos-m.plotTop]):f&&(g.graphic=f.destroy());b.useHTML&&a.wrap(this.markerGroup,"on",function(c){return a.SVGElement.prototype.on.apply(c.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,
1))})},drawTracker:function(){var a=this.points;G.drawTrackerPoint.apply(this);m(a,function(q){var t=q.graphic;t&&B(t.element,"mouseover",function(){0<q.stackIndex&&!q.raised&&(q._y=t.y,t.attr({y:q._y-8}),q.raised=!0);m(a,function(a){a!==q&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:t,buildKDTree:t,setClip:t});J.flag=function(a,m,t,k,d){return["M",d&&d.anchorX||a,d&&d.anchorY||m,"L",a,m+k,a,m,a+t,m,a+t,m+k,a,m+k,"Z"]};m(["circle","square"],function(a){J[a+"pin"]=function(m,
q,k,d,b){var e=b&&b.anchorX;b=b&&b.anchorY;"circle"===a&&d>k&&(m-=Math.round((d-k)/2),k=d);m=J[a](m,q,k,d);e&&b&&m.push("M",e,q>b?q:q+d,"L",e,b);return m}})})(K);(function(a){function B(a,f,d){this.init(a,f,d)}var m=a.addEvent,t=a.Axis,w=a.correctFloat,C=a.defaultOptions,G=a.defined,J=a.destroyObjectProperties,r=a.each,q=a.fireEvent,A=a.hasTouch,F=a.isTouchDevice,k=a.merge,d=a.pick,b=a.removeEvent,e=a.wrap,D,n={height:F?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!F,margin:10,minWidth:6,
step:.2,zIndex:3};C.scrollbar=k(!0,n,C.scrollbar);a.swapXY=D=function(a,f){var g=a.length,d;if(f)for(f=0;f<g;f+=3)d=a[f+1],a[f+1]=a[f+2],a[f+2]=d;return a};B.prototype={init:function(a,f,b){this.scrollbarButtons=[];this.renderer=a;this.userOptions=f;this.options=k(n,f);this.chart=b;this.size=d(this.options.size,this.options.height);f.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,f=this.options,d=this.size,b;this.group=b=a.g("scrollbar").attr({zIndex:f.zIndex,
translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:f.trackBorderRadius||0,height:d,width:d}).add(b);this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(b);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:f.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(D(["M",-3,d/4,"L",-3,2*d/3,"M",0,d/4,"L",0,2*d/3,"M",3,d/4,"L",
3,2*d/3],f.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);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,f,d,b){var g=this.options.vertical,c=0,h=this.rendered?"animate":"attr";this.x=a;this.y=f+this.trackBorderWidth;this.width=d;this.xOffset=this.height=b;this.yOffset=c;g?(this.width=this.yOffset=
d=c=this.size,this.xOffset=f=0,this.barWidth=b-2*d,this.x=a+=this.options.margin):(this.height=this.xOffset=b=f=this.size,this.barWidth=d-2*b,this.y+=this.options.margin);this.group[h]({translateX:a,translateY:this.y});this.track[h]({width:d,height:b});this.scrollbarButtons[1][h]({translateX:g?0:d-f,translateY:g?b-c:0})},drawScrollbarButton:function(a){var g=this.renderer,d=this.scrollbarButtons,b=this.options,e=this.size,c;c=g.g().add(this.group);d.push(c);c=g.rect().addClass("highcharts-scrollbar-button").add(c);
c.attr(c.crisp({x:-.5,y:-.5,width:e+1,height:e+1,r:b.buttonBorderRadius},c.strokeWidth()));g.path(D(["M",e/2+(a?-1:1),e/2-3,"L",e/2+(a?-1:1),e/2+3,"L",e/2+(a?2:-2),e/2],b.vertical)).addClass("highcharts-scrollbar-arrow").add(d[a])},setRange:function(a,f){var g=this.options,d=g.vertical,b=g.minWidth,c=this.barWidth,h,l,e=this.rendered&&!this.hasDragged?"animate":"attr";G(c)&&(a=Math.max(a,0),h=Math.ceil(c*a),this.calculatedWidth=l=w(c*Math.min(f,1)-h),l<b&&(h=(c-b+l)*a,l=b),b=Math.floor(h+this.xOffset+
this.yOffset),c=l/2-.5,this.from=a,this.to=f,d?(this.scrollbarGroup[e]({translateY:b}),this.scrollbar[e]({height:l}),this.scrollbarRifles[e]({translateY:c}),this.scrollbarTop=b,this.scrollbarLeft=0):(this.scrollbarGroup[e]({translateX:b}),this.scrollbar[e]({width:l}),this.scrollbarRifles[e]({translateX:c}),this.scrollbarLeft=b,this.scrollbarTop=0),12>=l?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===g.showFull&&(0>=a&&1<=f?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=
this;a.mouseMoveHandler=function(f){var d=a.chart.pointer.normalize(f),b=a.options.vertical?"chartY":"chartX",g=a.initPositions;!a.grabbedCenter||f.touches&&0===f.touches[0][b]||(d=a.cursorToScrollbarPosition(d)[b],b=a[b],b=d-b,a.hasDragged=!0,a.updatePosition(g[0]+b,g[1]+b),a.hasDragged&&q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:f.type,DOMEvent:f}))};a.mouseUpHandler=function(d){a.hasDragged&&q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:d.type,DOMEvent:d});
a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(d){d=a.chart.pointer.normalize(d);d=a.cursorToScrollbarPosition(d);a.chartX=d.chartX;a.chartY=d.chartY;a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(d){var b=w(a.to-a.from)*a.options.step;a.updatePosition(w(a.from-b),w(a.to-b));q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:d})};a.buttonToMaxClick=function(d){var b=(a.to-a.from)*a.options.step;a.updatePosition(a.from+b,
a.to+b);q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:d})};a.trackClick=function(d){var b=a.chart.pointer.normalize(d),f=a.to-a.from,g=a.y+a.scrollbarTop,c=a.x+a.scrollbarLeft;a.options.vertical&&b.chartY>g||!a.options.vertical&&b.chartX>c?a.updatePosition(a.from+f,a.to+f):a.updatePosition(a.from-f,a.to-f);q(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:d})}},cursorToScrollbarPosition:function(a){var d=this.options,d=d.minWidth>this.calculatedWidth?d.minWidth:0;return{chartX:(a.chartX-
this.x-this.xOffset)/(this.barWidth-d),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-d)}},updatePosition:function(a,d){1<d&&(a=w(1-w(d-a)),d=1);0>a&&(d=w(d-a),a=0);this.from=a;this.to=d},update:function(a){this.destroy();this.init(this.chart.renderer,k(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],d=this.scrollbarButtons,b=this.scrollbarGroup.element,e=this.mouseDownHandler,k=this.mouseMoveHandler,c=this.mouseUpHandler,a=[[d[a[0]].element,"click",
this.buttonToMinClick],[d[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[b,"mousedown",e],[b.ownerDocument,"mousemove",k],[b.ownerDocument,"mouseup",c]];A&&a.push([b,"touchstart",e],[b.ownerDocument,"touchmove",k],[b.ownerDocument,"touchend",c]);r(a,function(a){m.apply(null,a)});this._events=a},removeEvents:function(){r(this._events,function(a){b.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();r(["track",
"scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,J(a.scrollbarButtons))}};e(t.prototype,"init",function(a){var b=this;a.apply(b,Array.prototype.slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new B(b.chart.renderer,b.options.scrollbar,b.chart),m(b.scrollbar,
"changed",function(a){var f=Math.min(d(b.options.min,b.min),b.min,b.dataMin),e=Math.max(d(b.options.max,b.max),b.max,b.dataMax)-f,c;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(c=f+e*this.to,f+=e*this.from):(c=f+e*(1-this.from),f+=e*(1-this.to));b.setExtremes(f,c,!0,!1,a)}))});e(t.prototype,"render",function(a){var b=Math.min(d(this.options.min,this.min),this.min,d(this.dataMin,this.min)),e=Math.max(d(this.options.max,this.max),this.max,d(this.dataMax,this.max)),g=this.scrollbar,k=this.titleOffset||
0;a.apply(this,Array.prototype.slice.call(arguments,1));if(g){this.horiz?(g.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:k+this.axisTitleMargin+this.offset),this.width,this.height),k=1):(g.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?k+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),k=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[k]+=this.scrollbar.size+
this.scrollbar.options.margin;isNaN(b)||isNaN(e)||!G(this.min)||!G(this.max)?g.setRange(0,0):(k=(this.min-b)/(e-b),b=(this.max-b)/(e-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?g.setRange(k,b):g.setRange(1-b,1-k))}});e(t.prototype,"getOffset",function(a){var b=this.horiz?2:1,d=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,1));d&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=d.size+d.options.margin)});e(t.prototype,"destroy",function(a){this.scrollbar&&
(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=B})(K);(function(a){function B(a){this.init(a)}var m=a.addEvent,t=a.Axis,w=a.Chart,C=a.defaultOptions,G=a.defined,J=a.destroyObjectProperties,r=a.each,q=a.erase,A=a.error,F=a.extend,k=a.grep,d=a.hasTouch,b=a.isArray,e=a.isNumber,D=a.isObject,n=a.merge,g=a.pick,f=a.removeEvent,E=a.Scrollbar,x=a.Series,u=a.seriesTypes,c=a.wrap,h=a.swapXY,l=[].concat(a.defaultDataGroupingUnits),z=function(a){var p=
k(arguments,e);if(p.length)return Math[a].apply(0,p)};l[4]=["day",[1,2,3,4]];l[5]=["week",[1,2,3]];F(C,{navigator:{height:40,margin:25,maskInside:!0,series:{type:void 0===u.areaspline?"line":"areaspline",compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:l},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",
tickLength:0,tickPixelInterval:200,labels:{align:"left",x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});B.prototype={drawHandle:function(a,c,b,d){this.handles[c][d](b?{translateX:Math.round(this.left+this.height/2-8),translateY:Math.round(this.top+parseInt(a,10)+.5)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+
this.height/2-8)})},getHandlePath:function(a){return h(["M",-4.5,.5,"L",3.5,.5,"L",3.5,15.5,"L",-4.5,15.5,"L",-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12],a)},drawOutline:function(a,c,b,d){var p=this.navigatorOptions.maskInside,v=this.outline.strokeWidth(),l=v/2,v=v%2/2,h=this.outlineHeight,e=this.scrollbarHeight,I=this.size,f=this.left-e,g=this.top;b?(f-=l,b=g+c+v,c=g+a+v,a=["M",f+h,g-e-v,"L",f+h,b,"L",f,b,"L",f,c,"L",f+h,c,"L",f+h,g+I+e].concat(p?["M",f+h,b-l,"L",f+h,c+l]:[])):(a+=f+e-v,c+=
f+e-v,g+=l,a=["M",f,g,"L",a,g,"L",a,g+h,"L",c,g+h,"L",c,g,"L",f+I+2*e,g].concat(p?["M",a-l,g,"L",c+l,g]:[]));this.outline[d]({d:a})},drawMasks:function(a,c,b,d){var p=this.left,l=this.top,v=this.height,h,f,e,I;b?(e=[p,p,p],I=[l,l+a,l+c],f=[v,v,v],h=[a,c-a,this.size-c]):(e=[p,p+a,p+c],I=[l,l,l],f=[a,c-a,this.size-c],h=[v,v,v]);r(this.shades,function(a,p){a[d]({x:e[p],y:I[p],width:f[p],height:h[p]})})},renderElements:function(){var a=this,c=a.navigatorOptions.maskInside,b=a.chart,d=b.inverted,l=b.renderer,
h;a.navigatorGroup=h=l.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();r([!c,c,!c],function(p,c){a.shades[c]=l.rect().addClass("highcharts-navigator-mask"+(1===c?"-inside":"-outside")).add(h)});a.outline=l.path().addClass("highcharts-navigator-outline").add(h);r([0,1],function(p){a.handles[p]=l.path(a.getHandlePath(d)).attr({zIndex:7-p}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][p]).add(h)})},update:function(a){r(this.series||[],function(a){a.baseSeries&&
delete a.baseSeries.navigatorSeries});this.destroy();n(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,c,b,d){var p=this.chart,l,h,v=this.scrollbarHeight,f,I=this.xAxis;l=I.fake?p.xAxis[0]:I;var k=this.navigatorEnabled,z,H=this.rendered;h=p.inverted;var n=p.xAxis[0].minRange;if(!this.hasDragged||G(b)){if(!e(a)||!e(c))if(H)b=0,d=I.width;else return;this.left=g(I.left,p.plotLeft+v+(h?p.plotWidth:0));this.size=z=f=g(I.len,(h?p.plotHeight:p.plotWidth)-2*v);p=h?
v:f+2*v;b=g(b,I.toPixels(a,!0));d=g(d,I.toPixels(c,!0));e(b)&&Infinity!==Math.abs(b)||(b=0,d=p);a=I.toValue(b,!0);c=I.toValue(d,!0);if(Math.abs(c-a)<n)if(this.grabbedLeft)b=I.toPixels(c-n,!0);else if(this.grabbedRight)d=I.toPixels(a+n,!0);else return;this.zoomedMax=Math.min(Math.max(b,d,0),z);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(b,d),0),z);this.range=this.zoomedMax-this.zoomedMin;z=Math.round(this.zoomedMax);b=Math.round(this.zoomedMin);k&&(this.navigatorGroup.attr({visibility:"visible"}),
H=H&&!this.hasDragged?"animate":"attr",this.drawMasks(b,z,h,H),this.drawOutline(b,z,h,H),this.drawHandle(b,0,h,H),this.drawHandle(z,1,h,H));this.scrollbar&&(h?(h=this.top-v,l=this.left-v+(k||!l.opposite?0:(l.titleOffset||0)+l.axisTitleMargin),v=f+2*v):(h=this.top+(k?this.height:-v),l=this.left-v),this.scrollbar.position(l,h,p,v),this.scrollbar.setRange(this.zoomedMin/f,this.zoomedMax/f));this.rendered=!0}},addMouseEvents:function(){var a=this,c=a.chart,b=c.container,l=[],h,f;a.mouseMoveHandler=h=
function(c){a.onMouseMove(c)};a.mouseUpHandler=f=function(c){a.onMouseUp(c)};l=a.getPartsEvents("mousedown");l.push(m(b,"mousemove",h),m(b.ownerDocument,"mouseup",f));d&&(l.push(m(b,"touchmove",h),m(b.ownerDocument,"touchend",f)),l.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=l;a.series&&a.series[0]&&l.push(m(a.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var c=this,p=[];r(["shades","handles"],function(b){r(c[b],function(d,
l){p.push(m(d.element,a,function(a){c[b+"Mousedown"](a,l)}))})});return p},shadesMousedown:function(a,c){a=this.chart.pointer.normalize(a);var b=this.chart,p=this.xAxis,d=this.zoomedMin,l=this.left,h=this.size,v=this.range,f=a.chartX,e;b.inverted&&(f=a.chartY,l=this.top);1===c?(this.grabbedCenter=f,this.fixedWidth=v,this.dragOffset=f-d):(a=f-l-v/2,0===c?a=Math.max(0,a):2===c&&a+v>=h&&(a=h-v,e=this.getUnionExtremes().dataMax),a!==d&&(this.fixedWidth=v,c=p.toFixedRange(a,a+v,null,e),b.xAxis[0].setExtremes(Math.min(c.min,
c.max),Math.max(c.min,c.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,c){this.chart.pointer.normalize(a);a=this.chart;var b=a.xAxis[0],p=a.inverted&&!b.reversed||!a.inverted&&b.reversed;0===c?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=p?b.min:b.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=p?b.max:b.min);a.fixedRange=null},onMouseMove:function(a){var c=this,b=c.chart,p=c.left,d=c.navigatorSize,l=c.range,h=c.dragOffset,
f=b.inverted;a.touches&&0===a.touches[0].pageX||(a=b.pointer.normalize(a),b=a.chartX,f&&(p=c.top,b=a.chartY),c.grabbedLeft?(c.hasDragged=!0,c.render(0,0,b-p,c.otherHandlePos)):c.grabbedRight?(c.hasDragged=!0,c.render(0,0,c.otherHandlePos,b-p)):c.grabbedCenter&&(c.hasDragged=!0,b<h?b=h:b>d+h-l&&(b=d+h-l),c.render(0,0,b-h,b-h+l)),c.hasDragged&&c.scrollbar&&c.scrollbar.options.liveRedraw&&(a.DOMType=a.type,setTimeout(function(){c.onMouseUp(a)},0)))},onMouseUp:function(a){var c=this.chart,b=this.xAxis,
d=this.scrollbar,p,l,h=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?p=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(l=this.fixedExtreme),this.zoomedMax===this.size&&(l=this.getUnionExtremes().dataMax),b=b.toFixedRange(this.zoomedMin,this.zoomedMax,p,l),G(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:h}));"mousemove"!==
a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(r(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&r(a,function(a){f(a,"updatedData",this.updatedDataHandler)},
this),a[0].xAxis&&f(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,d=b.navigator,l=d.enabled,p=b.scrollbar,h=p.enabled,b=l?d.height:0,f=h?p.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=f;this.scrollbarEnabled=h;this.navigatorEnabled=l;this.navigatorOptions=d;this.scrollbarOptions=p;this.outlineHeight=b+f;this.opposite=g(d.opposite,!l&&a.inverted);var e=this,p=e.baseSeries,h=a.xAxis.length,k=
a.yAxis.length,q=p&&p[0]&&p[0].xAxis||a.xAxis[0];a.extraMargin={type:e.opposite?"plotTop":"marginBottom",value:(l||!a.inverted?e.outlineHeight:0)+d.margin};a.inverted&&(a.extraMargin.type=e.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;e.navigatorEnabled?(e.xAxis=new t(a,n({breaks:q.options.breaks,ordinal:q.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:h,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,
zoomEnabled:!1},a.inverted?{offsets:[f,0,-f,0],width:b}:{offsets:[0,-f,0,f],height:b})),e.yAxis=new t(a,n(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:k,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),p||d.series.data?e.updateNavigatorSeries():0===a.series.length&&c(a,"redraw",function(c,b){0<a.series.length&&!e.series&&(e.setBaseSeries(),a.redraw=c);c.call(a,b)}),e.renderElements(),e.addMouseEvents()):e.xAxis={translate:function(c,b){var d=a.xAxis[0],l=d.getExtremes(),p=d.len-2*
f,h=z("min",d.options.min,l.dataMin),d=z("max",d.options.max,l.dataMax)-h;return b?c*d/p+h:p*(c-h)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:t.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=e.scrollbar=new E(a.renderer,n(a.options.scrollbar,{margin:e.navigatorEnabled?0:10,vertical:a.inverted}),a),m(e.scrollbar,"changed",function(c){var b=e.size,d=b*this.to,b=b*this.from;e.hasDragged=e.scrollbar.hasDragged;
e.render(0,0,b,d);(a.options.scrollbar.liveRedraw||"mousemove"!==c.DOMType)&&setTimeout(function(){e.onMouseUp(c)})}));e.addBaseSeriesEvents();e.addChartEvents()},getUnionExtremes:function(a){var c=this.chart.xAxis[0],b=this.xAxis,d=b.options,l=c.options,p;a&&null===c.dataMin||(p={dataMin:g(d&&d.min,z("min",l.min,c.dataMin,b.dataMin,b.min)),dataMax:g(d&&d.max,z("max",l.max,c.dataMax,b.dataMax,b.max))});return p},setBaseSeries:function(a){var c=this.chart,b=this.baseSeries=[];a=a||c.options&&c.options.navigator.baseSeries||
0;r(c.series||[],function(c,d){c.options.isInternal||!c.options.showInNavigator&&(d!==a&&c.options.id!==a||!1===c.options.showInNavigator)||b.push(c)});this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries()},updateNavigatorSeries:function(){var c=this,d=c.chart,l=c.baseSeries,h,e,g=c.navigatorOptions.series,z,k={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,visible:!0},m=c.series=
a.grep(c.series||[],function(b){var d=b.baseSeries;return 0>a.inArray(d,l)?(d&&(f(d,"updatedData",c.updatedDataHandler),delete d.navigatorSeries),b.destroy(),!1):!0});l&&l.length&&r(l,function(a,l){var p=a.navigatorSeries,f=b(g)?{}:g;p&&!1===c.navigatorOptions.adaptToUpdatedData||(k.name="Navigator "+(l+1),h=a.options||{},z=h.navigatorOptions||{},e=n(h,k,f,z),l=z.data||f.data,c.hasNavigatorData=c.hasNavigatorData||!!l,e.data=l||h.data&&h.data.slice(0),p?p.update(e):(a.navigatorSeries=d.initSeries(e),
a.navigatorSeries.baseSeries=a,m.push(a.navigatorSeries)))});if(g.data&&(!l||!l.length)||b(g))c.hasNavigatorData=!1,g=a.splat(g),r(g,function(a,b){e=n({color:d.series[b]&&!d.series[b].options.isInternal&&d.series[b].color||d.options.colors[b]||d.options.colors[0]},a,k);e.data=a.data;e.data&&(c.hasNavigatorData=!0,m.push(d.initSeries(e)))});this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,c=a.baseSeries||[];c[0]&&c[0].xAxis&&m(c[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);
r(c,function(c){m(c,"show",function(){this.navigatorSeries&&this.navigatorSeries.show()});m(c,"hide",function(){this.navigatorSeries&&this.navigatorSeries.hide()});!1!==this.navigatorOptions.adaptToUpdatedData&&c.xAxis&&m(c,"updatedData",this.updatedDataHandler);m(c,"remove",function(){this.navigatorSeries&&(q(a.series,this.navigatorSeries),this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,c;a.getExtremes&&(!(c=this.getUnionExtremes(!0))||
c.dataMin===a.min&&c.dataMax===a.max||(a.min=c.dataMin,a.max=c.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,c=this.getExtremes(),b=c.dataMin,d=c.dataMax,c=c.max-c.min,l=a.stickToMin,h=a.stickToMax,f,g,z=a.series&&a.series[0],k=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(l&&(g=b,f=g+c),h&&(f=d,l||(g=Math.max(f-c,z&&z.xData?z.xData[0]:-Number.MAX_VALUE))),k&&(l||h)&&e(g)&&(this.min=this.userMin=g,this.max=this.userMax=f));a.stickToMin=
a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,c=this.navigatorSeries;a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=e(this.xAxis.min)&&this.xAxis.min<=this.xData[0]&&(!this.chart.fixedRange||!a.stickToMax);c&&!a.hasNavigatorData&&(c.options.pointStart=this.xData[0],c.setData(this.options.data,!1,null,!1))},addChartEvents:function(){m(this.chart,"redraw",function(){var a=this.navigator,c=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||
a.scrollbar&&this.xAxis[0]);c&&a.render(c.min,c.max)})},destroy:function(){this.removeEvents();this.xAxis&&(q(this.chart.xAxis,this.xAxis),q(this.chart.axes,this.xAxis));this.yAxis&&(q(this.chart.yAxis,this.yAxis),q(this.chart.axes,this.yAxis));r(this.series||[],function(a){a.destroy&&a.destroy()});r("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);
r([this.handles],function(a){J(a)},this)}};a.Navigator=B;c(t.prototype,"zoom",function(a,c,b){var d=this.chart,l=d.options,h=l.chart.zoomType,e=l.navigator,l=l.rangeSelector,f;this.isXAxis&&(e&&e.enabled||l&&l.enabled)&&("x"===h?d.resetZoomButton="blocked":"y"===h?f=!1:"xy"===h&&(d=this.previousZoom,G(c)?this.previousZoom=[this.min,this.max]:d&&(c=d[0],b=d[1],delete this.previousZoom)));return void 0!==f?f:a.call(this,c,b)});c(w.prototype,"init",function(a,c,b){m(this,"beforeRender",function(){var a=
this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new B(this)});a.call(this,c,b)});c(w.prototype,"setChartSize",function(a){var c=this.legend,b=this.navigator,d,l,h,e;a.apply(this,[].slice.call(arguments,1));b&&(l=c.options,h=b.xAxis,e=b.yAxis,d=b.scrollbarHeight,this.inverted?(b.left=b.opposite?this.chartWidth-d-b.height:this.spacing[3]+d,b.top=this.plotTop+d):(b.left=this.plotLeft+d,b.top=b.navigatorOptions.top||this.chartHeight-b.height-d-this.spacing[2]-("bottom"===
l.verticalAlign&&l.enabled&&!l.floating?c.legendHeight+g(l.margin,10):0)),h&&e&&(this.inverted?h.options.left=e.options.left=b.left:h.options.top=e.options.top=b.top,h.setAxisSize(),e.setAxisSize()))});c(x.prototype,"addPoint",function(a,c,b,d,l){var h=this.options.turboThreshold;h&&this.xData.length>h&&D(c,!0)&&this.chart.navigator&&A(20,!0);a.call(this,c,b,d,l)});c(w.prototype,"addSeries",function(a,c,b,d){a=a.call(this,c,!1,d);this.navigator&&this.navigator.setBaseSeries();g(b,!0)&&this.redraw();
return a});c(x.prototype,"update",function(a,c,b){a.call(this,c,!1);this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries();g(b,!0)&&this.chart.redraw()});w.prototype.callbacks.push(function(a){var c=a.navigator;c&&(a=a.xAxis[0].getExtremes(),c.render(a.min,a.max))})})(K);(function(a){function B(a){this.init(a)}var m=a.addEvent,t=a.Axis,w=a.Chart,C=a.css,G=a.createElement,J=a.dateFormat,r=a.defaultOptions,q=r.global.useUTC,A=a.defined,F=a.destroyObjectProperties,k=a.discardElement,
d=a.each,b=a.extend,e=a.fireEvent,D=a.Date,n=a.isNumber,g=a.merge,f=a.pick,E=a.pInt,x=a.splat,u=a.wrap;b(r,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},height:35,inputPosition:{align:"right"}}});r.lang=g(r.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});B.prototype={clickButton:function(a,b){var c=this,h=c.chart,e=c.buttonOptions[a],g=h.xAxis[0],k=h.scroller&&h.scroller.getUnionExtremes()||g||{},H=k.dataMin,r=k.dataMax,u,y=g&&
Math.round(Math.min(g.max,f(r,g.max))),w=e.type,L,k=e._range,A,O,N,C=e.dataGrouping;if(null!==H&&null!==r){h.fixedRange=k;C&&(this.forcedDataGrouping=!0,t.prototype.setDataGrouping.call(g||{chart:this.chart},C,!1));if("month"===w||"year"===w)g?(w={range:e,max:y,dataMin:H,dataMax:r},u=g.minFromRange.call(w),n(w.newMax)&&(y=w.newMax)):k=e;else if(k)u=Math.max(y-k,H),y=Math.min(u+k,r);else if("ytd"===w)if(g)void 0===r&&(H=Number.MAX_VALUE,r=Number.MIN_VALUE,d(h.series,function(a){a=a.xData;H=Math.min(a[0],
H);r=Math.max(a[a.length-1],r)}),b=!1),y=c.getYTDExtremes(r,H,q),u=A=y.min,y=y.max;else{m(h,"beforeRender",function(){c.clickButton(a)});return}else"all"===w&&g&&(u=H,y=r);c.setSelected(a);g?g.setExtremes(u,y,f(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:e}):(L=x(h.options.xAxis)[0],N=L.range,L.range=k,O=L.min,L.min=A,m(h,"load",function(){L.range=N;L.min=O}))}},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 c=this,b=a.options.rangeSelector,f=b.buttons||[].concat(c.defaultButtons),p=b.selected,g=function(){var a=c.minInput,b=c.maxInput;a&&a.blur&&e(a,"blur");b&&b.blur&&e(b,"blur")};c.chart=a;c.options=b;c.buttons=[];a.extraTopMargin=b.height;c.buttonOptions=f;this.unMouseDown=m(a.container,"mousedown",g);this.unResize=m(a,"resize",g);d(f,c.computeButtonRange);
void 0!==p&&f[p]&&this.clickButton(p,!1);m(a,"load",function(){m(a.xAxis[0],"setExtremes",function(b){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==b.trigger&&"updatedData"!==b.trigger&&c.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,b=a.xAxis[0],l=Math.round(b.max-b.min),e=!b.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||b,f=a.dataMin,g=a.dataMax,a=this.getYTDExtremes(g,f,q),k=a.min,m=a.max,t=this.selected,r=n(t),y=
this.options.allButtonsEnabled,u=this.buttons;d(this.buttonOptions,function(a,c){var d=a._range,h=a.type,p=a.count||1;a=u[c];var z=0;c=c===t;var n=d>g-f,v=d<b.minRange,q=!1,H=!1,d=d===l;("month"===h||"year"===h)&&l>=864E5*{month:28,year:365}[h]*p&&l<=864E5*{month:31,year:366}[h]*p?d=!0:"ytd"===h?(d=m-k===l,q=!c):"all"===h&&(d=b.max-b.min>=g-f,H=!c&&r&&d);h=!y&&(n||v||H||e);d=c&&d||d&&!r&&!q;h?z=3:d&&(r=!0,z=2);a.state!==z&&a.setState(z)})},computeButtonRange:function(a){var c=a.type,b=a.count||1,
d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[c])a._range=d[c]*b;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*b},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this[a+"Input"];A(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=J(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:J(c.inputDateFormat||"%b %e, %Y",d.HCTime)})},showInput:function(a){var c=this.inputGroup,b=this[a+"DateBox"];C(this[a+"Input"],
{left:c.translateX+b.x+"px",top:c.translateY+"px",width:b.width-2+"px",height:b.height-2+"px",border:"2px solid silver"})},hideInput:function(a){C(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function b(){var a=m.value,b=(f.inputDateParser||Date.parse)(a),l=d.xAxis[0],h=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:l,e=h.dataMin,h=h.dataMax;b!==m.previousValue&&(m.previousValue=b,n(b)||(b=a.split("-"),b=Date.UTC(E(b[0]),E(b[1])-1,E(b[2]))),n(b)&&
(q||(b+=6E4*(new Date).getTimezoneOffset()),k?b>c.maxInput.HCTime?b=void 0:b<e&&(b=e):b<c.minInput.HCTime?b=void 0:b>h&&(b=h),void 0!==b&&l.setExtremes(k?b:l.min,k?l.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var c=this,d=c.chart,e=d.renderer,f=d.options.rangeSelector,g=c.div,k="min"===a,m,t,y=this.inputGroup;this[a+"Label"]=t=e.label(r.lang[k?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(y);y.offset+=t.width+5;this[a+
"DateBox"]=e=e.label("",y.offset).addClass("highcharts-range-input").attr({padding:2,width:f.inputBoxWidth||90,height:f.inputBoxHeight||17,stroke:f.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",function(){c.showInput(a);c[a+"Input"].focus()}).add(y);y.offset+=e.width+(k?10:0);this[a+"Input"]=m=G("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:d.plotTop+"px"},g);m.onfocus=function(){c.showInput(a)};m.onblur=function(){c.hideInput(a)};m.onchange=
b;m.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=f((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,b,d){var c=new D(a),l=c[D.hcGetFullYear]();d=d?D.UTC(l,0,1):+new D(l,0,1);b=Math.max(b||0,d);c=c.getTime();return{max:Math.min(a||c,c),min:b}},render:function(a,h){var c=this,e=c.chart,g=e.renderer,k=e.container,n=e.options,m=n.exporting&&!1!==n.exporting.enabled&&
n.navigation&&n.navigation.buttonOptions,q=n.rangeSelector,t=c.buttons,n=r.lang,y=c.div,y=c.inputGroup,u=q.buttonTheme,w=q.buttonPosition||{},x=q.inputEnabled,C=u&&u.states,E=e.plotLeft,B,F=this.getPosition(),D=c.group,J=c.rendered;!1!==q.enabled&&(J||(c.group=D=g.g("range-selector-buttons").add(),c.zoomText=g.text(n.rangeSelectorZoom,f(w.x,E),15).css(q.labelStyle).add(D),B=f(w.x,E)+c.zoomText.getBBox().width+5,d(c.buttonOptions,function(a,b){t[b]=g.button(a.text,B,0,function(){c.clickButton(b);c.isActive=
!0},u,C&&C.hover,C&&C.select,C&&C.disabled).attr({"text-align":"center"}).add(D);B+=t[b].width+f(q.buttonSpacing,5)}),!1!==x&&(c.div=y=G("div",null,{position:"relative",height:0,zIndex:1}),k.parentNode.insertBefore(y,k),c.inputGroup=y=g.g("input-group").add(),y.offset=0,c.drawInput("min"),c.drawInput("max"))),c.updateButtonStates(),D[J?"animate":"attr"]({translateY:F.buttonTop}),!1!==x&&(y.align(b({y:F.inputTop,width:y.offset,x:m&&F.inputTop<(m.y||0)+m.height-e.spacing[0]?-40:0},q.inputPosition),
!0,e.spacingBox),A(x)||(e=D.getBBox(),y[y.alignAttr.translateX<e.x+e.width+10?"hide":"show"]()),c.setInputValue("min",a),c.setInputValue("max",h)),c.rendered=!0)},update:function(a){var b=this.chart;g(!0,b.options.rangeSelector,a);this.destroy();this.init(b)},destroy:function(){var b=this,d=b.minInput,l=b.maxInput;b.unMouseDown();b.unResize();F(b.buttons);d&&(d.onfocus=d.onblur=d.onchange=null);l&&(l.onfocus=l.onblur=l.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():
a.nodeType&&k(this[c]));a!==B.prototype[c]&&(b[c]=null)},this)}};t.prototype.toFixedRange=function(a,b,d,e){var c=this.chart&&this.chart.fixedRange;a=f(d,this.translate(a,!0,!this.horiz));b=f(e,this.translate(b,!0,!this.horiz));d=c&&(b-a)/c;.7<d&&1.3>d&&(e?a=b-c:b=a+c);n(a)||(a=b=void 0);return{min:a,max:b}};t.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],d,e=this.max,g,k,m=function(a,c){var d=new Date(a),e=d["get"+b]();d["set"+b](e+c);e===d["get"+b]()&&
d.setDate(0);return d.getTime()-a};n(a)?(d=e-a,k=a):(d=e+m(e,-a.count),this.chart&&(this.chart.fixedRange=e-d));g=f(this.dataMin,Number.MIN_VALUE);n(d)||(d=g);d<=g&&(d=g,void 0===k&&(k=m(d,a.count)),this.newMax=Math.min(d+k,this.dataMax));n(e)||(d=void 0);return d};u(w.prototype,"init",function(a,b,d){m(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new B(this))});a.call(this,b,d)});w.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();n(c.min)&&
d.render(c.min,c.max)}var c,d=a.rangeSelector,e,f;d&&(f=m(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),e=m(a,"redraw",b),b());m(a,"destroy",function(){d&&(e(),f())})});a.RangeSelector=B})(K);(function(a){var B=a.arrayMax,m=a.arrayMin,t=a.Axis,w=a.Chart,C=a.defined,G=a.each,J=a.format,r=a.grep,q=a.inArray,A=a.isNumber,F=a.isString,k=a.map,d=a.merge,b=a.pick,e=a.Point,D=a.Series,n=a.splat,g=a.SVGRenderer,f=a.wrap,E=D.prototype,x=E.init,u=E.processData,c=e.prototype.tooltipFormatter;
a.StockChart=a.stockChart=function(c,e,f){var l=F(c)||c.nodeName,h=arguments[l?1:0],g=h.series,m=a.getOptions(),q,z=b(h.navigator&&h.navigator.enabled,m.navigator.enabled,!0),t=z?{startOnTick:!1,endOnTick:!1}:null,r={marker:{enabled:!1,radius:2}},u={shadow:!1,borderWidth:0};h.xAxis=k(n(h.xAxis||{}),function(a){return d({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},m.xAxis,a,{type:"datetime",categories:null},t)});h.yAxis=k(n(h.yAxis||{}),function(a){q=
b(a.opposite,!0);return d({labels:{y:-2},opposite:q,showLastLabel:!1,title:{text:null}},m.yAxis,a)});h.series=null;h=d({chart:{panning:!0,pinchType:"x"},navigator:{enabled:z},scrollbar:{enabled:b(m.scrollbar.enabled,!0)},rangeSelector:{enabled:b(m.rangeSelector.enabled,!0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:r,spline:r,area:r,areaspline:r,arearange:r,areasplinerange:r,column:u,columnrange:u,candlestick:u,ohlc:u}},h,{isStock:!0});h.series=g;return l?
new w(c,h,f):new w(h,e)};f(t.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.apply(this,[].slice.call(arguments,1))});f(t.prototype,"destroy",function(a){var b=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===
this&&delete b._labelPanes[c];return a.apply(this,Array.prototype.slice.call(arguments,1))});f(t.prototype,"getPlotLinePath",function(c,d,e,f,g,m){var h=this,l=this.isLinked&&!this.series?this.linkedParent.series:this.series,p=h.chart,n=p.renderer,t=h.left,r=h.top,z,v,u,w,x=[],I=[],B,D;if("xAxis"!==h.coll&&"yAxis"!==h.coll)return c.apply(this,[].slice.call(arguments,1));I=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=h.options[b];return A(a)?[p[b][a]]:F(a)?[p.get(a)]:k(l,function(a){return a[b]})}(h.coll);
G(h.isXAxis?p.yAxis:p.xAxis,function(a){if(C(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=C(a.options[b])?p[b][a.options[b]]:p[b][0];h===b&&I.push(a)}});B=I.length?[]:[h.isXAxis?p.yAxis[0]:p.xAxis[0]];G(I,function(b){-1!==q(b,B)||a.find(B,function(a){return a.pos===b.pos&&a.len&&b.len})||B.push(b)});D=b(m,h.translate(d,null,null,f));A(D)&&(h.horiz?G(B,function(a){var b;v=a.pos;w=v+a.len;z=u=Math.round(D+h.transB);if(z<t||z>t+h.width)g?z=u=Math.min(Math.max(t,
z),t+h.width):b=!0;b||x.push("M",z,v,"L",u,w)}):G(B,function(a){var b;z=a.pos;u=z+a.len;v=w=Math.round(r+h.height-D);if(v<r||v>r+h.height)g?v=w=Math.min(Math.max(r,v),h.top+h.height):b=!0;b||x.push("M",z,v,"L",u,w)}));return 0<x.length?n.crispPolyLine(x,e||1):null});t.prototype.getPlotBandPath=function(a,b){b=this.getPlotLinePath(b,null,null,!0);a=this.getPlotLinePath(a,null,null,!0);var c=[],d;if(a&&b)if(a.toString()===b.toString())c=a,c.flat=!0;else for(d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+
2],"L",a[d+4],a[d+5],b[d+4],b[d+5],b[d+1],b[d+2],"z");else c=null;return c};g.prototype.crispPolyLine=function(a,b){var c;for(c=0;c<a.length;c+=6)a[c+1]===a[c+4]&&(a[c+1]=a[c+4]=Math.round(a[c+1])-b%2/2),a[c+2]===a[c+5]&&(a[c+2]=a[c+5]=Math.round(a[c+2])+b%2/2);return a};f(t.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});f(t.prototype,"drawCrosshair",function(a,c,d){var e,f;a.call(this,c,d);if(C(this.crosshair.label)&&this.crosshair.label.enabled&&
this.cross){a=this.chart;var h=this.options.crosshair.label,g=this.horiz;e=this.opposite;f=this.left;var l=this.top,k=this.crossLabel,m,n=h.format,q="",t="inside"===this.options.tickPosition,r=!1!==this.crosshair.snap,u=0;c||(c=this.cross&&this.cross.e);m=g?"center":e?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";k||(k=this.crossLabel=a.renderer.label(null,null,null,h.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+
this.series[0].colorIndex)).attr({align:h.align||m,padding:b(h.padding,8),r:b(h.borderRadius,3),zIndex:2}).add(this.labelGroup));g?(m=r?d.plotX+f:c.chartX,l+=e?0:this.height):(m=e?this.width+f:0,l=r?d.plotY+l:c.chartY);n||h.formatter||(this.isDatetimeAxis&&(q="%b %d, %Y"),n="{value"+(q?":"+q:"")+"}");c=r?d[this.isXAxis?"x":"y"]:this.toValue(g?c.chartX:c.chartY);k.attr({text:n?J(n,{value:c}):h.formatter.call(this,c),x:m,y:l,visibility:"visible"});c=k.getBBox();if(g){if(t&&!e||!t&&e)l=k.y-c.height}else l=
k.y-c.height/2;g?(e=f-c.x,f=f+this.width-c.x):(e="left"===this.labelAlign?f:0,f="right"===this.labelAlign?f+this.width:a.chartWidth);k.translateX<e&&(u=e-k.translateX);k.translateX+c.width>=f&&(u=-(k.translateX+c.width-f));k.attr({x:m+u,y:l,anchorX:g?m:this.opposite?0:a.chartWidth,anchorY:g?this.opposite?a.chartHeight:0:l+c.height/2})}});E.init=function(){x.apply(this,arguments);this.setCompare(this.options.compare)};E.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,
c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};E.processData=function(){var a,b=-1,c,d,e,f;u.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=q("close",this.pointArrayMap),-1===b&&(b=q(this.pointValKey||"y",this.pointArrayMap))),a=0;a<e-1;a++)if(f=
d[a]&&-1<b?d[a][b]:d[a],A(f)&&c[a+1]>=this.xAxis.min&&0!==f){this.compareValue=f;break}};f(E,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&&(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=m(b),this.dataMax=B(b))});t.prototype.setCompare=function(a,c){this.isXAxis||(G(this.series,function(b){b.setCompare(a)}),b(c,!0)&&this.chart.redraw())};e.prototype.tooltipFormatter=function(d){d=d.replace("{point.change}",(0<this.change?
"+":"")+a.numberFormat(this.change,b(this.series.tooltipOptions.changeDecimals,2)));return c.apply(this,[d])};f(D.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?(this.clipBox=d(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len}):this.clipBox&&(this.clipBox.width=
this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)});f(w.prototype,"getSelectedPoints",function(a){var b=a.call(this);G(this.series,function(a){a.hasGroupedData&&(b=b.concat(r(a.points||[],function(a){return a.selected})))});return b});f(w.prototype,"update",function(a,b){"scrollbar"in b&&this.navigator&&(d(!0,this.options.scrollbar,b.scrollbar),this.navigator.update({},!1),delete b.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(K)});
