/*
 Highcharts JS v6.1.0 (2018-04-13)
 Highstock as a plugin for Highcharts

 (c) 2017 Torstein Honsi

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