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