/* Highstock JS v9.3.1 (2021-11-05) Highcharts Stock as a plugin for Highcharts (c) 2010-2021 Torstein Honsi License: www.highcharts.com/license */ 'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/stock",["highcharts"],function(L){a(L);a.Highcharts=L;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function L(a,r,y,t){a.hasOwnProperty(r)||(a[r]=t.apply(null,y))}a=a?a._modules:{};L(a,"Core/Axis/OrdinalAxis.js",[a["Core/Axis/Axis.js"],a["Core/Globals.js"],a["Core/Series/Series.js"],a["Core/Utilities.js"]], function(a,r,y,t){var l=t.addEvent,D=t.correctFloat,E=t.css,x=t.defined,b=t.error,m=t.pick,d=t.timeUnits,z=[],h;(function(h){function G(f,e,c,n,p,g,v){void 0===p&&(p=[]);void 0===g&&(g=0);var w={},Q=this.options.tickPixelInterval,O=this.chart.time,B=[],H,A,k=0,u=[],h=-Number.MAX_VALUE;if(!this.options.ordinal&&!this.options.breaks||!p||3>p.length||"undefined"===typeof e)return O.getTimeTicks.apply(O,arguments);var m=p.length;for(H=0;Hc;p[H] 5*g||F){if(p[H]>h){for(A=O.getTimeTicks(f,p[k],p[H],n);A.length&&A[0]<=h;)A.shift();A.length&&(h=A[A.length-1]);B.push(u.length);u=u.concat(A)}k=H+1}if(F)break}if(A){A=A.info;if(v&&A.unitRange<=d.hour){H=u.length-1;for(k=1;kc?A-1:A;for(H=void 0;q--;)B=O[q],A=Math.abs(H-B),H&&A<.8*Q&&(null===k||A<.8*k)?(w[u[q]]&&!w[u[q+1]]?(A=q+1,H=B):A=q,u.splice(A,1)):H=B}return u}function I(f){var e=this.ordinal.positions;if(!e)return f;var c=e.length-1;if(0>f)f=e[0];else if(f>c)f=e[c];else{c=Math.floor(f);var n=f-c}return"undefined"!==typeof n&&"undefined"!==typeof e[c]?e[c]+(n?n*(e[c+1]-e[c]):0):f}function C(f){var e=this.ordinal,c=e.positions;if(!c)return f;var n=(f-(this.old? this.old.min:this.min))*(this.old?this.old.transA:this.transA)+this.minPixelPadding;0f?n+p*f:c+p*(f-e)}return f}function q(f,e){var c=h.Additions.findIndexOf(f,e,!0);return f[c]=== e?c:c+(e-f[c])/(f[c+1]-f[c])}function K(){this.ordinal||(this.ordinal=new h.Additions(this))}function a(){this.isXAxis&&x(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&x(this.userMin)&&(this.min+=this.options.overscroll))}function F(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)} function N(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))}function u(f){var e=this.xAxis[0],c=e.options.overscroll,n=f.originalEvent.chartX,p=this.options.chart.panning,g=!1;if(p&&"y"!==p.type&&e.options.ordinal&&e.series.length){var v=this.mouseDownX,w=e.getExtremes(),Q=w.dataMax,O=w.min,B=w.max,H=this.hoverPoints,A=e.closestPointRange||e.ordinal&&e.ordinal.overscrollPointsRange;v=(v-n)/(e.translationSlope*(e.ordinal.slope|| A));A={ordinal:{positions:e.ordinal.getExtendedPositions()}};var k=e.index2val,u=e.val2lin,d=void 0,h=d=void 0,q=void 0;A.ordinal.positions?1v?(h=A,q=e.ordinal.positions?e:A):(h=e.ordinal.positions?e:A,q=A),d=q.ordinal.positions,Q>d[d.length-1]&&d.push(Q),this.fixedRange=B-O,d=e.navigatorAxis.toFixedRange(null,null,k.apply(h,[u.apply(h,[O,!0])+v]),k.apply(q,[u.apply(q,[B,!0])+v])),d.min>=Math.min(w.dataMin,O)&&d.max<=Math.max(Q,B)+c&&e.setExtremes(d.min, d.max,!0,!1,{trigger:"pan"}),this.mouseDownX=n,E(this.container,{cursor:"move"})):g=!0}else g=!0;g||p&&/y/.test(p.type)?c&&(e.max=e.dataMax+c):f.preventDefault()}function M(){var f=this.xAxis;f&&f.options.ordinal&&(delete f.ordinal.index,delete f.ordinal.extendedOrdinalPositions)}function k(f,e){var c=this.ordinal,n=c.positions,p=c.slope,g=c.extendedOrdinalPositions;if(!n)return f;var v=n.length;if(n[0]<=f&&n[v-1]>=f)f=q(n,f);else{g||(g=c.getExtendedPositions&&c.getExtendedPositions(),c.extendedOrdinalPositions= g);if(!g||!g.length)return f;v=g.length;p||(p=(g[v-1]-g[0])/v);n=q(g,n[0]);f>=g[0]&&f<=g[v-1]?f=q(g,f)-n:fd||g-B[B.length-1]>d)&&(A=!0)}else e.options.overscroll&&(2===k?H=B[1]-B[0]:1===k?(H=e.options.overscroll,B=[B[0],B[0]+H]):H=c.overscrollPointsRange);A||e.forceOrdinal?(e.options.overscroll&&(c.overscrollPointsRange=H,B=B.concat(c.getOverscrollPositions())), c.positions=B,d=e.ordinal2lin(Math.max(p,B[0]),!0),O=Math.max(e.ordinal2lin(Math.min(g,B[B.length-1]),!0),1),c.slope=g=(g-p)/(O-d),c.offset=p-d*g):(c.overscrollPointsRange=m(e.closestPointRange,c.overscrollPointsRange),c.positions=e.ordinal.slope=c.offset=void 0)}e.isOrdinal=n&&A;c.groupIntervalFactor=null};f.findIndexOf=function(e,c,n){for(var p=0,g=e.length-1,v;p=(this.xAxis.min||0)){this.dataModify.compareValue=w;break}}}}function u(e,c){this.setModifier("compare",e,c)}function M(e,c){e=K(e,!1);this.options.cumulative=this.userOptions.cumulative=e;this.update({},K(c,!0));this.dataModify?this.dataModify.initCumulative():this.points.forEach(function(c){delete c.cumulativeSum})}function k(e,c){this.setModifier("cumulative",e,c)}var J=[];I.compose=function(e,c,n){if(-1===J.indexOf(e)){J.push(e); var p=e.prototype;p.setCompare=F;p.setCumulative=M;D(e,"afterInit",a);D(e,"afterGetExtremes",G);D(e,"afterProcessData",N)}-1===J.indexOf(c)&&(J.push(c),c=c.prototype,c.setCompare=u,c.setModifier=C,c.setCumulative=k);-1===J.indexOf(n)&&(J.push(n),n.prototype.tooltipFormatter=q);return e};var f=function(){function e(c){this.series=c}e.prototype.modifyValue=function(){return 0};e.getCumulativeExtremes=function(c){var e=Infinity,p=-Infinity;c.reduce(function(g,c){c=g+c;e=Math.min(e,c,g);p=Math.max(p, c,g);return c});return[e,p]};e.prototype.initCompare=function(c){this.modifyValue=function(e,p){null===e&&(e=0);var g=this.compareValue;return"undefined"!==typeof e&&"undefined"!==typeof g?(e="value"===c?e-g:e/g*100-(100===this.series.options.compareBase?0:100),"undefined"!==typeof p&&(p=this.series.points[p])&&(p.change=e),e):0}};e.prototype.initCumulative=function(){this.modifyValue=function(c,e){null===c&&(c=0);if(void 0!==c&&void 0!==e){var p=0g.to||b> g.from&&eg.from&&eg.from&&e>g.to&&eh&&q>=this.basePointRange&&(h=q),b=void 0;k--;)b&&!1!==b.visible||(b=d[k+1]),q=d[k],!1!==b.visible&&!1!==q.visible&&(b.x-q.x>h&&(b=(q.x+b.x)/2, d.splice(k+1,0,{isNull:!0,x:b}),u.stacking&&this.options.stacking&&(b=u.stacking.stacks[this.stackKey][b]=new a(u,u.options.stackLabels,!1,b,this.stack),b.total=0)),b=q);return this.getGraphPath(d)}var R=[];m.compose=function(m,a){-1===R.indexOf(m)&&(R.push(m),m.keepProps.push("brokenAxis"),y(m,"init",K),y(m,"afterInit",d),y(m,"afterSetTickPositions",h),y(m,"afterSetOptions",b));if(-1===R.indexOf(a)){R.push(a);var u=a.prototype;u.drawBreaks=C;u.gappedPath=q;y(a,"afterGeneratePoints",G);y(a,"afterRender", I)}return m};var S=function(){function d(d){this.hasBreaks=!1;this.axis=d}d.isInBreak=function(d,b){var q=d.repeat||Infinity,k=d.from,h=d.to-d.from;b=b>=k?(b-k)%q:q-(k-b)%q;return d.inclusive?b<=h:b=b)break;else k.to=b)break;else if(d.isInBreak(m,b)){h-=b-m.from;break}}return h};d.prototype.findBreakAt=function(d,b){return t(b,function(b){return b.fromv;)B-=g;for(;B=c[0]);C++);for(C;C<=B;C++){for(;"undefined"!==typeof c[a+1]&&f[C]>=c[a+1]||C===B;){var z=c[a];p.dataGroupInfo={start:u?I:p.cropStart+I,length:A[0].length};var l=n.apply(p,A);p.pointClass&&!G(p.dataGroupInfo.options)&&(p.dataGroupInfo.options=R(p.pointClass.prototype.optionsToObject.call({series:p},p.options.data[p.cropStart+I])),m.forEach(function(g){delete p.dataGroupInfo.options[g]}));"undefined"!==typeof l&&(w.push(z),d.push(l),b.push(p.dataGroupInfo));I=C;for(z=0;z=e[0]){a=this.groupMap[0].start; z=this.groupMap[0].length;var K=void 0;q(a)&&q(z)&&(K=a+(z-1));e[0]={middle:e[0]+.5*A,end:e[0]+A,firstPoint:this.xData[0],lastPoint:K&&this.xData[K]}[C]}m&&"start"!==m&&A&&e[u]>=k-A&&(k=this.groupMap[this.groupMap.length-1].start,e[u]={middle:e[u]+.5*A,end:e[u]+A,firstPoint:k&&this.xData[k],lastPoint:this.xData[this.xData.length-1]}[m])}for(k=1;kw.max){if(!G(w.options.max)&&q(w.dataMax)&&w.max>=w.dataMax||w.max===w.dataMax)w.max=Math.max(p[p.length-1],w.max);w.dataMax=Math.max(p[p.length-1],w.dataMax)}}c.groupAll&&(this.allGroupedData=b,c=this.cropData(n,b,w.min,w.max,1),n=c.xData, b=c.yData,this.cropStart=c.start);this.processedXData=n;this.processedYData=b}else this.groupMap=null;this.hasGroupedData=g;this.currentDataGrouping=k;this.preventGraphAnimation=(v&&v.totalRange)!==(k&&k.totalRange)}};d.destroyGroupedData=function(){this.groupedData&&(this.groupedData.forEach(function(f,e){f&&(this.groupedData[e]=f.destroy?f.destroy():null)},this),this.groupedData.length=0)};d.generatePoints=function(){u.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points: null};a.prototype.applyGrouping=function(f){var e=this;e.series.forEach(function(c){c.groupPixelWidth=void 0;c.groupPixelWidth=e.getGroupPixelWidth&&e.getGroupPixelWidth();c.groupPixelWidth&&(c.hasProcessed=!0);c.applyGrouping(!!f.hasExtemesChanged)})};a.prototype.getGroupPixelWidth=function(){var f=this.series,e=f.length,c,n=0,p=!1,g;for(c=e;c--;)(g=f[c].options.dataGrouping)&&(n=Math.max(n,S(g.groupPixelWidth,M.groupPixelWidth)));for(c=e;c--;)if(g=f[c].options.dataGrouping)if(e=(f[c].processedXData|| f[c].data).length,f[c].groupPixelWidth||e>this.chart.plotSizeX/n||e&&g.forced)p=!0;return p?n:0};a.prototype.setDataGrouping=function(f,e){var c;e=S(e,!0);f||(f={forced:!1,units:null});if(this instanceof a)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:f},!1);else this.chart.options.series.forEach(function(c){c.dataGrouping=f},!1);this.ordinal&&(this.ordinal.slope=void 0);e&&this.chart.redraw()};y(a,"postProcessData",a.prototype.applyGrouping);y(l,"update",function(){if(this.dataGroup)return I(24, !1,this.series.chart),!1});y(E,"headerFormatter",function(f){var e=this.chart,c=e.time,n=f.labelConfig,p=n.series,g=p.tooltipOptions,v=p.options.dataGrouping,w=g.xDateFormat,d=p.xAxis,b=g[f.isFooter?"footerFormat":"headerFormat"];if(d&&"datetime"===d.options.type&&v&&q(n.key)){var k=p.currentDataGrouping;v=v.dateTimeLabelFormats||M.dateTimeLabelFormats;if(k)if(g=v[k.unitName],1===k.count)w=g[0];else{w=g[1];var h=g[2]}else!w&&v&&d.dateTime&&(w=d.dateTime.getXDateFormat(n.x,g.dateTimeLabelFormats)); w=c.dateFormat(w,n.key);h&&(w+=c.dateFormat(h,n.key+k.totalRange-1));p.chart.styledMode&&(b=this.styledModeFormat(b));f.text=m(b,{point:C(n.point,{key:w}),series:p},e);f.preventDefault()}});y(D,"destroy",d.destroyGroupedData);y(D,"afterSetOptions",function(f){f=f.options;var e=this.type,c=this.chart.options.plotOptions,n=x.defaultOptions.plotOptions[e].dataGrouping,p=this.useCommonDataGrouping&&M;if(k[e]||p){n||(n=R(M,k[e]));var g=this.chart.rangeSelector;f.dataGrouping=R(p,n,c.series&&c.series.dataGrouping, c[e].dataGrouping,this.userOptions.dataGrouping,!f.isInternal&&g&&q(g.selected)&&g.buttonOptions[g.selected].dataGrouping)}});y(a,"afterSetScale",function(){this.series.forEach(function(f){f.hasProcessed=!1})});t.dataGrouping=P;"";return P});L(a,"Series/HLC/HLCPoint.js",[a["Core/Series/SeriesRegistry.js"]],function(a){var r=this&&this.__extends||function(){var a=function(t,l){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var x in l)l.hasOwnProperty(x)&& (a[x]=l[x])};return a(t,l)};return function(t,l){function D(){this.constructor=t}a(t,l);t.prototype=null===l?Object.create(l):(D.prototype=l.prototype,new D)}}();return function(a){function t(){var l=null!==a&&a.apply(this,arguments)||this;l.close=void 0;l.high=void 0;l.low=void 0;l.options=void 0;l.plotClose=void 0;l.series=void 0;return l}r(t,a);return t}(a.seriesTypes.column.prototype.pointClass)});L(a,"Series/HLC/HLCSeries.js",[a["Series/HLC/HLCPoint.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]], function(a,r,y){var t=this&&this.__extends||function(){var a=function(b,m){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var h in b)b.hasOwnProperty(h)&&(d[h]=b[h])};return a(b,m)};return function(b,m){function d(){this.constructor=b}a(b,m);b.prototype=null===m?Object.create(m):(d.prototype=m.prototype,new d)}}(),l=r.seriesTypes.column,D=y.extend,E=y.merge;y=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0; b.options=void 0;b.points=void 0;b.yData=void 0;return b}t(b,a);b.prototype.extendStem=function(b,d,a){var h=b[0];b=b[1];"number"===typeof h[2]&&(h[2]=Math.max(a+d,h[2]));"number"===typeof b[2]&&(b[2]=Math.min(a-d,b[2]))};b.prototype.getPointPath=function(b,d){d=d.strokeWidth();var a=b.series,h=d%2/2,m=Math.round(b.plotX)-h,G=Math.round(b.shapeArgs.width/2);var I=[["M",m,Math.round(b.yBottom)],["L",m,Math.round(b.plotHigh)]];null!==b.close&&(b=Math.round(b.plotClose)+h,I.push(["M",m,b],["L",m+G,b]), a.extendStem(I,d/2,b));return I};b.prototype.drawSinglePoint=function(b){var d=b.series,a=d.chart,h=b.graphic,m=!h;"undefined"!==typeof b.plotY&&(h||(b.graphic=h=a.renderer.path().add(d.group)),a.styledMode||h.attr(d.pointAttribs(b,b.selected&&"select")),d=d.getPointPath(b,h),h[m?"attr":"animate"]({d:d}).addClass(b.getClassName(),!0))};b.prototype.drawPoints=function(){this.points.forEach(this.drawSinglePoint)};b.prototype.init=function(){a.prototype.init.apply(this,arguments);this.options.stacking= void 0};b.prototype.pointAttribs=function(b,d){b=a.prototype.pointAttribs.call(this,b,d);delete b.fill;return b};b.prototype.toYData=function(b){return[b.high,b.low,b.close]};b.prototype.translate=function(){var b=this,d=b.yAxis,z=this.pointArrayMap&&this.pointArrayMap.slice()||[],h=z.map(function(b){return"plot"+(b.charAt(0).toUpperCase()+b.slice(1))});h.push("yBottom");z.push("low");a.prototype.translate.apply(b);b.points.forEach(function(a){z.forEach(function(m,I){m=a[m];null!==m&&(b.dataModify&& (m=b.dataModify.modifyValue(m)),a[h[I]]=d.toPixels(m,!0))});a.tooltipPos[1]=a.plotHigh+d.pos-b.chart.plotTop})};b.defaultOptions=E(l.defaultOptions,{lineWidth:1,tooltip:{pointFormat:'\u25cf {series.name}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0});return b}(l);D(y.prototype,{animate:null,directTouch:!1,pointArrayMap:["high","low","close"],pointAttrToOptions:{stroke:"color", "stroke-width":"lineWidth"},pointValKey:"close"});y.prototype.pointClass=a;r.registerSeriesType("hlc",y);"";return y});L(a,"Series/OHLC/OHLCPoint.js",[a["Core/Series/SeriesRegistry.js"]],function(a){var r=this&&this.__extends||function(){var a=function(t,l){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var t in l)l.hasOwnProperty(t)&&(a[t]=l[t])};return a(t,l)};return function(t,l){function D(){this.constructor=t}a(t,l);t.prototype=null=== l?Object.create(l):(D.prototype=l.prototype,new D)}}();return function(a){function t(){var l=null!==a&&a.apply(this,arguments)||this;l.open=void 0;l.options=void 0;l.plotOpen=void 0;l.series=void 0;return l}r(t,a);t.prototype.getClassName=function(){return a.prototype.getClassName.call(this)+(this.open\u25cf {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'}});return a}(D);x(m.prototype,{pointArrayMap:["open","high","low","close"]});m.prototype.pointClass=a;r.registerSeriesType("ohlc",m);E(l,"init",function(b){b= b.options;b.useOhlcData&&"highcharts-navigator-series"!==b.id&&x(this,{pointValKey:m.prototype.pointValKey,pointArrayMap:m.prototype.pointArrayMap,toYData:m.prototype.toYData})});E(l,"afterSetOptions",function(b){b=b.options;var a=b.dataGrouping;a&&b.useOhlcData&&"highcharts-navigator-series"!==b.id&&(a.approximation="ohlc")});"";return m});L(a,"Series/Candlestick/CandlestickSeries.js",[a["Core/DefaultOptions.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,r,y){var t=this&& this.__extends||function(){var b=function(a,d){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d])};return b(a,d)};return function(a,d){function m(){this.constructor=a}b(a,d);a.prototype=null===d?Object.create(d):(m.prototype=d.prototype,new m)}}(),l=a.defaultOptions;a=r.seriesTypes;var D=a.column,E=a.ohlc,x=y.merge;y=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.data=void 0; a.options=void 0;a.points=void 0;return a}t(a,b);a.prototype.pointAttribs=function(b,a){var d=D.prototype.pointAttribs.call(this,b,a),m=this.options,l=b.opend)break}}}m.forEach(function(c,g){c.plotX+=k;if("undefined"===typeof c.plotY||z)0<=c.plotX&& c.plotX<=F.len?z?(c.plotY=F.translate(c.x,0,1,0,1),c.plotX=D(c.y)?x.translate(c.y,0,0,0,1):0):c.plotY=(F.opposite?0:b.yAxis.len)+F.offset:c.shapeArgs={};if((u=m[g-1])&&u.plotX===c.plotX){"undefined"===typeof u.stackIndex&&(u.stackIndex=0);var v=u.stackIndex+1}c.stackIndex=v});this.onSeries=C}var z=[];b.compose=function(b){if(-1===z.indexOf(b)){z.push(b);var h=b.prototype;h.getPlotBox=a;h.translate=d}return b};b.getPlotBox=a;b.translate=d})(x||(x={}));return x});L(a,"Series/Flags/FlagsSymbols.js", [a["Core/Renderer/RendererRegistry.js"],a["Core/Renderer/SVG/SVGRenderer.js"]],function(a,r){function y(a){t[a+"pin"]=function(l,r,x,b,m){var d=m&&m.anchorX;m=m&&m.anchorY;"circle"===a&&b>x&&(l-=Math.round((b-x)/2),x=b);var z=t[a](l,r,x,b);if(d&&m){var h=d;"circle"===a?h=l+x/2:(l=z[0],x=z[1],"M"===l[0]&&"L"===x[0]&&(h=(l[1]+x[1])/2));z.push(["M",h,r>m?r:r+b],["L",d,m]);z=z.concat(t.circle(d-1,m-1,2,2))}return z}}var t=r.prototype.symbols;t.flag=function(a,r,y,x,b){var m=b&&b.anchorX||a;b=b&&b.anchorY|| r;var d=t.circle(m-1,b-1,2,2);d.push(["M",m,b],["L",a,r+x],["L",a,r],["L",a+y,r],["L",a+y,r+x],["L",a,r+x],["Z"]);return d};y("circle");y("square");a=a.getRendererType();a!==r&&(a.prototype.symbols.circlepin=t.circlepin,a.prototype.symbols.flag=t.flag,a.prototype.symbols.squarepin=t.squarepin);return t});L(a,"Series/Flags/FlagsSeries.js",[a["Series/Flags/FlagsPoint.js"],a["Core/Globals.js"],a["Series/OnSeriesComposition.js"],a["Core/Renderer/RendererUtilities.js"],a["Core/Series/SeriesRegistry.js"], a["Core/Renderer/SVG/SVGElement.js"],a["Core/Utilities.js"]],function(a,r,y,t,l,D,E){var x=this&&this.__extends||function(){var b=function(a,d){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var d in a)a.hasOwnProperty(d)&&(b[d]=a[d])};return b(a,d)};return function(a,d){function q(){this.constructor=a}b(a,d);a.prototype=null===d?Object.create(d):(q.prototype=d.prototype,new q)}}();r=r.noop;var b=t.distribute,m=l.series,d=l.seriesTypes.column, z=E.addEvent,h=E.defined;t=E.extend;var K=E.merge,G=E.objectEach,I=E.wrap;E=function(a){function q(){var b=null!==a&&a.apply(this,arguments)||this;b.data=void 0;b.options=void 0;b.points=void 0;return b}x(q,a);q.prototype.animate=function(b){b&&this.setClip()};q.prototype.drawPoints=function(){var a=this.points,d=this.chart,q=d.renderer,m=d.inverted,u=this.options,l=u.y,k,C=this.yAxis,f={},e=[];for(k=a.length;k--;){var c=a[k];var n=(m?c.plotY:c.plotX)>this.xAxis.len;var p=c.plotX;var g=c.stackIndex; var v=c.options.shape||u.shape;var w=c.plotY;"undefined"!==typeof w&&(w=c.plotY+l-("undefined"!==typeof g&&g*u.stackDistance));c.anchorX=g?void 0:c.plotX;var Q=g?void 0:c.plotY;var O="flag"!==v;g=c.graphic;"undefined"!==typeof w&&0<=p&&!n?(g&&c.hasNewShapeType()&&(g=g.destroy()),g||(g=c.graphic=q.label("",null,null,v,null,null,u.useHTML).addClass("highcharts-point").add(this.markerGroup),c.graphic.div&&(c.graphic.div.point=c),g.isNew=!0),g.attr({align:O?"center":"left",width:u.width,height:u.height, "text-align":u.textAlign}),d.styledMode||g.attr(this.pointAttribs(c)).css(K(u.style,c.style)).shadow(u.shadow),0this.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)}};a.prototype.destroy=function(){var a=this,b=a.chart.scroller;a.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(b){a[b]&&a[b].destroy&&(a[b]=a[b].destroy())});b&&a===b.scrollbar&&(b.scrollbar=null,m(b.scrollbarButtons))}; a.prototype.drawScrollbarButton=function(b){var d=this.renderer,q=this.scrollbarButtons,h=this.options,l=this.size,m=d.g().add(this.group);q.push(m);m=d.rect().addClass("highcharts-scrollbar-button").add(m);this.chart.styledMode||m.attr({stroke:h.buttonBorderColor,"stroke-width":h.buttonBorderWidth,fill:h.buttonBackgroundColor});m.attr(m.crisp({x:-.5,y:-.5,width:l+1,height:l+1,r:h.buttonBorderRadius},m.strokeWidth()));m=d.path(a.swapXY([["M",l/2+(b?-1:1),l/2-3],["L",l/2+(b?-1:1),l/2+3],["L",l/2+(b? 2:-2),l/2]],h.vertical)).addClass("highcharts-scrollbar-arrow").add(q[b]);this.chart.styledMode||m.attr({fill:h.buttonArrowColor})};a.prototype.init=function(a,b,d){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=z(t,D.scrollbar,b);this.chart=d;this.size=h(this.options.size,this.options.height);b.enabled&&(this.render(),this.addEvents())};a.prototype.mouseDownHandler=function(a){a=this.chart.pointer.normalize(a);a=this.cursorToScrollbarPosition(a);this.chartX=a.chartX;this.chartY= a.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=!0};a.prototype.mouseMoveHandler=function(a){var b=this.chart.pointer.normalize(a),q=this.options.vertical?"chartY":"chartX",h=this.initPositions||[];!this.grabbedCenter||a.touches&&0===a.touches[0][q]||(b=this.cursorToScrollbarPosition(b)[q],q=this[q],q=b-q,this.hasDragged=!0,this.updatePosition(h[0]+q,h[1]+q),this.hasDragged&&d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a}))};a.prototype.mouseUpHandler= function(a){this.hasDragged&&d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:a.type,DOMEvent:a});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};a.prototype.position=function(a,b,d,h){var q=this.options.vertical,l=this.rendered?"animate":"attr",m=0;this.x=a;this.y=b+this.trackBorderWidth;this.width=d;this.xOffset=this.height=h;this.yOffset=m;q?(this.width=this.yOffset=d=m=this.size,this.xOffset=b=0,this.barWidth=h-2*d,this.x=a+=this.options.margin):(this.height= this.xOffset=h=b=this.size,this.barWidth=d-2*h,this.y+=this.options.margin);this.group[l]({translateX:a,translateY:this.y});this.track[l]({width:d,height:h});this.scrollbarButtons[1][l]({translateX:q?0:d-b,translateY:q?h-m:0})};a.prototype.removeEvents=function(){this._events.forEach(function(a){K.apply(null,a)});this._events.length=0};a.prototype.render=function(){var b=this.renderer,d=this.options,h=this.size,l=this.chart.styledMode,m=b.g("scrollbar").attr({zIndex:d.zIndex,translateY:-99999}).add(); this.group=m;this.track=b.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:d.trackBorderRadius||0,height:h,width:h}).add(m);l||this.track.attr({fill:d.trackBackgroundColor,stroke:d.trackBorderColor,"stroke-width":d.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=b.g().add(m);this.scrollbar=b.rect().addClass("highcharts-scrollbar-thumb").attr({height:h,width:h,r:d.barBorderRadius||0}).add(this.scrollbarGroup); this.scrollbarRifles=b.path(a.swapXY([["M",-3,h/4],["L",-3,2*h/3],["M",0,h/4],["L",0,2*h/3],["M",3,h/4],["L",3,2*h/3]],d.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);l||(this.scrollbar.attr({fill:d.barBackgroundColor,stroke:d.barBorderColor,"stroke-width":d.barBorderWidth}),this.scrollbarRifles.attr({stroke:d.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth% 2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)};a.prototype.setRange=function(a,d){var h=this.options,l=h.vertical,m=h.minWidth,t=this.barWidth,r=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(b(t)){var u=t*Math.min(d,1);a=Math.max(a,0);var z=Math.ceil(t*a);this.calculatedWidth=u=x(u-z);u=u?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===h.showFull&&(0>=a&&1<=d?this.group.hide():this.group.show());this.rendered=!0}};a.prototype.shouldUpdateExtremes=function(a){return h(this.options.liveRedraw,r.svg&&!r.isTouchDevice&&!this.chart.isBoosting)|| "mouseup"===a||"touchend"===a||!b(a)};a.prototype.trackClick=function(a){var b=this.chart.pointer.normalize(a),h=this.to-this.from,m=this.y+this.scrollbarTop,l=this.x+this.scrollbarLeft;this.options.vertical&&b.chartY>m||!this.options.vertical&&b.chartX>l?this.updatePosition(this.from+h,this.to+h):this.updatePosition(this.from-h,this.to-h);d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:a})};a.prototype.update=function(a){this.destroy();this.init(this.chart.renderer,z(!0, this.options,a),this.chart)};a.prototype.updatePosition=function(a,b){1a&&(b=x(b-a),a=0);this.from=a;this.to=b};a.defaultOptions=t;return a}();D.scrollbar=z(!0,a.defaultOptions,D.scrollbar);return a});L(a,"Core/Axis/NavigatorAxis.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,r){var y=a.isTouchDevice,t=r.addEvent,l=r.correctFloat,D=r.defined,E=r.isNumber,x=r.pick,b=function(){function a(a){this.axis=a}a.prototype.destroy=function(){this.axis=void 0};a.prototype.toFixedRange= function(a,b,h,m){var d=this.axis,t=d.chart;t=t&&t.fixedRange;var r=(d.pointRange||0)/2;a=x(h,d.translate(a,!0,!d.horiz));b=x(m,d.translate(b,!0,!d.horiz));d=t&&(b-a)/t;D(h)||(a=l(a+r));D(m)||(b=l(b-r));.7d&&(m?a=b-t:b=a+t);E(a)&&E(b)||(a=b=void 0);return{min:a,max:b}};return a}();return function(){function a(){}a.compose=function(a){a.keepProps.push("navigatorAxis");t(a,"init",function(){this.navigatorAxis||(this.navigatorAxis=new b(this))});t(a,"zoom",function(a){var b=this.chart.options, d=b.navigator,l=this.navigatorAxis,m=b.chart.pinchType,t=b.rangeSelector;b=b.chart.zoomType;this.isXAxis&&(d&&d.enabled||t&&t.enabled)&&("y"===b?a.zoomed=!1:(!y&&"xy"===b||y&&"xy"===m)&&this.options.range&&(d=l.previousZoom,D(a.newMin)?l.previousZoom=[this.min,this.max]:d&&(a.newMin=d[0],a.newMax=d[1],l.previousZoom=void 0)));"undefined"!==typeof a.zoomed&&a.preventDefault()})};a.AdditionsClass=b;return a}()});L(a,"Core/Navigator.js",[a["Core/Axis/Axis.js"],a["Core/Chart/Chart.js"],a["Core/Color/Color.js"], a["Core/Globals.js"],a["Core/Axis/NavigatorAxis.js"],a["Core/DefaultOptions.js"],a["Core/Renderer/RendererRegistry.js"],a["Core/Scrollbar.js"],a["Core/Series/Series.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,r,y,t,l,D,E,x,b,m,d){y=y.parse;var z=t.hasTouch,h=t.isTouchDevice,K=D.defaultOptions,G=d.addEvent,I=d.clamp,C=d.correctFloat,q=d.defined,L=d.destroyObjectProperties,P=d.erase,F=d.extend,N=d.find,u=d.isArray,M=d.isNumber,k=d.merge,J=d.pick,f=d.removeEvent,e=d.splat, c=function(a){for(var g=[],c=1;cu&&(this.grabbedLeft?b=p.toPixels(c-u-n,!0):this.grabbedRight&&(e=p.toPixels(a+u+n,!0)));this.zoomedMax=I(Math.max(b,e),0,k);this.zoomedMin=I(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(b,e),0,k);this.range=this.zoomedMax-this.zoomedMin;k=Math.round(this.zoomedMax);b=Math.round(this.zoomedMin);f&&(this.navigatorGroup.attr({visibility:"visible"}),h=h&&!this.hasDragged?"animate":"attr", this.drawMasks(b,k,l,h),this.drawOutline(b,k,l,h),this.navigatorOptions.handles.enabled&&(this.drawHandle(b,0,l,h),this.drawHandle(k,1,l,h)));this.scrollbar&&(l?(l=this.top-v,w=this.left-v+(f||!w.opposite?0:(w.titleOffset||0)+w.axisTitleMargin),v=d+2*v):(l=this.top+(f?this.height:-v),w=this.left-v),this.scrollbar.position(w,l,g,v),this.scrollbar.setRange(this.zoomedMin/(d||1),this.zoomedMax/(d||1)));this.rendered=!0}};b.prototype.addMouseEvents=function(){var a=this,c=a.chart,b=c.container,e=[],d, p;a.mouseMoveHandler=d=function(c){a.onMouseMove(c)};a.mouseUpHandler=p=function(c){a.onMouseUp(c)};e=a.getPartsEvents("mousedown");e.push(G(c.renderTo,"mousemove",d),G(b.ownerDocument,"mouseup",p));z&&(e.push(G(c.renderTo,"touchmove",d),G(b.ownerDocument,"touchend",p)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(G(a.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))};b.prototype.getPartsEvents=function(a){var c=this, g=[];["shades","handles"].forEach(function(b){c[b].forEach(function(e,v){g.push(G(e.element,a,function(a){c[b+"Mousedown"](a,v)}))})});return g};b.prototype.shadesMousedown=function(a,c){a=this.chart.pointer.normalize(a);var b=this.chart,g=this.xAxis,e=this.zoomedMin,v=this.left,d=this.size,p=this.range,n=a.chartX;b.inverted&&(n=a.chartY,v=this.top);if(1===c)this.grabbedCenter=n,this.fixedWidth=p,this.dragOffset=n-e;else{a=n-v-p/2;if(0===c)a=Math.max(0,a);else if(2===c&&a+p>=d)if(a=d-p,this.reversedExtremes){a-= p;var f=this.getUnionExtremes().dataMin}else var k=this.getUnionExtremes().dataMax;a!==e&&(this.fixedWidth=p,c=g.navigatorAxis.toFixedRange(a,a+p,f,k),q(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,null,{trigger:"navigator"}))}};b.prototype.handlesMousedown=function(a,c){this.chart.pointer.normalize(a);a=this.chart;var b=a.xAxis[0],g=this.reversedExtremes;0===c?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=g?b.min:b.max):(this.grabbedRight= !0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=g?b.max:b.min);a.fixedRange=null};b.prototype.onMouseMove=function(a){var c=this,b=c.chart,g=c.left,e=c.navigatorSize,d=c.range,p=c.dragOffset,n=b.inverted;a.touches&&0===a.touches[0].pageX||(a=b.pointer.normalize(a),b=a.chartX,n&&(g=c.top,b=a.chartY),c.grabbedLeft?(c.hasDragged=!0,c.render(0,0,b-g,c.otherHandlePos)):c.grabbedRight?(c.hasDragged=!0,c.render(0,0,c.otherHandlePos,b-g)):c.grabbedCenter&&(c.hasDragged=!0,be+p-d&&(b=e+p- d),c.render(0,0,b-p,b-p+d)),c.hasDragged&&c.scrollbar&&J(c.scrollbar.options.liveRedraw,t.svg&&!h&&!this.chart.isBoosting)&&(a.DOMType=a.type,setTimeout(function(){c.onMouseUp(a)},0)))};b.prototype.onMouseUp=function(a){var c=this.chart,b=this.xAxis,g=this.scrollbar,e=a.DOMEvent||a,d=c.inverted,p=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!g||!g.hasDragged)||"scrollbar"===a.trigger){g=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var n=this.fixedExtreme; else if(this.zoomedMax===this.otherHandlePos)var f=this.fixedExtreme;this.zoomedMax===this.size&&(f=this.reversedExtremes?g.dataMin:g.dataMax);0===this.zoomedMin&&(n=this.reversedExtremes?g.dataMax:g.dataMin);b=b.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,n,f);q(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e})}"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType&&(this.grabbedLeft= this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null);this.navigatorEnabled&&M(this.zoomedMin)&&M(this.zoomedMax)&&(c=Math.round(this.zoomedMin),a=Math.round(this.zoomedMax),this.shades&&this.drawMasks(c,a,d,p),this.outline&&this.drawOutline(c,a,d,p),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(c,0,d,p),this.drawHandle(a,1,d,p)))};b.prototype.removeEvents=function(){this.eventsToUnbind&& (this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};b.prototype.removeBaseSeriesEvents=function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(function(a){f(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&f(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};b.prototype.init=function(b){var g=b.options,e=g.navigator,d=e.enabled,p=g.scrollbar,n=p.enabled;g=d?e.height: 0;var f=n?p.height:0;this.handles=[];this.shades=[];this.chart=b;this.setBaseSeries();this.height=g;this.scrollbarHeight=f;this.scrollbarEnabled=n;this.navigatorEnabled=d;this.navigatorOptions=e;this.scrollbarOptions=p;this.outlineHeight=g+f;this.opposite=J(e.opposite,!(d||!b.inverted));var h=this;d=h.baseSeries;p=b.xAxis.length;n=b.yAxis.length;var m=d&&d[0]&&d[0].xAxis||b.xAxis[0]||{options:{}};b.isDirtyBox=!0;h.navigatorEnabled?(h.xAxis=new a(b,k({breaks:m.options.breaks,ordinal:m.options.ordinal}, e.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:p,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},b.inverted?{offsets:[f,0,-f,0],width:g}:{offsets:[0,-f,0,f],height:g})),h.yAxis=new a(b,k(e.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:n,isInternal:!0,reversed:J(e.yAxis&&e.yAxis.reversed,b.yAxis[0]&&b.yAxis[0].reversed,!1),zoomEnabled:!1},b.inverted?{width:g}:{height:g})),d||e.series.data? h.updateNavigatorSeries(!1):0===b.series.length&&(h.unbindRedraw=G(b,"beforeRedraw",function(){0d.indexOf(c)?(c&&(f(c,"updatedData",b.updatedDataHandler),delete c.navigatorSeries),a.chart&&a.destroy(),!1):!0});d&&d.length&&d.forEach(function(a){var f=a.navigatorSeries,w=F({color:a.color,visible:a.visible},u(v)?K.navigator.series:v);f&&!1===b.navigatorOptions.adaptToUpdatedData||(l.name="Navigator "+d.length,p=a.options|| {},h=p.navigatorOptions||{},w.dataLabels=e(w.dataLabels),n=k(p,l,w,h),n.pointRange=J(w.pointRange,h.pointRange,K.plotOptions[n.type||"line"].pointRange),w=h.data||w.data,b.hasNavigatorData=b.hasNavigatorData||!!w,n.data=w||p.data&&p.data.slice(0),f&&f.options?f.update(n,c):(a.navigatorSeries=g.initSeries(n),a.navigatorSeries.baseSeries=a,m.push(a.navigatorSeries)))});if(v.data&&(!d||!d.length)||u(v))b.hasNavigatorData=!1,v=e(v),v.forEach(function(a,c){l.name="Navigator "+(m.length+1);n=k(K.navigator.series, {color:g.series[c]&&!g.series[c].options.isInternal&&g.series[c].color||g.options.colors[c]||g.options.colors[0]},l,a);n.data=a.data;n.data&&(b.hasNavigatorData=!0,m.push(g.initSeries(n)))});a&&this.addBaseSeriesEvents()};b.prototype.addBaseSeriesEvents=function(){var a=this,c=a.baseSeries||[];c[0]&&c[0].xAxis&&c[0].eventsToUnbind.push(G(c[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes));c.forEach(function(c){c.eventsToUnbind.push(G(c,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0, !1)}));c.eventsToUnbind.push(G(c,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}));!1!==this.navigatorOptions.adaptToUpdatedData&&c.xAxis&&c.eventsToUnbind.push(G(c,"updatedData",this.updatedDataHandler));c.eventsToUnbind.push(G(c,"remove",function(){this.navigatorSeries&&(P(a.series,this.navigatorSeries),q(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))},this)};b.prototype.getBaseSeriesMin=function(a){return this.baseSeries.reduce(function(a, c){return Math.min(a,c.xData?c.xData[0]:a)},a)};b.prototype.modifyNavigatorAxisExtremes=function(){var a=this.xAxis,c;"undefined"!==typeof a.getExtremes&&(!(c=this.getUnionExtremes(!0))||c.dataMin===a.min&&c.dataMax===a.max||(a.min=c.dataMin,a.max=c.dataMax))};b.prototype.modifyBaseAxisExtremes=function(){var a=this.chart.navigator,c=this.getExtremes(),b=c.dataMin,e=c.dataMax;c=c.max-c.min;var d=a.stickToMin,p=a.stickToMax,n=J(this.options.overscroll,0),f=a.series&&a.series[0],k=!!this.setExtremes; if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(d){var h=b;var l=h+c}p&&(l=e+n,d||(h=Math.max(b,l-c,a.getBaseSeriesMin(f&&f.xData?f.xData[0]:-Number.MAX_VALUE))));k&&(d||p)&&M(h)&&(this.min=this.userMin=h,this.max=this.userMax=l)}a.stickToMin=a.stickToMax=null};b.prototype.updatedDataHandler=function(){var a=this.chart.navigator,c=this.navigatorSeries;a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=a.shouldStickToMin(this, a);c&&!a.hasNavigatorData&&(c.options.pointStart=this.xData[0],c.setData(this.options.data,!1,null,!1))};b.prototype.shouldStickToMin=function(a,c){c=c.getBaseSeriesMin(a.xData[0]);var b=a.xAxis;a=b.max;var g=b.min;b=b.options.range;return M(a)&&M(g)?b&&0l-h,A=n=864E5*{month:28,year:365}[p]*k-q&&d-36E5<=864E5*{month:31,year:366}[p]*k+q?n=!0:"ytd"===p?(n=u-m+q===d,H=!c):"all"===p&&(n=g.max-g.min>=l-h,z=!c&&r&&n);p= !x&&(B||A||z||f);k=c&&n||n&&!r&&!H||c&&a.frozenStates;p?w=3:k&&(r=!0,w=2);v.state!==w&&(v.setState(w),e&&(e.options[b+1].disabled=p,2===w&&(e.selectedIndex=b+1)),0===w&&t===b&&a.setSelected())})};e.prototype.computeButtonRange=function(a){var c=a.type,b=a.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[c])a._range=e[c]*b;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*b;a._offsetMin=N(a.offsetMin,0);a._offsetMax=N(a.offsetMax,0);a._range+= a._offsetMax-a._offsetMin};e.prototype.getInputValue=function(a){a="min"===a?this.minInput:this.maxInput;var c=this.chart.options.rangeSelector,b=this.chart.time;return a?("text"===a.type&&c.inputDateParser||this.defaultInputDateParser)(a.value,b.useUTC,b):0};e.prototype.setInputValue=function(a,b){var c=this.options,e=this.chart.time,d="min"===a?this.minInput:this.maxInput;a="min"===a?this.minDateBox:this.maxDateBox;if(d){var n=d.getAttribute("data-hc-time");n=z(n)?Number(n):void 0;z(b)&&(z(n)&& d.setAttribute("data-hc-time-previous",n),d.setAttribute("data-hc-time",b),n=b);d.value=e.dateFormat(this.inputTypeFormats[d.type]||c.inputEditDateFormat,n);a&&a.attr({text:e.dateFormat(c.inputDateFormat,n)})}};e.prototype.setInputExtremes=function(a,b,e){if(a="min"===a?this.minInput:this.maxInput){var c=this.inputTypeFormats[a.type],d=this.chart.time;c&&(b=d.dateFormat(c,b),a.min!==b&&(a.min=b),e=d.dateFormat(c,e),a.max!==e&&(a.max=e))}};e.prototype.showInput=function(a){var b="min"===a?this.minDateBox: this.maxDateBox;if((a="min"===a?this.minInput:this.maxInput)&&b&&this.inputGroup){var c="text"===a.type,e=this.inputGroup,f=e.translateX;e=e.translateY;var k=this.options.inputBoxWidth;d(a,{width:c?b.width+(k?-2:20)+"px":"auto",height:c?b.height-2+"px":"auto",border:"2px solid silver"});c&&k?d(a,{left:f+b.x+"px",top:e+"px"}):d(a,{left:Math.min(Math.round(b.x+f-(a.offsetWidth-b.width)/2),this.chart.chartWidth-a.offsetWidth)+"px",top:e-(a.offsetHeight-b.height)/2+"px"})}};e.prototype.hideInput=function(a){(a= "min"===a?this.minInput:this.maxInput)&&d(a,{top:"-9999em",border:0,width:"1px",height:"1px"})};e.prototype.defaultInputDateParser=function(a,b,e){var c=a.split("/").join("-").split(" ").join("T");-1===c.indexOf("T")&&(c+="T00:00");if(b)c+="Z";else{var d;if(d=y.isSafari)d=c,d=!(6=d?"+"+F(-d)+":00":"-"+F(d)+":00")}c=Date.parse(c);q(c)||(a=a.split("-"),c=Date.UTC(u(a[0]),u(a[1])- 1,u(a[2])));e&&b&&q(c)&&(c+=e.getTimezoneOffset(c));return c};e.prototype.drawInput=function(a){function b(){var b=k.getInputValue(a),e=c.xAxis[0],d=c.scroller&&c.scroller.xAxis?c.scroller.xAxis:e,g=d.dataMin;d=d.dataMax;var f=k.maxInput,n=k.minInput;b!==Number(r.getAttribute("data-hc-time-previous"))&&q(b)&&(r.setAttribute("data-hc-time-previous",b),t&&f&&q(g)?b>Number(f.getAttribute("data-hc-time"))?b=void 0:bd&&(b=d)),"undefined"!== typeof b&&e.setExtremes(t?b:e.min,t?e.max:b,void 0,void 0,{trigger:"rangeSelectorInput"}))}var c=this.chart,e=this.div,f=this.inputGroup,k=this,h=c.renderer.style||{},l=c.renderer,u=c.options.rangeSelector,t="min"===a,A=x.lang[t?"rangeSelectorFrom":"rangeSelectorTo"]||"";A=l.label(A,0).addClass("highcharts-range-label").attr({padding:A?2:0,height:A?u.inputBoxHeight:0}).add(f);l=l.label("",0).addClass("highcharts-range-input").attr({padding:2,width:u.inputBoxWidth,height:u.inputBoxHeight,"text-align":"center"}).on("click", function(){k.showInput(a);k[a+"Input"].focus()});c.styledMode||l.attr({stroke:u.inputBoxBorderColor,"stroke-width":1});l.add(f);var r=m("input",{name:a,className:"highcharts-range-selector"},void 0,e);r.setAttribute("type",E(u.inputDateFormat||"%b %e, %Y"));c.styledMode||(A.css(P(h,u.labelStyle)),l.css(P({color:"#333333"},h,u.inputStyle)),d(r,G({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:h.fontSize,fontFamily:h.fontFamily, top:"-9999em"},u.inputStyle)));r.onfocus=function(){k.showInput(a)};r.onblur=function(){r===y.doc.activeElement&&b();k.hideInput(a);k.setInputValue(a);r.blur()};var z=!1;r.onchange=function(){z||(b(),k.hideInput(a),r.blur())};r.onkeypress=function(a){13===a.keyCode&&b()};r.onkeydown=function(a){z=!0;38!==a.keyCode&&40!==a.keyCode||b()};r.onkeyup=function(){z=!1};return{dateBox:l,input:r,label:A}};e.prototype.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}};e.prototype.getYTDExtremes=function(a,b,e){var c=this.chart.time,d=new c.Date(a),f=c.get("FullYear",d);e=e?c.Date.UTC(f,0,1):+new c.Date(f,0,1);b=Math.max(b,e);d=d.getTime();return{max:Math.min(a||d,d),min:b}};e.prototype.render=function(a,b){var c=this.chart,e=c.renderer,d=c.container,f=c.options,n=f.rangeSelector,k=N(f.chart.style&&f.chart.style.zIndex,0)+1;f=n.inputEnabled;if(!1!==n.enabled){this.rendered|| (this.group=e.g("range-selector-group").attr({zIndex:7}).add(),this.div=m("div",void 0,{position:"relative",height:0,zIndex:k}),this.buttonOptions.length&&this.renderButtons(),d.parentNode&&d.parentNode.insertBefore(this.div,d),f&&(this.inputGroup=e.g("input-group").add(this.group),e=this.drawInput("min"),this.minDateBox=e.dateBox,this.minLabel=e.label,this.minInput=e.input,e=this.drawInput("max"),this.maxDateBox=e.dateBox,this.maxLabel=e.label,this.maxInput=e.input));if(f&&(this.setInputValue("min", a),this.setInputValue("max",b),a=c.scroller&&c.scroller.getUnionExtremes()||c.xAxis[0]||{},z(a.dataMin)&&z(a.dataMax)&&(c=c.xAxis[0].minRange||0,this.setInputExtremes("min",a.dataMin,Math.min(a.dataMax,this.getInputValue("max"))-c),this.setInputExtremes("max",Math.max(a.dataMin,this.getInputValue("min"))+c,a.dataMax)),this.inputGroup)){var h=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(a){if(a){var b=a.getBBox().width;b&&(a.attr({x:h}),h+=b+n.inputSpacing)}})}this.alignElements(); this.rendered=!0}};e.prototype.renderButtons=function(){var a=this,e=this.buttons,d=this.options,g=x.lang,f=this.chart.renderer,k=P(d.buttonTheme),h=k&&k.states,l=k.width||28;delete k.width;delete k.states;this.buttonGroup=f.g("range-selector-buttons").add(this.group);var q=this.dropdown=m("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:.0001},this.div);b(q,"touchstart",function(){q.style.fontSize="16px"});[[y.isMS?"mouseover": "mouseenter"],[y.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(c){var d=c[0],g=c[1];b(q,d,function(){var b=e[a.currentButtonIndex()];b&&C(b.element,g||d)})});this.zoomText=f.label(g&&g.rangeSelectorZoom||"",0).attr({padding:d.buttonTheme.padding,height:d.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(d.labelStyle),k["stroke-width"]=N(k["stroke-width"],0));m("option",{textContent:this.zoomText.textStr,disabled:!0}, void 0,q);this.buttonOptions.forEach(function(b,c){m("option",{textContent:b.title||b.text},void 0,q);e[c]=f.button(b.text,0,0,function(e){var d=b.events&&b.events.click,g;d&&(g=d.call(b,e));!1!==g&&a.clickButton(c);a.isActive=!0},k,h&&h.hover,h&&h.select,h&&h.disabled).attr({"text-align":"center",width:l}).add(a.buttonGroup);b.title&&e[c].attr("title",b.title)})};e.prototype.alignElements=function(){var a=this,b=this.buttonGroup,e=this.buttons,d=this.chart,f=this.group,k=this.inputGroup,h=this.options, l=this.zoomText,m=d.options,q=m.exporting&&!1!==m.exporting.enabled&&m.navigation&&m.navigation.buttonOptions;m=h.buttonPosition;var u=h.inputPosition,t=h.verticalAlign,r=function(b,c){return q&&a.titleCollision(d)&&"top"===t&&"right"===c.align&&c.y-b.getBBox().height-12<(q.y||0)+(q.height||0)+d.spacing[0]?-40:0},x=d.plotLeft;if(f&&m&&u){var z=m.x-d.spacing[3];if(b){this.positionButtons();if(!this.initialButtonGroupWidth){var y=0;l&&(y+=l.getBBox().width+5);e.forEach(function(a,b){y+=a.width;b!== e.length-1&&(y+=h.buttonSpacing)});this.initialButtonGroupWidth=y}x-=d.spacing[3];this.updateButtonStates();l=r(b,m);this.alignButtonGroup(l);f.placed=b.placed=d.hasLoaded}b=0;k&&(b=r(k,u),"left"===u.align?z=x:"right"===u.align&&(z=-Math.max(d.axisOffset[1],-b)),k.align({y:u.y,width:k.getBBox().width,align:u.align,x:u.x+z-2},!0,d.spacingBox),k.placed=d.hasLoaded);this.handleCollision(b);f.align({verticalAlign:t},!0,d.spacingBox);k=f.alignAttr.translateY;b=f.getBBox().height+20;r=0;"bottom"===t&&(r= (r=d.legend&&d.legend.options)&&"bottom"===r.verticalAlign&&r.enabled&&!r.floating?d.legend.legendHeight+N(r.margin,10):0,b=b+r-20,r=k-b-(h.floating?0:h.y)-(d.titleOffset?d.titleOffset[2]:0)-10);if("top"===t)h.floating&&(r=0),d.titleOffset&&d.titleOffset[0]&&(r=d.titleOffset[0]),r+=d.margin[0]-d.spacing[0]||0;else if("middle"===t)if(u.y===m.y)r=k;else if(u.y||m.y)r=0>u.y||0>m.y?r-Math.min(u.y,m.y):k-b;f.translate(h.x,h.y+Math.floor(r));m=this.minInput;u=this.maxInput;k=this.dropdown;h.inputEnabled&& m&&u&&(m.style.marginTop=f.translateY+"px",u.style.marginTop=f.translateY+"px");k&&(k.style.marginTop=f.translateY+"px")}};e.prototype.alignButtonGroup=function(a,b){var c=this.chart,e=this.buttonGroup,d=this.options.buttonPosition,f=c.plotLeft-c.spacing[3],k=d.x-c.spacing[3];"right"===d.align?k+=a-f:"center"===d.align&&(k-=f/2);e&&e.align({y:d.y,width:N(b,this.initialButtonGroupWidth),align:d.align,x:k},!0,c.spacingBox)};e.prototype.positionButtons=function(){var a=this.buttons,b=this.chart,e=this.options, d=this.zoomText,f=b.hasLoaded?"animate":"attr",k=e.buttonPosition,h=b.plotLeft,l=h;d&&"hidden"!==d.visibility&&(d[f]({x:N(h+k.x,h)}),l+=k.x+d.getBBox().width+5);this.buttonOptions.forEach(function(b,c){if("hidden"!==a[c].visibility)a[c][f]({x:l}),l+=a[c].width+e.buttonSpacing;else a[c][f]({x:h})})};e.prototype.handleCollision=function(a){var b=this,c=this.chart,e=this.buttonGroup,d=this.inputGroup,f=this.options,k=f.buttonPosition,h=f.dropdown,l=f.inputPosition;f=function(){var a=0;b.buttons.forEach(function(b){b= b.getBBox();b.width>a&&(a=b.width)});return a};var m=function(b){if(d&&e){var c=d.alignAttr.translateX+d.alignOptions.x-a+d.getBBox().x+2,f=d.alignOptions.width,g=e.alignAttr.translateX+e.getBBox().x;return g+b>c&&c+f>g&&k.y=-a?0:-a),translateY:d.alignAttr.translateY+e.getBBox().height+10})};if(e){if("always"===h){this.collapseButtons(a);m(f())&&u();return}"never"===h&&this.expandButtons()}d&& e?l.align===k.align||m(this.initialButtonGroupWidth+20)?"responsive"===h?(this.collapseButtons(a),m(f())&&u()):u():"responsive"===h&&this.expandButtons():e&&"responsive"===h&&(this.initialButtonGroupWidth>c.plotWidth?this.collapseButtons(a):this.expandButtons())};e.prototype.collapseButtons=function(a){var b=this.buttons,c=this.buttonOptions,e=this.chart,d=this.dropdown,f=this.options,k=this.zoomText,h=e.userOptions.rangeSelector&&e.userOptions.rangeSelector.buttonTheme||{},l=function(a){return{text:a? a+" \u25be":"\u25be",width:"auto",paddingLeft:N(f.buttonTheme.paddingLeft,h.padding,8),paddingRight:N(f.buttonTheme.paddingRight,h.padding,8)}};k&&k.hide();var m=!1;c.forEach(function(a,c){c=b[c];2!==c.state?c.hide():(c.show(),c.attr(l(a.text)),m=!0)});m||(d&&(d.selectedIndex=0),b[0].show(),b[0].attr(l(this.zoomText&&this.zoomText.textStr)));c=f.buttonPosition.align;this.positionButtons();"right"!==c&&"center"!==c||this.alignButtonGroup(a,b[this.currentButtonIndex()].getBBox().width);this.showDropdown()}; e.prototype.expandButtons=function(){var a=this.buttons,b=this.buttonOptions,e=this.options,d=this.zoomText;this.hideDropdown();d&&d.show();b.forEach(function(b,c){c=a[c];c.show();c.attr({text:b.text,width:e.buttonTheme.width||28,paddingLeft:N(e.buttonTheme.paddingLeft,"unset"),paddingRight:N(e.buttonTheme.paddingRight,"unset")});2>c.state&&c.setState(0)});this.positionButtons()};e.prototype.currentButtonIndex=function(){var a=this.dropdown;return a&&0f&&0>d||0c+d.width)&&(y?p=m=K(p,c,c+d.width):b=!0);b||r.push(["M",p,g],["L",m,t])}):E.forEach(function(a){var b;p=a.pos;m=p+a.len;g=t=Math.round(l+d.height-I);"pass"!==y&&(gl+d.height)&&(y?g=t=K(g,l,l+d.height):b=!0);b||r.push(["M",p,g],["L",m,t])}));a.path=0C&&r=d&&(y=-(m.translateX+e.width- d));m.attr({x:f+y,y:g,anchorX:c?f:this.opposite?0:h.chartWidth,anchorY:c?this.opposite?h.chartHeight:0:g+e.height/2})}});D.prototype.forceCropping=function(){var a=this.chart,b=this.options.dataGrouping;return!1!==this.allowDG&&b&&F(b.enabled,a.options.isStock)};a(y,"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(P(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)});return x});L(a,"masters/modules/stock.src.js",[a["Core/Globals.js"],a["Core/Axis/OrdinalAxis.js"], a["Series/DataModifyComposition.js"],a["Core/Scrollbar.js"],a["Core/Chart/StockChart.js"]],function(a,r,y,t,l){a.Scrollbar=t;a.StockChart=a.stockChart=l.stockChart;t.compose(a.Axis);r.compose(a.Axis,a.Series,a.Chart);y.compose(a.Series,a.Axis,a.Point)})}); //# sourceMappingURL=stock.js.map