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