/*
 Highstock JS v5.0.12 (2017-05-24)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(K,T){"object"===typeof module&&module.exports?module.exports=K.document?T(K):T:K.Highcharts=T(K)})("undefined"!==typeof window?window:this,function(K){K=function(){var a=window,C=a.document,B=a.navigator&&a.navigator.userAgent||"",E=C&&C.createElementNS&&!!C.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,F=/(edge|msie|trident)/i.test(B)&&!window.opera,r=!E,k=/Firefox/.test(B),f=k&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",
version:"5.0.12",deg2rad:2*Math.PI/360,doc:C,hasBidiBug:f,hasTouch:C&&void 0!==C.documentElement.ontouchstart,isMS:F,isWebKit:/AppleWebKit/.test(B),isFirefox:k,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:E,vml:r,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var C=[],B=a.charts,E=a.doc,F=a.win;a.error=function(r,k){r=a.isNumber(r)?"Highcharts error #"+
r+": www.highcharts.com/errors/"+r:r;if(k)throw Error(r);F.console&&console.log(r)};a.Fx=function(a,k,f){this.options=k;this.elem=a;this.prop=f};a.Fx.prototype={dSetter:function(){var a=this.paths[0],k=this.paths[1],f=[],x=this.now,n=a.length,u;if(1===x)f=this.toD;else if(n===k.length&&1>x)for(;n--;)u=parseFloat(a[n]),f[n]=isNaN(u)?a[n]:x*parseFloat(k[n]-u)+u;else f=k;this.elem.attr("d",f,null,!0)},update:function(){var a=this.elem,k=this.prop,f=this.now,x=this.options.step;if(this[k+"Setter"])this[k+
"Setter"]();else a.attr?a.element&&a.attr(k,f,null,!0):a.style[k]=f+this.unit;x&&x.call(a,f,this)},run:function(a,k,f){var r=this,n=function(a){return n.stopped?!1:r.step(a)},u;this.startTime=+new Date;this.start=a;this.end=k;this.unit=f;this.now=this.start;this.pos=0;n.elem=this.elem;n.prop=this.prop;n()&&1===C.push(n)&&(n.timerId=setInterval(function(){for(u=0;u<C.length;u++)C[u]()||C.splice(u--,1);C.length||clearInterval(n.timerId)},13))},step:function(r){var k=+new Date,f,x=this.options,n=this.elem,
u=x.complete,g=x.duration,e=x.curAnim;n.attr&&!n.element?r=!1:r||k>=g+this.startTime?(this.now=this.end,this.pos=1,this.update(),f=e[this.prop]=!0,a.objectEach(e,function(a){!0!==a&&(f=!1)}),f&&u&&u.call(n),r=!1):(this.pos=x.easing((k-this.startTime)/g),this.now=this.start+(this.end-this.start)*this.pos,this.update(),r=!0);return r},initPath:function(r,k,f){function x(a){var b,c;for(t=a.length;t--;)b="M"===a[t]||"L"===a[t],c=/[a-zA-Z]/.test(a[t+3]),b&&c&&a.splice(t+1,0,a[t+1],a[t+2],a[t+1],a[t+2])}
function n(a,b){for(;a.length<l;){a[0]=b[l-a.length];var m=a.slice(0,c);[].splice.apply(a,[0,0].concat(m));y&&(m=a.slice(a.length-c),[].splice.apply(a,[a.length,0].concat(m)),t--)}a[0]="M"}function u(a,m){for(var e=(l-a.length)/c;0<e&&e--;)z=a.slice().splice(a.length/I-c,c*I),z[0]=m[l-c-e*c],b&&(z[c-6]=z[c-2],z[c-5]=z[c-1]),[].splice.apply(a,[a.length/I,0].concat(z)),y&&e--}k=k||"";var g,e=r.startX,p=r.endX,b=-1<k.indexOf("C"),c=b?7:3,l,z,t;k=k.split(" ");f=f.slice();var y=r.isArea,I=y?2:1,G;b&&(x(k),
x(f));if(e&&p){for(t=0;t<e.length;t++)if(e[t]===p[0]){g=t;break}else if(e[0]===p[p.length-e.length+t]){g=t;G=!0;break}void 0===g&&(k=[])}k.length&&a.isNumber(g)&&(l=f.length+g*I*c,G?(n(k,f),u(f,k)):(n(f,k),u(k,f)));return[k,f]}};a.Fx.prototype.fillSetter=a.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)};a.extend=function(a,k){var f;a||(a={});for(f in k)a[f]=k[f];return a};a.merge=function(){var r,k=arguments,f,x={},n=
function(f,g){"object"!==typeof f&&(f={});a.objectEach(g,function(e,p){!a.isObject(e,!0)||a.isClass(e)||a.isDOMElement(e)?f[p]=g[p]:f[p]=n(f[p]||{},e)});return f};!0===k[0]&&(x=k[1],k=Array.prototype.slice.call(k,2));f=k.length;for(r=0;r<f;r++)x=n(x,k[r]);return x};a.pInt=function(a,k){return parseInt(a,k||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(r,
k){return!!r&&"object"===typeof r&&(!k||!a.isArray(r))};a.isDOMElement=function(r){return a.isObject(r)&&"number"===typeof r.nodeType};a.isClass=function(r){var k=r&&r.constructor;return!(!a.isObject(r,!0)||a.isDOMElement(r)||!k||!k.name||"Object"===k.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,k){for(var f=a.length;f--;)if(a[f]===k){a.splice(f,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(r,k,f){var x;a.isString(k)?a.defined(f)?
r.setAttribute(k,f):r&&r.getAttribute&&(x=r.getAttribute(k)):a.defined(k)&&a.isObject(k)&&a.objectEach(k,function(a,f){r.setAttribute(f,a)});return x};a.splat=function(r){return a.isArray(r)?r:[r]};a.syncTimeout=function(a,k,f){if(k)return setTimeout(a,k,f);a.call(0,f)};a.pick=function(){var a=arguments,k,f,x=a.length;for(k=0;k<x;k++)if(f=a[k],void 0!==f&&null!==f)return f};a.css=function(r,k){a.isMS&&!a.svg&&k&&void 0!==k.opacity&&(k.filter="alpha(opacity\x3d"+100*k.opacity+")");a.extend(r.style,
k)};a.createElement=function(r,k,f,x,n){r=E.createElement(r);var u=a.css;k&&a.extend(r,k);n&&u(r,{padding:0,border:"none",margin:0});f&&u(r,f);x&&x.appendChild(r);return r};a.extendClass=function(r,k){var f=function(){};f.prototype=new r;a.extend(f.prototype,k);return f};a.pad=function(a,k,f){return Array((k||2)+1-String(a).length).join(f||0)+a};a.relativeLength=function(a,k){return/%$/.test(a)?k*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,k,f){var r=a[k];a[k]=function(){var a=Array.prototype.slice.call(arguments),
k=arguments,g=this;g.proceed=function(){r.apply(g,arguments.length?arguments:k)};a.unshift(r);a=f.apply(this,a);g.proceed=null;return a}};a.getTZOffset=function(r){var k=a.Date;return 6E4*(k.hcGetTimezoneOffset&&k.hcGetTimezoneOffset(r)||k.hcTimezoneOffset||0)};a.dateFormat=function(r,k,f){if(!a.defined(k)||isNaN(k))return a.defaultOptions.lang.invalidDate||"";r=a.pick(r,"%Y-%m-%d %H:%M:%S");var x=a.Date,n=new x(k-a.getTZOffset(k)),u=n[x.hcGetHours](),g=n[x.hcGetDay](),e=n[x.hcGetDate](),p=n[x.hcGetMonth](),
b=n[x.hcGetFullYear](),c=a.defaultOptions.lang,l=c.weekdays,z=c.shortWeekdays,t=a.pad,x=a.extend({a:z?z[g]:l[g].substr(0,3),A:l[g],d:t(e),e:t(e,2," "),w:g,b:c.shortMonths[p],B:c.months[p],m:t(p+1),y:b.toString().substr(2,2),Y:b,H:t(u),k:u,I:t(u%12||12),l:u%12||12,M:t(n[x.hcGetMinutes]()),p:12>u?"AM":"PM",P:12>u?"am":"pm",S:t(n.getSeconds()),L:t(Math.round(k%1E3),3)},a.dateFormats);a.objectEach(x,function(a,b){for(;-1!==r.indexOf("%"+b);)r=r.replace("%"+b,"function"===typeof a?a(k):a)});return f?r.substr(0,
1).toUpperCase()+r.substr(1):r};a.formatSingle=function(r,k){var f=/\.([0-9])/,x=a.defaultOptions.lang;/f$/.test(r)?(f=(f=r.match(f))?f[1]:-1,null!==k&&(k=a.numberFormat(k,f,x.decimalPoint,-1<r.indexOf(",")?x.thousandsSep:""))):k=a.dateFormat(r,k);return k};a.format=function(r,k){for(var f="{",x=!1,n,u,g,e,p=[],b;r;){f=r.indexOf(f);if(-1===f)break;n=r.slice(0,f);if(x){n=n.split(":");u=n.shift().split(".");e=u.length;b=k;for(g=0;g<e;g++)b=b[u[g]];n.length&&(b=a.formatSingle(n.join(":"),b));p.push(b)}else p.push(n);
r=r.slice(f+1);f=(x=!x)?"}":"{"}p.push(r);return p.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(r,k,f,x,n){var u,g=r;f=a.pick(f,1);u=r/f;k||(k=n?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===x&&(1===f?k=a.grep(k,function(a){return 0===a%1}):.1>=f&&(k=[1/f])));for(x=0;x<k.length&&!(g=k[x],n&&g*f>=r||!n&&u<=(k[x]+(k[x+1]||k[x]))/2);x++);return g=a.correctFloat(g*f,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=
function(a,k){var f=a.length,r,n;for(n=0;n<f;n++)a[n].safeI=n;a.sort(function(a,g){r=k(a,g);return 0===r?a.safeI-g.safeI:r});for(n=0;n<f;n++)delete a[n].safeI};a.arrayMin=function(a){for(var k=a.length,f=a[0];k--;)a[k]<f&&(f=a[k]);return f};a.arrayMax=function(a){for(var k=a.length,f=a[0];k--;)a[k]>f&&(f=a[k]);return f};a.destroyObjectProperties=function(r,k){a.objectEach(r,function(a,x){a&&a!==k&&a.destroy&&a.destroy();delete r[x]})};a.discardElement=function(r){var k=a.garbageBin;k||(k=a.createElement("div"));
r&&k.appendChild(r);k.innerHTML=""};a.correctFloat=function(a,k){return parseFloat(a.toPrecision(k||14))};a.setAnimation=function(r,k){k.renderer.globalAnimation=a.pick(r,k.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(r,k,f,x){r=+r||0;k=+k;var n=a.defaultOptions.lang,u=(r.toString().split(".")[1]||"").length,
g,e;-1===k?k=Math.min(u,20):a.isNumber(k)||(k=2);e=(Math.abs(r)+Math.pow(10,-Math.max(k,u)-1)).toFixed(k);u=String(a.pInt(e));g=3<u.length?u.length%3:0;f=a.pick(f,n.decimalPoint);x=a.pick(x,n.thousandsSep);r=(0>r?"-":"")+(g?u.substr(0,g)+x:"");r+=u.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+x);k&&(r+=f+e.slice(-k));return r};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,k,f){if("width"===k)return Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,"padding-left")-
a.getStyle(r,"padding-right");if("height"===k)return Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,"padding-top")-a.getStyle(r,"padding-bottom");if(r=F.getComputedStyle(r,void 0))r=r.getPropertyValue(k),a.pick(f,!0)&&(r=a.pInt(r));return r};a.inArray=function(a,k){return k.indexOf?k.indexOf(a):[].indexOf.call(k,a)};a.grep=function(a,k){return[].filter.call(a,k)};a.find=function(a,k){return[].find.call(a,k)};a.map=function(a,k){for(var f=[],x=0,n=a.length;x<n;x++)f[x]=k.call(a[x],a[x],x,a);
return f};a.offset=function(a){var k=E.documentElement;a=a.getBoundingClientRect();return{top:a.top+(F.pageYOffset||k.scrollTop)-(k.clientTop||0),left:a.left+(F.pageXOffset||k.scrollLeft)-(k.clientLeft||0)}};a.stop=function(a,k){for(var f=C.length;f--;)C[f].elem!==a||k&&k!==C[f].prop||(C[f].stopped=!0)};a.each=function(a,k,f){return Array.prototype.forEach.call(a,k,f)};a.objectEach=function(a,k,f){for(var x in a)a.hasOwnProperty(x)&&k.call(f,a[x],x,a)};a.addEvent=function(r,k,f){function x(a){a.target=
a.srcElement||F;f.call(r,a)}var n=r.hcEvents=r.hcEvents||{};r.addEventListener?r.addEventListener(k,f,!1):r.attachEvent&&(r.hcEventsIE||(r.hcEventsIE={}),r.hcEventsIE[f.toString()]=x,r.attachEvent("on"+k,x));n[k]||(n[k]=[]);n[k].push(f);return function(){a.removeEvent(r,k,f)}};a.removeEvent=function(r,k,f){function x(a,b){r.removeEventListener?r.removeEventListener(a,b,!1):r.attachEvent&&(b=r.hcEventsIE[b.toString()],r.detachEvent("on"+a,b))}function n(){var e,b;r.nodeName&&(k?(e={},e[k]=!0):e=g,
a.objectEach(e,function(a,l){if(g[l])for(b=g[l].length;b--;)x(l,g[l][b])}))}var u,g=r.hcEvents,e;g&&(k?(u=g[k]||[],f?(e=a.inArray(f,u),-1<e&&(u.splice(e,1),g[k]=u),x(k,f)):(n(),g[k]=[])):(n(),r.hcEvents={}))};a.fireEvent=function(r,k,f,x){var n;n=r.hcEvents;var u,g;f=f||{};if(E.createEvent&&(r.dispatchEvent||r.fireEvent))n=E.createEvent("Events"),n.initEvent(k,!0,!0),a.extend(n,f),r.dispatchEvent?r.dispatchEvent(n):r.fireEvent(k,n);else if(n)for(n=n[k]||[],u=n.length,f.target||a.extend(f,{preventDefault:function(){f.defaultPrevented=
!0},target:r,type:k}),k=0;k<u;k++)(g=n[k])&&!1===g.call(r,f)&&f.preventDefault();x&&!f.defaultPrevented&&x(f)};a.animate=function(r,k,f){var x,n="",u,g,e;a.isObject(f)||(e=arguments,f={duration:e[2],easing:e[3],complete:e[4]});a.isNumber(f.duration)||(f.duration=400);f.easing="function"===typeof f.easing?f.easing:Math[f.easing]||Math.easeInOutSine;f.curAnim=a.merge(k);a.objectEach(k,function(e,b){a.stop(r,b);g=new a.Fx(r,f,b);u=null;"d"===b?(g.paths=g.initPath(r,r.d,k.d),g.toD=k.d,x=0,u=1):r.attr?
x=r.attr(b):(x=parseFloat(a.getStyle(r,b))||0,"opacity"!==b&&(n="px"));u||(u=e);u&&u.match&&u.match("px")&&(u=u.replace(/px/g,""));g.run(x,u,n)})};a.seriesType=function(r,k,f,x,n){var u=a.getOptions(),g=a.seriesTypes;if(g[r])return a.error(27);u.plotOptions[r]=a.merge(u.plotOptions[k],f);g[r]=a.extendClass(g[k]||function(){},x);g[r].prototype.type=r;n&&(g[r].prototype.pointClass=a.extendClass(a.Point,n));return g[r]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),k=0;return function(){return"highcharts-"+
a+"-"+k++}}();F.jQuery&&(F.jQuery.fn.highcharts=function(){var r=[].slice.call(arguments);if(this[0])return r[0]?(new (a[a.isString(r[0])?r.shift():"Chart"])(this[0],r[0],r[1]),this):B[a.attr(this[0],"data-highcharts-chart")]});E&&!E.defaultView&&(a.getStyle=function(r,k){var f={width:"clientWidth",height:"clientHeight"}[k];if(r.style[k])return a.pInt(r.style[k]);"opacity"===k&&(k="filter");if(f)return r.style.zoom=1,Math.max(r[f]-2*a.getStyle(r,"padding"),0);r=r.currentStyle[k.replace(/\-(\w)/g,
function(a,f){return f.toUpperCase()})];"filter"===k&&(r=r.replace(/alpha\(opacity=([0-9]+)\)/,function(a,f){return f/100}));return""===r?1:a.pInt(r)});Array.prototype.forEach||(a.each=function(a,k,f){for(var x=0,n=a.length;x<n;x++)if(!1===k.call(f,a[x],x,a))return x});Array.prototype.indexOf||(a.inArray=function(a,k){var f,x=0;if(k)for(f=k.length;x<f;x++)if(k[x]===a)return x;return-1});Array.prototype.filter||(a.grep=function(a,k){for(var f=[],x=0,n=a.length;x<n;x++)k(a[x],x)&&f.push(a[x]);return f});
Array.prototype.find||(a.find=function(a,k){var f,x=a.length;for(f=0;f<x;f++)if(k(a[f],f))return a[f]})})(K);(function(a){var C=a.each,B=a.isNumber,E=a.map,F=a.merge,r=a.pInt;a.Color=function(k){if(!(this instanceof a.Color))return new a.Color(k);this.init(k)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(a){return[r(a[1]),r(a[2]),r(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,
parse:function(a){return[r(a[1]),r(a[2]),r(a[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(k){var f,x,n,u;if((this.input=k=this.names[k&&k.toLowerCase?k.toLowerCase():""]||k)&&k.stops)this.stops=E(k.stops,function(g){return new a.Color(g[1])});else if(k&&"#"===k[0]&&(f=k.length,k=parseInt(k.substr(1),16),7===f?x=[(k&16711680)>>16,(k&65280)>>8,k&255,1]:4===f&&(x=[(k&3840)>>4|(k&3840)>>8,(k&240)>>4|k&240,(k&15)<<4|k&15,1])),!x)for(n=this.parsers.length;n--&&
!x;)u=this.parsers[n],(f=u.regex.exec(k))&&(x=u.parse(f));this.rgba=x||[]},get:function(a){var f=this.input,k=this.rgba,n;this.stops?(n=F(f),n.stops=[].concat(n.stops),C(this.stops,function(f,g){n.stops[g]=[n.stops[g][0],f.get(a)]})):n=k&&B(k[0])?"rgb"===a||!a&&1===k[3]?"rgb("+k[0]+","+k[1]+","+k[2]+")":"a"===a?k[3]:"rgba("+k.join(",")+")":f;return n},brighten:function(a){var f,k=this.rgba;if(this.stops)C(this.stops,function(f){f.brighten(a)});else if(B(a)&&0!==a)for(f=0;3>f;f++)k[f]+=r(255*a),0>
k[f]&&(k[f]=0),255<k[f]&&(k[f]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,f){var k,n;a.rgba.length?(k=this.rgba,a=a.rgba,n=1!==a[3]||1!==k[3],a=(n?"rgba(":"rgb(")+Math.round(a[0]+(k[0]-a[0])*(1-f))+","+Math.round(a[1]+(k[1]-a[1])*(1-f))+","+Math.round(a[2]+(k[2]-a[2])*(1-f))+(n?","+(a[3]+(k[3]-a[3])*(1-f)):"")+")"):a=a.input||"none";return a}};a.color=function(k){return new a.Color(k)}})(K);(function(a){var C,B,E=a.addEvent,F=a.animate,r=a.attr,k=a.charts,
f=a.color,x=a.css,n=a.createElement,u=a.defined,g=a.deg2rad,e=a.destroyObjectProperties,p=a.doc,b=a.each,c=a.extend,l=a.erase,z=a.grep,t=a.hasTouch,y=a.inArray,I=a.isArray,G=a.isFirefox,D=a.isMS,m=a.isObject,w=a.isString,q=a.isWebKit,A=a.merge,d=a.noop,H=a.objectEach,h=a.pick,v=a.pInt,M=a.removeEvent,J=a.splat,P=a.stop,N=a.svg,R=a.SVG_NS,Q=a.symbolSizes,O=a.win;C=a.SVGElement=function(){return this};c(C.prototype,{opacity:1,SVG_NS:R,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),
init:function(a,h){this.element="span"===h?n(h):p.createElementNS(this.SVG_NS,h);this.renderer=a},animate:function(v,d,b){d=a.animObject(h(d,this.renderer.globalAnimation,!0));0!==d.duration?(b&&(d.complete=b),F(this,v,d)):(this.attr(v,null,b),d.step&&d.step.call(this));return this},colorGradient:function(h,d,v){var L=this.renderer,m,c,q,l,e,z,w,y,t,g,p=[],J;h.radialGradient?c="radialGradient":h.linearGradient&&(c="linearGradient");c&&(q=h[c],e=L.gradients,w=h.stops,g=v.radialReference,I(q)&&(h[c]=
q={x1:q[0],y1:q[1],x2:q[2],y2:q[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===c&&g&&!u(q.gradientUnits)&&(l=q,q=A(q,L.getRadialAttr(g,l),{gradientUnits:"userSpaceOnUse"})),H(q,function(a,h){"id"!==h&&p.push(h,a)}),H(w,function(a){p.push(a)}),p=p.join(","),e[p]?g=e[p].attr("id"):(q.id=g=a.uniqueKey(),e[p]=z=L.createElement(c).attr(q).add(L.defs),z.radAttr=l,z.stops=[],b(w,function(h){0===h[1].indexOf("rgba")?(m=a.color(h[1]),y=m.get("rgb"),t=m.get("a")):(y=h[1],t=1);h=L.createElement("stop").attr({offset:h[0],
"stop-color":y,"stop-opacity":t}).add(z);z.stops.push(h)})),J="url("+L.url+"#"+g+")",v.setAttribute(d,J),v.gradient=p,h.toString=function(){return J})},applyTextOutline:function(h){var d=this.element,v,L,c,m,q;-1!==h.indexOf("contrast")&&(h=h.replace(/contrast/g,this.renderer.getContrast(d.style.fill)));h=h.split(" ");L=h[h.length-1];if((c=h[0])&&"none"!==c&&a.svg){this.fakeTS=!0;h=[].slice.call(d.getElementsByTagName("tspan"));this.ySetter=this.xSetter;c=c.replace(/(^[\d\.]+)(.*?)$/g,function(a,
h,d){return 2*h+d});for(q=h.length;q--;)v=h[q],"highcharts-text-outline"===v.getAttribute("class")&&l(h,d.removeChild(v));m=d.firstChild;b(h,function(a,h){0===h&&(a.setAttribute("x",d.getAttribute("x")),h=d.getAttribute("y"),a.setAttribute("y",h||0),null===h&&d.setAttribute("y",0));a=a.cloneNode(1);r(a,{"class":"highcharts-text-outline",fill:L,stroke:L,"stroke-width":c,"stroke-linejoin":"round"});d.insertBefore(a,m)})}},attr:function(a,h,d,v){var L,b=this.element,c,m=this,q,l;"string"===typeof a&&
void 0!==h&&(L=a,a={},a[L]=h);"string"===typeof a?m=(this[a+"Getter"]||this._defaultGetter).call(this,a,b):(H(a,function(h,d){q=!1;v||P(this,d);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(d)&&(c||(this.symbolAttr(a),c=!0),q=!0);!this.rotation||"x"!==d&&"y"!==d||(this.doTransform=!0);q||(l=this[d+"Setter"]||this._defaultSetter,l.call(this,h,d,b))},this),this.afterSetters());d&&d();return m},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=
!1)},addClass:function(a,h){var d=this.attr("class")||"";-1===d.indexOf(a)&&(h||(a=(d+(d?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==r(this.element,"class").indexOf(a)},removeClass:function(a){r(this.element,"class",(r(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var d=this;b("x y r start end width height innerR anchorX anchorY".split(" "),function(v){d[v]=h(a[v],d[v])});d.attr({d:d.renderer.symbols[d.symbolName](d.x,
d.y,d.width,d.height,d)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,h){var d=this,v={},b;h=h||a.strokeWidth||0;b=Math.round(h)%2/2;a.x=Math.floor(a.x||d.x||0)+b;a.y=Math.floor(a.y||d.y||0)+b;a.width=Math.floor((a.width||d.width||0)-2*b);a.height=Math.floor((a.height||d.height||0)-2*b);u(a.strokeWidth)&&(a.strokeWidth=h);H(a,function(a,h){d[h]!==a&&(d[h]=v[h]=a)});return v},css:function(a){var h=this.styles,d={},b=this.element,
m,q="",L,l=!h,e=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);h&&H(a,function(a,v){a!==h[v]&&(d[v]=a,l=!0)});l&&(h&&(a=c(h,d)),m=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===b.nodeName.toLowerCase()&&v(a.width),this.styles=a,m&&!N&&this.renderer.forExport&&delete a.width,D&&!N?x(this.element,a):(L=function(a,h){return"-"+h.toLowerCase()},H(a,function(a,h){-1===y(h,e)&&(q+=h.replace(/([A-Z])/g,L)+":"+a+";")}),q&&r(b,"style",q)),this.added&&("text"===this.element.nodeName&&
this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return O.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=this.getStyle("stroke-width"),h;a.indexOf("px")===a.length-2?a=v(a):(h=p.createElementNS(R,"rect"),r(h,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(h),a=h.getBBox().width,h.parentNode.removeChild(h));return a},on:function(a,h){var d=this,v=d.element;t&&"click"===
a?(v.ontouchstart=function(a){d.touchEventFired=Date.now();a.preventDefault();h.call(v,a)},v.onclick=function(a){(-1===O.navigator.userAgent.indexOf("Android")||1100<Date.now()-(d.touchEventFired||0))&&h.call(v,a)}):v["on"+a]=h;return this},setRadialReference:function(a){var h=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;h&&h.radAttr&&h.animate(this.renderer.getRadialAttr(a,h.radAttr));return this},translate:function(a,h){return this.attr({translateX:a,translateY:h})},
invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,d=this.translateY||0,v=this.scaleX,b=this.scaleY,c=this.inverted,q=this.rotation,m=this.element;c&&(a+=this.width,d+=this.height);a=["translate("+a+","+d+")"];c?a.push("rotate(90) scale(-1,1)"):q&&a.push("rotate("+q+" "+(m.getAttribute("x")||0)+" "+(m.getAttribute("y")||0)+")");(u(v)||u(b))&&a.push("scale("+h(v,1)+" "+h(b,1)+")");a.length&&m.setAttribute("transform",a.join(" "))},
toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,d,v){var b,m,c,q,L={};m=this.renderer;c=m.alignedObjects;var e,A;if(a){if(this.alignOptions=a,this.alignByTranslate=d,!v||w(v))this.alignTo=b=v||"renderer",l(c,this),c.push(this),v=null}else a=this.alignOptions,d=this.alignByTranslate,b=this.alignTo;v=h(v,m[b],m);b=a.align;m=a.verticalAlign;c=(v.x||0)+(a.x||0);q=(v.y||0)+(a.y||0);"right"===b?e=1:"center"===b&&(e=2);e&&(c+=(v.width-(a.width||0))/e);L[d?
"translateX":"x"]=Math.round(c);"bottom"===m?A=1:"middle"===m&&(A=2);A&&(q+=(v.height-(a.height||0))/A);L[d?"translateY":"y"]=Math.round(q);this[this.placed?"animate":"attr"](L);this.placed=!0;this.alignAttr=L;return this},getBBox:function(a,d){var v,m=this.renderer,q,l=this.element,L=this.styles,e,A=this.textStr,z,w=m.cache,y=m.cacheKeys,t;d=h(d,this.rotation);q=d*g;e=l&&C.prototype.getStyle.call(l,"font-size");void 0!==A&&(t=A.toString(),-1===t.indexOf("\x3c")&&(t=t.replace(/[0-9]/g,"0")),t+=["",
d||0,e,L&&L.width,L&&L.textOverflow].join());t&&!a&&(v=w[t]);if(!v){if(l.namespaceURI===this.SVG_NS||m.forExport){try{(z=this.fakeTS&&function(a){b(l.querySelectorAll(".highcharts-text-outline"),function(h){h.style.display=a})})&&z("none"),v=l.getBBox?c({},l.getBBox()):{width:l.offsetWidth,height:l.offsetHeight},z&&z("")}catch(U){}if(!v||0>v.width)v={width:0,height:0}}else v=this.htmlGetBBox();m.isSVG&&(a=v.width,m=v.height,L&&"11px"===L.fontSize&&17===Math.round(m)&&(v.height=m=14),d&&(v.width=Math.abs(m*
Math.sin(q))+Math.abs(a*Math.cos(q)),v.height=Math.abs(m*Math.cos(q))+Math.abs(a*Math.sin(q))));if(t&&0<v.height){for(;250<y.length;)delete w[y.shift()];w[t]||y.push(t);w[t]=v}}return v},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var h=this;h.animate({opacity:0},{duration:a||150,complete:function(){h.attr({y:-9999})}})},add:function(a){var h=this.renderer,d=this.element,v;a&&(this.parentGroup=
a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&h.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)v=this.zIndexSetter();v||(a?a.element:h.box).appendChild(d);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var h=a.parentNode;h&&h.removeChild(a)},destroy:function(){var a=this,h=a.element||{},d=a.renderer.isSVG&&"SPAN"===h.nodeName&&a.parentGroup,v=h.ownerSVGElement;h.onclick=h.onmouseout=h.onmouseover=h.onmousemove=h.point=null;P(a);a.clipPath&&v&&(b(v.querySelectorAll("[clip-path]"),
function(h){-1<h.getAttribute("clip-path").indexOf(a.clipPath.element.id+")")&&h.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(v=0;v<a.stops.length;v++)a.stops[v]=a.stops[v].destroy();a.stops=null}for(a.safeRemoveChild(h);d&&d.div&&0===d.div.childNodes.length;)h=d.parentGroup,a.safeRemoveChild(d.div),delete d.div,d=h;a.alignTo&&l(a.renderer.alignedObjects,a);H(a,function(h,d){delete a[d]});return null},xGetter:function(a){"circle"===this.element.nodeName&&("x"===
a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=h(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,h,d){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");d.setAttribute(h,a);this[h]=a},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,h,d){this[h]=a;d.setAttribute(h,a)},titleSetter:function(a){var d=
this.element.getElementsByTagName("title")[0];d||(d=p.createElementNS(this.SVG_NS,"title"),this.element.appendChild(d));d.firstChild&&d.removeChild(d.firstChild);d.appendChild(p.createTextNode(String(h(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,h,d){"string"===typeof a?d.setAttribute(h,a):a&&this.colorGradient(a,h,d)},visibilitySetter:function(a,h,d){"inherit"===a?d.removeAttribute(h):
d.setAttribute(h,a)},zIndexSetter:function(a,h){var d=this.renderer,b=this.parentGroup,m=(b||d).element||d.box,q,c=this.element,l;q=this.added;var e;u(a)&&(c.zIndex=a,a=+a,this[h]===a&&(q=!1),this[h]=a);if(q){(a=this.zIndex)&&b&&(b.handleZ=!0);h=m.childNodes;for(e=0;e<h.length&&!l;e++)b=h[e],q=b.zIndex,b!==c&&(v(q)>a||!u(a)&&u(q)||0>a&&!u(q)&&m!==d.box)&&(m.insertBefore(c,b),l=!0);l||m.appendChild(c)}return l},_defaultSetter:function(a,h,d){d.setAttribute(h,a)}});C.prototype.yGetter=C.prototype.xGetter;
C.prototype.translateXSetter=C.prototype.translateYSetter=C.prototype.rotationSetter=C.prototype.verticalAlignSetter=C.prototype.scaleXSetter=C.prototype.scaleYSetter=function(a,h){this[h]=a;this.doTransform=!0};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};c(B.prototype,{Element:C,SVG_NS:R,init:function(a,h,d,v,b,m){var c;v=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});c=v.element;a.appendChild(c);-1===a.innerHTML.indexOf("xmlns")&&r(c,"xmlns",this.SVG_NS);
this.isSVG=!0;this.box=c;this.boxWrapper=v;this.alignedObjects=[];this.url=(G||q)&&p.getElementsByTagName("base").length?O.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(p.createTextNode("Created with Highstock 5.0.12"));this.defs=this.createElement("defs").add();this.allowHTML=m;this.forExport=b;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(h,d,!1);var l;
G&&a.getBoundingClientRect&&(h=function(){x(a,{left:0,top:0});l=a.getBoundingClientRect();x(a,{left:Math.ceil(l.left)-l.left+"px",top:Math.ceil(l.top)-l.top+"px"})},h(),this.unSubPixelFix=E(O,"resize",h))},definition:function(a){function h(a,v){var m;b(J(a),function(a){var b=d.createElement(a.tagName),q={};H(a,function(a,h){"tagName"!==h&&"children"!==h&&"textContent"!==h&&(q[h]=a)});b.attr(q);b.add(v||d.defs);a.textContent&&b.element.appendChild(p.createTextNode(a.textContent));h(a.children||[],
b);m=b});return m}var d=this;return h(a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();e(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var h=new this.Element;h.init(this,a);return h},draw:d,getRadialAttr:function(a,h){return{cx:a[0]-a[2]/2+h.cx*a[2],cy:a[1]-a[2]/2+h.cy*a[2],
r:h.r*a[2]}},getSpanWidth:function(a,h){var d=a.getBBox(!0).width;!N&&this.forExport&&(d=this.measureSpanWidth(h.firstChild.data,a.styles));return d},applyEllipsis:function(a,h,d,v){var b=this.getSpanWidth(a,h),m=b>v,b=d,q,c=0,l=d.length,e=function(a){h.removeChild(h.firstChild);a&&h.appendChild(p.createTextNode(a))};if(m){for(;c<=l;)q=Math.ceil((c+l)/2),b=d.substring(0,q)+"\u2026",e(b),b=this.getSpanWidth(a,h),c===l?c=l+1:b>v?l=q-1:c=q;0===l&&e("")}return m},buildText:function(a){var d=a.element,
m=this,q=m.forExport,c=h(a.textStr,"").toString(),l=-1!==c.indexOf("\x3c"),e=d.childNodes,A,w,y,t,g=r(d,"x"),J=a.styles,L=a.textWidth,f=J&&J.lineHeight,H=J&&J.textOutline,M=J&&"ellipsis"===J.textOverflow,k=J&&"nowrap"===J.whiteSpace,u,G=e.length,D=L&&!a.added&&this.box,P=function(a){return f?v(f):m.fontMetrics(void 0,a.getAttribute("style")?a:d).h},J=[c,M,k,f,H,J&&J.fontSize,L].join();if(J!==a.textCache){for(a.textCache=J;G--;)d.removeChild(e[G]);l||H||M||L||-1!==c.indexOf(" ")?(A=/<.*class="([^"]+)".*>/,
w=/<.*style="([^"]+)".*>/,y=/<.*href="([^"]+)".*>/,D&&D.appendChild(d),c=l?c.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[c],c=z(c,function(a){return""!==a}),b(c,function(h,v){var c,l=0;h=h.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");c=h.split("|||");b(c,function(h){if(""!==
h||1===c.length){var b={},e=p.createElementNS(m.SVG_NS,"tspan"),z,J;A.test(h)&&(z=h.match(A)[1],r(e,"class",z));w.test(h)&&(J=h.match(w)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),r(e,"style",J));y.test(h)&&!q&&(r(e,"onclick",'location.href\x3d"'+h.match(y)[1]+'"'),x(e,{cursor:"pointer"}));h=(h.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e");if(" "!==h){e.appendChild(p.createTextNode(h));l?b.dx=0:v&&null!==g&&(b.x=g);r(e,b);d.appendChild(e);!l&&u&&(!N&&q&&x(e,{display:"block"}),
r(e,"dy",P(e)));if(L){b=h.replace(/([^\^])-/g,"$1- ").split(" ");z=1<c.length||v||1<b.length&&!k;var f=[],H,G=P(e),D=a.rotation;for(M&&(t=m.applyEllipsis(a,e,h,L));!M&&z&&(b.length||f.length);)a.rotation=0,H=m.getSpanWidth(a,e),h=H>L,void 0===t&&(t=h),h&&1!==b.length?(e.removeChild(e.firstChild),f.unshift(b.pop())):(b=f,f=[],b.length&&!k&&(e=p.createElementNS(R,"tspan"),r(e,{dy:G,x:g}),J&&r(e,"style",J),d.appendChild(e)),H>L&&(L=H)),b.length&&e.appendChild(p.createTextNode(b.join(" ").replace(/- /g,
"-")));a.rotation=D}l++}}});u=u||d.childNodes.length}),t&&a.attr("title",a.textStr),D&&D.removeChild(d),H&&a.applyTextOutline&&a.applyTextOutline(H)):d.appendChild(p.createTextNode(c.replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e")))}},getContrast:function(a){a=f(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,h,d,v,b,c,m,q,l){var e=this.label(a,h,d,l,null,null,null,null,"button"),z=0;e.attr(A({padding:8,r:2},b));E(e.element,D?"mouseover":"mouseenter",function(){3!==z&&e.setState(1)});
E(e.element,D?"mouseout":"mouseleave",function(){3!==z&&e.setState(z)});e.setState=function(a){1!==a&&(e.state=z=a);e.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return e.on("click",function(a){3!==z&&v.call(e,a)})},crispLine:function(a,h){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-h%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+h%2/2);return a},path:function(a){var h={};I(a)?h.d=a:m(a)&&c(h,a);return this.createElement("path").attr(h)},
circle:function(a,h,d){a=m(a)?a:{x:a,y:h,r:d};h=this.createElement("circle");h.xSetter=h.ySetter=function(a,h,d){d.setAttribute("c"+h,a)};return h.attr(a)},arc:function(a,h,d,v,b,c){m(a)?(v=a,h=v.y,d=v.r,a=v.x):v={innerR:v,start:b,end:c};a=this.symbol("arc",a,h,d,d,v);a.r=d;return a},rect:function(a,h,d,v,b,c){b=m(a)?a.r:b;c=this.createElement("rect");a=m(a)?a:void 0===a?{}:{x:a,y:h,width:Math.max(d,0),height:Math.max(v,0)};b&&(a.r=b);c.rSetter=function(a,h,d){r(d,{rx:a,ry:a})};return c.attr(a)},
setSize:function(a,d,v){var b=this.alignedObjects,c=b.length;this.width=a;this.height=d;for(this.boxWrapper.animate({width:a,height:d},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:h(v,!0)?void 0:0});c--;)b[c].align()},g:function(a){var h=this.createElement("g");return a?h.attr({"class":"highcharts-"+a}):h},image:function(a,h,d,v,b){var m={preserveAspectRatio:"none"};1<arguments.length&&c(m,{x:h,y:d,width:v,height:b});m=this.createElement("image").attr(m);
m.element.setAttributeNS?m.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):m.element.setAttribute("hc-svg-href",a);return m},symbol:function(a,d,v,m,q,l){var e=this,A,z=/^url\((.*?)\)$/,w=z.test(a),y=!w&&(this.symbols[a]?a:"circle"),t=y&&this.symbols[y],J=u(d)&&t&&t.call(this.symbols,Math.round(d),Math.round(v),m,q,l),g,f;t?(A=this.path(J),c(A,{symbolName:y,x:d,y:v,width:m,height:q}),l&&c(A,l)):w&&(g=a.match(z)[1],A=this.image(g),A.imgwidth=h(Q[g]&&Q[g].width,l&&l.width),A.imgheight=
h(Q[g]&&Q[g].height,l&&l.height),f=function(){A.attr({width:A.width,height:A.height})},b(["width","height"],function(a){A[a+"Setter"]=function(a,h){var d={},v=this["img"+h],b="width"===h?"translateX":"translateY";this[h]=a;u(v)&&(this.element&&this.element.setAttribute(h,v),this.alignByTranslate||(d[b]=((this[h]||0)-v)/2,this.attr(d)))}}),u(d)&&A.attr({x:d,y:v}),A.isImg=!0,u(A.imgwidth)&&u(A.imgheight)?f():(A.attr({width:0,height:0}),n("img",{onload:function(){var a=k[e.chartIndex];0===this.width&&
(x(this,{position:"absolute",top:"-999em"}),p.body.appendChild(this));Q[g]={width:this.width,height:this.height};A.imgwidth=this.width;A.imgheight=this.height;A.element&&f();this.parentNode&&this.parentNode.removeChild(this);e.imgCount--;if(!e.imgCount&&a&&a.onload)a.onload()},src:g}),this.imgCount++));return A},symbols:{circle:function(a,h,d,v){return this.arc(a+d/2,h+v/2,d/2,v/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,h,d,v){return["M",a,h,"L",a+d,h,a+d,h+v,a,h+v,"Z"]},triangle:function(a,
h,d,v){return["M",a+d/2,h,"L",a+d,h+v,a,h+v,"Z"]},"triangle-down":function(a,h,d,v){return["M",a,h,"L",a+d,h,a+d/2,h+v,"Z"]},diamond:function(a,h,d,v){return["M",a+d/2,h,"L",a+d,h+v/2,a+d/2,h+v,a,h+v/2,"Z"]},arc:function(a,h,d,v,b){var m=b.start,c=b.r||d,q=b.r||v||d,l=b.end-.001;d=b.innerR;v=b.open;var e=Math.cos(m),A=Math.sin(m),z=Math.cos(l),l=Math.sin(l);b=b.end-m<Math.PI?0:1;c=["M",a+c*e,h+q*A,"A",c,q,0,b,1,a+c*z,h+q*l];u(d)&&c.push(v?"M":"L",a+d*z,h+d*l,"A",d,d,0,b,0,a+d*e,h+d*A);c.push(v?"":
"Z");return c},callout:function(a,h,d,v,b){var c=Math.min(b&&b.r||0,d,v),m=c+6,q=b&&b.anchorX;b=b&&b.anchorY;var l;l=["M",a+c,h,"L",a+d-c,h,"C",a+d,h,a+d,h,a+d,h+c,"L",a+d,h+v-c,"C",a+d,h+v,a+d,h+v,a+d-c,h+v,"L",a+c,h+v,"C",a,h+v,a,h+v,a,h+v-c,"L",a,h+c,"C",a,h,a,h,a+c,h];q&&q>d?b>h+m&&b<h+v-m?l.splice(13,3,"L",a+d,b-6,a+d+6,b,a+d,b+6,a+d,h+v-c):l.splice(13,3,"L",a+d,v/2,q,b,a+d,v/2,a+d,h+v-c):q&&0>q?b>h+m&&b<h+v-m?l.splice(33,3,"L",a,b+6,a-6,b,a,b-6,a,h+c):l.splice(33,3,"L",a,v/2,q,b,a,v/2,a,h+c):
b&&b>v&&q>a+m&&q<a+d-m?l.splice(23,3,"L",q+6,h+v,q,h+v+6,q-6,h+v,a+c,h+v):b&&0>b&&q>a+m&&q<a+d-m&&l.splice(3,3,"L",q-6,h,q,h-6,q+6,h,d-c,h);return l}},clipRect:function(h,d,v,b){var c=a.uniqueKey(),m=this.createElement("clipPath").attr({id:c}).add(this.defs);h=this.rect(h,d,v,b,0).add(m);h.id=c;h.clipPath=m;h.count=0;return h},text:function(a,h,d,v){var b=!N&&this.forExport,c={};if(v&&(this.allowHTML||!this.forExport))return this.html(a,h,d);c.x=Math.round(h||0);d&&(c.y=Math.round(d));if(a||0===a)c.text=
a;a=this.createElement("text").attr(c);b&&a.css({position:"absolute"});v||(a.xSetter=function(a,h,d){var v=d.getElementsByTagName("tspan"),b,c=d.getAttribute(h),m;for(m=0;m<v.length;m++)b=v[m],b.getAttribute(h)===c&&b.setAttribute(h,a);d.setAttribute(h,a)});return a},fontMetrics:function(a,h){a=h&&C.prototype.getStyle.call(h,"font-size");a=/px/.test(a)?v(a):/em/.test(a)?parseFloat(a)*(h?this.fontMetrics(null,h.parentNode).f:16):12;h=24>a?a+3:Math.round(1.2*a);return{h:h,b:Math.round(.8*h),f:a}},rotCorr:function(a,
h,d){var v=a;h&&d&&(v=Math.max(v*Math.cos(h*g),4));return{x:-a/3*Math.sin(h*g),y:v}},label:function(h,d,v,m,q,l,e,z,w){var y=this,t=y.g("button"!==w&&"label"),g=t.text=y.text("",0,0,e).attr({zIndex:1}),J,p,f=0,H=3,k=0,G,R,D,P,n,I={},x,Q=/^url\((.*?)\)$/.test(m),L=Q,r,N,O,S;w&&t.addClass("highcharts-"+w);L=!0;r=function(){return J.strokeWidth()%2/2};N=function(){var a=g.element.style,h={};p=(void 0===G||void 0===R||n)&&u(g.textStr)&&g.getBBox();t.width=(G||p.width||0)+2*H+k;t.height=(R||p.height||
0)+2*H;x=H+y.fontMetrics(a&&a.fontSize,g).b;L&&(J||(t.box=J=y.symbols[m]||Q?y.symbol(m):y.rect(),J.addClass(("button"===w?"":"highcharts-label-box")+(w?" highcharts-"+w+"-box":"")),J.add(t),a=r(),h.x=a,h.y=(z?-x:0)+a),h.width=Math.round(t.width),h.height=Math.round(t.height),J.attr(c(h,I)),I={})};O=function(){var a=k+H,h;h=z?0:x;u(G)&&p&&("center"===n||"right"===n)&&(a+={center:.5,right:1}[n]*(G-p.width));if(a!==g.x||h!==g.y)g.attr("x",a),void 0!==h&&g.attr("y",h);g.x=a;g.y=h};S=function(a,h){J?J.attr(a,
h):I[a]=h};t.onAdd=function(){g.add(t);t.attr({text:h||0===h?h:"",x:d,y:v});J&&u(q)&&t.attr({anchorX:q,anchorY:l})};t.widthSetter=function(h){G=a.isNumber(h)?h:null};t.heightSetter=function(a){R=a};t["text-alignSetter"]=function(a){n=a};t.paddingSetter=function(a){u(a)&&a!==H&&(H=t.padding=a,O())};t.paddingLeftSetter=function(a){u(a)&&a!==k&&(k=a,O())};t.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==f&&(f=a,p&&t.attr({x:D}))};t.textSetter=function(a){void 0!==a&&g.textSetter(a);N();
O()};t["stroke-widthSetter"]=function(a,h){a&&(L=!0);this["stroke-width"]=a;S(h,a)};t.rSetter=function(a,h){S(h,a)};t.anchorXSetter=function(a,h){q=t.anchorX=a;S(h,Math.round(a)-r()-D)};t.anchorYSetter=function(a,h){l=t.anchorY=a;S(h,a-P)};t.xSetter=function(a){t.x=a;f&&(a-=f*((G||p.width)+2*H));D=Math.round(a);t.attr("translateX",D)};t.ySetter=function(a){P=t.y=Math.round(a);t.attr("translateY",P)};var B=t.css;return c(t,{css:function(a){if(a){var h={};a=A(a);b(t.textProps,function(d){void 0!==a[d]&&
(h[d]=a[d],delete a[d])});g.css(h)}return B.call(t,a)},getBBox:function(){return{width:p.width+2*H,height:p.height+2*H,x:p.x-H,y:p.y-H}},destroy:function(){M(t.element,"mouseenter");M(t.element,"mouseleave");g&&(g=g.destroy());J&&(J=J.destroy());C.prototype.destroy.call(t);t=y=N=O=S=null}})}});a.Renderer=B})(K);(function(a){var C=a.attr,B=a.createElement,E=a.css,F=a.defined,r=a.each,k=a.extend,f=a.isFirefox,x=a.isMS,n=a.isWebKit,u=a.pInt,g=a.SVGRenderer,e=a.win,p=a.wrap;k(a.SVGElement.prototype,{htmlCss:function(a){var b=
this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&"ellipsis"===a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=k(this.styles,a);E(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,c=this.element,l=this.x||
0,e=this.y||0,t=this.textAlign||"left",y={left:0,center:.5,right:1}[t],g=this.styles;E(c,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&r(c.childNodes,function(b){a.invertChild(b,c)});if("SPAN"===c.tagName){var p=this.rotation,f=u(this.textWidth),m=g&&g.whiteSpace,w=[p,t,c.innerHTML,this.textWidth,this.textAlign].join();w!==this.cTT&&(g=a.fontMetrics(c.style.fontSize).b,F(p)&&this.setSpanRotation(p,y,g),E(c,{width:"",whiteSpace:m||"nowrap"}),c.offsetWidth>f&&/[ \-]/.test(c.textContent||
c.innerText)&&E(c,{width:f+"px",display:"block",whiteSpace:m||"normal"}),this.getSpanCorrection(c.offsetWidth,g,y,p,t));E(c,{left:l+(this.xCorr||0)+"px",top:e+(this.yCorr||0)+"px"});n&&(g=c.offsetHeight);this.cTT=w}}else this.alignOnAdd=!0},setSpanRotation:function(a,c,l){var b={},t=x?"-ms-transform":n?"-webkit-transform":f?"MozTransform":e.opera?"-o-transform":"";b[t]=b.transform="rotate("+a+"deg)";b[t+(f?"Origin":"-origin")]=b.transformOrigin=100*c+"% "+l+"px";E(this.element,b)},getSpanCorrection:function(a,
c,l){this.xCorr=-a*l;this.yCorr=-c}});k(g.prototype,{html:function(a,c,l){var b=this.createElement("span"),e=b.element,g=b.renderer,f=g.isSVG,u=function(a,b){r(["opacity","visibility"],function(c){p(a,c+"Setter",function(a,c,d,m){a.call(this,c,d,m);b[d]=c})})};b.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML=this.textStr=a;b.htmlUpdateTransform()};f&&u(b,b.element.style);b.xSetter=b.ySetter=b.alignSetter=b.rotationSetter=function(a,c){"align"===c&&(c="textAlign");b[c]=a;b.htmlUpdateTransform()};
b.attr({text:a,x:Math.round(c),y:Math.round(l)}).css({position:"absolute"});e.style.whiteSpace="nowrap";b.css=b.htmlCss;f&&(b.add=function(a){var c,l=g.box.parentNode,q=[];if(this.parentGroup=a){if(c=a.div,!c){for(;a;)q.push(a),a=a.parentGroup;r(q.reverse(),function(a){var d,m=C(a.element,"class");m&&(m={className:m});c=a.div=a.div||B("div",m,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},
c||l);d=c.style;k(a,{on:function(){b.on.apply({element:q[0].div},arguments);return a},translateXSetter:function(h,v){d.left=h+"px";a[v]=h;a.doTransform=!0},translateYSetter:function(h,v){d.top=h+"px";a[v]=h;a.doTransform=!0}});u(a,d)})}}else c=l;c.appendChild(e);b.added=!0;b.alignOnAdd&&b.htmlUpdateTransform();return b});return b}})})(K);(function(a){function C(){var k=a.defaultOptions.global,n=f.moment;if(k.timezone){if(n)return function(a){return-n.tz(a,k.timezone).utcOffset()};a.error(25)}return k.useUTC&&
k.getTimezoneOffset}function B(){var x=a.defaultOptions.global,n,u=x.useUTC,g=u?"getUTC":"get",e=u?"setUTC":"set";a.Date=n=x.Date||f.Date;n.hcTimezoneOffset=u&&x.timezoneOffset;n.hcGetTimezoneOffset=C();n.hcMakeTime=function(a,b,c,l,e,t){var z;u?(z=n.UTC.apply(0,arguments),z+=F(z)):z=(new n(a,b,k(c,1),k(l,0),k(e,0),k(t,0))).getTime();return z};E("Minutes Hours Day Date Month FullYear".split(" "),function(a){n["hcGet"+a]=g+a});E("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){n["hcSet"+
a]=e+a})}var E=a.each,F=a.getTZOffset,r=a.merge,k=a.pick,f=a.win;a.defaultOptions={symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",
resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0},chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}},width:null,height:null},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",
labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{}},loading:{},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},
footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(f){a.defaultOptions=
r(!0,a.defaultOptions,f);B();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;B()})(K);(function(a){var C=a.correctFloat,B=a.defined,E=a.destroyObjectProperties,F=a.isNumber,r=a.pick,k=a.deg2rad;a.Tick=function(a,k,n,u){this.axis=a;this.pos=k;this.type=n||"";this.isNewLabel=this.isNew=!0;n||u||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,k=a.options,n=a.chart,u=a.categories,g=a.names,e=this.pos,p=
k.labels,b=a.tickPositions,c=e===b[0],l=e===b[b.length-1],g=u?r(u[e],g[e],e):e,u=this.label,b=b.info,z;a.isDatetimeAxis&&b&&(z=k.dateTimeLabelFormats[b.higherRanks[e]||b.unitName]);this.isFirst=c;this.isLast=l;k=a.labelFormatter.call({axis:a,chart:n,isFirst:c,isLast:l,dateTimeLabelFormat:z,value:a.isLog?C(a.lin2log(g)):g});B(u)?u&&u.attr({text:k}):(this.labelLength=(this.label=u=B(k)&&p.enabled?n.renderer.text(k,0,0,p.useHTML).add(a.labelGroup):null)&&u.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?
this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var f=this.axis,n=a.x,u=f.chart.chartWidth,g=f.chart.spacing,e=r(f.labelLeft,Math.min(f.pos,g[3])),g=r(f.labelRight,Math.max(f.pos+f.len,u-g[1])),p=this.label,b=this.rotation,c={left:0,center:.5,right:1}[f.labelAlign],l=p.getBBox().width,z=f.getSlotWidth(),t=z,y=1,I,G={};if(b)0>b&&n-c*l<e?I=Math.round(n/Math.cos(b*k)-e):0<b&&n+c*l>g&&(I=Math.round((u-n)/Math.cos(b*k)));else if(u=n+(1-c)*l,n-c*l<e?t=a.x+t*(1-c)-e:
u>g&&(t=g-a.x+t*c,y=-1),t=Math.min(z,t),t<z&&"center"===f.labelAlign&&(a.x+=y*(z-t-c*(z-Math.min(l,t)))),l>t||f.autoRotation&&(p.styles||{}).width)I=t;I&&(G.width=I,(f.options.labels.style||{}).textOverflow||(G.textOverflow="ellipsis"),p.css(G))},getPosition:function(a,k,n,u){var g=this.axis,e=g.chart,p=u&&e.oldChartHeight||e.chartHeight;return{x:a?g.translate(k+n,null,null,u)+g.transB:g.left+g.offset+(g.opposite?(u&&e.oldChartWidth||e.chartWidth)-g.right-g.left:0),y:a?p-g.bottom+g.offset-(g.opposite?
g.height:0):p-g.translate(k+n,null,null,u)-g.transB}},getLabelPosition:function(a,r,n,u,g,e,p,b){var c=this.axis,l=c.transA,z=c.reversed,t=c.staggerLines,y=c.tickRotCorr||{x:0,y:0},f=g.y;B(f)||(f=0===c.side?n.rotation?-8:-n.getBBox().height:2===c.side?y.y+8:Math.cos(n.rotation*k)*(y.y-n.getBBox(!1,0).height/2));a=a+g.x+y.x-(e&&u?e*l*(z?-1:1):0);r=r+f-(e&&!u?e*l*(z?1:-1):0);t&&(n=p/(b||1)%t,c.opposite&&(n=t-n-1),r+=c.labelOffset/t*n);return{x:a,y:Math.round(r)}},getMarkPath:function(a,k,n,u,g,e){return e.crispLine(["M",
a,k,"L",a+(g?0:-n),k+(g?n:0)],u)},renderGridLine:function(a,k,n){var f=this.axis,g=this.gridLine,e={},p=this.pos,b=this.type,c=f.tickmarkOffset,l=f.chart.renderer;g||(b||(e.zIndex=1),a&&(e.opacity=0),this.gridLine=g=l.path().attr(e).addClass("highcharts-"+(b?b+"-":"")+"grid-line").add(f.gridGroup));if(!a&&g&&(a=f.getPlotLinePath(p+c,g.strokeWidth()*n,a,!0)))g[this.isNew?"attr":"animate"]({d:a,opacity:k})},renderMark:function(a,k,n){var f=this.axis,g=f.chart.renderer,e=this.type,p=f.tickSize(e?e+"Tick":
"tick"),b=this.mark,c=!b,l=a.x;a=a.y;p&&(f.opposite&&(p[0]=-p[0]),c&&(this.mark=b=g.path().addClass("highcharts-"+(e?e+"-":"")+"tick").add(f.axisGroup)),b[c?"attr":"animate"]({d:this.getMarkPath(l,a,p[0],b.strokeWidth()*n,f.horiz,g),opacity:k}))},renderLabel:function(a,k,n,u){var g=this.axis,e=g.horiz,p=g.options,b=this.label,c=p.labels,l=c.step,z=g.tickmarkOffset,t=!0,y=a.x;a=a.y;b&&F(y)&&(b.xy=a=this.getLabelPosition(y,a,b,e,c,z,u,l),this.isFirst&&!this.isLast&&!r(p.showFirstLabel,1)||this.isLast&&
!this.isFirst&&!r(p.showLastLabel,1)?t=!1:!e||g.isRadial||c.step||c.rotation||k||0===n||this.handleOverflow(a),l&&u%l&&(t=!1),t&&F(a.y)?(a.opacity=n,b[this.isNewLabel?"attr":"animate"](a),this.isNewLabel=!1):(b.attr("y",-9999),this.isNewLabel=!0),this.isNew=!1)},render:function(a,k,n){var f=this.axis,g=f.horiz,e=this.getPosition(g,this.pos,f.tickmarkOffset,k),p=e.x,b=e.y,f=g&&p===f.pos+f.len||!g&&b===f.pos?-1:1;n=r(n,1);this.isActive=!0;this.renderGridLine(k,n,f);this.renderMark(e,n,f);this.renderLabel(e,
k,n,a)},destroy:function(){E(this,this.axis)}}})(K);var T=function(a){var C=a.addEvent,B=a.animObject,E=a.arrayMax,F=a.arrayMin,r=a.correctFloat,k=a.defaultOptions,f=a.defined,x=a.deg2rad,n=a.destroyObjectProperties,u=a.each,g=a.extend,e=a.fireEvent,p=a.format,b=a.getMagnitude,c=a.grep,l=a.inArray,z=a.isArray,t=a.isNumber,y=a.isString,I=a.merge,G=a.normalizeTickInterval,D=a.objectEach,m=a.pick,w=a.removeEvent,q=a.splat,A=a.syncTimeout,d=a.Tick,H=function(){this.init.apply(this,arguments)};a.extend(H.prototype,
{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle"},type:"linear"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,
labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)}}},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,d){var h=d.isX,v=this;v.chart=a;
v.horiz=a.inverted&&!v.isZAxis?!h:h;v.isXAxis=h;v.coll=v.coll||(h?"xAxis":"yAxis");v.opposite=d.opposite;v.side=d.side||(v.horiz?v.opposite?0:2:v.opposite?1:3);v.setOptions(d);var b=this.options,c=b.type;v.labelFormatter=b.labels.formatter||v.defaultLabelFormatter;v.userOptions=d;v.minPixelPadding=0;v.reversed=b.reversed;v.visible=!1!==b.visible;v.zoomEnabled=!1!==b.zoomEnabled;v.hasNames="category"===c||!0===b.categories;v.categories=b.categories||v.hasNames;v.names=v.names||[];v.plotLinesAndBandsGroups=
{};v.isLog="logarithmic"===c;v.isDatetimeAxis="datetime"===c;v.positiveValuesOnly=v.isLog&&!v.allowNegativeLog;v.isLinked=f(b.linkedTo);v.ticks={};v.labelEdge=[];v.minorTicks={};v.plotLinesAndBands=[];v.alternateBands={};v.len=0;v.minRange=v.userMinRange=b.minRange||b.maxZoom;v.range=b.range;v.offset=b.offset||0;v.stacks={};v.oldStacks={};v.stacksTouched=0;v.max=null;v.min=null;v.crosshair=m(b.crosshair,q(a.options.tooltip.crosshairs)[h?0:1],!1);d=v.options.events;-1===l(v,a.axes)&&(h?a.axes.splice(a.xAxis.length,
0,v):a.axes.push(v),a[v.coll].push(v));v.series=v.series||[];a.inverted&&!v.isZAxis&&h&&void 0===v.reversed&&(v.reversed=!0);D(d,function(a,h){C(v,h,a)});v.lin2log=b.linearToLogConverter||v.lin2log;v.isLog&&(v.val2lin=v.log2lin,v.lin2val=v.lin2log)},setOptions:function(a){this.options=I(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],I(k[this.coll],a))},
defaultLabelFormatter:function(){var h=this.axis,d=this.value,b=h.categories,c=this.dateTimeLabelFormat,m=k.lang,q=m.numericSymbols,m=m.numericSymbolMagnitude||1E3,l=q&&q.length,e,A=h.options.labels.format,h=h.isLog?Math.abs(d):h.tickInterval;if(A)e=p(A,this);else if(b)e=d;else if(c)e=a.dateFormat(c,d);else if(l&&1E3<=h)for(;l--&&void 0===e;)b=Math.pow(m,l+1),h>=b&&0===10*d%b&&null!==q[l]&&0!==d&&(e=a.numberFormat(d/b,-1)+q[l]);void 0===e&&(e=1E4<=Math.abs(d)?a.numberFormat(d,-1):a.numberFormat(d,
-1,void 0,""));return e},getSeriesExtremes:function(){var a=this,d=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();u(a.series,function(h){if(h.visible||!d.options.chart.ignoreHiddenSeries){var v=h.options,b=v.threshold,q;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=b&&(b=null);if(a.isXAxis)v=h.xData,v.length&&(h=F(v),t(h)||h instanceof Date||(v=c(v,function(a){return t(a)}),h=F(v)),a.dataMin=Math.min(m(a.dataMin,v[0]),
h),a.dataMax=Math.max(m(a.dataMax,v[0]),E(v)));else if(h.getExtremes(),q=h.dataMax,h=h.dataMin,f(h)&&f(q)&&(a.dataMin=Math.min(m(a.dataMin,h),h),a.dataMax=Math.max(m(a.dataMax,q),q)),f(b)&&(a.threshold=b),!v.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,d,b,c,m,q){var h=this.linkedParent||this,v=1,l=0,e=c?h.oldTransA:h.transA;c=c?h.oldMin:h.min;var A=h.minPixelPadding;m=(h.isOrdinal||h.isBroken||h.isLog&&m)&&h.lin2val;e||(e=h.transA);b&&(v*=-1,l=h.len);h.reversed&&
(v*=-1,l-=v*(h.sector||h.len));d?(a=(a*v+l-A)/e+c,m&&(a=h.lin2val(a))):(m&&(a=h.val2lin(a)),a=v*(a-c)*e+l+v*A+(t(q)?e*q:0));return a},toPixels:function(a,d){return this.translate(a,!1,!this.horiz,null,!0)+(d?0:this.pos)},toValue:function(a,d){return this.translate(a-(d?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,d,b,c,q){var h=this.chart,v=this.left,l=this.top,e,A,z=b&&h.oldChartHeight||h.chartHeight,w=b&&h.oldChartWidth||h.chartWidth,g;e=this.transB;var y=function(a,h,d){if(a<
h||a>d)c?a=Math.min(Math.max(h,a),d):g=!0;return a};q=m(q,this.translate(a,null,null,b));a=b=Math.round(q+e);e=A=Math.round(z-q-e);t(q)?this.horiz?(e=l,A=z-this.bottom,a=b=y(a,v,v+this.width)):(a=v,b=w-this.right,e=A=y(e,l,l+this.height)):g=!0;return g&&!c?null:h.renderer.crispLine(["M",a,e,"L",b,A],d||1)},getLinearTickPositions:function(a,d,b){var h,v=r(Math.floor(d/a)*a);b=r(Math.ceil(b/a)*a);var c=[];if(this.single)return[d];for(d=v;d<=b;){c.push(d);d=r(d+a);if(d===h)break;h=d}return c},getMinorTickPositions:function(){var a=
this,d=a.options,b=a.tickPositions,c=a.minorTickInterval,m=[],q=a.pointRangePadding||0,l=a.min-q,q=a.max+q,e=q-l;if(e&&e/c<a.len/3)if(a.isLog)u(this.paddedTicks,function(h,d,v){d&&m.push.apply(m,a.getLogTickPositions(c,v[d-1],v[d],!0))});else if(a.isDatetimeAxis&&"auto"===d.minorTickInterval)m=m.concat(a.getTimeTicks(a.normalizeTimeTickInterval(c),l,q,d.startOfWeek));else for(d=l+(b[0]-l)%c;d<=q&&d!==m[0];d+=c)m.push(d);0!==m.length&&a.trimTicks(m);return m},adjustForMinRange:function(){var a=this.options,
d=this.min,b=this.max,c,q,l,e,A,t,z,w;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(f(a.min)||f(a.max)?this.minRange=null:(u(this.series,function(a){t=a.xData;for(e=z=a.xIncrement?1:t.length-1;0<e;e--)if(A=t[e]-t[e-1],void 0===l||A<l)l=A}),this.minRange=Math.min(5*l,this.dataMax-this.dataMin)));b-d<this.minRange&&(q=this.dataMax-this.dataMin>=this.minRange,w=this.minRange,c=(w-b+d)/2,c=[d-c,m(a.min,d-c)],q&&(c[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),d=E(c),b=[d+w,m(a.max,d+w)],
q&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=F(b),b-d<w&&(c[0]=b-w,c[1]=m(a.min,b-w),d=E(c)));this.min=d;this.max=b},getClosest:function(){var a;this.categories?a=1:u(this.series,function(h){var d=h.closestPointRange,v=h.visible||!h.chart.options.chart.ignoreHiddenSeries;!h.noSharedTooltip&&f(d)&&v&&(a=f(a)?Math.min(a,d):d)});return a},nameToX:function(a){var h=z(this.categories),d=h?this.categories:this.names,b=a.options.x,c;a.series.requireSorting=!1;f(b)||(b=!1===this.options.uniqueNames?
a.series.autoIncrement():l(a.name,d));-1===b?h||(c=d.length):c=b;void 0!==c&&(this.names[c]=a.name);return c},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=this.userMinRange,u(this.series||[],function(h){h.xIncrement=null;if(!h.points||h.isDirtyData)h.processData(),h.generatePoints();u(h.points,function(d,v){var b;d.options&&(b=a.nameToX(d),void 0!==b&&b!==d.x&&(d.x=b,h.xData[v]=b))})}))},setAxisTranslation:function(a){var h=this,d=h.max-h.min,b=h.axisPointRange||
0,c,q=0,l=0,e=h.linkedParent,A=!!h.categories,t=h.transA,w=h.isXAxis;if(w||A||b)c=h.getClosest(),e?(q=e.minPointOffset,l=e.pointRangePadding):u(h.series,function(a){var d=A?1:w?m(a.options.pointRange,c,0):h.axisPointRange||0;a=a.options.pointPlacement;b=Math.max(b,d);h.single||(q=Math.max(q,y(a)?0:d/2),l=Math.max(l,"on"===a?0:d))}),e=h.ordinalSlope&&c?h.ordinalSlope/c:1,h.minPointOffset=q*=e,h.pointRangePadding=l*=e,h.pointRange=Math.min(b,d),w&&(h.closestPointRange=c);a&&(h.oldTransA=t);h.translationSlope=
h.transA=t=h.options.staticScale||h.len/(d+l||1);h.transB=h.horiz?h.left:h.bottom;h.minPixelPadding=t*q},minFromRange:function(){return this.max-this.range},setTickInterval:function(h){var d=this,c=d.chart,q=d.options,l=d.isLog,A=d.log2lin,w=d.isDatetimeAxis,z=d.isXAxis,g=d.isLinked,y=q.maxPadding,p=q.minPadding,H=q.tickInterval,k=q.tickPixelInterval,n=d.categories,D=d.threshold,I=d.softThreshold,x,B,C,E;w||n||g||this.getTickAmount();C=m(d.userMin,q.min);E=m(d.userMax,q.max);g?(d.linkedParent=c[d.coll][q.linkedTo],
c=d.linkedParent.getExtremes(),d.min=m(c.min,c.dataMin),d.max=m(c.max,c.dataMax),q.type!==d.linkedParent.options.type&&a.error(11,1)):(!I&&f(D)&&(d.dataMin>=D?(x=D,p=0):d.dataMax<=D&&(B=D,y=0)),d.min=m(C,x,d.dataMin),d.max=m(E,B,d.dataMax));l&&(d.positiveValuesOnly&&!h&&0>=Math.min(d.min,m(d.dataMin,d.min))&&a.error(10,1),d.min=r(A(d.min),15),d.max=r(A(d.max),15));d.range&&f(d.max)&&(d.userMin=d.min=C=Math.max(d.min,d.minFromRange()),d.userMax=E=d.max,d.range=null);e(d,"foundExtremes");d.beforePadding&&
d.beforePadding();d.adjustForMinRange();!(n||d.axisPointRange||d.usePercentage||g)&&f(d.min)&&f(d.max)&&(A=d.max-d.min)&&(!f(C)&&p&&(d.min-=A*p),!f(E)&&y&&(d.max+=A*y));t(q.softMin)&&(d.min=Math.min(d.min,q.softMin));t(q.softMax)&&(d.max=Math.max(d.max,q.softMax));t(q.floor)&&(d.min=Math.max(d.min,q.floor));t(q.ceiling)&&(d.max=Math.min(d.max,q.ceiling));I&&f(d.dataMin)&&(D=D||0,!f(C)&&d.min<D&&d.dataMin>=D?d.min=D:!f(E)&&d.max>D&&d.dataMax<=D&&(d.max=D));d.tickInterval=d.min===d.max||void 0===d.min||
void 0===d.max?1:g&&!H&&k===d.linkedParent.options.tickPixelInterval?H=d.linkedParent.tickInterval:m(H,this.tickAmount?(d.max-d.min)/Math.max(this.tickAmount-1,1):void 0,n?1:(d.max-d.min)*k/Math.max(d.len,k));z&&!h&&u(d.series,function(a){a.processData(d.min!==d.oldMin||d.max!==d.oldMax)});d.setAxisTranslation(!0);d.beforeSetTickPositions&&d.beforeSetTickPositions();d.postProcessTickInterval&&(d.tickInterval=d.postProcessTickInterval(d.tickInterval));d.pointRange&&!H&&(d.tickInterval=Math.max(d.pointRange,
d.tickInterval));h=m(q.minTickInterval,d.isDatetimeAxis&&d.closestPointRange);!H&&d.tickInterval<h&&(d.tickInterval=h);w||l||H||(d.tickInterval=G(d.tickInterval,null,b(d.tickInterval),m(q.allowDecimals,!(.5<d.tickInterval&&5>d.tickInterval&&1E3<d.max&&9999>d.max)),!!this.tickAmount));this.tickAmount||(d.tickInterval=d.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,d,b=a.tickPositions,c=a.tickPositioner,q=a.startOnTick,m=a.endOnTick;this.tickmarkOffset=this.categories&&
"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.single=this.min===this.max&&f(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=d=b&&b.slice();!d&&(d=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,
!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),d.length>this.len&&(d=[d[0],d.pop()]),this.tickPositions=d,c&&(c=c.apply(this,[this.min,this.max])))&&(this.tickPositions=d=c);this.paddedTicks=d.slice(0);this.trimTicks(d,q,m);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),b||c||this.adjustTickAmount())},trimTicks:function(a,d,b){var h=a[0],c=a[a.length-1],q=this.minPointOffset||0;if(!this.isLinked){if(d&&
-Infinity!==h)this.min=h;else for(;this.min-q>a[0];)a.shift();if(b)this.max=c;else for(;this.max+q<a[a.length-1];)a.pop();0===a.length&&f(h)&&a.push((c+h)/2)}},alignToOthers:function(){var a={},d,b=this.options;!1===this.chart.options.chart.alignTicks||!1===b.alignTicks||this.isLog||u(this.chart[this.coll],function(h){var b=h.options,b=[h.horiz?b.left:b.top,b.width,b.height,b.pane].join();h.series.length&&(a[b]?d=!0:a[b]=1)});return d},getTickAmount:function(){var a=this.options,d=a.tickAmount,b=
a.tickPixelInterval;!f(a.tickInterval)&&this.len<b&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(d=2);!d&&this.alignToOthers()&&(d=Math.ceil(this.len/b)+1);4>d&&(this.finalTickAmt=d,d=5);this.tickAmount=d},adjustTickAmount:function(){var a=this.tickInterval,d=this.tickPositions,b=this.tickAmount,c=this.finalTickAmt,q=d&&d.length;if(q<b){for(;d.length<b;)d.push(r(d[d.length-1]+a));this.transA*=(q-1)/(b-1);this.max=d[d.length-1]}else q>b&&(this.tickInterval*=2,this.setTickPositions());
if(f(c)){for(a=b=d.length;a--;)(3===c&&1===a%2||2>=c&&0<a&&a<b-1)&&d.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,d;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();d=this.len!==this.oldAxisLength;u(this.series,function(d){if(d.isDirtyData||d.isDirty||d.xAxis.isDirty)a=!0});d||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=
!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=d||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,d,b,c,q){var h=this,l=h.chart;b=m(b,!0);u(h.series,function(a){delete a.kdTree});q=g(q,{min:a,max:d});e(h,"setExtremes",q,function(){h.userMin=a;h.userMax=d;h.eventArgs=q;b&&l.redraw(c)})},zoom:function(a,d){var h=this.dataMin,b=this.dataMax,c=this.options,
q=Math.min(h,m(c.min,h)),c=Math.max(b,m(c.max,b));if(a!==this.min||d!==this.max)this.allowZoomOutside||(f(h)&&(a<q&&(a=q),a>c&&(a=c)),f(b)&&(d<q&&(d=q),d>c&&(d=c))),this.displayBtn=void 0!==a||void 0!==d,this.setExtremes(a,d,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,d=this.options,b=d.offsets||[0,0,0,0],c=this.horiz,q=m(d.width,a.plotWidth-b[3]+b[1]),l=m(d.height,a.plotHeight-b[0]+b[2]),e=m(d.top,a.plotTop+b[0]),d=m(d.left,a.plotLeft+b[3]),b=/%$/;b.test(l)&&(l=
Math.round(parseFloat(l)/100*a.plotHeight));b.test(e)&&(e=Math.round(parseFloat(e)/100*a.plotHeight+a.plotTop));this.left=d;this.top=e;this.width=q;this.height=l;this.bottom=a.chartHeight-l-e;this.right=a.chartWidth-q-d;this.len=Math.max(c?q:l,0);this.pos=c?d:e},getExtremes:function(){var a=this.isLog,d=this.lin2log;return{min:a?r(d(this.min)):this.min,max:a?r(d(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var d=
this.isLog,h=this.lin2log,b=d?h(this.min):this.min,d=d?h(this.max):this.max;null===a?a=b:b>a?a=b:d<a&&(a=d);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(m(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var d=this.options,h=d[a+"Length"],b=m(d[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(b&&h)return"inside"===d[a+"Position"]&&(h=-h),[h,b]},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&
this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,d=this.horiz,b=this.tickInterval,c=b,q=this.len/(((this.categories?1:0)+this.max-this.min)/b),l,e=a.rotation,A=this.labelMetrics(),t,w=Number.MAX_VALUE,z,g=function(a){a/=q||1;a=1<a?Math.ceil(a):1;return a*b};d?(z=!a.staggerLines&&!a.step&&(f(e)?[e]:q<m(a.autoRotationLimit,80)&&a.autoRotation))&&u(z,function(a){var d;if(a===e||a&&-90<=a&&90>=a)t=g(Math.abs(A.h/Math.sin(x*a))),d=t+
Math.abs(a/360),d<w&&(w=d,l=a,c=t)}):a.step||(c=g(A.h));this.autoRotation=z;this.labelRotation=m(l,e);return c},getSlotWidth:function(){var a=this.chart,d=this.horiz,b=this.options.labels,c=Math.max(this.tickPositions.length-(this.categories?0:1),1),q=a.margin[3];return d&&2>(b.step||0)&&!b.rotation&&(this.staggerLines||1)*this.len/c||!d&&(q&&q-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,d=a.renderer,b=this.tickPositions,c=this.ticks,q=this.options.labels,m=this.horiz,
l=this.getSlotWidth(),e=Math.max(1,Math.round(l-2*(q.padding||5))),A={},t=this.labelMetrics(),w=q.style&&q.style.textOverflow,z,g=0,p,H;y(q.rotation)||(A.rotation=q.rotation||0);u(b,function(a){(a=c[a])&&a.labelLength>g&&(g=a.labelLength)});this.maxLabelLength=g;if(this.autoRotation)g>e&&g>t.h?A.rotation=this.labelRotation:this.labelRotation=0;else if(l&&(z={width:e+"px"},!w))for(z.textOverflow="clip",p=b.length;!m&&p--;)if(H=b[p],e=c[H].label)e.styles&&"ellipsis"===e.styles.textOverflow?e.css({textOverflow:"clip"}):
c[H].labelLength>l&&e.css({width:l+"px"}),e.getBBox().height>this.len/b.length-(t.h-t.f)&&(e.specCss={textOverflow:"ellipsis"});A.rotation&&(z={width:(g>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},w||(z.textOverflow="ellipsis"));if(this.labelAlign=q.align||this.autoLabelAlign(this.labelRotation))A.align=this.labelAlign;u(b,function(a){var d=(a=c[a])&&a.label;d&&(d.attr(A),z&&d.css(I(z,d.specCss)),delete d.specCss,a.rotation=A.rotation)});this.tickRotCorr=d.rotCorr(t.b,this.labelRotation||
0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||f(this.min)&&f(this.max)&&!!this.tickPositions},addTitle:function(a){var d=this.chart.renderer,h=this.horiz,b=this.opposite,c=this.options.title,q;this.axisTitle||((q=c.textAlign)||(q=(h?{low:"left",middle:"center",high:"right"}:{low:b?"right":"left",middle:"center",high:b?"left":"right"})[c.align]),this.axisTitle=d.text(c.text,0,0,c.useHTML).attr({zIndex:7,rotation:c.rotation||0,align:q}).addClass("highcharts-axis-title").add(this.axisGroup),
this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var h=this.ticks;h[a]?h[a].addLabel():h[a]=new d(this,a)},getOffset:function(){var a=this,d=a.chart,b=d.renderer,c=a.options,q=a.tickPositions,l=a.ticks,e=a.horiz,A=a.side,t=d.inverted&&!a.isZAxis?[1,0,3,2][A]:A,w,z,g=0,y,p=0,H=c.title,k=c.labels,G=0,n=d.axisOffset,d=d.clipOffset,I=[-1,1,1,-1][A],r=c.className,x=a.axisParent,B=this.tickSize("tick");w=a.hasData();a.showAxis=z=w||m(c.showEmpty,!0);a.staggerLines=
a.horiz&&k.staggerLines;a.axisGroup||(a.gridGroup=b.g("grid").attr({zIndex:c.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(r||"")).add(x),a.axisGroup=b.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(r||"")).add(x),a.labelGroup=b.g("axis-labels").attr({zIndex:k.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(r||"")).add(x));w||a.isLinked?(u(q,function(d,h){a.generateTick(d,h)}),a.renderUnsquish(),!1===k.reserveSpace||
0!==A&&2!==A&&{1:"left",3:"right"}[A]!==a.labelAlign&&"center"!==a.labelAlign||u(q,function(a){G=Math.max(l[a].getLabelSize(),G)}),a.staggerLines&&(G*=a.staggerLines,a.labelOffset=G*(a.opposite?-1:1))):D(l,function(a,d){a.destroy();delete l[d]});H&&H.text&&!1!==H.enabled&&(a.addTitle(z),z&&!1!==H.reserveSpace&&(a.titleOffset=g=a.axisTitle.getBBox()[e?"height":"width"],y=H.offset,p=f(y)?0:m(H.margin,e?5:10)));a.renderLine();a.offset=I*m(c.offset,n[A]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};b=0===A?
-a.labelMetrics().h:2===A?a.tickRotCorr.y:0;p=Math.abs(G)+p;G&&(p=p-b+I*(e?m(k.y,a.tickRotCorr.y+8*I):k.x));a.axisTitleMargin=m(y,p);n[A]=Math.max(n[A],a.axisTitleMargin+g+I*a.offset,p,w&&q.length&&B?B[0]+I*a.offset:0);q=2*Math.floor(a.axisLine.strokeWidth()/2);0<c.offset&&(q-=2*c.offset);d[t]=Math.max(d[t]||q,q)},getLinePath:function(a){var d=this.chart,h=this.opposite,b=this.offset,c=this.horiz,q=this.left+(h?this.width:0)+b,b=d.chartHeight-this.bottom-(h?this.height:0)+b;h&&(a*=-1);return d.renderer.crispLine(["M",
c?this.left:q,c?b:this.top,"L",c?d.chartWidth-this.right:q,c?b:d.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup))},getTitlePosition:function(){var a=this.horiz,d=this.left,b=this.top,c=this.len,q=this.options.title,m=a?d:b,l=this.opposite,e=this.offset,A=q.x||0,t=q.y||0,w=this.chart.renderer.fontMetrics(q.style&&q.style.fontSize,this.axisTitle).f,c={low:m+(a?0:c),middle:m+c/2,high:m+(a?
c:0)}[q.align],d=(a?b+this.height:d)+(a?1:-1)*(l?-1:1)*this.axisTitleMargin+(2===this.side?w:0);return{x:a?c+A:d+(l?this.width:0)+e+A,y:a?d+t-(l?this.height:0)+e:c+t}},renderMinorTick:function(a){var h=this.chart.hasRendered&&t(this.oldMin),b=this.minorTicks;b[a]||(b[a]=new d(this,a,"minor"));h&&b[a].isNew&&b[a].render(null,!0);b[a].render(null,!1,1)},renderTick:function(a,b){var h=this.isLinked,c=this.ticks,q=this.chart.hasRendered&&t(this.oldMin);if(!h||a>=this.min&&a<=this.max)c[a]||(c[a]=new d(this,
a)),q&&c[a].isNew&&c[a].render(b,!0,.1),c[a].render(b)},render:function(){var h=this,b=h.chart,c=h.options,q=h.isLog,m=h.lin2log,l=h.isLinked,e=h.tickPositions,w=h.axisTitle,z=h.ticks,g=h.minorTicks,y=h.alternateBands,p=c.stackLabels,H=c.alternateGridColor,k=h.tickmarkOffset,f=h.axisLine,G=h.showAxis,n=B(b.renderer.globalAnimation),I,r;h.labelEdge.length=0;h.overlap=!1;u([z,g,y],function(a){D(a,function(a){a.isActive=!1})});if(h.hasData()||l)h.minorTickInterval&&!h.categories&&u(h.getMinorTickPositions(),
function(a){h.renderMinorTick(a)}),e.length&&(u(e,function(a,d){h.renderTick(a,d)}),k&&(0===h.min||h.single)&&(z[-1]||(z[-1]=new d(h,-1,null,!0)),z[-1].render(-1))),H&&u(e,function(d,c){r=void 0!==e[c+1]?e[c+1]+k:h.max-k;0===c%2&&d<h.max&&r<=h.max+(b.polar?-k:k)&&(y[d]||(y[d]=new a.PlotLineOrBand(h)),I=d+k,y[d].options={from:q?m(I):I,to:q?m(r):r,color:H},y[d].render(),y[d].isActive=!0)}),h._addedPlotLB||(u((c.plotLines||[]).concat(c.plotBands||[]),function(a){h.addPlotBandOrLine(a)}),h._addedPlotLB=
!0);u([z,g,y],function(a){var d,h=[],c=n.duration;D(a,function(a,d){a.isActive||(a.render(d,!1,0),a.isActive=!1,h.push(d))});A(function(){for(d=h.length;d--;)a[h[d]]&&!a[h[d]].isActive&&(a[h[d]].destroy(),delete a[h[d]])},a!==y&&b.hasRendered&&c?c:0)});f&&(f[f.isPlaced?"animate":"attr"]({d:this.getLinePath(f.strokeWidth())}),f.isPlaced=!0,f[G?"show":"hide"](!0));w&&G&&(c=h.getTitlePosition(),t(c.y)?(w[w.isNew?"attr":"animate"](c),w.isNew=!1):(w.attr("y",-9999),w.isNew=!0));p&&p.enabled&&h.renderStackTotals();
h.isDirty=!1},redraw:function(){this.visible&&(this.render(),u(this.plotLinesAndBands,function(a){a.render()}));u(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var d=this,h=d.stacks,b=d.plotLinesAndBands,c;a||w(d);D(h,function(a,d){n(a);h[d]=null});u([d.ticks,d.minorTicks,d.alternateBands],function(a){n(a)});if(b)for(a=b.length;a--;)b[a].destroy();u("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),
function(a){d[a]&&(d[a]=d[a].destroy())});for(c in d.plotLinesAndBandsGroups)d.plotLinesAndBandsGroups[c]=d.plotLinesAndBandsGroups[c].destroy();D(d,function(a,h){-1===l(h,d.keepProps)&&delete d[h]})},drawCrosshair:function(a,d){var h,b=this.crosshair,c=m(b.snap,!0),q,l=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(f(d)||!c)?(c?f(d)&&(q=this.isXAxis?d.plotX:this.len-d.plotY):q=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),f(q)&&(h=this.getPlotLinePath(d&&(this.isXAxis?
d.x:m(d.stackY,d.y)),null,null,null,q)||null),f(h)?(d=this.categories&&!this.isRadial,l||(this.cross=l=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(d?"category ":"thin ")+b.className).attr({zIndex:m(b.zIndex,2)}).add()),l.show().attr({d:h}),d&&!b.width&&l.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=H}(K);(function(a){var C=a.Axis,B=a.Date,
E=a.dateFormat,F=a.defaultOptions,r=a.defined,k=a.each,f=a.extend,x=a.getMagnitude,n=a.getTZOffset,u=a.normalizeTickInterval,g=a.pick,e=a.timeUnits;C.prototype.getTimeTicks=function(a,b,c,l){var z=[],t={},y=F.global.useUTC,p,G=new B(b-Math.max(n(b),n(c))),u=B.hcMakeTime,m=a.unitRange,w=a.count,q;if(r(b)){G[B.hcSetMilliseconds](m>=e.second?0:w*Math.floor(G.getMilliseconds()/w));if(m>=e.second)G[B.hcSetSeconds](m>=e.minute?0:w*Math.floor(G.getSeconds()/w));if(m>=e.minute)G[B.hcSetMinutes](m>=e.hour?
0:w*Math.floor(G[B.hcGetMinutes]()/w));if(m>=e.hour)G[B.hcSetHours](m>=e.day?0:w*Math.floor(G[B.hcGetHours]()/w));if(m>=e.day)G[B.hcSetDate](m>=e.month?1:w*Math.floor(G[B.hcGetDate]()/w));m>=e.month&&(G[B.hcSetMonth](m>=e.year?0:w*Math.floor(G[B.hcGetMonth]()/w)),p=G[B.hcGetFullYear]());if(m>=e.year)G[B.hcSetFullYear](p-p%w);if(m===e.week)G[B.hcSetDate](G[B.hcGetDate]()-G[B.hcGetDay]()+g(l,1));p=G[B.hcGetFullYear]();l=G[B.hcGetMonth]();var A=G[B.hcGetDate](),d=G[B.hcGetHours]();if(B.hcTimezoneOffset||
B.hcGetTimezoneOffset)q=(!y||!!B.hcGetTimezoneOffset)&&(c-b>4*e.month||n(b)!==n(c)),G=G.getTime(),G=new B(G+n(G));y=G.getTime();for(b=1;y<c;)z.push(y),y=m===e.year?u(p+b*w,0):m===e.month?u(p,l+b*w):!q||m!==e.day&&m!==e.week?q&&m===e.hour?u(p,l,A,d+b*w):y+m*w:u(p,l,A+b*w*(m===e.day?1:7)),b++;z.push(y);m<=e.hour&&1E4>z.length&&k(z,function(a){0===a%18E5&&"000000000"===E("%H%M%S%L",a)&&(t[a]="day")})}z.info=f(a,{higherRanks:t,totalRange:m*w});return z};C.prototype.normalizeTimeTickInterval=function(a,
b){var c=b||[["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,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];b=c[c.length-1];var l=e[b[0]],z=b[1],t;for(t=0;t<c.length&&!(b=c[t],l=e[b[0]],z=b[1],c[t+1]&&a<=(l*z[z.length-1]+e[c[t+1][0]])/2);t++);l===e.year&&a<5*l&&(z=[1,2,5]);a=u(a/l,z,"year"===b[0]?Math.max(x(a/l),1):1);return{unitRange:l,count:a,unitName:b[0]}}})(K);(function(a){var C=a.Axis,B=a.getMagnitude,
E=a.map,F=a.normalizeTickInterval,r=a.pick;C.prototype.getLogTickPositions=function(a,f,x,n){var k=this.options,g=this.len,e=this.lin2log,p=this.log2lin,b=[];n||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),b=this.getLinearTickPositions(a,f,x);else if(.08<=a)for(var g=Math.floor(f),c,l,z,t,y,k=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];g<x+1&&!y;g++)for(l=k.length,c=0;c<l&&!y;c++)z=p(e(g)*k[c]),z>f&&(!n||t<=x)&&void 0!==t&&b.push(t),t>x&&(y=!0),t=z;else f=e(f),x=e(x),a=k[n?"minorTickInterval":
"tickInterval"],a=r("auto"===a?null:a,this._minorAutoInterval,k.tickPixelInterval/(n?5:1)*(x-f)/((n?g/this.tickPositions.length:g)||1)),a=F(a,null,B(a)),b=E(this.getLinearTickPositions(a,f,x),p),n||(this._minorAutoInterval=a/5);n||(this.tickInterval=a);return b};C.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};C.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,C){var B=a.arrayMax,E=a.arrayMin,F=a.defined,r=a.destroyObjectProperties,k=a.each,f=a.erase,x=a.merge,n=
a.pick;a.PlotLineOrBand=function(a,g){this.axis=a;g&&(this.options=g,this.id=g.id)};a.PlotLineOrBand.prototype={render:function(){var f=this,g=f.axis,e=g.horiz,p=f.options,b=p.label,c=f.label,l=p.to,z=p.from,t=p.value,y=F(z)&&F(l),k=F(t),G=f.svgElem,D=!G,m=[],w=n(p.zIndex,0),q=p.events,m={"class":"highcharts-plot-"+(y?"band ":"line ")+(p.className||"")},A={},d=g.chart.renderer,H=y?"bands":"lines",h;h=g.log2lin;g.isLog&&(z=h(z),l=h(l),t=h(t));A.zIndex=w;H+="-"+w;(h=g.plotLinesAndBandsGroups[H])||(g.plotLinesAndBandsGroups[H]=
h=d.g("plot-"+H).attr(A).add());D&&(f.svgElem=G=d.path().attr(m).add(h));if(k)m=g.getPlotLinePath(t,G.strokeWidth());else if(y)m=g.getPlotBandPath(z,l,p);else return;D&&m&&m.length?(G.attr({d:m}),q&&a.objectEach(q,function(a,d){G.on(d,function(a){q[d].apply(f,[a])})})):G&&(m?(G.show(),G.animate({d:m})):(G.hide(),c&&(f.label=c=c.destroy())));b&&F(b.text)&&m&&m.length&&0<g.width&&0<g.height&&!m.flat?(b=x({align:e&&y&&"center",x:e?!y&&4:10,verticalAlign:!e&&y&&"middle",y:e?y?16:10:y?6:-4,rotation:e&&
!y&&90},b),this.renderLabel(b,m,y,w)):c&&c.hide();return f},renderLabel:function(a,g,e,p){var b=this.label,c=this.axis.chart.renderer;b||(b={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(e?"band":"line")+"-label "+(a.className||"")},b.zIndex=p,this.label=b=c.text(a.text,0,0,a.useHTML).attr(b).add());p=[g[1],g[4],e?g[6]:g[1]];g=[g[2],g[5],e?g[7]:g[2]];e=E(p);c=E(g);b.align(a,!1,{x:e,y:c,width:B(p)-e,height:B(g)-c});b.show()},destroy:function(){f(this.axis.plotLinesAndBands,
this);delete this.axis;r(this)}};a.extend(C.prototype,{getPlotBandPath:function(a,g){var e=this.getPlotLinePath(g,null,null,!0),p=this.getPlotLinePath(a,null,null,!0),b=this.horiz,c=1;a=a<this.min&&g<this.min||a>this.max&&g>this.max;p&&e?(a&&(p.flat=p.toString()===e.toString(),c=0),p.push(b&&e[4]===p[4]?e[4]+c:e[4],b||e[5]!==p[5]?e[5]:e[5]+c,b&&e[1]===p[1]?e[1]+c:e[1],b||e[2]!==p[2]?e[2]:e[2]+c)):p=null;return p},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,
"plotLines")},addPlotBandOrLine:function(f,g){var e=(new a.PlotLineOrBand(this,f)).render(),p=this.userOptions;e&&(g&&(p[g]=p[g]||[],p[g].push(f)),this.plotLinesAndBands.push(e));return e},removePlotBandOrLine:function(a){for(var g=this.plotLinesAndBands,e=this.options,p=this.userOptions,b=g.length;b--;)g[b].id===a&&g[b].destroy();k([e.plotLines||[],p.plotLines||[],e.plotBands||[],p.plotBands||[]],function(c){for(b=c.length;b--;)c[b].id===a&&f(c,c[b])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},
removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(K,T);(function(a){var C=a.dateFormat,B=a.each,E=a.extend,F=a.format,r=a.isNumber,k=a.map,f=a.merge,x=a.pick,n=a.splat,u=a.syncTimeout,g=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,g){this.chart=a;this.options=g;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=g.split&&!a.inverted;this.shared=g.shared||this.split},cleanSplit:function(a){B(this.chart.series,function(e){var b=
e&&e.tt;b&&(!b.isActive||a?e.tt=b.destroy():b.isActive=!1)})},applyFilter:function(){var a=this.chart;a.renderer.definition({tagName:"filter",id:"drop-shadow-"+a.index,opacity:.5,children:[{tagName:"feGaussianBlur",in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]});a.renderer.definition({tagName:"style",
textContent:".highcharts-tooltip-"+a.index+"{filter:url(#drop-shadow-"+a.index+")}"})},getLabel:function(){var a=this.chart.renderer,g=this.options;this.label||(this.label=this.split?a.g("tooltip"):a.label("",0,0,g.shape||"callout",null,null,g.useHTML,null,"tooltip").attr({padding:g.padding,r:g.borderRadius}),this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();f(!0,this.chart.options.tooltip.userOptions,
a);this.init(this.chart,f(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,g,b,c){var l=this,e=l.now,t=!1!==l.options.animation&&!l.isHidden&&(1<Math.abs(a-e.x)||1<Math.abs(g-e.y)),y=l.followPointer||1<l.len;E(e,{x:t?(2*e.x+a)/3:a,y:t?(e.y+g)/2:g,anchorX:y?void 0:t?(2*e.anchorX+b)/3:b,anchorY:y?void 0:t?
(e.anchorY+c)/2:c});l.getLabel().attr(e);t&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){l&&l.move(a,g,b,c)},32))},hide:function(a){var e=this;clearTimeout(this.hideTimer);a=x(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=u(function(){e.getLabel()[a?"fadeOut":"hide"]();e.isHidden=!0},a))},getAnchor:function(a,g){var b,c=this.chart,l=c.inverted,e=c.plotTop,t=c.plotLeft,y=0,p=0,f,D;a=n(a);b=a[0].tooltipPos;this.followPointer&&g&&(void 0===g.chartX&&(g=
c.pointer.normalize(g)),b=[g.chartX-c.plotLeft,g.chartY-e]);b||(B(a,function(a){f=a.series.yAxis;D=a.series.xAxis;y+=a.plotX+(!l&&D?D.left-t:0);p+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!l&&f?f.top-e:0)}),y/=a.length,p/=a.length,b=[l?c.plotWidth-p:y,this.shared&&!l&&1<a.length&&g?g.chartY-e:l?c.plotHeight-y:p]);return k(b,Math.round)},getPosition:function(a,g,b){var c=this.chart,l=this.distance,e={},t=b.h||0,y,f=["y",c.chartHeight,g,b.plotY+c.plotTop,c.plotTop,c.plotTop+c.plotHeight],p=["x",
c.chartWidth,a,b.plotX+c.plotLeft,c.plotLeft,c.plotLeft+c.plotWidth],k=!this.followPointer&&x(b.ttBelow,!c.inverted===!!b.negative),m=function(a,b,h,c,q,m){var d=h<c-l,A=c+l+h<b,v=c-l-h;c+=l;if(k&&A)e[a]=c;else if(!k&&d)e[a]=v;else if(d)e[a]=Math.min(m-h,0>v-t?v:v-t);else if(A)e[a]=Math.max(q,c+t+h>b?c:c+t);else return!1},w=function(a,b,h,c){var d;c<l||c>b-l?d=!1:e[a]=c<h/2?1:c>b-h/2?b-h-2:c-h/2;return d},q=function(a){var d=f;f=p;p=d;y=a},A=function(){!1!==m.apply(0,f)?!1!==w.apply(0,p)||y||(q(!0),
A()):y?e.x=e.y=0:(q(!0),A())};(c.inverted||1<this.len)&&q();A();return e},defaultFormatter:function(a){var e=this.points||n(this),b;b=[a.tooltipFooterHeaderFormatter(e[0])];b=b.concat(a.bodyFormatter(e));b.push(a.tooltipFooterHeaderFormatter(e[0],!0));return b},refresh:function(a,g){var b,c,l=a,e,t={},y=[];b=this.options.formatter||this.defaultFormatter;var t=this.shared,f;clearTimeout(this.hideTimer);this.followPointer=n(l)[0].series.tooltipOptions.followPointer;e=this.getAnchor(l,g);g=e[0];c=e[1];
!t||l.series&&l.series.noSharedTooltip?t=l.getLabelConfig():(B(l,function(a){a.setState("hover");y.push(a.getLabelConfig())}),t={x:l[0].category,y:l[0].y},t.points=y,l=l[0]);this.len=y.length;t=b.call(t,this);f=l.series;this.distance=x(f.tooltipOptions.distance,16);!1===t?this.hide():(b=this.getLabel(),this.isHidden&&b.attr({opacity:1}).show(),this.split?this.renderSplit(t,a):(b.css({width:this.chart.spacingBox.width}),b.attr({text:t&&t.join?t.join(""):t}),b.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+
x(l.colorIndex,f.colorIndex)),this.updatePosition({plotX:g,plotY:c,negative:l.negative,ttBelow:l.ttBelow,h:e[2]||0})),this.isHidden=!1)},renderSplit:function(e,g){var b=this,c=[],l=this.chart,z=l.renderer,t=!0,y=this.options,f,p=this.getLabel();B(e.slice(0,g.length+1),function(a,m){m=g[m-1]||{isHeader:!0,plotX:g[0].plotX};var e=m.series||b,q=e.tt,A="highcharts-color-"+x(m.colorIndex,(m.series||{}).colorIndex,"none");q||(e.tt=q=z.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+A).attr({padding:y.padding,
r:y.borderRadius}).add(p));q.isActive=!0;q.attr({text:a});a=q.getBBox();A=a.width+q.strokeWidth();m.isHeader?(f=a.height,A=Math.max(0,Math.min(m.plotX+l.plotLeft-A/2,l.chartWidth-A))):A=m.plotX+l.plotLeft-x(y.distance,16)-A;0>A&&(t=!1);a=(m.series&&m.series.yAxis&&m.series.yAxis.pos)+(m.plotY||0);a-=l.plotTop;c.push({target:m.isHeader?l.plotHeight+f:a,rank:m.isHeader?1:0,size:e.tt.getBBox().height+1,point:m,x:A,tt:q})});this.cleanSplit();a.distribute(c,l.plotHeight+f);B(c,function(a){var b=a.point,
c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:t||b.isHeader?a.x:b.plotX+l.plotLeft+x(y.distance,16),y:a.pos+l.plotTop,anchorX:b.isHeader?b.plotX+l.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+l.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var e=this.chart,b=this.getLabel(),b=(this.options.positioner||this.getPosition).call(this,b.width,b.height,a);this.move(Math.round(b.x),Math.round(b.y||0),a.plotX+e.plotLeft,a.plotY+e.plotTop)},getDateFormat:function(a,
f,b,c){var l=C("%m-%d %H:%M:%S.%L",f),e,t,y={millisecond:15,second:12,minute:9,hour:6,day:3},p="millisecond";for(t in g){if(a===g.week&&+C("%w",f)===b&&"00:00:00.000"===l.substr(6)){t="week";break}if(g[t]>a){t=p;break}if(y[t]&&l.substr(y[t])!=="01-01 00:00:00.000".substr(y[t]))break;"week"!==t&&(p=t)}t&&(e=c[t]);return e},getXDateFormat:function(a,g,b){g=g.dateTimeLabelFormats;var c=b&&b.closestPointRange;return(c?this.getDateFormat(c,a.x,b.options.startOfWeek,g):g.day)||g.year},tooltipFooterHeaderFormatter:function(a,
g){var b=g?"footer":"header";g=a.series;var c=g.tooltipOptions,l=c.xDateFormat,e=g.xAxis,t=e&&"datetime"===e.options.type&&r(a.key),b=c[b+"Format"];t&&!l&&(l=this.getXDateFormat(a,c,e));t&&l&&(b=b.replace("{point.key}","{point.key:"+l+"}"));return F(b,{point:a,series:g})},bodyFormatter:function(a){return k(a,function(a){var b=a.series.tooltipOptions;return(b.pointFormatter||a.point.tooltipFormatter).call(a.point,b.pointFormat)})}}})(K);(function(a){var C=a.addEvent,B=a.attr,E=a.charts,F=a.css,r=a.defined,
k=a.doc,f=a.each,x=a.extend,n=a.fireEvent,u=a.offset,g=a.pick,e=a.removeEvent,p=a.splat,b=a.Tooltip,c=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,c){this.options=c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};b&&c.tooltip.enabled&&(a.tooltip=new b(a,c.tooltip),this.followTouchMove=g(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,c=b.options.chart,l=
c.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(l=g(c.pinchType,l));this.zoomX=a=/x/.test(l);this.zoomY=l=/y/.test(l);this.zoomHor=a&&!b||l&&b;this.zoomVert=l&&!b||a&&b;this.hasZoom=a||l},normalize:function(a,b){var l,e;a=a||c.event;a.target||(a.target=a.srcElement);e=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=u(this.chart.container));void 0===e.pageX?(l=Math.max(a.x,a.clientX-b.left),b=a.y):(l=e.pageX-b.left,b=e.pageY-b.top);return x(a,{chartX:Math.round(l),
chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};f(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getKDPoints:function(a,b,c){var l=[],e,t,z;f(a,function(a){e=a.noSharedTooltip&&b;t=!b&&a.directTouch;a.visible&&!t&&g(a.options.enableMouseTracking,!0)&&(z=a.searchPoint(c,!e&&0>a.options.findNearestPointBy.indexOf("y")))&&z.series&&l.push(z)});l.sort(function(a,c){var q=a.distX-c.distX,l=a.dist-
c.dist,d=(c.series.group&&c.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);return 0!==q&&b?q:0!==l?l:0!==d?d:a.series.index>c.series.index?-1:1});if(b&&l[0]&&!l[0].series.noSharedTooltip)for(a=l.length;a--;)(l[a].x!==l[0].x||l[a].series.noSharedTooltip)&&l.splice(a,1);return l},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,b){var c=a.series,l=c.xAxis,c=c.yAxis;if(l&&c)return b?{chartX:l.len+l.pos-
a.clientX,chartY:c.len+c.pos-a.plotY}:{chartX:a.clientX+l.pos,chartY:a.plotY+c.pos}},getHoverData:function(b,c,e,g,f,k){var l=b,m=c,l=f?e:[m];g=!(!g||!b);c=m&&!m.stickyTracking;var w=function(a,d){return 0===d},q;g?w=function(a){return a===b}:c?w=function(a){return a.series===m}:l=a.grep(e,function(a){return a.stickyTracking});q=g&&!f?[b]:this.getKDPoints(l,f,k);m=(l=a.find(q,w))&&l.series;g||c||!f||(q=this.getKDPoints(e,f,k));q.sort(function(a,d){return a.series.index-d.series.index});return{hoverPoint:l,
hoverSeries:m,hoverPoints:q}},runPointActions:function(b,c){var l=this.chart,e=l.tooltip,z=e?e.shared:!1,p=c||l.hoverPoint,n=p&&p.series||l.hoverSeries;c=this.getHoverData(p,n,l.series,!!c||n&&n.directTouch&&this.isDirectTouch,z,b);var m,w,p=c.hoverPoint;m=(n=c.hoverSeries)&&n.tooltipOptions.followPointer;w=(z=z&&p&&!p.series.noSharedTooltip)?c.hoverPoints:p?[p]:[];if(p&&(p!==l.hoverPoint||e&&e.isHidden)){f(l.hoverPoints||[],function(b){-1===a.inArray(b,w)&&b.setState()});f(w||[],function(a){a.setState("hover")});
if(l.hoverSeries!==n)n.onMouseOver();l.hoverPoint&&l.hoverPoint.firePointEvent("mouseOut");p.firePointEvent("mouseOver");l.hoverPoints=w;l.hoverPoint=p;e&&e.refresh(z?w:p,b)}else m&&e&&!e.isHidden&&(n=e.getAnchor([{}],b),e.updatePosition({plotX:n[0],plotY:n[1]}));this.unDocMouseMove||(this.unDocMouseMove=C(k,"mousemove",function(b){var c=E[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));f(l.axes,function(c){g(c.crosshair.snap,!0)?a.find(w,function(a){return a.series[c.coll]===c})?c.drawCrosshair(b,
p):c.hideCrosshair():c.drawCrosshair(b)})},reset:function(a,b){var c=this.chart,l=c.hoverSeries,e=c.hoverPoint,g=c.hoverPoints,z=c.tooltip,m=z&&z.shared?g:e;a&&m&&f(p(m),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)z&&m&&(z.refresh(m),e&&(e.setState(e.state,!0),f(c.axes,function(a){a.crosshair&&a.drawCrosshair(null,e)})));else{if(e)e.onMouseOut();g&&f(g,function(a){a.setState()});if(l)l.onMouseOut();z&&z.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());
f(c.axes,function(a){a.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a,b){var c=this.chart,e;f(c.series,function(l){e=a||l.getPlotBox();l.xAxis&&l.xAxis.zoomEnabled&&l.group&&(l.group.attr(e),l.markerGroup&&(l.markerGroup.attr(e),l.markerGroup.clip(b?c.clipRect:null)),l.dataLabelsGroup&&l.dataLabelsGroup.attr(e))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;
b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,e=a.chartX,l=a.chartY,g=this.zoomHor,f=this.zoomVert,m=b.plotLeft,w=b.plotTop,q=b.plotWidth,A=b.plotHeight,d,p=this.selectionMarker,h=this.mouseDownX,v=this.mouseDownY,k=c.panKey&&a[c.panKey+"Key"];p&&p.touch||(e<m?e=m:e>m+q&&(e=m+q),l<w?l=w:l>w+A&&(l=w+A),this.hasDragged=Math.sqrt(Math.pow(h-e,2)+Math.pow(v-l,2)),10<this.hasDragged&&(d=b.isInsidePlot(h-m,v-w),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&
d&&!k&&!p&&(this.selectionMarker=p=b.renderer.rect(m,w,g?1:q,f?1:A,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add()),p&&g&&(e-=h,p.attr({width:Math.abs(e),x:(0<e?0:e)+h})),p&&f&&(e=l-v,p.attr({height:Math.abs(e),y:(0<e?0:e)+v})),d&&!p&&c.panning&&b.pan(a,c.panning)))},drop:function(a){var b=this,c=this.chart,e=this.hasPinched;if(this.selectionMarker){var l={originalEvent:a,xAxis:[],yAxis:[]},g=this.selectionMarker,p=g.attr?g.attr("x"):g.x,m=g.attr?g.attr("y"):g.y,w=g.attr?g.attr("width"):
g.width,q=g.attr?g.attr("height"):g.height,A;if(this.hasDragged||e)f(c.axes,function(d){if(d.zoomEnabled&&r(d.min)&&(e||b[{xAxis:"zoomX",yAxis:"zoomY"}[d.coll]])){var c=d.horiz,h="touchend"===a.type?d.minPixelPadding:0,g=d.toValue((c?p:m)+h),c=d.toValue((c?p+w:m+q)-h);l[d.coll].push({axis:d,min:Math.min(g,c),max:Math.max(g,c)});A=!0}}),A&&n(c,"selection",l,function(a){c.zoom(x(a,e?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();e&&this.scaleGroups()}c&&(F(c.container,{cursor:c._cursor}),
c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){E[a.hoverChartIndex]&&E[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition;a=this.normalize(a,c);!c||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-
b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=E[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;r(a.hoverChartIndex)&&E[a.hoverChartIndex]&&E[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=c.index);b=this.normalize(b);b.returnValue=!1;"mousedown"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||
c.openMenu||this.runPointActions(b)},inClass:function(a,b){for(var c;a;){if(c=B(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;this.isDirectTouch=!1;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=
this.chart,c=b.hoverPoint,e=b.plotLeft,l=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(n(c.series,"click",x(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(x(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-e,a.chartY-l)&&n(b,"click",a)))},setDOMEvents:function(){var b=this,c=b.chart.container;c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};
C(c,"mouseleave",b.onContainerMouseLeave);1===a.chartCount&&C(k,"mouseup",b.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},1===a.chartCount&&C(k,"touchend",b.onDocumentTouchEnd))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();e(b.chart.container,"mouseleave",b.onContainerMouseLeave);a.chartCount||(e(k,"mouseup",b.onDocumentMouseUp),e(k,"touchend",b.onDocumentTouchEnd));clearInterval(b.tooltipTimeout);
a.objectEach(b,function(a,c){b[c]=null})}}})(K);(function(a){var C=a.charts,B=a.each,E=a.extend,F=a.map,r=a.noop,k=a.pick;E(a.Pointer.prototype,{pinchTranslate:function(a,k,n,u,g,e){this.zoomHor&&this.pinchTranslateDirection(!0,a,k,n,u,g,e);this.zoomVert&&this.pinchTranslateDirection(!1,a,k,n,u,g,e)},pinchTranslateDirection:function(a,k,n,u,g,e,p,b){var c=this.chart,l=a?"x":"y",f=a?"X":"Y",t="chart"+f,y=a?"width":"height",r=c["plot"+(a?"Left":"Top")],G,D,m=b||1,w=c.inverted,q=c.bounds[a?"h":"v"],
A=1===k.length,d=k[0][t],H=n[0][t],h=!A&&k[1][t],v=!A&&n[1][t],x;n=function(){!A&&20<Math.abs(d-h)&&(m=b||Math.abs(H-v)/Math.abs(d-h));D=(r-H)/m+d;G=c["plot"+(a?"Width":"Height")]/m};n();k=D;k<q.min?(k=q.min,x=!0):k+G>q.max&&(k=q.max-G,x=!0);x?(H-=.8*(H-p[l][0]),A||(v-=.8*(v-p[l][1])),n()):p[l]=[H,v];w||(e[l]=D-r,e[y]=G);e=w?1/m:m;g[y]=G;g[l]=k;u[w?a?"scaleY":"scaleX":"scale"+f]=m;u["translate"+f]=e*r+(H-e*d)},pinch:function(a){var f=this,n=f.chart,u=f.pinchDown,g=a.touches,e=g.length,p=f.lastValidTouch,
b=f.hasZoom,c=f.selectionMarker,l={},z=1===e&&(f.inClass(a.target,"highcharts-tracker")&&n.runTrackerClick||f.runChartClick),t={};1<e&&(f.initiated=!0);b&&f.initiated&&!z&&a.preventDefault();F(g,function(a){return f.normalize(a)});"touchstart"===a.type?(B(g,function(a,b){u[b]={chartX:a.chartX,chartY:a.chartY}}),p.x=[u[0].chartX,u[1]&&u[1].chartX],p.y=[u[0].chartY,u[1]&&u[1].chartY],B(n.axes,function(a){if(a.zoomEnabled){var b=n.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,e=a.toPixels(k(a.options.min,
a.dataMin)),m=a.toPixels(k(a.options.max,a.dataMax)),l=Math.max(e,m);b.min=Math.min(a.pos,Math.min(e,m)-c);b.max=Math.max(a.pos+a.len,l+c)}}),f.res=!0):f.followTouchMove&&1===e?this.runPointActions(f.normalize(a)):u.length&&(c||(f.selectionMarker=c=E({destroy:r,touch:!0},n.plotBox)),f.pinchTranslate(u,g,l,c,t,p),f.hasPinched=b,f.scaleGroups(l,t),f.res&&(f.res=!1,this.reset(!1,0)))},touch:function(f,r){var n=this.chart,u,g;if(n.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});
a.hoverChartIndex=n.index;1===f.touches.length?(f=this.normalize(f),(g=n.isInsidePlot(f.chartX-n.plotLeft,f.chartY-n.plotTop))&&!n.openMenu?(r&&this.runPointActions(f),"touchmove"===f.type&&(r=this.pinchDown,u=r[0]?4<=Math.sqrt(Math.pow(r[0].chartX-f.chartX,2)+Math.pow(r[0].chartY-f.chartY,2)):!1),k(u,!0)&&this.pinch(f)):r&&this.reset()):2===f.touches.length&&this.pinch(f)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(f){C[a.hoverChartIndex]&&
C[a.hoverChartIndex].pointer.drop(f)}})})(K);(function(a){var C=a.addEvent,B=a.charts,E=a.css,F=a.doc,r=a.extend,k=a.noop,f=a.Pointer,x=a.removeEvent,n=a.win,u=a.wrap;if(!a.hasTouch&&(n.PointerEvent||n.MSPointerEvent)){var g={},e=!!n.PointerEvent,p=function(){var b=[];b.item=function(a){return this[a]};a.objectEach(g,function(a){b.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return b},b=function(b,e,g,f){"touch"!==b.pointerType&&b.pointerType!==b.MSPOINTER_TYPE_TOUCH||!B[a.hoverChartIndex]||
(f(b),f=B[a.hoverChartIndex].pointer,f[e]({type:g,target:b.currentTarget,preventDefault:k,touches:p()}))};r(f.prototype,{onContainerPointerDown:function(a){b(a,"onContainerTouchStart","touchstart",function(a){g[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){b(a,"onContainerTouchMove","touchmove",function(a){g[a.pointerId]={pageX:a.pageX,pageY:a.pageY};g[a.pointerId].target||(g[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){b(a,
"onDocumentTouchEnd","touchend",function(a){delete g[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,e?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,e?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(F,e?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});u(f.prototype,"init",function(a,b,e){a.call(this,b,e);this.hasZoom&&E(b.container,{"-ms-touch-action":"none","touch-action":"none"})});u(f.prototype,"setDOMEvents",function(a){a.apply(this);
(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(C)});u(f.prototype,"destroy",function(a){this.batchMSEvents(x);a.call(this)})}})(K);(function(a){var C=a.addEvent,B=a.css,E=a.discardElement,F=a.defined,r=a.each,k=a.isFirefox,f=a.marginNames,x=a.merge,n=a.pick,u=a.setAnimation,g=a.stableSort,e=a.win,p=a.wrap;a.Legend=function(a,c){this.init(a,c)};a.Legend.prototype={init:function(a,c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),C(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},
setOptions:function(a){var b=n(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=n(a.symbolWidth,16);this.pages=[]},update:function(a,c){var b=this.chart;this.setOptions(x(!0,this.options,a));this.destroy();b.isDirtyLegend=b.isDirtyBox=!0;n(c,!0)&&b.redraw()},colorizeItem:function(a,c){a.legendGroup[c?"removeClass":"addClass"]("highcharts-legend-item-hidden")},positionItem:function(a){var b=this.options,
e=b.symbolPadding,b=!b.rtl,g=a._legendItemPos,f=g[0],g=g[1],p=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?f:this.legendWidth-f-2*e-4,g);p&&(p.x=f,p.y=g)},destroyItem:function(a){var b=a.checkbox;r(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&E(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}r(this.getAllItems(),function(b){r(["legendItem","legendGroup"],a,b)});r("clipRect up down pager nav box title group".split(" "),
a,this);this.display=null},positionCheckboxes:function(a){var b=this.group&&this.group.alignAttr,e,g=this.clipHeight||this.legendHeight,f=this.titleHeight;b&&(e=b.translateY,r(this.allItems,function(c){var l=c.checkbox,p;l&&(p=e+f+l.y+(a||0)+3,B(l,{left:b.translateX+c.checkboxOffset+l.x-20+"px",top:p+"px",display:p>e-6&&p<e+g-6?"":"none"}))}))},renderTitle:function(){var a=this.options,c=this.padding,e=a.title,g=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,c-3,c-4,null,null,
null,a.useHTML,null,"legend-title").attr({zIndex:1}).add(this.group)),a=this.title.getBBox(),g=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:g}));this.titleHeight=g},setText:function(b){var c=this.options;b.legendItem.attr({text:c.labelFormat?a.format(c.labelFormat,b):c.labelFormatter.call(b)})},renderItem:function(a){var b=this.chart,e=b.renderer,g=this.options,f="horizontal"===g.layout,p=this.symbolWidth,k=g.symbolPadding,G=this.padding,u=f?n(g.itemDistance,20):0,m=!g.rtl,
w=g.width,q=g.itemMarginBottom||0,A=this.itemMarginTop,d=a.legendItem,H=!a.series,h=!H&&a.series.drawLegendSymbol?a.series:a,v=h.options,r=this.createCheckboxForItem&&v&&v.showCheckbox,v=p+k+u+(r?20:0),J=g.useHTML,x=a.options.className;d||(a.legendGroup=e.g("legend-item").addClass("highcharts-"+h.type+"-series highcharts-color-"+a.colorIndex+(x?" "+x:"")+(H?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=d=e.text("",m?p+k:-k,this.baseline||0,J).attr({align:m?
"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=e.fontMetrics(12,d),this.baseline=this.fontMetrics.f+3+A,d.attr("y",this.baseline)),this.symbolHeight=g.symbolHeight||this.fontMetrics.f,h.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,d,J),r&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);d.css({width:(g.itemWidth||b.spacingBox.width)-v});this.setText(a);e=d.getBBox();p=a.checkboxOffset=g.itemWidth||a.legendItemWidth||e.width+v;this.itemHeight=
e=Math.round(a.legendItemHeight||e.height||this.symbolHeight);f&&this.itemX-G+p>(w||b.spacingBox.width-2*G-g.x)&&(this.itemX=G,this.itemY+=A+this.lastLineHeight+q,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,p);this.lastItemY=A+this.itemY+q;this.lastLineHeight=Math.max(e,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=p:(this.itemY+=A+e+q,this.lastLineHeight=e);this.offsetWidth=w||Math.max((f?this.itemX-G-u:p)+G,this.offsetWidth)},getAllItems:function(){var a=
[];r(this.chart.series,function(b){var c=b&&b.options;b&&n(c.showInLegend,F(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))});return a},adjustMargins:function(a,c){var b=this.chart,e=this.options,g=e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0);e.floating||r([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(l,p){l.test(g)&&!F(a[p])&&(b[f[p]]=Math.max(b[f[p]],b.legend[(p+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][p]*
e[p%2?"x":"y"]+n(e.margin,12)+c[p]))})},render:function(){var a=this,c=a.chart,e=c.renderer,f=a.group,p,k,n,u,D=a.box,m=a.options,w=a.padding;a.itemX=w;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;f||(a.group=f=e.g("legend").attr({zIndex:7}).add(),a.contentGroup=e.g().attr({zIndex:1}).add(f),a.scrollGroup=e.g().add(a.contentGroup));a.renderTitle();p=a.getAllItems();g(p,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});m.reversed&&p.reverse();
a.allItems=p;a.display=k=!!p.length;a.lastLineHeight=0;r(p,function(b){a.renderItem(b)});n=(m.width||a.offsetWidth)+w;u=a.lastItemY+a.lastLineHeight+a.titleHeight;u=a.handleOverflow(u);u+=w;D||(a.box=D=e.rect().addClass("highcharts-legend-box").attr({r:m.borderRadius}).add(f),D.isNew=!0);0<n&&0<u&&(D[D.isNew?"attr":"animate"](D.crisp({x:0,y:0,width:n,height:u},D.strokeWidth())),D.isNew=!1);D[k?"show":"hide"]();"none"===f.getStyle("display")&&(n=u=0);a.legendWidth=n;a.legendHeight=u;r(p,function(b){a.positionItem(b)});
k&&f.align(x(m,{width:n,height:u}),!0,"spacingBox");c.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,e=this.chart,g=e.renderer,f=this.options,p=f.y,k=this.padding,e=e.spacingBox.height+("top"===f.verticalAlign?-p:p)-k,p=f.maxHeight,u,D=this.clipRect,m=f.navigation,w=n(m.animation,!0),q=m.arrowSize||12,A=this.nav,d=this.pages,H,h=this.allItems,v=function(a){"number"===typeof a?D.attr({height:a}):D&&(b.clipRect=D.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=
a?"rect("+k+"px,9999px,"+(k+a)+"px,0)":"auto")};"horizontal"!==f.layout||"middle"===f.verticalAlign||f.floating||(e/=2);p&&(e=Math.min(e,p));d.length=0;a>e&&!1!==m.enabled?(this.clipHeight=u=Math.max(e-20-this.titleHeight-k,0),this.currentPage=n(this.currentPage,1),this.fullHeight=a,r(h,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var e=d.length;if(!e||c-d[e-1]>u&&(H||c)!==d[e-1])d.push(H||c),e++;b===h.length-1&&c+a-d[e-1]>u&&d.push(c);c!==H&&(H=c)}),D||(D=b.clipRect=
g.clipRect(0,k,9999,0),b.contentGroup.clip(D)),v(u),A||(this.nav=A=g.g().attr({zIndex:1}).add(this.group),this.up=g.symbol("triangle",0,0,q,q).on("click",function(){b.scroll(-1,w)}).add(A),this.pager=g.text("",15,10).addClass("highcharts-legend-navigation").add(A),this.down=g.symbol("triangle-down",0,0,q,q).on("click",function(){b.scroll(1,w)}).add(A)),b.scroll(0),a=e):A&&(v(),this.nav=A.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var b=this.pages,
e=b.length;a=this.currentPage+a;var g=this.clipHeight,f=this.pager,p=this.padding;a>e&&(a=e);0<a&&(void 0!==c&&u(c,this.chart),this.nav.attr({translateX:p,translateY:g+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),f.attr({text:a+"/"+e}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===e?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),c=-b[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),
this.currentPage=a,this.positionCheckboxes(c))}};a.LegendSymbolMixin={drawRectangle:function(a,c){var b=a.symbolHeight,e=a.options.squareSymbol;c.legendSymbol=this.chart.renderer.rect(e?(a.symbolWidth-b)/2:0,a.baseline-b+1,e?b:a.symbolWidth,b,n(a.options.symbolRadius,b/2)).addClass("highcharts-point").attr({zIndex:3}).add(c.legendGroup)},drawLineMarker:function(a){var b=this.options.marker,e,g=a.symbolWidth,f=a.symbolHeight;e=f/2;var p=this.chart.renderer,k=this.legendGroup;a=a.baseline-Math.round(.3*
a.fontMetrics.b);this.legendLine=p.path(["M",0,a,"L",g,a]).addClass("highcharts-graph").attr({}).add(k);b&&!1!==b.enabled&&(e=Math.min(n(b.radius,e),e),0===this.symbol.indexOf("url")&&(b=x(b,{width:f,height:f}),e=0),this.legendSymbol=b=p.symbol(this.symbol,g/2-e,a-e,2*e,2*e,b).addClass("highcharts-point").add(k),b.isMarker=!0)}};(/Trident\/7\.0/.test(e.navigator.userAgent)||k)&&p(a.Legend.prototype,"positionItem",function(a,c){var b=this,e=function(){c._legendItemPos&&a.call(b,c)};e();setTimeout(e)})})(K);
(function(a){var C=a.addEvent,B=a.animObject,E=a.attr,F=a.doc,r=a.Axis,k=a.createElement,f=a.defaultOptions,x=a.discardElement,n=a.charts,u=a.defined,g=a.each,e=a.extend,p=a.find,b=a.fireEvent,c=a.getStyle,l=a.grep,z=a.isNumber,t=a.isObject,y=a.isString,I=a.Legend,G=a.marginNames,D=a.merge,m=a.objectEach,w=a.Pointer,q=a.pick,A=a.pInt,d=a.removeEvent,H=a.seriesTypes,h=a.splat,v=a.svg,M=a.syncTimeout,J=a.win,P=a.Renderer,N=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,d,
b){return new N(a,d,b)};e(N.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(y(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(d,b){var h,c,e=d.series,q=d.plotOptions||{};d.series=null;h=D(f,d);for(c in h.plotOptions)h.plotOptions[c].tooltip=q[c]&&D(q[c].tooltip)||void 0;h.tooltip.userOptions=d.chart&&d.chart.forExport&&d.tooltip.userOptions||d.tooltip;h.series=d.series=e;this.userOptions=d;d=h.chart;c=d.events;this.margin=[];this.spacing=
[];this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=h;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var g=this;g.index=n.length;n.push(g);a.chartCount++;c&&m(c,function(a,d){C(g,d,a)});g.xAxis=[];g.yAxis=[];g.pointCount=g.colorCounter=g.symbolCounter=0;g.firstRender()},initSeries:function(d){var b=this.options.chart;(b=H[d.type||b.type||b.defaultSeriesType])||a.error(17,!0);b=new b;b.init(this,d);return b},orderSeries:function(a){var d=this.series;for(a=a||0;a<
d.length;a++)d[a]&&(d[a].index=a,d[a].name=d[a].name||"Series "+(d[a].index+1))},isInsidePlot:function(a,d,b){var h=b?d:a;a=b?a:d;return 0<=h&&h<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(d){var h=this.axes,c=this.series,q=this.pointer,m=this.legend,A=this.isDirtyLegend,v,l,w=this.hasCartesianSeries,f=this.isDirtyBox,p,k=this.renderer,H=k.isHidden(),t=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(d,this);H&&this.temporaryDisplay();this.layOutTitles();for(d=c.length;d--;)if(p=
c[d],p.options.stacking&&(v=!0,p.isDirty)){l=!0;break}if(l)for(d=c.length;d--;)p=c[d],p.options.stacking&&(p.isDirty=!0);g(c,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),A=!0);a.isDirtyData&&b(a,"updatedData")});A&&m.options.enabled&&(m.render(),this.isDirtyLegend=!1);v&&this.getStacks();w&&g(h,function(a){a.updateNames();a.setScale()});this.getMargins();w&&(g(h,function(a){a.isDirty&&(f=!0)}),g(h,function(a){var d=a.min+","+a.max;a.extKey!==d&&(a.extKey=
d,t.push(function(){b(a,"afterSetExtremes",e(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(f||v)&&a.redraw()}));f&&this.drawChartBox();b(this,"predraw");g(c,function(a){(f||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});q&&q.reset(!0);k.draw();b(this,"redraw");b(this,"render");H&&this.temporaryDisplay(!0);g(t,function(a){a.call()})},get:function(a){function d(d){return d.id===a||d.options&&d.options.id===a}var b,h=this.series,c;b=p(this.axes,d)||p(this.series,d);for(c=0;!b&&c<h.length;c++)b=
p(h[c].points||[],d);return b},getAxes:function(){var a=this,d=this.options,b=d.xAxis=h(d.xAxis||{}),d=d.yAxis=h(d.yAxis||{});g(b,function(a,d){a.index=d;a.isX=!0});g(d,function(a,d){a.index=d});b=b.concat(d);g(b,function(d){new r(a,d)})},getSelectedPoints:function(){var a=[];g(this.series,function(d){a=a.concat(l(d.data||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return l(this.series,function(a){return a.selected})},setTitle:function(a,d,b){var h=this,c=h.options,
e;e=c.title=D(c.title,a);c=c.subtitle=D(c.subtitle,d);g([["title",a,e],["subtitle",d,c]],function(a,d){var b=a[0],c=h[b],e=a[1];a=a[2];c&&e&&(h[b]=c=c.destroy());a&&a.text&&!c&&(h[b]=h.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).add(),h[b].update=function(a){h.setTitle(!d&&a,d&&a)})});h.layOutTitles(b)},layOutTitles:function(a){var d=0,b,h=this.renderer,c=this.spacingBox;g(["title","subtitle"],function(a){var b=this[a],q=this.options[a];a="title"===
a?-3:q.verticalAlign?0:d+2;var m;b&&(m=h.fontMetrics(m,b).b,b.css({width:(q.width||c.width+q.widthAdjust)+"px"}).align(e({y:a+m},q),!1,"spacingBox"),q.floating||q.verticalAlign||(d=Math.ceil(d+b.getBBox(q.useHTML).height)))},this);b=this.titleOffset!==d;this.titleOffset=d;!this.isDirtyBox&&b&&(this.isDirtyBox=b,this.hasRendered&&q(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var d=this.options.chart,b=d.width,d=d.height,h=this.renderTo;u(b)||(this.containerWidth=c(h,"width"));u(d)||
(this.containerHeight=c(h,"height"));this.chartWidth=Math.max(0,b||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(d,this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(d){var b=this.renderTo;if(d)for(;b&&b.style;)b.hcOrigStyle&&(a.css(b,b.hcOrigStyle),delete b.hcOrigStyle),b=b.parentNode;else for(;b&&b.style;)"none"===c(b,"display",!1)&&(b.hcOrigStyle={display:b.style.display,height:b.style.height,overflow:b.style.overflow},d={display:"block",overflow:"hidden"},
b!==this.renderTo&&(d.height=0),a.css(b,d),b.style.setProperty&&b.style.setProperty("display","block","important")),b=b.parentNode},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var d,b=this.options,h=b.chart,c,e;d=this.renderTo;var q=a.uniqueKey(),m;d||(this.renderTo=d=h.renderTo);y(d)&&(this.renderTo=d=F.getElementById(d));d||a.error(13,!0);c=A(E(d,"data-highcharts-chart"));z(c)&&n[c]&&n[c].hasRendered&&n[c].destroy();E(d,"data-highcharts-chart",
this.index);d.innerHTML="";h.skipClone||d.offsetWidth||this.temporaryDisplay();this.getChartSize();c=this.chartWidth;e=this.chartHeight;this.container=d=k("div",{id:q},void 0,d);this._cursor=d.style.cursor;this.renderer=new (a[h.renderer]||P)(d,c,e,null,h.forExport,b.exporting&&b.exporting.allowHTML);this.setClassName(h.className);for(m in b.defs)this.renderer.definition(b.defs[m]);this.renderer.chartIndex=this.index},getMargins:function(a){var d=this.spacing,b=this.margin,h=this.titleOffset;this.resetMargins();
h&&!u(b[0])&&(this.plotTop=Math.max(this.plotTop,h+this.options.title.margin+d[0]));this.legend.display&&this.legend.adjustMargins(b,d);this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,d=a.axisOffset=[0,0,0,0],b=a.margin;a.hasCartesianSeries&&g(a.axes,function(a){a.visible&&a.getOffset()});g(G,function(h,c){u(b[c])||(a[h]+=d[c])});
a.setChartSize()},reflow:function(a){var d=this,b=d.options.chart,h=d.renderTo,e=u(b.width),q=b.width||c(h,"width"),b=b.height||c(h,"height"),h=a?a.target:J;if(!e&&!d.isPrinting&&q&&b&&(h===J||h===F)){if(q!==d.containerWidth||b!==d.containerHeight)clearTimeout(d.reflowTimeout),d.reflowTimeout=M(function(){d.container&&d.setSize(void 0,void 0,!1)},a?100:0);d.containerWidth=q;d.containerHeight=b}},initReflow:function(){var a=this,d;d=C(J,"resize",function(d){a.reflow(d)});C(a,"destroy",d)},setSize:function(d,
h,c){var e=this,q=e.renderer;e.isResizing+=1;a.setAnimation(c,e);e.oldChartHeight=e.chartHeight;e.oldChartWidth=e.chartWidth;void 0!==d&&(e.options.chart.width=d);void 0!==h&&(e.options.chart.height=h);e.getChartSize();e.setChartSize(!0);q.setSize(e.chartWidth,e.chartHeight,c);g(e.axes,function(a){a.isDirty=!0;a.setScale()});e.isDirtyLegend=!0;e.isDirtyBox=!0;e.layOutTitles();e.getMargins();e.redraw(c);e.oldChartHeight=null;b(e,"resize");M(function(){e&&b(e,"endResize",null,function(){--e.isResizing})},
B(void 0).duration)},setChartSize:function(a){function d(a){a=A[a]||0;return Math.max(p||a,a)/2}var b=this.inverted,h=this.renderer,c=this.chartWidth,e=this.chartHeight,q=this.options.chart,m=this.spacing,A=this.clipOffset,v,l,f,w,p;this.plotLeft=v=Math.round(this.plotLeft);this.plotTop=l=Math.round(this.plotTop);this.plotWidth=f=Math.max(0,Math.round(c-v-this.marginRight));this.plotHeight=w=Math.max(0,Math.round(e-l-this.marginBottom));this.plotSizeX=b?w:f;this.plotSizeY=b?f:w;this.plotBorderWidth=
q.plotBorderWidth||0;this.spacingBox=h.spacingBox={x:m[3],y:m[0],width:c-m[3]-m[1],height:e-m[0]-m[2]};this.plotBox=h.plotBox={x:v,y:l,width:f,height:w};p=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(d(3));h=Math.ceil(d(0));this.clipBox={x:b,y:h,width:Math.floor(this.plotSizeX-d(1)-b),height:Math.max(0,Math.floor(this.plotSizeY-d(2)-h))};a||g(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this,d=a.options.chart;g(["margin","spacing"],function(b){var h=
d[b],c=t(h)?h:[h,h,h,h];g(["Top","Right","Bottom","Left"],function(h,e){a[b][e]=q(d[b+h],c[e])})});g(G,function(d,b){a[d]=q(a.margin[b],a.spacing[b])});a.axisOffset=[0,0,0,0];a.clipOffset=[]},drawChartBox:function(){var a=this.options.chart,d=this.renderer,b=this.chartWidth,h=this.chartHeight,c=this.chartBackground,e=this.plotBackground,q=this.plotBorder,m,g,A=this.plotLeft,v=this.plotTop,l=this.plotWidth,f=this.plotHeight,w=this.plotBox,p=this.clipRect,k=this.clipBox,H="animate";c||(this.chartBackground=
c=d.rect().addClass("highcharts-background").add(),H="attr");m=g=c.strokeWidth();c[H]({x:g/2,y:g/2,width:b-g-m%2,height:h-g-m%2,r:a.borderRadius});H="animate";e||(H="attr",this.plotBackground=e=d.rect().addClass("highcharts-plot-background").add());e[H](w);p?p.animate({width:k.width,height:k.height}):this.clipRect=d.clipRect(k);H="animate";q||(H="attr",this.plotBorder=q=d.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());q[H](q.crisp({x:A,y:v,width:l,height:f},-q.strokeWidth()));this.isDirtyBox=
!1},propFromSeries:function(){var a=this,d=a.options.chart,b,h=a.options.series,c,e;g(["inverted","angular","polar"],function(q){b=H[d.type||d.defaultSeriesType];e=d[q]||b&&b.prototype[q];for(c=h&&h.length;!e&&c--;)(b=H[h[c].type])&&b.prototype[q]&&(e=!0);a[q]=e})},linkSeries:function(){var a=this,d=a.series;g(d,function(a){a.linkedSeries.length=0});g(d,function(d){var b=d.options.linkedTo;y(b)&&(b=":previous"===b?a.series[d.index-1]:a.get(b))&&b.linkedParent!==d&&(b.linkedSeries.push(d),d.linkedParent=
b,d.visible=q(d.options.visible,b.options.visible,d.visible))})},renderSeries:function(){g(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,d=a.options.labels;d.items&&g(d.items,function(b){var h=e(d.style,b.style),c=A(h.left)+a.plotLeft,q=A(h.top)+a.plotTop+12;delete h.left;delete h.top;a.renderer.text(b.html,c,q).attr({zIndex:2}).css(h).add()})},render:function(){var a=this.axes,d=this.renderer,b=this.options,h,c,e;this.setTitle();this.legend=new I(this,b.legend);
this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();b=this.plotWidth;h=this.plotHeight-=21;g(a,function(a){a.setScale()});this.getAxisMargins();c=1.1<b/this.plotWidth;e=1.05<h/this.plotHeight;if(c||e)g(a,function(a){(a.horiz&&c||!a.horiz&&e)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&g(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=d.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();
this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var d=this;a=D(!0,this.options.credits,a);a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(J.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).add().align(a.position),this.credits.update=function(a){d.credits=d.credits.destroy();d.addCredits(a)})},destroy:function(){var h=this,
c=h.axes,e=h.series,q=h.container,A,v=q&&q.parentNode;b(h,"destroy");h.renderer.forExport?a.erase(n,h):n[h.index]=void 0;a.chartCount--;h.renderTo.removeAttribute("data-highcharts-chart");d(h);for(A=c.length;A--;)c[A]=c[A].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(A=e.length;A--;)e[A]=e[A].destroy();g("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(a){var d=h[a];d&&d.destroy&&(h[a]=d.destroy())});q&&(q.innerHTML="",d(q),v&&x(q));m(h,function(a,d){delete h[d]})},isReadyToRender:function(){var a=this;return v||J!=J.top||"complete"===F.readyState?!0:(F.attachEvent("onreadystatechange",function(){F.detachEvent("onreadystatechange",a.firstRender);"complete"===F.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,d=a.options;if(a.isReadyToRender()){a.getContainer();b(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();
a.getAxes();g(d.series||[],function(d){a.initSeries(d)});a.linkSeries();b(a,"beforeRender");w&&(a.pointer=new w(a,d));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){g([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);b(this,"load");b(this,"render");u(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(K);(function(a){var C,B=a.each,E=a.extend,F=a.erase,r=a.fireEvent,
k=a.format,f=a.isArray,x=a.isNumber,n=a.pick,u=a.removeEvent;a.Point=C=function(){};a.Point.prototype={init:function(a,e,f){var b=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(e,f);a.options.colorByPoint?(e=a.colorCounter,a.colorCounter++,a.colorCounter===b&&(a.colorCounter=0)):e=a.colorIndex;this.colorIndex=n(this.colorIndex,e);a.chart.pointCount++;return this},applyOptions:function(a,e){var g=this.series,b=g.options.pointValKey||g.pointValKey;a=C.prototype.optionsToObject.call(this,
a);E(this,a);this.options=this.options?E(this.options,a):a;a.group&&delete this.group;b&&(this.y=this[b]);this.isNull=n(this.isValid&&!this.isValid(),null===this.x||!x(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===e&&g.xAxis&&g.xAxis.hasNames&&(this.x=g.xAxis.nameToX(this));void 0===this.x&&g&&(this.x=void 0===e?g.autoIncrement(this):e);return this},optionsToObject:function(a){var e={},g=this.series,b=g.options.keys,c=b||g.pointArrayMap||["y"],l=c.length,k=0,t=0;if(x(a)||
null===a)e[c[0]]=a;else if(f(a))for(!b&&a.length>l&&(g=typeof a[0],"string"===g?e.name=a[0]:"number"===g&&(e.x=a[0]),k++);t<l;)b&&void 0===a[k]||(e[c[t]]=a[k]),k++,t++;else"object"===typeof a&&(e=a,a.dataLabels&&(g._hasPointLabels=!0),a.marker&&(g._hasPointMarkers=!0));return e},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+
this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,e=a.zones,a=a.zoneAxis||"y",f=0,b;for(b=e[f];this[a]>=b.value;)b=e[++f];b&&b.color&&!this.options.color&&(this.color=b.color);return b},destroy:function(){var a=this.series.chart,e=a.hoverPoints,f;a.pointCount--;e&&(this.setState(),F(e,this),e.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();
if(this.graphic||this.dataLabel)u(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(f in this)this[f]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],e,f=6;f--;)e=a[f],this[e]&&(this[e]=this[e].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||
this.stackTotal}},tooltipFormatter:function(a){var e=this.series,g=e.tooltipOptions,b=n(g.valueDecimals,""),c=g.valuePrefix||"",l=g.valueSuffix||"";B(e.pointArrayMap||["y"],function(e){e="{point."+e;if(c||l)a=a.replace(e+"}",c+e+"}"+l);a=a.replace(e+"}",e+":,."+b+"f}")});return k(a,{point:this,series:this.series})},firePointEvent:function(a,e,f){var b=this,c=this.series.options;(c.point.events[a]||b.options&&b.options.events&&b.options.events[a])&&this.importEvents();"click"===a&&c.allowPointSelect&&
(f=function(a){b.select&&b.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});r(this,a,e,f)},visible:!0}})(K);(function(a){var C=a.addEvent,B=a.animObject,E=a.arrayMax,F=a.arrayMin,r=a.correctFloat,k=a.Date,f=a.defaultOptions,x=a.defined,n=a.each,u=a.erase,g=a.extend,e=a.fireEvent,p=a.grep,b=a.isArray,c=a.isNumber,l=a.isString,z=a.merge,t=a.objectEach,y=a.pick,I=a.removeEvent,G=a.splat,D=a.SVGElement,m=a.syncTimeout,w=a.win;a.Series=a.seriesType("line",null,{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},
events:{},marker:{radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:a.Point,sorted:!0,
requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var d=this,c,h=a.series,e;d.chart=a;d.options=b=d.setOptions(b);d.linkedSeries=[];d.bindAxes();g(d,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});c=b.events;t(c,function(a,b){C(d,b,a)});if(c&&c.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;d.getColor();d.getSymbol();n(d.parallelArrays,function(a){d[a+
"Data"]=[]});d.setData(b.data,!1);d.isCartesian&&(a.hasCartesianSeries=!0);h.length&&(e=h[h.length-1]);d._i=y(e&&e._i,-1)+1;a.orderSeries(this.insert(h))},insert:function(a){var b=this.options.index,d;if(c(b)){for(d=a.length;d--;)if(b>=y(a[d].options.index,a[d]._i)){a.splice(d+1,0,this);break}-1===d&&a.unshift(this);d+=1}else a.push(this);return y(d,a.length-1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,e;n(b.axisTypes||[],function(h){n(d[h],function(a){e=a.options;if(c[h]===e.index||void 0!==
c[h]&&c[h]===e.id||void 0===c[h]&&0===e.index)b.insert(a.series),b[h]=a,a.isDirty=!0});b[h]||b.optionalAxis===h||a.error(18,!0)})},updateParallelArrays:function(a,b){var d=a.series,e=arguments,h=c(b)?function(h){var c="y"===h&&d.toYData?d.toYData(a):a[h];d[h+"Data"][b]=c}:function(a){Array.prototype[b].apply(d[a+"Data"],Array.prototype.slice.call(e,2))};n(d.parallelArrays,h)},autoIncrement:function(){var a=this.options,b=this.xIncrement,d,c=a.pointIntervalUnit,b=y(b,a.pointStart,0);this.pointInterval=
d=y(this.pointInterval,a.pointInterval,1);c&&(a=new k(b),"day"===c?a=+a[k.hcSetDate](a[k.hcGetDate]()+d):"month"===c?a=+a[k.hcSetMonth](a[k.hcGetMonth]()+d):"year"===c&&(a=+a[k.hcSetFullYear](a[k.hcGetFullYear]()+d)),d=a-b);this.xIncrement=b+d;return b},setOptions:function(a){var b=this.chart,d=b.options,c=d.plotOptions,h=(b.userOptions||{}).plotOptions||{},e=c[this.type];this.userOptions=a;b=z(e,c.series,a);this.tooltipOptions=z(f.tooltip,f.plotOptions.series&&f.plotOptions.series.tooltip,f.plotOptions[this.type].tooltip,
d.tooltip.userOptions,c.series&&c.series.tooltip,c[this.type].tooltip,a.tooltip);this.stickyTracking=y(a.stickyTracking,h[this.type]&&h[this.type].stickyTracking,h.series&&h.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:b.stickyTracking);null===e.marker&&delete b.marker;this.zoneAxis=b.zoneAxis;a=this.zones=(b.zones||[]).slice();!b.negativeColor&&!b.negativeFillColor||b.zones||a.push({value:b[this.zoneAxis+"Threshold"]||b.threshold||0,className:"highcharts-negative"});
a.length&&x(a[a.length-1].value)&&a.push({});return b},getCyclic:function(a,b,d){var c,h=this.chart,e=this.userOptions,q=a+"Index",m=a+"Counter",g=d?d.length:y(h.options.chart[a+"Count"],h[a+"Count"]);b||(c=y(e[q],e["_"+q]),x(c)||(h.series.length||(h[m]=0),e["_"+q]=c=h[m]%g,h[m]+=1),d&&(b=d[c]));void 0!==c&&(this[q]=c);this[a]=b},getColor:function(){this.getCyclic("color")},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,
setData:function(e,m,d,g){var h=this,q=h.points,f=q&&q.length||0,A,w=h.options,k=h.chart,p=null,t=h.xAxis,H=w.turboThreshold,u=this.xData,z=this.yData,G=(A=h.pointArrayMap)&&A.length;e=e||[];A=e.length;m=y(m,!0);if(!1!==g&&A&&f===A&&!h.cropped&&!h.hasGroupedData&&h.visible)n(e,function(a,d){q[d].update&&a!==w.data[d]&&q[d].update(a,!1,null,!1)});else{h.xIncrement=null;h.colorCounter=0;n(this.parallelArrays,function(a){h[a+"Data"].length=0});if(H&&A>H){for(d=0;null===p&&d<A;)p=e[d],d++;if(c(p))for(d=
0;d<A;d++)u[d]=this.autoIncrement(),z[d]=e[d];else if(b(p))if(G)for(d=0;d<A;d++)p=e[d],u[d]=p[0],z[d]=p.slice(1,G+1);else for(d=0;d<A;d++)p=e[d],u[d]=p[0],z[d]=p[1];else a.error(12)}else for(d=0;d<A;d++)void 0!==e[d]&&(p={series:h},h.pointClass.prototype.applyOptions.apply(p,[e[d]]),h.updateParallelArrays(p,d));l(z[0])&&a.error(14,!0);h.data=[];h.options.data=h.userOptions.data=e;for(d=f;d--;)q[d]&&q[d].destroy&&q[d].destroy();t&&(t.minRange=t.userMinRange);h.isDirty=k.isDirtyBox=!0;h.isDirtyData=
!!q;d=!1}"point"===w.legendType&&(this.processData(),this.generatePoints());m&&k.redraw(d)},processData:function(b){var c=this.xData,d=this.yData,e=c.length,h;h=0;var q,m,g=this.xAxis,l,f=this.options;l=f.cropThreshold;var w=this.getExtremesFromAll||f.getExtremesFromAll,p=this.isCartesian,f=g&&g.val2lin,k=g&&g.isLog,t,n;if(p&&!this.isDirty&&!g.isDirty&&!this.yAxis.isDirty&&!b)return!1;g&&(b=g.getExtremes(),t=b.min,n=b.max);if(p&&this.sorted&&!w&&(!l||e>l||this.forceCrop))if(c[e-1]<t||c[0]>n)c=[],
d=[];else if(c[0]<t||c[e-1]>n)h=this.cropData(this.xData,this.yData,t,n),c=h.xData,d=h.yData,h=h.start,q=!0;for(l=c.length||1;--l;)e=k?f(c[l])-f(c[l-1]):c[l]-c[l-1],0<e&&(void 0===m||e<m)?m=e:0>e&&this.requireSorting&&a.error(15);this.cropped=q;this.cropStart=h;this.processedXData=c;this.processedYData=d;this.closestPointRange=m},cropData:function(a,b,d,c){var h=a.length,e=0,q=h,m=y(this.cropShoulder,1),g;for(g=0;g<h;g++)if(a[g]>=d){e=Math.max(0,g-m);break}for(d=g;d<h;d++)if(a[d]>c){q=d+m;break}return{xData:a.slice(e,
q),yData:b.slice(e,q),start:e,end:q}},generatePoints:function(){var a=this.options,b=a.data,d=this.data,c,h=this.processedXData,e=this.processedYData,m=this.pointClass,g=h.length,l=this.cropStart||0,f,w=this.hasGroupedData,a=a.keys,p,k=[],t;d||w||(d=[],d.length=b.length,d=this.data=d);a&&w&&(this.options.keys=!1);for(t=0;t<g;t++)f=l+t,w?(p=(new m).init(this,[h[t]].concat(G(e[t]))),p.dataGroup=this.groupMap[t]):(p=d[f])||void 0===b[f]||(d[f]=p=(new m).init(this,b[f],h[t])),p&&(p.index=f,k[t]=p);this.options.keys=
a;if(d&&(g!==(c=d.length)||w))for(t=0;t<c;t++)t!==l||w||(t+=g),d[t]&&(d[t].destroyElements(),d[t].plotX=void 0);this.data=d;this.points=k},getExtremes:function(a){var e=this.yAxis,d=this.processedXData,q,h=[],m=0;q=this.xAxis.getExtremes();var g=q.min,l=q.max,f,w,p,k;a=a||this.stackedYData||this.processedYData||[];q=a.length;for(k=0;k<q;k++)if(w=d[k],p=a[k],f=(c(p,!0)||b(p))&&(!e.positiveValuesOnly||p.length||0<p),w=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(d[k]||w)>=
g&&(d[k]||w)<=l,f&&w)if(f=p.length)for(;f--;)null!==p[f]&&(h[m++]=p[f]);else h[m++]=p;this.dataMin=F(h);this.dataMax=E(h)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,d=this.xAxis,e=d.categories,h=this.yAxis,m=this.points,g=m.length,l=!!this.modifyValue,f=a.pointPlacement,w="between"===f||c(f),p=a.threshold,k=a.startFromThreshold?p:0,t,n,u,z,G=Number.MAX_VALUE;"between"===f&&(f=.5);c(f)&&(f*=y(a.pointRange||d.pointRange));for(a=
0;a<g;a++){var D=m[a],I=D.x,B=D.y;n=D.low;var C=b&&h.stacks[(this.negStacks&&B<(k?0:p)?"-":"")+this.stackKey],E;h.positiveValuesOnly&&null!==B&&0>=B&&(D.isNull=!0);D.plotX=t=r(Math.min(Math.max(-1E5,d.translate(I,0,0,0,1,f,"flags"===this.type)),1E5));b&&this.visible&&!D.isNull&&C&&C[I]&&(z=this.getStackIndicator(z,I,this.index),E=C[I],B=E.points[z.key],n=B[0],B=B[1],n===k&&z.key===C[I].base&&(n=y(p,h.min)),h.positiveValuesOnly&&0>=n&&(n=null),D.total=D.stackTotal=E.total,D.percentage=E.total&&D.y/
E.total*100,D.stackY=B,E.setOffset(this.pointXOffset||0,this.barW||0));D.yBottom=x(n)?h.translate(n,0,1,0,1):null;l&&(B=this.modifyValue(B,D));D.plotY=n="number"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,h.translate(B,0,1,0,1)),1E5):void 0;D.isInside=void 0!==n&&0<=n&&n<=h.len&&0<=t&&t<=d.len;D.clientX=w?r(d.translate(I,0,0,0,1,f)):t;D.negative=D.y<(p||0);D.category=e&&void 0!==e[D.x]?e[D.x]:D.x;D.isNull||(void 0!==u&&(G=Math.min(G,Math.abs(t-u))),u=t);D.zone=this.zones.length&&D.getZone()}this.closestPointRangePx=
G},getValidPoints:function(a,b){var d=this.chart;return p(a||this.points||[],function(a){return b&&!d.isInsidePlot(a.plotX,a.plotY,d.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,d=this.options,c=b.renderer,h=b.inverted,e=this.clipBox,m=e||b.clipBox,q=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,m.height,d.xAxis,d.yAxis].join(),g=b[q],l=b[q+"m"];g||(a&&(m.width=0,b[q+"m"]=l=c.clipRect(-99,h?-b.plotLeft:-b.plotTop,99,h?b.chartWidth:b.chartHeight)),b[q]=g=c.clipRect(m),
g.count={length:0});a&&!g.count[this.index]&&(g.count[this.index]=!0,g.count.length+=1);!1!==d.clip&&(this.group.clip(a||e?g:b.clipRect),this.markerGroup.clip(l),this.sharedClipKey=q);a||(g.count[this.index]&&(delete g.count[this.index],--g.count.length),0===g.count.length&&q&&b[q]&&(e||(b[q]=b[q].destroy()),b[q+"m"]&&(b[q+"m"]=b[q+"m"].destroy())))},animate:function(a){var b=this.chart,d=B(this.options.animation),c;a?this.setClip(d):(c=this.sharedClipKey,(a=b[c])&&a.animate({width:b.plotSizeX},d),
b[c+"m"]&&b[c+"m"].animate({width:b.plotSizeX+99},d),this.animate=null)},afterAnimate:function(){this.setClip();e(this,"afterAnimate")},drawPoints:function(){var a=this.points,b=this.chart,d,e,h,m,g=this.options.marker,l,f,w,p,k=this[this.specialGroup]||this.markerGroup,t=y(g.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*g.radius);if(!1!==g.enabled||this._hasPointMarkers)for(e=0;e<a.length;e++)h=a[e],d=h.plotY,m=h.graphic,l=h.marker||{},f=!!h.marker,w=t&&void 0===l.enabled||l.enabled,
p=h.isInside,w&&c(d)&&null!==h.y?(d=y(l.symbol,this.symbol),h.hasImage=0===d.indexOf("url"),w=this.markerAttribs(h,h.selected&&"select"),m?m[p?"show":"hide"](!0).animate(w):p&&(0<w.width||h.hasImage)&&(h.graphic=m=b.renderer.symbol(d,w.x,w.y,w.width,w.height,f?l:g).add(k)),m&&m.addClass(h.getClassName(),!0)):m&&(h.graphic=m.destroy())},markerAttribs:function(a,b){var d=this.options.marker,c=a.marker||{},h=y(c.radius,d.radius);b&&(d=d.states[b],b=c.states&&c.states[b],h=y(b&&b.radius,d&&d.radius,h+
(d&&d.radiusPlus||0)));a.hasImage&&(h=0);a={x:Math.floor(a.plotX)-h,y:a.plotY-h};h&&(a.width=a.height=2*h);return a},destroy:function(){var a=this,b=a.chart,d=/AppleWebKit\/533/.test(w.navigator.userAgent),c,h,m=a.data||[],g,l;e(a,"destroy");I(a);n(a.axisTypes||[],function(d){(l=a[d])&&l.series&&(u(l.series,a),l.isDirty=l.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(h=m.length;h--;)(g=m[h])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);t(a,function(a,
b){a instanceof D&&!a.survive&&(c=d&&"group"===b?"hide":"destroy",a[c]())});b.hoverSeries===a&&(b.hoverSeries=null);u(b.series,a);b.orderSeries();t(a,function(d,b){delete a[b]})},getGraphPath:function(a,b,d){var c=this,h=c.options,e=h.step,m,q=[],g=[],l;a=a||c.points;(m=a.reversed)&&a.reverse();(e={right:1,center:2}[e]||e&&3)&&m&&(e=4-e);!h.connectNulls||b||d||(a=this.getValidPoints(a));n(a,function(m,f){var w=m.plotX,p=m.plotY,v=a[f-1];(m.leftCliff||v&&v.rightCliff)&&!d&&(l=!0);m.isNull&&!x(b)&&
0<f?l=!h.connectNulls:m.isNull&&!b?l=!0:(0===f||l?f=["M",m.plotX,m.plotY]:c.getPointSpline?f=c.getPointSpline(a,m,f):e?(f=1===e?["L",v.plotX,p]:2===e?["L",(v.plotX+w)/2,v.plotY,"L",(v.plotX+w)/2,p]:["L",w,v.plotY],f.push("L",w,p)):f=["L",w,p],g.push(m.x),e&&g.push(m.x),q.push.apply(q,f),l=!1)});q.xMap=g;return c.graphPath=q},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph"]];n(this.zones,function(a,b){d.push(["zone-graph-"+b,"highcharts-graph highcharts-zone-graph-"+
b+" "+(a.className||"")])});n(d,function(d,c){c=d[0];var h=a[c];h?(h.endX=b.xMap,h.animate({d:b})):b.length&&(a[c]=a.chart.renderer.path(b).addClass(d[1]).attr({zIndex:1}).add(a.group));h&&(h.startX=b.xMap,h.isArea=b.isArea)})},applyZones:function(){var a=this,b=this.chart,d=b.renderer,c=this.zones,h,e,m=this.clips||[],g,l=this.graph,f=this.area,w=Math.max(b.chartWidth,b.chartHeight),p=this[(this.zoneAxis||"y")+"Axis"],k,t,u=b.inverted,z,D,G,r,x=!1;c.length&&(l||f)&&p&&void 0!==p.min&&(t=p.reversed,
z=p.horiz,l&&l.hide(),f&&f.hide(),k=p.getExtremes(),n(c,function(c,q){h=t?z?b.plotWidth:0:z?0:p.toPixels(k.min);h=Math.min(Math.max(y(e,h),0),w);e=Math.min(Math.max(Math.round(p.toPixels(y(c.value,k.max),!0)),0),w);x&&(h=e=p.toPixels(k.max));D=Math.abs(h-e);G=Math.min(h,e);r=Math.max(h,e);p.isXAxis?(g={x:u?r:G,y:0,width:D,height:w},z||(g.x=b.plotHeight-g.x)):(g={x:0,y:u?r:G,width:w,height:D},z&&(g.y=b.plotWidth-g.y));m[q]?m[q].animate(g):(m[q]=d.clipRect(g),l&&a["zone-graph-"+q].clip(m[q]),f&&a["zone-area-"+
q].clip(m[q]));x=c.value>k.max}),this.clips=m)},invertGroups:function(a){function b(){n(["group","markerGroup"],function(b){d[b]&&(c.renderer.isVML&&d[b].attr({width:d.yAxis.len,height:d.xAxis.len}),d[b].width=d.yAxis.len,d[b].height=d.xAxis.len,d[b].invert(a))})}var d=this,c=d.chart,h;d.xAxis&&(h=C(c,"resize",b),C(d,"destroy",h),b(a),d.invertGroups=b)},plotGroup:function(a,b,d,c,h){var e=this[a],m=!e;m&&(this[a]=e=this.chart.renderer.g().attr({zIndex:c||.1}).add(h));e.addClass("highcharts-"+b+" highcharts-series-"+
this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),!0);e.attr({visibility:d})[m?"attr":"animate"](this.getPlotBox());return e},getPlotBox:function(){var a=this.chart,b=this.xAxis,d=this.yAxis;a.inverted&&(b=d,d=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:d?d.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,d,c=a.options,h=!!a.animate&&b.renderer.isSVG&&B(c.animation).duration,e=a.visible?"inherit":
"hidden",g=c.zIndex,l=a.hasRendered,f=b.seriesGroup,w=b.inverted;d=a.plotGroup("group","series",e,g,f);a.markerGroup=a.plotGroup("markerGroup","markers",e,g,f);h&&a.animate(!0);d.inverted=a.isCartesian?w:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(w);!1===c.clip||a.sharedClipKey||l||d.clip(b.clipRect);h&&a.animate();l||(a.animationTimeout=m(function(){a.afterAnimate()},
h));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,d=this.group,c=this.xAxis,h=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:y(c&&c.left,a.plotLeft),translateY:y(h&&h.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var d=this.xAxis,c=this.yAxis,h=this.chart.inverted;return this.searchKDTree({clientX:h?d.len-a.chartY+
d.pos:a.chartX-d.pos,plotY:h?c.len-a.chartX+c.pos:a.chartY-c.pos},b)},buildKDTree:function(){function a(d,c,e){var h,m;if(m=d&&d.length)return h=b.kdAxisArray[c%e],d.sort(function(a,d){return a[h]-d[h]}),m=Math.floor(m/2),{point:d[m],left:a(d.slice(0,m),c+1,e),right:a(d.slice(m+1),c+1,e)}}this.buildingKdTree=!0;var b=this,d=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;m(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),d,d);b.buildingKdTree=!1},b.options.kdNow?0:1)},
searchKDTree:function(a,b){function d(a,b,g,q){var l=b.point,f=c.kdAxisArray[g%q],w,p,k=l;p=x(a[h])&&x(l[h])?Math.pow(a[h]-l[h],2):null;w=x(a[e])&&x(l[e])?Math.pow(a[e]-l[e],2):null;w=(p||0)+(w||0);l.dist=x(w)?Math.sqrt(w):Number.MAX_VALUE;l.distX=x(p)?Math.sqrt(p):Number.MAX_VALUE;f=a[f]-l[f];w=0>f?"left":"right";p=0>f?"right":"left";b[w]&&(w=d(a,b[w],g+1,q),k=w[m]<k[m]?w:l);b[p]&&Math.sqrt(f*f)<k[m]&&(a=d(a,b[p],g+1,q),k=a[m]<k[m]?a:k);return k}var c=this,h=this.kdAxisArray[0],e=this.kdAxisArray[1],
m=b?"distX":"dist";b=-1<c.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return d(a,this.kdTree,b,b)}})})(K);(function(a){function C(a,e,f,b,c){var g=a.chart.inverted;this.axis=a;this.isNegative=f;this.options=e;this.x=b;this.total=null;this.points={};this.stack=c;this.rightCliff=this.leftCliff=0;this.alignOptions={align:e.align||(g?f?"left":"right":"center"),verticalAlign:e.verticalAlign||(g?"middle":f?"bottom":"top"),y:u(e.y,g?4:f?
14:-6),x:u(e.x,g?f?-6:6:0)};this.textAlign=e.textAlign||(g?f?"right":"left":"center")}var B=a.Axis,E=a.Chart,F=a.correctFloat,r=a.defined,k=a.destroyObjectProperties,f=a.each,x=a.format,n=a.objectEach,u=a.pick;a=a.Series;C.prototype={destroy:function(){k(this,this.axis)},render:function(a){var e=this.options,g=e.format,g=g?x(g,this):e.formatter.call(this);this.label?this.label.attr({text:g,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(g,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,
rotation:e.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,e){var g=this.axis,b=g.chart,c=b.inverted,l=g.reversed,l=this.isNegative&&!l||!this.isNegative&&l,f=g.translate(g.usePercentage?100:this.total,0,0,0,1),g=g.translate(0),g=Math.abs(f-g);a=b.xAxis[0].translate(this.x)+a;var k=b.plotHeight,c={x:c?l?f:f-g:a,y:c?k-a-e:l?k-f-g:k-f,width:c?g:e,height:c?e:g};if(e=this.label)e.align(this.alignOptions,null,c),c=e.alignAttr,e[!1===this.options.crop||b.isInsidePlot(c.x,c.y)?"show":"hide"](!0)}};
E.prototype.getStacks=function(){var a=this;f(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});f(a.series,function(e){!e.options.stacking||!0!==e.visible&&!1!==a.options.chart.ignoreHiddenSeries||(e.stackKey=e.type+u(e.options.stack,""))})};B.prototype.buildStacks=function(){var a=this.series,e,f=u(this.options.reversedStacks,!0),b=a.length,c;if(!this.isXAxis){this.usePercentage=!1;for(c=b;c--;)a[f?c:b-c-1].setStackedPoints();for(c=b;c--;)e=a[f?c:b-c-1],e.setStackCliffs&&
e.setStackCliffs();if(this.usePercentage)for(c=0;c<b;c++)a[c].setPercentStacks()}};B.prototype.renderStackTotals=function(){var a=this.chart,e=a.renderer,f=this.stacks,b=this.stackTotalGroup;b||(this.stackTotalGroup=b=e.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());b.translate(a.plotLeft,a.plotTop);n(f,function(a){n(a,function(a){a.render(b)})})};B.prototype.resetStacks=function(){var a=this,e=a.stacks;a.isXAxis||n(e,function(e){n(e,function(b,c){b.touched<a.stacksTouched?(b.destroy(),
delete e[c]):(b.total=null,b.cum=null)})})};B.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&(a=this.stacks=this.oldStacks),n(a,function(a){n(a,function(a){a.cum=a.total})}))};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,e=this.processedYData,f=[],b=e.length,c=this.options,l=c.threshold,k=c.startFromThreshold?l:0,t=c.stack,c=c.stacking,n=this.stackKey,x="-"+
n,G=this.negStacks,D=this.yAxis,m=D.stacks,w=D.oldStacks,q,A,d,H,h,v,M;D.stacksTouched+=1;for(h=0;h<b;h++)v=a[h],M=e[h],q=this.getStackIndicator(q,v,this.index),H=q.key,d=(A=G&&M<(k?0:l))?x:n,m[d]||(m[d]={}),m[d][v]||(w[d]&&w[d][v]?(m[d][v]=w[d][v],m[d][v].total=null):m[d][v]=new C(D,D.options.stackLabels,A,v,t)),d=m[d][v],null!==M&&(d.points[H]=d.points[this.index]=[u(d.cum,k)],r(d.cum)||(d.base=H),d.touched=D.stacksTouched,0<q.index&&!1===this.singleStacks&&(d.points[H][0]=d.points[this.index+","+
v+",0"][0])),"percent"===c?(A=A?n:x,G&&m[A]&&m[A][v]?(A=m[A][v],d.total=A.total=Math.max(A.total,d.total)+Math.abs(M)||0):d.total=F(d.total+(Math.abs(M)||0))):d.total=F(d.total+(M||0)),d.cum=u(d.cum,k)+(M||0),null!==M&&(d.points[H].push(d.cum),f[h]=d.cum);"percent"===c&&(D.usePercentage=!0);this.stackedYData=f;D.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,e=a.stackKey,k=a.yAxis.stacks,b=a.processedXData,c;f([e,"-"+e],function(e){for(var g=b.length,f,l;g--;)if(f=b[g],c=a.getStackIndicator(c,
f,a.index,e),f=(l=k[e]&&k[e][f])&&l.points[c.key])l=l.total?100/l.total:0,f[0]=F(f[0]*l),f[1]=F(f[1]*l),a.stackedYData[g]=f[1]})};a.prototype.getStackIndicator=function(a,e,f,b){!r(a)||a.x!==e||b&&a.key!==b?a={x:e,index:0,key:b}:a.index++;a.key=[f,e,a.index].join();return a}})(K);(function(a){var C=a.addEvent,B=a.Axis,E=a.createElement,F=a.css,r=a.defined,k=a.each,f=a.erase,x=a.extend,n=a.fireEvent,u=a.inArray,g=a.isNumber,e=a.isObject,p=a.isArray,b=a.merge,c=a.objectEach,l=a.pick,z=a.Point,t=a.Series,
y=a.seriesTypes,I=a.setAnimation,G=a.splat;x(a.Chart.prototype,{addSeries:function(a,b,c){var e,m=this;a&&(b=l(b,!0),n(m,"addSeries",{options:a},function(){e=m.initSeries(a);m.isDirtyLegend=!0;m.linkSeries();b&&m.redraw(c)}));return e},addAxis:function(a,c,e,g){var m=c?"xAxis":"yAxis",d=this.options;a=b(a,{index:this[m].length,isX:c});new B(this,a);d[m]=G(d[m]||{});d[m].push(a);l(e,!0)&&this.redraw(g)},showLoading:function(a){var b=this,c=b.options,e=b.loadingDiv,g=function(){e&&F(e,{left:b.plotLeft+
"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};e||(b.loadingDiv=e=E("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=E("span",{className:"highcharts-loading-inner"},null,e),C(b,"redraw",g));e.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;b.loadingShown=!0;g()},hideLoading:function(){var a=this.loadingDiv;a&&(a.className="highcharts-loading highcharts-loading-hidden");this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),update:function(a,e){var m=this,q={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},f=a.chart,d,p;if(f){b(!0,m.options.chart,f);"className"in f&&m.setClassName(f.className);if("inverted"in f||"polar"in f)m.propFromSeries(),d=!0;"alignTicks"in f&&(d=!0);c(f,function(a,d){-1!==u("chart."+d,m.propsRequireUpdateSeries)&&(p=!0);-1!==u(d,m.propsRequireDirtyBox)&&(m.isDirtyBox=
!0)})}a.plotOptions&&b(!0,this.options.plotOptions,a.plotOptions);c(a,function(a,d){if(m[d]&&"function"===typeof m[d].update)m[d].update(a,!1);else if("function"===typeof m[q[d]])m[q[d]](a);"chart"!==d&&-1!==u(d,m.propsRequireUpdateSeries)&&(p=!0)});k("xAxis yAxis zAxis series colorAxis pane".split(" "),function(d){a[d]&&k(G(a[d]),function(a,b){(b=r(a.id)&&m.get(a.id)||m[d][b])&&b.coll===d&&b.update(a,!1)})});d&&k(m.axes,function(a){a.update({},!1)});p&&k(m.series,function(a){a.update({},!1)});a.loading&&
b(!0,m.options.loading,a.loading);d=f&&f.width;f=f&&f.height;g(d)&&d!==m.chartWidth||g(f)&&f!==m.chartHeight?m.setSize(d,f):l(e,!0)&&m.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});x(z.prototype,{update:function(a,b,c,g){function m(){d.applyOptions(a);null===d.y&&h&&(d.graphic=h.destroy());e(a,!0)&&(h&&h.element&&a&&a.marker&&a.marker.symbol&&(d.graphic=h.destroy()),a&&a.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy()));q=d.index;f.updateParallelArrays(d,q);k.data[q]=e(k.data[q],
!0)||e(a,!0)?d.options:a;f.isDirty=f.isDirtyData=!0;!f.fixedBox&&f.hasCartesianSeries&&(w.isDirtyBox=!0);"point"===k.legendType&&(w.isDirtyLegend=!0);b&&w.redraw(c)}var d=this,f=d.series,h=d.graphic,q,w=f.chart,k=f.options;b=l(b,!0);!1===g?m():d.firePointEvent("update",{options:a},m)},remove:function(a,b){this.series.removePoint(u(this,this.series.data),a,b)}});x(t.prototype,{addPoint:function(a,b,c,e){var m=this.options,d=this.data,g=this.chart,h=this.xAxis,h=h&&h.hasNames&&h.names,f=m.data,q,w,
k=this.xData,p,t;b=l(b,!0);q={series:this};this.pointClass.prototype.applyOptions.apply(q,[a]);t=q.x;p=k.length;if(this.requireSorting&&t<k[p-1])for(w=!0;p&&k[p-1]>t;)p--;this.updateParallelArrays(q,"splice",p,0,0);this.updateParallelArrays(q,p);h&&q.name&&(h[t]=q.name);f.splice(p,0,a);w&&(this.data.splice(p,0,null),this.processData());"point"===m.legendType&&this.generatePoints();c&&(d[0]&&d[0].remove?d[0].remove(!1):(d.shift(),this.updateParallelArrays(q,"shift"),f.shift()));this.isDirtyData=this.isDirty=
!0;b&&g.redraw(e)},removePoint:function(a,b,c){var e=this,m=e.data,d=m[a],g=e.points,h=e.chart,f=function(){g&&g.length===m.length&&g.splice(a,1);m.splice(a,1);e.options.data.splice(a,1);e.updateParallelArrays(d||{series:e},"splice",a,1);d&&d.destroy();e.isDirty=!0;e.isDirtyData=!0;b&&h.redraw()};I(c,h);b=l(b,!0);d?d.firePointEvent("remove",null,f):f()},remove:function(a,b,c){function e(){m.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();l(a,!0)&&d.redraw(b)}var m=this,d=m.chart;!1!==c?n(m,
"remove",null,e):e()},update:function(a,c){var e=this,m=e.chart,g=e.userOptions,d=e.oldType||e.type,f=a.type||g.type||m.options.chart.type,h=y[d].prototype,p=["group","markerGroup","dataLabelsGroup"],t;if(Object.keys&&"data"===Object.keys(a).toString())return this.setData(a.data,c);if(f&&f!==d||void 0!==a.zIndex)p.length=0;k(p,function(a){p[a]=e[a];delete e[a]});a=b(g,{animation:!1,index:e.index,pointStart:e.xData[0]},{data:e.options.data},a);e.remove(!1,null,!1);for(t in h)e[t]=void 0;x(e,y[f||d].prototype);
k(p,function(a){e[a]=p[a]});e.init(m,a);e.oldType=d;m.linkSeries();l(c,!0)&&m.redraw(!1)}});x(B.prototype,{update:function(a,c){var e=this.chart;a=e.options[this.coll][this.options.index]=b(this.userOptions,a);this.destroy(!0);this.init(e,x(a,{events:void 0}));e.isDirtyBox=!0;l(c,!0)&&e.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,e=this.series,g=e.length;g--;)e[g]&&e[g].remove(!1);f(b.axes,this);f(b[c],this);p(b.options[c])?b.options[c].splice(this.options.index,1):delete b.options[c];
k(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;l(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var C=a.each,B=a.map,E=a.pick,F=a.Series,r=a.seriesType;r("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var k=[],f=[],r=this.xAxis,n=this.yAxis,u=n.stacks[this.stackKey],g={},e=this.points,p=this.index,b=n.series,c=b.length,l,z=E(n.options.reversedStacks,
!0)?1:-1,t;if(this.options.stacking){for(t=0;t<e.length;t++)g[e[t].x]=e[t];a.objectEach(u,function(a,b){null!==a.total&&f.push(b)});f.sort(function(a,b){return a-b});l=B(b,function(){return this.visible});C(f,function(a,b){var e=0,y,m;if(g[a]&&!g[a].isNull)k.push(g[a]),C([-1,1],function(e){var q=1===e?"rightNull":"leftNull",k=0,d=u[f[b+e]];if(d)for(t=p;0<=t&&t<c;)y=d.points[t],y||(t===p?g[a][q]=!0:l[t]&&(m=u[a].points[t])&&(k-=m[1]-m[0])),t+=z;g[a][1===e?"rightCliff":"leftCliff"]=k});else{for(t=p;0<=
t&&t<c;){if(y=u[a].points[t]){e=y[1];break}t+=z}e=n.translate(e,0,1,0,1);k.push({isNull:!0,plotX:r.translate(a,0,0,0,1),x:a,plotY:e,yBottom:e})}})}return k},getGraphPath:function(a){var f=F.prototype.getGraphPath,k=this.options,n=k.stacking,u=this.yAxis,g,e,p=[],b=[],c=this.index,l,z=u.stacks[this.stackKey],t=k.threshold,y=u.getThreshold(k.threshold),r,k=k.connectNulls||"percent"===n,G=function(e,m,g){var f=a[e];e=n&&z[f.x].points[c];var k=f[g+"Null"]||0;g=f[g+"Cliff"]||0;var d,w,f=!0;g||k?(d=(k?
e[0]:e[1])+g,w=e[0]+g,f=!!k):!n&&a[m]&&a[m].isNull&&(d=w=t);void 0!==d&&(b.push({plotX:l,plotY:null===d?y:u.getThreshold(d),isNull:f,isCliff:!0}),p.push({plotX:l,plotY:null===w?y:u.getThreshold(w),doCurve:!1}))};a=a||this.points;n&&(a=this.getStackPoints());for(g=0;g<a.length;g++)if(e=a[g].isNull,l=E(a[g].rectPlotX,a[g].plotX),r=E(a[g].yBottom,y),!e||k)k||G(g,g-1,"left"),e&&!n&&k||(b.push(a[g]),p.push({x:g,plotX:l,plotY:r})),k||G(g,g+1,"right");g=f.call(this,b,!0,!0);p.reversed=!0;e=f.call(this,p,
!0,!0);e.length&&(e[0]="L");e=g.concat(e);f=f.call(this,b,!1,k);e.xMap=g.xMap;this.areaPath=e;return f},drawGraph:function(){this.areaPath=[];F.prototype.drawGraph.apply(this);var a=this,f=this.areaPath,r=this.options,n=[["area","highcharts-area"]];C(this.zones,function(a,g){n.push(["zone-area-"+g,"highcharts-area highcharts-zone-area-"+g+" "+a.className])});C(n,function(k){var g=k[0],e=a[g];e?(e.endX=f.xMap,e.animate({d:f})):(e=a[g]=a.chart.renderer.path(f).addClass(k[1]).attr({zIndex:0}).add(a.group),
e.isArea=!0);e.startX=f.xMap;e.shiftUnit=r.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var C=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,E,F){var r=E.plotX,k=E.plotY,f=a[F-1];F=a[F+1];var x,n,u,g;if(f&&!f.isNull&&!1!==f.doCurve&&!E.isCliff&&F&&!F.isNull&&!1!==F.doCurve&&!E.isCliff){a=f.plotY;u=F.plotX;F=F.plotY;var e=0;x=(1.5*r+f.plotX)/2.5;n=(1.5*k+a)/2.5;u=(1.5*r+u)/2.5;g=(1.5*k+F)/2.5;u!==x&&(e=(g-n)*(u-r)/(u-x)+k-g);n+=e;g+=e;n>
a&&n>k?(n=Math.max(a,k),g=2*k-n):n<a&&n<k&&(n=Math.min(a,k),g=2*k-n);g>F&&g>k?(g=Math.max(F,k),n=2*k-g):g<F&&g<k&&(g=Math.min(F,k),n=2*k-g);E.rightContX=u;E.rightContY=g}E=["C",C(f.rightContX,f.plotX),C(f.rightContY,f.plotY),C(x,r),C(n,k),r,k];f.rightContX=f.rightContY=null;return E}})})(K);(function(a){var C=a.seriesTypes.area.prototype,B=a.seriesType;B("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:C.getStackPoints,getGraphPath:C.getGraphPath,setStackCliffs:C.setStackCliffs,drawGraph:C.drawGraph,
drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var C=a.animObject,B=a.each,E=a.extend,F=a.isNumber,r=a.merge,k=a.pick,f=a.Series,x=a.seriesType,n=a.svg;x("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0},{cropShoulder:0,directTouch:!0,
trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){f.prototype.init.apply(this,arguments);var a=this,g=a.chart;g.hasRendered&&B(g.series,function(e){e.type===a.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var a=this,g=a.options,e=a.xAxis,f=a.yAxis,b=e.reversed,c,l={},n=0;!1===g.grouping?n=1:B(a.chart.series,function(b){var e=b.options,m=b.yAxis,g;b.type!==a.type||!b.visible&&a.chart.options.chart.ignoreHiddenSeries||f.len!==m.len||f.pos!==m.pos||(e.stacking?(c=b.stackKey,
void 0===l[c]&&(l[c]=n++),g=l[c]):!1!==e.grouping&&(g=n++),b.columnIndex=g)});var t=Math.min(Math.abs(e.transA)*(e.ordinalSlope||g.pointRange||e.closestPointRange||e.tickInterval||1),e.len),y=t*g.groupPadding,r=(t-2*y)/(n||1),g=Math.min(g.maxPointWidth||e.len,k(g.pointWidth,r*(1-2*g.pointPadding)));a.columnMetrics={width:g,offset:(r-g)/2+(y+((a.columnIndex||0)+(b?1:0))*r-t/2)*(b?-1:1)};return a.columnMetrics},crispCol:function(a,g,e,f){var b=this.chart,c=this.borderWidth,l=-(c%2?.5:0),c=c%2?.5:1;
b.inverted&&b.renderer.isVML&&(c+=1);this.options.crisp&&(e=Math.round(a+e)+l,a=Math.round(a)+l,e-=a);f=Math.round(g+f)+c;l=.5>=Math.abs(g)&&.5<f;g=Math.round(g)+c;f-=g;l&&f&&(--g,f+=1);return{x:a,y:g,width:e,height:f}},translate:function(){var a=this,g=a.chart,e=a.options,p=a.dense=2>a.closestPointRange*a.xAxis.transA,p=a.borderWidth=k(e.borderWidth,p?0:1),b=a.yAxis,c=a.translatedThreshold=b.getThreshold(e.threshold),l=k(e.minPointLength,5),n=a.getColumnMetrics(),t=n.width,y=a.barW=Math.max(t,1+
2*p),r=a.pointXOffset=n.offset;g.inverted&&(c-=.5);e.pointPadding&&(y=Math.ceil(y));f.prototype.translate.apply(a);B(a.points,function(e){var f=k(e.yBottom,c),m=999+Math.abs(f),m=Math.min(Math.max(-m,e.plotY),b.len+m),w=e.plotX+r,q=y,p=Math.min(m,f),d,n=Math.max(m,f)-p;Math.abs(n)<l&&l&&(n=l,d=!b.reversed&&!e.negative||b.reversed&&e.negative,p=Math.abs(p-c)>l?f-l:c-(d?l:0));e.barX=w;e.pointWidth=t;e.tooltipPos=g.inverted?[b.len+b.pos-g.plotLeft-m,a.xAxis.len-w-q/2,n]:[w+q/2,m+b.pos-g.plotTop,n];e.shapeType=
"rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[w,c,q,0]:[w,p,q,n])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,f=this.chart,e=f.renderer,k=a.options.animationLimit||250,b;B(a.points,function(c){var g=c.graphic;if(F(c.plotY)&&null!==c.y){b=c.shapeArgs;if(g)g[f.pointCount<k?"animate":"attr"](r(b));else c.graphic=g=e[c.shapeType](b).add(c.group||
a.group);g.addClass(c.getClassName(),!0)}else g&&(c.graphic=g.destroy())})},animate:function(a){var f=this,e=this.yAxis,k=f.options,b=this.chart.inverted,c={};n&&(a?(c.scaleY=.001,a=Math.min(e.pos+e.len,Math.max(e.pos,e.toPixels(k.threshold))),b?c.translateX=a-e.len:c.translateY=a,f.group.attr(c)):(c[b?"translateX":"translateY"]=e.pos,f.group.animate(c,E(C(f.options.animation),{step:function(a,b){f.group.attr({scaleY:Math.max(.001,b.pos)})}})),f.animate=null))},remove:function(){var a=this,g=a.chart;
g.hasRendered&&B(g.series,function(e){e.type===a.type&&(e.isDirty=!0)});f.prototype.remove.apply(a,arguments)}})})(K);(function(a){a=a.seriesType;a("bar","column",null,{inverted:!0})})(K);(function(a){var C=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cspan class\x3d"highcharts-header"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},
{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&C.prototype.drawGraph.call(this)}})})(K);(function(a){var C=a.pick,B=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,F=this.chart,r=2*(a.slicedOffset||0),k=F.plotWidth-2*r,F=F.plotHeight-2*r,f=a.center,f=[C(f[0],"50%"),C(f[1],"50%"),a.size||"100%",a.innerSize||0],x=Math.min(k,F),n,u;for(n=0;4>n;++n)u=
f[n],a=2>n||2===n&&/%$/.test(u),f[n]=B(u,[k,F,x,f[2]][n])+(a?r:0);f[3]>f[2]&&(f[3]=f[2]);return f}}})(K);(function(a){var C=a.addEvent,B=a.defined,E=a.each,F=a.extend,r=a.inArray,k=a.noop,f=a.pick,x=a.Point,n=a.Series,u=a.seriesType,g=a.setAnimation;u("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,
stickyTracking:!1,tooltip:{followPointer:!0}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var e=this,b=e.points,c=e.startAngleRad;a||(E(b,function(a){var b=a.graphic,f=a.shapeArgs;b&&(b.attr({r:a.startR||e.center[3]/2,start:c,end:c}),b.animate({r:f.r,start:f.start,end:f.end},e.options.animation))}),e.animate=null)},updateTotals:function(){var a,
f=0,b=this.points,c=b.length,g,k=this.options.ignoreHiddenPoint;for(a=0;a<c;a++)g=b[a],f+=k&&!g.visible?0:g.isNull?0:g.y;this.total=f;for(a=0;a<c;a++)g=b[a],g.percentage=0<f&&(g.visible||!k)?g.y/f*100:0,g.total=f},generatePoints:function(){n.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var e=0,b=this.options,c=b.slicedOffset,g=c+(b.borderWidth||0),k,t,n,r=b.startAngle||0,u=this.startAngleRad=Math.PI/180*(r-90),r=(this.endAngleRad=Math.PI/180*
(f(b.endAngle,r+360)-90))-u,D=this.points,m,w=b.dataLabels.distance,b=b.ignoreHiddenPoint,q,A=D.length,d;a||(this.center=a=this.getCenter());this.getX=function(d,b,c){n=Math.asin(Math.min((d-a[1])/(a[2]/2+c.labelDistance),1));return a[0]+(b?-1:1)*Math.cos(n)*(a[2]/2+c.labelDistance)};for(q=0;q<A;q++){d=D[q];d.labelDistance=f(d.options.dataLabels&&d.options.dataLabels.distance,w);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,d.labelDistance);k=u+e*r;if(!b||d.visible)e+=d.percentage/100;t=
u+e*r;d.shapeType="arc";d.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*k)/1E3,end:Math.round(1E3*t)/1E3};n=(t+k)/2;n>1.5*Math.PI?n-=2*Math.PI:n<-Math.PI/2&&(n+=2*Math.PI);d.slicedTranslation={translateX:Math.round(Math.cos(n)*c),translateY:Math.round(Math.sin(n)*c)};t=Math.cos(n)*a[2]/2;m=Math.sin(n)*a[2]/2;d.tooltipPos=[a[0]+.7*t,a[1]+.7*m];d.half=n<-Math.PI/2||n>Math.PI/2?1:0;d.angle=n;k=Math.min(g,d.labelDistance/5);d.labelPos=[a[0]+t+Math.cos(n)*d.labelDistance,a[1]+m+
Math.sin(n)*d.labelDistance,a[0]+t+Math.cos(n)*k,a[1]+m+Math.sin(n)*k,a[0]+t,a[1]+m,0>d.labelDistance?"center":d.half?"right":"left",n]}},drawGraph:null,drawPoints:function(){var a=this,f=a.chart.renderer,b,c,g;E(a.points,function(e){e.isNull||(c=e.graphic,g=e.shapeArgs,b=e.getTranslate(),c?c.setRadialReference(a.center).animate(F(g,b)):(e.graphic=c=f[e.shapeType](g).setRadialReference(a.center).attr(b).add(a.group),e.visible||c.attr({visibility:"hidden"})),c.addClass(e.getClassName()))})},searchPoint:k,
sortByAngle:function(a,f){a.sort(function(a,c){return void 0!==a.angle&&(c.angle-a.angle)*f})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:k},{init:function(){x.prototype.init.apply(this,arguments);var a=this,g;a.name=f(a.name,"Slice");g=function(b){a.slice("select"===b.type)};C(a,"select",g);C(a,"unselect",g);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,g){var b=this,c=b.series,e=c.chart,k=c.options.ignoreHiddenPoint;
g=f(g,k);a!==b.visible&&(b.visible=b.options.visible=a=void 0===a?!b.visible:a,c.options.data[r(b,c.data)]=b.options,E(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a?"show":"hide"](!0)}),b.legendItem&&e.legend.colorizeItem(b,a),a||"hover"!==b.state||b.setState(""),k&&(c.isDirty=!0),g&&e.redraw())},slice:function(a,k,b){var c=this.series;g(b,c.chart);f(k,!0);this.sliced=this.options.sliced=B(a)?a:!this.sliced;c.options.data[r(this,c.data)]=this.options;this.graphic.animate(this.getTranslate())},
getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+a,e.r+a,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}})})(K);(function(a){var C=a.addEvent,B=a.arrayMax,E=a.defined,F=a.each,r=a.extend,k=a.format,f=a.map,x=a.merge,n=a.noop,u=a.pick,g=a.relativeLength,e=a.Series,p=a.seriesTypes,b=a.stableSort;a.distribute=function(a,e){function c(a,
b){return a.target-b.target}var g,l=!0,k=a,p=[],n;n=0;for(g=a.length;g--;)n+=a[g].size;if(n>e){b(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(n=g=0;n<=e;)n+=a[g].size,g++;p=a.splice(g-1,a.length)}b(a,c);for(a=f(a,function(a){return{size:a.size,targets:[a.target]}});l;){for(g=a.length;g--;)l=a[g],n=(Math.min.apply(0,l.targets)+Math.max.apply(0,l.targets))/2,l.pos=Math.min(Math.max(0,n-l.size/2),e-l.size);g=a.length;for(l=!1;g--;)0<g&&a[g-1].pos+a[g-1].size>a[g].pos&&(a[g-1].size+=a[g].size,
a[g-1].targets=a[g-1].targets.concat(a[g].targets),a[g-1].pos+a[g-1].size>e&&(a[g-1].pos=e-a[g-1].size),a.splice(g,1),l=!0)}g=0;F(a,function(a){var b=0;F(a.targets,function(){k[g].pos=a.pos+b;b+=k[g].size;g++})});k.push.apply(k,p);b(k,c)};e.prototype.drawDataLabels=function(){var b=this,e=b.options,g=e.dataLabels,f=b.points,p,n,r=b.hasRendered||0,D,m,w=u(g.defer,!!e.animation),q=b.chart.renderer;if(g.enabled||b._hasPointLabels)b.dlProcessOptions&&b.dlProcessOptions(g),m=b.plotGroup("dataLabelsGroup",
"data-labels",w&&!r?"hidden":"visible",g.zIndex||6),w&&(m.attr({opacity:+r}),r||C(b,"afterAnimate",function(){b.visible&&m.show(!0);m[e.animation?"animate":"attr"]({opacity:1},{duration:200})})),n=g,F(f,function(c){var d,e=c.dataLabel,h,f,l=c.connector,w=!e;p=c.dlOptions||c.options&&c.options.dataLabels;if(d=u(p&&p.enabled,n.enabled)&&null!==c.y)g=x(n,p),h=c.getLabelConfig(),D=g.format?k(g.format,h):g.formatter.call(h,g),h=g.rotation,f={r:g.borderRadius||0,rotation:h,padding:g.padding,zIndex:1},a.objectEach(f,
function(a,d){void 0===a&&delete f[d]});!e||d&&E(D)?d&&E(D)&&(e?f.text=D:(e=c.dataLabel=q[h?"text":"label"](D,0,-9999,g.shape,null,null,g.useHTML,null,"data-label"),e.addClass("highcharts-data-label-color-"+c.colorIndex+" "+(g.className||"")+(g.useHTML?"highcharts-tracker":""))),e.attr(f),e.added||e.add(m),b.alignDataLabel(c,e,g,null,w)):(c.dataLabel=e=e.destroy(),l&&(c.connector=l.destroy()))})};e.prototype.alignDataLabel=function(a,b,e,g,f){var c=this.chart,l=c.inverted,k=u(a.plotX,-9999),m=u(a.plotY,
-9999),w=b.getBBox(),q,p=e.rotation,d=e.align,n=this.visible&&(a.series.forceDL||c.isInsidePlot(k,Math.round(m),l)||g&&c.isInsidePlot(k,l?g.x+1:g.y+g.height-1,l)),h="justify"===u(e.overflow,"justify");if(n&&(q=c.renderer.fontMetrics(void 0,b).b,g=r({x:l?c.plotWidth-m:k,y:Math.round(l?c.plotHeight-k:m),width:0,height:0},g),r(e,{width:w.width,height:w.height}),p?(h=!1,k=c.renderer.rotCorr(q,p),k={x:g.x+e.x+g.width/2+k.x,y:g.y+e.y+{top:0,middle:.5,bottom:1}[e.verticalAlign]*g.height},b[f?"attr":"animate"](k).attr({align:d}),
m=(p+720)%360,m=180<m&&360>m,"left"===d?k.y-=m?w.height:0:"center"===d?(k.x-=w.width/2,k.y-=w.height/2):"right"===d&&(k.x-=w.width,k.y-=m?0:w.height)):(b.align(e,null,g),k=b.alignAttr),h?a.isLabelJustified=this.justifyDataLabel(b,e,k,w,g,f):u(e.crop,!0)&&(n=c.isInsidePlot(k.x,k.y)&&c.isInsidePlot(k.x+w.width,k.y+w.height)),e.shape&&!p))b[f?"attr":"animate"]({anchorX:l?c.plotWidth-a.plotY:a.plotX,anchorY:l?c.plotHeight-a.plotX:a.plotY});n||(b.attr({y:-9999}),b.placed=!1)};e.prototype.justifyDataLabel=
function(a,b,e,g,f,k){var c=this.chart,l=b.align,m=b.verticalAlign,w,q,p=a.box?0:a.padding||0;w=e.x+p;0>w&&("right"===l?b.align="left":b.x=-w,q=!0);w=e.x+g.width-p;w>c.plotWidth&&("left"===l?b.align="right":b.x=c.plotWidth-w,q=!0);w=e.y+p;0>w&&("bottom"===m?b.verticalAlign="top":b.y=-w,q=!0);w=e.y+g.height-p;w>c.plotHeight&&("top"===m?b.verticalAlign="bottom":b.y=c.plotHeight-w,q=!0);q&&(a.placed=!k,a.align(b,null,f));return q};p.pie&&(p.pie.prototype.drawDataLabels=function(){var b=this,g=b.data,
f,k=b.chart,p=b.options.dataLabels,n=u(p.connectorPadding,10),r=u(p.connectorWidth,1),x=k.plotWidth,m=k.plotHeight,w,q=b.center,A=q[2]/2,d=q[1],H,h,v,M,J=[[],[]],P,N,C,Q,O=[0,0,0,0];b.visible&&(p.enabled||b._hasPointLabels)&&(F(g,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),e.prototype.drawDataLabels.apply(b),F(g,function(a){a.dataLabel&&a.visible&&(J[a.half].push(a),a.dataLabel._pos=
null)}),F(J,function(c,e){var g,l,w=c.length,t=[],r;if(w)for(b.sortByAngle(c,e-.5),0<b.maxLabelDistance&&(g=Math.max(0,d-A-b.maxLabelDistance),l=Math.min(d+A+b.maxLabelDistance,k.plotHeight),F(c,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,d-A-a.labelDistance),a.bottom=Math.min(d+A+a.labelDistance,k.plotHeight),r=a.dataLabel.getBBox().height||21,a.positionsIndex=t.push({target:a.labelPos[1]-a.top+r/2,size:r,rank:a.y})-1)}),a.distribute(t,l+r-g)),Q=0;Q<w;Q++)f=c[Q],l=f.positionsIndex,
v=f.labelPos,H=f.dataLabel,C=!1===f.visible?"hidden":"inherit",g=v[1],t&&E(t[l])?void 0===t[l].pos?C="hidden":(M=t[l].size,N=f.top+t[l].pos):N=g,delete f.positionIndex,P=p.justify?q[0]+(e?-1:1)*(A+f.labelDistance):b.getX(N<f.top+2||N>f.bottom-2?g:N,e,f),H._attr={visibility:C,align:v[6]},H._pos={x:P+p.x+({left:n,right:-n}[v[6]]||0),y:N+p.y-10},v.x=P,v.y=N,h=H.getBBox().width,g=null,P-h<n?(g=Math.round(h-P+n),O[3]=Math.max(g,O[3])):P+h>x-n&&(g=Math.round(P+h-x+n),O[1]=Math.max(g,O[1])),0>N-M/2?O[0]=
Math.max(Math.round(-N+M/2),O[0]):N+M/2>m&&(O[2]=Math.max(Math.round(N+M/2-m),O[2])),H.sideOverflow=g}),0===B(O)||this.verifyDataLabelOverflow(O))&&(this.placeDataLabels(),r&&F(this.points,function(a){var d;w=a.connector;if((H=a.dataLabel)&&H._pos&&a.visible&&0<a.labelDistance){C=H._attr.visibility;if(d=!w)a.connector=w=k.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(b.dataLabelsGroup);w[d?"attr":"animate"]({d:b.connectorPath(a.labelPos)});w.attr("visibility",
C)}else w&&(a.connector=w.destroy())}))},p.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return u(this.options.dataLabels.softConnector,!0)?["M",b+("left"===a[6]?5:-5),c,"C",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",b+("left"===a[6]?5:-5),c,"L",a[2],a[3],"L",a[4],a[5]]},p.pie.prototype.placeDataLabels=function(){F(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+
"px",textOverflow:"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999}))},this)},p.pie.prototype.alignDataLabel=n,p.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,e=c.center,f=c.minSize||80,k,p=null!==c.size;p||(null!==e[0]?k=Math.max(b[2]-Math.max(a[1],a[3]),f):(k=Math.max(b[2]-a[1]-a[3],f),b[0]+=(a[3]-a[1])/2),null!==e[1]?k=Math.max(Math.min(k,b[2]-Math.max(a[0],a[2])),f):(k=Math.max(Math.min(k,b[2]-a[0]-
a[2]),f),b[1]+=(a[0]-a[2])/2),k<b[2]?(b[2]=k,b[3]=Math.min(g(c.innerSize||0,k),k),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):p=!0);return p});p.column&&(p.column.prototype.alignDataLabel=function(a,b,g,f,k){var c=this.chart.inverted,l=a.series,p=a.dlBox||a.shapeArgs,m=u(a.below,a.plotY>u(this.translatedThreshold,l.yAxis.len)),w=u(g.inside,!!this.options.stacking);p&&(f=x(p),0>f.y&&(f.height+=f.y,f.y=0),p=f.y+f.height-l.yAxis.len,0<p&&(f.height-=p),c&&(f={x:l.yAxis.len-f.y-f.height,
y:l.xAxis.len-f.x-f.width,width:f.height,height:f.width}),w||(c?(f.x+=m?0:f.width,f.width=0):(f.y+=m?f.height:0,f.height=0)));g.align=u(g.align,!c||w?"center":m?"right":"left");g.verticalAlign=u(g.verticalAlign,c||w?"middle":m?"top":"bottom");e.prototype.alignDataLabel.call(this,a,b,g,f,k);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(K);(function(a){var C=a.Chart,B=a.each,E=a.pick,F=a.addEvent;C.prototype.callbacks.push(function(a){function k(){var f=[];B(a.series||
[],function(a){var k=a.options.dataLabels,r=a.dataLabelCollections||["dataLabel"];(k.enabled||a._hasPointLabels)&&!k.allowOverlap&&a.visible&&B(r,function(g){B(a.points,function(a){a[g]&&(a[g].labelrank=E(a.labelrank,a.shapeArgs&&a.shapeArgs.height),f.push(a[g]))})})});a.hideOverlappingLabels(f)}k();F(a,"redraw",k)});C.prototype.hideOverlappingLabels=function(a){var k=a.length,f,r,n,u,g,e,p,b,c,l=function(a,b,c,e,g,f,m,k){return!(g>a+c||g+m<a||f>b+e||f+k<b)};for(r=0;r<k;r++)if(f=a[r])f.oldOpacity=
f.opacity,f.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(r=0;r<k;r++)for(n=a[r],f=r+1;f<k;++f)if(u=a[f],n&&u&&n!==u&&n.placed&&u.placed&&0!==n.newOpacity&&0!==u.newOpacity&&(g=n.alignAttr,e=u.alignAttr,p=n.parentGroup,b=u.parentGroup,c=2*(n.box?0:n.padding),g=l(g.x+p.translateX,g.y+p.translateY,n.width-c,n.height-c,e.x+b.translateX,e.y+b.translateY,u.width-c,u.height-c)))(n.labelrank<u.labelrank?n:u).newOpacity=0;B(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==
c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(K);(function(a){var C=a.addEvent,B=a.Chart,E=a.createElement,F=a.css,r=a.defaultOptions,k=a.defaultPlotOptions,f=a.each,x=a.extend,n=a.fireEvent,u=a.hasTouch,g=a.inArray,e=a.isObject,p=a.Legend,b=a.merge,c=a.pick,l=a.Point,z=a.Series,t=a.seriesTypes,y=a.svg,I;I=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);
void 0!==c&&(b.isDirectTouch=!0,c.onMouseOver(a))};f(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(f(a.trackerGroups,function(e){if(a[e]&&(a[e].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)}),u))a[e].on("touchstart",c)}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options.trackByArea,c=[].concat(b?a.areaPath:a.graphPath),
e=c.length,g=a.chart,k=g.pointer,d=g.renderer,l=g.options.tooltip.snap,h=a.tracker,p,n=function(){if(g.hoverSeries!==a)a.onMouseOver()},t="rgba(192,192,192,"+(y?.0001:.002)+")";if(e&&!b)for(p=e+1;p--;)"M"===c[p]&&c.splice(p+1,0,c[p+1]-l,c[p+2],"L"),(p&&"M"===c[p]||p===e)&&c.splice(p,0,"L",c[p-2]+l,c[p-1]);h?h.attr({d:c}):a.graph&&(a.tracker=d.path(c).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:t,fill:b?t:"none","stroke-width":a.graph.strokeWidth()+(b?0:2*l),zIndex:2}).add(a.group),
f([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(a){k.onTrackerMouseOut(a)});if(u)a.on("touchstart",n)}))}};t.column&&(t.column.prototype.drawTracker=I.drawTrackerPoint);t.pie&&(t.pie.prototype.drawTracker=I.drawTrackerPoint);t.scatter&&(t.scatter.prototype.drawTracker=I.drawTrackerPoint);x(p.prototype,{setItemEvents:function(a,b,c){var e=this.chart.renderer.boxWrapper,g="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?
b:a.legendGroup).on("mouseover",function(){a.setState("hover");e.addClass(g)}).on("mouseout",function(){e.removeClass(g);a.setState()}).on("click",function(b){var d=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,d):n(a,"legendItemClick",b,d)})},createCheckboxForItem:function(a){a.checkbox=E("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);C(a.checkbox,"click",
function(b){n(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});x(B.prototype,{showResetZoom:function(){var a=this,b=r.lang,c=a.options.chart.resetZoomButton,e=c.theme,g=e.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},e,g&&g.hover).attr({align:c.position.align,title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,f)},zoomOut:function(){var a=
this;n(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,g=this.pointer,k=!1,q;!a||a.resetSelection?f(this.axes,function(a){b=a.zoom()}):f(a.xAxis.concat(a.yAxis),function(a){var d=a.axis;g[d.isXAxis?"zoomX":"zoomY"]&&(b=d.zoom(a.min,a.max),d.displayBtn&&(k=!0))});q=this.resetZoomButton;k&&!q?this.showResetZoom():!k&&e(q)&&(this.resetZoomButton=q.destroy());b&&this.redraw(c(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,
e=c.hoverPoints,g;e&&f(e,function(a){a.setState()});f("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,e=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",h=c[d],f=(b.pointRange||0)/2,m=b.getExtremes(),k=b.toValue(h-e,!0)+f,f=b.toValue(h+b.len-e,!0)-f,q=f<k,h=q?f:k,k=q?k:f,f=Math.min(m.dataMin,b.toValue(b.toPixels(m.min)-b.minPixelPadding)),q=Math.max(m.dataMax,b.toValue(b.toPixels(m.max)+b.minPixelPadding)),l;l=f-h;0<l&&(k+=l,h=f);l=k-q;0<l&&(k=q,h-=l);b.series.length&&h!==
m.min&&k!==m.max&&(b.setExtremes(h,k,!1,!1,{trigger:"pan"}),g=!0);c[d]=e});g&&c.redraw(!1);F(c.container,{cursor:"move"})}});x(l.prototype,{select:function(a,b){var e=this,k=e.series,q=k.chart;a=c(a,!e.selected);e.firePointEvent(a?"select":"unselect",{accumulate:b},function(){e.selected=e.options.selected=a;k.options.data[g(e,k.data)]=e.options;e.setState(a&&"select");b||f(q.getSelectedPoints(),function(a){a.selected&&a!==e&&(a.selected=a.options.selected=!1,k.options.data[g(a,k.data)]=a.options,
a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series.chart,c=b.pointer;a=a?c.normalize(a):c.getChartCoordinatesFromPoint(this,b.inverted);c.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");f(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var c=this,e=b(c.series.options.point,c.options).events;c.events=e;a.objectEach(e,function(a,
b){C(c,b,a)});this.hasImportedEvents=!0}},setState:function(a,b){var e=Math.floor(this.plotX),g=this.plotY,f=this.series,l=f.options.states[a]||{},d=k[f.type].marker&&f.options.marker,p=d&&!1===d.enabled,h=d&&d.states&&d.states[a]||{},n=!1===h.enabled,t=f.stateMarkerGraphic,r=this.marker||{},u=f.chart,y=f.halo,z,x=d&&f.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===l.enabled||a&&(n||p&&!1===h.enabled)||a&&r.states&&r.states[a]&&!1===r.states[a].enabled)){x&&(z=f.markerAttribs(this,
a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),z&&this.graphic.animate(z,c(u.options.chart.animation,h.animation,d.animation)),t&&t.hide();else{if(a&&h)if(d=r.symbol||f.symbol,t&&t.currentSymbol!==d&&(t=t.destroy()),t)t[b?"animate":"attr"]({x:z.x,y:z.y});else d&&(f.stateMarkerGraphic=t=u.renderer.symbol(d,z.x,z.y,z.width,z.height).add(f.markerGroup),t.currentSymbol=d);t&&(t[a&&u.isInsidePlot(e,g,u.inverted)?
"show":"hide"](),t.element.point=this)}(e=l.halo)&&e.size?(y||(f.halo=y=u.renderer.path().add((this.graphic||t).parentGroup)),y[b?"animate":"attr"]({d:this.haloPath(e.size)}),y.attr({"class":"highcharts-halo highcharts-color-"+c(this.colorIndex,f.colorIndex)}),y.point=this):y&&y.point&&y.point.haloPath&&y.animate({d:y.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});x(z.prototype,{onMouseOver:function(){var a=
this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&n(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,e=b.hoverPoint;b.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&n(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this;a=a||"";b.state!==a&&(f([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&
(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a)},setVisible:function(a,b){var c=this,e=c.chart,g=c.legendItem,k,d=e.options.chart.ignoreHiddenSeries,l=c.visible;k=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!l:a)?"show":"hide";f(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][k]()});if(e.hoverSeries===c||(e.hoverPoint&&e.hoverPoint.series)===c)c.onMouseOut();g&&e.legend.colorizeItem(c,a);
c.isDirty=!0;c.options.stacking&&f(e.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});f(c.linkedSeries,function(b){b.setVisible(a,!1)});d&&(e.isDirtyBox=!0);!1!==b&&e.redraw();n(c,k)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);n(this,a?"select":"unselect")},drawTracker:I.drawTrackerGraph})})(K);(function(a){var C=a.Chart,B=a.each,E=a.inArray,F=a.isArray,
r=a.isObject,k=a.pick,f=a.splat;C.prototype.setResponsive=function(f){var k=this.options.responsive,r=[],g=this.currentResponsive;k&&k.rules&&B(k.rules,function(e){void 0===e._id&&(e._id=a.uniqueKey());this.matchResponsiveRule(e,r,f)},this);var e=a.merge.apply(0,a.map(r,function(e){return a.find(k.rules,function(a){return a._id===e}).chartOptions})),r=r.toString()||void 0;r!==(g&&g.ruleIds)&&(g&&this.update(g.undoOptions,f),r?(this.currentResponsive={ruleIds:r,mergedOptions:e,undoOptions:this.currentOptions(e)},
this.update(e,f)):this.currentResponsive=void 0)};C.prototype.matchResponsiveRule=function(a,f){var n=a.condition;(n.callback||function(){return this.chartWidth<=k(n.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=k(n.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=k(n.minWidth,0)&&this.chartHeight>=k(n.minHeight,0)}).call(this)&&f.push(a._id)};C.prototype.currentOptions=function(k){function n(g,e,k,b){var c;a.objectEach(g,function(a,p){if(!b&&-1<E(p,["series","xAxis","yAxis"]))for(g[p]=f(g[p]),k[p]=
[],c=0;c<g[p].length;c++)e[p][c]&&(k[p][c]={},n(a[c],e[p][c],k[p][c],b+1));else r(a)?(k[p]=F(a)?[]:{},n(a,e[p]||{},k[p],b+1)):k[p]=e[p]||null})}var u={};n(k,this.options,u,0);return u}})(K);(function(a){var C=a.addEvent,B=a.Axis,E=a.Chart,F=a.css,r=a.dateFormat,k=a.defined,f=a.each,x=a.extend,n=a.noop,u=a.timeUnits,g=a.wrap;g(a.Series.prototype,"init",function(a){var e;a.apply(this,Array.prototype.slice.call(arguments,1));(e=this.xAxis)&&e.options.ordinal&&C(this,"updatedData",function(){delete e.ordinalIndex})});
g(B.prototype,"getTimeTicks",function(a,g,b,c,f,n,t,y){var e=0,l,p,m={},w,q,A,d=[],H=-Number.MAX_VALUE,h=this.options.tickPixelInterval;if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===b)return a.call(this,g,b,c,f);q=n.length;for(l=0;l<q;l++){A=l&&n[l-1]>c;n[l]<b&&(e=l);if(l===q-1||n[l+1]-n[l]>5*t||A){if(n[l]>H){for(p=a.call(this,g,n[e],n[l],f);p.length&&p[0]<=H;)p.shift();p.length&&(H=p[p.length-1]);d=d.concat(p)}e=l+1}if(A)break}a=p.info;if(y&&a.unitRange<=u.hour){l=d.length-
1;for(e=1;e<l;e++)r("%d",d[e])!==r("%d",d[e-1])&&(m[d[e]]="day",w=!0);w&&(m[d[0]]="day");a.higherRanks=m}d.info=a;if(y&&k(h)){y=a=d.length;l=[];var v;for(w=[];y--;)e=this.translate(d[y]),v&&(w[y]=v-e),l[y]=v=e;w.sort();w=w[Math.floor(w.length/2)];w<.6*h&&(w=null);y=d[a-1]>c?a-1:a;for(v=void 0;y--;)e=l[y],c=Math.abs(v-e),v&&c<.8*h&&(null===w||c<.8*w)?(m[d[y]]&&!m[d[y+1]]?(c=y+1,v=e):c=y,d.splice(c,1)):v=e}return d});x(B.prototype,{beforeSetTickPositions:function(){var a,g=[],b=!1,c,k=this.getExtremes(),
n=k.min,t=k.max,r,u=this.isXAxis&&!!this.options.breaks,k=this.options.ordinal,x=this.chart.options.chart.ignoreHiddenSeries;if(k||u){f(this.series,function(b,c){if(!(x&&!1===b.visible||!1===b.takeOrdinalPosition&&!u)&&(g=g.concat(b.processedXData),a=g.length,g.sort(function(a,b){return a-b}),a))for(c=a-1;c--;)g[c]===g[c+1]&&g.splice(c,1)});a=g.length;if(2<a){c=g[1]-g[0];for(r=a-1;r--&&!b;)g[r+1]-g[r]!==c&&(b=!0);!this.options.keepOrdinalPadding&&(g[0]-n>c||t-g[g.length-1]>c)&&(b=!0)}b?(this.ordinalPositions=
g,c=this.ordinal2lin(Math.max(n,g[0]),!0),r=Math.max(this.ordinal2lin(Math.min(t,g[g.length-1]),!0),1),this.ordinalSlope=t=(t-n)/(r-c),this.ordinalOffset=n-c*t):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=k&&b;this.groupIntervalFactor=null},val2lin:function(a,g){var b=this.ordinalPositions;if(b){var c=b.length,e,f;for(e=c;e--;)if(b[e]===a){f=e;break}for(e=c-1;e--;)if(a>b[e]||0===e){a=(a-b[e])/(b[e+1]-b[e]);f=e+a;break}g=g?f:this.ordinalSlope*(f||0)+this.ordinalOffset}else g=
a;return g},lin2val:function(a,g){var b=this.ordinalPositions;if(b){var c=this.ordinalSlope,e=this.ordinalOffset,f=b.length-1,k;if(g)0>a?a=b[0]:a>f?a=b[f]:(f=Math.floor(a),k=a-f);else for(;f--;)if(g=c*f+e,a>=g){c=c*(f+1)+e;k=(a-g)/(c-g);break}return void 0!==k&&void 0!==b[f]?b[f]+(k?k*(b[f+1]-b[f]):0):a}return a},getExtendedPositions:function(){var a=this.chart,g=this.series[0].currentDataGrouping,b=this.ordinalIndex,c=g?g.count+g.unitName:"raw",k=this.getExtremes(),r,t;b||(b=this.ordinalIndex={});
b[c]||(r={series:[],chart:a,getExtremes:function(){return{min:k.dataMin,max:k.dataMax}},options:{ordinal:!0},val2lin:B.prototype.val2lin,ordinal2lin:B.prototype.ordinal2lin},f(this.series,function(b){t={xAxis:r,xData:b.xData,chart:a,destroyGroupedData:n};t.options={dataGrouping:g?{enabled:!0,forced:!0,approximation:"open",units:[[g.unitName,[g.count]]]}:{enabled:!1}};b.processData.apply(t);r.series.push(t)}),this.beforeSetTickPositions.apply(r),b[c]=r.ordinalPositions);return b[c]},getGroupIntervalFactor:function(a,
g,b){var c;b=b.processedXData;var e=b.length,f=[];c=this.groupIntervalFactor;if(!c){for(c=0;c<e-1;c++)f[c]=b[c+1]-b[c];f.sort(function(a,b){return a-b});f=f[Math.floor(e/2)];a=Math.max(a,b[0]);g=Math.min(g,b[e-1]);this.groupIntervalFactor=c=e*f/(g-a)}return c},postProcessTickInterval:function(a){var e=this.ordinalSlope;return e?this.options.breaks?this.closestPointRange:a/(e/this.closestPointRange):a}});B.prototype.ordinal2lin=B.prototype.val2lin;g(E.prototype,"pan",function(a,g){var b=this.xAxis[0],
c=g.chartX,e=!1;if(b.options.ordinal&&b.series.length){var k=this.mouseDownX,p=b.getExtremes(),n=p.dataMax,r=p.min,u=p.max,x=this.hoverPoints,m=b.closestPointRange,k=(k-c)/(b.translationSlope*(b.ordinalSlope||m)),w={ordinalPositions:b.getExtendedPositions()},m=b.lin2val,q=b.val2lin,A;w.ordinalPositions?1<Math.abs(k)&&(x&&f(x,function(a){a.setState()}),0>k?(x=w,A=b.ordinalPositions?b:w):(x=b.ordinalPositions?b:w,A=w),w=A.ordinalPositions,n>w[w.length-1]&&w.push(n),this.fixedRange=u-r,k=b.toFixedRange(null,
null,m.apply(x,[q.apply(x,[r,!0])+k,!0]),m.apply(A,[q.apply(A,[u,!0])+k,!0])),k.min>=Math.min(p.dataMin,r)&&k.max<=Math.max(n,u)&&b.setExtremes(k.min,k.max,!0,!1,{trigger:"pan"}),this.mouseDownX=c,F(this.container,{cursor:"move"})):e=!0}else e=!0;e&&a.apply(this,Array.prototype.slice.call(arguments,1))})})(K);(function(a){function C(){return Array.prototype.slice.call(arguments,1)}function B(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,E(this.pointArrayMap,["y"]))}
var E=a.pick,F=a.wrap,r=a.each,k=a.extend,f=a.isArray,x=a.fireEvent,n=a.Axis,u=a.Series;k(n.prototype,{isInBreak:function(a,e){var g=a.repeat||Infinity,b=a.from,c=a.to-a.from;e=e>=b?(e-b)%g:g-(b-e)%g;return a.inclusive?e<=c:e<c&&0!==e},isInAnyBreak:function(a,e){var g=this.options.breaks,b=g&&g.length,c,f,k;if(b){for(;b--;)this.isInBreak(g[b],a)&&(c=!0,f||(f=E(g[b].showPoints,this.isXAxis?!1:!0)));k=c&&e?c&&!f:c}return k}});F(n.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,
1));if(this.options.breaks){var e=this.tickPositions,g=this.tickPositions.info,b=[],c;for(c=0;c<e.length;c++)this.isInAnyBreak(e[c])||b.push(e[c]);this.tickPositions=b;this.tickPositions.info=g}});F(n.prototype,"init",function(a,e,k){var b=this;k.breaks&&k.breaks.length&&(k.ordinal=!1);a.call(this,e,k);a=this.options.breaks;b.isBroken=f(a)&&!!a.length;b.isBroken&&(b.val2lin=function(a){var c=a,e,g;for(g=0;g<b.breakArray.length;g++)if(e=b.breakArray[g],e.to<=a)c-=e.len;else if(e.from>=a)break;else if(b.isInBreak(e,
a)){c-=a-e.from;break}return c},b.lin2val=function(a){var c,e;for(e=0;e<b.breakArray.length&&!(c=b.breakArray[e],c.from>=a);e++)c.to<a?a+=c.len:b.isInBreak(c,a)&&(a+=c.len);return a},b.setExtremes=function(a,b,e,g,f){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange;n.prototype.setExtremes.call(this,a,b,e,g,f)},b.setAxisTranslation=function(a){n.prototype.setAxisTranslation.call(this,a);a=b.options.breaks;var c=[],e=[],g=0,f,k,p=b.userMin||b.min,
u=b.userMax||b.max,m=E(b.pointRangePadding,0),w,q;r(a,function(a){k=a.repeat||Infinity;b.isInBreak(a,p)&&(p+=a.to%k-p%k);b.isInBreak(a,u)&&(u-=u%k-a.from%k)});r(a,function(a){w=a.from;for(k=a.repeat||Infinity;w-k>p;)w-=k;for(;w<p;)w+=k;for(q=w;q<u;q+=k)c.push({value:q,move:"in"}),c.push({value:q+(a.to-a.from),move:"out",size:a.breakSize})});c.sort(function(a,b){return a.value===b.value?("in"===a.move?0:1)-("in"===b.move?0:1):a.value-b.value});f=0;w=p;r(c,function(a){f+="in"===a.move?1:-1;1===f&&"in"===
a.move&&(w=a.value);0===f&&(e.push({from:w,to:a.value,len:a.value-w-(a.size||0)}),g+=a.value-w-(a.size||0))});b.breakArray=e;b.unitLength=u-p-g+m;x(b,"afterBreaks");b.options.staticScale?b.transA=b.options.staticScale:b.unitLength&&(b.transA*=(u-b.min+m)/b.unitLength);m&&(b.minPixelPadding=b.transA*b.minPointOffset);b.min=p;b.max=u})});F(u.prototype,"generatePoints",function(a){a.apply(this,C(arguments));var e=this.xAxis,g=this.yAxis,b=this.points,c,f=b.length,k=this.options.connectNulls,n;if(e&&
g&&(e.options.breaks||g.options.breaks))for(;f--;)c=b[f],n=null===c.y&&!1===k,n||!e.isInAnyBreak(c.x,!0)&&!g.isInAnyBreak(c.y,!0)||(b.splice(f,1),this.data[f]&&this.data[f].destroyElements())});a.Series.prototype.drawBreaks=function(a,e){var g=this,b=g.points,c,f,k,n;a&&r(e,function(e){c=a.breakArray||[];f=a.isXAxis?a.min:E(g.options.threshold,a.min);r(b,function(b){n=E(b["stack"+e.toUpperCase()],b[e]);r(c,function(c){k=!1;if(f<c.from&&n>c.to||f>c.from&&n<c.from)k="pointBreak";else if(f<c.from&&n>
c.from&&n<c.to||f>c.from&&n>c.to&&n<c.from)k="pointInBreak";k&&x(a,k,{point:b,brk:c})})})})};a.Series.prototype.gappedPath=function(){var a=this.options.gapSize,e=this.points.slice(),f=e.length-1;if(a&&0<f)for(;f--;)e[f+1].x-e[f].x>this.closestPointRange*a&&e.splice(f+1,0,{isNull:!0});return this.getGraphPath(e)};F(a.seriesTypes.column.prototype,"drawPoints",B);F(a.Series.prototype,"drawPoints",B)})(K);(function(a){var C=a.arrayMax,B=a.arrayMin,E=a.Axis,F=a.defaultPlotOptions,r=a.defined,k=a.each,
f=a.extend,x=a.format,n=a.isNumber,u=a.merge,g=a.pick,e=a.Point,p=a.Tooltip,b=a.wrap,c=a.Series.prototype,l=c.processData,z=c.generatePoints,t=c.destroy,y={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"]}},I={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}},G=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]],D={sum:function(a){var b=a.length,c;if(!b&&a.hasNulls)c=null;else if(b)for(c=0;b--;)c+=a[b];return c},average:function(a){var b=a.length;a=D.sum(a);n(a)&&b&&(a/=b);return a},averages:function(){var a=[];k(arguments,function(b){a.push(D.average(b))});return a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?
C(a):a.hasNulls?null:void 0},low:function(a){return a.length?B(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,c,e){a=D.open(a);b=D.high(b);c=D.low(c);e=D.close(e);if(n(a)||n(b)||n(c)||n(e))return[a,b,c,e]},range:function(a,b){a=D.low(a);b=D.high(b);if(n(a)||n(b))return[a,b];if(null===a&&null===b)return null}};c.groupData=function(a,b,c,e){var d=this.data,g=this.options.data,h=[],f=[],m=[],q=a.length,l,p,w=!!b,r=[];e="function"===
typeof e?e:D[e]||I[this.type]&&D[I[this.type].approximation]||D[y.approximation];var t=this.pointArrayMap,u=t&&t.length,A=0;p=0;var x,z;u?k(t,function(){r.push([])}):r.push([]);x=u||1;for(z=0;z<=q&&!(a[z]>=c[0]);z++);for(z;z<=q;z++){for(;void 0!==c[A+1]&&a[z]>=c[A+1]||z===q;){l=c[A];this.dataGroupInfo={start:p,length:r[0].length};p=e.apply(this,r);void 0!==p&&(h.push(l),f.push(p),m.push(this.dataGroupInfo));p=z;for(l=0;l<x;l++)r[l].length=0,r[l].hasNulls=!1;A+=1;if(z===q)break}if(z===q)break;if(t){l=
this.cropStart+z;var B=d&&d[l]||this.pointClass.prototype.applyOptions.apply({series:this},[g[l]]),G;for(l=0;l<u;l++)G=B[t[l]],n(G)?r[l].push(G):null===G&&(r[l].hasNulls=!0)}else l=w?b[z]:null,n(l)?r[0].push(l):null===l&&(r[0].hasNulls=!0)}return[h,f,m]};c.processData=function(){var a=this.chart,b=this.options.dataGrouping,e=!1!==this.allowDG&&b&&g(b.enabled,a.options.isStock),f=this.visible||!a.options.chart.ignoreHiddenSeries,d;this.forceCrop=e;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==
l.apply(this,arguments)&&e){this.destroyGroupedData();var k=this.processedXData,h=this.processedYData,n=a.plotSizeX,a=this.xAxis,p=a.options.ordinal,t=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();if(t){this.isDirty=d=!0;this.points=null;var u=a.getExtremes(),e=u.min,u=u.max,p=p&&a.getGroupIntervalFactor(e,u,this)||1,n=t*(u-e)/n*p,t=a.getTimeTicks(a.normalizeTimeTickInterval(n,b.units||G),Math.min(e,k[0]),Math.max(u,k[k.length-1]),a.options.startOfWeek,k,this.closestPointRange),
k=c.groupData.apply(this,[k,h,t,b.approximation]),h=k[0],p=k[1];if(b.smoothed){b=h.length-1;for(h[b]=Math.min(h[b],u);b--&&0<b;)h[b]+=n/2;h[0]=Math.max(h[0],e)}this.currentDataGrouping=t.info;this.closestPointRange=t.info.totalRange;this.groupMap=k[2];r(h[0])&&h[0]<a.dataMin&&f&&(a.min===a.dataMin&&(a.min=h[0]),a.dataMin=h[0]);this.processedXData=h;this.processedYData=p}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=d}};c.destroyGroupedData=function(){var a=this.groupedData;
k(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};c.generatePoints=function(){z.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};b(e.prototype,"update",function(b){this.dataGroup?a.error(24):b.apply(this,[].slice.call(arguments,1))});b(p.prototype,"tooltipFooterHeaderFormatter",function(b,c,e){var g=c.series,d=g.tooltipOptions,k=g.options.dataGrouping,h=d.xDateFormat,m,q=g.xAxis,l=a.dateFormat;return q&&"datetime"===q.options.type&&
k&&n(c.key)?(b=g.currentDataGrouping,k=k.dateTimeLabelFormats,b?(q=k[b.unitName],1===b.count?h=q[0]:(h=q[1],m=q[2])):!h&&k&&(h=this.getXDateFormat(c,d,q)),h=l(h,c.key),m&&(h+=l(m,c.key+b.totalRange-1)),x(d[(e?"footer":"header")+"Format"],{point:f(c.point,{key:h}),series:g})):b.call(this,c,e)});c.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();t.apply(this)};b(c,"setOptions",function(a,b){a=a.call(this,b);var c=this.type,e=this.chart.options.plotOptions,d=F[c].dataGrouping;
I[c]&&(d||(d=u(y,I[c])),a.dataGrouping=u(d,e.series&&e.series.dataGrouping,e[c].dataGrouping,b.dataGrouping));this.chart.options.isStock&&(this.requireSorting=!0);return a});b(E.prototype,"setScale",function(a){a.call(this);k(this.series,function(a){a.hasProcessed=!1})});E.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,e=0,d=!1,g;for(c=b;c--;)(g=a[c].options.dataGrouping)&&(e=Math.max(e,g.groupPixelWidth));for(c=b;c--;)(g=a[c].options.dataGrouping)&&a[c].hasProcessed&&(b=(a[c].processedXData||
a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/e||b&&g.forced)&&(d=!0);return d?e:0};E.prototype.setDataGrouping=function(a,b){var c;b=g(b,!0);a||(a={forced:!1,units:null});if(this instanceof E)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else k(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(K);(function(a){var C=a.each,B=a.Point,E=a.seriesType,F=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},{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,k=a.yAxis,f=!!a.modifyValue,x=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];F.column.prototype.translate.apply(a);C(a.points,function(n){C([n.open,n.high,n.low,n.close,n.low],function(r,g){null!==r&&(f&&(r=a.modifyValue(r)),n[x[g]]=k.toPixels(r,!0))});n.tooltipPos[1]=n.plotHigh+k.pos-a.chart.plotTop})},drawPoints:function(){var a=
this,k=a.chart;C(a.points,function(f){var r,n,u,g,e=f.graphic,p,b=!e;void 0!==f.plotY&&(e||(f.graphic=e=k.renderer.path().add(a.group)),n=e.strokeWidth()%2/2,p=Math.round(f.plotX)-n,u=Math.round(f.shapeArgs.width/2),g=["M",p,Math.round(f.yBottom),"L",p,Math.round(f.plotHigh)],null!==f.open&&(r=Math.round(f.plotOpen)+n,g.push("M",p,r,"L",p-u,r)),null!==f.close&&(r=Math.round(f.plotClose)+n,g.push("M",p,r,"L",p+u,r)),e[b?"attr":"animate"]({d:g}).addClass(f.getClassName(),!0))})},animate:null},{getClassName:function(){return B.prototype.getClassName.call(this)+
(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(K);(function(a){var C=a.defaultPlotOptions,B=a.each,E=a.merge;a=a.seriesType;a("candlestick","ohlc",E(C.column,{states:{hover:{lineWidth:2}},tooltip:C.ohlc.tooltip,threshold:null}),{drawPoints:function(){var a=this,r=a.chart;B(a.points,function(k){var f=k.graphic,x,n,u,g,e,p,b,c=!f;void 0!==k.plotY&&(f||(k.graphic=f=r.renderer.path().add(a.group)),e=f.strokeWidth()%2/2,p=Math.round(k.plotX)-e,x=k.plotOpen,n=k.plotClose,u=
Math.min(x,n),x=Math.max(x,n),b=Math.round(k.shapeArgs.width/2),n=Math.round(u)!==Math.round(k.plotHigh),g=x!==k.yBottom,u=Math.round(u)+e,x=Math.round(x)+e,e=[],e.push("M",p-b,x,"L",p-b,u,"L",p+b,u,"L",p+b,x,"Z","M",p,u,"L",p,n?Math.round(k.plotHigh):u,"M",p,x,"L",p,g?Math.round(k.yBottom):x),f[c?"attr":"animate"]({d:e}).addClass(k.getClassName(),!0))})}})})(K);(function(a){var C=a.addEvent,B=a.each,E=a.noop,F=a.seriesType,r=a.seriesTypes,k=a.TrackerMixin,f=a.SVGRenderer.prototype.symbols,x=a.stableSort;
F("flags","column",{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,translate:function(){r.column.prototype.translate.apply(this);var a=this.options,f=this.chart,g=this.points,e=g.length-1,k,b,c=a.onSeries;k=c&&f.get(c);var a=a.onKey||"y",c=k&&k.options.step,l=k&&k.points,z=l&&l.length,
t=this.xAxis,y=this.yAxis,I=t.getExtremes(),G=0,D,m,w;if(k&&k.visible&&z)for(G=(k.pointXOffset||0)+(k.barW||0)/2,k=k.currentDataGrouping,m=l[z-1].x+(k?k.totalRange:0),x(g,function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);z--&&g[e]&&!(k=g[e],D=l[z],D.x<=k.x&&void 0!==D[a]&&(k.x<=m&&(k.plotY=D[a],D.x<k.x&&!c&&(w=l[z+1])&&void 0!==w[a]&&(k.plotY+=(k.x-D.x)/(w.x-D.x)*(w[a]-D[a]))),e--,z++,0>e)););B(g,function(a,c){var d;void 0===a.plotY&&(a.x>=I.min&&a.x<=I.max?a.plotY=f.chartHeight-
t.bottom-(t.opposite?t.height:0)+t.offset-y.top:a.shapeArgs={});a.plotX+=G;(b=g[c-1])&&b.plotX===a.plotX&&(void 0===b.stackIndex&&(b.stackIndex=0),d=b.stackIndex+1);a.stackIndex=d})},drawPoints:function(){var f=this.points,k=this.chart,g=k.renderer,e,p,b=this.options,c=b.y,l,r,t,y,x,B,D,m=this.yAxis;for(r=f.length;r--;)t=f[r],D=t.plotX>this.xAxis.len,e=t.plotX,y=t.stackIndex,l=t.options.shape||b.shape,p=t.plotY,void 0!==p&&(p=t.plotY+c-(void 0!==y&&y*b.stackDistance)),x=y?void 0:t.plotX,B=y?void 0:
t.plotY,y=t.graphic,void 0!==p&&0<=e&&!D?(y||(y=t.graphic=g.label("",null,null,l,null,null,b.useHTML).attr({align:"flag"===l?"left":"center",width:b.width,height:b.height,"text-align":b.textAlign}).addClass("highcharts-point").add(this.markerGroup),t.graphic.div&&(t.graphic.div.point=t)),0<e&&(e-=y.strokeWidth()%2),y.attr({text:t.options.title||b.title||"A",x:e,y:p,anchorX:x,anchorY:B}),t.tooltipPos=k.inverted?[m.len+m.pos-k.plotLeft-p,this.xAxis.len-e]:[e,p+m.pos-k.plotTop]):y&&(t.graphic=y.destroy());
b.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;k.drawTrackerPoint.apply(this);B(a,function(f){var g=f.graphic;g&&C(g.element,"mouseover",function(){0<f.stackIndex&&!f.raised&&(f._y=g.y,g.attr({y:f._y-8}),f.raised=!0);B(a,function(a){a!==f&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:E,buildKDTree:E,setClip:E});f.flag=
function(a,f,g,e,k){return["M",k&&k.anchorX||a,k&&k.anchorY||f,"L",a,f+e,a,f,a+g,f,a+g,f+e,a,f+e,"Z"]};B(["circle","square"],function(a){f[a+"pin"]=function(k,g,e,n,b){var c=b&&b.anchorX;b=b&&b.anchorY;"circle"===a&&n>e&&(k-=Math.round((n-e)/2),e=n);k=f[a](k,g,e,n);c&&b&&k.push("M",c,g>b?g:g+n,"L",c,b);return k}})})(K);(function(a){function C(a,b,c){this.init(a,b,c)}var B=a.addEvent,E=a.Axis,F=a.correctFloat,r=a.defaultOptions,k=a.defined,f=a.destroyObjectProperties,x=a.doc,n=a.each,u=a.fireEvent,
g=a.hasTouch,e=a.isTouchDevice,p=a.merge,b=a.pick,c=a.removeEvent,l=a.wrap,z,t={height:e?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!e,margin:10,minWidth:6,step:.2,zIndex:3};r.scrollbar=p(!0,t,r.scrollbar);a.swapXY=z=function(a,b){var c=a.length,e;if(b)for(b=0;b<c;b+=3)e=a[b+1],a[b+1]=a[b+2],a[b+2]=e;return a};C.prototype={init:function(a,c,e){this.scrollbarButtons=[];this.renderer=a;this.userOptions=c;this.options=p(t,c);this.chart=e;this.size=b(this.options.size,this.options.height);
c.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,b=this.options,c=this.size,e;this.group=e=a.g("scrollbar").attr({zIndex:b.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:b.trackBorderRadius||0,height:c,width:c}).add(e);this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(e);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:c,
width:c,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(z(["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],b.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,b,c,e){var f=this.options.vertical,g=0,k=
this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=c;this.xOffset=this.height=e;this.yOffset=g;f?(this.width=this.yOffset=c=g=this.size,this.xOffset=b=0,this.barWidth=e-2*c,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=c-2*e,this.y+=this.options.margin);this.group[k]({translateX:a,translateY:this.y});this.track[k]({width:c,height:e});this.scrollbarButtons[1][k]({translateX:f?0:c-b,translateY:f?e-g:0})},drawScrollbarButton:function(a){var b=
this.renderer,c=this.scrollbarButtons,e=this.options,f=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:f+1,height:f+1,r:e.buttonBorderRadius},g.strokeWidth()));b.path(z(["M",f/2+(a?-1:1),f/2-3,"L",f/2+(a?-1:1),f/2+3,"L",f/2+(a?2:-2),f/2],e.vertical)).addClass("highcharts-scrollbar-arrow").add(c[a])},setRange:function(a,b){var c=this.options,e=c.vertical,f=c.minWidth,g=this.barWidth,q,l,d=this.rendered&&!this.hasDragged?
"animate":"attr";k(g)&&(a=Math.max(a,0),q=Math.ceil(g*a),this.calculatedWidth=l=F(g*Math.min(b,1)-q),l<f&&(q=(g-f+l)*a,l=f),f=Math.floor(q+this.xOffset+this.yOffset),g=l/2-.5,this.from=a,this.to=b,e?(this.scrollbarGroup[d]({translateY:f}),this.scrollbar[d]({height:l}),this.scrollbarRifles[d]({translateY:g}),this.scrollbarTop=f,this.scrollbarLeft=0):(this.scrollbarGroup[d]({translateX:f}),this.scrollbar[d]({width:l}),this.scrollbarRifles[d]({translateX:g}),this.scrollbarLeft=f,this.scrollbarTop=0),
12>=l?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===c.showFull&&(0>=a&&1<=b?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",f=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(f[0]+e,f[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=F(a.to-a.from)*a.options.step;a.updatePosition(F(a.from-
c),F(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,f=a.y+a.scrollbarTop,g=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>f||!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,b){1<b&&(a=F(1-F(b-a)),b=1);0>a&&(b=F(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,p(!0,this.options,a),this.chart)},addEvents:function(){var a=
this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,e=this.mouseDownHandler,f=this.mouseMoveHandler,k=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[c,"mousedown",e],[x,"mousemove",f],[x,"mouseup",k]];g&&a.push([c,"touchstart",e],[x,"touchmove",f],[x,"touchend",k]);n(a,function(a){B.apply(null,a)});this._events=a},removeEvents:function(){n(this._events,
function(a){c.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();n(["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,f(a.scrollbarButtons))}};l(E.prototype,"init",function(a){var c=this;a.apply(c,Array.prototype.slice.call(arguments,1));c.options.scrollbar&&c.options.scrollbar.enabled&&(c.options.scrollbar.vertical=!c.horiz,
c.options.startOnTick=c.options.endOnTick=!1,c.scrollbar=new C(c.chart.renderer,c.options.scrollbar,c.chart),B(c.scrollbar,"changed",function(a){var e=Math.min(b(c.options.min,c.min),c.min,c.dataMin),f=Math.max(b(c.options.max,c.max),c.max,c.dataMax)-e,g;c.horiz&&!c.reversed||!c.horiz&&c.reversed?(g=e+f*this.to,e+=f*this.from):(g=e+f*(1-this.from),e+=f*(1-this.to));c.setExtremes(e,g,!0,!1,a)}))});l(E.prototype,"render",function(a){var c=Math.min(b(this.options.min,this.min),this.min,this.dataMin),
e=Math.max(b(this.options.max,this.max),this.max,this.dataMax),f=this.scrollbar,g=this.titleOffset||0;a.apply(this,Array.prototype.slice.call(arguments,1));if(f){this.horiz?(f.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:g+this.axisTitleMargin+this.offset),this.width,this.height),g=1):(f.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?g+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),g=0);if(!this.opposite&&
!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[g]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(c)||isNaN(e)||!k(this.min)||!k(this.max)?f.setRange(0,0):(g=(this.min-c)/(e-c),c=(this.max-c)/(e-c),this.horiz&&!this.reversed||!this.horiz&&this.reversed?f.setRange(g,c):f.setRange(1-c,1-g))}});l(E.prototype,"getOffset",function(a){var b=this.horiz?2:1,c=this.scrollbar;a.apply(this,Array.prototype.slice.call(arguments,1));c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=
c.size+c.options.margin)});l(E.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=C})(K);(function(a){function C(a){this.init(a)}var B=a.addEvent,E=a.Axis,F=a.Chart,r=a.defaultOptions,k=a.defined,f=a.destroyObjectProperties,x=a.doc,n=a.each,u=a.erase,g=a.error,e=a.extend,p=a.grep,b=a.hasTouch,c=a.isNumber,l=a.isObject,z=a.merge,t=a.pick,y=a.removeEvent,I=a.Scrollbar,G=a.Series,D=a.seriesTypes,
m=a.wrap,w=a.swapXY,q=[].concat(a.defaultDataGroupingUnits),A=function(a){var b=p(arguments,c);if(b.length)return Math[a].apply(0,b)};q[4]=["day",[1,2,3,4]];q[5]=["week",[1,2,3]];e(r,{navigator:{height:40,margin:25,maskInside:!0,series:{type:void 0===D.areaspline?"line":"areaspline",compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:q},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,
marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,tickPixelInterval:200,labels:{align:"left",x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});C.prototype={drawHandle:function(a,b,c,e){this.handles[b][e](c?{translateX:Math.round(this.left+this.height/2-8),translateY:Math.round(this.top+
parseInt(a,10)+.5)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-8)})},getHandlePath:function(a){return w(["M",-4.5,.5,"L",3.5,.5,"L",3.5,15.5,"L",-4.5,15.5,"L",-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12],a)},drawOutline:function(a,b,c,e){var d=this.navigatorOptions.maskInside,h=this.outline.strokeWidth(),f=h/2,h=h%2/2,g=this.outlineHeight,k=this.scrollbarHeight,m=this.size,q=this.left-k,l=this.top;c?(q-=f,c=l+b+h,b=l+a+h,a=["M",q+g,l-k-h,"L",
q+g,c,"L",q,c,"L",q,b,"L",q+g,b,"L",q+g,l+m+k].concat(d?["M",q+g,c-f,"L",q+g,b+f]:[])):(a+=q+k-h,b+=q+k-h,l+=f,a=["M",q,l,"L",a,l,"L",a,l+g,"L",b,l+g,"L",b,l,"L",q+m+2*k,l].concat(d?["M",a-f,l,"L",b+f,l]:[]));this.outline[e]({d:a})},drawMasks:function(a,b,c,e){var d=this.left,h=this.top,f=this.height,g,k,m,q;c?(m=[d,d,d],q=[h,h+a,h+b],k=[f,f,f],g=[a,b-a,this.size-b]):(m=[d,d+a,d+b],q=[h,h,h],k=[a,b-a,this.size-b],g=[f,f,f]);n(this.shades,function(a,b){a[e]({x:m[b],y:q[b],width:k[b],height:g[b]})})},
renderElements:function(){var a=this,b=a.navigatorOptions.maskInside,c=a.chart,e=c.inverted,f=c.renderer,g;a.navigatorGroup=g=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();n([!b,b,!b],function(b,d){a.shades[d]=f.rect().addClass("highcharts-navigator-mask"+(1===d?"-inside":"-outside")).add(g)});a.outline=f.path().addClass("highcharts-navigator-outline").add(g);n([0,1],function(b){a.handles[b]=f.path(a.getHandlePath(e)).attr({zIndex:7-b}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+
["left","right"][b]).add(g)})},update:function(a){this.destroy();z(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,e,f){var d=this.chart,h,g,m=this.scrollbarHeight,q,l=this.xAxis;h=l.fake?d.xAxis[0]:l;var n=this.navigatorEnabled,p,v=this.rendered;g=d.inverted;var r=d.xAxis[0].minRange;if(!this.hasDragged||k(e)){if(!c(a)||!c(b))if(v)e=0,f=l.width;else return;this.left=t(l.left,d.plotLeft+m+(g?d.plotWidth:0));this.size=p=q=t(l.len,(g?d.plotHeight:d.plotWidth)-
2*m);d=g?m:q+2*m;e=t(e,l.toPixels(a,!0));f=t(f,l.toPixels(b,!0));c(e)&&Infinity!==Math.abs(e)||(e=0,f=d);a=l.toValue(e,!0);b=l.toValue(f,!0);if(Math.abs(b-a)<r)if(this.grabbedLeft)e=l.toPixels(b-r,!0);else if(this.grabbedRight)f=l.toPixels(a+r,!0);else return;this.zoomedMax=Math.min(Math.max(e,f,0),p);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(e,f),0),p);this.range=this.zoomedMax-this.zoomedMin;p=Math.round(this.zoomedMax);e=Math.round(this.zoomedMin);
n&&(this.navigatorGroup.attr({visibility:"visible"}),v=v&&!this.hasDragged?"animate":"attr",this.drawMasks(e,p,g,v),this.drawOutline(e,p,g,v),this.drawHandle(e,0,g,v),this.drawHandle(p,1,g,v));this.scrollbar&&(g?(g=this.top-m,h=this.left-m+(n||!h.opposite?0:(h.titleOffset||0)+h.axisTitleMargin),m=q+2*m):(g=this.top+(n?this.height:-m),h=this.left-m),this.scrollbar.position(h,g,d,m),this.scrollbar.setRange(this.zoomedMin/q,this.zoomedMax/q));this.rendered=!0}},addMouseEvents:function(){var a=this,c=
a.chart,e=c.container,f=[],g,k;a.mouseMoveHandler=g=function(b){a.onMouseMove(b)};a.mouseUpHandler=k=function(b){a.onMouseUp(b)};f=a.getPartsEvents("mousedown");f.push(B(e,"mousemove",g),B(x,"mouseup",k));b&&(f.push(B(e,"touchmove",g),B(x,"touchend",k)),f.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=f;a.series&&a.series[0]&&f.push(B(a.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,d=[];n(["shades","handles"],
function(c){n(b[c],function(e,h){d.push(B(e.element,a,function(a){b[c+"Mousedown"](a,h)}))})});return d},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var d=this.chart,c=this.xAxis,e=this.zoomedMin,f=this.left,g=this.size,k=this.range,m=a.chartX,q;d.inverted&&(m=a.chartY,f=this.top);1===b?(this.grabbedCenter=m,this.fixedWidth=k,this.dragOffset=m-e):(a=m-f-k/2,0===b?a=Math.max(0,a):2===b&&a+k>=g&&(a=g-k,q=this.getUnionExtremes().dataMax),a!==e&&(this.fixedWidth=k,b=c.toFixedRange(a,
a+k,null,q),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],c=a.inverted&&!d.reversed||!a.inverted&&d.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=c?d.min:d.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=c?d.max:d.min);a.fixedRange=null},onMouseMove:function(a){var b=this,d=b.chart,
c=b.left,e=b.navigatorSize,f=b.range,g=b.dragOffset,k=d.inverted;a.touches&&0===a.touches[0].pageX||(a=d.pointer.normalize(a),d=a.chartX,k&&(c=b.top,d=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,d-c,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,d-c)):b.grabbedCenter&&(b.hasDragged=!0,d<g?d=g:d>e+g-f&&(d=e+g-f),b.render(0,0,d-g,d-g+f)),b.hasDragged&&b.scrollbar&&b.scrollbar.options.liveRedraw&&(a.DOMType=a.type,setTimeout(function(){b.onMouseUp(a)},0)))},
onMouseUp:function(a){var b=this.chart,d=this.xAxis,c=this.scrollbar,e,f,g=a.DOMEvent||a;(!this.hasDragged||c&&c.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(f=this.fixedExtreme),this.zoomedMax===this.size&&(f=this.getUnionExtremes().dataMax),d=d.toFixedRange(this.zoomedMin,this.zoomedMax,e,f),k(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:g}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(n(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&&(n(a,function(a){y(a,
"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&y(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,d=b.navigator,c=d.enabled,e=b.scrollbar,f=e.enabled,b=c?d.height:0,g=f?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=g;this.scrollbarEnabled=f;this.navigatorEnabled=c;this.navigatorOptions=d;this.scrollbarOptions=e;this.outlineHeight=b+g;this.opposite=t(d.opposite,!c&&a.inverted);var k=
this,e=k.baseSeries,f=a.xAxis.length,q=a.yAxis.length,l=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraMargin={type:k.opposite?"plotTop":"marginBottom",value:(c||!a.inverted?k.outlineHeight:0)+d.margin};a.inverted&&(a.extraMargin.type=k.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;k.navigatorEnabled?(k.xAxis=new E(a,z({breaks:l.options.breaks,ordinal:l.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:f,offset:0,keepOrdinalPadding:!0,startOnTick:!1,
endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[g,0,-g,0],width:b}:{offsets:[0,-g,0,g],height:b})),k.yAxis=new E(a,z(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:q,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||d.series.data?k.addBaseSeries():0===a.series.length&&m(a,"redraw",function(b,d){0<a.series.length&&!k.series&&(k.setBaseSeries(),a.redraw=b);b.call(a,d)}),k.renderElements(),k.addMouseEvents()):k.xAxis={translate:function(b,d){var c=a.xAxis[0],
e=c.getExtremes(),f=c.len-2*g,h=A("min",c.options.min,e.dataMin),c=A("max",c.options.max,e.dataMax)-h;return d?b*c/f+h:f*(b-h)/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=k.scrollbar=new I(a.renderer,z(a.options.scrollbar,{margin:k.navigatorEnabled?0:10,vertical:a.inverted}),a),B(k.scrollbar,"changed",function(b){var d=k.size,c=d*this.to,d=d*this.from;k.hasDragged=
k.scrollbar.hasDragged;k.render(0,0,d,c);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){k.onMouseUp(b)})}));k.addBaseSeriesEvents();k.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],d=this.xAxis,c=d.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:t(c&&c.min,A("min",e.min,b.dataMin,d.dataMin,d.min)),dataMax:t(c&&c.max,A("max",e.max,b.dataMax,d.dataMax,d.max))});return f},setBaseSeries:function(a){var b=this.chart,d;a=a||b.options&&b.options.navigator.baseSeries||
0;this.series&&(this.removeBaseSeriesEvents(),n(this.series,function(a){a.destroy()}));d=this.baseSeries=[];n(b.series||[],function(b,c){(b.options.showInNavigator||(c===a||b.options.id===a)&&!1!==b.options.showInNavigator)&&d.push(b)});this.xAxis&&!this.xAxis.fake&&this.addBaseSeries()},addBaseSeries:function(){var a=this,b=a.chart,c=a.series=[],e=a.baseSeries,f,g,k=a.navigatorOptions.series,m,q={enableMouseTracking:!1,index:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",
showInLegend:!1,stacking:!1,isInternal:!0,visible:!0};e?n(e,function(d,e){q.name="Navigator "+(e+1);f=d.options||{};m=f.navigatorOptions||{};g=z(f,q,k,m);e=m.data||k.data;a.hasNavigatorData=a.hasNavigatorData||!!e;g.data=e||f.data&&f.data.slice(0);d.navigatorSeries=b.initSeries(g);c.push(d.navigatorSeries)}):(g=z(k,q),g.data=k.data,a.hasNavigatorData=!!g.data,c.push(b.initSeries(g)));this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&B(b[0].xAxis,
"foundExtremes",this.modifyBaseAxisExtremes);!1!==this.navigatorOptions.adaptToUpdatedData&&n(b,function(b){b.xAxis&&B(b,"updatedData",this.updatedDataHandler);B(b,"remove",function(){this.navigatorSeries&&(u(a.series,this.navigatorSeries),this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=
this.chart.navigator,b=this.getExtremes(),e=b.dataMin,f=b.dataMax,b=b.max-b.min,g=a.stickToMin,k=a.stickToMax,m,q,l=a.series&&a.series[0],n=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(g&&(q=e,m=q+b),k&&(m=f,g||(q=Math.max(m-b,l&&l.xData?l.xData[0]:-Number.MAX_VALUE))),n&&(g||k)&&c(q)&&(this.min=this.userMin=q,this.max=this.userMax=m));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMin=
c(this.xAxis.min)&&this.xAxis.min<=this.xData[0];a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.size);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){B(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)})},destroy:function(){this.removeEvents();this.xAxis&&(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));n(this.series||[],function(a){a.destroy&&a.destroy()});n("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);n([this.handles],function(a){f(a)},this)}};a.Navigator=C;m(E.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,f=e.chart.zoomType,g=e.navigator,
e=e.rangeSelector,h;this.isXAxis&&(g&&g.enabled||e&&e.enabled)&&("x"===f?d.resetZoomButton="blocked":"y"===f?h=!1:"xy"===f&&(d=this.previousZoom,k(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==h?h:a.call(this,b,c)});m(F.prototype,"init",function(a,b,c){B(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new C(this)});a.call(this,b,c)});m(F.prototype,"setChartSize",function(a){var b=
this.legend,d=this.navigator,c,e,f,g;a.apply(this,[].slice.call(arguments,1));d&&(e=b.options,f=d.xAxis,g=d.yAxis,c=d.scrollbarHeight,this.inverted?(d.left=d.opposite?this.chartWidth-c-d.height:this.spacing[3]+c,d.top=this.plotTop+c):(d.left=this.plotLeft+c,d.top=d.navigatorOptions.top||this.chartHeight-d.height-c-this.spacing[2]-("bottom"===e.verticalAlign&&e.enabled&&!e.floating?b.legendHeight+t(e.margin,10):0)),f&&g&&(this.inverted?f.options.left=g.options.left=d.left:f.options.top=g.options.top=
d.top,f.setAxisSize(),g.setAxisSize()))});m(G.prototype,"addPoint",function(a,b,c,e,f){var d=this.options.turboThreshold;d&&this.xData.length>d&&l(b,!0)&&this.chart.navigator&&g(20,!0);a.call(this,b,c,e,f)});m(F.prototype,"addSeries",function(a,b,c,e){a=a.call(this,b,!1,e);this.navigator&&this.navigator.setBaseSeries();t(c,!0)&&this.redraw();return a});m(G.prototype,"update",function(a,b,c){a.call(this,b,!1);this.chart.navigator&&this.chart.navigator.setBaseSeries();t(c,!0)&&this.chart.redraw()});
F.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(K);(function(a){function C(a){this.init(a)}var B=a.addEvent,E=a.Axis,F=a.Chart,r=a.css,k=a.createElement,f=a.dateFormat,x=a.defaultOptions,n=x.global.useUTC,u=a.defined,g=a.destroyObjectProperties,e=a.discardElement,p=a.each,b=a.extend,c=a.fireEvent,l=a.Date,z=a.isNumber,t=a.merge,y=a.pick,I=a.pInt,G=a.splat,D=a.wrap;b(x,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,
padding:2,zIndex:7},height:35,inputPosition:{align:"right"}}});x.lang=t(x.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});C.prototype={clickButton:function(a,b){var c=this,e=c.chart,d=c.buttonOptions[a],f=e.xAxis[0],g=e.scroller&&e.scroller.getUnionExtremes()||f||{},k=g.dataMin,m=g.dataMax,l,r=f&&Math.round(Math.min(f.max,y(m,f.max))),w=d.type,t,g=d._range,u,x,C,D=d.dataGrouping;if(null!==k&&null!==m){e.fixedRange=g;D&&(this.forcedDataGrouping=!0,E.prototype.setDataGrouping.call(f||
{chart:this.chart},D,!1));if("month"===w||"year"===w)f?(w={range:d,max:r,dataMin:k,dataMax:m},l=f.minFromRange.call(w),z(w.newMax)&&(r=w.newMax)):g=d;else if(g)l=Math.max(r-g,k),r=Math.min(l+g,m);else if("ytd"===w)if(f)void 0===m&&(k=Number.MAX_VALUE,m=Number.MIN_VALUE,p(e.series,function(a){a=a.xData;k=Math.min(a[0],k);m=Math.max(a[a.length-1],m)}),b=!1),r=c.getYTDExtremes(m,k,n),l=u=r.min,r=r.max;else{B(e,"beforeRender",function(){c.clickButton(a)});return}else"all"===w&&f&&(l=k,r=m);c.setSelected(a);
f?f.setExtremes(l,r,y(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d}):(t=G(e.options.xAxis)[0],C=t.range,t.range=g,x=t.min,t.min=u,B(e,"load",function(){t.range=C;t.min=x}))}},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,e=a.options.rangeSelector,
f=e.buttons||[].concat(b.defaultButtons),d=e.selected,g=function(){var a=b.minInput,d=b.maxInput;a&&a.blur&&c(a,"blur");d&&d.blur&&c(d,"blur")};b.chart=a;b.options=e;b.buttons=[];a.extraTopMargin=e.height;b.buttonOptions=f;this.unMouseDown=B(a.container,"mousedown",g);this.unResize=B(a,"resize",g);p(f,b.computeButtonRange);void 0!==d&&f[d]&&this.clickButton(d,!1);B(a,"load",function(){B(a.xAxis[0],"setExtremes",function(d){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==d.trigger&&"updatedData"!==
d.trigger&&b.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,b=a.xAxis[0],c=Math.round(b.max-b.min),e=!b.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||b,d=a.dataMin,f=a.dataMax,a=this.getYTDExtremes(f,d,n),g=a.min,k=a.max,l=this.selected,r=z(l),t=this.options.allButtonsEnabled,u=this.buttons;p(this.buttonOptions,function(a,h){var m=a._range,q=a.type,n=a.count||1;a=u[h];var p=0;h=h===l;var w=m>f-d,v=m<b.minRange,A=!1,x=!1,m=m===c;
("month"===q||"year"===q)&&c>=864E5*{month:28,year:365}[q]*n&&c<=864E5*{month:31,year:366}[q]*n?m=!0:"ytd"===q?(m=k-g===c,A=!h):"all"===q&&(m=b.max-b.min>=f-d,x=!h&&r&&m);q=!t&&(w||v||x||e);m=h&&m||m&&!r&&!A;q?p=3:m&&(r=!0,p=2);a.state!==p&&a.setState(p)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[b])a._range=e[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,
b){var c=this.chart.options.rangeSelector,e=this[a+"Input"];u(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=f(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:f(c.inputDateFormat||"%b %e, %Y",e.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];r(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})},hideInput:function(a){r(this[a+"Input"],{border:0,width:"1px",height:"1px"});
this.setInputValue(a)},drawInput:function(a){function b(){var a=m.value,b=(f.inputDateParser||Date.parse)(a),d=e.xAxis[0],g=e.scroller&&e.scroller.xAxis?e.scroller.xAxis:d,h=g.dataMin,g=g.dataMax;b!==m.previousValue&&(m.previousValue=b,z(b)||(b=a.split("-"),b=Date.UTC(I(b[0]),I(b[1])-1,I(b[2]))),z(b)&&(n||(b+=6E4*(new Date).getTimezoneOffset()),l?b>c.maxInput.HCTime?b=void 0:b<h&&(b=h):b<c.minInput.HCTime?b=void 0:b>g&&(b=g),void 0!==b&&d.setExtremes(l?b:d.min,l?d.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var c=this,e=c.chart,d=e.renderer,f=e.options.rangeSelector,g=c.div,l="min"===a,m,p,r=this.inputGroup;this[a+"Label"]=p=d.label(x.lang[l?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(r);r.offset+=p.width+5;this[a+"DateBox"]=d=d.label("",r.offset).addClass("highcharts-range-input").attr({padding:2,width:f.inputBoxWidth||90,height:f.inputBoxHeight||17,stroke:f.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",
function(){c.showInput(a);c[a+"Input"].focus()}).add(r);r.offset+=d.width+(l?10:0);this[a+"Input"]=m=k("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:e.plotTop+"px"},g);m.onfocus=function(){c.showInput(a)};m.onblur=function(){c.hideInput(a)};m.onchange=b;m.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=y((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,
b,c){var e=new l(a),d=e[l.hcGetFullYear]();c=c?l.UTC(d,0,1):+new l(d,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 e=this,f=e.chart,d=f.renderer,g=f.container,h=f.options,l=h.exporting&&!1!==h.exporting.enabled&&h.navigation&&h.navigation.buttonOptions,m=h.rangeSelector,n=e.buttons,h=x.lang,r=e.div,r=e.inputGroup,t=m.buttonTheme,w=m.buttonPosition||{},z=m.inputEnabled,B=t&&t.states,C=f.plotLeft,D,E=this.getPosition(),F=e.group,G=e.rendered;!1!==
m.enabled&&(G||(e.group=F=d.g("range-selector-buttons").add(),e.zoomText=d.text(h.rangeSelectorZoom,y(w.x,C),15).css(m.labelStyle).add(F),D=y(w.x,C)+e.zoomText.getBBox().width+5,p(e.buttonOptions,function(a,b){n[b]=d.button(a.text,D,0,function(){e.clickButton(b);e.isActive=!0},t,B&&B.hover,B&&B.select,B&&B.disabled).attr({"text-align":"center"}).add(F);D+=n[b].width+y(m.buttonSpacing,5)}),!1!==z&&(e.div=r=k("div",null,{position:"relative",height:0,zIndex:1}),g.parentNode.insertBefore(r,g),e.inputGroup=
r=d.g("input-group").add(),r.offset=0,e.drawInput("min"),e.drawInput("max"))),e.updateButtonStates(),F[G?"animate":"attr"]({translateY:E.buttonTop}),!1!==z&&(r.align(b({y:E.inputTop,width:r.offset,x:l&&E.inputTop<(l.y||0)+l.height-f.spacing[0]?-40:0},m.inputPosition),!0,f.spacingBox),u(z)||(f=F.getBBox(),r[r.alignAttr.translateX<f.x+f.width+10?"hide":"show"]()),e.setInputValue("min",a),e.setInputValue("max",c)),e.rendered=!0)},update:function(a){var b=this.chart;t(!0,b.options.rangeSelector,a);this.destroy();
this.init(b)},destroy:function(){var b=this,c=b.minInput,f=b.maxInput;b.unMouseDown();b.unResize();g(b.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);f&&(f.onfocus=f.onblur=f.onchange=null);a.objectEach(b,function(a,c){a&&"chart"!==c&&(a.destroy?a.destroy():a.nodeType&&e(this[c]));a!==C.prototype[c]&&(b[c]=null)},this)}};E.prototype.toFixedRange=function(a,b,c,e){var d=this.chart&&this.chart.fixedRange;a=y(c,this.translate(a,!0,!this.horiz));b=y(e,this.translate(b,!0,!this.horiz));c=d&&(b-a)/d;
.7<c&&1.3>c&&(e?a=b-d:b=a+d);z(a)||(a=b=void 0);return{min:a,max:b}};E.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],c,e=this.max,d,f,g=function(a,c){var d=new Date(a),e=d["get"+b]();d["set"+b](e+c);e===d["get"+b]()&&d.setDate(0);return d.getTime()-a};z(a)?(c=e-a,f=a):(c=e+g(e,-a.count),this.chart&&(this.chart.fixedRange=e-c));d=y(this.dataMin,Number.MIN_VALUE);z(c)||(c=d);c<=d&&(c=d,void 0===f&&(f=g(c,a.count)),this.newMax=Math.min(c+f,this.dataMax));
z(e)||(c=void 0);return c};D(F.prototype,"init",function(a,b,c){B(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new C(this))});a.call(this,b,c)});F.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();z(c.min)&&e.render(c.min,c.max)}var c,e=a.rangeSelector,d,f;e&&(f=B(a.xAxis[0],"afterSetExtremes",function(a){e.render(a.min,a.max)}),d=B(a,"redraw",b),b());B(a,"destroy",function(){e&&(d(),f())})});a.RangeSelector=C})(K);(function(a){var C=a.arrayMax,
B=a.arrayMin,E=a.Axis,F=a.Chart,r=a.defined,k=a.each,f=a.format,x=a.grep,n=a.inArray,u=a.isNumber,g=a.isString,e=a.map,p=a.merge,b=a.pick,c=a.Point,l=a.Series,z=a.splat,t=a.SVGRenderer,y=a.wrap,I=l.prototype,G=I.init,D=I.processData,m=c.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(c,f,k){var d=g(c)||c.nodeName,l=arguments[d?1:0],h=l.series,m=a.getOptions(),q,n=b(l.navigator&&l.navigator.enabled,m.navigator.enabled,!0),r=n?{startOnTick:!1,endOnTick:!1}:null,t={marker:{enabled:!1,radius:2}},
w={shadow:!1,borderWidth:0};l.xAxis=e(z(l.xAxis||{}),function(a){return p({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},m.xAxis,a,{type:"datetime",categories:null},r)});l.yAxis=e(z(l.yAxis||{}),function(a){q=b(a.opposite,!0);return p({labels:{y:-2},opposite:q,showLastLabel:!1,title:{text:null}},m.yAxis,a)});l.series=null;l=p({chart:{panning:!0,pinchType:"x"},navigator:{enabled:n},scrollbar:{enabled:b(m.scrollbar.enabled,!0)},rangeSelector:{enabled:b(m.rangeSelector.enabled,
!0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:t,spline:t,area:t,areaspline:t,arearange:t,areasplinerange:t,column:w,columnrange:w,candlestick:w,ohlc:w}},l,{isStock:!0});l.series=h;return d?new F(c,l,k):new F(l,f)};y(E.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.call(this,[].slice.call(arguments,1))});y(E.prototype,"destroy",function(a){var b=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===this&&delete b._labelPanes[c];return a.call(this,Array.prototype.slice.call(arguments,1))});y(E.prototype,"getPlotLinePath",function(c,f,l,d,m,h){var q=this,p=this.isLinked&&!this.series?this.linkedParent.series:this.series,t=q.chart,w=t.renderer,x=
q.left,A=q.top,y,z,B,C,D=[],E=[],F,G;if("xAxis"!==q.coll&&"yAxis"!==q.coll)return c.apply(this,[].slice.call(arguments,1));E=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=q.options[b];return u(a)?[t[b][a]]:g(a)?[t.get(a)]:e(p,function(a){return a[b]})}(q.coll);k(q.isXAxis?t.yAxis:t.xAxis,function(a){if(r(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=r(a.options[b])?t[b][a.options[b]]:t[b][0];q===b&&E.push(a)}});F=E.length?[]:[q.isXAxis?t.yAxis[0]:t.xAxis[0]];
k(E,function(b){-1!==n(b,F)||a.find(F,function(a){return a.pos===b.pos&&a.len&&b.len})||F.push(b)});G=b(h,q.translate(f,null,null,d));u(G)&&(q.horiz?k(F,function(a){var b;z=a.pos;C=z+a.len;y=B=Math.round(G+q.transB);if(y<x||y>x+q.width)m?y=B=Math.min(Math.max(x,y),x+q.width):b=!0;b||D.push("M",y,z,"L",B,C)}):k(F,function(a){var b;y=a.pos;B=y+a.len;z=C=Math.round(A+q.height-G);if(z<A||z>A+q.height)m?z=C=Math.min(Math.max(A,z),q.top+q.height):b=!0;b||D.push("M",y,z,"L",B,C)}));return 0<D.length?w.crispPolyLine(D,
l||1):null});E.prototype.getPlotBandPath=function(a,b){b=this.getPlotLinePath(b,null,null,!0);a=this.getPlotLinePath(a,null,null,!0);var c=[],d;if(a&&b)if(a.toString()===b.toString())c=a,c.flat=!0;else for(d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+2],"L",a[d+4],a[d+5],b[d+4],b[d+5],b[d+1],b[d+2],"z");else c=null;return c};t.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};y(E.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});y(E.prototype,"drawCrosshair",function(a,c,e){var d,g;a.call(this,c,e);if(r(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var h=this.options.crosshair.label,k=this.horiz;d=this.opposite;g=this.left;var l=this.top,m=this.crossLabel,n,q=h.format,p="",t="inside"===this.options.tickPosition,u=!1!==this.crosshair.snap,w=0;c||(c=this.cross&&
this.cross.e);n=k?"center":d?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";m||(m=this.crossLabel=a.renderer.label(null,null,null,h.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:h.align||n,padding:b(h.padding,8),r:b(h.borderRadius,3),zIndex:2}).add(this.labelGroup));k?(n=u?e.plotX+g:c.chartX,l+=d?0:this.height):(n=d?this.width+g:0,l=u?e.plotY+l:c.chartY);q||h.formatter||(this.isDatetimeAxis&&
(p="%b %d, %Y"),q="{value"+(p?":"+p:"")+"}");c=u?e[this.isXAxis?"x":"y"]:this.toValue(k?c.chartX:c.chartY);m.attr({text:q?f(q,{value:c}):h.formatter.call(this,c),x:n,y:l,visibility:"visible"});c=m.getBBox();if(k){if(t&&!d||!t&&d)l=m.y-c.height}else l=m.y-c.height/2;k?(d=g-c.x,g=g+this.width-c.x):(d="left"===this.labelAlign?g:0,g="right"===this.labelAlign?g+this.width:a.chartWidth);m.translateX<d&&(w=d-m.translateX);m.translateX+c.width>=g&&(w=-(m.translateX+c.width-g));m.attr({x:n+w,y:l,anchorX:k?
n:this.opposite?0:a.chartWidth,anchorY:k?this.opposite?a.chartHeight:0:l+c.height/2})}});I.init=function(){G.apply(this,arguments);this.setCompare(this.options.compare)};I.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)};I.processData=function(){var a,b=
-1,c,d,e,f;D.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=n("close",this.pointArrayMap),-1===b&&(b=n(this.pointValKey||"y",this.pointArrayMap))),a=0;a<e-1;a++)if(f=d[a]&&-1<b?d[a][b]:d[a],u(f)&&c[a+1]>=this.xAxis.min&&0!==f){this.compareValue=f;break}};y(I,"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=B(b),this.dataMax=C(b))});E.prototype.setCompare=function(a,c){this.isXAxis||(k(this.series,function(b){b.setCompare(a)}),b(c,!0)&&this.chart.redraw())};c.prototype.tooltipFormatter=function(c){c=c.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,b(this.series.tooltipOptions.changeDecimals,2)));return m.apply(this,[c])};y(l.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?
(this.clipBox=p(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len}):this.clipBox&&(this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)});y(F.prototype,"getSelectedPoints",function(a){var b=a.call(this);k(this.series,function(a){a.hasGroupedData&&(b=b.concat(x(a.points||[],function(a){return a.selected})))});return b});
y(F.prototype,"update",function(a,b){"scrollbar"in b&&this.navigator&&(p(!0,this.options.scrollbar,b.scrollbar),this.navigator.update({},!1),delete b.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(K);return K});
