Browse Source

bring in latest changes, makes the chart more usable..

Plan is to have a single timeseries chart w/ the ability to
turn off the various series that you don't want to see..
main
John-Mark Gurney 5 years ago
parent
commit
0381a07971
8 changed files with 838 additions and 509 deletions
  1. +11
    -6
      Makefile
  2. +50
    -0
      NOTES.md
  3. +2
    -3
      root/index.html
  4. +0
    -492
      root/js/highcharts.js
  5. +640
    -0
      root/js/highstock.js
  6. +87
    -1
      root/js/solardash.base.js
  7. +45
    -7
      root/js/solardash.file.jspp
  8. +3
    -0
      root/js/solardash.https.jspp

+ 11
- 6
Makefile View File

@@ -1,23 +1,28 @@
.PHONY: all
.SUFFIXES: .jspp .js

JSFILES = root/js/solardash.file.js
JSFILES = root/js/solardash.file.js root/js/solardash.https.js

THIRDPARTYJS = root/js/jquery.js root/js/highcharts.js
THIRDPARTYJS = root/js/jquery.js root/js/highstock.js

root/js/jquery.js:
wget -O $@ "https://code.jquery.com/jquery-3.4.1.min.js"

root/js/highcharts.js:
wget -O $@ "https://code.highcharts.com/8.0.0/highcharts.js"
root/js/highstock.js: Makefile
wget -O - "https://code.highcharts.com/stock/8.0.0/highstock.js" | grep -v '^//# sourceMappingURL=' > $@ || (rm "$@"; false)

root/js/highcharts.js: Makefile
wget -O - "https://code.highcharts.com/stock/8.0.0/highcharts.js" | grep -v '^//# sourceMappingURL=' > $@ || (rm "$@"; false)

# manual deps
root/js/solardash.file.js: root/js/solardash.base.js $(THIRDPARTYJS)
root/js/solardash.base.js: $(THIRDPARTYJS)
root/js/solardash.file.js: root/js/solardash.base.js
root/js/solardash.https.js: root/js/solardash.base.js

all: $(JSFILES)

.jspp.js:
cpp -Wno-invalid-pp-token -E $< | sed -e '/^#/d' > $@
cpp -Wno-invalid-pp-token -E $< | sed -e '/^#/d' > $@ || (rm "$@"; false)

keepupdate:
find . -name '*.js' -o -name '*.jspp' | entr make all

+ 50
- 0
NOTES.md View File

@@ -6,3 +6,53 @@ https://web.archive.org/web/20200108235147/https://aiohttp.readthedocs.io/en/sta

WebSocket JS specification:
https://web.archive.org/web/20200109005314/https://html.spec.whatwg.org/multipage/web-sockets.html#dom-websocket

Lazy loading HighCharts:
https://web.archive.org/web/20200109045439/https://www.highcharts.com/stock/demo/lazy-loading

Dynamicly adding data:
https://web.archive.org/web/20200109045531/https://www.highcharts.com/docs/working-with-data/live-data#2-api-methods

uses afterSetExtremes event on xAxis to load data, which then set's it via setData

Stacked area chart:
https://web.archive.org/web/20200109053708/https://www.highcharts.com/demo/area-stacked


Graphs
------

Note: HighCharts uses milliseconds since unix epoch for time stamps.

Grid Import/Export
navigation: net import by hour or six hours

Solar Panel
navigation: solar production by hour

Navigation data needs to be generated as part of the index generation.

Maybe heatmap for solar panels

Use removePoint and addPoint: https://web.archive.org/web/20200109083308/https://api.highcharts.com/class-reference/Highcharts.Series.html
to add/remove the end null point and add points as they dynamically arrive

WebSocket Definition
--------------------

Messages from the websocket:
<id> <args>

id description
c Consumption -- current power consumed
Sent for each update. units kW.
ng Net Grid -- What the current power draw is from the grid (negative when sending power).
Sent for each update. units kW.
p Solar product -- current power produced by the solar panels in aggregate.
Sent for each update. units kW.

ov overview of data, contains gird, production and consumption data.
following is JSON object

One the first connection, the following messages/data will be sent:
c, ng, p

+ 2
- 3
root/index.html View File

@@ -13,13 +13,12 @@
<div><span>Solar Production: <span id="production">Unknown</span></div>
<div><span>Consumption: <span id="consumption">Unknown</span></div>
<div><span>Net Energy: <span id="netgrid">Unknown</span></div>
<div id="solarchart" style="width:100%; height:600px;"></div>
<script type="text/javascript" src="js/solardash.init.js"></script>
<script type="text/javascript">
// Load testing/prod data first
loadScript("js/solardash." + document.location.protocol.slice(0, -1) + ".js", function(){
loadScript("js/solardash.main.js", function(){
// main init code
});
// main init code
});
</script>
</body>


+ 0
- 492
root/js/highcharts.js View File

@@ -1,492 +0,0 @@
/*
Highcharts JS v8.0.0 (2019-12-10)

(c) 2009-2018 Torstein Honsi

License: www.highcharts.com/license
*/
(function(S,M){"object"===typeof module&&module.exports?(M["default"]=M,module.exports=S.document?M(S):M):"function"===typeof define&&define.amd?define("highcharts/highcharts",function(){return M(S)}):(S.Highcharts&&S.Highcharts.error(16,!0),S.Highcharts=M(S))})("undefined"!==typeof window?window:this,function(S){function M(c,e,F,I){c.hasOwnProperty(e)||(c[e]=I.apply(null,F))}var J={};M(J,"parts/Globals.js",[],function(){var c="undefined"!==typeof S?S:"undefined"!==typeof window?window:{},e=c.document,
F=c.navigator&&c.navigator.userAgent||"",I=e&&e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,G=/(edge|msie|trident)/i.test(F)&&!c.opera,H=-1!==F.indexOf("Firefox"),v=-1!==F.indexOf("Chrome"),q=H&&4>parseInt(F.split("Firefox/")[1],10);return{product:"Highcharts",version:"8.0.0",deg2rad:2*Math.PI/360,doc:e,hasBidiBug:q,hasTouch:!!c.TouchEvent,isMS:G,isWebKit:-1!==F.indexOf("AppleWebKit"),isFirefox:H,isChrome:v,isSafari:!v&&-1!==F.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(F),
SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:I,win:c,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});M(J,"parts/Utilities.js",[J["parts/Globals.js"]],function(c){function e(d,a){return parseInt(d,a||10)}function F(d){return"string"===typeof d}function I(d){d=Object.prototype.toString.call(d);return"[object Array]"===d||"[object Array Iterator]"===d}function G(d,a){return!!d&&"object"===typeof d&&(!a||
!I(d))}function H(d){return G(d)&&"number"===typeof d.nodeType}function v(d){var a=d&&d.constructor;return!(!G(d,!0)||H(d)||!a||!a.name||"Object"===a.name)}function q(d){return"number"===typeof d&&!isNaN(d)&&Infinity>d&&-Infinity<d}function C(d){return"undefined"!==typeof d&&null!==d}function B(d,a,b){var h;F(a)?C(b)?d.setAttribute(a,b):d&&d.getAttribute&&((h=d.getAttribute(a))||"class"!==a||(h=d.getAttribute(a+"Name"))):A(a,function(a,h){d.setAttribute(h,a)});return h}function u(d,a){var h;d||(d=
{});for(h in a)d[h]=a[h];return d}function w(){for(var d=arguments,a=d.length,b=0;b<a;b++){var l=d[b];if("undefined"!==typeof l&&null!==l)return l}}function m(d,a){var h=function(){};h.prototype=new d;u(h.prototype,a);return h}function r(d,a){return parseFloat(d.toPrecision(a||14))}function D(d,a,b,l){d=+d||0;a=+a;var h=c.defaultOptions.lang,k=(d.toString().split(".")[1]||"").split("e")[0].length,g=d.toString().split("e");if(-1===a)a=Math.min(k,20);else if(!q(a))a=2;else if(a&&g[1]&&0>g[1]){var t=
a+ +g[1];0<=t?(g[0]=(+g[0]).toExponential(t).split("e")[0],a=t):(g[0]=g[0].split(".")[0]||0,d=20>a?(g[0]*Math.pow(10,g[1])).toFixed(a):0,g[1]=0)}var x=(Math.abs(g[1]?g[0]:d)+Math.pow(10,-Math.max(a,k)-1)).toFixed(a);k=String(e(x));t=3<k.length?k.length%3:0;b=w(b,h.decimalPoint);l=w(l,h.thousandsSep);d=(0>d?"-":"")+(t?k.substr(0,t)+l:"");d+=k.substr(t).replace(/(\d{3})(?=\d)/g,"$1"+l);a&&(d+=b+x.slice(-a));g[1]&&0!==+d&&(d+="e"+g[1]);return d}function A(d,a,b){for(var h in d)Object.hasOwnProperty.call(d,
h)&&a.call(b||d[h],d[h],h,d)}c.timers=[];var f=c.charts,b=c.doc,a=c.win;c.error=function(d,b,k,l){var h=q(d),f=h?"Highcharts error #"+d+": www.highcharts.com/errors/"+d+"/":d.toString(),g=function(){if(b)throw Error(f);a.console&&console.log(f)};if("undefined"!==typeof l){var t="";h&&(f+="?");c.objectEach(l,function(d,a){t+="\n"+a+": "+d;h&&(f+=encodeURI(a)+"="+encodeURI(d))});f+=t}k?c.fireEvent(k,"displayError",{code:d,message:f,params:l},g):g()};c.Fx=function(d,a,b){this.options=a;this.elem=d;this.prop=
b};c.Fx.prototype={dSetter:function(){var d=this.paths[0],a=this.paths[1],b=[],l=this.now,f=d.length;if(1===l)b=this.toD;else if(f===a.length&&1>l)for(;f--;){var p=parseFloat(d[f]);b[f]=isNaN(p)||"A"===a[f-4]||"A"===a[f-5]?a[f]:l*parseFloat(""+(a[f]-p))+p}else b=a;this.elem.attr("d",b,null,!0)},update:function(){var d=this.elem,a=this.prop,b=this.now,l=this.options.step;if(this[a+"Setter"])this[a+"Setter"]();else d.attr?d.element&&d.attr(a,b,null,!0):d.style[a]=b+this.unit;l&&l.call(d,b,this)},run:function(d,
b,k){var h=this,f=h.options,p=function(d){return p.stopped?!1:h.step(d)},g=a.requestAnimationFrame||function(d){setTimeout(d,13)},t=function(){for(var d=0;d<c.timers.length;d++)c.timers[d]()||c.timers.splice(d--,1);c.timers.length&&g(t)};d!==b||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=d,this.end=b,this.unit=k,this.now=this.start,this.pos=0,p.elem=this.elem,p.prop=this.prop,p()&&1===c.timers.push(p)&&g(t)):(delete f.curAnim[this.prop],f.complete&&0===Object.keys(f.curAnim).length&&
f.complete.call(this.elem))},step:function(d){var a=+new Date,b=this.options,l=this.elem,f=b.complete,p=b.duration,g=b.curAnim;if(l.attr&&!l.element)d=!1;else if(d||a>=p+this.startTime){this.now=this.end;this.pos=1;this.update();var t=g[this.prop]=!0;A(g,function(d){!0!==d&&(t=!1)});t&&f&&f.call(l);d=!1}else this.pos=b.easing((a-this.startTime)/p),this.now=this.start+(this.end-this.start)*this.pos,this.update(),d=!0;return d},initPath:function(d,a,b){function h(d){for(n=d.length;n--;){var a="M"===
d[n]||"L"===d[n];var b=/[a-zA-Z]/.test(d[n+3]);a&&b&&d.splice(n+1,0,d[n+1],d[n+2],d[n+1],d[n+2])}}function f(d,a){for(;d.length<r;){d[0]=a[r-d.length];var b=d.slice(0,c);[].splice.apply(d,[0,0].concat(b));z&&(b=d.slice(d.length-c),[].splice.apply(d,[d.length,0].concat(b)),n--)}d[0]="M"}function k(d,a){for(var b=(r-d.length)/c;0<b&&b--;)E=d.slice().splice(d.length/N-c,c*N),E[0]=a[r-c-b*c],x&&(E[c-6]=E[c-2],E[c-5]=E[c-1]),[].splice.apply(d,[d.length/N,0].concat(E)),z&&b--}a=a||"";var g=d.startX,t=d.endX,
x=-1<a.indexOf("C"),c=x?7:3,E,n;a=a.split(" ");b=b.slice();var z=d.isArea,N=z?2:1;x&&(h(a),h(b));if(g&&t){for(n=0;n<g.length;n++)if(g[n]===t[0]){var O=n;break}else if(g[0]===t[t.length-g.length+n]){O=n;var A=!0;break}else if(g[g.length-1]===t[t.length-g.length+n]){O=g.length-n;break}"undefined"===typeof O&&(a=[])}if(a.length&&q(O)){var r=b.length+O*N*c;A?(f(a,b),k(b,a)):(f(b,a),k(a,b))}return[a,b]},fillSetter:function(){c.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,
c.color(this.start).tweenTo(c.color(this.end),this.pos),null,!0)}};c.merge=function(){var d,a=arguments,b={},l=function(d,a){"object"!==typeof d&&(d={});A(a,function(b,h){!G(b,!0)||v(b)||H(b)?d[h]=a[h]:d[h]=l(d[h]||{},b)});return d};!0===a[0]&&(b=a[1],a=Array.prototype.slice.call(a,2));var f=a.length;for(d=0;d<f;d++)b=l(b,a[d]);return b};c.clearTimeout=function(d){C(d)&&clearTimeout(d)};c.css=function(d,a){c.isMS&&!c.svg&&a&&"undefined"!==typeof a.opacity&&(a.filter="alpha(opacity="+100*a.opacity+
")");u(d.style,a)};c.createElement=function(d,a,f,l,y){d=b.createElement(d);var h=c.css;a&&u(d,a);y&&h(d,{padding:"0",border:"none",margin:"0"});f&&h(d,f);l&&l.appendChild(d);return d};c.datePropsToTimestamps=function(d){A(d,function(a,b){G(a)&&"function"===typeof a.getTime?d[b]=a.getTime():(G(a)||I(a))&&c.datePropsToTimestamps(a)})};c.formatSingle=function(d,a,b){var h=/\.([0-9])/,f=c.defaultOptions.lang,k=b&&b.time||c.time;b=b&&b.numberFormatter||D;/f$/.test(d)?(h=(h=d.match(h))?h[1]:-1,null!==
a&&(a=b(a,h,f.decimalPoint,-1<d.indexOf(",")?f.thousandsSep:""))):a=k.dateFormat(d,a);return a};c.format=function(d,a,b){for(var h="{",f=!1,k,g,t,x,L=[],E;d;){h=d.indexOf(h);if(-1===h)break;k=d.slice(0,h);if(f){k=k.split(":");g=k.shift().split(".");x=g.length;E=a;for(t=0;t<x;t++)E&&(E=E[g[t]]);k.length&&(E=c.formatSingle(k.join(":"),E,b));L.push(E)}else L.push(k);d=d.slice(h+1);h=(f=!f)?"}":"{"}L.push(d);return L.join("")};c.getMagnitude=function(d){return Math.pow(10,Math.floor(Math.log(d)/Math.LN10))};
c.normalizeTickInterval=function(d,a,b,l,f){var h=d;b=w(b,1);var g=d/b;a||(a=f?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===l&&(1===b?a=a.filter(function(d){return 0===d%1}):.1>=b&&(a=[1/b])));for(l=0;l<a.length&&!(h=a[l],f&&h*b>=d||!f&&g<=(a[l]+(a[l+1]||a[l]))/2);l++);return h=r(h*b,-Math.round(Math.log(.001)/Math.LN10))};c.stableSort=function(d,a){var b=d.length,h,f;for(f=0;f<b;f++)d[f].safeI=f;d.sort(function(d,b){h=a(d,b);return 0===h?d.safeI-b.safeI:h});for(f=0;f<b;f++)delete d[f].safeI};
c.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};Math.easeInOutSine=function(d){return-.5*(Math.cos(Math.PI*d)-1)};c.getStyle=function(d,b,f){if("width"===b)return b=Math.min(d.offsetWidth,d.scrollWidth),f=d.getBoundingClientRect&&d.getBoundingClientRect().width,f<b&&f>=b-1&&(b=Math.floor(f)),Math.max(0,b-c.getStyle(d,"padding-left")-c.getStyle(d,"padding-right"));if("height"===b)return Math.max(0,Math.min(d.offsetHeight,d.scrollHeight)-
c.getStyle(d,"padding-top")-c.getStyle(d,"padding-bottom"));a.getComputedStyle||c.error(27,!0);if(d=a.getComputedStyle(d,void 0))d=d.getPropertyValue(b),w(f,"opacity"!==b)&&(d=e(d));return d};c.inArray=function(d,a,b){return a.indexOf(d,b)};c.find=Array.prototype.find?function(d,a){return d.find(a)}:function(d,a){var b,h=d.length;for(b=0;b<h;b++)if(a(d[b],b))return d[b]};c.keys=Object.keys;c.stop=function(d,a){for(var b=c.timers.length;b--;)c.timers[b].elem!==d||a&&a!==c.timers[b].prop||(c.timers[b].stopped=
!0)};A({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(d,a){c[a]=function(a){return Array.prototype[d].apply(a,[].slice.call(arguments,1))}});c.addEvent=function(d,a,b,f){void 0===f&&(f={});var h=d.addEventListener||c.addEventListenerPolyfill;var l="function"===typeof d&&d.prototype?d.prototype.protoEvents=d.prototype.protoEvents||{}:d.hcEvents=d.hcEvents||{};c.Point&&d instanceof c.Point&&d.series&&d.series.chart&&(d.series.chart.runTrackerClick=!0);h&&h.call(d,a,b,
!1);l[a]||(l[a]=[]);l[a].push({fn:b,order:"number"===typeof f.order?f.order:Infinity});l[a].sort(function(d,a){return d.order-a.order});return function(){c.removeEvent(d,a,b)}};c.removeEvent=function(d,a,b){function h(a,b){var g=d.removeEventListener||c.removeEventListenerPolyfill;g&&g.call(d,a,b,!1)}function f(b){var g;if(d.nodeName){if(a){var f={};f[a]=!0}else f=b;A(f,function(d,a){if(b[a])for(g=b[a].length;g--;)h(a,b[a][g].fn)})}}var k;["protoEvents","hcEvents"].forEach(function(g,t){var l=(t=
t?d:d.prototype)&&t[g];l&&(a?(k=l[a]||[],b?(l[a]=k.filter(function(a){return b!==a.fn}),h(a,b)):(f(l),l[a]=[])):(f(l),t[g]={}))})};c.fireEvent=function(a,h,f,l){var d;f=f||{};if(b.createEvent&&(a.dispatchEvent||a.fireEvent)){var k=b.createEvent("Events");k.initEvent(h,!0,!0);u(k,f);a.dispatchEvent?a.dispatchEvent(k):a.fireEvent(h,k)}else f.target||u(f,{preventDefault:function(){f.defaultPrevented=!0},target:a,type:h}),function(b,h){void 0===b&&(b=[]);void 0===h&&(h=[]);var g=0,t=0,l=b.length+h.length;
for(d=0;d<l;d++)!1===(b[g]?h[t]?b[g].order<=h[t].order?b[g++]:h[t++]:b[g++]:h[t++]).fn.call(a,f)&&f.preventDefault()}(a.protoEvents&&a.protoEvents[h],a.hcEvents&&a.hcEvents[h]);l&&!f.defaultPrevented&&l.call(a,f)};c.animate=function(a,b,f){var d,h="",k,g;if(!G(f)){var t=arguments;f={duration:t[2],easing:t[3],complete:t[4]}}q(f.duration)||(f.duration=400);f.easing="function"===typeof f.easing?f.easing:Math[f.easing]||Math.easeInOutSine;f.curAnim=c.merge(b);A(b,function(t,l){c.stop(a,l);g=new c.Fx(a,
f,l);k=null;"d"===l?(g.paths=g.initPath(a,a.d,b.d),g.toD=b.d,d=0,k=1):a.attr?d=a.attr(l):(d=parseFloat(c.getStyle(a,l))||0,"opacity"!==l&&(h="px"));k||(k=t);k&&k.match&&k.match("px")&&(k=k.replace(/px/g,""));g.run(d,k,h)})};c.seriesType=function(a,b,f,l,y){var d=c.getOptions(),g=c.seriesTypes;d.plotOptions[a]=c.merge(d.plotOptions[b],f);g[a]=m(g[b]||function(){},l);g[a].prototype.type=a;y&&(g[a].prototype.pointClass=m(c.Point,y));return g[a]};c.uniqueKey=function(){var a=Math.random().toString(36).substring(2,
9),b=0;return function(){return"highcharts-"+a+"-"+b++}}();c.isFunction=function(a){return"function"===typeof a};a.jQuery&&(a.jQuery.fn.highcharts=function(){var a=[].slice.call(arguments);if(this[0])return a[0]?(new (c[F(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):f[B(this[0],"data-highcharts-chart")]});return{animObject:function(a){return G(a)?c.merge(a):{duration:a?500:0}},arrayMax:function(a){for(var d=a.length,b=a[0];d--;)a[d]>b&&(b=a[d]);return b},arrayMin:function(a){for(var d=a.length,
b=a[0];d--;)a[d]<b&&(b=a[d]);return b},attr:B,clamp:function(a,b,f){return a>b?a<f?a:f:b},correctFloat:r,defined:C,destroyObjectProperties:function(a,b){A(a,function(d,h){d&&d!==b&&d.destroy&&d.destroy();delete a[h]})},discardElement:function(a){var d=c.garbageBin;d||(d=c.createElement("div"));a&&d.appendChild(a);d.innerHTML=""},erase:function(a,b){for(var d=a.length;d--;)if(a[d]===b){a.splice(d,1);break}},extend:u,extendClass:m,isArray:I,isClass:v,isDOMElement:H,isNumber:q,isObject:G,isString:F,
numberFormat:D,objectEach:A,offset:function(d){var h=b.documentElement;d=d.parentElement||d.parentNode?d.getBoundingClientRect():{top:0,left:0};return{top:d.top+(a.pageYOffset||h.scrollTop)-(h.clientTop||0),left:d.left+(a.pageXOffset||h.scrollLeft)-(h.clientLeft||0)}},pad:function(a,b,f){return Array((b||2)+1-String(a).replace("-","").length).join(f||"0")+a},pick:w,pInt:e,relativeLength:function(a,b,f){return/%$/.test(a)?b*parseFloat(a)/100+(f||0):parseFloat(a)},setAnimation:function(a,b){b.renderer.globalAnimation=
w(a,b.options.chart.animation,!0)},splat:function(a){return I(a)?a:[a]},syncTimeout:function(a,b,f){if(0<b)return setTimeout(a,b,f);a.call(0,f);return-1},wrap:function(a,b,f){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments),b=arguments,g=this;g.proceed=function(){d.apply(g,arguments.length?arguments:b)};a.unshift(d);a=f.apply(this,a);g.proceed=null;return a}}}});M(J,"parts/Color.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.isNumber,I=e.pInt,G=c.merge;
c.Color=function(e){if(!(this instanceof c.Color))return new c.Color(e);this.init(e)};c.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(c){return[I(c[1]),I(c[2]),I(c[3]),parseFloat(c[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(c){return[I(c[1]),I(c[2]),I(c[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(e){var v,q;if((this.input=e=this.names[e&&
e.toLowerCase?e.toLowerCase():""]||e)&&e.stops)this.stops=e.stops.map(function(e){return new c.Color(e[1])});else{if(e&&e.charAt&&"#"===e.charAt()){var C=e.length;e=parseInt(e.substr(1),16);7===C?v=[(e&16711680)>>16,(e&65280)>>8,e&255,1]:4===C&&(v=[(e&3840)>>4|(e&3840)>>8,(e&240)>>4|e&240,(e&15)<<4|e&15,1])}if(!v)for(q=this.parsers.length;q--&&!v;){var H=this.parsers[q];(C=H.regex.exec(e))&&(v=H.parse(C))}}this.rgba=v||[]},get:function(c){var e=this.input,q=this.rgba;if(this.stops){var C=G(e);C.stops=
[].concat(C.stops);this.stops.forEach(function(e,q){C.stops[q]=[C.stops[q][0],e.get(c)]})}else C=q&&F(q[0])?"rgb"===c||!c&&1===q[3]?"rgb("+q[0]+","+q[1]+","+q[2]+")":"a"===c?q[3]:"rgba("+q.join(",")+")":e;return C},brighten:function(c){var e,q=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(c)});else if(F(c)&&0!==c)for(e=0;3>e;e++)q[e]+=I(255*c),0>q[e]&&(q[e]=0),255<q[e]&&(q[e]=255);return this},setOpacity:function(c){this.rgba[3]=c;return this},tweenTo:function(c,e){var q=this.rgba,
v=c.rgba;v.length&&q&&q.length?(c=1!==v[3]||1!==q[3],e=(c?"rgba(":"rgb(")+Math.round(v[0]+(q[0]-v[0])*(1-e))+","+Math.round(v[1]+(q[1]-v[1])*(1-e))+","+Math.round(v[2]+(q[2]-v[2])*(1-e))+(c?","+(v[3]+(q[3]-v[3])*(1-e)):"")+")"):e=c.input||"none";return e}};c.color=function(e){return new c.Color(e)}});M(J,"parts/SvgRenderer.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.animObject,I=e.attr,G=e.defined,H=e.destroyObjectProperties,v=e.erase,q=e.extend,C=e.isArray,B=e.isNumber,
u=e.isObject,w=e.isString,m=e.objectEach,r=e.pick,D=e.pInt,A=e.splat,f=c.addEvent,b=c.animate,a=c.charts,d=c.color,h=c.css,k=c.createElement,l=c.deg2rad,y=c.doc,p=c.hasTouch,g=c.isFirefox,t=c.isMS,x=c.isWebKit,L=c.merge,E=c.noop,n=c.removeEvent,z=c.stop,N=c.svg,O=c.SVG_NS,V=c.symbolSizes,T=c.win;var P=c.SVGElement=function(){return this};q(P.prototype,{opacity:1,SVG_NS:O,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),
init:function(a,b){this.element="span"===b?k(b):y.createElementNS(this.SVG_NS,b);this.renderer=a;c.fireEvent(this,"afterInit")},animate:function(a,d,n){var K=F(r(d,this.renderer.globalAnimation,!0));r(y.hidden,y.msHidden,y.webkitHidden,!1)&&(K.duration=0);0!==K.duration?(n&&(K.complete=n),b(this,a,K)):(this.attr(a,void 0,n),m(a,function(a,b){K.step&&K.step.call(this,a,{prop:b,pos:1})},this));return this},complexColor:function(a,b,d){var n=this.renderer,K,Q,g,z,f,h,t,l,R,x,k,N=[],p;c.fireEvent(this.renderer,
"complexColor",{args:arguments},function(){a.radialGradient?Q="radialGradient":a.linearGradient&&(Q="linearGradient");Q&&(g=a[Q],f=n.gradients,t=a.stops,x=d.radialReference,C(g)&&(a[Q]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===Q&&x&&!G(g.gradientUnits)&&(z=g,g=L(g,n.getRadialAttr(x,z),{gradientUnits:"userSpaceOnUse"})),m(g,function(a,b){"id"!==b&&N.push(b,a)}),m(t,function(a){N.push(a)}),N=N.join(","),f[N]?k=f[N].attr("id"):(g.id=k=c.uniqueKey(),f[N]=h=
n.createElement(Q).attr(g).add(n.defs),h.radAttr=z,h.stops=[],t.forEach(function(a){0===a[1].indexOf("rgba")?(K=c.color(a[1]),l=K.get("rgb"),R=K.get("a")):(l=a[1],R=1);a=n.createElement("stop").attr({offset:a[0],"stop-color":l,"stop-opacity":R}).add(h);h.stops.push(a)})),p="url("+n.url+"#"+k+")",d.setAttribute(b,p),d.gradient=N,a.toString=function(){return p})})},applyTextOutline:function(a){var b=this.element,d;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(b.style.fill)));
a=a.split(" ");var n=a[a.length-1];if((d=a[0])&&"none"!==d&&c.svg){this.fakeTS=!0;a=[].slice.call(b.getElementsByTagName("tspan"));this.ySetter=this.xSetter;d=d.replace(/(^[\d\.]+)(.*?)$/g,function(a,b,d){return 2*b+d});this.removeTextOutline(a);var g=b.firstChild;a.forEach(function(a,K){0===K&&(a.setAttribute("x",b.getAttribute("x")),K=b.getAttribute("y"),a.setAttribute("y",K||0),null===K&&b.setAttribute("y",0));a=a.cloneNode(1);I(a,{"class":"highcharts-text-outline",fill:n,stroke:n,"stroke-width":d,
"stroke-linejoin":"round"});b.insertBefore(a,g)})}},removeTextOutline:function(a){for(var b=a.length,d;b--;)d=a[b],"highcharts-text-outline"===d.getAttribute("class")&&v(a,this.element.removeChild(d))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(a,b,d,n){var g=this.element,K,Q=this,f,h,t=this.symbolCustomAttribs;if("string"===typeof a&&"undefined"!==typeof b){var l=a;a={};a[l]=b}"string"===typeof a?Q=(this[a+"Getter"]||this._defaultGetter).call(this,
a,g):(m(a,function(b,d){f=!1;n||z(this,d);this.symbolName&&-1!==c.inArray(d,t)&&(K||(this.symbolAttr(a),K=!0),f=!0);!this.rotation||"x"!==d&&"y"!==d||(this.doTransform=!0);f||(h=this[d+"Setter"]||this._defaultSetter,h.call(this,b,d,g),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(d)&&this.updateShadows(d,b,h))},this),this.afterSetters());d&&d.call(this);return Q},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,
b,d){for(var n=this.shadows,g=n.length;g--;)d.call(n[g],"height"===a?Math.max(b-(n[g].cutHeight||0),0):"d"===a?this.d:b,a,n[g])},addClass:function(a,b){var d=b?"":this.attr("class")||"";a=(a||"").split(/ /g).reduce(function(a,b){-1===d.indexOf(b)&&a.push(b);return a},d?[d]:[]).join(" ");a!==d&&this.attr("class",a);return this},hasClass:function(a){return-1!==(this.attr("class")||"").split(" ").indexOf(a)},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(w(a)?new RegExp(" ?"+
a+" ?"):a,""))},symbolAttr:function(a){var b=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(d){b[d]=r(a[d],b[d])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,b){b=b||a.strokeWidth||0;var d=Math.round(b)%2/2;a.x=Math.floor(a.x||this.x||0)+d;a.y=Math.floor(a.y||this.y||0)+d;a.width=Math.floor((a.width||this.width||
0)-2*d);a.height=Math.floor((a.height||this.height||0)-2*d);G(a.strokeWidth)&&(a.strokeWidth=b);return a},css:function(a){var b=this.styles,d={},n=this.element,g="",z=!b,f=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);b&&m(a,function(a,n){a!==b[n]&&(d[n]=a,z=!0)});if(z){b&&(a=q(b,d));if(a)if(null===a.width||"auto"===a.width)delete this.textWidth;else if("text"===n.nodeName.toLowerCase()&&a.width)var Q=this.textWidth=D(a.width);this.styles=a;Q&&!N&&this.renderer.forExport&&delete a.width;
if(n.namespaceURI===this.SVG_NS){var t=function(a,b){return"-"+b.toLowerCase()};m(a,function(a,b){-1===f.indexOf(b)&&(g+=b.replace(/([A-Z])/g,t)+":"+a+";")});g&&I(n,"style",g)}else h(n,a);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this},getStyle:function(a){return T.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]||
0;var a=this.getStyle("stroke-width"),b=0;if(a.indexOf("px")===a.length-2)b=D(a);else if(""!==a){var d=y.createElementNS(O,"rect");I(d,{width:a,"stroke-width":0});this.element.parentNode.appendChild(d);b=d.getBBox().width;d.parentNode.removeChild(d)}return b},on:function(a,b){var d=this,n=d.element;p&&"click"===a?(n.ontouchstart=function(a){d.touchEventFired=Date.now();a.preventDefault();b.call(n,a)},n.onclick=function(a){(-1===T.navigator.userAgent.indexOf("Android")||1100<Date.now()-(d.touchEventFired||
0))&&b.call(n,a)}):n["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,d=this.scaleX,n=this.scaleY,g=this.inverted,z=this.rotation,
f=this.matrix,h=this.element;g&&(a+=this.width,b+=this.height);a=["translate("+a+","+b+")"];G(f)&&a.push("matrix("+f.join(",")+")");g?a.push("rotate(90) scale(-1,1)"):z&&a.push("rotate("+z+" "+r(this.rotationOriginX,h.getAttribute("x"),0)+" "+r(this.rotationOriginY,h.getAttribute("y")||0)+")");(G(d)||G(n))&&a.push("scale("+r(d,1)+" "+r(n,1)+")");a.length&&h.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,d){var n,
g={};var z=this.renderer;var f=z.alignedObjects;var K,h;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!d||w(d))this.alignTo=n=d||"renderer",v(f,this),f.push(this),d=null}else a=this.alignOptions,b=this.alignByTranslate,n=this.alignTo;d=r(d,z[n],z);n=a.align;z=a.verticalAlign;f=(d.x||0)+(a.x||0);var t=(d.y||0)+(a.y||0);"right"===n?K=1:"center"===n&&(K=2);K&&(f+=(d.width-(a.width||0))/K);g[b?"translateX":"x"]=Math.round(f);"bottom"===z?h=1:"middle"===z&&(h=2);h&&(t+=(d.height-(a.height||0))/
h);g[b?"translateY":"y"]=Math.round(t);this[this.placed?"animate":"attr"](g);this.placed=!0;this.alignAttr=g;return this},getBBox:function(a,b){var d,n=this.renderer,g=this.element,z=this.styles,f=this.textStr,K,h=n.cache,t=n.cacheKeys,Q=g.namespaceURI===this.SVG_NS;b=r(b,this.rotation,0);var x=n.styledMode?g&&P.prototype.getStyle.call(g,"font-size"):z&&z.fontSize;if(G(f)){var c=f.toString();-1===c.indexOf("<")&&(c=c.replace(/[0-9]/g,"0"));c+=["",b,x,this.textWidth,z&&z.textOverflow].join()}c&&!a&&
(d=h[c]);if(!d){if(Q||n.forExport){try{(K=this.fakeTS&&function(a){[].forEach.call(g.querySelectorAll(".highcharts-text-outline"),function(b){b.style.display=a})})&&K("none"),d=g.getBBox?q({},g.getBBox()):{width:g.offsetWidth,height:g.offsetHeight},K&&K("")}catch(ca){""}if(!d||0>d.width)d={width:0,height:0}}else d=this.htmlGetBBox();n.isSVG&&(a=d.width,n=d.height,Q&&(d.height=n={"11px,17":14,"13px,20":16}[z&&z.fontSize+","+Math.round(n)]||n),b&&(z=b*l,d.width=Math.abs(n*Math.sin(z))+Math.abs(a*Math.cos(z)),
d.height=Math.abs(n*Math.cos(z))+Math.abs(a*Math.sin(z))));if(c&&0<d.height){for(;250<t.length;)delete h[t.shift()];h[c]||t.push(c);h[c]=d}}return d},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(a){a?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,d=this.element;a&&(this.parentGroup=a);this.parentInverted=
a&&a.inverted;"undefined"!==typeof this.textStr&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var n=this.zIndexSetter();n||(a?a.element:b.box).appendChild(d);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},d=a.renderer,n=d.isSVG&&"SPAN"===b.nodeName&&a.parentGroup,g=b.ownerSVGElement,f=a.clipPath;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;z(a);f&&g&&([].forEach.call(g.querySelectorAll("[clip-path],[CLIP-PATH]"),
function(a){-1<a.getAttribute("clip-path").indexOf(f.element.id)&&a.removeAttribute("clip-path")}),a.clipPath=f.destroy());if(a.stops){for(g=0;g<a.stops.length;g++)a.stops[g]=a.stops[g].destroy();a.stops=null}a.safeRemoveChild(b);for(d.styledMode||a.destroyShadows();n&&n.div&&0===n.div.childNodes.length;)b=n.parentGroup,a.safeRemoveChild(n.div),delete n.div,n=b;a.alignTo&&v(d.alignedObjects,a);m(a,function(b,d){a[d]&&a[d].parentGroup===a&&a[d].destroy&&a[d].destroy();delete a[d]})},shadow:function(a,
b,d){var n=[],g,z=this.element;if(!a)this.destroyShadows();else if(!this.shadows){var f=r(a.width,3);var h=(a.opacity||.15)/f;var K=this.parentInverted?"(-1,-1)":"("+r(a.offsetX,1)+", "+r(a.offsetY,1)+")";for(g=1;g<=f;g++){var t=z.cloneNode(0);var l=2*f+1-2*g;I(t,{stroke:a.color||"#000000","stroke-opacity":h*g,"stroke-width":l,transform:"translate"+K,fill:"none"});t.setAttribute("class",(t.getAttribute("class")||"")+" highcharts-shadow");d&&(I(t,"height",Math.max(I(t,"height")-l,0)),t.cutHeight=l);
b?b.element.appendChild(t):z.parentNode&&z.parentNode.insertBefore(t,z);n.push(t)}this.shadows=n}return this},destroyShadows:function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=r(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},
dSetter:function(a,b,d){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[b]!==a&&(d.setAttribute(b,a),this[b]=a)},dashstyleSetter:function(a){var b,d=this["stroke-width"];"inherit"===d&&(d=1);if(a=a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=a.length;b--;)a[b]=D(a[b])*
d;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){var b={left:"start",center:"middle",right:"end"};b[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",b[a]))},opacitySetter:function(a,b,d){this[b]=a;d.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=y.createElementNS(this.SVG_NS,"title"),this.element.appendChild(b));b.firstChild&&b.removeChild(b.firstChild);b.appendChild(y.createTextNode(String(r(a,
"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(a,b){var d=this.element,n={textAnchor:"text-anchor"},g=!1,z=this.textPathWrapper,f=!z;b=L(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},b);var h=b.attributes;if(a&&b&&b.enabled){z&&null===z.element.parentNode?(f=!0,z=z.destroy()):z&&this.removeTextOutline.call(z.parentGroup,
[].slice.call(d.getElementsByTagName("tspan")));this.options&&this.options.padding&&(h.dx=-this.options.padding);z||(this.textPathWrapper=z=this.renderer.createElement("textPath"),g=!0);var t=z.element;(b=a.element.getAttribute("id"))||a.element.setAttribute("id",b=c.uniqueKey());if(f)for(a=d.getElementsByTagName("tspan");a.length;)a[0].setAttribute("y",0),B(h.dx)&&a[0].setAttribute("x",-h.dx),t.appendChild(a[0]);g&&z.add({element:this.text?this.text.element:d});t.setAttributeNS("http://www.w3.org/1999/xlink",
"href",this.renderer.url+"#"+b);G(h.dy)&&(t.parentNode.setAttribute("dy",h.dy),delete h.dy);G(h.dx)&&(t.parentNode.setAttribute("dx",h.dx),delete h.dx);m(h,function(a,b){t.setAttribute(n[b]||b,a)});d.removeAttribute("transform");this.removeTextOutline.call(z,[].slice.call(d.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=E}else z&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(d,
a),this.updateTransform(),this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this},destroyTextPath:function(a,b){var d=a.getElementsByTagName("text")[0];if(d){if(d.removeAttribute("dx"),d.removeAttribute("dy"),b.element.setAttribute("id",""),d.getElementsByTagName("textPath").length){for(a=this.textPathWrapper.element.childNodes;a.length;)d.appendChild(a[0]);d.removeChild(this.textPathWrapper.element)}}else if(a.getAttribute("dx")||a.getAttribute("dy"))a.removeAttribute("dx"),
a.removeAttribute("dy");this.textPathWrapper=this.textPathWrapper.destroy()},fillSetter:function(a,b,d){"string"===typeof a?d.setAttribute(b,a):a&&this.complexColor(a,b,d)},visibilitySetter:function(a,b,d){"inherit"===a?d.removeAttribute(b):this[b]!==a&&d.setAttribute(b,a);this[b]=a},zIndexSetter:function(a,b){var d=this.renderer,n=this.parentGroup,g=(n||d).element||d.box,z=this.element,f=!1;d=g===d.box;var h=this.added;var t;G(a)?(z.setAttribute("data-z-index",a),a=+a,this[b]===a&&(h=!1)):G(this[b])&&
z.removeAttribute("data-z-index");this[b]=a;if(h){(a=this.zIndex)&&n&&(n.handleZ=!0);b=g.childNodes;for(t=b.length-1;0<=t&&!f;t--){n=b[t];h=n.getAttribute("data-z-index");var l=!G(h);if(n!==z)if(0>a&&l&&!d&&!t)g.insertBefore(z,b[t]),f=!0;else if(D(h)<=a||l&&(!G(a)||0<=a))g.insertBefore(z,b[t+1]||null),f=!0}f||(g.insertBefore(z,b[d?3:0]||null),f=!0)}return f},_defaultSetter:function(a,b,d){d.setAttribute(b,a)}});P.prototype.yGetter=P.prototype.xGetter;P.prototype.translateXSetter=P.prototype.translateYSetter=
P.prototype.rotationSetter=P.prototype.verticalAlignSetter=P.prototype.rotationOriginXSetter=P.prototype.rotationOriginYSetter=P.prototype.scaleXSetter=P.prototype.scaleYSetter=P.prototype.matrixSetter=function(a,b){this[b]=a;this.doTransform=!0};P.prototype["stroke-widthSetter"]=P.prototype.strokeSetter=function(a,b,d){this[b]=a;this.stroke&&this["stroke-width"]?(P.prototype.fillSetter.call(this,this.stroke,"stroke",d),d.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===
b&&0===a&&this.hasStroke?(d.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(d.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};e=c.SVGRenderer=function(){this.init.apply(this,arguments)};q(e.prototype,{Element:P,SVG_NS:O,init:function(a,b,d,n,z,t,l){var K=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});l||K.css(this.getStyle(n));n=K.element;a.appendChild(n);I(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&
I(n,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=n;this.boxWrapper=K;this.alignedObjects=[];this.url=(g||x)&&y.getElementsByTagName("base").length?T.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(y.createTextNode("Created with Highcharts 8.0.0"));this.defs=this.createElement("defs").add();this.allowHTML=t;this.forExport=z;this.styledMode=l;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=
0;this.setSize(b,d,!1);var c;g&&a.getBoundingClientRect&&(b=function(){h(a,{left:0,top:0});c=a.getBoundingClientRect();h(a,{left:Math.ceil(c.left)-c.left+"px",top:Math.ceil(c.top)-c.top+"px"})},b(),this.unSubPixelFix=f(T,"resize",b))},definition:function(a){function b(a,n){var g;A(a).forEach(function(a){var z=d.createElement(a.tagName),f={};m(a,function(a,b){"tagName"!==b&&"children"!==b&&"textContent"!==b&&(f[b]=a)});z.attr(f);z.add(n||d.defs);a.textContent&&z.element.appendChild(y.createTextNode(a.textContent));
b(a.children||[],z);g=z});return g}var d=this;return b(a)},getStyle:function(a){return this.style=q({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();H(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&
this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:E,getRadialAttr:function(a,b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},truncate:function(a,b,d,n,g,z,f){var h=this,t=a.rotation,l,K=n?1:0,x=(d||n).length,c=x,k=[],N=function(a){b.firstChild&&b.removeChild(b.firstChild);a&&b.appendChild(y.createTextNode(a))},p=function(z,t){t=t||z;if("undefined"===typeof k[t])if(b.getSubStringLength)try{k[t]=
g+b.getSubStringLength(0,n?t+1:t)}catch(ea){""}else h.getSpanWidth&&(N(f(d||n,z)),k[t]=g+h.getSpanWidth(a,b));return k[t]},R;a.rotation=0;var O=p(b.textContent.length);if(R=g+O>z){for(;K<=x;)c=Math.ceil((K+x)/2),n&&(l=f(n,c)),O=p(c,l&&l.length-1),K===x?K=x+1:O>z?x=c-1:K=c;0===x?N(""):d&&x===d.length-1||N(l||f(d||n,c))}n&&n.splice(0,c);a.actualWidth=O;a.rotation=t;return R},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(a){var b=a.element,d=this,n=d.forExport,
g=r(a.textStr,"").toString(),z=-1!==g.indexOf("<"),f=b.childNodes,t,l=I(b,"x"),x=a.styles,c=a.textWidth,k=x&&x.lineHeight,p=x&&x.textOutline,L=x&&"ellipsis"===x.textOverflow,E=x&&"nowrap"===x.whiteSpace,A=x&&x.fontSize,Q,e=f.length;x=c&&!a.added&&this.box;var V=function(a){var n;d.styledMode||(n=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:A||d.style.fontSize||12);return k?D(k):d.fontMetrics(n,a.getAttribute("style")?a:b).h},q=function(a,b){m(d.escapes,function(d,n){b&&-1!==b.indexOf(d)||
(a=a.toString().replace(new RegExp(d,"g"),n))});return a},P=function(a,b){var d=a.indexOf("<");a=a.substring(d,a.indexOf(">")-d);d=a.indexOf(b+"=");if(-1!==d&&(d=d+b.length+1,b=a.charAt(d),'"'===b||"'"===b))return a=a.substring(d+1),a.substring(0,a.indexOf(b))},T=/<br.*?>/g;var u=[g,L,E,k,p,A,c].join();if(u!==a.textCache){for(a.textCache=u;e--;)b.removeChild(f[e]);z||p||L||c||-1!==g.indexOf(" ")&&(!E||T.test(g))?(x&&x.appendChild(b),z?(g=d.styledMode?g.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,
'<span class="highcharts-emphasized">'):g.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),g=g.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(T)):g=[g],g=g.filter(function(a){return""!==a}),g.forEach(function(g,z){var f=0,x=0;g=g.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");var K=g.split("|||");K.forEach(function(g){if(""!==g||1===K.length){var k={},p=y.createElementNS(d.SVG_NS,
"tspan"),R,r;(R=P(g,"class"))&&I(p,"class",R);if(R=P(g,"style"))R=R.replace(/(;| |^)color([ :])/,"$1fill$2"),I(p,"style",R);(r=P(g,"href"))&&!n&&(I(p,"onclick",'location.href="'+r+'"'),I(p,"class","highcharts-anchor"),d.styledMode||h(p,{cursor:"pointer"}));g=q(g.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==g){p.appendChild(y.createTextNode(g));f?k.dx=0:z&&null!==l&&(k.x=l);I(p,k);b.appendChild(p);!f&&Q&&(!N&&n&&h(p,{display:"block"}),I(p,"dy",V(p)));if(c){var m=g.replace(/([^\^])-/g,"$1- ").split(" ");
k=!E&&(1<K.length||z||1<m.length);r=0;var e=V(p);if(L)t=d.truncate(a,p,g,void 0,0,Math.max(0,c-parseInt(A||12,10)),function(a,b){return a.substring(0,b)+"\u2026"});else if(k)for(;m.length;)m.length&&!E&&0<r&&(p=y.createElementNS(O,"tspan"),I(p,{dy:e,x:l}),R&&I(p,"style",R),p.appendChild(y.createTextNode(m.join(" ").replace(/- /g,"-"))),b.appendChild(p)),d.truncate(a,p,null,m,0===r?x:0,c,function(a,b){return m.slice(0,b).join(" ").replace(/- /g,"-")}),x=a.actualWidth,r++}f++}}});Q=Q||b.childNodes.length}),
L&&t&&a.attr("title",q(a.textStr,["&lt;","&gt;"])),x&&x.removeChild(b),p&&a.applyTextOutline&&a.applyTextOutline(p)):b.appendChild(y.createTextNode(q(g)))}},getContrast:function(a){a=d(a).rgba;a[0]*=1;a[1]*=1.2;a[2]*=.5;return 459<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,b,d,n,g,z,h,l,x,c){var K=this.label(a,b,d,x,null,null,c,null,"button"),k=0,N=this.styledMode;K.attr(L({padding:8,r:2},g));if(!N){g=L({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",
fontWeight:"normal"}},g);var p=g.style;delete g.style;z=L(g,{fill:"#e6e6e6"},z);var O=z.style;delete z.style;h=L(g,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},h);var R=h.style;delete h.style;l=L(g,{style:{color:"#cccccc"}},l);var E=l.style;delete l.style}f(K.element,t?"mouseover":"mouseenter",function(){3!==k&&K.setState(1)});f(K.element,t?"mouseout":"mouseleave",function(){3!==k&&K.setState(k)});K.setState=function(a){1!==a&&(K.state=k=a);K.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+
["normal","hover","pressed","disabled"][a||0]);N||K.attr([g,z,h,l][a||0]).css([p,O,R,E][a||0])};N||K.attr(g).css(q({cursor:"default"},p));return K.on("click",function(a){3!==k&&n.call(K,a)})},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+b%2/2);return a},path:function(a){var b=this.styledMode?{}:{fill:"none"};C(a)?b.d=a:u(a)&&q(b,a);return this.createElement("path").attr(b)},circle:function(a,b,d){a=u(a)?a:"undefined"===typeof a?{}:
{x:a,y:b,r:d};b=this.createElement("circle");b.xSetter=b.ySetter=function(a,b,d){d.setAttribute("c"+b,a)};return b.attr(a)},arc:function(a,b,d,n,g,z){u(a)?(n=a,b=n.y,d=n.r,a=n.x):n={innerR:n,start:g,end:z};a=this.symbol("arc",a,b,d,d,n);a.r=d;return a},rect:function(a,b,d,n,g,z){g=u(a)?a.r:g;var f=this.createElement("rect");a=u(a)?a:"undefined"===typeof a?{}:{x:a,y:b,width:Math.max(d,0),height:Math.max(n,0)};this.styledMode||("undefined"!==typeof z&&(a.strokeWidth=z,a=f.crisp(a)),a.fill="none");g&&
(a.r=g);f.rSetter=function(a,b,d){f.r=a;I(d,{rx:a,ry:a})};f.rGetter=function(){return f.r};return f.attr(a)},setSize:function(a,b,d){var n=this.alignedObjects,g=n.length;this.width=a;this.height=b;for(this.boxWrapper.animate({width:a,height:b},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:r(d,!0)?void 0:0});g--;)n[g].align()},g:function(a){var b=this.createElement("g");return a?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,d,n,g,z){var h=
{preserveAspectRatio:"none"},t=function(a,b){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",b):a.setAttribute("hc-svg-href",b)},l=function(b){t(x.element,a);z.call(x,b)};1<arguments.length&&q(h,{x:b,y:d,width:n,height:g});var x=this.createElement("image").attr(h);z?(t(x.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),h=new T.Image,f(h,"load",l),h.src=a,h.complete&&l({})):t(x.element,a);return x},symbol:function(b,d,n,g,z,f){var t=this,
l=/^url\((.*?)\)$/,x=l.test(b),c=!x&&(this.symbols[b]?b:"circle"),K=c&&this.symbols[c],N=G(d)&&K&&K.call(this.symbols,Math.round(d),Math.round(n),g,z,f);if(K){var p=this.path(N);t.styledMode||p.attr("fill","none");q(p,{symbolName:c,x:d,y:n,width:g,height:z});f&&q(p,f)}else if(x){var O=b.match(l)[1];p=this.image(O);p.imgwidth=r(V[O]&&V[O].width,f&&f.width);p.imgheight=r(V[O]&&V[O].height,f&&f.height);var R=function(){p.attr({width:p.width,height:p.height})};["width","height"].forEach(function(a){p[a+
"Setter"]=function(a,b){var d={},n=this["img"+b],g="width"===b?"translateX":"translateY";this[b]=a;G(n)&&(f&&"within"===f.backgroundSize&&this.width&&this.height&&(n=Math.round(n*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(b,n),this.alignByTranslate||(d[g]=((this[b]||0)-n)/2,this.attr(d)))}});G(d)&&p.attr({x:d,y:n});p.isImg=!0;G(p.imgwidth)&&G(p.imgheight)?R():(p.attr({width:0,height:0}),k("img",{onload:function(){var b=a[t.chartIndex];0===
this.width&&(h(this,{position:"absolute",top:"-999em"}),y.body.appendChild(this));V[O]={width:this.width,height:this.height};p.imgwidth=this.width;p.imgheight=this.height;p.element&&R();this.parentNode&&this.parentNode.removeChild(this);t.imgCount--;if(!t.imgCount&&b&&b.onload)b.onload()},src:O}),this.imgCount++)}return p},symbols:{circle:function(a,b,d,n){return this.arc(a+d/2,b+n/2,d/2,n/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(a,b,d,n){return["M",a,b,"L",a+d,b,a+d,b+n,a,b+
n,"Z"]},triangle:function(a,b,d,n){return["M",a+d/2,b,"L",a+d,b+n,a,b+n,"Z"]},"triangle-down":function(a,b,d,n){return["M",a,b,"L",a+d,b,a+d/2,b+n,"Z"]},diamond:function(a,b,d,n){return["M",a+d/2,b,"L",a+d,b+n/2,a+d/2,b+n,a,b+n/2,"Z"]},arc:function(a,b,d,n,g){var z=g.start,f=g.r||d,h=g.r||n||d,t=g.end-.001;d=g.innerR;n=r(g.open,.001>Math.abs(g.end-g.start-2*Math.PI));var l=Math.cos(z),x=Math.sin(z),c=Math.cos(t);t=Math.sin(t);z=r(g.longArc,.001>g.end-z-Math.PI?0:1);f=["M",a+f*l,b+h*x,"A",f,h,0,z,
r(g.clockwise,1),a+f*c,b+h*t];G(d)&&f.push(n?"M":"L",a+d*c,b+d*t,"A",d,d,0,z,G(g.clockwise)?1-g.clockwise:0,a+d*l,b+d*x);f.push(n?"":"Z");return f},callout:function(a,b,d,n,g){var z=Math.min(g&&g.r||0,d,n),f=z+6,h=g&&g.anchorX;g=g&&g.anchorY;var t=["M",a+z,b,"L",a+d-z,b,"C",a+d,b,a+d,b,a+d,b+z,"L",a+d,b+n-z,"C",a+d,b+n,a+d,b+n,a+d-z,b+n,"L",a+z,b+n,"C",a,b+n,a,b+n,a,b+n-z,"L",a,b+z,"C",a,b,a,b,a+z,b];h&&h>d?g>b+f&&g<b+n-f?t.splice(13,3,"L",a+d,g-6,a+d+6,g,a+d,g+6,a+d,b+n-z):t.splice(13,3,"L",a+d,
n/2,h,g,a+d,n/2,a+d,b+n-z):h&&0>h?g>b+f&&g<b+n-f?t.splice(33,3,"L",a,g+6,a-6,g,a,g-6,a,b+z):t.splice(33,3,"L",a,n/2,h,g,a,n/2,a,b+z):g&&g>n&&h>a+f&&h<a+d-f?t.splice(23,3,"L",h+6,b+n,h,b+n+6,h-6,b+n,a+z,b+n):g&&0>g&&h>a+f&&h<a+d-f&&t.splice(3,3,"L",h-6,b,h,b-6,h+6,b,d-z,b);return t}},clipRect:function(a,b,d,n){var g=c.uniqueKey()+"-",z=this.createElement("clipPath").attr({id:g}).add(this.defs);a=this.rect(a,b,d,n,0).add(z);a.id=g;a.clipPath=z;a.count=0;return a},text:function(a,b,d,n){var g={};if(n&&
(this.allowHTML||!this.forExport))return this.html(a,b,d);g.x=Math.round(b||0);d&&(g.y=Math.round(d));G(a)&&(g.text=a);a=this.createElement("text").attr(g);n||(a.xSetter=function(a,b,d){var n=d.getElementsByTagName("tspan"),g=d.getAttribute(b),z;for(z=0;z<n.length;z++){var f=n[z];f.getAttribute(b)===g&&f.setAttribute(b,a)}d.setAttribute(b,a)});return a},fontMetrics:function(a,b){a=!this.styledMode&&/px/.test(a)||!T.getComputedStyle?a||b&&b.style&&b.style.fontSize||this.style&&this.style.fontSize:
b&&P.prototype.getStyle.call(b,"font-size");a=/px/.test(a)?D(a):12;b=24>a?a+3:Math.round(1.2*a);return{h:b,b:Math.round(.8*b),f:a}},rotCorr:function(a,b,d){var n=a;b&&d&&(n=Math.max(n*Math.cos(b*l),4));return{x:-a/3*Math.sin(b*l),y:n}},label:function(a,b,d,g,z,f,h,t,l){var x=this,c=x.styledMode,k=x.g("button"!==l&&"label"),p=k.text=x.text("",0,0,h).attr({zIndex:1}),N,K,O=0,E=3,r=0,A,y,m,R,e,D={},V,T,da=/^url\((.*?)\)$/.test(g),u=c||da,v=function(){return c?N.strokeWidth()%2/2:(V?parseInt(V,10):0)%
2/2};l&&k.addClass("highcharts-"+l);var w=function(){var a=p.element.style,b={};K=("undefined"===typeof A||"undefined"===typeof y||e)&&G(p.textStr)&&p.getBBox();k.width=(A||K.width||0)+2*E+r;k.height=(y||K.height||0)+2*E;T=E+Math.min(x.fontMetrics(a&&a.fontSize,p).b,K?K.height:Infinity);u&&(N||(k.box=N=x.symbols[g]||da?x.symbol(g):x.rect(),N.addClass(("button"===l?"":"highcharts-label-box")+(l?" highcharts-"+l+"-box":"")),N.add(k),a=v(),b.x=a,b.y=(t?-T:0)+a),b.width=Math.round(k.width),b.height=Math.round(k.height),
N.attr(q(b,D)),D={})};var Q=function(){var a=r+E;var b=t?0:T;G(A)&&K&&("center"===e||"right"===e)&&(a+={center:.5,right:1}[e]*(A-K.width));if(a!==p.x||b!==p.y)p.attr("x",a),p.hasBoxWidthChanged&&(K=p.getBBox(!0),w()),"undefined"!==typeof b&&p.attr("y",b);p.x=a;p.y=b};var U=function(a,b){N?N.attr(a,b):D[a]=b};k.onAdd=function(){p.add(k);k.attr({text:a||0===a?a:"",x:b,y:d});N&&G(z)&&k.attr({anchorX:z,anchorY:f})};k.widthSetter=function(a){A=B(a)?a:null};k.heightSetter=function(a){y=a};k["text-alignSetter"]=
function(a){e=a};k.paddingSetter=function(a){G(a)&&a!==E&&(E=k.padding=a,Q())};k.paddingLeftSetter=function(a){G(a)&&a!==r&&(r=a,Q())};k.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==O&&(O=a,K&&k.attr({x:m}))};k.textSetter=function(a){"undefined"!==typeof a&&p.attr({text:a});w();Q()};k["stroke-widthSetter"]=function(a,b){a&&(u=!0);V=this["stroke-width"]=a;U(b,a)};c?k.rSetter=function(a,b){U(b,a)}:k.strokeSetter=k.fillSetter=k.rSetter=function(a,b){"r"!==b&&("fill"===b&&a&&(u=!0),k[b]=
a);U(b,a)};k.anchorXSetter=function(a,b){z=k.anchorX=a;U(b,Math.round(a)-v()-m)};k.anchorYSetter=function(a,b){f=k.anchorY=a;U(b,a-R)};k.xSetter=function(a){k.x=a;O&&(a-=O*((A||K.width)+2*E),k["forceAnimate:x"]=!0);m=Math.round(a);k.attr("translateX",m)};k.ySetter=function(a){R=k.y=Math.round(a);k.attr("translateY",R)};var C=k.css;h={css:function(a){if(a){var b={};a=L(a);k.textProps.forEach(function(d){"undefined"!==typeof a[d]&&(b[d]=a[d],delete a[d])});p.css(b);"width"in b&&w();"fontSize"in b&&
(w(),Q())}return C.call(k,a)},getBBox:function(){return{width:K.width+2*E,height:K.height+2*E,x:K.x-E,y:K.y-E}},destroy:function(){n(k.element,"mouseenter");n(k.element,"mouseleave");p&&(p=p.destroy());N&&(N=N.destroy());P.prototype.destroy.call(k);k=x=w=Q=U=null}};c||(h.shadow=function(a){a&&(w(),N&&N.shadow(a));return k});return q(k,h)}});c.Renderer=e});M(J,"parts/Html.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.attr,I=e.defined,G=e.extend,H=e.pick,v=e.pInt,q=c.createElement,
C=c.css,B=c.isFirefox,u=c.isMS,w=c.isWebKit,m=c.SVGElement;e=c.SVGRenderer;var r=c.win;G(m.prototype,{htmlCss:function(c){var r="SPAN"===this.element.tagName&&c&&"width"in c,f=H(r&&c.width,void 0);if(r){delete c.width;this.textWidth=f;var b=!0}c&&"ellipsis"===c.textOverflow&&(c.whiteSpace="nowrap",c.overflow="hidden");this.styles=G(this.styles,c);C(this.element,c);b&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var c=this.element;return{x:c.offsetLeft,y:c.offsetTop,width:c.offsetWidth,
height:c.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var c=this.renderer,r=this.element,f=this.translateX||0,b=this.translateY||0,a=this.x||0,d=this.y||0,h=this.textAlign||"left",k={left:0,center:.5,right:1}[h],l=this.styles,y=l&&l.whiteSpace;C(r,{marginLeft:f,marginTop:b});!c.styledMode&&this.shadows&&this.shadows.forEach(function(a){C(a,{marginLeft:f+1,marginTop:b+1})});this.inverted&&[].forEach.call(r.childNodes,function(a){c.invertChild(a,r)});if("SPAN"===r.tagName){l=this.rotation;
var p=this.textWidth&&v(this.textWidth),g=[l,h,r.innerHTML,this.textWidth,this.textAlign].join(),t;(t=p!==this.oldTextWidth)&&!(t=p>this.oldTextWidth)&&((t=this.textPxLength)||(C(r,{width:"",whiteSpace:y||"nowrap"}),t=r.offsetWidth),t=t>p);t&&(/[ \-]/.test(r.textContent||r.innerText)||"ellipsis"===r.style.textOverflow)?(C(r,{width:p+"px",display:"block",whiteSpace:y||"normal"}),this.oldTextWidth=p,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;g!==this.cTT&&(y=c.fontMetrics(r.style.fontSize,
r).b,!I(l)||l===(this.oldRotation||0)&&h===this.oldAlign||this.setSpanRotation(l,k,y),this.getSpanCorrection(!I(l)&&this.textPxLength||r.offsetWidth,y,k,l,h));C(r,{left:a+(this.xCorr||0)+"px",top:d+(this.yCorr||0)+"px"});this.cTT=g;this.oldRotation=l;this.oldAlign=h}}else this.alignOnAdd=!0},setSpanRotation:function(c,r,f){var b={},a=this.renderer.getTransformKey();b[a]=b.transform="rotate("+c+"deg)";b[a+(B?"Origin":"-origin")]=b.transformOrigin=100*r+"% "+f+"px";C(this.element,b)},getSpanCorrection:function(c,
r,f){this.xCorr=-c*f;this.yCorr=-r}});G(e.prototype,{getTransformKey:function(){return u&&!/Edge/.test(r.navigator.userAgent)?"-ms-transform":w?"-webkit-transform":B?"MozTransform":r.opera?"-o-transform":""},html:function(c,r,f){var b=this.createElement("span"),a=b.element,d=b.renderer,h=d.isSVG,k=function(a,b){["opacity","visibility"].forEach(function(d){a[d+"Setter"]=function(g,f,h){var t=a.div?a.div.style:b;m.prototype[d+"Setter"].call(this,g,f,h);t&&(t[f]=g)}});a.addedSetters=!0};b.textSetter=
function(d){d!==a.innerHTML&&(delete this.bBox,delete this.oldTextWidth);this.textStr=d;a.innerHTML=H(d,"");b.doTransform=!0};h&&k(b,b.element.style);b.xSetter=b.ySetter=b.alignSetter=b.rotationSetter=function(a,d){"align"===d&&(d="textAlign");b[d]=a;b.doTransform=!0};b.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};b.attr({text:c,x:Math.round(r),y:Math.round(f)}).css({position:"absolute"});d.styledMode||b.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});
a.style.whiteSpace="nowrap";b.css=b.htmlCss;h&&(b.add=function(f){var h=d.box.parentNode,l=[];if(this.parentGroup=f){var g=f.div;if(!g){for(;f;)l.push(f),f=f.parentGroup;l.reverse().forEach(function(a){function d(b,d){a[d]=b;"translateX"===d?t.left=b+"px":t.top=b+"px";a.doTransform=!0}var f=F(a.element,"class");g=a.div=a.div||q("div",f?{className:f}:void 0,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},
g||h);var t=g.style;G(a,{classSetter:function(a){return function(b){this.element.setAttribute("class",b);a.className=b}}(g),on:function(){l[0].div&&b.on.apply({element:l[0].div},arguments);return a},translateXSetter:d,translateYSetter:d});a.addedSetters||k(a)})}}else g=h;g.appendChild(a);b.added=!0;b.alignOnAdd&&b.htmlUpdateTransform();return b});return b}})});M(J,"parts/Time.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.defined,I=e.extend,G=e.isObject,H=e.objectEach,v=
e.pad,q=e.pick,C=e.splat,B=c.merge,u=c.timeUnits,w=c.win;c.Time=function(c){this.update(c,!1)};c.Time.prototype={defaultOptions:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},update:function(c){var r=q(c&&c.useUTC,!0),m=this;this.options=c=B(!0,this.options||{},c);this.Date=c.Date||w.Date||Date;this.timezoneOffset=(this.useUTC=r)&&c.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=!(r&&!c.getTimezoneOffset&&!c.timezone))||
this.timezoneOffset?(this.get=function(c,f){var b=f.getTime(),a=b-m.getTimezoneOffset(f);f.setTime(a);c=f["getUTC"+c]();f.setTime(b);return c},this.set=function(c,f,b){if("Milliseconds"===c||"Seconds"===c||"Minutes"===c&&0===f.getTimezoneOffset()%60)f["set"+c](b);else{var a=m.getTimezoneOffset(f);a=f.getTime()-a;f.setTime(a);f["setUTC"+c](b);c=m.getTimezoneOffset(f);a=f.getTime()+c;f.setTime(a)}}):r?(this.get=function(c,f){return f["getUTC"+c]()},this.set=function(c,f,b){return f["setUTC"+c](b)}):
(this.get=function(c,f){return f["get"+c]()},this.set=function(c,f,b){return f["set"+c](b)})},makeTime:function(m,r,e,A,f,b){if(this.useUTC){var a=this.Date.UTC.apply(0,arguments);var d=this.getTimezoneOffset(a);a+=d;var h=this.getTimezoneOffset(a);d!==h?a+=h-d:d-36E5!==this.getTimezoneOffset(a-36E5)||c.isSafari||(a-=36E5)}else a=(new this.Date(m,r,q(e,1),q(A,0),q(f,0),q(b,0))).getTime();return a},timezoneOffsetFunction:function(){var m=this,r=this.options,e=w.moment;if(!this.useUTC)return function(c){return 6E4*
(new Date(c)).getTimezoneOffset()};if(r.timezone){if(e)return function(c){return 6E4*-e.tz(c,r.timezone).utcOffset()};c.error(25)}return this.useUTC&&r.getTimezoneOffset?function(c){return 6E4*r.getTimezoneOffset(c)}:function(){return 6E4*(m.timezoneOffset||0)}},dateFormat:function(m,r,e){if(!F(r)||isNaN(r))return c.defaultOptions.lang.invalidDate||"";m=q(m,"%Y-%m-%d %H:%M:%S");var A=this,f=new this.Date(r),b=this.get("Hours",f),a=this.get("Day",f),d=this.get("Date",f),h=this.get("Month",f),k=this.get("FullYear",
f),l=c.defaultOptions.lang,y=l.weekdays,p=l.shortWeekdays;f=I({a:p?p[a]:y[a].substr(0,3),A:y[a],d:v(d),e:v(d,2," "),w:a,b:l.shortMonths[h],B:l.months[h],m:v(h+1),o:h+1,y:k.toString().substr(2,2),Y:k,H:v(b),k:b,I:v(b%12||12),l:b%12||12,M:v(A.get("Minutes",f)),p:12>b?"AM":"PM",P:12>b?"am":"pm",S:v(f.getSeconds()),L:v(Math.floor(r%1E3),3)},c.dateFormats);H(f,function(a,b){for(;-1!==m.indexOf("%"+b);)m=m.replace("%"+b,"function"===typeof a?a.call(A,r):a)});return e?m.substr(0,1).toUpperCase()+m.substr(1):
m},resolveDTLFormat:function(c){return G(c,!0)?c:(c=C(c),{main:c[0],from:c[1],to:c[2]})},getTimeTicks:function(c,r,e,A){var f=this,b=[],a={};var d=new f.Date(r);var h=c.unitRange,k=c.count||1,l;A=q(A,1);if(F(r)){f.set("Milliseconds",d,h>=u.second?0:k*Math.floor(f.get("Milliseconds",d)/k));h>=u.second&&f.set("Seconds",d,h>=u.minute?0:k*Math.floor(f.get("Seconds",d)/k));h>=u.minute&&f.set("Minutes",d,h>=u.hour?0:k*Math.floor(f.get("Minutes",d)/k));h>=u.hour&&f.set("Hours",d,h>=u.day?0:k*Math.floor(f.get("Hours",
d)/k));h>=u.day&&f.set("Date",d,h>=u.month?1:Math.max(1,k*Math.floor(f.get("Date",d)/k)));if(h>=u.month){f.set("Month",d,h>=u.year?0:k*Math.floor(f.get("Month",d)/k));var y=f.get("FullYear",d)}h>=u.year&&f.set("FullYear",d,y-y%k);h===u.week&&(y=f.get("Day",d),f.set("Date",d,f.get("Date",d)-y+A+(y<A?-7:0)));y=f.get("FullYear",d);A=f.get("Month",d);var p=f.get("Date",d),g=f.get("Hours",d);r=d.getTime();f.variableTimezone&&(l=e-r>4*u.month||f.getTimezoneOffset(r)!==f.getTimezoneOffset(e));r=d.getTime();
for(d=1;r<e;)b.push(r),r=h===u.year?f.makeTime(y+d*k,0):h===u.month?f.makeTime(y,A+d*k):!l||h!==u.day&&h!==u.week?l&&h===u.hour&&1<k?f.makeTime(y,A,p,g+d*k):r+h*k:f.makeTime(y,A,p+d*k*(h===u.day?1:7)),d++;b.push(r);h<=u.hour&&1E4>b.length&&b.forEach(function(b){0===b%18E5&&"000000000"===f.dateFormat("%H%M%S%L",b)&&(a[b]="day")})}b.info=I(c,{higherRanks:a,totalRange:h*k});return b}}});M(J,"parts/Options.js",[J["parts/Globals.js"]],function(c){var e=c.color,F=c.merge;c.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),
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:{},time:c.Time.prototype.defaultOptions,
chart:{styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",
color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,
verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:c.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:c.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:e("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",
color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};c.setOptions=function(e){c.defaultOptions=F(!0,c.defaultOptions,e);(e.time||e.global)&&c.time.update(F(c.defaultOptions.global,c.defaultOptions.time,e.global,e.time));return c.defaultOptions};c.getOptions=function(){return c.defaultOptions};c.defaultPlotOptions=c.defaultOptions.plotOptions;c.time=new c.Time(F(c.defaultOptions.global,c.defaultOptions.time));c.dateFormat=function(e,G,H){return c.time.dateFormat(e,G,H)};""});M(J,"parts/Tick.js",
[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.clamp,I=e.correctFloat,G=e.defined,H=e.destroyObjectProperties,v=e.extend,q=e.isNumber,C=e.objectEach,B=e.pick,u=c.fireEvent,w=c.merge,m=c.deg2rad;c.Tick=function(c,e,m,f,b){this.axis=c;this.pos=e;this.type=m||"";this.isNewLabel=this.isNew=!0;this.parameters=b||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;m||f||this.addLabel()};c.Tick.prototype={addLabel:function(){var c=this,e=c.axis,
m=e.options,f=e.chart,b=e.categories,a=e.names,d=c.pos,h=B(c.options&&c.options.labels,m.labels),k=e.tickPositions,l=d===k[0],y=d===k[k.length-1];a=this.parameters.category||(b?B(b[d],a[d],d):d);var p=c.label;b=(!h.step||1===h.step)&&1===e.tickInterval;k=k.info;var g,t;if(e.isDatetimeAxis&&k){var x=f.time.resolveDTLFormat(m.dateTimeLabelFormats[!m.grid&&k.higherRanks[d]||k.unitName]);var L=x.main}c.isFirst=l;c.isLast=y;c.formatCtx={axis:e,chart:f,isFirst:l,isLast:y,dateTimeLabelFormat:L,tickPositionInfo:k,
value:e.isLog?I(e.lin2log(a)):a,pos:d};m=e.labelFormatter.call(c.formatCtx,this.formatCtx);if(t=x&&x.list)c.shortenLabel=function(){for(g=0;g<t.length;g++)if(p.attr({text:e.labelFormatter.call(v(c.formatCtx,{dateTimeLabelFormat:t[g]}))}),p.getBBox().width<e.getSlotWidth(c)-2*B(h.padding,5))return;p.attr({text:""})};b&&e._addedPlotLB&&e.isXAxis&&c.moveLabel(m,h);G(p)||c.movedLabel?p&&p.textStr!==m&&!b&&(!p.textWidth||h.style&&h.style.width||p.styles.width||p.css({width:null}),p.attr({text:m}),p.textPxLength=
p.getBBox().width):(c.label=p=c.createLabel({x:0,y:0},m,h),c.rotation=0)},moveLabel:function(c,e){var r=this,f=r.label,b=!1,a=r.axis,d=a.reversed,h=a.chart.inverted;f&&f.textStr===c?(r.movedLabel=f,b=!0,delete r.label):C(a.ticks,function(a){b||a.isNew||a===r||!a.label||a.label.textStr!==c||(r.movedLabel=a.label,b=!0,a.labelPos=r.movedLabel.xy,delete a.label)});if(!b&&(r.labelPos||f)){var k=r.labelPos||f.xy;f=h?k.x:d?0:a.width+a.left;a=h?d?a.width+a.left:0:k.y;r.movedLabel=r.createLabel({x:f,y:a},
c,e);r.movedLabel&&r.movedLabel.attr({opacity:0})}},createLabel:function(c,e,m){var f=this.axis,b=f.chart;if(c=G(e)&&m.enabled?b.renderer.text(e,c.x,c.y,m.useHTML).add(f.labelGroup):null)b.styledMode||c.css(w(m.style)),c.textPxLength=c.getBBox().width;return c},replaceMovedLabel:function(){var c=this.label,e=this.axis,m=e.reversed,f=this.axis.chart.inverted;if(c&&!this.isNew){var b=f?c.xy.x:m?e.left:e.width+e.left;m=f?m?e.width+e.top:e.top:c.xy.y;c.animate({x:b,y:m,opacity:0},void 0,c.destroy);delete this.label}e.isDirty=
!0;this.label=this.movedLabel;delete this.movedLabel},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(c){var e=this.axis,r=e.options.labels,f=c.x,b=e.chart.chartWidth,a=e.chart.spacing,d=B(e.labelLeft,Math.min(e.pos,a[3]));a=B(e.labelRight,Math.max(e.isRadial?0:e.pos+e.len,b-a[1]));var h=this.label,k=this.rotation,l={left:0,center:.5,right:1}[e.labelAlign||h.attr("align")],y=h.getBBox().width,p=e.getSlotWidth(this),g=p,t=
1,x,L={};if(k||"justify"!==B(r.overflow,"justify"))0>k&&f-l*y<d?x=Math.round(f/Math.cos(k*m)-d):0<k&&f+l*y>a&&(x=Math.round((b-f)/Math.cos(k*m)));else if(b=f+(1-l)*y,f-l*y<d?g=c.x+g*(1-l)-d:b>a&&(g=a-c.x+g*l,t=-1),g=Math.min(p,g),g<p&&"center"===e.labelAlign&&(c.x+=t*(p-g-l*(p-Math.min(y,g)))),y>g||e.autoRotation&&(h.styles||{}).width)x=g;x&&(this.shortenLabel?this.shortenLabel():(L.width=Math.floor(x),(r.style||{}).textOverflow||(L.textOverflow="ellipsis"),h.css(L)))},getPosition:function(c,e,m,
f){var b=this.axis,a=b.chart,d=f&&a.oldChartHeight||a.chartHeight;c={x:c?I(b.translate(e+m,null,null,f)+b.transB):b.left+b.offset+(b.opposite?(f&&a.oldChartWidth||a.chartWidth)-b.right-b.left:0),y:c?d-b.bottom+b.offset-(b.opposite?b.height:0):I(d-b.translate(e+m,null,null,f)-b.transB)};c.y=F(c.y,-1E5,1E5);u(this,"afterGetPosition",{pos:c});return c},getLabelPosition:function(c,e,A,f,b,a,d,h){var k=this.axis,l=k.transA,r=k.isLinked&&k.linkedParent?k.linkedParent.reversed:k.reversed,p=k.staggerLines,
g=k.tickRotCorr||{x:0,y:0},t=b.y,x=f||k.reserveSpaceDefault?0:-k.labelOffset*("center"===k.labelAlign?.5:1),L={};G(t)||(t=0===k.side?A.rotation?-8:-A.getBBox().height:2===k.side?g.y+8:Math.cos(A.rotation*m)*(g.y-A.getBBox(!1,0).height/2));c=c+b.x+x+g.x-(a&&f?a*l*(r?-1:1):0);e=e+t-(a&&!f?a*l*(r?1:-1):0);p&&(A=d/(h||1)%p,k.opposite&&(A=p-A-1),e+=k.labelOffset/p*A);L.x=c;L.y=Math.round(e);u(this,"afterGetLabelPosition",{pos:L,tickmarkOffset:a,index:d});return L},getMarkPath:function(c,e,m,f,b,a){return a.crispLine(["M",
c,e,"L",c+(b?0:-m),e+(b?m:0)],f)},renderGridLine:function(c,e,m){var f=this.axis,b=f.options,a=this.gridLine,d={},h=this.pos,k=this.type,l=B(this.tickmarkOffset,f.tickmarkOffset),r=f.chart.renderer,p=k?k+"Grid":"grid",g=b[p+"LineWidth"],t=b[p+"LineColor"];b=b[p+"LineDashStyle"];a||(f.chart.styledMode||(d.stroke=t,d["stroke-width"]=g,b&&(d.dashstyle=b)),k||(d.zIndex=1),c&&(e=0),this.gridLine=a=r.path().attr(d).addClass("highcharts-"+(k?k+"-":"")+"grid-line").add(f.gridGroup));if(a&&(m=f.getPlotLinePath({value:h+
l,lineWidth:a.strokeWidth()*m,force:"pass",old:c})))a[c||this.isNew?"attr":"animate"]({d:m,opacity:e})},renderMark:function(c,e,m){var f=this.axis,b=f.options,a=f.chart.renderer,d=this.type,h=d?d+"Tick":"tick",k=f.tickSize(h),l=this.mark,r=!l,p=c.x;c=c.y;var g=B(b[h+"Width"],!d&&f.isXAxis?1:0);b=b[h+"Color"];k&&(f.opposite&&(k[0]=-k[0]),r&&(this.mark=l=a.path().addClass("highcharts-"+(d?d+"-":"")+"tick").add(f.axisGroup),f.chart.styledMode||l.attr({stroke:b,"stroke-width":g})),l[r?"attr":"animate"]({d:this.getMarkPath(p,
c,k[0],l.strokeWidth()*m,f.horiz,a),opacity:e}))},renderLabel:function(c,e,m,f){var b=this.axis,a=b.horiz,d=b.options,h=this.label,k=d.labels,l=k.step;b=B(this.tickmarkOffset,b.tickmarkOffset);var y=!0,p=c.x;c=c.y;h&&q(p)&&(h.xy=c=this.getLabelPosition(p,c,h,a,k,b,f,l),this.isFirst&&!this.isLast&&!B(d.showFirstLabel,1)||this.isLast&&!this.isFirst&&!B(d.showLastLabel,1)?y=!1:!a||k.step||k.rotation||e||0===m||this.handleOverflow(c),l&&f%l&&(y=!1),y&&q(c.y)?(c.opacity=m,h[this.isNewLabel?"attr":"animate"](c),
this.isNewLabel=!1):(h.attr("y",-9999),this.isNewLabel=!0))},render:function(e,m,q){var f=this.axis,b=f.horiz,a=this.pos,d=B(this.tickmarkOffset,f.tickmarkOffset);a=this.getPosition(b,a,d,m);d=a.x;var h=a.y;f=b&&d===f.pos+f.len||!b&&h===f.pos?-1:1;q=B(q,1);this.isActive=!0;this.renderGridLine(m,q,f);this.renderMark(a,q,f);this.renderLabel(a,m,q,e);this.isNew=!1;c.fireEvent(this,"afterRender")},destroy:function(){H(this,this.axis)}}});M(J,"parts/Axis.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],
function(c,e){var F=e.animObject,I=e.arrayMax,G=e.arrayMin,H=e.clamp,v=e.correctFloat,q=e.defined,C=e.destroyObjectProperties,B=e.extend,u=e.isArray,w=e.isNumber,m=e.isString,r=e.objectEach,D=e.pick,A=e.relativeLength,f=e.splat,b=e.syncTimeout,a=c.addEvent,d=c.color,h=c.defaultOptions,k=c.deg2rad,l=c.fireEvent,y=c.format,p=c.getMagnitude,g=c.merge,t=c.normalizeTickInterval,x=c.removeEvent,L=c.seriesTypes,E=c.Tick;e=function(){this.init.apply(this,arguments)};B(e.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",
range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",
style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){var a=this.axis.chart.numberFormatter;return a(this.total,
-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(b,d){var n=d.isX,g=this;g.chart=b;g.horiz=b.inverted&&!g.isZAxis?!n:n;g.isXAxis=
n;g.coll=g.coll||(n?"xAxis":"yAxis");l(this,"init",{userOptions:d});g.opposite=d.opposite;g.side=d.side||(g.horiz?g.opposite?0:2:g.opposite?1:3);g.setOptions(d);var z=this.options,h=z.type;g.labelFormatter=z.labels.formatter||g.defaultLabelFormatter;g.userOptions=d;g.minPixelPadding=0;g.reversed=z.reversed;g.visible=!1!==z.visible;g.zoomEnabled=!1!==z.zoomEnabled;g.hasNames="category"===h||!0===z.categories;g.categories=z.categories||g.hasNames;g.names||(g.names=[],g.names.keys={});g.plotLinesAndBandsGroups=
{};g.isLog="logarithmic"===h;g.isDatetimeAxis="datetime"===h;g.positiveValuesOnly=g.isLog&&!g.allowNegativeLog;g.isLinked=q(z.linkedTo);g.ticks={};g.labelEdge=[];g.minorTicks={};g.plotLinesAndBands=[];g.alternateBands={};g.len=0;g.minRange=g.userMinRange=z.minRange||z.maxZoom;g.range=z.range;g.offset=z.offset||0;g.stacks={};g.oldStacks={};g.stacksTouched=0;g.max=null;g.min=null;g.crosshair=D(z.crosshair,f(b.options.tooltip.crosshairs)[n?0:1],!1);d=g.options.events;-1===b.axes.indexOf(g)&&(n?b.axes.splice(b.xAxis.length,
0,g):b.axes.push(g),b[g.coll].push(g));g.series=g.series||[];b.inverted&&!g.isZAxis&&n&&"undefined"===typeof g.reversed&&(g.reversed=!0);r(d,function(b,d){c.isFunction(b)&&a(g,d,b)});g.lin2log=z.linearToLogConverter||g.lin2log;g.isLog&&(g.val2lin=g.log2lin,g.lin2val=g.lin2log);l(this,"afterInit")},setOptions:function(a){this.options=g(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],
g(h[this.coll],a));l(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var a=this.axis,b=this.value,d=a.chart.time,g=a.categories,f=this.dateTimeLabelFormat,c=h.lang,t=c.numericSymbols;c=c.numericSymbolMagnitude||1E3;var l=t&&t.length,x=a.options.labels.format;a=a.isLog?Math.abs(b):a.tickInterval;var k=this.chart,p=k.numberFormatter;if(x)var e=y(x,this,k);else if(g)e=b;else if(f)e=d.dateFormat(f,b);else if(l&&1E3<=a)for(;l--&&"undefined"===typeof e;)d=Math.pow(c,l+1),a>=d&&
0===10*b%d&&null!==t[l]&&0!==b&&(e=p(b/d,-1)+t[l]);"undefined"===typeof e&&(e=1E4<=Math.abs(b)?p(b,-1):p(b,-1,void 0,""));return e},getSeriesExtremes:function(){var a=this,b=a.chart,d;l(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();a.series.forEach(function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var n=g.options,z=n.threshold;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=
z&&(z=null);if(a.isXAxis){if(n=g.xData,n.length){d=g.getXExtremes(n);var f=d.min;var h=d.max;w(f)||f instanceof Date||(n=n.filter(w),d=g.getXExtremes(n),f=d.min,h=d.max);n.length&&(a.dataMin=Math.min(D(a.dataMin,f),f),a.dataMax=Math.max(D(a.dataMax,h),h))}}else if(g.getExtremes(),h=g.dataMax,f=g.dataMin,q(f)&&q(h)&&(a.dataMin=Math.min(D(a.dataMin,f),f),a.dataMax=Math.max(D(a.dataMax,h),h)),q(z)&&(a.threshold=z),!n.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});l(this,"afterGetSeriesExtremes")},
translate:function(a,b,d,g,f,h){var n=this.linkedParent||this,z=1,c=0,t=g?n.oldTransA:n.transA;g=g?n.oldMin:n.min;var l=n.minPixelPadding;f=(n.isOrdinal||n.isBroken||n.isLog&&f)&&n.lin2val;t||(t=n.transA);d&&(z*=-1,c=n.len);n.reversed&&(z*=-1,c-=z*(n.sector||n.len));b?(a=(a*z+c-l)/t+g,f&&(a=n.lin2val(a))):(f&&(a=n.val2lin(a)),a=w(g)?z*(a-g)*t+c+z*l+(w(h)?t*h:0):void 0);return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-
(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a){var b=this,d=b.chart,g=b.left,n=b.top,f=a.old,h=a.value,c=a.translatedValue,t=a.lineWidth,x=a.force,k,p,e,E,m=f&&d.oldChartHeight||d.chartHeight,L=f&&d.oldChartWidth||d.chartWidth,y,r=b.transB,q=function(a,b,d){if("pass"!==x&&a<b||a>d)x?a=H(a,b,d):y=!0;return a};a={value:h,lineWidth:t,old:f,force:x,acrossPanes:a.acrossPanes,translatedValue:c};l(this,"getPlotLinePath",a,function(a){c=D(c,b.translate(h,null,null,f));c=H(c,-1E5,1E5);
k=e=Math.round(c+r);p=E=Math.round(m-c-r);w(c)?b.horiz?(p=n,E=m-b.bottom,k=e=q(k,g,g+b.width)):(k=g,e=L-b.right,p=E=q(p,n,n+b.height)):(y=!0,x=!1);a.path=y&&!x?null:d.renderer.crispLine(["M",k,p,"L",e,E],t||1)});return a.path},getLinearTickPositions:function(a,b,d){var g=v(Math.floor(b/a)*a);d=v(Math.ceil(d/a)*a);var n=[],f;v(g+a)===g&&(f=20);if(this.single)return[b];for(b=g;b<=d;){n.push(b);b=v(b+a,f);if(b===z)break;var z=b}return n},getMinorTickInterval:function(){var a=this.options;return!0===
a.minorTicks?D(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,b=a.options,d=a.tickPositions,g=a.minorTickInterval,f=[],h=a.pointRangePadding||0,c=a.min-h;h=a.max+h;var t=h-c;if(t&&t/g<a.len/3)if(a.isLog)this.paddedTicks.forEach(function(b,d,n){d&&f.push.apply(f,a.getLogTickPositions(g,n[d-1],n[d],!0))});else if(a.isDatetimeAxis&&"auto"===this.getMinorTickInterval())f=f.concat(a.getTimeTicks(a.normalizeTimeTickInterval(g),c,h,b.startOfWeek));
else for(b=c+(d[0]-c)%g;b<=h&&b!==f[0];b+=g)f.push(b);0!==f.length&&a.trimTicks(f);return f},adjustForMinRange:function(){var a=this.options,b=this.min,d=this.max,g,f,h,c,t;this.isXAxis&&"undefined"===typeof this.minRange&&!this.isLog&&(q(a.min)||q(a.max)?this.minRange=null:(this.series.forEach(function(a){c=a.xData;for(f=t=a.xIncrement?1:c.length-1;0<f;f--)if(h=c[f]-c[f-1],"undefined"===typeof g||h<g)g=h}),this.minRange=Math.min(5*g,this.dataMax-this.dataMin)));if(d-b<this.minRange){var l=this.dataMax-
this.dataMin>=this.minRange;var x=this.minRange;var k=(x-d+b)/2;k=[b-k,D(a.min,b-k)];l&&(k[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin);b=I(k);d=[b+x,D(a.max,b+x)];l&&(d[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax);d=G(d);d-b<x&&(k[0]=d-x,k[1]=D(a.min,d-x),b=I(k))}this.min=b;this.max=d},getClosest:function(){var a;this.categories?a=1:this.series.forEach(function(b){var d=b.closestPointRange,g=b.visible||!b.chart.options.chart.ignoreHiddenSeries;!b.noSharedTooltip&&q(d)&&g&&(a=
q(a)?Math.min(a,d):d)});return a},nameToX:function(a){var b=u(this.categories),d=b?this.categories:this.names,g=a.options.x;a.series.requireSorting=!1;q(g)||(g=!1===this.options.uniqueNames?a.series.autoIncrement():b?d.indexOf(a.name):D(d.keys[a.name],-1));if(-1===g){if(!b)var n=d.length}else n=g;"undefined"!==typeof n&&(this.names[n]=a.name,this.names.keys[a.name]=n);return n},updateNames:function(){var a=this,b=this.names;0<b.length&&(Object.keys(b.keys).forEach(function(a){delete b.keys[a]}),b.length=
0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(b){b.xIncrement=null;if(!b.points||b.isDirtyData)a.max=Math.max(a.max,b.xData.length-1),b.processData(),b.generatePoints();b.data.forEach(function(d,g){if(d&&d.options&&"undefined"!==typeof d.name){var n=a.nameToX(d);"undefined"!==typeof n&&n!==d.x&&(d.x=n,b.xData[g]=n)}})}))},setAxisTranslation:function(a){var b=this,d=b.max-b.min,g=b.axisPointRange||0,n=0,f=0,h=b.linkedParent,c=!!b.categories,t=b.transA,x=b.isXAxis;if(x||c||g){var k=
b.getClosest();h?(n=h.minPointOffset,f=h.pointRangePadding):b.series.forEach(function(a){var d=c?1:x?D(a.options.pointRange,k,0):b.axisPointRange||0,h=a.options.pointPlacement;g=Math.max(g,d);if(!b.single||c)a=L.xrange&&a instanceof L.xrange?!x:x,n=Math.max(n,a&&m(h)?0:d/2),f=Math.max(f,a&&"on"===h?0:d)});h=b.ordinalSlope&&k?b.ordinalSlope/k:1;b.minPointOffset=n*=h;b.pointRangePadding=f*=h;b.pointRange=Math.min(g,b.single&&c?1:d);x&&(b.closestPointRange=k)}a&&(b.oldTransA=t);b.translationSlope=b.transA=
t=b.staticScale||b.len/(d+f||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=t*n;l(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(a){var b=this,d=b.chart,g=b.options,n=b.isLog,f=b.isDatetimeAxis,h=b.isXAxis,x=b.isLinked,k=g.maxPadding,e=g.minPadding,E=g.tickInterval,m=g.tickPixelInterval,L=b.categories,y=w(b.threshold)?b.threshold:null,r=b.softThreshold;f||L||x||this.getTickAmount();var A=D(b.userMin,g.min);var u=D(b.userMax,g.max);
if(x){b.linkedParent=d[b.coll][g.linkedTo];var C=b.linkedParent.getExtremes();b.min=D(C.min,C.dataMin);b.max=D(C.max,C.dataMax);g.type!==b.linkedParent.options.type&&c.error(11,1,d)}else{if(!r&&q(y))if(b.dataMin>=y)C=y,e=0;else if(b.dataMax<=y){var B=y;k=0}b.min=D(A,C,b.dataMin);b.max=D(u,B,b.dataMax)}n&&(b.positiveValuesOnly&&!a&&0>=Math.min(b.min,D(b.dataMin,b.min))&&c.error(10,1,d),b.min=v(b.log2lin(b.min),16),b.max=v(b.log2lin(b.max),16));b.range&&q(b.max)&&(b.userMin=b.min=A=Math.max(b.dataMin,
b.minFromRange()),b.userMax=u=b.max,b.range=null);l(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(L||b.axisPointRange||b.usePercentage||x)&&q(b.min)&&q(b.max)&&(d=b.max-b.min)&&(!q(A)&&e&&(b.min-=d*e),!q(u)&&k&&(b.max+=d*k));w(b.userMin)||(w(g.softMin)&&g.softMin<b.min&&(b.min=A=g.softMin),w(g.floor)&&(b.min=Math.max(b.min,g.floor)));w(b.userMax)||(w(g.softMax)&&g.softMax>b.max&&(b.max=u=g.softMax),w(g.ceiling)&&(b.max=Math.min(b.max,g.ceiling)));r&&q(b.dataMin)&&(y=
y||0,!q(A)&&b.min<y&&b.dataMin>=y?b.min=b.options.minRange?Math.min(y,b.max-b.minRange):y:!q(u)&&b.max>y&&b.dataMax<=y&&(b.max=b.options.minRange?Math.max(y,b.min+b.minRange):y));b.tickInterval=b.min===b.max||"undefined"===typeof b.min||"undefined"===typeof b.max?1:x&&!E&&m===b.linkedParent.options.tickPixelInterval?E=b.linkedParent.tickInterval:D(E,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,L?1:(b.max-b.min)*m/Math.max(b.len,m));h&&!a&&b.series.forEach(function(a){a.processData(b.min!==
b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval));b.pointRange&&!E&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));a=D(g.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!E&&b.tickInterval<a&&(b.tickInterval=a);f||n||E||(b.tickInterval=t(b.tickInterval,null,p(b.tickInterval),D(g.allowDecimals,!(.5<b.tickInterval&&5>b.tickInterval&&1E3<b.max&&
9999>b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=b.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b=a.tickPositions;var d=this.getMinorTickInterval();var g=a.tickPositioner,f=a.startOnTick,h=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===d&&this.tickInterval?this.tickInterval/5:d;this.single=this.min===this.max&&q(this.min)&&!this.tickAmount&&(parseInt(this.min,
10)===this.min||!1!==a.allowDecimals);this.tickPositions=d=b&&b.slice();!d&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(d=[this.min,this.max],c.error(19,!1,this.chart)):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()],d[0]===d[1]&&(d.length=1)),this.tickPositions=d,g&&(g=g.apply(this,[this.min,this.max])))&&(this.tickPositions=d=g);this.paddedTicks=d.slice(0);this.trimTicks(d,f,h);this.isLinked||(this.single&&2>d.length&&!this.categories&&(this.min-=.5,this.max+=.5),b||g||this.adjustTickAmount());l(this,"afterSetTickPositions")},trimTicks:function(a,b,d){var g=a[0],n=a[a.length-1],f=this.minPointOffset||0;l(this,"trimTicks");if(!this.isLinked){if(b&&-Infinity!==
g)this.min=g;else for(;this.min-f>a[0];)a.shift();if(d)this.max=n;else for(;this.max+f<a[a.length-1];)a.pop();0===a.length&&q(g)&&!this.options.tickPositions&&a.push((n+g)/2)}},alignToOthers:function(){var a={},b,d=this.options;!1===this.chart.options.chart.alignTicks||!1===d.alignTicks||!1===d.startOnTick||!1===d.endOnTick||this.isLog||this.chart[this.coll].forEach(function(d){var g=d.options;g=[d.horiz?g.left:g.top,g.width,g.height,g.pane].join();d.series.length&&(a[g]?b=!0:a[g]=1)});return b},
getTickAmount:function(){var a=this.options,b=a.tickAmount,d=a.tickPixelInterval;!q(a.tickInterval)&&this.len<d&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&(b=Math.ceil(this.len/d)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.options,b=this.tickInterval,d=this.tickPositions,g=this.tickAmount,f=this.finalTickAmt,h=d&&d.length,c=D(this.threshold,this.softThreshold?0:null),t;if(this.hasData()){if(h<g){for(t=
this.min;d.length<g;)d.length%2||t===c?d.push(v(d[d.length-1]+b)):d.unshift(v(d[0]-b));this.transA*=(h-1)/(g-1);this.min=a.startOnTick?d[0]:Math.min(this.min,d[0]);this.max=a.endOnTick?d[d.length-1]:Math.max(this.max,d[d.length-1])}else h>g&&(this.tickInterval*=2,this.setTickPositions());if(q(f)){for(b=a=d.length;b--;)(3===f&&1===b%2||2>=f&&0<b&&b<a-1)&&d.splice(b,1);this.finalTickAmt=void 0}}},setScale:function(){var a=this.series.some(function(a){return a.isDirtyData||a.isDirty||a.xAxis&&a.xAxis.isDirty}),
b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();(b=this.len!==this.oldAxisLength)||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=b||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&
this.cleanStacks();l(this,"afterSetScale")},setExtremes:function(a,b,d,g,f){var n=this,h=n.chart;d=D(d,!0);n.series.forEach(function(a){delete a.kdTree});f=B(f,{min:a,max:b});l(n,"setExtremes",f,function(){n.userMin=a;n.userMax=b;n.eventArgs=f;d&&h.redraw(g)})},zoom:function(a,b){var d=this.dataMin,g=this.dataMax,n=this.options,f=Math.min(d,D(n.min,d)),h=Math.max(g,D(n.max,g));a={newMin:a,newMax:b};l(this,"zoom",a,function(a){var b=a.newMin,n=a.newMax;if(b!==this.min||n!==this.max)this.allowZoomOutside||
(q(d)&&(b<f&&(b=f),b>h&&(b=h)),q(g)&&(n<f&&(n=f),n>h&&(n=h))),this.displayBtn="undefined"!==typeof b||"undefined"!==typeof n,this.setExtremes(b,n,!1,void 0,{trigger:"zoom"});a.zoomed=!0});return a.zoomed},setAxisSize:function(){var a=this.chart,b=this.options,d=b.offsets||[0,0,0,0],g=this.horiz,f=this.width=Math.round(A(D(b.width,a.plotWidth-d[3]+d[1]),a.plotWidth)),h=this.height=Math.round(A(D(b.height,a.plotHeight-d[0]+d[2]),a.plotHeight)),c=this.top=Math.round(A(D(b.top,a.plotTop+d[0]),a.plotHeight,
a.plotTop));b=this.left=Math.round(A(D(b.left,a.plotLeft+d[3]),a.plotWidth,a.plotLeft));this.bottom=a.chartHeight-h-c;this.right=a.chartWidth-f-b;this.len=Math.max(g?f:h,0);this.pos=g?b:c},getExtremes:function(){var a=this.isLog;return{min:a?v(this.lin2log(this.min)):this.min,max:a?v(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,d=b?this.lin2log(this.min):this.min;b=b?this.lin2log(this.max):
this.max;null===a||-Infinity===a?a=d:Infinity===a?a=b:d>a?a=d:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){var b=(D(a,0)-90*this.side+720)%360;a={align:"center"};l(this,"autoLabelAlign",a,function(a){15<b&&165>b?a.align="right":195<b&&345>b&&(a.align="left")});return a.align},tickSize:function(a){var b=this.options,d=b[a+"Length"],g=D(b[a+"Width"],"tick"===a&&this.isXAxis&&!this.categories?1:0);if(g&&d){"inside"===b[a+"Position"]&&(d=-d);var f=[d,g]}a={tickSize:f};l(this,
"afterTickSize",a);return a.tickSize},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,b=this.horiz,d=this.tickInterval,g=d,f=this.len/(((this.categories?1:0)+this.max-this.min)/d),h,c=a.rotation,t=this.labelMetrics(),l,x=Number.MAX_VALUE,p,e=this.max-this.min,E=function(a){var b=a/(f||1);b=
1<b?Math.ceil(b):1;b*d>e&&Infinity!==a&&Infinity!==f&&e&&(b=Math.ceil(e/d));return v(b*d)};b?(p=!a.staggerLines&&!a.step&&(q(c)?[c]:f<D(a.autoRotationLimit,80)&&a.autoRotation))&&p.forEach(function(a){if(a===c||a&&-90<=a&&90>=a){l=E(Math.abs(t.h/Math.sin(k*a)));var b=l+Math.abs(a/360);b<x&&(x=b,h=a,g=l)}}):a.step||(g=E(t.h));this.autoRotation=p;this.labelRotation=D(h,c);return g},getSlotWidth:function(a){var b=this.chart,d=this.horiz,g=this.options.labels,f=Math.max(this.tickPositions.length-(this.categories?
0:1),1),n=b.margin[3];return a&&a.slotWidth||d&&2>(g.step||0)&&!g.rotation&&(this.staggerLines||1)*this.len/f||!d&&(g.style&&parseInt(g.style.width,10)||n&&n-b.spacing[3]||.33*b.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,d=this.tickPositions,g=this.ticks,f=this.options.labels,h=f&&f.style||{},c=this.horiz,t=this.getSlotWidth(),l=Math.max(1,Math.round(t-2*(f.padding||5))),x={},k=this.labelMetrics(),p=f.style&&f.style.textOverflow,e=0;m(f.rotation)||(x.rotation=f.rotation||
0);d.forEach(function(a){a=g[a];a.movedLabel&&a.replaceMovedLabel();a&&a.label&&a.label.textPxLength>e&&(e=a.label.textPxLength)});this.maxLabelLength=e;if(this.autoRotation)e>l&&e>k.h?x.rotation=this.labelRotation:this.labelRotation=0;else if(t){var E=l;if(!p){var L="clip";for(l=d.length;!c&&l--;){var y=d[l];if(y=g[y].label)y.styles&&"ellipsis"===y.styles.textOverflow?y.css({textOverflow:"clip"}):y.textPxLength>t&&y.css({width:t+"px"}),y.getBBox().height>this.len/d.length-(k.h-k.f)&&(y.specificTextOverflow=
"ellipsis")}}}x.rotation&&(E=e>.5*a.chartHeight?.33*a.chartHeight:e,p||(L="ellipsis"));if(this.labelAlign=f.align||this.autoLabelAlign(this.labelRotation))x.align=this.labelAlign;d.forEach(function(a){var b=(a=g[a])&&a.label,d=h.width,f={};b&&(b.attr(x),a.shortenLabel?a.shortenLabel():E&&!d&&"nowrap"!==h.whiteSpace&&(E<b.textPxLength||"SPAN"===b.element.tagName)?(f.width=E,p||(f.textOverflow=b.specificTextOverflow||L),b.css(f)):b.styles&&b.styles.width&&!f.width&&!d&&b.css({width:null}),delete b.specificTextOverflow,
a.rotation=x.rotation)},this);this.tickRotCorr=b.rotCorr(k.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.series.some(function(a){return a.hasData()})||this.options.showEmpty&&q(this.min)&&q(this.max)},addTitle:function(a){var b=this.chart.renderer,d=this.horiz,f=this.opposite,h=this.options.title,n,c=this.chart.styledMode;this.axisTitle||((n=h.textAlign)||(n=(d?{low:"left",middle:"center",high:"right"}:{low:f?"right":"left",middle:"center",high:f?"left":"right"})[h.align]),
this.axisTitle=b.text(h.text,0,0,h.useHTML).attr({zIndex:7,rotation:h.rotation||0,align:n}).addClass("highcharts-axis-title"),c||this.axisTitle.css(g(h.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0);c||h.style.width||this.isRadial||this.axisTitle.css({width:this.len});this.axisTitle[a?"show":"hide"](a)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():b[a]=new E(this,a)},getOffset:function(){var a=this,b=a.chart,d=b.renderer,g=a.options,f=a.tickPositions,h=a.ticks,
c=a.horiz,t=a.side,x=b.inverted&&!a.isZAxis?[1,0,3,2][t]:t,k,p=0,e=0,E=g.title,m=g.labels,L=0,y=b.axisOffset;b=b.clipOffset;var A=[-1,1,1,-1][t],u=g.className,v=a.axisParent;var w=a.hasData();a.showAxis=k=w||D(g.showEmpty,!0);a.staggerLines=a.horiz&&m.staggerLines;a.axisGroup||(a.gridGroup=d.g("grid").attr({zIndex:g.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(u||"")).add(v),a.axisGroup=d.g("axis").attr({zIndex:g.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+
" "+(u||"")).add(v),a.labelGroup=d.g("axis-labels").attr({zIndex:m.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(u||"")).add(v));w||a.isLinked?(f.forEach(function(b,d){a.generateTick(b,d)}),a.renderUnsquish(),a.reserveSpaceDefault=0===t||2===t||{1:"left",3:"right"}[t]===a.labelAlign,D(m.reserveSpace,"center"===a.labelAlign?!0:null,a.reserveSpaceDefault)&&f.forEach(function(a){L=Math.max(h[a].getLabelSize(),L)}),a.staggerLines&&(L*=a.staggerLines),a.labelOffset=L*(a.opposite?
-1:1)):r(h,function(a,b){a.destroy();delete h[b]});if(E&&E.text&&!1!==E.enabled&&(a.addTitle(k),k&&!1!==E.reserveSpace)){a.titleOffset=p=a.axisTitle.getBBox()[c?"height":"width"];var C=E.offset;e=q(C)?0:D(E.margin,c?5:10)}a.renderLine();a.offset=A*D(g.offset,y[t]?y[t]+(g.margin||0):0);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};d=0===t?-a.labelMetrics().h:2===t?a.tickRotCorr.y:0;e=Math.abs(L)+e;L&&(e=e-d+A*(c?D(m.y,a.tickRotCorr.y+8*A):m.x));a.axisTitleMargin=D(C,e);a.getMaxLabelDimensions&&(a.maxLabelDimensions=
a.getMaxLabelDimensions(h,f));c=this.tickSize("tick");y[t]=Math.max(y[t],a.axisTitleMargin+p+A*a.offset,e,f&&f.length&&c?c[0]+A*a.offset:0);g=g.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[x]=Math.max(b[x],g);l(this,"afterGetOffset")},getLinePath:function(a){var b=this.chart,d=this.opposite,g=this.offset,f=this.horiz,h=this.left+(d?this.width:0)+g;g=b.chartHeight-this.bottom-(d?this.height:0)+g;d&&(a*=-1);return b.renderer.crispLine(["M",f?this.left:h,f?g:this.top,"L",f?b.chartWidth-this.right:
h,f?g:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,d=this.top,g=this.len,f=this.options.title,h=a?b:d,c=this.opposite,t=this.offset,x=f.x||0,k=f.y||0,p=this.axisTitle,e=this.chart.renderer.fontMetrics(f.style&&
f.style.fontSize,p);p=Math.max(p.getBBox(null,0).height-e.h-1,0);g={low:h+(a?0:g),middle:h+g/2,high:h+(a?g:0)}[f.align];b=(a?d+this.height:b)+(a?1:-1)*(c?-1:1)*this.axisTitleMargin+[-p,p,e.f,-p][this.side];a={x:a?g+x:b+(c?this.width:0)+t+x,y:a?b+k-(c?this.height:0)+t:g+k};l(this,"afterGetTitlePosition",{titlePosition:a});return a},renderMinorTick:function(a){var b=this.chart.hasRendered&&w(this.oldMin),d=this.minorTicks;d[a]||(d[a]=new E(this,a,"minor"));b&&d[a].isNew&&d[a].render(null,!0);d[a].render(null,
!1,1)},renderTick:function(a,b){var d=this.isLinked,g=this.ticks,f=this.chart.hasRendered&&w(this.oldMin);if(!d||a>=this.min&&a<=this.max)g[a]||(g[a]=new E(this,a)),f&&g[a].isNew&&g[a].render(b,!0,-1),g[a].render(b)},render:function(){var a=this,d=a.chart,g=a.options,f=a.isLog,h=a.isLinked,t=a.tickPositions,x=a.axisTitle,k=a.ticks,p=a.minorTicks,e=a.alternateBands,m=g.stackLabels,L=g.alternateGridColor,y=a.tickmarkOffset,q=a.axisLine,A=a.showAxis,u=F(d.renderer.globalAnimation),D,v;a.labelEdge.length=
0;a.overlap=!1;[k,p,e].forEach(function(a){r(a,function(a){a.isActive=!1})});if(a.hasData()||h)a.minorTickInterval&&!a.categories&&a.getMinorTickPositions().forEach(function(b){a.renderMinorTick(b)}),t.length&&(t.forEach(function(b,d){a.renderTick(b,d)}),y&&(0===a.min||a.single)&&(k[-1]||(k[-1]=new E(a,-1,null,!0)),k[-1].render(-1))),L&&t.forEach(function(b,g){v="undefined"!==typeof t[g+1]?t[g+1]+y:a.max-y;0===g%2&&b<a.max&&v<=a.max+(d.polar?-y:y)&&(e[b]||(e[b]=new c.PlotLineOrBand(a)),D=b+y,e[b].options=
{from:f?a.lin2log(D):D,to:f?a.lin2log(v):v,color:L},e[b].render(),e[b].isActive=!0)}),a._addedPlotLB||((g.plotLines||[]).concat(g.plotBands||[]).forEach(function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0);[k,p,e].forEach(function(a){var g,f=[],h=u.duration;r(a,function(a,b){a.isActive||(a.render(b,!1,0),a.isActive=!1,f.push(b))});b(function(){for(g=f.length;g--;)a[f[g]]&&!a[f[g]].isActive&&(a[f[g]].destroy(),delete a[f[g]])},a!==e&&d.hasRendered&&h?h:0)});q&&(q[q.isPlaced?"animate":"attr"]({d:this.getLinePath(q.strokeWidth())}),
q.isPlaced=!0,q[A?"show":"hide"](A));x&&A&&(g=a.getTitlePosition(),w(g.y)?(x[x.isNew?"attr":"animate"](g),x.isNew=!1):(x.attr("y",-9999),x.isNew=!0));m&&m.enabled&&a.renderStackTotals();a.isDirty=!1;l(this,"afterRender")},redraw:function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(a){a.render()}));this.series.forEach(function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var b=this,d=b.stacks,g=b.plotLinesAndBands,
f;l(this,"destroy",{keepEvents:a});a||x(b);r(d,function(a,b){C(a);d[b]=null});[b.ticks,b.minorTicks,b.alternateBands].forEach(function(a){C(a)});if(g)for(a=g.length;a--;)g[a].destroy();"stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(a){b[a]&&(b[a]=b[a].destroy())});for(f in b.plotLinesAndBandsGroups)b.plotLinesAndBandsGroups[f]=b.plotLinesAndBandsGroups[f].destroy();r(b,function(a,d){-1===b.keepProps.indexOf(d)&&delete b[d]})},drawCrosshair:function(a,
b){var g=this.crosshair,f=D(g.snap,!0),h,c=this.cross;l(this,"drawCrosshair",{e:a,point:b});a||(a=this.cross&&this.cross.e);if(this.crosshair&&!1!==(q(b)||!f)){f?q(b)&&(h=D("colorAxis"!==this.coll?b.crosshairPos:null,this.isXAxis?b.plotX:this.len-b.plotY)):h=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos);if(q(h)){var t={value:b&&(this.isXAxis?b.x:D(b.stackY,b.y)),translatedValue:h};this.chart.polar&&B(t,{isCrosshair:!0,chartX:a&&a.chartX,chartY:a&&a.chartY,point:b});t=this.getPlotLinePath(t)||
null}if(!q(t)){this.hideCrosshair();return}f=this.categories&&!this.isRadial;c||(this.cross=c=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(f?"category ":"thin ")+g.className).attr({zIndex:D(g.zIndex,2)}).add(),this.chart.styledMode||(c.attr({stroke:g.color||(f?d("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":D(g.width,1)}).css({"pointer-events":"none"}),g.dashStyle&&c.attr({dashstyle:g.dashStyle})));c.show().attr({d:t});f&&!g.width&&c.attr({"stroke-width":this.transA});
this.cross.e=a}else this.hideCrosshair();l(this,"afterDrawCrosshair",{e:a,point:b})},hideCrosshair:function(){this.cross&&this.cross.hide();l(this,"afterHideCrosshair")}});return c.Axis=e});M(J,"parts/DateTimeAxis.js",[J["parts/Globals.js"]],function(c){var e=c.Axis,F=c.getMagnitude,I=c.normalizeTickInterval,G=c.timeUnits;e.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)};e.prototype.normalizeTimeTickInterval=function(c,e){var q=e||[["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]];e=q[q.length-1];var v=G[e[0]],B=e[1],u;for(u=0;u<q.length&&!(e=q[u],v=G[e[0]],B=e[1],q[u+1]&&c<=(v*B[B.length-1]+G[q[u+1][0]])/2);u++);v===G.year&&c<5*v&&(B=[1,2,5]);c=I(c/v,B,"year"===e[0]?Math.max(F(c/v),1):1);return{unitRange:v,count:c,unitName:e[0]}}});M(J,"parts/LogarithmicAxis.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],
function(c,e){var F=e.pick;e=c.Axis;var I=c.getMagnitude,G=c.normalizeTickInterval;e.prototype.getLogTickPositions=function(c,e,q,C){var v=this.options,u=this.len,w=[];C||(this._minorAutoInterval=null);if(.5<=c)c=Math.round(c),w=this.getLinearTickPositions(c,e,q);else if(.08<=c){u=Math.floor(e);var m,r;for(v=.3<c?[1,2,4]:.15<c?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];u<q+1&&!r;u++){var D=v.length;for(m=0;m<D&&!r;m++){var A=this.log2lin(this.lin2log(u)*v[m]);A>e&&(!C||f<=q)&&"undefined"!==typeof f&&w.push(f);
f>q&&(r=!0);var f=A}}}else e=this.lin2log(e),q=this.lin2log(q),c=C?this.getMinorTickInterval():v.tickInterval,c=F("auto"===c?null:c,this._minorAutoInterval,v.tickPixelInterval/(C?5:1)*(q-e)/((C?u/this.tickPositions.length:u)||1)),c=G(c,null,I(c)),w=this.getLinearTickPositions(c,e,q).map(this.log2lin),C||(this._minorAutoInterval=c/5);C||(this.tickInterval=c);return w};e.prototype.log2lin=function(c){return Math.log(c)/Math.LN10};e.prototype.lin2log=function(c){return Math.pow(10,c)}});M(J,"parts/PlotLineOrBand.js",
[J["parts/Globals.js"],J["parts/Axis.js"],J["parts/Utilities.js"]],function(c,e,F){var I=F.arrayMax,G=F.arrayMin,H=F.defined,v=F.destroyObjectProperties,q=F.erase,C=F.extend,B=F.objectEach,u=F.pick,w=c.merge;c.PlotLineOrBand=function(c,e){this.axis=c;e&&(this.options=e,this.id=e.id)};c.PlotLineOrBand.prototype={render:function(){c.fireEvent(this,"render");var e=this,r=e.axis,q=r.horiz,A=e.options,f=A.label,b=e.label,a=A.to,d=A.from,h=A.value,k=H(d)&&H(a),l=H(h),y=e.svgElem,p=!y,g=[],t=A.color,x=u(A.zIndex,
0),L=A.events;g={"class":"highcharts-plot-"+(k?"band ":"line ")+(A.className||"")};var E={},n=r.chart.renderer,z=k?"bands":"lines";r.isLog&&(d=r.log2lin(d),a=r.log2lin(a),h=r.log2lin(h));r.chart.styledMode||(l?(g.stroke=t||"#999999",g["stroke-width"]=u(A.width,1),A.dashStyle&&(g.dashstyle=A.dashStyle)):k&&(g.fill=t||"#e6ebf5",A.borderWidth&&(g.stroke=A.borderColor,g["stroke-width"]=A.borderWidth)));E.zIndex=x;z+="-"+x;(t=r.plotLinesAndBandsGroups[z])||(r.plotLinesAndBandsGroups[z]=t=n.g("plot-"+z).attr(E).add());
p&&(e.svgElem=y=n.path().attr(g).add(t));if(l)g=r.getPlotLinePath({value:h,lineWidth:y.strokeWidth(),acrossPanes:A.acrossPanes});else if(k)g=r.getPlotBandPath(d,a,A);else return;(p||!y.d)&&g&&g.length?(y.attr({d:g}),L&&B(L,function(a,b){y.on(b,function(a){L[b].apply(e,[a])})})):y&&(g?(y.show(!0),y.animate({d:g})):y.d&&(y.hide(),b&&(e.label=b=b.destroy())));f&&(H(f.text)||H(f.formatter))&&g&&g.length&&0<r.width&&0<r.height&&!g.isFlat?(f=w({align:q&&k&&"center",x:q?!k&&4:10,verticalAlign:!q&&k&&"middle",
y:q?k?16:10:k?6:-4,rotation:q&&!k&&90},f),this.renderLabel(f,g,k,x)):b&&b.hide();return e},renderLabel:function(c,e,q,A){var f=this.label,b=this.axis.chart.renderer;f||(f={align:c.textAlign||c.align,rotation:c.rotation,"class":"highcharts-plot-"+(q?"band":"line")+"-label "+(c.className||"")},f.zIndex=A,A=this.getLabelText(c),this.label=f=b.text(A,0,0,c.useHTML).attr(f).add(),this.axis.chart.styledMode||f.css(c.style));b=e.xBounds||[e[1],e[4],q?e[6]:e[1]];e=e.yBounds||[e[2],e[5],q?e[7]:e[2]];q=G(b);
A=G(e);f.align(c,!1,{x:q,y:A,width:I(b)-q,height:I(e)-A});f.show(!0)},getLabelText:function(c){return H(c.formatter)?c.formatter.call(this):c.text},destroy:function(){q(this.axis.plotLinesAndBands,this);delete this.axis;v(this)}};C(e.prototype,{getPlotBandPath:function(c,e){var m=this.getPlotLinePath({value:e,force:!0,acrossPanes:this.options.acrossPanes}),r=this.getPlotLinePath({value:c,force:!0,acrossPanes:this.options.acrossPanes}),f=[],b=this.horiz,a=1;c=c<this.min&&e<this.min||c>this.max&&e>
this.max;if(r&&m){if(c){var d=r.toString()===m.toString();a=0}for(c=0;c<r.length;c+=6)b&&m[c+1]===r[c+1]?(m[c+1]+=a,m[c+4]+=a):b||m[c+2]!==r[c+2]||(m[c+2]+=a,m[c+5]+=a),f.push("M",r[c+1],r[c+2],"L",r[c+4],r[c+5],m[c+4],m[c+5],m[c+1],m[c+2],"z"),f.isFlat=d}return f},addPlotBand:function(c){return this.addPlotBandOrLine(c,"plotBands")},addPlotLine:function(c){return this.addPlotBandOrLine(c,"plotLines")},addPlotBandOrLine:function(e,r){var m=(new c.PlotLineOrBand(this,e)).render(),q=this.userOptions;
if(m){if(r){var f=q[r]||[];f.push(e);q[r]=f}this.plotLinesAndBands.push(m)}return m},removePlotBandOrLine:function(c){for(var e=this.plotLinesAndBands,m=this.options,A=this.userOptions,f=e.length;f--;)e[f].id===c&&e[f].destroy();[m.plotLines||[],A.plotLines||[],m.plotBands||[],A.plotBands||[]].forEach(function(b){for(f=b.length;f--;)b[f].id===c&&q(b,b[f])})},removePlotBand:function(c){this.removePlotBandOrLine(c)},removePlotLine:function(c){this.removePlotBandOrLine(c)}})});M(J,"parts/Tooltip.js",
[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.clamp,I=e.defined,G=e.discardElement,H=e.extend,v=e.isNumber,q=e.isString,C=e.pick,B=e.splat,u=e.syncTimeout;"";var w=c.doc,m=c.format,r=c.merge,D=c.timeUnits;c.Tooltip=function(){this.init.apply(this,arguments)};c.Tooltip.prototype={init:function(c,f){this.chart=c;this.options=f;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=f.split&&!c.inverted&&!c.polar;this.shared=f.shared||this.split;this.outside=C(f.outside,
!(!c.scrollablePixelsX&&!c.scrollablePixelsY))},cleanSplit:function(c){this.chart.series.forEach(function(f){var b=f&&f.tt;b&&(!b.isActive||c?f.tt=b.destroy():b.isActive=!1)})},applyFilter:function(){var c=this.chart;c.renderer.definition({tagName:"filter",id:"drop-shadow-"+c.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"}]}]});c.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+c.index+"{filter:url(#drop-shadow-"+c.index+")}"})},getLabel:function(){var e=this,f=this.chart.renderer,b=this.chart.styledMode,a=this.options,d="tooltip"+(I(a.className)?" "+a.className:""),h;if(!this.label){this.outside&&(this.container=h=c.doc.createElement("div"),h.className="highcharts-tooltip-container",c.css(h,{position:"absolute",top:"1px",
pointerEvents:a.style&&a.style.pointerEvents,zIndex:3}),c.doc.body.appendChild(h),this.renderer=f=new c.Renderer(h,0,0,{},void 0,void 0,f.styledMode));this.split?this.label=f.g(d):(this.label=f.label("",0,0,a.shape||"callout",null,null,a.useHTML,null,d).attr({padding:a.padding,r:a.borderRadius}),b||this.label.attr({fill:a.backgroundColor,"stroke-width":a.borderWidth}).css(a.style).shadow(a.shadow));b&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index));if(e.outside&&!e.split){var k=
{x:this.label.xSetter,y:this.label.ySetter};this.label.xSetter=function(a,b){k[b].call(this.label,e.distance);h.style.left=a+"px"};this.label.ySetter=function(a,b){k[b].call(this.label,e.distance);h.style.top=a+"px"}}this.label.attr({zIndex:8}).add()}return this.label},update:function(c){this.destroy();r(!0,this.chart.options.tooltip.userOptions,c);this.init(this.chart,r(!0,this.options,c))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,
!0),this.tt=this.tt.destroy());this.renderer&&(this.renderer=this.renderer.destroy(),G(this.container));c.clearTimeout(this.hideTimer);c.clearTimeout(this.tooltipTimeout)},move:function(e,f,b,a){var d=this,h=d.now,k=!1!==d.options.animation&&!d.isHidden&&(1<Math.abs(e-h.x)||1<Math.abs(f-h.y)),l=d.followPointer||1<d.len;H(h,{x:k?(2*h.x+e)/3:e,y:k?(h.y+f)/2:f,anchorX:l?void 0:k?(2*h.anchorX+b)/3:b,anchorY:l?void 0:k?(h.anchorY+a)/2:a});d.getLabel().attr(h);k&&(c.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=
setTimeout(function(){d&&d.move(e,f,b,a)},32))},hide:function(e){var f=this;c.clearTimeout(this.hideTimer);e=C(e,this.options.hideDelay,500);this.isHidden||(this.hideTimer=u(function(){f.getLabel()[e?"fadeOut":"hide"]();f.isHidden=!0},e))},getAnchor:function(c,f){var b=this.chart,a=b.pointer,d=b.inverted,h=b.plotTop,k=b.plotLeft,l=0,e=0,p,g;c=B(c);this.followPointer&&f?("undefined"===typeof f.chartX&&(f=a.normalize(f)),c=[f.chartX-b.plotLeft,f.chartY-h]):c[0].tooltipPos?c=c[0].tooltipPos:(c.forEach(function(a){p=
a.series.yAxis;g=a.series.xAxis;l+=a.plotX+(!d&&g?g.left-k:0);e+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!d&&p?p.top-h:0)}),l/=c.length,e/=c.length,c=[d?b.plotWidth-e:l,this.shared&&!d&&1<c.length&&f?f.chartY-h:d?b.plotHeight-l:e]);return c.map(Math.round)},getPosition:function(c,f,b){var a=this.chart,d=this.distance,h={},k=a.inverted&&b.h||0,l,e=this.outside,p=e?w.documentElement.clientWidth-2*d:a.chartWidth,g=e?Math.max(w.body.scrollHeight,w.documentElement.scrollHeight,w.body.offsetHeight,
w.documentElement.offsetHeight,w.documentElement.clientHeight):a.chartHeight,t=a.pointer.getChartPosition(),x=a.containerScaling,L=function(a){return x?a*x.scaleX:a},E=function(a){return x?a*x.scaleY:a},n=function(h){var n="x"===h;return[h,n?p:g,n?c:f].concat(e?[n?L(c):E(f),n?t.left-d+L(b.plotX+a.plotLeft):t.top-d+E(b.plotY+a.plotTop),0,n?p:g]:[n?c:f,n?b.plotX+a.plotLeft:b.plotY+a.plotTop,n?a.plotLeft:a.plotTop,n?a.plotLeft+a.plotWidth:a.plotTop+a.plotHeight])},z=n("y"),m=n("x"),r=!this.followPointer&&
C(b.ttBelow,!a.inverted===!!b.negative),q=function(a,b,g,f,c,t,n){var l="y"===a?E(d):L(d),x=(g-f)/2,e=f<c-d,p=c+d+f<b,z=c-l-g+x;c=c+l-x;if(r&&p)h[a]=c;else if(!r&&e)h[a]=z;else if(e)h[a]=Math.min(n-f,0>z-k?z:z-k);else if(p)h[a]=Math.max(t,c+k+g>b?c:c+k);else return!1},A=function(a,b,g,f,c){var t;c<d||c>b-d?t=!1:h[a]=c<g/2?1:c>b-f/2?b-f-2:c-g/2;return t},u=function(a){var b=z;z=m;m=b;l=a},v=function(){!1!==q.apply(0,z)?!1!==A.apply(0,m)||l||(u(!0),v()):l?h.x=h.y=0:(u(!0),v())};(a.inverted||1<this.len)&&
u();v();return h},defaultFormatter:function(c){var f=this.points||B(this);var b=[c.tooltipFooterHeaderFormatter(f[0])];b=b.concat(c.bodyFormatter(f));b.push(c.tooltipFooterHeaderFormatter(f[0],!0));return b},refresh:function(e,f){var b=this.chart,a=this.options,d=e,h={},k=[],l=a.formatter||this.defaultFormatter;h=this.shared;var y=b.styledMode;if(a.enabled){c.clearTimeout(this.hideTimer);this.followPointer=B(d)[0].series.tooltipOptions.followPointer;var p=this.getAnchor(d,f);f=p[0];var g=p[1];!h||
d.series&&d.series.noSharedTooltip?h=d.getLabelConfig():(b.pointer.applyInactiveState(d),d.forEach(function(a){a.setState("hover");k.push(a.getLabelConfig())}),h={x:d[0].category,y:d[0].y},h.points=k,d=d[0]);this.len=k.length;b=l.call(h,this);l=d.series;this.distance=C(l.tooltipOptions.distance,16);!1===b?this.hide():(this.split?this.renderSplit(b,B(e)):(e=this.getLabel(),a.style.width&&!y||e.css({width:this.chart.spacingBox.width}),e.attr({text:b&&b.join?b.join(""):b}),e.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+
C(d.colorIndex,l.colorIndex)),y||e.attr({stroke:a.borderColor||d.color||l.color||"#666666"}),this.updatePosition({plotX:f,plotY:g,negative:d.negative,ttBelow:d.ttBelow,h:p[2]||0})),this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1);c.fireEvent(this,"refresh")}},renderSplit:function(e,f){function b(a,b,d,g,c){void 0===c&&(c=!0);d?(b=D?0:I,a=F(a-g/2,K.left,K.right-g)):(b-=B,a=c?a-g-v:a+v,a=F(a,c?a:K.left,K.right));return{x:a,y:b}}var a=this,d=a.chart,h=a.chart,k=h.chartWidth,
l=h.chartHeight,y=h.plotHeight,p=h.plotLeft,g=h.plotTop,t=h.plotWidth,x=h.pointer,L=h.renderer,E=h.scrollablePixelsX;E=void 0===E?0:E;var n=h.scrollablePixelsY,z=void 0===n?0:n;n=h.scrollingContainer;n=void 0===n?{scrollLeft:0,scrollTop:0}:n;var m=n.scrollLeft,r=n.scrollTop,u=h.styledMode,v=a.distance,w=a.options,A=a.options.positioner,K={left:E?p:0,right:E?p+t-E:k,top:z?g:0,bottom:z?g+y-z:l},R=a.getLabel(),D=!(!d.xAxis[0]||!d.xAxis[0].opposite),B=g,G=0,I=y-z;q(e)&&(e=[!1,e]);e=e.slice(0,f.length+
1).reduce(function(d,c,h){if(!1!==c&&""!==c){h=f[h-1]||{isHeader:!0,plotX:f[0].plotX,plotY:y,series:{}};var t=h.isHeader,n=t?a:h.series,l=n.tt,x=h.isHeader;var e=h.series;var k="highcharts-color-"+C(h.colorIndex,e.colorIndex,"none");l||(l={padding:w.padding,r:w.borderRadius},u||(l.fill=w.backgroundColor,l["stroke-width"]=w.borderWidth),l=L.label(null,null,null,w[x?"headerShape":"shape"]||"callout",null,null,w.useHTML).addClass(x?"highcharts-tooltip-header ":"highcharts-tooltip-box "+k).attr(l).add(R));
l.isActive=!0;l.attr({text:c});u||l.css(w.style).shadow(w.shadow).attr({stroke:w.borderColor||h.color||e.color||"#333333"});c=n.tt=l;x=c.getBBox();n=x.width+c.strokeWidth();t&&(G=x.height,I+=G,D&&(B-=G));e=h.plotX;e=void 0===e?0:e;k=h.plotY;k=void 0===k?0:k;var E=h.series;h.isHeader?(e=p+e-m,k=g+(y-z)/2):(l=E.xAxis,E=E.yAxis,e=l.pos+F(e,-v,l.len+v)-m,k=E.pos+F(k,0,E.len)-r);e=F(e,K.left-v,K.right+v);k=F(k,K.top,K.bottom);x=x.height+1;l=A?A.call(a,n,x,h):b(e,k,t,n);d.push({align:A?0:void 0,anchorX:e,
anchorY:k,boxWidth:n,point:h,rank:C(l.rank,t?1:0),size:x,target:l.y,tt:c,x:l.x})}return d},[]);!A&&e.some(function(a){return 0>a.x})&&(e=e.map(function(a){var d=b(a.anchorX,a.anchorY,a.point.isHeader,a.boxWidth,!1);return H(a,{target:d.y,x:d.x})}));a.cleanSplit();c.distribute(e,I,void 0);e.forEach(function(a){var b=a.pos;a.tt.attr({visibility:"undefined"===typeof b?"hidden":"inherit",x:a.x,y:b+B,anchorX:a.anchorX,anchorY:a.anchorY})});e=a.container;d=a.renderer;a.outside&&e&&d&&(h=R.getBBox(),d.setSize(h.width+
h.x,h.height+h.y,!1),x=x.getChartPosition(),e.style.left=x.left+"px",e.style.top=x.top+"px")},updatePosition:function(e){var f=this.chart,b=f.pointer,a=this.getLabel(),d=e.plotX+f.plotLeft,h=e.plotY+f.plotTop;b=b.getChartPosition();e=(this.options.positioner||this.getPosition).call(this,a.width,a.height,e);if(this.outside){var k=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(a.width+k,a.height+k,!1);if(f=f.containerScaling)c.css(this.container,{transform:"scale("+f.scaleX+", "+
f.scaleY+")"}),d*=f.scaleX,h*=f.scaleY;d+=b.left-e.x;h+=b.top-e.y}this.move(Math.round(e.x),Math.round(e.y||0),d,h)},getDateFormat:function(c,f,b,a){var d=this.chart.time,h=d.dateFormat("%m-%d %H:%M:%S.%L",f),e={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond";for(y in D){if(c===D.week&&+d.dateFormat("%w",f)===b&&"00:00:00.000"===h.substr(6)){var y="week";break}if(D[y]>c){y=l;break}if(e[y]&&h.substr(e[y])!=="01-01 00:00:00.000".substr(e[y]))break;"week"!==y&&(l=y)}if(y)var p=d.resolveDTLFormat(a[y]).main;
return p},getXDateFormat:function(c,f,b){f=f.dateTimeLabelFormats;var a=b&&b.closestPointRange;return(a?this.getDateFormat(a,c.x,b.options.startOfWeek,f):f.day)||f.year},tooltipFooterHeaderFormatter:function(e,f){var b=f?"footer":"header",a=e.series,d=a.tooltipOptions,h=d.xDateFormat,k=a.xAxis,l=k&&"datetime"===k.options.type&&v(e.key),y=d[b+"Format"];f={isFooter:f,labelConfig:e};c.fireEvent(this,"headerFormatter",f,function(b){l&&!h&&(h=this.getXDateFormat(e,d,k));l&&h&&(e.point&&e.point.tooltipDateKeys||
["key"]).forEach(function(a){y=y.replace("{point."+a+"}","{point."+a+":"+h+"}")});a.chart.styledMode&&(y=this.styledModeFormat(y));b.text=m(y,{point:e,series:a},this.chart)});return f.text},bodyFormatter:function(c){return c.map(function(c){var b=c.series.tooltipOptions;return(b[(c.point.formatPrefix||"point")+"Formatter"]||c.point.tooltipFormatter).call(c.point,b[(c.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(c){return c.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,
'class="highcharts-color-{$1.colorIndex}"')}}});M(J,"parts/Pointer.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.attr,I=e.defined,G=e.extend,H=e.isNumber,v=e.isObject,q=e.objectEach,C=e.offset,B=e.pick,u=e.splat,w=c.addEvent,m=c.charts,r=c.color,D=c.css,A=c.find,f=c.fireEvent,b=c.Tooltip;c.Pointer=function(a,b){this.init(a,b)};c.Pointer.prototype={init:function(a,d){this.options=d;this.chart=a;this.runChartClick=d.chart.events&&!!d.chart.events.click;this.pinchDown=[];
this.lastValidTouch={};b&&(a.tooltip=new b(a,d.tooltip),this.followTouchMove=B(d.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,c=b.options.chart,f=c.zoomType||"";b=b.inverted;/touch/.test(a.type)&&(f=B(c.pinchType,f));this.zoomX=a=/x/.test(f);this.zoomY=f=/y/.test(f);this.zoomHor=a&&!b||f&&b;this.zoomVert=f&&!b||a&&b;this.hasZoom=a||f},getChartPosition:function(){var a=this.chart;a=a.scrollingContainer||a.container;return this.chartPosition||(this.chartPosition=
C(a))},normalize:function(a,b){var d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(b=this.getChartPosition());var c=d.pageX-b.left;b=d.pageY-b.top;if(d=this.chart.containerScaling)c/=d.scaleX,b/=d.scaleY;return G(a,{chartX:Math.round(c),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(d){b[d.isXAxis?"xAxis":"yAxis"].push({axis:d,value:d.toValue(a[d.horiz?"chartX":"chartY"])})});return b},findNearestKDPoint:function(a,
b,c){var d;a.forEach(function(a){var f=!(a.noSharedTooltip&&b)&&0>a.options.findNearestPointBy.indexOf("y");a=a.searchPoint(c,f);if((f=v(a,!0))&&!(f=!v(d,!0))){f=d.distX-a.distX;var h=d.dist-a.dist,g=(a.series.group&&a.series.group.zIndex)-(d.series.group&&d.series.group.zIndex);f=0<(0!==f&&b?f:0!==h?h:0!==g?g:d.series.index>a.series.index?-1:1)}f&&(d=a)});return d},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getChartCoordinatesFromPoint:function(a,
b){var d=a.series,c=d.xAxis;d=d.yAxis;var f=B(a.clientX,a.plotX),e=a.shapeArgs;if(c&&d)return b?{chartX:c.len+c.pos-f,chartY:d.len+d.pos-a.plotY}:{chartX:f+c.pos,chartY:a.plotY+d.pos};if(e&&e.x&&e.y)return{chartX:e.x,chartY:e.y}},getHoverData:function(a,b,c,f,e,y){var d,g=[];f=!(!f||!a);var h=b&&!b.stickyTracking?[b]:c.filter(function(a){return a.visible&&!(!e&&a.directTouch)&&B(a.options.enableMouseTracking,!0)&&a.stickyTracking});b=(d=f||!y?a:this.findNearestKDPoint(h,e,y))&&d.series;d&&(e&&!b.noSharedTooltip?
(h=c.filter(function(a){return a.visible&&!(!e&&a.directTouch)&&B(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),h.forEach(function(a){var b=A(a.points,function(a){return a.x===d.x&&!a.isNull});v(b)&&(a.chart.isBoosting&&(b=a.getPoint(b)),g.push(b))})):g.push(d));return{hoverPoint:d,hoverSeries:b,hoverPoints:g}},runPointActions:function(a,b){var d=this.chart,f=d.tooltip&&d.tooltip.options.enabled?d.tooltip:void 0,e=f?f.shared:!1,y=b||d.hoverPoint,p=y&&y.series||d.hoverSeries;p=this.getHoverData(y,
p,d.series,(!a||"touchmove"!==a.type)&&(!!b||p&&p.directTouch&&this.isDirectTouch),e,a);y=p.hoverPoint;var g=p.hoverPoints;b=(p=p.hoverSeries)&&p.tooltipOptions.followPointer;e=e&&p&&!p.noSharedTooltip;if(y&&(y!==d.hoverPoint||f&&f.isHidden)){(d.hoverPoints||[]).forEach(function(a){-1===g.indexOf(a)&&a.setState()});if(d.hoverSeries!==p)p.onMouseOver();this.applyInactiveState(g);(g||[]).forEach(function(a){a.setState("hover")});d.hoverPoint&&d.hoverPoint.firePointEvent("mouseOut");if(!y.series)return;
y.firePointEvent("mouseOver");d.hoverPoints=g;d.hoverPoint=y;f&&f.refresh(e?g:y,a)}else b&&f&&!f.isHidden&&(y=f.getAnchor([{}],a),f.updatePosition({plotX:y[0],plotY:y[1]}));this.unDocMouseMove||(this.unDocMouseMove=w(d.container.ownerDocument,"mousemove",function(a){var b=m[c.hoverChartIndex];if(b)b.pointer.onDocumentMouseMove(a)}));d.axes.forEach(function(b){var d=B(b.crosshair.snap,!0),f=d?c.find(g,function(a){return a.series[b.coll]===b}):void 0;f||!d?b.drawCrosshair(a,f):b.hideCrosshair()})},
applyInactiveState:function(a){var b=[],c;(a||[]).forEach(function(a){c=a.series;b.push(c);c.linkedParent&&b.push(c.linkedParent);c.linkedSeries&&(b=b.concat(c.linkedSeries));c.navigatorSeries&&b.push(c.navigatorSeries)});this.chart.series.forEach(function(a){-1===b.indexOf(a)?a.setState("inactive",!0):a.options.inactiveOtherPoints&&a.setAllPointsToState("inactive")})},reset:function(a,b){var d=this.chart,c=d.hoverSeries,f=d.hoverPoint,e=d.hoverPoints,p=d.tooltip,g=p&&p.shared?e:f;a&&g&&u(g).forEach(function(b){b.series.isCartesian&&
"undefined"===typeof b.plotX&&(a=!1)});if(a)p&&g&&u(g).length&&(p.refresh(g),p.shared&&e?e.forEach(function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a),a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a))}):f&&(f.setState(f.state,!0),d.axes.forEach(function(a){a.crosshair&&f.series[a.coll]===a&&a.drawCrosshair(null,f)})));else{if(f)f.onMouseOut();e&&e.forEach(function(a){a.setState()});if(c)c.onMouseOut();p&&p.hide(b);
this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());d.axes.forEach(function(a){a.hideCrosshair()});this.hoverX=d.hoverPoints=d.hoverPoint=null}},scaleGroups:function(a,b){var d=this.chart,c;d.series.forEach(function(f){c=a||f.getPlotBox();f.xAxis&&f.xAxis.zoomEnabled&&f.group&&(f.group.attr(c),f.markerGroup&&(f.markerGroup.attr(c),f.markerGroup.clip(b?d.clipRect:null)),f.dataLabelsGroup&&f.dataLabelsGroup.attr(c))});d.clipRect.attr(b||d.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,f=a.chartX,e=a.chartY,m=this.zoomHor,p=this.zoomVert,g=b.plotLeft,t=b.plotTop,x=b.plotWidth,L=b.plotHeight,E=this.selectionMarker,n=this.mouseDownX,z=this.mouseDownY,q=v(c.panning)?c.panning&&c.panning.enabled:c.panning,u=c.panKey&&a[c.panKey+"Key"];if(!E||!E.touch)if(f<g?f=g:f>g+x&&(f=g+x),e<t?e=t:e>t+L&&(e=t+L),this.hasDragged=Math.sqrt(Math.pow(n-
f,2)+Math.pow(z-e,2)),10<this.hasDragged){var w=b.isInsidePlot(n-g,z-t);b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&w&&!u&&!E&&(this.selectionMarker=E=b.renderer.rect(g,t,m?1:x,p?1:L,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add(),b.styledMode||E.attr({fill:c.selectionMarkerFill||r("#335cad").setOpacity(.25).get()}));E&&m&&(f-=n,E.attr({width:Math.abs(f),x:(0<f?0:f)+n}));E&&p&&(f=e-z,E.attr({height:Math.abs(f),y:(0<f?0:f)+z}));w&&!E&&q&&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:[]},m=this.selectionMarker,p=m.attr?m.attr("x"):m.x,g=m.attr?m.attr("y"):m.y,t=m.attr?m.attr("width"):m.width,x=m.attr?m.attr("height"):m.height,L;if(this.hasDragged||e)c.axes.forEach(function(d){if(d.zoomEnabled&&I(d.min)&&(e||b[{xAxis:"zoomX",yAxis:"zoomY"}[d.coll]])){var c=d.horiz,f="touchend"===a.type?d.minPixelPadding:0,h=d.toValue((c?p:g)+f);c=d.toValue((c?p+t:g+x)-f);l[d.coll].push({axis:d,min:Math.min(h,
c),max:Math.max(h,c)});L=!0}}),L&&f(c,"selection",l,function(a){c.zoom(G(a,e?{animation:!1}:null))});H(c.index)&&(this.selectionMarker=this.selectionMarker.destroy());e&&this.scaleGroups()}c&&H(c.index)&&(D(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);2!==a.button&&(this.zoomOption(a),a.preventDefault&&a.preventDefault(),this.dragStart(a))},onDocumentMouseUp:function(a){m[c.hoverChartIndex]&&
m[c.hoverChartIndex].pointer.drop(a)},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(a){var b=m[c.hoverChartIndex];b&&(a.relatedTarget||a.toElement)&&(b.pointer.reset(),b.pointer.chartPosition=void 0)},onContainerMouseMove:function(a){var b=this.chart;I(c.hoverChartIndex)&&m[c.hoverChartIndex]&&m[c.hoverChartIndex].mouseIsDown||
(c.hoverChartIndex=b.index);a=this.normalize(a);a.preventDefault||(a.returnValue=!1);"mousedown"===b.mouseIsDown&&this.drag(a);!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||b.openMenu||this.runPointActions(a)},inClass:function(a,b){for(var d;a;){if(d=F(a,"class")){if(-1!==d.indexOf(b))return!0;if(-1!==d.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")?(f(c.series,"click",G(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(G(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-e,a.chartY-
l)&&f(b,"click",a)))},setDOMEvents:function(){var a=this,b=a.chart.container,f=b.ownerDocument;b.onmousedown=function(b){a.onContainerMouseDown(b)};b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};this.unbindContainerMouseLeave=w(b,"mouseleave",a.onContainerMouseLeave);c.unbindDocumentMouseUp||(c.unbindDocumentMouseUp=w(f,"mouseup",a.onDocumentMouseUp));c.hasTouch&&(w(b,"touchstart",function(b){a.onContainerTouchStart(b)}),w(b,"touchmove",function(b){a.onContainerTouchMove(b)}),
c.unbindDocumentTouchEnd||(c.unbindDocumentTouchEnd=w(f,"touchend",a.onDocumentTouchEnd)))},destroy:function(){var a=this;a.unDocMouseMove&&a.unDocMouseMove();this.unbindContainerMouseLeave();c.chartCount||(c.unbindDocumentMouseUp&&(c.unbindDocumentMouseUp=c.unbindDocumentMouseUp()),c.unbindDocumentTouchEnd&&(c.unbindDocumentTouchEnd=c.unbindDocumentTouchEnd()));clearInterval(a.tooltipTimeout);q(a,function(b,c){a[c]=null})}}});M(J,"parts/TouchPointer.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],
function(c,e){var F=e.extend,I=e.pick,G=c.charts,H=c.noop;F(c.Pointer.prototype,{pinchTranslate:function(c,e,C,B,u,w){this.zoomHor&&this.pinchTranslateDirection(!0,c,e,C,B,u,w);this.zoomVert&&this.pinchTranslateDirection(!1,c,e,C,B,u,w)},pinchTranslateDirection:function(c,e,C,B,u,w,m,r){var q=this.chart,v=c?"x":"y",f=c?"X":"Y",b="chart"+f,a=c?"width":"height",d=q["plot"+(c?"Left":"Top")],h,k,l=r||1,y=q.inverted,p=q.bounds[c?"h":"v"],g=1===e.length,t=e[0][b],x=C[0][b],L=!g&&e[1][b],E=!g&&C[1][b];C=
function(){!g&&20<Math.abs(t-L)&&(l=r||Math.abs(x-E)/Math.abs(t-L));k=(d-x)/l+t;h=q["plot"+(c?"Width":"Height")]/l};C();e=k;if(e<p.min){e=p.min;var n=!0}else e+h>p.max&&(e=p.max-h,n=!0);n?(x-=.8*(x-m[v][0]),g||(E-=.8*(E-m[v][1])),C()):m[v]=[x,E];y||(w[v]=k-d,w[a]=h);w=y?1/l:l;u[a]=h;u[v]=e;B[y?c?"scaleY":"scaleX":"scale"+f]=l;B["translate"+f]=w*d+(x-w*t)},pinch:function(c){var e=this,v=e.chart,B=e.pinchDown,u=c.touches,w=u.length,m=e.lastValidTouch,r=e.hasZoom,D=e.selectionMarker,A={},f=1===w&&(e.inClass(c.target,
"highcharts-tracker")&&v.runTrackerClick||e.runChartClick),b={};1<w&&(e.initiated=!0);r&&e.initiated&&!f&&c.preventDefault();[].map.call(u,function(a){return e.normalize(a)});"touchstart"===c.type?([].forEach.call(u,function(a,b){B[b]={chartX:a.chartX,chartY:a.chartY}}),m.x=[B[0].chartX,B[1]&&B[1].chartX],m.y=[B[0].chartY,B[1]&&B[1].chartY],v.axes.forEach(function(a){if(a.zoomEnabled){var b=v.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,f=a.toPixels(Math.min(I(a.options.min,a.dataMin),a.dataMin)),
e=a.toPixels(Math.max(I(a.options.max,a.dataMax),a.dataMax)),m=Math.max(f,e);b.min=Math.min(a.pos,Math.min(f,e)-c);b.max=Math.max(a.pos+a.len,m+c)}}),e.res=!0):e.followTouchMove&&1===w?this.runPointActions(e.normalize(c)):B.length&&(D||(e.selectionMarker=D=F({destroy:H,touch:!0},v.plotBox)),e.pinchTranslate(B,u,A,D,b,m),e.hasPinched=r,e.scaleGroups(A,b),e.res&&(e.res=!1,this.reset(!1,0)))},touch:function(e,q){var v=this.chart,B;if(v.index!==c.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});
c.hoverChartIndex=v.index;if(1===e.touches.length)if(e=this.normalize(e),(B=v.isInsidePlot(e.chartX-v.plotLeft,e.chartY-v.plotTop))&&!v.openMenu){q&&this.runPointActions(e);if("touchmove"===e.type){q=this.pinchDown;var u=q[0]?4<=Math.sqrt(Math.pow(q[0].chartX-e.chartX,2)+Math.pow(q[0].chartY-e.chartY,2)):!1}I(u,!0)&&this.pinch(e)}else q&&this.reset();else 2===e.touches.length&&this.pinch(e)},onContainerTouchStart:function(c){this.zoomOption(c);this.touch(c,!0)},onContainerTouchMove:function(c){this.touch(c)},
onDocumentTouchEnd:function(e){G[c.hoverChartIndex]&&G[c.hoverChartIndex].pointer.drop(e)}})});M(J,"parts/MSPointer.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.extend,I=e.objectEach;e=e.wrap;var G=c.addEvent,H=c.charts,v=c.css,q=c.doc,C=c.noop,B=c.Pointer,u=c.removeEvent,w=c.win;if(!c.hasTouch&&(w.PointerEvent||w.MSPointerEvent)){var m={},r=!!w.PointerEvent,D=function(){var c=[];c.item=function(b){return this[b]};I(m,function(b){c.push({pageX:b.pageX,pageY:b.pageY,target:b.target})});
return c},A=function(f,b,a,d){"touch"!==f.pointerType&&f.pointerType!==f.MSPOINTER_TYPE_TOUCH||!H[c.hoverChartIndex]||(d(f),d=H[c.hoverChartIndex].pointer,d[b]({type:a,target:f.currentTarget,preventDefault:C,touches:D()}))};F(B.prototype,{onContainerPointerDown:function(c){A(c,"onContainerTouchStart","touchstart",function(b){m[b.pointerId]={pageX:b.pageX,pageY:b.pageY,target:b.currentTarget}})},onContainerPointerMove:function(c){A(c,"onContainerTouchMove","touchmove",function(b){m[b.pointerId]={pageX:b.pageX,
pageY:b.pageY};m[b.pointerId].target||(m[b.pointerId].target=b.currentTarget)})},onDocumentPointerUp:function(c){A(c,"onDocumentTouchEnd","touchend",function(b){delete m[b.pointerId]})},batchMSEvents:function(c){c(this.chart.container,r?"pointerdown":"MSPointerDown",this.onContainerPointerDown);c(this.chart.container,r?"pointermove":"MSPointerMove",this.onContainerPointerMove);c(q,r?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});e(B.prototype,"init",function(c,b,a){c.call(this,b,a);this.hasZoom&&
v(b.container,{"-ms-touch-action":"none","touch-action":"none"})});e(B.prototype,"setDOMEvents",function(c){c.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(G)});e(B.prototype,"destroy",function(c){this.batchMSEvents(u);c.call(this)})}});M(J,"parts/Legend.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.defined,I=e.discardElement,G=e.isNumber,H=e.pick,v=e.relativeLength,q=e.setAnimation,C=e.syncTimeout;e=e.wrap;var B=c.addEvent,u=c.css,w=c.fireEvent,
m=c.isFirefox,r=c.marginNames,D=c.merge,A=c.stableSort,f=c.win;c.Legend=function(b,a){this.init(b,a)};c.Legend.prototype={init:function(b,a){this.chart=b;this.setOptions(a);a.enabled&&(this.render(),B(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=B(this.chart,"render",function(){this.legend.proximatePositions();this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(b){var a=H(b.padding,8);this.options=b;
this.chart.styledMode||(this.itemStyle=b.itemStyle,this.itemHiddenStyle=D(this.itemStyle,b.itemHiddenStyle));this.itemMarginTop=b.itemMarginTop||0;this.itemMarginBottom=b.itemMarginBottom||0;this.padding=a;this.initialItemY=a-5;this.symbolWidth=H(b.symbolWidth,16);this.pages=[];this.proximate="proximate"===b.layout&&!this.chart.inverted},update:function(b,a){var d=this.chart;this.setOptions(D(!0,this.options,b));this.destroy();d.isDirtyLegend=d.isDirtyBox=!0;H(a,!0)&&d.redraw();w(this,"afterUpdate")},
colorizeItem:function(b,a){b.legendGroup[a?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var d=this.options,c=b.legendItem,f=b.legendLine,e=b.legendSymbol,m=this.itemHiddenStyle.color;d=a?d.itemStyle.color:m;var p=a?b.color||m:m,g=b.options&&b.options.marker,t={fill:p};c&&c.css({fill:d,color:d});f&&f.attr({stroke:p});e&&(g&&e.isMarker&&(t=b.pointAttribs(),a||(t.stroke=t.fill=m)),e.attr(t))}w(this,"afterColorizeItem",{item:b,visible:a})},positionItems:function(){this.allItems.forEach(this.positionItem,
this);this.chart.isResizing||this.positionCheckboxes()},positionItem:function(b){var a=this.options,d=a.symbolPadding;a=!a.rtl;var c=b._legendItemPos,f=c[0];c=c[1];var e=b.checkbox;if((b=b.legendGroup)&&b.element)b[F(b.translateY)?"animate":"attr"]({translateX:a?f:this.legendWidth-f-2*d-4,translateY:c});e&&(e.x=f,e.y=c)},destroyItem:function(b){var a=b.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(a){b[a]&&(b[a]=b[a].destroy())});a&&I(b.checkbox)},destroy:function(){function b(a){this[a]&&
(this[a]=this[a].destroy())}this.getAllItems().forEach(function(a){["legendItem","legendGroup"].forEach(b,a)});"clipRect up down pager nav box title group".split(" ").forEach(b,this);this.display=null},positionCheckboxes:function(){var b=this.group&&this.group.alignAttr,a=this.clipHeight||this.legendHeight,d=this.titleHeight;if(b){var c=b.translateY;this.allItems.forEach(function(f){var e=f.checkbox;if(e){var h=c+d+e.y+(this.scrollOffset||0)+3;u(e,{left:b.translateX+f.checkboxOffset+e.x-20+"px",top:h+
"px",display:this.proximate||h>c-6&&h<c+a-6?"":"none"})}},this)}},renderTitle:function(){var b=this.options,a=this.padding,d=b.title,c=0;d.text&&(this.title||(this.title=this.chart.renderer.label(d.text,a-3,a-4,null,null,null,b.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(d.style),this.title.add(this.group)),d.width||this.title.css({width:this.maxLegendWidth+"px"}),b=this.title.getBBox(),c=b.height,this.offsetWidth=b.width,this.contentGroup.attr({translateY:c}));
this.titleHeight=c},setText:function(b){var a=this.options;b.legendItem.attr({text:a.labelFormat?c.format(a.labelFormat,b,this.chart):a.labelFormatter.call(b)})},renderItem:function(b){var a=this.chart,d=a.renderer,c=this.options,f=this.symbolWidth,e=c.symbolPadding,m=this.itemStyle,p=this.itemHiddenStyle,g="horizontal"===c.layout?H(c.itemDistance,20):0,t=!c.rtl,x=b.legendItem,L=!b.series,E=!L&&b.series.drawLegendSymbol?b.series:b,n=E.options;n=this.createCheckboxForItem&&n&&n.showCheckbox;g=f+e+
g+(n?20:0);var z=c.useHTML,r=b.options.className;x||(b.legendGroup=d.g("legend-item").addClass("highcharts-"+E.type+"-series highcharts-color-"+b.colorIndex+(r?" "+r:"")+(L?" highcharts-series-"+b.index:"")).attr({zIndex:1}).add(this.scrollGroup),b.legendItem=x=d.text("",t?f+e:-e,this.baseline||0,z),a.styledMode||x.css(D(b.visible?m:p)),x.attr({align:t?"left":"right",zIndex:2}).add(b.legendGroup),this.baseline||(this.fontMetrics=d.fontMetrics(a.styledMode?12:m.fontSize,x),this.baseline=this.fontMetrics.f+
3+this.itemMarginTop,x.attr("y",this.baseline)),this.symbolHeight=c.symbolHeight||this.fontMetrics.f,E.drawLegendSymbol(this,b),this.setItemEvents&&this.setItemEvents(b,x,z));n&&!b.checkbox&&this.createCheckboxForItem(b);this.colorizeItem(b,b.visible);!a.styledMode&&m.width||x.css({width:(c.itemWidth||this.widthOption||a.spacingBox.width)-g});this.setText(b);a=x.getBBox();b.itemWidth=b.checkboxOffset=c.itemWidth||b.legendItemWidth||a.width+g;this.maxItemWidth=Math.max(this.maxItemWidth,b.itemWidth);
this.totalItemWidth+=b.itemWidth;this.itemHeight=b.itemHeight=Math.round(b.legendItemHeight||a.height||this.symbolHeight)},layoutItem:function(b){var a=this.options,d=this.padding,c="horizontal"===a.layout,f=b.itemHeight,e=this.itemMarginBottom,m=this.itemMarginTop,p=c?H(a.itemDistance,20):0,g=this.maxLegendWidth;a=a.alignColumns&&this.totalItemWidth>g?this.maxItemWidth:b.itemWidth;c&&this.itemX-d+a>g&&(this.itemX=d,this.lastLineHeight&&(this.itemY+=m+this.lastLineHeight+e),this.lastLineHeight=0);
this.lastItemY=m+this.itemY+e;this.lastLineHeight=Math.max(f,this.lastLineHeight);b._legendItemPos=[this.itemX,this.itemY];c?this.itemX+=a:(this.itemY+=m+f+e,this.lastLineHeight=f);this.offsetWidth=this.widthOption||Math.max((c?this.itemX-d-(b.checkbox?0:p):a)+d,this.offsetWidth)},getAllItems:function(){var b=[];this.chart.series.forEach(function(a){var d=a&&a.options;a&&H(d.showInLegend,F(d.linkedTo)?!1:void 0,!0)&&(b=b.concat(a.legendItems||("point"===d.legendType?a.data:a)))});w(this,"afterGetAllItems",
{allItems:b});return b},getAlignment:function(){var b=this.options;return this.proximate?b.align.charAt(0)+"tv":b.floating?"":b.align.charAt(0)+b.verticalAlign.charAt(0)+b.layout.charAt(0)},adjustMargins:function(b,a){var d=this.chart,c=this.options,f=this.getAlignment();f&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(e,h){e.test(f)&&!F(b[h])&&(d[r[h]]=Math.max(d[r[h]],d.legend[(h+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][h]*c[h%2?"x":"y"]+H(c.margin,12)+a[h]+
(d.titleOffset[h]||0)))})},proximatePositions:function(){var b=this.chart,a=[],d="left"===this.options.align;this.allItems.forEach(function(f){var e=d;if(f.yAxis&&f.points){f.xAxis.options.reversed&&(e=!e);var h=c.find(e?f.points:f.points.slice(0).reverse(),function(a){return G(a.plotY)});e=this.itemMarginTop+f.legendItem.getBBox().height+this.itemMarginBottom;var m=f.yAxis.top-b.plotTop;f.visible?(h=h?h.plotY:f.yAxis.height,h+=m-.3*e):h=m+f.yAxis.height;a.push({target:h,size:e,item:f})}},this);c.distribute(a,
b.plotHeight);a.forEach(function(a){a.item._legendItemPos[1]=b.plotTop-b.spacing[0]+a.pos})},render:function(){var b=this.chart,a=b.renderer,d=this.group,c,f=this.box,e=this.options,m=this.padding;this.itemX=m;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=v(e.width,b.spacingBox.width-m);var p=b.spacingBox.width-2*m-e.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(p/=2);this.maxLegendWidth=this.widthOption||p;d||(this.group=d=a.g("legend").attr({zIndex:7}).add(),
this.contentGroup=a.g().attr({zIndex:1}).add(d),this.scrollGroup=a.g().add(this.contentGroup));this.renderTitle();p=this.getAllItems();A(p,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});e.reversed&&p.reverse();this.allItems=p;this.display=c=!!p.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;p.forEach(this.renderItem,this);p.forEach(this.layoutItem,this);p=(this.widthOption||this.offsetWidth)+m;var g=this.lastItemY+
this.lastLineHeight+this.titleHeight;g=this.handleOverflow(g);g+=m;f||(this.box=f=a.rect().addClass("highcharts-legend-box").attr({r:e.borderRadius}).add(d),f.isNew=!0);b.styledMode||f.attr({stroke:e.borderColor,"stroke-width":e.borderWidth||0,fill:e.backgroundColor||"none"}).shadow(e.shadow);0<p&&0<g&&(f[f.isNew?"attr":"animate"](f.crisp.call({},{x:0,y:0,width:p,height:g},f.strokeWidth())),f.isNew=!1);f[c?"show":"hide"]();b.styledMode&&"none"===d.getStyle("display")&&(p=g=0);this.legendWidth=p;this.legendHeight=
g;c&&(a=b.spacingBox,f=a.y,/(lth|ct|rth)/.test(this.getAlignment())&&0<b.titleOffset[0]?f+=b.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<b.titleOffset[2]&&(f-=b.titleOffset[2]),f!==a.y&&(a=D(a,{y:f})),d.align(D(e,{width:p,height:g,verticalAlign:this.proximate?"top":e.verticalAlign}),!0,a));this.proximate||this.positionItems();w(this,"afterRender")},handleOverflow:function(b){var a=this,d=this.chart,c=d.renderer,f=this.options,e=f.y,m=this.padding;e=d.spacingBox.height+("top"===f.verticalAlign?
-e:e)-m;var p=f.maxHeight,g,t=this.clipRect,x=f.navigation,L=H(x.animation,!0),E=x.arrowSize||12,n=this.nav,z=this.pages,r,q=this.allItems,u=function(b){"number"===typeof b?t.attr({height:b}):t&&(a.clipRect=t.destroy(),a.contentGroup.clip());a.contentGroup.div&&(a.contentGroup.div.style.clip=b?"rect("+m+"px,9999px,"+(m+b)+"px,0)":"auto")},w=function(b){a[b]=c.circle(0,0,1.3*E).translate(E/2,E/2).add(n);d.styledMode||a[b].attr("fill","rgba(0,0,0,0.0001)");return a[b]};"horizontal"!==f.layout||"middle"===
f.verticalAlign||f.floating||(e/=2);p&&(e=Math.min(e,p));z.length=0;b>e&&!1!==x.enabled?(this.clipHeight=g=Math.max(e-20-this.titleHeight-m,0),this.currentPage=H(this.currentPage,1),this.fullHeight=b,q.forEach(function(a,b){var d=a._legendItemPos[1],c=Math.round(a.legendItem.getBBox().height),f=z.length;if(!f||d-z[f-1]>g&&(r||d)!==z[f-1])z.push(r||d),f++;a.pageIx=f-1;r&&(q[b-1].pageIx=f-1);b===q.length-1&&d+c-z[f-1]>g&&d!==r&&(z.push(d),a.pageIx=f);d!==r&&(r=d)}),t||(t=a.clipRect=c.clipRect(0,m,9999,
0),a.contentGroup.clip(t)),u(g),n||(this.nav=n=c.g().attr({zIndex:1}).add(this.group),this.up=c.symbol("triangle",0,0,E,E).add(n),w("upTracker").on("click",function(){a.scroll(-1,L)}),this.pager=c.text("",15,10).addClass("highcharts-legend-navigation"),d.styledMode||this.pager.css(x.style),this.pager.add(n),this.down=c.symbol("triangle-down",0,0,E,E).add(n),w("downTracker").on("click",function(){a.scroll(1,L)})),a.scroll(0),b=e):n&&(u(),this.nav=n.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=
0);return b},scroll:function(b,a){var d=this,f=this.chart,e=this.pages,l=e.length,m=this.currentPage+b;b=this.clipHeight;var p=this.options.navigation,g=this.pager,t=this.padding;m>l&&(m=l);0<m&&("undefined"!==typeof a&&q(a,f),this.nav.attr({translateX:t,translateY:b+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(a){a.attr({"class":1===m?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),g.attr({text:m+"/"+l}),[this.down,this.downTracker].forEach(function(a){a.attr({x:18+
this.pager.getBBox().width,"class":m===l?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),f.styledMode||(this.up.attr({fill:1===m?p.inactiveColor:p.activeColor}),this.upTracker.css({cursor:1===m?"default":"pointer"}),this.down.attr({fill:m===l?p.inactiveColor:p.activeColor}),this.downTracker.css({cursor:m===l?"default":"pointer"})),this.scrollOffset=-e[m-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=m,this.positionCheckboxes(),
a=c.animObject(H(a,f.renderer.globalAnimation,!0)),C(function(){w(d,"afterScroll",{currentPage:m})},a.duration||0))}};c.LegendSymbolMixin={drawRectangle:function(b,a){var d=b.symbolHeight,c=b.options.squareSymbol;a.legendSymbol=this.chart.renderer.rect(c?(b.symbolWidth-d)/2:0,b.baseline-d+1,c?d:b.symbolWidth,d,H(b.options.symbolRadius,d/2)).addClass("highcharts-point").attr({zIndex:3}).add(a.legendGroup)},drawLineMarker:function(b){var a=this.options,d=a.marker,c=b.symbolWidth,f=b.symbolHeight,e=
f/2,m=this.chart.renderer,p=this.legendGroup;b=b.baseline-Math.round(.3*b.fontMetrics.b);var g={};this.chart.styledMode||(g={"stroke-width":a.lineWidth||0},a.dashStyle&&(g.dashstyle=a.dashStyle));this.legendLine=m.path(["M",0,b,"L",c,b]).addClass("highcharts-graph").attr(g).add(p);d&&!1!==d.enabled&&c&&(a=Math.min(H(d.radius,e),e),0===this.symbol.indexOf("url")&&(d=D(d,{width:f,height:f}),a=0),this.legendSymbol=d=m.symbol(this.symbol,c/2-a,b-a,2*a,2*a,d).addClass("highcharts-point").add(p),d.isMarker=
!0)}};(/Trident\/7\.0/.test(f.navigator&&f.navigator.userAgent)||m)&&e(c.Legend.prototype,"positionItem",function(b,a){var d=this,c=function(){a._legendItemPos&&b.call(d,a)};c();d.bubbleLegend||setTimeout(c)})});M(J,"parts/Chart.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.animObject,I=e.attr,G=e.defined,H=e.discardElement,v=e.erase,q=e.extend,C=e.isArray,B=e.isNumber,u=e.isObject,w=e.isString,m=e.numberFormat,r=e.objectEach,D=e.pick,A=e.pInt,f=e.relativeLength,b=e.setAnimation,
a=e.splat,d=e.syncTimeout,h=c.addEvent,k=c.animate,l=c.doc,y=c.Axis,p=c.createElement,g=c.defaultOptions,t=c.charts,x=c.css,L=c.find,E=c.fireEvent,n=c.Legend,z=c.marginNames,N=c.merge,O=c.Pointer,V=c.removeEvent,T=c.seriesTypes,P=c.win,Q=c.Chart=function(){this.getArgs.apply(this,arguments)};c.chart=function(a,b,d){return new Q(a,b,d)};q(Q.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(w(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(a,
b){var d,f=a.series,e=a.plotOptions||{};E(this,"init",{args:arguments},function(){a.series=null;d=N(g,a);r(d.plotOptions,function(a,b){u(a)&&(a.tooltip=e[b]&&N(e[b].tooltip)||void 0)});d.tooltip.userOptions=a.chart&&a.chart.forExport&&a.tooltip.userOptions||a.tooltip;d.series=a.series=f;this.userOptions=a;var n=d.chart,x=n.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=b;this.isResizing=0;this.options=d;this.axes=[];this.series=[];this.time=a.time&&
Object.keys(a.time).length?new c.Time(a.time):c.time;this.numberFormatter=n.numberFormatter||m;this.styledMode=n.styledMode;this.hasCartesianSeries=n.showAxes;var l=this;l.index=t.length;t.push(l);c.chartCount++;x&&r(x,function(a,b){c.isFunction(a)&&h(l,b,a)});l.xAxis=[];l.yAxis=[];l.pointCount=l.colorCounter=l.symbolCounter=0;E(l,"afterInit");l.firstRender()})},initSeries:function(a){var b=this.options.chart;b=a.type||b.type||b.defaultSeriesType;var d=T[b];d||c.error(17,!0,this,{missingModuleFor:b});
b=new d;b.init(this,a);return b},setSeriesData:function(){this.getSeriesOrderByLinks().forEach(function(a){a.points||a.data||!a.enabledDataSorting||a.setData(a.options.data,!1)})},getSeriesOrderByLinks:function(){return this.series.concat().sort(function(a,b){return a.linkedSeries.length||b.linkedSeries.length?b.linkedSeries.length-a.linkedSeries.length:0})},orderSeries:function(a){var b=this.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].getName())},isInsidePlot:function(a,b,
d){var g=d?b:a;a=d?a:b;return 0<=g&&g<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(a){E(this,"beforeRedraw");var d=this.axes,g=this.series,c=this.pointer,f=this.legend,e=this.userOptions.legend,h=this.isDirtyLegend,t=this.hasCartesianSeries,n=this.isDirtyBox,x=this.renderer,l=x.isHidden(),p=[];this.setResponsive&&this.setResponsive(!1);b(a,this);l&&this.temporaryDisplay();this.layOutTitles();for(a=g.length;a--;){var k=g[a];if(k.options.stacking){var m=!0;if(k.isDirty){var z=!0;break}}}if(z)for(a=
g.length;a--;)k=g[a],k.options.stacking&&(k.isDirty=!0);g.forEach(function(a){a.isDirty&&("point"===a.options.legendType?(a.updateTotals&&a.updateTotals(),h=!0):e&&(e.labelFormatter||e.labelFormat)&&(h=!0));a.isDirtyData&&E(a,"updatedData")});h&&f&&f.options.enabled&&(f.render(),this.isDirtyLegend=!1);m&&this.getStacks();t&&d.forEach(function(a){a.updateNames();a.setScale()});this.getMargins();t&&(d.forEach(function(a){a.isDirty&&(n=!0)}),d.forEach(function(a){var b=a.min+","+a.max;a.extKey!==b&&
(a.extKey=b,p.push(function(){E(a,"afterSetExtremes",q(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(n||m)&&a.redraw()}));n&&this.drawChartBox();E(this,"predraw");g.forEach(function(a){(n||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});c&&c.reset(!0);x.draw();E(this,"redraw");E(this,"render");l&&this.temporaryDisplay(!0);p.forEach(function(a){a.call()})},get:function(a){function b(b){return b.id===a||b.options&&b.options.id===a}var d=this.series,g;var c=L(this.axes,b)||L(this.series,
b);for(g=0;!c&&g<d.length;g++)c=L(d[g].points||[],b);return c},getAxes:function(){var b=this,d=this.options,g=d.xAxis=a(d.xAxis||{});d=d.yAxis=a(d.yAxis||{});E(this,"getAxes");g.forEach(function(a,b){a.index=b;a.isX=!0});d.forEach(function(a,b){a.index=b});g.concat(d).forEach(function(a){new y(b,a)});E(this,"afterGetAxes")},getSelectedPoints:function(){var a=[];this.series.forEach(function(b){a=a.concat((b[b.hasGroupedData?"points":"data"]||[]).filter(function(a){return D(a.selectedStaging,a.selected)}))});
return a},getSelectedSeries:function(){return this.series.filter(function(a){return a.selected})},setTitle:function(a,b,d){this.applyDescription("title",a);this.applyDescription("subtitle",b);this.applyDescription("caption",void 0);this.layOutTitles(d)},applyDescription:function(a,b){var d=this,g="title"===a?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};g=this.options[a]=N(!this.styledMode&&{style:g},this.options[a],b);var c=this[a];c&&b&&(this[a]=c=c.destroy());
g&&!c&&(c=this.renderer.text(g.text,0,0,g.useHTML).attr({align:g.align,"class":"highcharts-"+a,zIndex:g.zIndex||4}).add(),c.update=function(b){d[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[a]](b)},this.styledMode||c.css(g.style),this[a]=c)},layOutTitles:function(a){var b=[0,0,0],d=this.renderer,g=this.spacingBox;["title","subtitle","caption"].forEach(function(a){var c=this[a],f=this.options[a],e=f.verticalAlign||"top";a="title"===a?-3:"top"===e?b[0]+2:0;if(c){if(!this.styledMode)var h=
f.style.fontSize;h=d.fontMetrics(h,c).b;c.css({width:(f.width||g.width+(f.widthAdjust||0))+"px"});var t=Math.round(c.getBBox(f.useHTML).height);c.align(q({y:"bottom"===e?h:a+h,height:t},f),!1,"spacingBox");f.floating||("top"===e?b[0]=Math.ceil(b[0]+t):"bottom"===e&&(b[2]=Math.ceil(b[2]+t)))}},this);b[0]&&"top"===(this.options.title.verticalAlign||"top")&&(b[0]+=this.options.title.margin);b[2]&&"bottom"===this.options.caption.verticalAlign&&(b[2]+=this.options.caption.margin);var c=!this.titleOffset||
this.titleOffset.join(",")!==b.join(",");this.titleOffset=b;E(this,"afterLayOutTitles");!this.isDirtyBox&&c&&(this.isDirtyBox=this.isDirtyLegend=c,this.hasRendered&&D(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=this.options.chart,b=a.width;a=a.height;var d=this.renderTo;G(b)||(this.containerWidth=c.getStyle(d,"width"));G(a)||(this.containerHeight=c.getStyle(d,"height"));this.chartWidth=Math.max(0,b||this.containerWidth||600);this.chartHeight=Math.max(0,f(a,this.chartWidth)||
(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(a){var b=this.renderTo;if(a)for(;b&&b.style;)b.hcOrigStyle&&(c.css(b,b.hcOrigStyle),delete b.hcOrigStyle),b.hcOrigDetached&&(l.body.removeChild(b),b.hcOrigDetached=!1),b=b.parentNode;else for(;b&&b.style;){l.body.contains(b)||b.parentNode||(b.hcOrigDetached=!0,l.body.appendChild(b));if("none"===c.getStyle(b,"display",!1)||b.hcOricDetached)b.hcOrigStyle={display:b.style.display,height:b.style.height,overflow:b.style.overflow},
a={display:"block",overflow:"hidden"},b!==this.renderTo&&(a.height=0),c.css(b,a),b.offsetWidth||b.style.setProperty("display","block","important");b=b.parentNode;if(b===l.body)break}},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var a=this.options,b=a.chart;var d=this.renderTo;var g=c.uniqueKey(),f,e;d||(this.renderTo=d=b.renderTo);w(d)&&(this.renderTo=d=l.getElementById(d));d||c.error(13,!0,this);var h=A(I(d,"data-highcharts-chart"));
B(h)&&t[h]&&t[h].hasRendered&&t[h].destroy();I(d,"data-highcharts-chart",this.index);d.innerHTML="";b.skipClone||d.offsetWidth||this.temporaryDisplay();this.getChartSize();h=this.chartWidth;var n=this.chartHeight;x(d,{overflow:"hidden"});this.styledMode||(f=q({position:"relative",overflow:"hidden",width:h+"px",height:n+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style));this.container=d=p("div",{id:g},f,d);this._cursor=d.style.cursor;this.renderer=
new (c[b.renderer]||c.Renderer)(d,h,n,null,b.forExport,a.exporting&&a.exporting.allowHTML,this.styledMode);this.setClassName(b.className);if(this.styledMode)for(e in a.defs)this.renderer.definition(a.defs[e]);else this.renderer.setStyle(b.style);this.renderer.chartIndex=this.index;E(this,"afterGetContainer")},getMargins:function(a){var b=this.spacing,d=this.margin,g=this.titleOffset;this.resetMargins();g[0]&&!G(d[0])&&(this.plotTop=Math.max(this.plotTop,g[0]+b[0]));g[2]&&!G(d[2])&&(this.marginBottom=
Math.max(this.marginBottom,g[2]+b[2]));this.legend&&this.legend.display&&this.legend.adjustMargins(d,b);E(this,"getMargins");a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],d=a.colorAxis,g=a.margin,c=function(a){a.forEach(function(a){a.visible&&a.getOffset()})};a.hasCartesianSeries?c(a.axes):d&&d.length&&c(d);z.forEach(function(d,c){G(g[c])||(a[d]+=b[c])});a.setChartSize()},reflow:function(a){var b=this,g=b.options.chart,f=b.renderTo,e=G(g.width)&&G(g.height),
h=g.width||c.getStyle(f,"width");g=g.height||c.getStyle(f,"height");f=a?a.target:P;if(!e&&!b.isPrinting&&h&&g&&(f===P||f===l)){if(h!==b.containerWidth||g!==b.containerHeight)c.clearTimeout(b.reflowTimeout),b.reflowTimeout=d(function(){b.container&&b.setSize(void 0,void 0,!1)},a?100:0);b.containerWidth=h;b.containerHeight=g}},setReflow:function(a){var b=this;!1===a||this.unbindReflow?!1===a&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=h(P,"resize",function(a){b.options&&
b.reflow(a)}),h(this,"destroy",this.unbindReflow))},setSize:function(a,g,c){var f=this,e=f.renderer;f.isResizing+=1;b(c,f);f.oldChartHeight=f.chartHeight;f.oldChartWidth=f.chartWidth;"undefined"!==typeof a&&(f.options.chart.width=a);"undefined"!==typeof g&&(f.options.chart.height=g);f.getChartSize();if(!f.styledMode){var h=e.globalAnimation;(h?k:x)(f.container,{width:f.chartWidth+"px",height:f.chartHeight+"px"},h)}f.setChartSize(!0);e.setSize(f.chartWidth,f.chartHeight,c);f.axes.forEach(function(a){a.isDirty=
!0;a.setScale()});f.isDirtyLegend=!0;f.isDirtyBox=!0;f.layOutTitles();f.getMargins();f.redraw(c);f.oldChartHeight=null;E(f,"resize");d(function(){f&&E(f,"endResize",null,function(){--f.isResizing})},F(h).duration||0)},setChartSize:function(a){var b=this.inverted,d=this.renderer,g=this.chartWidth,c=this.chartHeight,f=this.options.chart,e=this.spacing,h=this.clipOffset,t,n,x,l;this.plotLeft=t=Math.round(this.plotLeft);this.plotTop=n=Math.round(this.plotTop);this.plotWidth=x=Math.max(0,Math.round(g-
t-this.marginRight));this.plotHeight=l=Math.max(0,Math.round(c-n-this.marginBottom));this.plotSizeX=b?l:x;this.plotSizeY=b?x:l;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=d.spacingBox={x:e[3],y:e[0],width:g-e[3]-e[1],height:c-e[0]-e[2]};this.plotBox=d.plotBox={x:t,y:n,width:x,height:l};g=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(g,h[3])/2);d=Math.ceil(Math.max(g,h[0])/2);this.clipBox={x:b,y:d,width:Math.floor(this.plotSizeX-Math.max(g,h[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-
Math.max(g,h[2])/2-d))};a||this.axes.forEach(function(a){a.setAxisSize();a.setAxisTranslation()});E(this,"afterSetChartSize",{skipAxes:a})},resetMargins:function(){E(this,"resetMargins");var a=this,b=a.options.chart;["margin","spacing"].forEach(function(d){var g=b[d],c=u(g)?g:[g,g,g,g];["Top","Right","Bottom","Left"].forEach(function(g,f){a[d][f]=D(b[d+g],c[f])})});z.forEach(function(b,d){a[b]=D(a.margin[d],a.spacing[d])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=
this.options.chart,b=this.renderer,d=this.chartWidth,g=this.chartHeight,c=this.chartBackground,f=this.plotBackground,e=this.plotBorder,h=this.styledMode,t=this.plotBGImage,n=a.backgroundColor,x=a.plotBackgroundColor,l=a.plotBackgroundImage,p,k=this.plotLeft,m=this.plotTop,z=this.plotWidth,L=this.plotHeight,r=this.plotBox,q=this.clipRect,y=this.clipBox,N="animate";c||(this.chartBackground=c=b.rect().addClass("highcharts-background").add(),N="attr");if(h)var u=p=c.strokeWidth();else{u=a.borderWidth||
0;p=u+(a.shadow?8:0);n={fill:n||"none"};if(u||c["stroke-width"])n.stroke=a.borderColor,n["stroke-width"]=u;c.attr(n).shadow(a.shadow)}c[N]({x:p/2,y:p/2,width:d-p-u%2,height:g-p-u%2,r:a.borderRadius});N="animate";f||(N="attr",this.plotBackground=f=b.rect().addClass("highcharts-plot-background").add());f[N](r);h||(f.attr({fill:x||"none"}).shadow(a.plotShadow),l&&(t?(l!==t.attr("href")&&t.attr("href",l),t.animate(r)):this.plotBGImage=b.image(l,k,m,z,L).add()));q?q.animate({width:y.width,height:y.height}):
this.clipRect=b.clipRect(y);N="animate";e||(N="attr",this.plotBorder=e=b.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());h||e.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});e[N](e.crisp({x:k,y:m,width:z,height:L},-e.strokeWidth()));this.isDirtyBox=!1;E(this,"afterDrawChartBox")},propFromSeries:function(){var a=this,b=a.options.chart,d,g=a.options.series,c,f;["inverted","angular","polar"].forEach(function(e){d=T[b.type||b.defaultSeriesType];f=b[e]||
d&&d.prototype[e];for(c=g&&g.length;!f&&c--;)(d=T[g[c].type])&&d.prototype[e]&&(f=!0);a[e]=f})},linkSeries:function(){var a=this,b=a.series;b.forEach(function(a){a.linkedSeries.length=0});b.forEach(function(b){var d=b.options.linkedTo;w(d)&&(d=":previous"===d?a.series[b.index-1]:a.get(d))&&d.linkedParent!==b&&(d.linkedSeries.push(b),b.linkedParent=d,d.enabledDataSorting&&b.setDataSortingOptions(),b.visible=D(b.options.visible,d.options.visible,b.visible))});E(this,"afterLinkSeries")},renderSeries:function(){this.series.forEach(function(a){a.translate();
a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&b.items.forEach(function(d){var g=q(b.style,d.style),c=A(g.left)+a.plotLeft,f=A(g.top)+a.plotTop+12;delete g.left;delete g.top;a.renderer.text(d.html,c,f).attr({zIndex:2}).css(g).add()})},render:function(){var a=this.axes,b=this.colorAxis,d=this.renderer,g=this.options,c=0,f=function(a){a.forEach(function(a){a.visible&&a.render()})};this.setTitle();this.legend=new n(this,g.legend);this.getStacks&&this.getStacks();this.getMargins(!0);
this.setChartSize();g=this.plotWidth;a.some(function(a){if(a.horiz&&a.visible&&a.options.labels.enabled&&a.series.length)return c=21,!0});var e=this.plotHeight=Math.max(this.plotHeight-c,0);a.forEach(function(a){a.setScale()});this.getAxisMargins();var h=1.1<g/this.plotWidth;var t=1.05<e/this.plotHeight;if(h||t)a.forEach(function(a){(a.horiz&&h||!a.horiz&&t)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries?f(a):b&&b.length&&f(b);this.seriesGroup||(this.seriesGroup=
d.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.updateContainerScaling();this.hasRendered=!0},addCredits:function(a){var b=this;a=N(!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&&(P.location.href=a.href)}).attr({align:a.position.align,zIndex:8}),b.styledMode||this.credits.css(a.style),
this.credits.add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},updateContainerScaling:function(){var a=this.container;if(a.offsetWidth&&a.offsetHeight&&a.getBoundingClientRect){var b=a.getBoundingClientRect(),d=b.width/a.offsetWidth;a=b.height/a.offsetHeight;1!==d||1!==a?this.containerScaling={scaleX:d,scaleY:a}:delete this.containerScaling}},destroy:function(){var a=this,b=a.axes,d=a.series,g=a.container,f,e=g&&g.parentNode;E(a,"destroy");a.renderer.forExport?
v(t,a):t[a.index]=void 0;c.chartCount--;a.renderTo.removeAttribute("data-highcharts-chart");V(a);for(f=b.length;f--;)b[f]=b[f].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(f=d.length;f--;)d[f]=d[f].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(b){var d=a[b];d&&d.destroy&&(a[b]=d.destroy())});g&&(g.innerHTML="",V(g),
e&&H(g));r(a,function(b,d){delete a[d]})},firstRender:function(){var a=this,b=a.options;if(!a.isReadyToRender||a.isReadyToRender()){a.getContainer();a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();(C(b.series)?b.series:[]).forEach(function(b){a.initSeries(b)});a.linkSeries();a.setSeriesData();E(a,"beforeRender");O&&(a.pointer=new O(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){this.callbacks.concat([this.callback]).forEach(function(a){a&&
"undefined"!==typeof this.index&&a.apply(this,[this])},this);E(this,"load");E(this,"render");G(this.index)&&this.setReflow(this.options.chart.reflow);this.onload=null}})});M(J,"parts/ScrollablePlotArea.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.pick,I=c.addEvent;e=c.Chart;"";I(e,"afterSetChartSize",function(e){var G=this.options.chart.scrollablePlotArea,v=G&&G.minWidth;G=G&&G.minHeight;if(!this.renderer.forExport){if(v){if(this.scrollablePixelsX=v=Math.max(0,v-this.chartWidth)){this.plotWidth+=
v;this.inverted?(this.clipBox.height+=v,this.plotBox.height+=v):(this.clipBox.width+=v,this.plotBox.width+=v);var q={1:{name:"right",value:v}}}}else G&&(this.scrollablePixelsY=v=Math.max(0,G-this.chartHeight))&&(this.plotHeight+=v,this.inverted?(this.clipBox.width+=v,this.plotBox.width+=v):(this.clipBox.height+=v,this.plotBox.height+=v),q={2:{name:"bottom",value:v}});q&&!e.skipAxes&&this.axes.forEach(function(e){q[e.side]?e.getPlotLinePath=function(){var v=q[e.side].name,u=this[v];this[v]=u-q[e.side].value;
var w=c.Axis.prototype.getPlotLinePath.apply(this,arguments);this[v]=u;return w}:(e.setAxisSize(),e.setAxisTranslation())})}});I(e,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()});e.prototype.setUpScrolling=function(){var e={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(e.overflowX="auto");this.scrollablePixelsY&&(e.overflowY="auto");
this.scrollingContainer=c.createElement("div",{className:"highcharts-scrolling"},e,this.renderTo);this.innerContainer=c.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer);this.innerContainer.appendChild(this.container);this.setUpScrolling=null};e.prototype.moveFixedElements=function(){var c=this.container,e=this.fixedRenderer,v=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),
q;this.scrollablePixelsX&&!this.inverted?q=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?q=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?q=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(q=".highcharts-yaxis");v.push(q,q+"-labels");v.forEach(function(q){[].forEach.call(c.querySelectorAll(q),function(c){(c.namespaceURI===e.SVG_NS?e.box:e.box.parentNode).appendChild(c);c.style.pointerEvents="auto"})})};e.prototype.applyFixed=function(){var e,H=!this.fixedDiv,v=this.options.chart.scrollablePlotArea;
H?(this.fixedDiv=c.createElement("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.renderTo.style.overflow="visible",this.fixedRenderer=e=new c.Renderer(this.fixedDiv,this.chartWidth,this.chartHeight),this.scrollableMask=e.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":F(v.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),
this.moveFixedElements(),I(this,"afterShowResetZoom",this.moveFixedElements),I(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);e=this.chartWidth+(this.scrollablePixelsX||0);var q=this.chartHeight+(this.scrollablePixelsY||0);c.stop(this.container);this.container.style.width=e+"px";this.container.style.height=q+"px";this.renderer.boxWrapper.attr({width:e,height:q,viewBox:[0,0,e,q].join(" ")});this.chartBackground.attr({width:e,height:q});
this.scrollablePixelsY&&(this.scrollingContainer.style.height=this.chartHeight+"px");H&&(v.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*v.scrollPositionX),v.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*v.scrollPositionY));q=this.axisOffset;H=this.plotTop-q[0]-1;v=this.plotLeft-q[3]-1;e=this.plotTop+this.plotHeight+q[2]+1;q=this.plotLeft+this.plotWidth+q[1]+1;var C=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),B=this.plotTop+this.plotHeight-
(this.scrollablePixelsY||0);H=this.scrollablePixelsX?["M",0,H,"L",this.plotLeft-1,H,"L",this.plotLeft-1,e,"L",0,e,"Z","M",C,H,"L",this.chartWidth,H,"L",this.chartWidth,e,"L",C,e,"Z"]:this.scrollablePixelsY?["M",v,0,"L",v,this.plotTop-1,"L",q,this.plotTop-1,"L",q,0,"Z","M",v,B,"L",v,this.chartHeight,"L",q,this.chartHeight,"L",q,B,"Z"]:["M",0,0];"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:H})}});M(J,"parts/Point.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=
e.animObject,I=e.defined,G=e.erase,H=e.extend,v=e.isArray,q=e.isNumber,C=e.isObject,B=e.syncTimeout,u=e.pick,w,m=c.fireEvent,r=c.format,D=c.uniqueKey,A=c.removeEvent;c.Point=w=function(){};c.Point.prototype={init:function(c,b,a){this.series=c;this.applyOptions(b,a);this.id=I(this.id)?this.id:D();this.resolveColor();c.chart.pointCount++;m(this,"afterInit");return this},resolveColor:function(){var c=this.series;var b=c.chart.options.chart.colorCount;var a=c.chart.styledMode;a||this.options.color||(this.color=
c.color);c.options.colorByPoint?(a||(b=c.options.colors||c.chart.options.colors,this.color=this.color||b[c.colorCounter],b=b.length),a=c.colorCounter,c.colorCounter++,c.colorCounter===b&&(c.colorCounter=0)):a=c.colorIndex;this.colorIndex=u(this.colorIndex,a)},applyOptions:function(c,b){var a=this.series,d=a.options.pointValKey||a.pointValKey;c=w.prototype.optionsToObject.call(this,c);H(this,c);this.options=this.options?H(this.options,c):c;c.group&&delete this.group;c.dataLabels&&delete this.dataLabels;
d&&(this.y=this[d]);this.formatPrefix=(this.isNull=u(this.isValid&&!this.isValid(),null===this.x||!q(this.y)))?"null":"point";this.selected&&(this.state="select");"name"in this&&"undefined"===typeof b&&a.xAxis&&a.xAxis.hasNames&&(this.x=a.xAxis.nameToX(this));"undefined"===typeof this.x&&a&&(this.x="undefined"===typeof b?a.autoIncrement(this):b);return this},setNestedProperty:function(c,b,a){a.split(".").reduce(function(a,c,f,e){a[c]=e.length-1===f?b:C(a[c],!0)?a[c]:{};return a[c]},c);return c},optionsToObject:function(f){var b=
{},a=this.series,d=a.options.keys,e=d||a.pointArrayMap||["y"],k=e.length,l=0,m=0;if(q(f)||null===f)b[e[0]]=f;else if(v(f))for(!d&&f.length>k&&(a=typeof f[0],"string"===a?b.name=f[0]:"number"===a&&(b.x=f[0]),l++);m<k;)d&&"undefined"===typeof f[l]||(0<e[m].indexOf(".")?c.Point.prototype.setNestedProperty(b,f[l],e[m]):b[e[m]]=f[l]),l++,m++;else"object"===typeof f&&(b=f,f.dataLabels&&(a._hasPointLabels=!0),f.marker&&(a._hasPointMarkers=!0));return b},getClassName:function(){return"highcharts-point"+(this.selected?
" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+("undefined"!==typeof 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 c=this.series,b=c.zones;c=c.zoneAxis||"y";var a=0,d;for(d=b[a];this[c]>=d.value;)d=b[++a];this.nonZonedColor||(this.nonZonedColor=this.color);
this.color=d&&d.color&&!this.options.color?d.color:this.nonZonedColor;return d},hasNewShapeType:function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},destroy:function(){function c(){e&&(b.setState(),G(e,b),e.length||(d.hoverPoints=null));if(b===d.hoverPoint)b.onMouseOut();if(b.graphic||b.dataLabel||b.dataLabels)A(b),b.destroyElements();for(l in b)b[l]=null}var b=this,a=b.series,d=a.chart;a=a.options.dataSorting;var e=d.hoverPoints,k=F(b.series.chart.renderer.globalAnimation),
l;a&&a.enabled?(this.animateBeforeDestroy(),B(c,k.duration)):c();d.pointCount--;b.legendItem&&d.legend.destroyItem(b)},animateBeforeDestroy:function(){var c=this,b={x:c.startXPos,opacity:0},a,d=c.getGraphicalProps();d.singular.forEach(function(d){a="dataLabel"===d;c[d]=c[d].animate(a?{x:c[d].startXPos,y:c[d].startYPos,opacity:0}:b)});d.plural.forEach(function(a){c[a].forEach(function(a){a.element&&a.animate(H({x:c.startXPos},a.startYPos?{x:a.startXPos,y:a.startYPos}:{}))})})},destroyElements:function(c){var b=
this;c=b.getGraphicalProps(c);c.singular.forEach(function(a){b[a]=b[a].destroy()});c.plural.forEach(function(a){b[a].forEach(function(a){a.element&&a.destroy()});delete b[a]})},getGraphicalProps:function(c){var b=this,a=[],d,f={singular:[],plural:[]};c=c||{graphic:1,dataLabel:1};c.graphic&&a.push("graphic","shadowGroup");c.dataLabel&&a.push("dataLabel","dataLabelUpper","connector");for(d=a.length;d--;){var e=a[d];b[e]&&f.singular.push(e)}["dataLabel","connector"].forEach(function(a){var d=a+"s";c[a]&&
b[d]&&f.plural.push(d)});return f},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(c){var b=this.series,a=b.tooltipOptions,d=u(a.valueDecimals,""),f=a.valuePrefix||"",e=a.valueSuffix||"";b.chart.styledMode&&(c=b.chart.tooltip.styledModeFormat(c));(b.pointArrayMap||["y"]).forEach(function(a){a="{point."+
a;if(f||e)c=c.replace(RegExp(a+"}","g"),f+a+"}"+e);c=c.replace(RegExp(a+"}","g"),a+":,."+d+"f}")});return r(c,{point:this,series:this.series},b.chart)},firePointEvent:function(c,b,a){var d=this,f=this.series.options;(f.point.events[c]||d.options&&d.options.events&&d.options.events[c])&&this.importEvents();"click"===c&&f.allowPointSelect&&(a=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});m(this,c,b,a)},visible:!0}});M(J,"parts/Series.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],
function(c,e){var F=e.animObject,I=e.arrayMax,G=e.arrayMin,H=e.clamp,v=e.correctFloat,q=e.defined,C=e.erase,B=e.extend,u=e.isArray,w=e.isNumber,m=e.isString,r=e.objectEach,D=e.pick,A=e.splat,f=e.syncTimeout,b=c.addEvent,a=c.defaultOptions,d=c.defaultPlotOptions,h=c.fireEvent,k=c.merge,l=c.removeEvent,y=c.SVGElement,p=c.win;c.Series=c.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,
radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){var a=this.series.chart.numberFormatter;return null===this.y?"":a(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,
states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,eventsToUnbind:[],isCartesian:!0,parallelArrays:["x","y"],pointClass:c.Point,requireSorting:!0,sorted:!0,init:function(a,d){h(this,"init",{options:d});var g=this,
f=a.series,e;this.eventOptions=this.eventOptions||{};g.chart=a;g.options=d=g.setOptions(d);g.linkedSeries=[];g.bindAxes();B(g,{name:d.name,state:"",visible:!1!==d.visible,selected:!0===d.selected});var t=d.events;r(t,function(a,d){c.isFunction(a)&&g.eventOptions[d]!==a&&(c.isFunction(g.eventOptions[d])&&l(g,d,g.eventOptions[d]),g.eventOptions[d]=a,b(g,d,a))});if(t&&t.click||d.point&&d.point.events&&d.point.events.click||d.allowPointSelect)a.runTrackerClick=!0;g.getColor();g.getSymbol();g.parallelArrays.forEach(function(a){g[a+
"Data"]||(g[a+"Data"]=[])});g.isCartesian&&(a.hasCartesianSeries=!0);f.length&&(e=f[f.length-1]);g._i=D(e&&e._i,-1)+1;a.orderSeries(this.insert(f));d.dataSorting&&d.dataSorting.enabled?g.setDataSortingOptions():g.points||g.data||g.setData(d.data,!1);h(this,"afterInit")},insert:function(a){var b=this.options.index,d;if(w(b)){for(d=a.length;d--;)if(b>=D(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 D(d,a.length-1)},bindAxes:function(){var a=
this,b=a.options,d=a.chart,f;h(this,"bindAxes",null,function(){(a.axisTypes||[]).forEach(function(g){d[g].forEach(function(d){f=d.options;if(b[g]===f.index||"undefined"!==typeof b[g]&&b[g]===f.id||"undefined"===typeof b[g]&&0===f.index)a.insert(d.series),a[g]=d,d.isDirty=!0});a[g]||a.optionalAxis===g||c.error(18,!0,d)})})},updateParallelArrays:function(a,b){var d=a.series,c=arguments,g=w(b)?function(c){var g="y"===c&&d.toYData?d.toYData(a):a[c];d[c+"Data"][b]=g}:function(a){Array.prototype[b].apply(d[a+
"Data"],Array.prototype.slice.call(c,2))};d.parallelArrays.forEach(g)},hasData:function(){return this.visible&&"undefined"!==typeof this.dataMax&&"undefined"!==typeof this.dataMin||this.visible&&this.yData&&0<this.yData.length},autoIncrement:function(){var a=this.options,b=this.xIncrement,d,c=a.pointIntervalUnit,f=this.chart.time;b=D(b,a.pointStart,0);this.pointInterval=d=D(this.pointInterval,a.pointInterval,1);c&&(a=new f.Date(b),"day"===c?f.set("Date",a,f.get("Date",a)+d):"month"===c?f.set("Month",
a,f.get("Month",a)+d):"year"===c&&f.set("FullYear",a,f.get("FullYear",a)+d),d=a.getTime()-b);this.xIncrement=b+d;return b},setDataSortingOptions:function(){var a=this.options;B(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1});q(a.pointRange)||(a.pointRange=1)},setOptions:function(b){var d=this.chart,c=d.options,g=c.plotOptions,f=d.userOptions||{};b=k(b);d=d.styledMode;var e={plotOptions:g,userOptions:b};h(this,"setOptions",e);var l=e.plotOptions[this.type],p=f.plotOptions||{};
this.userOptions=e.userOptions;f=k(l,g.series,f.plotOptions&&f.plotOptions[this.type],b);this.tooltipOptions=k(a.tooltip,a.plotOptions.series&&a.plotOptions.series.tooltip,a.plotOptions[this.type].tooltip,c.tooltip.userOptions,g.series&&g.series.tooltip,g[this.type].tooltip,b.tooltip);this.stickyTracking=D(b.stickyTracking,p[this.type]&&p[this.type].stickyTracking,p.series&&p.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:f.stickyTracking);null===l.marker&&delete f.marker;
this.zoneAxis=f.zoneAxis;c=this.zones=(f.zones||[]).slice();!f.negativeColor&&!f.negativeFillColor||f.zones||(g={value:f[this.zoneAxis+"Threshold"]||f.threshold||0,className:"highcharts-negative"},d||(g.color=f.negativeColor,g.fillColor=f.negativeFillColor),c.push(g));c.length&&q(c[c.length-1].value)&&c.push(d?{}:{color:this.color,fillColor:this.fillColor});h(this,"afterSetOptions",{options:f});return f},getName:function(){return D(this.options.name,"Series "+(this.index+1))},getCyclic:function(a,
b,d){var c=this.chart,g=this.userOptions,f=a+"Index",e=a+"Counter",h=d?d.length:D(c.options.chart[a+"Count"],c[a+"Count"]);if(!b){var t=D(g[f],g["_"+f]);q(t)||(c.series.length||(c[e]=0),g["_"+f]=t=c[e]%h,c[e]+=1);d&&(b=d[t])}"undefined"!==typeof t&&(this[f]=t);this[a]=b},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||d[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",
this.options.marker.symbol,this.chart.options.symbols)},findPointIndex:function(a,b){var d=a.id,g=a.x,f=this.points,e,h=this.options.dataSorting;if(d)var t=this.chart.get(d);else if(this.linkedParent||this.enabledDataSorting){var l=h&&h.matchByName?"name":"index";t=c.find(f,function(b){return!b.touched&&b[l]===a[l]});if(!t)return}if(t){var p=t&&t.index;"undefined"!==typeof p&&(e=!0)}"undefined"===typeof p&&w(g)&&(p=this.xData.indexOf(g,b));-1!==p&&"undefined"!==typeof p&&this.cropped&&(p=p>=this.cropStart?
p-this.cropStart:p);!e&&f[p]&&f[p].touched&&(p=void 0);return p},drawLegendSymbol:c.LegendSymbolMixin.drawLineMarker,updateData:function(a,b){var d=this.options,c=d.dataSorting,g=this.points,f=[],e,h,t,l=this.requireSorting,p=a.length===g.length,m=!0;this.xIncrement=null;a.forEach(function(a,b){var h=q(a)&&this.pointClass.prototype.optionsToObject.call({series:this},a)||{};var n=h.x;if(h.id||w(n)){if(n=this.findPointIndex(h,t),-1===n||"undefined"===typeof n?f.push(a):g[n]&&a!==d.data[n]?(g[n].update(a,
!1,null,!1),g[n].touched=!0,l&&(t=n+1)):g[n]&&(g[n].touched=!0),!p||b!==n||c&&c.enabled||this.hasDerivedData)e=!0}else f.push(a)},this);if(e)for(a=g.length;a--;)(h=g[a])&&!h.touched&&h.remove&&h.remove(!1,b);else!p||c&&c.enabled?m=!1:(a.forEach(function(a,b){g[b].update&&a!==g[b].y&&g[b].update(a,!1,null,!1)}),f.length=0);g.forEach(function(a){a&&(a.touched=!1)});if(!m)return!1;f.forEach(function(a){this.addPoint(a,!1,null,null,!1)},this);null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=
I(this.xData),this.autoIncrement());return!0},setData:function(a,b,d,f){var g=this,e=g.points,h=e&&e.length||0,t,l=g.options,p=g.chart,x=l.dataSorting,k=null,r=g.xAxis;k=l.turboThreshold;var L=this.xData,q=this.yData,y=(t=g.pointArrayMap)&&t.length,v=l.keys,A=0,B=1,C;a=a||[];t=a.length;b=D(b,!0);x&&x.enabled&&(a=this.sortData(a));!1!==f&&t&&h&&!g.cropped&&!g.hasGroupedData&&g.visible&&!g.isSeriesBoosting&&(C=this.updateData(a,d));if(!C){g.xIncrement=null;g.colorCounter=0;this.parallelArrays.forEach(function(a){g[a+
"Data"].length=0});if(k&&t>k)if(k=g.getFirstValidPoint(a),w(k))for(d=0;d<t;d++)L[d]=this.autoIncrement(),q[d]=a[d];else if(u(k))if(y)for(d=0;d<t;d++)f=a[d],L[d]=f[0],q[d]=f.slice(1,y+1);else for(v&&(A=v.indexOf("x"),B=v.indexOf("y"),A=0<=A?A:0,B=0<=B?B:1),d=0;d<t;d++)f=a[d],L[d]=f[A],q[d]=f[B];else c.error(12,!1,p);else for(d=0;d<t;d++)"undefined"!==typeof a[d]&&(f={series:g},g.pointClass.prototype.applyOptions.apply(f,[a[d]]),g.updateParallelArrays(f,d));q&&m(q[0])&&c.error(14,!0,p);g.data=[];g.options.data=
g.userOptions.data=a;for(d=h;d--;)e[d]&&e[d].destroy&&e[d].destroy();r&&(r.minRange=r.userMinRange);g.isDirty=p.isDirtyBox=!0;g.isDirtyData=!!e;d=!1}"point"===l.legendType&&(this.processData(),this.generatePoints());b&&p.redraw(d)},sortData:function(a){var b=this,d=b.options.dataSorting.sortKey||"y",c=function(a,b){return q(b)&&a.pointClass.prototype.optionsToObject.call({series:a},b)||{}};a.forEach(function(d,g){a[g]=c(b,d);a[g].index=g},this);a.concat().sort(function(a,b){return w(b[d])?b[d]-a[d]:
-1}).forEach(function(a,b){a.x=b},this);b.linkedSeries&&b.linkedSeries.forEach(function(b){var d=b.options,g=d.data;d.dataSorting&&d.dataSorting.enabled||!g||(g.forEach(function(d,f){g[f]=c(b,d);a[f]&&(g[f].x=a[f].x,g[f].index=f)}),b.setData(g,!1))});return a},processData:function(a){var b=this.xData,d=this.yData,g=b.length;var f=0;var e=this.xAxis,h=this.options;var l=h.cropThreshold;var p=this.getExtremesFromAll||h.getExtremesFromAll,m=this.isCartesian;h=e&&e.val2lin;var k=e&&e.isLog,r=this.requireSorting;
if(m&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(e){a=e.getExtremes();var q=a.min;var y=a.max}if(m&&this.sorted&&!p&&(!l||g>l||this.forceCrop))if(b[g-1]<q||b[0]>y)b=[],d=[];else if(this.yData&&(b[0]<q||b[g-1]>y)){f=this.cropData(this.xData,this.yData,q,y);b=f.xData;d=f.yData;f=f.start;var u=!0}for(l=b.length||1;--l;)if(g=k?h(b[l])-h(b[l-1]):b[l]-b[l-1],0<g&&("undefined"===typeof w||g<w))var w=g;else 0>g&&r&&(c.error(15,!1,this.chart),r=!1);this.cropped=u;this.cropStart=f;this.processedXData=
b;this.processedYData=d;this.closestPointRange=this.basePointRange=w},cropData:function(a,b,d,c,f){var g=a.length,e=0,h=g,t;f=D(f,this.cropShoulder);for(t=0;t<g;t++)if(a[t]>=d){e=Math.max(0,t-f);break}for(d=t;d<g;d++)if(a[d]>c){h=d+f;break}return{xData:a.slice(e,h),yData:b.slice(e,h),start:e,end:h}},generatePoints:function(){var a=this.options,b=a.data,d=this.data,c,f=this.processedXData,e=this.processedYData,l=this.pointClass,p=f.length,m=this.cropStart||0,k=this.hasGroupedData;a=a.keys;var r=[],
q;d||k||(d=[],d.length=b.length,d=this.data=d);a&&k&&(this.options.keys=!1);for(q=0;q<p;q++){var y=m+q;if(k){var u=(new l).init(this,[f[q]].concat(A(e[q])));u.dataGroup=this.groupMap[q];u.dataGroup.options&&(u.options=u.dataGroup.options,B(u,u.dataGroup.options),delete u.dataLabels)}else(u=d[y])||"undefined"===typeof b[y]||(d[y]=u=(new l).init(this,b[y],f[q]));u&&(u.index=y,r[q]=u)}this.options.keys=a;if(d&&(p!==(c=d.length)||k))for(q=0;q<c;q++)q!==m||k||(q+=p),d[q]&&(d[q].destroyElements(),d[q].plotX=
void 0);this.data=d;this.points=r;h(this,"afterGeneratePoints")},getXExtremes:function(a){return{min:G(a),max:I(a)}},getExtremes:function(a){var b=this.xAxis,d=this.yAxis,c=this.processedXData||this.xData,g=[],f=0,e=0;var l=0;var p=this.requireSorting?this.cropShoulder:0,m=d?d.positiveValuesOnly:!1,k;a=a||this.stackedYData||this.processedYData||[];d=a.length;b&&(l=b.getExtremes(),e=l.min,l=l.max);for(k=0;k<d;k++){var r=c[k];var q=a[k];var y=(w(q)||u(q))&&(q.length||0<q||!m);r=this.getExtremesFromAll||
this.options.getExtremesFromAll||this.cropped||!b||(c[k+p]||r)>=e&&(c[k-p]||r)<=l;if(y&&r)if(y=q.length)for(;y--;)w(q[y])&&(g[f++]=q[y]);else g[f++]=q}this.dataMin=G(g);this.dataMax=I(g);h(this,"afterGetExtremes")},getFirstValidPoint:function(a){for(var b=null,d=a.length,c=0;null===b&&c<d;)b=a[c],c++;return b},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,d=this.xAxis,c=d.categories,f=this.enabledDataSorting,e=this.yAxis,l=this.points,
p=l.length,k=!!this.modifyValue,m,r=this.pointPlacementToXValue(),y=w(r),A=a.threshold,B=a.startFromThreshold?A:0,C,G=this.zoneAxis||"y",I=Number.MAX_VALUE;for(m=0;m<p;m++){var F=l[m],J=F.x;var W=F.y;var M=F.low,Z=b&&e.stacks[(this.negStacks&&W<(B?0:A)?"-":"")+this.stackKey];e.positiveValuesOnly&&null!==W&&0>=W&&(F.isNull=!0);F.plotX=C=v(H(d.translate(J,0,0,0,1,r,"flags"===this.type),-1E5,1E5));if(b&&this.visible&&Z&&Z[J]){var S=this.getStackIndicator(S,J,this.index);if(!F.isNull){var Y=Z[J];var ba=
Y.points[S.key]}}u(ba)&&(M=ba[0],W=ba[1],M===B&&S.key===Z[J].base&&(M=D(w(A)&&A,e.min)),e.positiveValuesOnly&&0>=M&&(M=null),F.total=F.stackTotal=Y.total,F.percentage=Y.total&&F.y/Y.total*100,F.stackY=W,this.irregularWidths||Y.setOffset(this.pointXOffset||0,this.barW||0));F.yBottom=q(M)?H(e.translate(M,0,1,0,1),-1E5,1E5):null;k&&(W=this.modifyValue(W,F));F.plotY=W="number"===typeof W&&Infinity!==W?H(e.translate(W,0,1,0,1),-1E5,1E5):void 0;F.isInside="undefined"!==typeof W&&0<=W&&W<=e.len&&0<=C&&C<=
d.len;F.clientX=y?v(d.translate(J,0,0,0,1,r)):C;F.negative=F[G]<(a[G+"Threshold"]||A||0);F.category=c&&"undefined"!==typeof c[F.x]?c[F.x]:F.x;if(!F.isNull&&!1!==F.visible){"undefined"!==typeof ca&&(I=Math.min(I,Math.abs(C-ca)));var ca=C}F.zone=this.zones.length&&F.getZone();!F.graphic&&this.group&&f&&(F.isNew=!0)}this.closestPointRangePx=I;h(this,"afterTranslate")},getValidPoints:function(a,b,d){var c=this.chart;return(a||this.points||[]).filter(function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,
c.inverted)?!1:!1!==a.visible&&(d||!a.isNull)})},getClipBox:function(a,b){var d=this.options,c=this.chart,g=c.inverted,f=this.xAxis,e=f&&this.yAxis;a&&!1===d.clip&&e?a=g?{y:-c.chartWidth+e.len+e.pos,height:c.chartWidth,width:c.chartHeight,x:-c.chartHeight+f.len+f.pos}:{y:-e.pos,height:c.chartHeight,width:c.chartWidth,x:-f.pos}:(a=this.clipBox||c.clipBox,b&&(a.width=c.plotSizeX,a.x=0));return b?{width:a.width,x:a.x}:a},setClip:function(a){var b=this.chart,d=this.options,c=b.renderer,g=b.inverted,f=
this.clipBox,e=this.getClipBox(a),h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,e.height,d.xAxis,d.yAxis].join(),l=b[h],p=b[h+"m"];l||(a&&(e.width=0,g&&(e.x=b.plotSizeX+(!1!==d.clip?0:b.plotTop)),b[h+"m"]=p=c.clipRect(g?b.plotSizeX+99:-99,g?-b.plotLeft:-b.plotTop,99,g?b.chartWidth:b.chartHeight)),b[h]=l=c.clipRect(e),l.count={length:0});a&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1);if(!1!==d.clip||a)this.group.clip(a||f?l:b.clipRect),this.markerGroup.clip(p),
this.sharedClipKey=h;a||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&h&&b[h]&&(f||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b=this.chart,d=F(this.options.animation);if(a)this.setClip(d);else{var c=this.sharedClipKey;a=b[c];var g=this.getClipBox(d,!0);a&&a.animate(g,d);b[c+"m"]&&b[c+"m"].animate({width:g.width+99,x:g.x-(b.inverted?0:99)},d);this.animate=null}},afterAnimate:function(){this.setClip();h(this,"afterAnimate");
this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,d,c,f=this.options.marker,e=this[this.specialGroup]||this.markerGroup,h=this.xAxis,l=D(f.enabled,!h||h.isRadial?!0:null,this.closestPointRangePx>=f.enabledThreshold*f.radius);if(!1!==f.enabled||this._hasPointMarkers)for(d=0;d<a.length;d++){var p=a[d];var m=(c=p.graphic)?"animate":"attr";var k=p.marker||{};var r=!!p.marker;if((l&&"undefined"===typeof k.enabled||k.enabled)&&!p.isNull&&!1!==p.visible){var q=D(k.symbol,this.symbol);
var y=this.markerAttribs(p,p.selected&&"select");this.enabledDataSorting&&(p.startXPos=h.reversed?-y.width:h.width);var u=!1!==p.isInside;c?c[u?"show":"hide"](u).animate(y):u&&(0<y.width||p.hasImage)&&(p.graphic=c=b.renderer.symbol(q,y.x,y.y,y.width,y.height,r?k:f).add(e),this.enabledDataSorting&&b.hasRendered&&(c.attr({x:p.startXPos}),m="animate"));c&&"animate"===m&&c[u?"show":"hide"](u).animate(y);if(c&&!b.styledMode)c[m](this.pointAttribs(p,p.selected&&"select"));c&&c.addClass(p.getClassName(),
!0)}else c&&(p.graphic=c.destroy())}},markerAttribs:function(a,b){var d=this.options.marker,c=a.marker||{},g=c.symbol||d.symbol,f=D(c.radius,d.radius);b&&(d=d.states[b],b=c.states&&c.states[b],f=D(b&&b.radius,d&&d.radius,f+(d&&d.radiusPlus||0)));a.hasImage=g&&0===g.indexOf("url");a.hasImage&&(f=0);a={x:Math.floor(a.plotX)-f,y:a.plotY-f};f&&(a.width=a.height=2*f);return a},pointAttribs:function(a,b){var d=this.options.marker,c=a&&a.options,g=c&&c.marker||{},f=this.color,e=c&&c.color,h=a&&a.color;c=
D(g.lineWidth,d.lineWidth);var l=a&&a.zone&&a.zone.color;a=1;f=e||l||h||f;e=g.fillColor||d.fillColor||f;f=g.lineColor||d.lineColor||f;b=b||"normal";d=d.states[b];b=g.states&&g.states[b]||{};c=D(b.lineWidth,d.lineWidth,c+D(b.lineWidthPlus,d.lineWidthPlus,0));e=b.fillColor||d.fillColor||e;f=b.lineColor||d.lineColor||f;a=D(b.opacity,d.opacity,a);return{stroke:f,"stroke-width":c,fill:e,opacity:a}},destroy:function(a){var b=this,d=b.chart,g=/AppleWebKit\/533/.test(p.navigator.userAgent),f,e,l=b.data||
[],k,m;h(b,"destroy");this.removeEvents(a);(b.axisTypes||[]).forEach(function(a){(m=b[a])&&m.series&&(C(m.series,b),m.isDirty=m.forceRedraw=!0)});b.legendItem&&b.chart.legend.destroyItem(b);for(e=l.length;e--;)(k=l[e])&&k.destroy&&k.destroy();b.points=null;c.clearTimeout(b.animationTimeout);r(b,function(a,b){a instanceof y&&!a.survive&&(f=g&&"group"===b?"hide":"destroy",a[f]())});d.hoverSeries===b&&(d.hoverSeries=null);C(d.series,b);d.orderSeries();r(b,function(d,c){a&&"hcEvents"===c||delete b[c]})},
getGraphPath:function(a,b,d){var c=this,f=c.options,g=f.step,e,h=[],l=[],p;a=a||c.points;(e=a.reversed)&&a.reverse();(g={right:1,center:2}[g]||g&&3)&&e&&(g=4-g);a=this.getValidPoints(a,!1,!(f.connectNulls&&!b&&!d));a.forEach(function(e,n){var t=e.plotX,m=e.plotY,k=a[n-1];(e.leftCliff||k&&k.rightCliff)&&!d&&(p=!0);e.isNull&&!q(b)&&0<n?p=!f.connectNulls:e.isNull&&!b?p=!0:(0===n||p?n=["M",e.plotX,e.plotY]:c.getPointSpline?n=c.getPointSpline(a,e,n):g?(n=1===g?["L",k.plotX,m]:2===g?["L",(k.plotX+t)/2,
k.plotY,"L",(k.plotX+t)/2,m]:["L",t,k.plotY],n.push("L",t,m)):n=["L",t,m],l.push(e.x),g&&(l.push(e.x),2===g&&l.push(e.x)),h.push.apply(h,n),p=!1)});h.xMap=l;return c.graphPath=h},drawGraph:function(){var a=this,b=this.options,d=(this.gappedPath||this.getGraphPath).call(this),c=this.chart.styledMode,f=[["graph","highcharts-graph"]];c||f[0].push(b.lineColor||this.color||"#cccccc",b.dashStyle);f=a.getZonesGraphs(f);f.forEach(function(f,g){var e=f[0],h=a[e],l=h?"animate":"attr";h?(h.endX=a.preventGraphAnimation?
null:d.xMap,h.animate({d:d})):d.length&&(a[e]=h=a.chart.renderer.path(d).addClass(f[1]).attr({zIndex:1}).add(a.group));h&&!c&&(e={stroke:f[2],"stroke-width":b.lineWidth,fill:a.fillGraph&&a.color||"none"},f[3]?e.dashstyle=f[3]:"square"!==b.linecap&&(e["stroke-linecap"]=e["stroke-linejoin"]="round"),h[l](e).shadow(2>g&&b.shadow));h&&(h.startX=d.xMap,h.isArea=d.isArea)})},getZonesGraphs:function(a){this.zones.forEach(function(b,d){d=["zone-graph-"+d,"highcharts-graph highcharts-zone-graph-"+d+" "+(b.className||
"")];this.chart.styledMode||d.push(b.color||this.color,b.dashStyle||this.options.dashStyle);a.push(d)},this);return a},applyZones:function(){var a=this,b=this.chart,d=b.renderer,c=this.zones,f,e,h=this.clips||[],l,p=this.graph,k=this.area,m=Math.max(b.chartWidth,b.chartHeight),r=this[(this.zoneAxis||"y")+"Axis"],q=b.inverted,y,u,w,v=!1;if(c.length&&(p||k)&&r&&"undefined"!==typeof r.min){var A=r.reversed;var C=r.horiz;p&&!this.showLine&&p.hide();k&&k.hide();var B=r.getExtremes();c.forEach(function(c,
g){f=A?C?b.plotWidth:0:C?0:r.toPixels(B.min)||0;f=H(D(e,f),0,m);e=H(Math.round(r.toPixels(D(c.value,B.max),!0)||0),0,m);v&&(f=e=r.toPixels(B.max));y=Math.abs(f-e);u=Math.min(f,e);w=Math.max(f,e);r.isXAxis?(l={x:q?w:u,y:0,width:y,height:m},C||(l.x=b.plotHeight-l.x)):(l={x:0,y:q?w:u,width:m,height:y},C&&(l.y=b.plotWidth-l.y));q&&d.isVML&&(l=r.isXAxis?{x:0,y:A?u:w,height:l.width,width:b.chartWidth}:{x:l.y-b.plotLeft-b.spacingBox.x,y:0,width:l.height,height:b.chartHeight});h[g]?h[g].animate(l):h[g]=d.clipRect(l);
p&&a["zone-graph-"+g].clip(h[g]);k&&a["zone-area-"+g].clip(h[g]);v=c.value>B.max;a.resetZones&&0===e&&(e=void 0)});this.clips=h}else a.visible&&(p&&p.show(!0),k&&k.show(!0))},invertGroups:function(a){function d(){["group","markerGroup"].forEach(function(b){c[b]&&(f.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(c.isRadialSeries?!1:a))})}var c=this,f=c.chart;c.xAxis&&(c.eventsToUnbind.push(b(f,"resize",d)),d(),c.invertGroups=
d)},plotGroup:function(a,b,d,c,f){var g=this[a],e=!g;e&&(this[a]=g=this.chart.renderer.g().attr({zIndex:c||.1}).add(f));g.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(q(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(g.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);g.attr({visibility:d})[e?"attr":"animate"](this.getPlotBox());return g},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}},removeEvents:function(a){a?this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind.length=0):l(this)},render:function(){var a=this,b=a.chart,d=a.options,c=!!a.animate&&b.renderer.isSVG&&F(d.animation).duration,e=a.visible?"inherit":"hidden",l=d.zIndex,p=a.hasRendered,k=b.seriesGroup,m=b.inverted;h(this,"render");var r=a.plotGroup("group","series",
e,l,k);a.markerGroup=a.plotGroup("markerGroup","markers",e,l,k);c&&a.animate(!0);r.inverted=a.isCartesian||a.invertable?m:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.visible&&a.drawPoints();a.drawDataLabels&&a.drawDataLabels();a.redrawPoints&&a.redrawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(m);!1===d.clip||a.sharedClipKey||p||r.clip(b.clipRect);c&&a.animate();p||(a.animationTimeout=f(function(){a.afterAnimate()},c||0));a.isDirty=!1;a.hasRendered=
!0;h(a,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,d=this.group,c=this.xAxis,f=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:D(c&&c.left,a.plotLeft),translateY:D(f&&f.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,f=this.chart.inverted;return this.searchKDTree({clientX:f?d.len-a.chartY+d.pos:a.chartX-
d.pos,plotY:f?c.len-a.chartX+c.pos:a.chartY-c.pos},b,a)},buildKDTree:function(a){function b(a,c,f){var g;if(g=a&&a.length){var e=d.kdAxisArray[c%f];a.sort(function(a,b){return a[e]-b[e]});g=Math.floor(g/2);return{point:a[g],left:b(a.slice(0,g),c+1,f),right:b(a.slice(g+1),c+1,f)}}}this.buildingKdTree=!0;var d=this,c=-1<d.options.findNearestPointBy.indexOf("y")?2:1;delete d.kdTree;f(function(){d.kdTree=b(d.getValidPoints(null,!d.directTouch),c,c);d.buildingKdTree=!1},d.options.kdNow||a&&"touchstart"===
a.type?0:1)},searchKDTree:function(a,b,d){function c(a,b,d,l){var p=b.point,n=f.kdAxisArray[d%l],t=p;var k=q(a[g])&&q(p[g])?Math.pow(a[g]-p[g],2):null;var m=q(a[e])&&q(p[e])?Math.pow(a[e]-p[e],2):null;m=(k||0)+(m||0);p.dist=q(m)?Math.sqrt(m):Number.MAX_VALUE;p.distX=q(k)?Math.sqrt(k):Number.MAX_VALUE;n=a[n]-p[n];m=0>n?"left":"right";k=0>n?"right":"left";b[m]&&(m=c(a,b[m],d+1,l),t=m[h]<t[h]?m:p);b[k]&&Math.sqrt(n*n)<t[h]&&(a=c(a,b[k],d+1,l),t=a[h]<t[h]?a:t);return t}var f=this,g=this.kdAxisArray[0],
e=this.kdAxisArray[1],h=b?"distX":"dist";b=-1<f.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree(d);if(this.kdTree)return c(a,this.kdTree,b,b)},pointPlacementToXValue:function(){var a=this.xAxis,b=this.options.pointPlacement;"between"===b&&(b=a.reversed?-.5:.5);w(b)&&(b*=D(this.options.pointRange||a.pointRange));return b}});""});M(J,"parts/Stacking.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.correctFloat,I=e.defined,G=e.destroyObjectProperties,
H=e.objectEach,v=e.pick;e=c.Axis;var q=c.Chart,C=c.format,B=c.Series;c.StackItem=function(c,e,m,r,q){var u=c.chart.inverted;this.axis=c;this.isNegative=m;this.options=e=e||{};this.x=r;this.total=null;this.points={};this.stack=q;this.rightCliff=this.leftCliff=0;this.alignOptions={align:e.align||(u?m?"left":"right":"center"),verticalAlign:e.verticalAlign||(u?"middle":m?"bottom":"top"),y:e.y,x:e.x};this.textAlign=e.textAlign||(u?m?"right":"left":"center")};c.StackItem.prototype={destroy:function(){G(this,
this.axis)},render:function(c){var e=this.axis.chart,m=this.options,r=m.format;r=r?C(r,this,e):m.formatter.call(this);this.label?this.label.attr({text:r,visibility:"hidden"}):(this.label=e.renderer.label(r,null,null,m.shape,null,null,m.useHTML,!1,"stack-labels"),r={text:r,align:this.textAlign,rotation:m.rotation,padding:v(m.padding,0),visibility:"hidden"},this.label.attr(r),e.styledMode||this.label.css(m.style),this.label.added||this.label.add(c));this.label.labelrank=e.plotHeight},setOffset:function(c,
e,m,r,q){var u=this.axis,f=u.chart;r=u.translate(u.usePercentage?100:r?r:this.total,0,0,0,1);m=u.translate(m?m:0);m=I(r)&&Math.abs(r-m);c=v(q,f.xAxis[0].translate(this.x))+c;u=I(r)&&this.getStackBox(f,this,c,r,e,m,u);e=this.label;c=this.isNegative;q="justify"===v(this.options.overflow,"justify");if(e&&u){m=e.getBBox();var b=f.inverted?c?m.width:0:m.width/2,a=f.inverted?m.height/2:c?-4:m.height+4;this.alignOptions.x=v(this.options.x,0);e.align(this.alignOptions,null,u);r=e.alignAttr;e.show();r.y-=
a;q&&(r.x-=b,B.prototype.justifyDataLabel.call(this.axis,e,this.alignOptions,r,m,u),r.x+=b);r.x=e.alignAttr.x;e.attr({x:r.x,y:r.y});v(!q&&this.options.crop,!0)&&((f=f.isInsidePlot(e.x+(f.inverted?0:-m.width/2),e.y)&&f.isInsidePlot(e.x+(f.inverted?c?-m.width:m.width:m.width/2),e.y+m.height))||e.hide())}},getStackBox:function(c,e,m,r,q,v,f){var b=e.axis.reversed,a=c.inverted;c=f.height+f.pos-(a?c.plotLeft:c.plotTop);e=e.isNegative&&!b||!e.isNegative&&b;return{x:a?e?r:r-v:m,y:a?c-m-q:e?c-r-v:c-r,width:a?
v:q,height:a?q:v}}};q.prototype.getStacks=function(){var c=this,e=c.inverted;c.yAxis.forEach(function(c){c.stacks&&c.hasVisibleSeries&&(c.oldStacks=c.stacks)});c.series.forEach(function(m){var r=m.xAxis&&m.xAxis.options||{};!m.options.stacking||!0!==m.visible&&!1!==c.options.chart.ignoreHiddenSeries||(m.stackKey=[m.type,v(m.options.stack,""),e?r.top:r.left,e?r.height:r.width].join())})};e.prototype.buildStacks=function(){var e=this.series,q=v(this.options.reversedStacks,!0),m=e.length,r;if(!this.isXAxis){this.usePercentage=
!1;for(r=m;r--;){var D=e[q?r:m-r-1];D.setStackedPoints()}for(r=0;r<m;r++)e[r].modifyStacks();c.fireEvent(this,"afterBuildStacks")}};e.prototype.renderStackTotals=function(){var c=this.chart,e=c.renderer,m=this.stacks,r=this.stackTotalGroup;r||(this.stackTotalGroup=r=e.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());r.translate(c.plotLeft,c.plotTop);H(m,function(c){H(c,function(c){c.render(r)})})};e.prototype.resetStacks=function(){var c=this,e=c.stacks;c.isXAxis||H(e,function(e){H(e,
function(m,q){m.touched<c.stacksTouched?(m.destroy(),delete e[q]):(m.total=null,m.cumulative=null)})})};e.prototype.cleanStacks=function(){if(!this.isXAxis){if(this.oldStacks)var c=this.stacks=this.oldStacks;H(c,function(c){H(c,function(c){c.cumulative=c.total})})}};B.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var e=this.processedXData,q=this.processedYData,m=[],r=q.length,D=this.options,A=D.threshold,f=v(D.startFromThreshold&&
A,0),b=D.stack;D=D.stacking;var a=this.stackKey,d="-"+a,h=this.negStacks,k=this.yAxis,l=k.stacks,y=k.oldStacks,p,g;k.stacksTouched+=1;for(g=0;g<r;g++){var t=e[g];var x=q[g];var L=this.getStackIndicator(L,t,this.index);var E=L.key;var n=(p=h&&x<(f?0:A))?d:a;l[n]||(l[n]={});l[n][t]||(y[n]&&y[n][t]?(l[n][t]=y[n][t],l[n][t].total=null):l[n][t]=new c.StackItem(k,k.options.stackLabels,p,t,b));n=l[n][t];null!==x?(n.points[E]=n.points[this.index]=[v(n.cumulative,f)],I(n.cumulative)||(n.base=E),n.touched=
k.stacksTouched,0<L.index&&!1===this.singleStacks&&(n.points[E][0]=n.points[this.index+","+t+",0"][0])):n.points[E]=n.points[this.index]=null;"percent"===D?(p=p?a:d,h&&l[p]&&l[p][t]?(p=l[p][t],n.total=p.total=Math.max(p.total,n.total)+Math.abs(x)||0):n.total=F(n.total+(Math.abs(x)||0))):n.total=F(n.total+(x||0));n.cumulative=v(n.cumulative,f)+(x||0);null!==x&&(n.points[E].push(n.cumulative),m[g]=n.cumulative)}"percent"===D&&(k.usePercentage=!0);this.stackedYData=m;k.oldStacks={}}};B.prototype.modifyStacks=
function(){var c=this,e=c.stackKey,m=c.yAxis.stacks,r=c.processedXData,q,v=c.options.stacking;c[v+"Stacker"]&&[e,"-"+e].forEach(function(f){for(var b=r.length,a,d;b--;)if(a=r[b],q=c.getStackIndicator(q,a,c.index,f),d=(a=m[f]&&m[f][a])&&a.points[q.key])c[v+"Stacker"](d,a,b)})};B.prototype.percentStacker=function(c,e,m){e=e.total?100/e.total:0;c[0]=F(c[0]*e);c[1]=F(c[1]*e);this.stackedYData[m]=c[1]};B.prototype.getStackIndicator=function(c,e,m,r){!I(c)||c.x!==e||r&&c.key!==r?c={x:e,index:0,key:r}:c.index++;
c.key=[m,e,c.index].join();return c}});M(J,"parts/Dynamics.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.defined,I=e.erase,G=e.extend,H=e.isArray,v=e.isNumber,q=e.isObject,C=e.isString,B=e.objectEach,u=e.pick,w=e.relativeLength,m=e.setAnimation,r=e.splat,D=c.addEvent,A=c.animate,f=c.Axis;e=c.Chart;var b=c.createElement,a=c.css,d=c.fireEvent,h=c.merge,k=c.Point,l=c.Series,y=c.seriesTypes;c.cleanRecursively=function(a,b){var d={};B(a,function(f,g){if(q(a[g],!0)&&!a.nodeType&&
b[g])f=c.cleanRecursively(a[g],b[g]),Object.keys(f).length&&(d[g]=f);else if(q(a[g])||a[g]!==b[g])d[g]=a[g]});return d};G(e.prototype,{addSeries:function(a,b,c){var f,g=this;a&&(b=u(b,!0),d(g,"addSeries",{options:a},function(){f=g.initSeries(a);g.isDirtyLegend=!0;g.linkSeries();f.enabledDataSorting&&f.setData(a.data,!1);d(g,"afterAddSeries",{series:f});b&&g.redraw(c)}));return f},addAxis:function(a,b,d,c){return this.createAxis(b?"xAxis":"yAxis",{axis:a,redraw:d,animation:c})},addColorAxis:function(a,
b,d){return this.createAxis("colorAxis",{axis:a,redraw:b,animation:d})},createAxis:function(a,b){var d=this.options,g="colorAxis"===a,e=b.redraw,l=b.animation;b=h(b.axis,{index:this[a].length,isX:"xAxis"===a});var p=g?new c.ColorAxis(this,b):new f(this,b);d[a]=r(d[a]||{});d[a].push(b);g&&(this.isDirtyLegend=!0,this.axes.forEach(function(a){a.series=[]}),this.series.forEach(function(a){a.bindAxes();a.isDirtyData=!0}));u(e,!0)&&this.redraw(l);return p},showLoading:function(d){var c=this,f=c.options,
e=c.loadingDiv,h=f.loading,l=function(){e&&a(e,{left:c.plotLeft+"px",top:c.plotTop+"px",width:c.plotWidth+"px",height:c.plotHeight+"px"})};e||(c.loadingDiv=e=b("div",{className:"highcharts-loading highcharts-loading-hidden"},null,c.container),c.loadingSpan=b("span",{className:"highcharts-loading-inner"},null,e),D(c,"redraw",l));e.className="highcharts-loading";c.loadingSpan.innerHTML=u(d,f.lang.loading,"");c.styledMode||(a(e,G(h.style,{zIndex:10})),a(c.loadingSpan,h.labelStyle),c.loadingShown||(a(e,
{opacity:0,display:""}),A(e,{opacity:h.style.opacity||.5},{duration:h.showDuration||0})));c.loadingShown=!0;l()},hideLoading:function(){var b=this.options,d=this.loadingDiv;d&&(d.className="highcharts-loading highcharts-loading-hidden",this.styledMode||A(d,{opacity:0},{duration:b.loading.hideDuration||100,complete:function(){a(d,{display:"none"})}}));this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),collectionsWithUpdate:["xAxis","yAxis","zAxis","series"],update:function(a,b,f,e){var g=this,l={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},p,k,m,t=a.isResponsiveOptions,q=[];d(g,"update",
{options:a});t||g.setResponsive(!1,!0);a=c.cleanRecursively(a,g.options);h(!0,g.userOptions,a);if(p=a.chart){h(!0,g.options.chart,p);"className"in p&&g.setClassName(p.className);"reflow"in p&&g.setReflow(p.reflow);if("inverted"in p||"polar"in p||"type"in p){g.propFromSeries();var x=!0}"alignTicks"in p&&(x=!0);B(p,function(a,b){-1!==g.propsRequireUpdateSeries.indexOf("chart."+b)&&(k=!0);-1!==g.propsRequireDirtyBox.indexOf(b)&&(g.isDirtyBox=!0);t||-1===g.propsRequireReflow.indexOf(b)||(m=!0)});!g.styledMode&&
"style"in p&&g.renderer.setStyle(p.style)}!g.styledMode&&a.colors&&(this.options.colors=a.colors);a.plotOptions&&h(!0,this.options.plotOptions,a.plotOptions);a.time&&this.time===c.time&&(this.time=new c.Time(a.time));B(a,function(a,b){if(g[b]&&"function"===typeof g[b].update)g[b].update(a,!1);else if("function"===typeof g[l[b]])g[l[b]](a);"chart"!==b&&-1!==g.propsRequireUpdateSeries.indexOf(b)&&(k=!0)});this.collectionsWithUpdate.forEach(function(b){if(a[b]){if("series"===b){var d=[];g[b].forEach(function(a,
b){a.options.isInternal||d.push(u(a.options.index,b))})}r(a[b]).forEach(function(a,c){(c=F(a.id)&&g.get(a.id)||g[b][d?d[c]:c])&&c.coll===b&&(c.update(a,!1),f&&(c.touched=!0));!c&&f&&g.collectionsWithInit[b]&&(g.collectionsWithInit[b][0].apply(g,[a].concat(g.collectionsWithInit[b][1]||[]).concat([!1])).touched=!0)});f&&g[b].forEach(function(a){a.touched||a.options.isInternal?delete a.touched:q.push(a)})}});q.forEach(function(a){a.remove&&a.remove(!1)});x&&g.axes.forEach(function(a){a.update({},!1)});
k&&g.getSeriesOrderByLinks().forEach(function(a){a.chart&&a.update({},!1)},this);a.loading&&h(!0,g.options.loading,a.loading);x=p&&p.width;p=p&&p.height;C(p)&&(p=w(p,x||g.chartWidth));m||v(x)&&x!==g.chartWidth||v(p)&&p!==g.chartHeight?g.setSize(x,p,e):u(b,!0)&&g.redraw(e);d(g,"afterUpdate",{options:a,redraw:b,animation:e})},setSubtitle:function(a,b){this.applyDescription("subtitle",a);this.layOutTitles(b)},setCaption:function(a,b){this.applyDescription("caption",a);this.layOutTitles(b)}});e.prototype.collectionsWithInit=
{xAxis:[e.prototype.addAxis,[!0]],yAxis:[e.prototype.addAxis,[!1]],series:[e.prototype.addSeries]};G(k.prototype,{update:function(a,b,d,c){function f(){g.applyOptions(a);null===g.y&&h&&(g.graphic=h.destroy());q(a,!0)&&(h&&h.element&&a&&a.marker&&"undefined"!==typeof a.marker.symbol&&(g.graphic=h.destroy()),a&&a.dataLabels&&g.dataLabel&&(g.dataLabel=g.dataLabel.destroy()),g.connector&&(g.connector=g.connector.destroy()));l=g.index;e.updateParallelArrays(g,l);k.data[l]=q(k.data[l],!0)||q(a,!0)?g.options:
u(a,k.data[l]);e.isDirty=e.isDirtyData=!0;!e.fixedBox&&e.hasCartesianSeries&&(p.isDirtyBox=!0);"point"===k.legendType&&(p.isDirtyLegend=!0);b&&p.redraw(d)}var g=this,e=g.series,h=g.graphic,l,p=e.chart,k=e.options;b=u(b,!0);!1===c?f():g.firePointEvent("update",{options:a},f)},remove:function(a,b){this.series.removePoint(this.series.data.indexOf(this),a,b)}});G(l.prototype,{addPoint:function(a,b,c,f,e){var g=this.options,h=this.data,l=this.chart,p=this.xAxis;p=p&&p.hasNames&&p.names;var k=g.data,m=
this.xData,t;b=u(b,!0);var r={series:this};this.pointClass.prototype.applyOptions.apply(r,[a]);var q=r.x;var x=m.length;if(this.requireSorting&&q<m[x-1])for(t=!0;x&&m[x-1]>q;)x--;this.updateParallelArrays(r,"splice",x,0,0);this.updateParallelArrays(r,x);p&&r.name&&(p[q]=r.name);k.splice(x,0,a);t&&(this.data.splice(x,0,null),this.processData());"point"===g.legendType&&this.generatePoints();c&&(h[0]&&h[0].remove?h[0].remove(!1):(h.shift(),this.updateParallelArrays(r,"shift"),k.shift()));!1!==e&&d(this,
"addPoint",{point:r});this.isDirtyData=this.isDirty=!0;b&&l.redraw(f)},removePoint:function(a,b,d){var c=this,f=c.data,g=f[a],e=c.points,h=c.chart,l=function(){e&&e.length===f.length&&e.splice(a,1);f.splice(a,1);c.options.data.splice(a,1);c.updateParallelArrays(g||{series:c},"splice",a,1);g&&g.destroy();c.isDirty=!0;c.isDirtyData=!0;b&&h.redraw()};m(d,h);b=u(b,!0);g?g.firePointEvent("remove",null,l):l()},remove:function(a,b,c,f){function g(){e.destroy(f);e.remove=null;h.isDirtyLegend=h.isDirtyBox=
!0;h.linkSeries();u(a,!0)&&h.redraw(b)}var e=this,h=e.chart;!1!==c?d(e,"remove",null,g):g()},update:function(a,b){a=c.cleanRecursively(a,this.userOptions);d(this,"update",{options:a});var f=this,g=f.chart,e=f.userOptions,l=f.initialType||f.type,p=a.type||e.type||g.options.chart.type,k=!(this.hasDerivedData||a.dataGrouping||p&&p!==this.type||"undefined"!==typeof a.pointStart||a.pointInterval||a.pointIntervalUnit||a.keys),m=y[l].prototype,r,q=["group","markerGroup","dataLabelsGroup","transformGroup"],
v=["eventOptions","navigatorSeries","baseSeries"],w=f.finishedAnimating&&{animation:!1},A={};k&&(v.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","_hasPointMarkers","_hasPointLabels","mapMap","mapData","minY","maxY","minX","maxX"),!1!==a.visible&&v.push("area","graph"),f.parallelArrays.forEach(function(a){v.push(a+"Data")}),a.data&&(a.dataSorting&&G(f.options.dataSorting,a.dataSorting),this.setData(a.data,!1)));a=h(e,w,{index:"undefined"===typeof e.index?f.index:
e.index,pointStart:u(e.pointStart,f.xData[0])},!k&&{data:f.options.data},a);k&&a.data&&(a.data=f.options.data);v=q.concat(v);v.forEach(function(a){v[a]=f[a];delete f[a]});f.remove(!1,null,!1,!0);for(r in m)f[r]=void 0;y[p||l]?G(f,y[p||l].prototype):c.error(17,!0,g,{missingModuleFor:p||l});v.forEach(function(a){f[a]=v[a]});f.init(g,a);if(k&&this.points){var D=f.options;!1===D.visible?(A.graphic=1,A.dataLabel=1):f._hasPointLabels||(p=D.marker,m=D.dataLabels,p&&(!1===p.enabled||"symbol"in p)&&(A.graphic=
1),m&&!1===m.enabled&&(A.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(A).length&&a.destroyElements(A),!1===D.showInLegend&&a.legendItem&&g.legend.destroyItem(a))},this)}a.zIndex!==e.zIndex&&q.forEach(function(b){f[b]&&f[b].attr({zIndex:a.zIndex})});f.initialType=l;g.linkSeries();d(this,"afterUpdate");u(b,!0)&&g.redraw(k?void 0:!1)},setName:function(a){this.name=this.options.name=this.userOptions.name=a;this.chart.isDirtyLegend=!0}});G(f.prototype,{update:function(a,
b){var d=this.chart,c=a&&a.events||{};a=h(this.userOptions,a);d.options[this.coll].indexOf&&(d.options[this.coll][d.options[this.coll].indexOf(this.userOptions)]=a);B(d.options[this.coll].events,function(a,b){"undefined"===typeof c[b]&&(c[b]=void 0)});this.destroy(!0);this.init(d,G(a,{events:c}));d.isDirtyBox=!0;u(b,!0)&&d.redraw()},remove:function(a){for(var b=this.chart,d=this.coll,c=this.series,f=c.length;f--;)c[f]&&c[f].remove(!1);I(b.axes,this);I(b[d],this);H(b.options[d])?b.options[d].splice(this.options.index,
1):delete b.options[d];b[d].forEach(function(a,b){a.options.index=a.userOptions.index=b});this.destroy();b.isDirtyBox=!0;u(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})});M(J,"parts/AreaSeries.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.objectEach,I=e.pick,G=c.color,H=c.Series;e=c.seriesType;e("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(c){var e=
[],v=[],B=this.xAxis,u=this.yAxis,w=u.stacks[this.stackKey],m={},r=this.index,D=u.series,A=D.length,f=I(u.options.reversedStacks,!0)?1:-1,b;c=c||this.points;if(this.options.stacking){for(b=0;b<c.length;b++)c[b].leftNull=c[b].rightNull=void 0,m[c[b].x]=c[b];F(w,function(a,b){null!==a.total&&v.push(b)});v.sort(function(a,b){return a-b});var a=D.map(function(a){return a.visible});v.forEach(function(d,c){var h=0,l,q;if(m[d]&&!m[d].isNull)e.push(m[d]),[-1,1].forEach(function(e){var g=1===e?"rightNull":
"leftNull",h=0,p=w[v[c+e]];if(p)for(b=r;0<=b&&b<A;)l=p.points[b],l||(b===r?m[d][g]=!0:a[b]&&(q=w[d].points[b])&&(h-=q[1]-q[0])),b+=f;m[d][1===e?"rightCliff":"leftCliff"]=h});else{for(b=r;0<=b&&b<A;){if(l=w[d].points[b]){h=l[1];break}b+=f}h=u.translate(h,0,1,0,1);e.push({isNull:!0,plotX:B.translate(d,0,0,0,1),x:d,plotY:h,yBottom:h})}})}return e},getGraphPath:function(c){var e=H.prototype.getGraphPath,v=this.options,B=v.stacking,u=this.yAxis,w,m=[],r=[],D=this.index,A=u.stacks[this.stackKey],f=v.threshold,
b=Math.round(u.getThreshold(v.threshold));v=I(v.connectNulls,"percent"===B);var a=function(a,d,e){var g=c[a];a=B&&A[g.x].points[D];var l=g[e+"Null"]||0;e=g[e+"Cliff"]||0;g=!0;if(e||l){var p=(l?a[0]:a[1])+e;var k=a[0]+e;g=!!l}else!B&&c[d]&&c[d].isNull&&(p=k=f);"undefined"!==typeof p&&(r.push({plotX:h,plotY:null===p?b:u.getThreshold(p),isNull:g,isCliff:!0}),m.push({plotX:h,plotY:null===k?b:u.getThreshold(k),doCurve:!1}))};c=c||this.points;B&&(c=this.getStackPoints(c));for(w=0;w<c.length;w++){B||(c[w].leftCliff=
c[w].rightCliff=c[w].leftNull=c[w].rightNull=void 0);var d=c[w].isNull;var h=I(c[w].rectPlotX,c[w].plotX);var k=I(c[w].yBottom,b);if(!d||v)v||a(w,w-1,"left"),d&&!B&&v||(r.push(c[w]),m.push({x:w,plotX:h,plotY:k})),v||a(w,w+1,"right")}w=e.call(this,r,!0,!0);m.reversed=!0;d=e.call(this,m,!0,!0);d.length&&(d[0]="L");d=w.concat(d);e=e.call(this,r,!1,v);d.xMap=w.xMap;this.areaPath=d;return e},drawGraph:function(){this.areaPath=[];H.prototype.drawGraph.apply(this);var c=this,e=this.areaPath,C=this.options,
B=[["area","highcharts-area",this.color,C.fillColor]];this.zones.forEach(function(e,q){B.push(["zone-area-"+q,"highcharts-area highcharts-zone-area-"+q+" "+e.className,e.color||c.color,e.fillColor||C.fillColor])});B.forEach(function(q){var v=q[0],m=c[v],r=m?"animate":"attr",u={};m?(m.endX=c.preventGraphAnimation?null:e.xMap,m.animate({d:e})):(u.zIndex=0,m=c[v]=c.chart.renderer.path(e).addClass(q[1]).add(c.group),m.isArea=!0);c.chart.styledMode||(u.fill=I(q[3],G(q[2]).setOpacity(I(C.fillOpacity,.75)).get()));
m[r](u);m.startX=e.xMap;m.shiftUnit=C.step?2:1})},drawLegendSymbol:c.LegendSymbolMixin.drawRectangle});""});M(J,"parts/SplineSeries.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.pick;c=c.seriesType;c("spline","line",{},{getPointSpline:function(c,e,H){var v=e.plotX,q=e.plotY,C=c[H-1];H=c[H+1];if(C&&!C.isNull&&!1!==C.doCurve&&!e.isCliff&&H&&!H.isNull&&!1!==H.doCurve&&!e.isCliff){c=C.plotY;var B=H.plotX;H=H.plotY;var u=0;var w=(1.5*v+C.plotX)/2.5;var m=(1.5*q+c)/2.5;B=(1.5*
v+B)/2.5;var r=(1.5*q+H)/2.5;B!==w&&(u=(r-m)*(B-v)/(B-w)+q-r);m+=u;r+=u;m>c&&m>q?(m=Math.max(c,q),r=2*q-m):m<c&&m<q&&(m=Math.min(c,q),r=2*q-m);r>H&&r>q?(r=Math.max(H,q),m=2*q-r):r<H&&r<q&&(r=Math.min(H,q),m=2*q-r);e.rightContX=B;e.rightContY=r}e=["C",F(C.rightContX,C.plotX),F(C.rightContY,C.plotY),F(w,v),F(m,q),v,q];C.rightContX=C.rightContY=null;return e}});""});M(J,"parts/AreaSplineSeries.js",[J["parts/Globals.js"]],function(c){var e=c.seriesTypes.area.prototype,F=c.seriesType;F("areaspline","spline",
c.defaultPlotOptions.area,{getStackPoints:e.getStackPoints,getGraphPath:e.getGraphPath,drawGraph:e.drawGraph,drawLegendSymbol:c.LegendSymbolMixin.drawRectangle});""});M(J,"parts/ColumnSeries.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.animObject,I=e.clamp,G=e.defined,H=e.extend,v=e.isNumber,q=e.pick,C=c.color,B=c.merge,u=c.Series;e=c.seriesType;var w=c.svg;e("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,
pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){u.prototype.init.apply(this,arguments);var c=this,e=c.chart;e.hasRendered&&e.series.forEach(function(e){e.type===c.type&&(e.isDirty=!0)})},
getColumnMetrics:function(){var c=this,e=c.options,v=c.xAxis,u=c.yAxis,f=v.options.reversedStacks;f=v.reversed&&!f||!v.reversed&&f;var b,a={},d=0;!1===e.grouping?d=1:c.chart.series.forEach(function(f){var e=f.yAxis,g=f.options;if(f.type===c.type&&(f.visible||!c.chart.options.chart.ignoreHiddenSeries)&&u.len===e.len&&u.pos===e.pos){if(g.stacking){b=f.stackKey;"undefined"===typeof a[b]&&(a[b]=d++);var h=a[b]}else!1!==g.grouping&&(h=d++);f.columnIndex=h}});var h=Math.min(Math.abs(v.transA)*(v.ordinalSlope||
e.pointRange||v.closestPointRange||v.tickInterval||1),v.len),k=h*e.groupPadding,l=(h-2*k)/(d||1);e=Math.min(e.maxPointWidth||v.len,q(e.pointWidth,l*(1-2*e.pointPadding)));c.columnMetrics={width:e,offset:(l-e)/2+(k+((c.columnIndex||0)+(f?1:0))*l-h/2)*(f?-1:1)};return c.columnMetrics},crispCol:function(c,e,q,v){var f=this.chart,b=this.borderWidth,a=-(b%2?.5:0);b=b%2?.5:1;f.inverted&&f.renderer.isVML&&(b+=1);this.options.crisp&&(q=Math.round(c+q)+a,c=Math.round(c)+a,q-=c);v=Math.round(e+v)+b;a=.5>=Math.abs(e)&&
.5<v;e=Math.round(e)+b;v-=e;a&&v&&(--e,v+=1);return{x:c,y:e,width:q,height:v}},translate:function(){var c=this,e=c.chart,v=c.options,w=c.dense=2>c.closestPointRange*c.xAxis.transA;w=c.borderWidth=q(v.borderWidth,w?0:1);var f=c.yAxis,b=v.threshold,a=c.translatedThreshold=f.getThreshold(b),d=q(v.minPointLength,5),h=c.getColumnMetrics(),k=h.width,l=c.barW=Math.max(k,1+2*w),y=c.pointXOffset=h.offset,p=c.dataMin,g=c.dataMax;e.inverted&&(a-=.5);v.pointPadding&&(l=Math.ceil(l));u.prototype.translate.apply(c);
c.points.forEach(function(h){var m=q(h.yBottom,a),t=999+Math.abs(m),r=k;t=I(h.plotY,-t,f.len+t);var n=h.plotX+y,z=l,v=Math.min(t,m),u=Math.max(t,m)-v;if(d&&Math.abs(u)<d){u=d;var w=!f.reversed&&!h.negative||f.reversed&&h.negative;h.y===b&&c.dataMax<=b&&f.min<b&&p!==g&&(w=!w);v=Math.abs(v-a)>d?m-d:a-(w?d:0)}G(h.options.pointWidth)&&(r=z=Math.ceil(h.options.pointWidth),n-=Math.round((r-k)/2));h.barX=n;h.pointWidth=r;h.tooltipPos=e.inverted?[f.len+f.pos-e.plotLeft-t,c.xAxis.len-n-z/2,u]:[n+z/2,t+f.pos-
e.plotTop,u];h.shapeType=c.pointClass.prototype.shapeType||"rect";h.shapeArgs=c.crispCol.apply(c,h.isNull?[n,a,z,0]:[n,v,z,u])})},getSymbol:c.noop,drawLegendSymbol:c.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(c,e){var m=this.options,r=this.pointAttrToOptions||{};var f=r.stroke||"borderColor";var b=r["stroke-width"]||"borderWidth",a=c&&c.color||this.color,d=c&&c[f]||m[f]||this.color||a,h=c&&c[b]||
m[b]||this[b]||0;r=c&&c.options.dashStyle||m.dashStyle;var k=q(c&&c.opacity,m.opacity,1);if(c&&this.zones.length){var l=c.getZone();a=c.options.color||l&&(l.color||c.nonZonedColor)||this.color;l&&(d=l.borderColor||d,r=l.dashStyle||r,h=l.borderWidth||h)}e&&c&&(c=B(m.states[e],c.options.states&&c.options.states[e]||{}),e=c.brightness,a=c.color||"undefined"!==typeof e&&C(a).brighten(c.brightness).get()||a,d=c[f]||d,h=c[b]||h,r=c.dashStyle||r,k=q(c.opacity,k));f={fill:a,stroke:d,"stroke-width":h,opacity:k};
r&&(f.dashstyle=r);return f},drawPoints:function(){var c=this,e=this.chart,q=c.options,u=e.renderer,f=q.animationLimit||250,b;c.points.forEach(function(a){var d=a.graphic,h=!!d,k=d&&e.pointCount<f?"animate":"attr";if(v(a.plotY)&&null!==a.y){b=a.shapeArgs;d&&a.hasNewShapeType()&&(d=d.destroy());c.enabledDataSorting&&(a.startXPos=c.xAxis.reversed?-(b?b.width:0):c.xAxis.width);d||(a.graphic=d=u[a.shapeType](b).add(a.group||c.group))&&c.enabledDataSorting&&e.hasRendered&&e.pointCount<f&&(d.attr({x:a.startXPos}),
h=!0,k="animate");if(d&&h)d[k](B(b));if(q.borderRadius)d[k]({r:q.borderRadius});e.styledMode||d[k](c.pointAttribs(a,a.selected&&"select")).shadow(!1!==a.allowShadow&&q.shadow,null,q.stacking&&!q.borderRadius);d.addClass(a.getClassName(),!0)}else d&&(a.graphic=d.destroy())})},animate:function(c){var e=this,m=this.yAxis,q=e.options,f=this.chart.inverted,b={},a=f?"translateX":"translateY";if(w)if(c)b.scaleY=.001,c=I(m.toPixels(q.threshold),m.pos,m.pos+m.len),f?b.translateX=c-m.len:b.translateY=c,e.clipBox&&
e.setClip(),e.group.attr(b);else{var d=e.group.attr(a);e.group.animate({scaleY:1},H(F(e.options.animation),{step:function(c,f){b[a]=d+f.pos*(m.pos-d);e.group.attr(b)}}));e.animate=null}},remove:function(){var c=this,e=c.chart;e.hasRendered&&e.series.forEach(function(e){e.type===c.type&&(e.isDirty=!0)});u.prototype.remove.apply(c,arguments)}});""});M(J,"parts/BarSeries.js",[J["parts/Globals.js"]],function(c){c=c.seriesType;c("bar","column",null,{inverted:!0});""});M(J,"parts/ScatterSeries.js",[J["parts/Globals.js"]],
function(c){var e=c.Series,F=c.seriesType;F("scatter","line",{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&
e.prototype.drawGraph.call(this)},applyJitter:function(){var c=this,e=this.options.jitter,F=this.points.length;e&&this.points.forEach(function(v,q){["x","y"].forEach(function(C,B){var u="plot"+C.toUpperCase();if(e[C]&&!v.isNull){var w=c[C+"Axis"];var m=e[C]*w.transA;if(w&&!w.isLog){var r=Math.max(0,v[u]-m);w=Math.min(w.len,v[u]+m);B=1E4*Math.sin(q+B*F);v[u]=r+(w-r)*(B-Math.floor(B));"x"===C&&(v.clientX=v.plotX)}}})})}});c.addEvent(e,"afterTranslate",function(){this.applyJitter&&this.applyJitter()});
""});M(J,"mixins/centered-series.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.isNumber,I=e.pick,G=e.relativeLength,H=c.deg2rad;c.CenteredSeriesMixin={getCenter:function(){var c=this.options,e=this.chart,C=2*(c.slicedOffset||0),B=e.plotWidth-2*C;e=e.plotHeight-2*C;var u=c.center;u=[I(u[0],"50%"),I(u[1],"50%"),c.size||"100%",c.innerSize||0];var w=Math.min(B,e),m;for(m=0;4>m;++m){var r=u[m];c=2>m||2===m&&/%$/.test(r);u[m]=G(r,[B,e,w,u[2]][m])+(c?C:0)}u[3]>u[2]&&(u[3]=u[2]);
return u},getStartAndEndRadians:function(c,e){c=F(c)?c:0;e=F(e)&&e>c&&360>e-c?e:c+360;return{start:H*(c+-90),end:H*(e+-90)}}}});M(J,"parts/PieSeries.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.clamp,I=e.defined,G=e.isNumber,H=e.pick,v=e.relativeLength,q=e.setAnimation,C=c.addEvent;e=c.CenteredSeriesMixin;var B=e.getStartAndEndRadians,u=c.merge,w=c.noop,m=c.Point,r=c.Series,D=c.seriesType,A=c.fireEvent;D("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,
connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,
trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:c.seriesTypes.column.prototype.pointAttribs,animate:function(c){var b=this,a=b.points,d=b.startAngleRad;c||(a.forEach(function(a){var c=a.graphic,f=a.shapeArgs;c&&f&&(c.attr({r:H(a.startR,b.center&&b.center[3]/2),start:d,end:d}),c.animate({r:f.r,start:f.start,end:f.end},b.options.animation))}),b.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var c,b=0,a=this.points,d=a.length,e=this.options.ignoreHiddenPoint;
for(c=0;c<d;c++){var k=a[c];b+=e&&!k.visible?0:k.isNull?0:k.y}this.total=b;for(c=0;c<d;c++)k=a[c],k.percentage=0<b&&(k.visible||!e)?k.y/b*100:0,k.total=b},generatePoints:function(){r.prototype.generatePoints.call(this);this.updateTotals()},getX:function(c,b,a){var d=this.center,f=this.radii?this.radii[a.index]:d[2]/2;c=Math.asin(F((c-d[1])/(f+a.labelDistance),-1,1));return d[0]+(b?-1:1)*Math.cos(c)*(f+a.labelDistance)+(0<a.labelDistance?(b?-1:1)*this.options.dataLabels.padding:0)},translate:function(c){this.generatePoints();
var b=0,a=this.options,d=a.slicedOffset,f=d+(a.borderWidth||0),e=B(a.startAngle,a.endAngle),l=this.startAngleRad=e.start;e=(this.endAngleRad=e.end)-l;var m=this.points,p=a.dataLabels.distance;a=a.ignoreHiddenPoint;var g,t=m.length;c||(this.center=c=this.getCenter());for(g=0;g<t;g++){var q=m[g];var r=l+b*e;if(!a||q.visible)b+=q.percentage/100;var u=l+b*e;q.shapeType="arc";q.shapeArgs={x:c[0],y:c[1],r:c[2]/2,innerR:c[3]/2,start:Math.round(1E3*r)/1E3,end:Math.round(1E3*u)/1E3};q.labelDistance=H(q.options.dataLabels&&
q.options.dataLabels.distance,p);q.labelDistance=v(q.labelDistance,q.shapeArgs.r);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,q.labelDistance);u=(u+r)/2;u>1.5*Math.PI?u-=2*Math.PI:u<-Math.PI/2&&(u+=2*Math.PI);q.slicedTranslation={translateX:Math.round(Math.cos(u)*d),translateY:Math.round(Math.sin(u)*d)};var n=Math.cos(u)*c[2]/2;var z=Math.sin(u)*c[2]/2;q.tooltipPos=[c[0]+.7*n,c[1]+.7*z];q.half=u<-Math.PI/2||u>Math.PI/2?1:0;q.angle=u;r=Math.min(f,q.labelDistance/5);q.labelPosition={natural:{x:c[0]+
n+Math.cos(u)*q.labelDistance,y:c[1]+z+Math.sin(u)*q.labelDistance},"final":{},alignment:0>q.labelDistance?"center":q.half?"right":"left",connectorPosition:{breakAt:{x:c[0]+n+Math.cos(u)*r,y:c[1]+z+Math.sin(u)*r},touchingSliceAt:{x:c[0]+n,y:c[1]+z}}}}A(this,"afterTranslate")},drawEmpty:function(){var c=this.options;if(0===this.total){var b=this.center[0];var a=this.center[1];this.graph||(this.graph=this.chart.renderer.circle(b,a,0).addClass("highcharts-graph").add(this.group));this.graph.animate({"stroke-width":c.borderWidth,
cx:b,cy:a,r:this.center[2]/2,fill:c.fillColor||"none",stroke:c.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},redrawPoints:function(){var c=this,b=c.chart,a=b.renderer,d,e,k,l,m=c.options.shadow;this.drawEmpty();!m||c.shadowGroup||b.styledMode||(c.shadowGroup=a.g("shadow").attr({zIndex:-1}).add(c.group));c.points.forEach(function(f){var g={};e=f.graphic;if(!f.isNull&&e){l=f.shapeArgs;d=f.getTranslate();if(!b.styledMode){var h=f.shadowGroup;m&&!h&&(h=f.shadowGroup=a.g("shadow").add(c.shadowGroup));
h&&h.attr(d);k=c.pointAttribs(f,f.selected&&"select")}f.delayedRendering?(e.setRadialReference(c.center).attr(l).attr(d),b.styledMode||e.attr(k).attr({"stroke-linejoin":"round"}).shadow(m,h),f.delayedRendering=!1):(e.setRadialReference(c.center),b.styledMode||u(!0,g,k),u(!0,g,l,d),e.animate(g));e.attr({visibility:f.visible?"inherit":"hidden"});e.addClass(f.getClassName())}else e&&(f.graphic=e.destroy())})},drawPoints:function(){var c=this.chart.renderer;this.points.forEach(function(b){b.graphic||
(b.graphic=c[b.shapeType](b.shapeArgs).add(b.series.group),b.delayedRendering=!0)})},searchPoint:w,sortByAngle:function(c,b){c.sort(function(a,d){return"undefined"!==typeof a.angle&&(d.angle-a.angle)*b})},drawLegendSymbol:c.LegendSymbolMixin.drawRectangle,getCenter:e.getCenter,getSymbol:w,drawGraph:null},{init:function(){m.prototype.init.apply(this,arguments);var c=this;c.name=H(c.name,"Slice");var b=function(a){c.slice("select"===a.type)};C(c,"select",b);C(c,"unselect",b);return c},isValid:function(){return G(this.y)&&
0<=this.y},setVisible:function(c,b){var a=this,d=a.series,f=d.chart,e=d.options.ignoreHiddenPoint;b=H(b,e);c!==a.visible&&(a.visible=a.options.visible=c="undefined"===typeof c?!a.visible:c,d.options.data[d.data.indexOf(a)]=a.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(b){if(a[b])a[b][c?"show":"hide"](!0)}),a.legendItem&&f.legend.colorizeItem(a,c),c||"hover"!==a.state||a.setState(""),e&&(d.isDirty=!0),b&&f.redraw())},slice:function(c,b,a){var d=this.series;q(a,d.chart);
H(b,!0);this.sliced=this.options.sliced=I(c)?c:!this.sliced;d.options.data[d.data.indexOf(this)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(c){var b=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(b.x,b.y,b.r+c,b.r+c,{innerR:b.r-1,start:b.start,end:b.end})},connectorShapes:{fixedOffset:function(c,
b,a){var d=b.breakAt;b=b.touchingSliceAt;return["M",c.x,c.y].concat(a.softConnector?["C",c.x+("left"===c.alignment?-5:5),c.y,2*d.x-b.x,2*d.y-b.y,d.x,d.y]:["L",d.x,d.y]).concat(["L",b.x,b.y])},straight:function(c,b){b=b.touchingSliceAt;return["M",c.x,c.y,"L",b.x,b.y]},crookedLine:function(c,b,a){b=b.touchingSliceAt;var d=this.series,e=d.center[0],f=d.chart.plotWidth,l=d.chart.plotLeft;d=c.alignment;var m=this.shapeArgs.r;a=v(a.crookDistance,1);a="left"===d?e+m+(f+l-e-m)*(1-a):l+(e-m)*a;e=["L",a,c.y];
if("left"===d?a>c.x||a<b.x:a<c.x||a>b.x)e=[];return["M",c.x,c.y].concat(e).concat(["L",b.x,b.y])}},getConnectorPath:function(){var c=this.labelPosition,b=this.series.options.dataLabels,a=b.connectorShape,d=this.connectorShapes;d[a]&&(a=d[a]);return a.call(this,{x:c.final.x,y:c.final.y,alignment:c.alignment},c.connectorPosition,b)}});""});M(J,"parts/DataLabels.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.animObject,I=e.arrayMax,G=e.clamp,H=e.defined,v=e.extend,q=e.isArray,
C=e.objectEach,B=e.pick,u=e.relativeLength,w=e.splat,m=c.format,r=c.merge;e=c.noop;var D=c.Series,A=c.seriesTypes,f=c.stableSort;c.distribute=function(b,a,d){function e(a,b){return a.target-b.target}var k,l=!0,m=b,p=[];var g=0;var t=m.reducedLen||a;for(k=b.length;k--;)g+=b[k].size;if(g>t){f(b,function(a,b){return(b.rank||0)-(a.rank||0)});for(g=k=0;g<=t;)g+=b[k].size,k++;p=b.splice(k-1,b.length)}f(b,e);for(b=b.map(function(a){return{size:a.size,targets:[a.target],align:B(a.align,.5)}});l;){for(k=b.length;k--;)l=
b[k],g=(Math.min.apply(0,l.targets)+Math.max.apply(0,l.targets))/2,l.pos=G(g-l.size*l.align,0,a-l.size);k=b.length;for(l=!1;k--;)0<k&&b[k-1].pos+b[k-1].size>b[k].pos&&(b[k-1].size+=b[k].size,b[k-1].targets=b[k-1].targets.concat(b[k].targets),b[k-1].align=.5,b[k-1].pos+b[k-1].size>a&&(b[k-1].pos=a-b[k-1].size),b.splice(k,1),l=!0)}m.push.apply(m,p);k=0;b.some(function(b){var e=0;if(b.targets.some(function(){m[k].pos=b.pos+e;if(Math.abs(m[k].pos-m[k].target)>d)return m.slice(0,k+1).forEach(function(a){delete a.pos}),
m.reducedLen=(m.reducedLen||a)-.1*a,m.reducedLen>.1*a&&c.distribute(m,a,d),!0;e+=m[k].size;k++}))return!0});f(m,e)};D.prototype.drawDataLabels=function(){function b(a,b){var d=b.filter;return d?(b=d.operator,a=a[d.property],d=d.value,">"===b&&a>d||"<"===b&&a<d||">="===b&&a>=d||"<="===b&&a<=d||"=="===b&&a==d||"==="===b&&a===d?!0:!1):!0}function a(a,b){var d=[],c;if(q(a)&&!q(b))d=a.map(function(a){return r(a,b)});else if(q(b)&&!q(a))d=b.map(function(b){return r(a,b)});else if(q(a)||q(b))for(c=Math.max(a.length,
b.length);c--;)d[c]=r(a[c],b[c]);else d=r(a,b);return d}var d=this,e=d.chart,f=d.options,l=f.dataLabels,y=d.points,p,g=d.hasRendered||0,t=F(f.animation).duration,x=Math.min(t,200),u=!e.renderer.forExport&&B(l.defer,0<x),v=e.renderer;l=a(a(e.options.plotOptions&&e.options.plotOptions.series&&e.options.plotOptions.series.dataLabels,e.options.plotOptions&&e.options.plotOptions[d.type]&&e.options.plotOptions[d.type].dataLabels),l);c.fireEvent(this,"drawDataLabels");if(q(l)||l.enabled||d._hasPointLabels){var n=
d.plotGroup("dataLabelsGroup","data-labels",u&&!g?"hidden":"inherit",l.zIndex||6);u&&(n.attr({opacity:+g}),g||setTimeout(function(){var a=d.dataLabelsGroup;a&&(d.visible&&n.show(!0),a[f.animation?"animate":"attr"]({opacity:1},{duration:x}))},t-x));y.forEach(function(c){p=w(a(l,c.dlOptions||c.options&&c.options.dataLabels));p.forEach(function(a,g){var h=a.enabled&&(!c.isNull||c.dataLabelOnNull)&&b(c,a),l=c.dataLabels?c.dataLabels[g]:c.dataLabel,p=c.connectors?c.connectors[g]:c.connector,k=B(a.distance,
c.labelDistance),t=!l;if(h){var q=c.getLabelConfig();var r=B(a[c.formatPrefix+"Format"],a.format);q=H(r)?m(r,q,e):(a[c.formatPrefix+"Formatter"]||a.formatter).call(q,a);r=a.style;var y=a.rotation;e.styledMode||(r.color=B(a.color,r.color,d.color,"#000000"),"contrast"===r.color?(c.contrastColor=v.getContrast(c.color||d.color),r.color=!H(k)&&a.inside||0>k||f.stacking?c.contrastColor:"#000000"):delete c.contrastColor,f.cursor&&(r.cursor=f.cursor));var x={r:a.borderRadius||0,rotation:y,padding:a.padding,
zIndex:1};e.styledMode||(x.fill=a.backgroundColor,x.stroke=a.borderColor,x["stroke-width"]=a.borderWidth);C(x,function(a,b){"undefined"===typeof a&&delete x[b]})}!l||h&&H(q)?h&&H(q)&&(l?x.text=q:(c.dataLabels=c.dataLabels||[],l=c.dataLabels[g]=y?v.text(q,0,-9999).addClass("highcharts-data-label"):v.label(q,0,-9999,a.shape,null,null,a.useHTML,null,"data-label"),g||(c.dataLabel=l),l.addClass(" highcharts-data-label-color-"+c.colorIndex+" "+(a.className||"")+(a.useHTML?" highcharts-tracker":""))),l.options=
a,l.attr(x),e.styledMode||l.css(r).shadow(a.shadow),l.added||l.add(n),a.textPath&&!a.useHTML&&(l.setTextPath(c.getDataLabelPath&&c.getDataLabelPath(l)||c.graphic,a.textPath),c.dataLabelPath&&!a.textPath.enabled&&(c.dataLabelPath=c.dataLabelPath.destroy())),d.alignDataLabel(c,l,a,null,t)):(c.dataLabel=c.dataLabel&&c.dataLabel.destroy(),c.dataLabels&&(1===c.dataLabels.length?delete c.dataLabels:delete c.dataLabels[g]),g||delete c.dataLabel,p&&(c.connector=c.connector.destroy(),c.connectors&&(1===c.connectors.length?
delete c.connectors:delete c.connectors[g])))})})}c.fireEvent(this,"afterDrawDataLabels")};D.prototype.alignDataLabel=function(b,a,c,e,f){var d=this,h=this.chart,p=this.isCartesian&&h.inverted,g=this.enabledDataSorting,k=B(b.dlBox&&b.dlBox.centerX,b.plotX,-9999),m=B(b.plotY,-9999),q=a.getBBox(),r=c.rotation,n=c.align,u=h.isInsidePlot(k,Math.round(m),p),w="justify"===B(c.overflow,g?"none":"justify"),A=this.visible&&(b.series.forceDL||g&&!w||u||e&&h.isInsidePlot(k,p?e.x+1:e.y+e.height-1,p));var C=function(c){g&&
d.xAxis&&!w&&d.setDataLabelStartPos(b,a,f,u,c)};if(A){var D=h.renderer.fontMetrics(h.styledMode?void 0:c.style.fontSize,a).b;e=v({x:p?this.yAxis.len-m:k,y:Math.round(p?this.xAxis.len-k:m),width:0,height:0},e);v(c,{width:q.width,height:q.height});r?(w=!1,k=h.renderer.rotCorr(D,r),k={x:e.x+c.x+e.width/2+k.x,y:e.y+c.y+{top:0,middle:.5,bottom:1}[c.verticalAlign]*e.height},C(k),a[f?"attr":"animate"](k).attr({align:n}),C=(r+720)%360,C=180<C&&360>C,"left"===n?k.y-=C?q.height:0:"center"===n?(k.x-=q.width/
2,k.y-=q.height/2):"right"===n&&(k.x-=q.width,k.y-=C?0:q.height),a.placed=!0,a.alignAttr=k):(C(e),a.align(c,null,e),k=a.alignAttr);w&&0<=e.height?this.justifyDataLabel(a,c,k,q,e,f):B(c.crop,!0)&&(A=h.isInsidePlot(k.x,k.y)&&h.isInsidePlot(k.x+q.width,k.y+q.height));if(c.shape&&!r)a[f?"attr":"animate"]({anchorX:p?h.plotWidth-b.plotY:b.plotX,anchorY:p?h.plotHeight-b.plotX:b.plotY})}f&&g&&(a.placed=!1);A||g&&!w||(a.hide(!0),a.placed=!1)};D.prototype.setDataLabelStartPos=function(b,a,c,e,f){var d=this.chart,
h=d.inverted,p=this.xAxis,g=p.reversed,k=h?a.height/2:a.width/2;b=(b=b.pointWidth)?b/2:0;p=h?f.x:g?-k-b:p.width-k+b;f=h?g?this.yAxis.height-k+b:-k-b:f.y;a.startXPos=p;a.startYPos=f;e?"hidden"===a.visibility&&(a.show(),a.attr({opacity:0}).animate({opacity:1})):a.attr({opacity:1}).animate({opacity:0},void 0,a.hide);d.hasRendered&&(c&&a.attr({x:a.startXPos,y:a.startYPos}),a.placed=!0)};D.prototype.justifyDataLabel=function(b,a,c,e,f,l){var d=this.chart,h=a.align,g=a.verticalAlign,k=b.box?0:b.padding||
0;var m=c.x+k;if(0>m){"right"===h?(a.align="left",a.inside=!0):a.x=-m;var q=!0}m=c.x+e.width-k;m>d.plotWidth&&("left"===h?(a.align="right",a.inside=!0):a.x=d.plotWidth-m,q=!0);m=c.y+k;0>m&&("bottom"===g?(a.verticalAlign="top",a.inside=!0):a.y=-m,q=!0);m=c.y+e.height-k;m>d.plotHeight&&("top"===g?(a.verticalAlign="bottom",a.inside=!0):a.y=d.plotHeight-m,q=!0);q&&(b.placed=!l,b.align(a,null,f));return q};A.pie&&(A.pie.prototype.dataLabelPositioners={radialDistributionY:function(b){return b.top+b.distributeBox.pos},
radialDistributionX:function(b,a,c,e){return b.getX(c<a.top+2||c>a.bottom-2?e:c,a.half,a)},justify:function(b,a,c){return c[0]+(b.half?-1:1)*(a+b.labelDistance)},alignToPlotEdges:function(b,a,c,e){b=b.getBBox().width;return a?b+e:c-b-e},alignToConnectors:function(b,a,c,e){var d=0,f;b.forEach(function(a){f=a.dataLabel.getBBox().width;f>d&&(d=f)});return a?d+e:c-d-e}},A.pie.prototype.drawDataLabels=function(){var b=this,a=b.data,d,e=b.chart,f=b.options.dataLabels,l=f.connectorPadding,m,p=e.plotWidth,
g=e.plotHeight,q=e.plotLeft,x=Math.round(e.chartWidth/3),u,v=b.center,n=v[2]/2,z=v[1],w,A,C,F,G=[[],[]],J,K,M,S,U=[0,0,0,0],X=b.dataLabelPositioners,aa;b.visible&&(f.enabled||b._hasPointLabels)&&(a.forEach(function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),D.prototype.drawDataLabels.apply(b),a.forEach(function(a){a.dataLabel&&(a.visible?(G[a.half].push(a),a.dataLabel._pos=null,!H(f.style.width)&&
!H(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>x&&(a.dataLabel.css({width:.7*x}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&1===a.dataLabels.length&&delete a.dataLabels))}),G.forEach(function(a,h){var k=a.length,m=[],r;if(k){b.sortByAngle(a,h-.5);if(0<b.maxLabelDistance){var t=Math.max(0,z-n-b.maxLabelDistance);var x=Math.min(z+n+b.maxLabelDistance,e.plotHeight);a.forEach(function(a){0<a.labelDistance&&
a.dataLabel&&(a.top=Math.max(0,z-n-a.labelDistance),a.bottom=Math.min(z+n+a.labelDistance,e.plotHeight),r=a.dataLabel.getBBox().height||21,a.distributeBox={target:a.labelPosition.natural.y-a.top+r/2,size:r,rank:a.y},m.push(a.distributeBox))});t=x+r-t;c.distribute(m,t,t/5)}for(S=0;S<k;S++){d=a[S];C=d.labelPosition;w=d.dataLabel;M=!1===d.visible?"hidden":"inherit";K=t=C.natural.y;m&&H(d.distributeBox)&&("undefined"===typeof d.distributeBox.pos?M="hidden":(F=d.distributeBox.size,K=X.radialDistributionY(d)));
delete d.positionIndex;if(f.justify)J=X.justify(d,n,v);else switch(f.alignTo){case "connectors":J=X.alignToConnectors(a,h,p,q);break;case "plotEdges":J=X.alignToPlotEdges(w,h,p,q);break;default:J=X.radialDistributionX(b,d,K,t)}w._attr={visibility:M,align:C.alignment};w._pos={x:J+f.x+({left:l,right:-l}[C.alignment]||0),y:K+f.y-10};C.final.x=J;C.final.y=K;B(f.crop,!0)&&(A=w.getBBox().width,t=null,J-A<l&&1===h?(t=Math.round(A-J+l),U[3]=Math.max(t,U[3])):J+A>p-l&&0===h&&(t=Math.round(J+A-p+l),U[1]=Math.max(t,
U[1])),0>K-F/2?U[0]=Math.max(Math.round(-K+F/2),U[0]):K+F/2>g&&(U[2]=Math.max(Math.round(K+F/2-g),U[2])),w.sideOverflow=t)}}}),0===I(U)||this.verifyDataLabelOverflow(U))&&(this.placeDataLabels(),this.points.forEach(function(a){aa=r(f,a.options.dataLabels);if(m=B(aa.connectorWidth,1)){var c;u=a.connector;if((w=a.dataLabel)&&w._pos&&a.visible&&0<a.labelDistance){M=w._attr.visibility;if(c=!u)a.connector=u=e.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex+(a.className?
" "+a.className:"")).add(b.dataLabelsGroup),e.styledMode||u.attr({"stroke-width":m,stroke:aa.connectorColor||a.color||"#666666"});u[c?"attr":"animate"]({d:a.getConnectorPath()});u.attr("visibility",M)}else u&&(a.connector=u.destroy())}}))},A.pie.prototype.placeDataLabels=function(){this.points.forEach(function(b){var a=b.dataLabel,c;a&&b.visible&&((c=a._pos)?(a.sideOverflow&&(a._attr.width=Math.max(a.getBBox().width-a.sideOverflow,0),a.css({width:a._attr.width+"px",textOverflow:(this.options.dataLabels.style||
{}).textOverflow||"ellipsis"}),a.shortened=!0),a.attr(a._attr),a[a.moved?"animate":"attr"](c),a.moved=!0):a&&a.attr({y:-9999}));delete b.distributeBox},this)},A.pie.prototype.alignDataLabel=e,A.pie.prototype.verifyDataLabelOverflow=function(b){var a=this.center,c=this.options,e=c.center,f=c.minSize||80,l=null!==c.size;if(!l){if(null!==e[0])var m=Math.max(a[2]-Math.max(b[1],b[3]),f);else m=Math.max(a[2]-b[1]-b[3],f),a[0]+=(b[3]-b[1])/2;null!==e[1]?m=G(m,f,a[2]-Math.max(b[0],b[2])):(m=G(m,f,a[2]-b[0]-
b[2]),a[1]+=(b[0]-b[2])/2);m<a[2]?(a[2]=m,a[3]=Math.min(u(c.innerSize||0,m),m),this.translate(a),this.drawDataLabels&&this.drawDataLabels()):l=!0}return l});A.column&&(A.column.prototype.alignDataLabel=function(b,a,c,e,f){var d=this.chart.inverted,h=b.series,p=b.dlBox||b.shapeArgs,g=B(b.below,b.plotY>B(this.translatedThreshold,h.yAxis.len)),k=B(c.inside,!!this.options.stacking);p&&(e=r(p),0>e.y&&(e.height+=e.y,e.y=0),p=e.y+e.height-h.yAxis.len,0<p&&(e.height-=p),d&&(e={x:h.yAxis.len-e.y-e.height,
y:h.xAxis.len-e.x-e.width,width:e.height,height:e.width}),k||(d?(e.x+=g?0:e.width,e.width=0):(e.y+=g?e.height:0,e.height=0)));c.align=B(c.align,!d||k?"center":g?"right":"left");c.verticalAlign=B(c.verticalAlign,d||k?"middle":g?"top":"bottom");D.prototype.alignDataLabel.call(this,b,a,c,e,f);e&&(0>=e.height&&e.y===this.chart.plotHeight||0>=e.width&&0===e.x)&&(a.hide(!0),a.placed=!1);c.inside&&b.contrastColor&&a.css({color:b.contrastColor})})});M(J,"modules/overlapping-datalabels.src.js",[J["parts/Globals.js"],
J["parts/Utilities.js"]],function(c,e){var F=e.isArray,I=e.objectEach,G=e.pick;e=c.Chart;var H=c.addEvent,v=c.fireEvent;H(e,"render",function(){var c=[];(this.labelCollectors||[]).forEach(function(e){c=c.concat(e())});(this.yAxis||[]).forEach(function(e){e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&I(e.stacks,function(e){I(e,function(e){c.push(e.label)})})});(this.series||[]).forEach(function(e){var q=e.options.dataLabels;e.visible&&(!1!==q.enabled||e._hasPointLabels)&&e.points.forEach(function(e){e.visible&&
(F(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[]).forEach(function(q){var m=q.options;q.labelrank=G(m.labelrank,e.labelrank,e.shapeArgs&&e.shapeArgs.height);m.allowOverlap||c.push(q)})})});this.hideOverlappingLabels(c)});e.prototype.hideOverlappingLabels=function(c){var e=this,q=c.length,u=e.renderer,w,m,r,D=!1;var A=function(a){var b=a.box?0:a.padding||0;var c=0;if(a&&(!a.alignAttr||a.placed)){var e=a.alignAttr||{x:a.attr("x"),y:a.attr("y")};var f=a.parentGroup;a.width||(c=a.getBBox(),
a.width=c.width,a.height=c.height,c=u.fontMetrics(null,a.element).h);return{x:e.x+(f.translateX||0)+b,y:e.y+(f.translateY||0)+b-c,width:a.width-2*b,height:a.height-2*b}}};for(m=0;m<q;m++)if(w=c[m])w.oldOpacity=w.opacity,w.newOpacity=1,w.absoluteBox=A(w);c.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(m=0;m<q;m++){var f=(A=c[m])&&A.absoluteBox;for(w=m+1;w<q;++w){var b=(r=c[w])&&r.absoluteBox;!f||!b||A===r||0===A.newOpacity||0===r.newOpacity||b.x>f.x+f.width||b.x+b.width<f.x||b.y>
f.y+f.height||b.y+b.height<f.y||((A.labelrank<r.labelrank?A:r).newOpacity=0)}}c.forEach(function(a){var b;if(a){var c=a.newOpacity;a.oldOpacity!==c&&(a.alignAttr&&a.placed?(c?a.show(!0):b=function(){a.hide(!0);a.placed=!1},D=!0,a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b),v(e,"afterHideOverlappingLabel")):a.attr({opacity:c}));a.isOld=!0}});D&&v(e,"afterHideAllOverlappingLabels")}});M(J,"parts/Interaction.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=
e.defined,I=e.extend,G=e.isArray,H=e.isObject,v=e.objectEach,q=e.pick,C=c.addEvent;e=c.Chart;var B=c.createElement,u=c.css,w=c.defaultOptions,m=c.defaultPlotOptions,r=c.fireEvent,D=c.hasTouch,A=c.Legend,f=c.merge,b=c.Point,a=c.Series,d=c.seriesTypes,h=c.svg;var k=c.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=function(a){var b=c.getPointFromEvent(a);"undefined"!==typeof b&&(c.isDirectTouch=!0,b.onMouseOver(a))},e;a.points.forEach(function(a){e=G(a.dataLabels)?a.dataLabels:
a.dataLabel?[a.dataLabel]:[];a.graphic&&(a.graphic.element.point=a);e.forEach(function(b){b.div?b.div.point=a:b.element.point=a})});a._hasTracking||(a.trackerGroups.forEach(function(e){if(a[e]){a[e].addClass("highcharts-tracker").on("mouseover",d).on("mouseout",function(a){c.onTrackerMouseOut(a)});if(D)a[e].on("touchstart",d);!b.styledMode&&a.options.cursor&&a[e].css(u).css({cursor:a.options.cursor})}}),a._hasTracking=!0);r(this,"afterDrawTracker")},drawTrackerGraph:function(){var a=this,b=a.options,
c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,k=f.pointer,m=f.renderer,n=f.options.tooltip.snap,q=a.tracker,u,v=function(){if(f.hoverSeries!==a)a.onMouseOver()},w="rgba(192,192,192,"+(h?.0001:.002)+")";if(e&&!c)for(u=e+1;u--;)"M"===d[u]&&d.splice(u+1,0,d[u+1]-n,d[u+2],"L"),(u&&"M"===d[u]||u===e)&&d.splice(u,0,"L",d[u-2]+n,d[u-1]);q?q.attr({d:d}):a.graph&&(a.tracker=m.path(d).attr({visibility:a.visible?"visible":"hidden",zIndex:2}).addClass(c?"highcharts-tracker-area":
"highcharts-tracker-line").add(a.group),f.styledMode||a.tracker.attr({"stroke-linejoin":"round",stroke:w,fill:c?w:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*n)}),[a.tracker,a.markerGroup].forEach(function(a){a.addClass("highcharts-tracker").on("mouseover",v).on("mouseout",function(a){k.onTrackerMouseOut(a)});b.cursor&&!f.styledMode&&a.css({cursor:b.cursor});if(D)a.on("touchstart",v)}));r(this,"afterDrawTracker")}};d.column&&(d.column.prototype.drawTracker=k.drawTrackerPoint);d.pie&&(d.pie.prototype.drawTracker=
k.drawTrackerPoint);d.scatter&&(d.scatter.prototype.drawTracker=k.drawTrackerPoint);I(A.prototype,{setItemEvents:function(a,c,d){var e=this,h=e.chart.renderer.boxWrapper,l=a instanceof b,p="highcharts-legend-"+(l?"point":"series")+"-active",k=e.chart.styledMode;(d?c:a.legendGroup).on("mouseover",function(){a.visible&&e.allItems.forEach(function(b){a!==b&&b.setState("inactive",!l)});a.setState("hover");a.visible&&h.addClass(p);k||c.css(e.options.itemHoverStyle)}).on("mouseout",function(){e.chart.styledMode||
c.css(f(a.visible?e.itemStyle:e.itemHiddenStyle));e.allItems.forEach(function(b){a!==b&&b.setState("",!l)});h.removeClass(p);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible();e.allItems.forEach(function(b){a!==b&&b.setState(a.visible?"inactive":"",!l)})};h.removeClass(p);b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):r(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=B("input",{type:"checkbox",className:"highcharts-legend-checkbox",
checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);C(a.checkbox,"click",function(b){r(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});I(e.prototype,{showResetZoom:function(){function a(){b.zoomOut()}var b=this,c=w.lang,d=b.options.chart.resetZoomButton,e=d.theme,f=e.states,h="chart"===d.relativeTo||"spaceBox"===d.relativeTo?null:"plotBox";r(this,"beforeShowResetZoom",null,function(){b.resetZoomButton=b.renderer.button(c.resetZoom,
null,null,a,e,f&&f.hover).attr({align:d.position.align,title:c.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(d.position,!1,h)});r(this,"afterShowResetZoom")},zoomOut:function(){r(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(a){var b=this,c,d=b.pointer,e=!1,f=b.inverted?d.mouseDownX:d.mouseDownY;!a||a.resetSelection?(b.axes.forEach(function(a){c=a.zoom()}),d.initiated=!1):a.xAxis.concat(a.yAxis).forEach(function(a){var g=a.axis,h=b.inverted?g.left:g.top,l=b.inverted?
h+g.width:h+g.height,p=g.isXAxis,k=!1;if(!p&&f>=h&&f<=l||p||!F(f))k=!0;d[p?"zoomX":"zoomY"]&&k&&(c=g.zoom(a.min,a.max),g.displayBtn&&(e=!0))});var h=b.resetZoomButton;e&&!h?b.showResetZoom():!e&&H(h)&&(b.resetZoomButton=h.destroy());c&&b.redraw(q(b.options.chart.animation,a&&a.animation,100>b.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e=c.options.chart,f;b="object"===typeof b?b:{enabled:b,type:"x"};e&&e.panning&&(e.panning=b);var h=b.type;r(this,"pan",{originalEvent:a},function(){d&&
d.forEach(function(a){a.setState()});var b=[1];"xy"===h?b=[1,0]:"y"===h&&(b=[0]);b.forEach(function(b){var d=c[b?"xAxis":"yAxis"][0],e=d.options,g=d.horiz,h=a[g?"chartX":"chartY"];g=g?"mouseDownX":"mouseDownY";var l=c[g],k=(d.pointRange||0)/2,p=d.reversed&&!c.inverted||!d.reversed&&c.inverted?-1:1,m=d.getExtremes(),n=d.toValue(l-h,!0)+k*p;p=d.toValue(l+d.len-h,!0)-k*p;var q=p<n;l=q?p:n;n=q?n:p;p=Math.min(m.dataMin,k?m.min:d.toValue(d.toPixels(m.min)-d.minPixelPadding));k=Math.max(m.dataMax,k?m.max:
d.toValue(d.toPixels(m.max)+d.minPixelPadding));if(!e.ordinal){b&&(e=p-l,0<e&&(n+=e,l=p),e=n-k,0<e&&(n=k,l-=e));if(d.series.length&&l!==m.min&&n!==m.max&&b||d.panningState&&l>=d.panningState.startMin&&n<=d.panningState.startMax)d.setExtremes(l,n,!1,!1,{trigger:"pan"}),f=!0;c[g]=h}});f&&c.redraw(!1);u(c.container,{cursor:"move"})})}});I(b.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart;this.selectedStaging=a=q(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=
c.options.selected=a;d.options.data[d.data.indexOf(c)]=c.options;c.setState(a&&"select");b||e.getSelectedPoints().forEach(function(a){var b=a.series;a.selected&&a!==c&&(a.selected=a.options.selected=!1,b.options.data[b.data.indexOf(a)]=a.options,a.setState(e.hoverPoints&&b.options.inactiveOtherPoints?"inactive":""),a.firePointEvent("unselect"))})});delete this.selectedStaging},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");this.series.options.inactiveOtherPoints||(a.hoverPoints||[]).forEach(function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=this,b=f(a.series.options.point,a.options).events;a.events=b;v(b,function(b,d){c.isFunction(b)&&C(a,d,b)});this.hasImportedEvents=!0}},setState:function(a,b){var c=this.series,d=this.state,e=c.options.states[a||
"normal"]||{},f=m[c.type].marker&&c.options.marker,h=f&&!1===f.enabled,l=f&&f.states&&f.states[a||"normal"]||{},k=!1===l.enabled,u=c.stateMarkerGraphic,v=this.marker||{},y=c.chart,w=c.halo,A,B=f&&c.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===e.enabled||a&&(k||h&&!1===l.enabled)||a&&v.states&&v.states[a]&&!1===v.states[a].enabled)){this.state=a;B&&(A=c.markerAttribs(this,a));if(this.graphic){d&&this.graphic.removeClass("highcharts-point-"+d);a&&this.graphic.addClass("highcharts-point-"+
a);if(!y.styledMode){var C=c.pointAttribs(this,a);var D=q(y.options.chart.animation,e.animation);c.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(a){a&&a.animate({opacity:C.opacity},D)}),this.connector&&this.connector.animate({opacity:C.opacity},D));this.graphic.animate(C,D)}A&&this.graphic.animate(A,q(y.options.chart.animation,l.animation,f.animation));u&&u.hide()}else{if(a&&l){d=v.symbol||c.symbol;u&&u.currentSymbol!==d&&(u=u.destroy());if(A)if(u)u[b?"animate":"attr"]({x:A.x,
y:A.y});else d&&(c.stateMarkerGraphic=u=y.renderer.symbol(d,A.x,A.y,A.width,A.height).add(c.markerGroup),u.currentSymbol=d);!y.styledMode&&u&&u.attr(c.pointAttribs(this,a))}u&&(u[a&&this.isInside?"show":"hide"](),u.element.point=this)}a=e.halo;e=(u=this.graphic||u)&&u.visibility||"inherit";a&&a.size&&u&&"hidden"!==e&&!this.isCluster?(w||(c.halo=w=y.renderer.path().add(u.parentGroup)),w.show()[b?"animate":"attr"]({d:this.haloPath(a.size)}),w.attr({"class":"highcharts-halo highcharts-color-"+q(this.colorIndex,
c.colorIndex)+(this.className?" "+this.className:""),visibility:e,zIndex:-1}),w.point=this,y.styledMode||w.attr(I({fill:this.color||c.color,"fill-opacity":a.opacity},a.attributes))):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)},null,w.hide);r(this,"afterSetState")}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});I(a.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();
this.options.events.mouseOver&&r(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&r(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();b.series.forEach(function(a){a.setState("",!0)})},setState:function(a,b){var c=this,d=c.options,e=c.graph,f=d.inactiveOtherPoints,h=d.states,l=d.lineWidth,k=d.opacity,m=q(h[a||
"normal"]&&h[a||"normal"].animation,c.chart.options.chart.animation);d=0;a=a||"";if(c.state!==a&&([c.group,c.markerGroup,c.dataLabelsGroup].forEach(function(b){b&&(c.state&&b.removeClass("highcharts-series-"+c.state),a&&b.addClass("highcharts-series-"+a))}),c.state=a,!c.chart.styledMode)){if(h[a]&&!1===h[a].enabled)return;a&&(l=h[a].lineWidth||l+(h[a].lineWidthPlus||0),k=q(h[a].opacity,k));if(e&&!e.dashstyle)for(h={"stroke-width":l},e.animate(h,m);c["zone-graph-"+d];)c["zone-graph-"+d].attr(h),d+=
1;f||[c.group,c.markerGroup,c.dataLabelsGroup,c.labelBySeries].forEach(function(a){a&&a.animate({opacity:k},m)})}b&&f&&c.points&&c.setAllPointsToState(a)},setAllPointsToState:function(a){this.points.forEach(function(b){b.setState&&b.setState(a)})},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f=d.options.chart.ignoreHiddenSeries,h=c.visible;var k=(c.visible=a=c.options.visible=c.userOptions.visible="undefined"===typeof a?!h:a)?"show":"hide";["group","dataLabelsGroup","markerGroup",
"tracker","tt"].forEach(function(a){if(c[a])c[a][k]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&d.series.forEach(function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});c.linkedSeries.forEach(function(b){b.setVisible(a,!1)});f&&(d.isDirtyBox=!0);r(c,k);!1!==b&&d.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=this.options.selected=
"undefined"===typeof a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);r(this,a?"select":"unselect")},drawTracker:k.drawTrackerGraph})});M(J,"parts/Responsive.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.isArray,I=e.isObject,G=e.objectEach,H=e.pick,v=e.splat;e=c.Chart;e.prototype.setResponsive=function(e,v){var q=this.options.responsive,u=[],w=this.currentResponsive;!v&&q&&q.rules&&q.rules.forEach(function(e){"undefined"===typeof e._id&&(e._id=c.uniqueKey());
this.matchResponsiveRule(e,u)},this);v=c.merge.apply(0,u.map(function(e){return c.find(q.rules,function(c){return c._id===e}).chartOptions}));v.isResponsiveOptions=!0;u=u.toString()||void 0;u!==(w&&w.ruleIds)&&(w&&this.update(w.undoOptions,e,!0),u?(w=this.currentOptions(v),w.isResponsiveOptions=!0,this.currentResponsive={ruleIds:u,mergedOptions:v,undoOptions:w},this.update(v,e,!0)):this.currentResponsive=void 0)};e.prototype.matchResponsiveRule=function(c,e){var q=c.condition;(q.callback||function(){return this.chartWidth<=
H(q.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=H(q.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=H(q.minWidth,0)&&this.chartHeight>=H(q.minHeight,0)}).call(this)&&e.push(c._id)};e.prototype.currentOptions=function(c){function e(c,m,r,u){var w;G(c,function(c,b){if(!u&&-1<q.collectionsWithUpdate.indexOf(b))for(c=v(c),r[b]=[],w=0;w<c.length;w++)m[b][w]&&(r[b][w]={},e(c[w],m[b][w],r[b][w],u+1));else I(c)?(r[b]=F(c)?[]:{},e(c,m[b]||{},r[b],u+1)):r[b]="undefined"===typeof m[b]?null:m[b]})}var q=this,
u={};e(c,this.options,u,0);return u}});M(J,"masters/highcharts.src.js",[J["parts/Globals.js"],J["parts/Utilities.js"]],function(c,e){var F=e.extend;F(c,{animObject:e.animObject,arrayMax:e.arrayMax,arrayMin:e.arrayMin,attr:e.attr,correctFloat:e.correctFloat,defined:e.defined,destroyObjectProperties:e.destroyObjectProperties,discardElement:e.discardElement,erase:e.erase,extend:e.extend,extendClass:e.extendClass,isArray:e.isArray,isClass:e.isClass,isDOMElement:e.isDOMElement,isNumber:e.isNumber,isObject:e.isObject,
isString:e.isString,numberFormat:e.numberFormat,objectEach:e.objectEach,offset:e.offset,pad:e.pad,pick:e.pick,pInt:e.pInt,relativeLength:e.relativeLength,setAnimation:e.setAnimation,splat:e.splat,syncTimeout:e.syncTimeout,wrap:e.wrap});return c});J["masters/highcharts.src.js"]._modules=J;return J["masters/highcharts.src.js"]});
//# sourceMappingURL=highcharts.js.map

+ 640
- 0
root/js/highstock.js View File

@@ -0,0 +1,640 @@
/*
Highstock JS v8.0.0 (2019-12-10)

(c) 2009-2018 Torstein Honsi

License: www.highcharts.com/license
*/
(function(S,K){"object"===typeof module&&module.exports?(K["default"]=K,module.exports=S.document?K(S):K):"function"===typeof define&&define.amd?define("highcharts/highstock",function(){return K(S)}):(S.Highcharts&&S.Highcharts.error(16,!0),S.Highcharts=K(S))})("undefined"!==typeof window?window:this,function(S){function K(d,g,M,F){d.hasOwnProperty(g)||(d[g]=F.apply(null,M))}var y={};K(y,"parts/Globals.js",[],function(){var d="undefined"!==typeof S?S:"undefined"!==typeof window?window:{},g=d.document,
M=d.navigator&&d.navigator.userAgent||"",F=g&&g.createElementNS&&!!g.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,E=/(edge|msie|trident)/i.test(M)&&!d.opera,D=-1!==M.indexOf("Firefox"),x=-1!==M.indexOf("Chrome"),v=D&&4>parseInt(M.split("Firefox/")[1],10);return{product:"Highcharts",version:"8.0.0",deg2rad:2*Math.PI/360,doc:g,hasBidiBug:v,hasTouch:!!d.TouchEvent,isMS:E,isWebKit:-1!==M.indexOf("AppleWebKit"),isFirefox:D,isChrome:x,isSafari:!x&&-1!==M.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(M),
SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:F,win:d,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});K(y,"parts/Utilities.js",[y["parts/Globals.js"]],function(d){function g(a,l){return parseInt(a,l||10)}function M(a){return"string"===typeof a}function F(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a}function E(a,l){return!!a&&"object"===typeof a&&(!l||
!F(a))}function D(a){return E(a)&&"number"===typeof a.nodeType}function x(a){var l=a&&a.constructor;return!(!E(a,!0)||D(a)||!l||!l.name||"Object"===l.name)}function v(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a}function C(a){return"undefined"!==typeof a&&null!==a}function B(a,l,b){var c;M(l)?C(b)?a.setAttribute(l,b):a&&a.getAttribute&&((c=a.getAttribute(l))||"class"!==l||(c=a.getAttribute(l+"Name"))):h(l,function(l,b){a.setAttribute(b,l)});return c}function p(a,l){var b;a||(a=
{});for(b in l)a[b]=l[b];return a}function z(){for(var a=arguments,l=a.length,b=0;b<l;b++){var c=a[b];if("undefined"!==typeof c&&null!==c)return c}}function m(a,l){var b=function(){};b.prototype=new a;p(b.prototype,l);return b}function q(a,l){return parseFloat(a.toPrecision(l||14))}function w(a,l,b,c){a=+a||0;l=+l;var n=d.defaultOptions.lang,f=(a.toString().split(".")[1]||"").split("e")[0].length,e=a.toString().split("e");if(-1===l)l=Math.min(f,20);else if(!v(l))l=2;else if(l&&e[1]&&0>e[1]){var k=
l+ +e[1];0<=k?(e[0]=(+e[0]).toExponential(k).split("e")[0],l=k):(e[0]=e[0].split(".")[0]||0,a=20>l?(e[0]*Math.pow(10,e[1])).toFixed(l):0,e[1]=0)}var u=(Math.abs(e[1]?e[0]:a)+Math.pow(10,-Math.max(l,f)-1)).toFixed(l);f=String(g(u));k=3<f.length?f.length%3:0;b=z(b,n.decimalPoint);c=z(c,n.thousandsSep);a=(0>a?"-":"")+(k?f.substr(0,k)+c:"");a+=f.substr(k).replace(/(\d{3})(?=\d)/g,"$1"+c);l&&(a+=b+u.slice(-l));e[1]&&0!==+a&&(a+="e"+e[1]);return a}function h(a,l,b){for(var c in a)Object.hasOwnProperty.call(a,
c)&&l.call(b||a[c],a[c],c,a)}d.timers=[];var f=d.charts,c=d.doc,b=d.win;d.error=function(a,l,c,f){var n=v(a),t=n?"Highcharts error #"+a+": www.highcharts.com/errors/"+a+"/":a.toString(),e=function(){if(l)throw Error(t);b.console&&console.log(t)};if("undefined"!==typeof f){var k="";n&&(t+="?");d.objectEach(f,function(a,e){k+="\n"+e+": "+a;n&&(t+=encodeURI(e)+"="+encodeURI(a))});t+=k}c?d.fireEvent(c,"displayError",{code:a,message:t,params:f},e):e()};d.Fx=function(a,l,b){this.options=l;this.elem=a;this.prop=
b};d.Fx.prototype={dSetter:function(){var a=this.paths[0],b=this.paths[1],c=[],f=this.now,h=a.length;if(1===f)c=this.toD;else if(h===b.length&&1>f)for(;h--;){var r=parseFloat(a[h]);c[h]=isNaN(r)||"A"===b[h-4]||"A"===b[h-5]?b[h]:f*parseFloat(""+(b[h]-r))+r}else c=b;this.elem.attr("d",c,null,!0)},update:function(){var a=this.elem,b=this.prop,c=this.now,f=this.options.step;if(this[b+"Setter"])this[b+"Setter"]();else a.attr?a.element&&a.attr(b,c,null,!0):a.style[b]=c+this.unit;f&&f.call(a,c,this)},run:function(a,
l,c){var f=this,n=f.options,r=function(a){return r.stopped?!1:f.step(a)},e=b.requestAnimationFrame||function(a){setTimeout(a,13)},k=function(){for(var a=0;a<d.timers.length;a++)d.timers[a]()||d.timers.splice(a--,1);d.timers.length&&e(k)};a!==l||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=a,this.end=l,this.unit=c,this.now=this.start,this.pos=0,r.elem=this.elem,r.prop=this.prop,r()&&1===d.timers.push(r)&&e(k)):(delete n.curAnim[this.prop],n.complete&&0===Object.keys(n.curAnim).length&&
n.complete.call(this.elem))},step:function(a){var b=+new Date,c=this.options,f=this.elem,d=c.complete,r=c.duration,e=c.curAnim;if(f.attr&&!f.element)a=!1;else if(a||b>=r+this.startTime){this.now=this.end;this.pos=1;this.update();var k=e[this.prop]=!0;h(e,function(a){!0!==a&&(k=!1)});k&&d&&d.call(f);a=!1}else this.pos=c.easing((b-this.startTime)/r),this.now=this.start+(this.end-this.start)*this.pos,this.update(),a=!0;return a},initPath:function(a,b,c){function l(a){for(A=a.length;A--;){var e="M"===
a[A]||"L"===a[A];var k=/[a-zA-Z]/.test(a[A+3]);e&&k&&a.splice(A+1,0,a[A+1],a[A+2],a[A+1],a[A+2])}}function f(a,e){for(;a.length<m;){a[0]=e[m-a.length];var k=a.slice(0,h);[].splice.apply(a,[0,0].concat(k));J&&(k=a.slice(a.length-h),[].splice.apply(a,[a.length,0].concat(k)),A--)}a[0]="M"}function n(a,e){for(var k=(m-a.length)/h;0<k&&k--;)G=a.slice().splice(a.length/L-h,h*L),G[0]=e[m-h-k*h],u&&(G[h-6]=G[h-2],G[h-5]=G[h-1]),[].splice.apply(a,[a.length/L,0].concat(G)),J&&k--}b=b||"";var e=a.startX,k=a.endX,
u=-1<b.indexOf("C"),h=u?7:3,G,A;b=b.split(" ");c=c.slice();var J=a.isArea,L=J?2:1;u&&(l(b),l(c));if(e&&k){for(A=0;A<e.length;A++)if(e[A]===k[0]){var d=A;break}else if(e[0]===k[k.length-e.length+A]){d=A;var q=!0;break}else if(e[e.length-1]===k[k.length-e.length+A]){d=e.length-A;break}"undefined"===typeof d&&(b=[])}if(b.length&&v(d)){var m=c.length+d*L*h;q?(f(b,c),n(c,b)):(f(c,b),n(b,c))}return[b,c]},fillSetter:function(){d.Fx.prototype.strokeSetter.apply(this,arguments)},strokeSetter:function(){this.elem.attr(this.prop,
d.color(this.start).tweenTo(d.color(this.end),this.pos),null,!0)}};d.merge=function(){var a,b=arguments,c={},f=function(a,e){"object"!==typeof a&&(a={});h(e,function(k,b){!E(k,!0)||x(k)||D(k)?a[b]=e[b]:a[b]=f(a[b]||{},k)});return a};!0===b[0]&&(c=b[1],b=Array.prototype.slice.call(b,2));var d=b.length;for(a=0;a<d;a++)c=f(c,b[a]);return c};d.clearTimeout=function(a){C(a)&&clearTimeout(a)};d.css=function(a,b){d.isMS&&!d.svg&&b&&"undefined"!==typeof b.opacity&&(b.filter="alpha(opacity="+100*b.opacity+
")");p(a.style,b)};d.createElement=function(a,b,f,t,h){a=c.createElement(a);var l=d.css;b&&p(a,b);h&&l(a,{padding:"0",border:"none",margin:"0"});f&&l(a,f);t&&t.appendChild(a);return a};d.datePropsToTimestamps=function(a){h(a,function(b,c){E(b)&&"function"===typeof b.getTime?a[c]=b.getTime():(E(b)||F(b))&&d.datePropsToTimestamps(b)})};d.formatSingle=function(a,b,c){var l=/\.([0-9])/,f=d.defaultOptions.lang,n=c&&c.time||d.time;c=c&&c.numberFormatter||w;/f$/.test(a)?(l=(l=a.match(l))?l[1]:-1,null!==
b&&(b=c(b,l,f.decimalPoint,-1<a.indexOf(",")?f.thousandsSep:""))):b=n.dateFormat(a,b);return b};d.format=function(a,b,c){for(var l="{",f=!1,n,e,k,u,h=[],G;a;){l=a.indexOf(l);if(-1===l)break;n=a.slice(0,l);if(f){n=n.split(":");e=n.shift().split(".");u=e.length;G=b;for(k=0;k<u;k++)G&&(G=G[e[k]]);n.length&&(G=d.formatSingle(n.join(":"),G,c));h.push(G)}else h.push(n);a=a.slice(l+1);l=(f=!f)?"}":"{"}h.push(a);return h.join("")};d.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};
d.normalizeTickInterval=function(a,b,c,f,h){var l=a;c=z(c,1);var e=a/c;b||(b=h?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===f&&(1===c?b=b.filter(function(a){return 0===a%1}):.1>=c&&(b=[1/c])));for(f=0;f<b.length&&!(l=b[f],h&&l*c>=a||!h&&e<=(b[f]+(b[f+1]||b[f]))/2);f++);return l=q(l*c,-Math.round(Math.log(.001)/Math.LN10))};d.stableSort=function(a,b){var c=a.length,l,f;for(f=0;f<c;f++)a[f].safeI=f;a.sort(function(a,e){l=b(a,e);return 0===l?a.safeI-e.safeI:l});for(f=0;f<c;f++)delete a[f].safeI};
d.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};d.getStyle=function(a,c,f){if("width"===c)return c=Math.min(a.offsetWidth,a.scrollWidth),f=a.getBoundingClientRect&&a.getBoundingClientRect().width,f<c&&f>=c-1&&(c=Math.floor(f)),Math.max(0,c-d.getStyle(a,"padding-left")-d.getStyle(a,"padding-right"));if("height"===c)return Math.max(0,Math.min(a.offsetHeight,a.scrollHeight)-
d.getStyle(a,"padding-top")-d.getStyle(a,"padding-bottom"));b.getComputedStyle||d.error(27,!0);if(a=b.getComputedStyle(a,void 0))a=a.getPropertyValue(c),z(f,"opacity"!==c)&&(a=g(a));return a};d.inArray=function(a,b,c){return b.indexOf(a,c)};d.find=Array.prototype.find?function(a,b){return a.find(b)}:function(a,b){var c,l=a.length;for(c=0;c<l;c++)if(b(a[c],c))return a[c]};d.keys=Object.keys;d.stop=function(a,b){for(var c=d.timers.length;c--;)d.timers[c].elem!==a||b&&b!==d.timers[c].prop||(d.timers[c].stopped=
!0)};h({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(a,b){d[b]=function(b){return Array.prototype[a].apply(b,[].slice.call(arguments,1))}});d.addEvent=function(a,b,c,f){void 0===f&&(f={});var l=a.addEventListener||d.addEventListenerPolyfill;var n="function"===typeof a&&a.prototype?a.prototype.protoEvents=a.prototype.protoEvents||{}:a.hcEvents=a.hcEvents||{};d.Point&&a instanceof d.Point&&a.series&&a.series.chart&&(a.series.chart.runTrackerClick=!0);l&&l.call(a,b,c,
!1);n[b]||(n[b]=[]);n[b].push({fn:c,order:"number"===typeof f.order?f.order:Infinity});n[b].sort(function(a,b){return a.order-b.order});return function(){d.removeEvent(a,b,c)}};d.removeEvent=function(a,b,c){function l(e,b){var c=a.removeEventListener||d.removeEventListenerPolyfill;c&&c.call(a,e,b,!1)}function f(e){var c;if(a.nodeName){if(b){var f={};f[b]=!0}else f=e;h(f,function(a,b){if(e[b])for(c=e[b].length;c--;)l(b,e[b][c].fn)})}}var n;["protoEvents","hcEvents"].forEach(function(e,k){var u=(k=
k?a:a.prototype)&&k[e];u&&(b?(n=u[b]||[],c?(u[b]=n.filter(function(a){return c!==a.fn}),l(b,c)):(f(u),u[b]=[])):(f(u),k[e]={}))})};d.fireEvent=function(a,b,f,h){var l;f=f||{};if(c.createEvent&&(a.dispatchEvent||a.fireEvent)){var n=c.createEvent("Events");n.initEvent(b,!0,!0);p(n,f);a.dispatchEvent?a.dispatchEvent(n):a.fireEvent(b,n)}else f.target||p(f,{preventDefault:function(){f.defaultPrevented=!0},target:a,type:b}),function(e,b){void 0===e&&(e=[]);void 0===b&&(b=[]);var c=0,k=0,n=e.length+b.length;
for(l=0;l<n;l++)!1===(e[c]?b[k]?e[c].order<=b[k].order?e[c++]:b[k++]:e[c++]:b[k++]).fn.call(a,f)&&f.preventDefault()}(a.protoEvents&&a.protoEvents[b],a.hcEvents&&a.hcEvents[b]);h&&!f.defaultPrevented&&h.call(a,f)};d.animate=function(a,b,c){var l,f="",n,e;if(!E(c)){var k=arguments;c={duration:k[2],easing:k[3],complete:k[4]}}v(c.duration)||(c.duration=400);c.easing="function"===typeof c.easing?c.easing:Math[c.easing]||Math.easeInOutSine;c.curAnim=d.merge(b);h(b,function(k,h){d.stop(a,h);e=new d.Fx(a,
c,h);n=null;"d"===h?(e.paths=e.initPath(a,a.d,b.d),e.toD=b.d,l=0,n=1):a.attr?l=a.attr(h):(l=parseFloat(d.getStyle(a,h))||0,"opacity"!==h&&(f="px"));n||(n=k);n&&n.match&&n.match("px")&&(n=n.replace(/px/g,""));e.run(l,n,f)})};d.seriesType=function(a,b,c,f,h){var l=d.getOptions(),e=d.seriesTypes;l.plotOptions[a]=d.merge(l.plotOptions[b],c);e[a]=m(e[b]||function(){},f);e[a].prototype.type=a;h&&(e[a].prototype.pointClass=m(d.Point,h));return e[a]};d.uniqueKey=function(){var a=Math.random().toString(36).substring(2,
9),b=0;return function(){return"highcharts-"+a+"-"+b++}}();d.isFunction=function(a){return"function"===typeof a};b.jQuery&&(b.jQuery.fn.highcharts=function(){var a=[].slice.call(arguments);if(this[0])return a[0]?(new (d[M(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):f[B(this[0],"data-highcharts-chart")]});return{animObject:function(a){return E(a)?d.merge(a):{duration:a?500:0}},arrayMax:function(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c},arrayMin:function(a){for(var b=a.length,
c=a[0];b--;)a[b]<c&&(c=a[b]);return c},attr:B,clamp:function(a,b,c){return a>b?a<c?a:c:b},correctFloat:q,defined:C,destroyObjectProperties:function(a,b){h(a,function(c,f){c&&c!==b&&c.destroy&&c.destroy();delete a[f]})},discardElement:function(a){var b=d.garbageBin;b||(b=d.createElement("div"));a&&b.appendChild(a);b.innerHTML=""},erase:function(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}},extend:p,extendClass:m,isArray:F,isClass:x,isDOMElement:D,isNumber:v,isObject:E,isString:M,
numberFormat:w,objectEach:h,offset:function(a){var f=c.documentElement;a=a.parentElement||a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(b.pageYOffset||f.scrollTop)-(f.clientTop||0),left:a.left+(b.pageXOffset||f.scrollLeft)-(f.clientLeft||0)}},pad:function(a,b,c){return Array((b||2)+1-String(a).replace("-","").length).join(c||"0")+a},pick:z,pInt:g,relativeLength:function(a,b,c){return/%$/.test(a)?b*parseFloat(a)/100+(c||0):parseFloat(a)},setAnimation:function(a,b){b.renderer.globalAnimation=
z(a,b.options.chart.animation,!0)},splat:function(a){return F(a)?a:[a]},syncTimeout:function(a,b,c){if(0<b)return setTimeout(a,b,c);a.call(0,c);return-1},wrap:function(a,b,c){var f=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments),b=arguments,e=this;e.proceed=function(){f.apply(e,arguments.length?arguments:b)};a.unshift(f);a=c.apply(this,a);e.proceed=null;return a}}}});K(y,"parts/Color.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.isNumber,F=g.pInt,E=d.merge;
d.Color=function(g){if(!(this instanceof d.Color))return new d.Color(g);this.init(g)};d.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(d){return[F(d[1]),F(d[2]),F(d[3]),parseFloat(d[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(d){return[F(d[1]),F(d[2]),F(d[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(g){var x,v;if((this.input=g=this.names[g&&
g.toLowerCase?g.toLowerCase():""]||g)&&g.stops)this.stops=g.stops.map(function(g){return new d.Color(g[1])});else{if(g&&g.charAt&&"#"===g.charAt()){var C=g.length;g=parseInt(g.substr(1),16);7===C?x=[(g&16711680)>>16,(g&65280)>>8,g&255,1]:4===C&&(x=[(g&3840)>>4|(g&3840)>>8,(g&240)>>4|g&240,(g&15)<<4|g&15,1])}if(!x)for(v=this.parsers.length;v--&&!x;){var D=this.parsers[v];(C=D.regex.exec(g))&&(x=D.parse(C))}}this.rgba=x||[]},get:function(d){var g=this.input,v=this.rgba;if(this.stops){var C=E(g);C.stops=
[].concat(C.stops);this.stops.forEach(function(g,p){C.stops[p]=[C.stops[p][0],g.get(d)]})}else C=v&&M(v[0])?"rgb"===d||!d&&1===v[3]?"rgb("+v[0]+","+v[1]+","+v[2]+")":"a"===d?v[3]:"rgba("+v.join(",")+")":g;return C},brighten:function(d){var g,v=this.rgba;if(this.stops)this.stops.forEach(function(g){g.brighten(d)});else if(M(d)&&0!==d)for(g=0;3>g;g++)v[g]+=F(255*d),0>v[g]&&(v[g]=0),255<v[g]&&(v[g]=255);return this},setOpacity:function(d){this.rgba[3]=d;return this},tweenTo:function(d,g){var v=this.rgba,
x=d.rgba;x.length&&v&&v.length?(d=1!==x[3]||1!==v[3],g=(d?"rgba(":"rgb(")+Math.round(x[0]+(v[0]-x[0])*(1-g))+","+Math.round(x[1]+(v[1]-x[1])*(1-g))+","+Math.round(x[2]+(v[2]-x[2])*(1-g))+(d?","+(x[3]+(v[3]-x[3])*(1-g)):"")+")"):g=d.input||"none";return g}};d.color=function(g){return new d.Color(g)}});K(y,"parts/SvgRenderer.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.animObject,F=g.attr,E=g.defined,D=g.destroyObjectProperties,x=g.erase,v=g.extend,C=g.isArray,B=g.isNumber,
p=g.isObject,z=g.isString,m=g.objectEach,q=g.pick,w=g.pInt,h=g.splat,f=d.addEvent,c=d.animate,b=d.charts,a=d.color,l=d.css,n=d.createElement,t=d.deg2rad,I=d.doc,r=d.hasTouch,e=d.isFirefox,k=d.isMS,u=d.isWebKit,H=d.merge,G=d.noop,A=d.removeEvent,J=d.stop,L=d.svg,Q=d.SVG_NS,V=d.symbolSizes,U=d.win;var P=d.SVGElement=function(){return this};v(P.prototype,{opacity:1,SVG_NS:Q,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),
init:function(a,e){this.element="span"===e?n(e):I.createElementNS(this.SVG_NS,e);this.renderer=a;d.fireEvent(this,"afterInit")},animate:function(a,e,b){var k=M(q(e,this.renderer.globalAnimation,!0));q(I.hidden,I.msHidden,I.webkitHidden,!1)&&(k.duration=0);0!==k.duration?(b&&(k.complete=b),c(this,a,k)):(this.attr(a,void 0,b),m(a,function(a,e){k.step&&k.step.call(this,a,{prop:e,pos:1})},this));return this},complexColor:function(a,e,b){var c=this.renderer,k,A,f,l,u,J,N,O,h,n,t,L=[],r;d.fireEvent(this.renderer,
"complexColor",{args:arguments},function(){a.radialGradient?A="radialGradient":a.linearGradient&&(A="linearGradient");A&&(f=a[A],u=c.gradients,N=a.stops,n=b.radialReference,C(f)&&(a[A]=f={x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===A&&n&&!E(f.gradientUnits)&&(l=f,f=H(f,c.getRadialAttr(n,l),{gradientUnits:"userSpaceOnUse"})),m(f,function(a,e){"id"!==e&&L.push(e,a)}),m(N,function(a){L.push(a)}),L=L.join(","),u[L]?t=u[L].attr("id"):(f.id=t=d.uniqueKey(),u[L]=J=
c.createElement(A).attr(f).add(c.defs),J.radAttr=l,J.stops=[],N.forEach(function(a){0===a[1].indexOf("rgba")?(k=d.color(a[1]),O=k.get("rgb"),h=k.get("a")):(O=a[1],h=1);a=c.createElement("stop").attr({offset:a[0],"stop-color":O,"stop-opacity":h}).add(J);J.stops.push(a)})),r="url("+c.url+"#"+t+")",b.setAttribute(e,r),b.gradient=L,a.toString=function(){return r})})},applyTextOutline:function(a){var e=this.element,b;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));
a=a.split(" ");var c=a[a.length-1];if((b=a[0])&&"none"!==b&&d.svg){this.fakeTS=!0;a=[].slice.call(e.getElementsByTagName("tspan"));this.ySetter=this.xSetter;b=b.replace(/(^[\d\.]+)(.*?)$/g,function(a,e,b){return 2*e+b});this.removeTextOutline(a);var k=e.firstChild;a.forEach(function(a,f){0===f&&(a.setAttribute("x",e.getAttribute("x")),f=e.getAttribute("y"),a.setAttribute("y",f||0),null===f&&e.setAttribute("y",0));a=a.cloneNode(1);F(a,{"class":"highcharts-text-outline",fill:c,stroke:c,"stroke-width":b,
"stroke-linejoin":"round"});e.insertBefore(a,k)})}},removeTextOutline:function(a){for(var e=a.length,b;e--;)b=a[e],"highcharts-text-outline"===b.getAttribute("class")&&x(a,this.element.removeChild(b))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(a,e,b,c){var k=this.element,f,A=this,l,u,N=this.symbolCustomAttribs;if("string"===typeof a&&"undefined"!==typeof e){var O=a;a={};a[O]=e}"string"===typeof a?A=(this[a+"Getter"]||this._defaultGetter).call(this,
a,k):(m(a,function(e,b){l=!1;c||J(this,b);this.symbolName&&-1!==d.inArray(b,N)&&(f||(this.symbolAttr(a),f=!0),l=!0);!this.rotation||"x"!==b&&"y"!==b||(this.doTransform=!0);l||(u=this[b+"Setter"]||this._defaultSetter,u.call(this,e,b,k),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(b)&&this.updateShadows(b,e,u))},this),this.afterSetters());b&&b.call(this);return A},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,
e,b){for(var c=this.shadows,k=c.length;k--;)b.call(c[k],"height"===a?Math.max(e-(c[k].cutHeight||0),0):"d"===a?this.d:e,a,c[k])},addClass:function(a,e){var b=e?"":this.attr("class")||"";a=(a||"").split(/ /g).reduce(function(a,e){-1===b.indexOf(e)&&a.push(e);return a},b?[b]:[]).join(" ");a!==b&&this.attr("class",a);return this},hasClass:function(a){return-1!==(this.attr("class")||"").split(" ").indexOf(a)},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(z(a)?new RegExp(" ?"+
a+" ?"):a,""))},symbolAttr:function(a){var e=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(b){e[b]=q(a[b],e[b])});e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,e){e=e||a.strokeWidth||0;var b=Math.round(e)%2/2;a.x=Math.floor(a.x||this.x||0)+b;a.y=Math.floor(a.y||this.y||0)+b;a.width=Math.floor((a.width||this.width||
0)-2*b);a.height=Math.floor((a.height||this.height||0)-2*b);E(a.strokeWidth)&&(a.strokeWidth=e);return a},css:function(a){var e=this.styles,b={},c=this.element,k="",f=!e,A=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);e&&m(a,function(a,c){a!==e[c]&&(b[c]=a,f=!0)});if(f){e&&(a=v(e,b));if(a)if(null===a.width||"auto"===a.width)delete this.textWidth;else if("text"===c.nodeName.toLowerCase()&&a.width)var u=this.textWidth=w(a.width);this.styles=a;u&&!L&&this.renderer.forExport&&delete a.width;
if(c.namespaceURI===this.SVG_NS){var J=function(a,e){return"-"+e.toLowerCase()};m(a,function(a,e){-1===A.indexOf(e)&&(k+=e.replace(/([A-Z])/g,J)+":"+a+";")});k&&F(c,"style",k)}else l(c,a);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this},getStyle:function(a){return U.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]||
0;var a=this.getStyle("stroke-width"),e=0;if(a.indexOf("px")===a.length-2)e=w(a);else if(""!==a){var b=I.createElementNS(Q,"rect");F(b,{width:a,"stroke-width":0});this.element.parentNode.appendChild(b);e=b.getBBox().width;b.parentNode.removeChild(b)}return e},on:function(a,e){var b=this,c=b.element;r&&"click"===a?(c.ontouchstart=function(a){b.touchEventFired=Date.now();a.preventDefault();e.call(c,a)},c.onclick=function(a){(-1===U.navigator.userAgent.indexOf("Android")||1100<Date.now()-(b.touchEventFired||
0))&&e.call(c,a)}):c["on"+a]=e;return this},setRadialReference:function(a){var e=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(a,e.radAttr));return this},translate:function(a,e){return this.attr({translateX:a,translateY:e})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,e=this.translateY||0,b=this.scaleX,c=this.scaleY,k=this.inverted,f=this.rotation,
A=this.matrix,l=this.element;k&&(a+=this.width,e+=this.height);a=["translate("+a+","+e+")"];E(A)&&a.push("matrix("+A.join(",")+")");k?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+q(this.rotationOriginX,l.getAttribute("x"),0)+" "+q(this.rotationOriginY,l.getAttribute("y")||0)+")");(E(b)||E(c))&&a.push("scale("+q(b,1)+" "+q(c,1)+")");a.length&&l.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,e,b){var c,
k={};var f=this.renderer;var A=f.alignedObjects;var l,u;if(a){if(this.alignOptions=a,this.alignByTranslate=e,!b||z(b))this.alignTo=c=b||"renderer",x(A,this),A.push(this),b=null}else a=this.alignOptions,e=this.alignByTranslate,c=this.alignTo;b=q(b,f[c],f);c=a.align;f=a.verticalAlign;A=(b.x||0)+(a.x||0);var J=(b.y||0)+(a.y||0);"right"===c?l=1:"center"===c&&(l=2);l&&(A+=(b.width-(a.width||0))/l);k[e?"translateX":"x"]=Math.round(A);"bottom"===f?u=1:"middle"===f&&(u=2);u&&(J+=(b.height-(a.height||0))/
u);k[e?"translateY":"y"]=Math.round(J);this[this.placed?"animate":"attr"](k);this.placed=!0;this.alignAttr=k;return this},getBBox:function(a,e){var b,c=this.renderer,k=this.element,f=this.styles,A=this.textStr,l,u=c.cache,J=c.cacheKeys,h=k.namespaceURI===this.SVG_NS;e=q(e,this.rotation,0);var N=c.styledMode?k&&P.prototype.getStyle.call(k,"font-size"):f&&f.fontSize;if(E(A)){var n=A.toString();-1===n.indexOf("<")&&(n=n.replace(/[0-9]/g,"0"));n+=["",e,N,this.textWidth,f&&f.textOverflow].join()}n&&!a&&
(b=u[n]);if(!b){if(h||c.forExport){try{(l=this.fakeTS&&function(a){[].forEach.call(k.querySelectorAll(".highcharts-text-outline"),function(e){e.style.display=a})})&&l("none"),b=k.getBBox?v({},k.getBBox()):{width:k.offsetWidth,height:k.offsetHeight},l&&l("")}catch(ea){""}if(!b||0>b.width)b={width:0,height:0}}else b=this.htmlGetBBox();c.isSVG&&(a=b.width,c=b.height,h&&(b.height=c={"11px,17":14,"13px,20":16}[f&&f.fontSize+","+Math.round(c)]||c),e&&(f=e*t,b.width=Math.abs(c*Math.sin(f))+Math.abs(a*Math.cos(f)),
b.height=Math.abs(c*Math.cos(f))+Math.abs(a*Math.sin(f))));if(n&&0<b.height){for(;250<J.length;)delete u[J.shift()];u[n]||J.push(n);u[n]=b}}return b},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(a){a?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this},fadeOut:function(a){var e=this;e.animate({opacity:0},{duration:a||150,complete:function(){e.attr({y:-9999})}})},add:function(a){var e=this.renderer,b=this.element;a&&(this.parentGroup=a);this.parentInverted=
a&&a.inverted;"undefined"!==typeof this.textStr&&e.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var c=this.zIndexSetter();c||(a?a.element:e.box).appendChild(b);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var e=a.parentNode;e&&e.removeChild(a)},destroy:function(){var a=this,e=a.element||{},b=a.renderer,c=b.isSVG&&"SPAN"===e.nodeName&&a.parentGroup,k=e.ownerSVGElement,f=a.clipPath;e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null;J(a);f&&k&&([].forEach.call(k.querySelectorAll("[clip-path],[CLIP-PATH]"),
function(a){-1<a.getAttribute("clip-path").indexOf(f.element.id)&&a.removeAttribute("clip-path")}),a.clipPath=f.destroy());if(a.stops){for(k=0;k<a.stops.length;k++)a.stops[k]=a.stops[k].destroy();a.stops=null}a.safeRemoveChild(e);for(b.styledMode||a.destroyShadows();c&&c.div&&0===c.div.childNodes.length;)e=c.parentGroup,a.safeRemoveChild(c.div),delete c.div,c=e;a.alignTo&&x(b.alignedObjects,a);m(a,function(e,b){a[b]&&a[b].parentGroup===a&&a[b].destroy&&a[b].destroy();delete a[b]})},shadow:function(a,
e,b){var c=[],k,f=this.element;if(!a)this.destroyShadows();else if(!this.shadows){var A=q(a.width,3);var l=(a.opacity||.15)/A;var u=this.parentInverted?"(-1,-1)":"("+q(a.offsetX,1)+", "+q(a.offsetY,1)+")";for(k=1;k<=A;k++){var J=f.cloneNode(0);var h=2*A+1-2*k;F(J,{stroke:a.color||"#000000","stroke-opacity":l*k,"stroke-width":h,transform:"translate"+u,fill:"none"});J.setAttribute("class",(J.getAttribute("class")||"")+" highcharts-shadow");b&&(F(J,"height",Math.max(F(J,"height")-h,0)),J.cutHeight=h);
e?e.element.appendChild(J):f.parentNode&&f.parentNode.insertBefore(J,f);c.push(J)}this.shadows=c}return this},destroyShadows:function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=q(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},
dSetter:function(a,e,b){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[e]!==a&&(b.setAttribute(e,a),this[e]=a)},dashstyleSetter:function(a){var e,b=this["stroke-width"];"inherit"===b&&(b=1);if(a=a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=a.length;e--;)a[e]=w(a[e])*
b;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){var e={left:"start",center:"middle",right:"end"};e[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",e[a]))},opacitySetter:function(a,e,b){this[e]=a;b.setAttribute(e,a)},titleSetter:function(a){var e=this.element.getElementsByTagName("title")[0];e||(e=I.createElementNS(this.SVG_NS,"title"),this.element.appendChild(e));e.firstChild&&e.removeChild(e.firstChild);e.appendChild(I.createTextNode(String(q(a,
"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(a,e){var b=this.element,c={textAnchor:"text-anchor"},k=!1,f=this.textPathWrapper,A=!f;e=H(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);var l=e.attributes;if(a&&e&&e.enabled){f&&null===f.element.parentNode?(A=!0,f=f.destroy()):f&&this.removeTextOutline.call(f.parentGroup,
[].slice.call(b.getElementsByTagName("tspan")));this.options&&this.options.padding&&(l.dx=-this.options.padding);f||(this.textPathWrapper=f=this.renderer.createElement("textPath"),k=!0);var u=f.element;(e=a.element.getAttribute("id"))||a.element.setAttribute("id",e=d.uniqueKey());if(A)for(a=b.getElementsByTagName("tspan");a.length;)a[0].setAttribute("y",0),B(l.dx)&&a[0].setAttribute("x",-l.dx),u.appendChild(a[0]);k&&f.add({element:this.text?this.text.element:b});u.setAttributeNS("http://www.w3.org/1999/xlink",
"href",this.renderer.url+"#"+e);E(l.dy)&&(u.parentNode.setAttribute("dy",l.dy),delete l.dy);E(l.dx)&&(u.parentNode.setAttribute("dx",l.dx),delete l.dx);m(l,function(a,e){u.setAttribute(c[e]||e,a)});b.removeAttribute("transform");this.removeTextOutline.call(f,[].slice.call(b.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=G}else f&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(b,
a),this.updateTransform(),this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this},destroyTextPath:function(a,e){var b=a.getElementsByTagName("text")[0];if(b){if(b.removeAttribute("dx"),b.removeAttribute("dy"),e.element.setAttribute("id",""),b.getElementsByTagName("textPath").length){for(a=this.textPathWrapper.element.childNodes;a.length;)b.appendChild(a[0]);b.removeChild(this.textPathWrapper.element)}}else if(a.getAttribute("dx")||a.getAttribute("dy"))a.removeAttribute("dx"),
a.removeAttribute("dy");this.textPathWrapper=this.textPathWrapper.destroy()},fillSetter:function(a,e,b){"string"===typeof a?b.setAttribute(e,a):a&&this.complexColor(a,e,b)},visibilitySetter:function(a,e,b){"inherit"===a?b.removeAttribute(e):this[e]!==a&&b.setAttribute(e,a);this[e]=a},zIndexSetter:function(a,e){var b=this.renderer,c=this.parentGroup,k=(c||b).element||b.box,f=this.element,A=!1;b=k===b.box;var l=this.added;var u;E(a)?(f.setAttribute("data-z-index",a),a=+a,this[e]===a&&(l=!1)):E(this[e])&&
f.removeAttribute("data-z-index");this[e]=a;if(l){(a=this.zIndex)&&c&&(c.handleZ=!0);e=k.childNodes;for(u=e.length-1;0<=u&&!A;u--){c=e[u];l=c.getAttribute("data-z-index");var J=!E(l);if(c!==f)if(0>a&&J&&!b&&!u)k.insertBefore(f,e[u]),A=!0;else if(w(l)<=a||J&&(!E(a)||0<=a))k.insertBefore(f,e[u+1]||null),A=!0}A||(k.insertBefore(f,e[b?3:0]||null),A=!0)}return A},_defaultSetter:function(a,e,b){b.setAttribute(e,a)}});P.prototype.yGetter=P.prototype.xGetter;P.prototype.translateXSetter=P.prototype.translateYSetter=
P.prototype.rotationSetter=P.prototype.verticalAlignSetter=P.prototype.rotationOriginXSetter=P.prototype.rotationOriginYSetter=P.prototype.scaleXSetter=P.prototype.scaleYSetter=P.prototype.matrixSetter=function(a,e){this[e]=a;this.doTransform=!0};P.prototype["stroke-widthSetter"]=P.prototype.strokeSetter=function(a,e,b){this[e]=a;this.stroke&&this["stroke-width"]?(P.prototype.fillSetter.call(this,this.stroke,"stroke",b),b.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===
e&&0===a&&this.hasStroke?(b.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(b.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};g=d.SVGRenderer=function(){this.init.apply(this,arguments)};v(g.prototype,{Element:P,SVG_NS:Q,init:function(a,b,c,k,A,J,h){var n=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});h||n.css(this.getStyle(k));k=n.element;a.appendChild(k);F(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&
F(k,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=k;this.boxWrapper=n;this.alignedObjects=[];this.url=(e||u)&&I.getElementsByTagName("base").length?U.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(I.createTextNode("Created with Highcharts 8.0.0"));this.defs=this.createElement("defs").add();this.allowHTML=J;this.forExport=A;this.styledMode=h;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=
0;this.setSize(b,c,!1);var t;e&&a.getBoundingClientRect&&(b=function(){l(a,{left:0,top:0});t=a.getBoundingClientRect();l(a,{left:Math.ceil(t.left)-t.left+"px",top:Math.ceil(t.top)-t.top+"px"})},b(),this.unSubPixelFix=f(U,"resize",b))},definition:function(a){function e(a,c){var k;h(a).forEach(function(a){var f=b.createElement(a.tagName),A={};m(a,function(a,e){"tagName"!==e&&"children"!==e&&"textContent"!==e&&(A[e]=a)});f.attr(A);f.add(c||b.defs);a.textContent&&f.element.appendChild(I.createTextNode(a.textContent));
e(a.children||[],f);k=f});return k}var b=this;return e(a)},getStyle:function(a){return this.style=v({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();D(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&
this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var e=new this.Element;e.init(this,a);return e},draw:G,getRadialAttr:function(a,e){return{cx:a[0]-a[2]/2+e.cx*a[2],cy:a[1]-a[2]/2+e.cy*a[2],r:e.r*a[2]}},truncate:function(a,e,b,c,k,f,A){var l=this,u=a.rotation,J,h=c?1:0,n=(b||c).length,t=n,L=[],H=function(a){e.firstChild&&e.removeChild(e.firstChild);a&&e.appendChild(I.createTextNode(a))},d=function(f,u){u=u||f;if("undefined"===typeof L[u])if(e.getSubStringLength)try{L[u]=
k+e.getSubStringLength(0,c?u+1:u)}catch(ha){""}else l.getSpanWidth&&(H(A(b||c,f)),L[u]=k+l.getSpanWidth(a,e));return L[u]},r;a.rotation=0;var G=d(e.textContent.length);if(r=k+G>f){for(;h<=n;)t=Math.ceil((h+n)/2),c&&(J=A(c,t)),G=d(t,J&&J.length-1),h===n?h=n+1:G>f?n=t-1:h=t;0===n?H(""):b&&n===b.length-1||H(J||A(b||c,t))}c&&c.splice(0,t);a.actualWidth=G;a.rotation=u;return r},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(a){var e=a.element,b=this,c=b.forExport,
k=q(a.textStr,"").toString(),f=-1!==k.indexOf("<"),A=e.childNodes,u,J=F(e,"x"),h=a.styles,n=a.textWidth,t=h&&h.lineHeight,H=h&&h.textOutline,d=h&&"ellipsis"===h.textOverflow,r=h&&"nowrap"===h.whiteSpace,G=h&&h.fontSize,g,O=A.length;h=n&&!a.added&&this.box;var V=function(a){var c;b.styledMode||(c=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:G||b.style.fontSize||12);return t?w(t):b.fontMetrics(c,a.getAttribute("style")?a:e).h},p=function(a,e){m(b.escapes,function(b,c){e&&-1!==e.indexOf(b)||
(a=a.toString().replace(new RegExp(b,"g"),c))});return a},v=function(a,e){var b=a.indexOf("<");a=a.substring(b,a.indexOf(">")-b);b=a.indexOf(e+"=");if(-1!==b&&(b=b+e.length+1,e=a.charAt(b),'"'===e||"'"===e))return a=a.substring(b+1),a.substring(0,a.indexOf(e))},z=/<br.*?>/g;var U=[k,d,r,t,H,G,n].join();if(U!==a.textCache){for(a.textCache=U;O--;)e.removeChild(A[O]);f||H||d||n||-1!==k.indexOf(" ")&&(!r||z.test(k))?(h&&h.appendChild(e),f?(k=b.styledMode?k.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g,
'<span class="highcharts-emphasized">'):k.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),k=k.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(z)):k=[k],k=k.filter(function(a){return""!==a}),k.forEach(function(k,f){var A=0,h=0;k=k.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");var t=k.split("|||");t.forEach(function(k){if(""!==k||1===t.length){var H={},N=I.createElementNS(b.SVG_NS,
"tspan"),q,m;(q=v(k,"class"))&&F(N,"class",q);if(q=v(k,"style"))q=q.replace(/(;| |^)color([ :])/,"$1fill$2"),F(N,"style",q);(m=v(k,"href"))&&!c&&(F(N,"onclick",'location.href="'+m+'"'),F(N,"class","highcharts-anchor"),b.styledMode||l(N,{cursor:"pointer"}));k=p(k.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==k){N.appendChild(I.createTextNode(k));A?H.dx=0:f&&null!==J&&(H.x=J);F(N,H);e.appendChild(N);!A&&g&&(!L&&c&&l(N,{display:"block"}),F(N,"dy",V(N)));if(n){var w=k.replace(/([^\^])-/g,"$1- ").split(" ");
H=!r&&(1<t.length||f||1<w.length);m=0;var ba=V(N);if(d)u=b.truncate(a,N,k,void 0,0,Math.max(0,n-parseInt(G||12,10)),function(a,e){return a.substring(0,e)+"\u2026"});else if(H)for(;w.length;)w.length&&!r&&0<m&&(N=I.createElementNS(Q,"tspan"),F(N,{dy:ba,x:J}),q&&F(N,"style",q),N.appendChild(I.createTextNode(w.join(" ").replace(/- /g,"-"))),e.appendChild(N)),b.truncate(a,N,null,w,0===m?h:0,n,function(a,e){return w.slice(0,e).join(" ").replace(/- /g,"-")}),h=a.actualWidth,m++}A++}}});g=g||e.childNodes.length}),
d&&u&&a.attr("title",p(a.textStr,["&lt;","&gt;"])),h&&h.removeChild(e),H&&a.applyTextOutline&&a.applyTextOutline(H)):e.appendChild(I.createTextNode(p(k)))}},getContrast:function(e){e=a(e).rgba;e[0]*=1;e[1]*=1.2;e[2]*=.5;return 459<e[0]+e[1]+e[2]?"#000000":"#FFFFFF"},button:function(a,e,b,c,A,l,u,J,h,n){var t=this.label(a,e,b,h,null,null,n,null,"button"),L=0,d=this.styledMode;t.attr(H({padding:8,r:2},A));if(!d){A=H({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",
fontWeight:"normal"}},A);var r=A.style;delete A.style;l=H(A,{fill:"#e6e6e6"},l);var G=l.style;delete l.style;u=H(A,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},u);var N=u.style;delete u.style;J=H(A,{style:{color:"#cccccc"}},J);var Q=J.style;delete J.style}f(t.element,k?"mouseover":"mouseenter",function(){3!==L&&t.setState(1)});f(t.element,k?"mouseout":"mouseleave",function(){3!==L&&t.setState(L)});t.setState=function(a){1!==a&&(t.state=L=a);t.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+
["normal","hover","pressed","disabled"][a||0]);d||t.attr([A,l,u,J][a||0]).css([r,G,N,Q][a||0])};d||t.attr(A).css(v({cursor:"default"},r));return t.on("click",function(a){3!==L&&c.call(t,a)})},crispLine:function(a,e){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-e%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+e%2/2);return a},path:function(a){var e=this.styledMode?{}:{fill:"none"};C(a)?e.d=a:p(a)&&v(e,a);return this.createElement("path").attr(e)},circle:function(a,e,b){a=p(a)?a:"undefined"===typeof a?{}:
{x:a,y:e,r:b};e=this.createElement("circle");e.xSetter=e.ySetter=function(a,e,b){b.setAttribute("c"+e,a)};return e.attr(a)},arc:function(a,e,b,c,k,f){p(a)?(c=a,e=c.y,b=c.r,a=c.x):c={innerR:c,start:k,end:f};a=this.symbol("arc",a,e,b,b,c);a.r=b;return a},rect:function(a,e,b,c,k,f){k=p(a)?a.r:k;var A=this.createElement("rect");a=p(a)?a:"undefined"===typeof a?{}:{x:a,y:e,width:Math.max(b,0),height:Math.max(c,0)};this.styledMode||("undefined"!==typeof f&&(a.strokeWidth=f,a=A.crisp(a)),a.fill="none");k&&
(a.r=k);A.rSetter=function(a,e,b){A.r=a;F(b,{rx:a,ry:a})};A.rGetter=function(){return A.r};return A.attr(a)},setSize:function(a,e,b){var c=this.alignedObjects,k=c.length;this.width=a;this.height=e;for(this.boxWrapper.animate({width:a,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:q(b,!0)?void 0:0});k--;)c[k].align()},g:function(a){var e=this.createElement("g");return a?e.attr({"class":"highcharts-"+a}):e},image:function(a,e,b,c,k,A){var l=
{preserveAspectRatio:"none"},u=function(a,e){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",e):a.setAttribute("hc-svg-href",e)},J=function(e){u(h.element,a);A.call(h,e)};1<arguments.length&&v(l,{x:e,y:b,width:c,height:k});var h=this.createElement("image").attr(l);A?(u(h.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),l=new U.Image,f(l,"load",J),l.src=a,l.complete&&J({})):u(h.element,a);return h},symbol:function(a,e,c,k,f,A){var u=this,
J=/^url\((.*?)\)$/,h=J.test(a),t=!h&&(this.symbols[a]?a:"circle"),L=t&&this.symbols[t],H=E(e)&&L&&L.call(this.symbols,Math.round(e),Math.round(c),k,f,A);if(L){var d=this.path(H);u.styledMode||d.attr("fill","none");v(d,{symbolName:t,x:e,y:c,width:k,height:f});A&&v(d,A)}else if(h){var r=a.match(J)[1];d=this.image(r);d.imgwidth=q(V[r]&&V[r].width,A&&A.width);d.imgheight=q(V[r]&&V[r].height,A&&A.height);var G=function(){d.attr({width:d.width,height:d.height})};["width","height"].forEach(function(a){d[a+
"Setter"]=function(a,e){var b={},c=this["img"+e],k="width"===e?"translateX":"translateY";this[e]=a;E(c)&&(A&&"within"===A.backgroundSize&&this.width&&this.height&&(c=Math.round(c*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(e,c),this.alignByTranslate||(b[k]=((this[e]||0)-c)/2,this.attr(b)))}});E(e)&&d.attr({x:e,y:c});d.isImg=!0;E(d.imgwidth)&&E(d.imgheight)?G():(d.attr({width:0,height:0}),n("img",{onload:function(){var a=b[u.chartIndex];0===
this.width&&(l(this,{position:"absolute",top:"-999em"}),I.body.appendChild(this));V[r]={width:this.width,height:this.height};d.imgwidth=this.width;d.imgheight=this.height;d.element&&G();this.parentNode&&this.parentNode.removeChild(this);u.imgCount--;if(!u.imgCount&&a&&a.onload)a.onload()},src:r}),this.imgCount++)}return d},symbols:{circle:function(a,e,b,c){return this.arc(a+b/2,e+c/2,b/2,c/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(a,e,b,c){return["M",a,e,"L",a+b,e,a+b,e+c,a,e+
c,"Z"]},triangle:function(a,e,b,c){return["M",a+b/2,e,"L",a+b,e+c,a,e+c,"Z"]},"triangle-down":function(a,e,b,c){return["M",a,e,"L",a+b,e,a+b/2,e+c,"Z"]},diamond:function(a,e,b,c){return["M",a+b/2,e,"L",a+b,e+c/2,a+b/2,e+c,a,e+c/2,"Z"]},arc:function(a,e,b,c,k){var f=k.start,A=k.r||b,u=k.r||c||b,l=k.end-.001;b=k.innerR;c=q(k.open,.001>Math.abs(k.end-k.start-2*Math.PI));var J=Math.cos(f),h=Math.sin(f),n=Math.cos(l);l=Math.sin(l);f=q(k.longArc,.001>k.end-f-Math.PI?0:1);A=["M",a+A*J,e+u*h,"A",A,u,0,f,
q(k.clockwise,1),a+A*n,e+u*l];E(b)&&A.push(c?"M":"L",a+b*n,e+b*l,"A",b,b,0,f,E(k.clockwise)?1-k.clockwise:0,a+b*J,e+b*h);A.push(c?"":"Z");return A},callout:function(a,e,b,c,k){var f=Math.min(k&&k.r||0,b,c),A=f+6,l=k&&k.anchorX;k=k&&k.anchorY;var u=["M",a+f,e,"L",a+b-f,e,"C",a+b,e,a+b,e,a+b,e+f,"L",a+b,e+c-f,"C",a+b,e+c,a+b,e+c,a+b-f,e+c,"L",a+f,e+c,"C",a,e+c,a,e+c,a,e+c-f,"L",a,e+f,"C",a,e,a,e,a+f,e];l&&l>b?k>e+A&&k<e+c-A?u.splice(13,3,"L",a+b,k-6,a+b+6,k,a+b,k+6,a+b,e+c-f):u.splice(13,3,"L",a+b,
c/2,l,k,a+b,c/2,a+b,e+c-f):l&&0>l?k>e+A&&k<e+c-A?u.splice(33,3,"L",a,k+6,a-6,k,a,k-6,a,e+f):u.splice(33,3,"L",a,c/2,l,k,a,c/2,a,e+f):k&&k>c&&l>a+A&&l<a+b-A?u.splice(23,3,"L",l+6,e+c,l,e+c+6,l-6,e+c,a+f,e+c):k&&0>k&&l>a+A&&l<a+b-A&&u.splice(3,3,"L",l-6,e,l,e-6,l+6,e,b-f,e);return u}},clipRect:function(a,e,b,c){var k=d.uniqueKey()+"-",f=this.createElement("clipPath").attr({id:k}).add(this.defs);a=this.rect(a,e,b,c,0).add(f);a.id=k;a.clipPath=f;a.count=0;return a},text:function(a,e,b,c){var k={};if(c&&
(this.allowHTML||!this.forExport))return this.html(a,e,b);k.x=Math.round(e||0);b&&(k.y=Math.round(b));E(a)&&(k.text=a);a=this.createElement("text").attr(k);c||(a.xSetter=function(a,e,b){var c=b.getElementsByTagName("tspan"),k=b.getAttribute(e),f;for(f=0;f<c.length;f++){var A=c[f];A.getAttribute(e)===k&&A.setAttribute(e,a)}b.setAttribute(e,a)});return a},fontMetrics:function(a,e){a=!this.styledMode&&/px/.test(a)||!U.getComputedStyle?a||e&&e.style&&e.style.fontSize||this.style&&this.style.fontSize:
e&&P.prototype.getStyle.call(e,"font-size");a=/px/.test(a)?w(a):12;e=24>a?a+3:Math.round(1.2*a);return{h:e,b:Math.round(.8*e),f:a}},rotCorr:function(a,e,b){var c=a;e&&b&&(c=Math.max(c*Math.cos(e*t),4));return{x:-a/3*Math.sin(e*t),y:c}},label:function(a,e,b,c,k,f,l,u,J){var h=this,n=h.styledMode,t=h.g("button"!==J&&"label"),L=t.text=h.text("",0,0,l).attr({zIndex:1}),d,r,G=0,Q=3,q=0,m,I,w,N,g,V={},p,ba,z=/^url\((.*?)\)$/.test(c),U=n||z,x=function(){return n?d.strokeWidth()%2/2:(p?parseInt(p,10):0)%
2/2};J&&t.addClass("highcharts-"+J);var O=function(){var a=L.element.style,e={};r=("undefined"===typeof m||"undefined"===typeof I||g)&&E(L.textStr)&&L.getBBox();t.width=(m||r.width||0)+2*Q+q;t.height=(I||r.height||0)+2*Q;ba=Q+Math.min(h.fontMetrics(a&&a.fontSize,L).b,r?r.height:Infinity);U&&(d||(t.box=d=h.symbols[c]||z?h.symbol(c):h.rect(),d.addClass(("button"===J?"":"highcharts-label-box")+(J?" highcharts-"+J+"-box":"")),d.add(t),a=x(),e.x=a,e.y=(u?-ba:0)+a),e.width=Math.round(t.width),e.height=
Math.round(t.height),d.attr(v(e,V)),V={})};var ca=function(){var a=q+Q;var e=u?0:ba;E(m)&&r&&("center"===g||"right"===g)&&(a+={center:.5,right:1}[g]*(m-r.width));if(a!==L.x||e!==L.y)L.attr("x",a),L.hasBoxWidthChanged&&(r=L.getBBox(!0),O()),"undefined"!==typeof e&&L.attr("y",e);L.x=a;L.y=e};var C=function(a,e){d?d.attr(a,e):V[a]=e};t.onAdd=function(){L.add(t);t.attr({text:a||0===a?a:"",x:e,y:b});d&&E(k)&&t.attr({anchorX:k,anchorY:f})};t.widthSetter=function(a){m=B(a)?a:null};t.heightSetter=function(a){I=
a};t["text-alignSetter"]=function(a){g=a};t.paddingSetter=function(a){E(a)&&a!==Q&&(Q=t.padding=a,ca())};t.paddingLeftSetter=function(a){E(a)&&a!==q&&(q=a,ca())};t.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==G&&(G=a,r&&t.attr({x:w}))};t.textSetter=function(a){"undefined"!==typeof a&&L.attr({text:a});O();ca()};t["stroke-widthSetter"]=function(a,e){a&&(U=!0);p=this["stroke-width"]=a;C(e,a)};n?t.rSetter=function(a,e){C(e,a)}:t.strokeSetter=t.fillSetter=t.rSetter=function(a,e){"r"!==e&&
("fill"===e&&a&&(U=!0),t[e]=a);C(e,a)};t.anchorXSetter=function(a,e){k=t.anchorX=a;C(e,Math.round(a)-x()-w)};t.anchorYSetter=function(a,e){f=t.anchorY=a;C(e,a-N)};t.xSetter=function(a){t.x=a;G&&(a-=G*((m||r.width)+2*Q),t["forceAnimate:x"]=!0);w=Math.round(a);t.attr("translateX",w)};t.ySetter=function(a){N=t.y=Math.round(a);t.attr("translateY",N)};var T=t.css;l={css:function(a){if(a){var e={};a=H(a);t.textProps.forEach(function(b){"undefined"!==typeof a[b]&&(e[b]=a[b],delete a[b])});L.css(e);"width"in
e&&O();"fontSize"in e&&(O(),ca())}return T.call(t,a)},getBBox:function(){return{width:r.width+2*Q,height:r.height+2*Q,x:r.x-Q,y:r.y-Q}},destroy:function(){A(t.element,"mouseenter");A(t.element,"mouseleave");L&&(L=L.destroy());d&&(d=d.destroy());P.prototype.destroy.call(t);t=h=O=ca=C=null}};n||(l.shadow=function(a){a&&(O(),d&&d.shadow(a));return t});return v(t,l)}});d.Renderer=g});K(y,"parts/Html.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.attr,F=g.defined,E=g.extend,
D=g.pick,x=g.pInt,v=d.createElement,C=d.css,B=d.isFirefox,p=d.isMS,z=d.isWebKit,m=d.SVGElement;g=d.SVGRenderer;var q=d.win;E(m.prototype,{htmlCss:function(d){var h="SPAN"===this.element.tagName&&d&&"width"in d,f=D(h&&d.width,void 0);if(h){delete d.width;this.textWidth=f;var c=!0}d&&"ellipsis"===d.textOverflow&&(d.whiteSpace="nowrap",d.overflow="hidden");this.styles=E(this.styles,d);C(this.element,d);c&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var d=this.element;return{x:d.offsetLeft,
y:d.offsetTop,width:d.offsetWidth,height:d.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var d=this.renderer,h=this.element,f=this.translateX||0,c=this.translateY||0,b=this.x||0,a=this.y||0,l=this.textAlign||"left",n={left:0,center:.5,right:1}[l],t=this.styles,q=t&&t.whiteSpace;C(h,{marginLeft:f,marginTop:c});!d.styledMode&&this.shadows&&this.shadows.forEach(function(a){C(a,{marginLeft:f+1,marginTop:c+1})});this.inverted&&[].forEach.call(h.childNodes,function(a){d.invertChild(a,h)});
if("SPAN"===h.tagName){t=this.rotation;var r=this.textWidth&&x(this.textWidth),e=[t,l,h.innerHTML,this.textWidth,this.textAlign].join(),k;(k=r!==this.oldTextWidth)&&!(k=r>this.oldTextWidth)&&((k=this.textPxLength)||(C(h,{width:"",whiteSpace:q||"nowrap"}),k=h.offsetWidth),k=k>r);k&&(/[ \-]/.test(h.textContent||h.innerText)||"ellipsis"===h.style.textOverflow)?(C(h,{width:r+"px",display:"block",whiteSpace:q||"normal"}),this.oldTextWidth=r,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;e!==this.cTT&&
(q=d.fontMetrics(h.style.fontSize,h).b,!F(t)||t===(this.oldRotation||0)&&l===this.oldAlign||this.setSpanRotation(t,n,q),this.getSpanCorrection(!F(t)&&this.textPxLength||h.offsetWidth,q,n,t,l));C(h,{left:b+(this.xCorr||0)+"px",top:a+(this.yCorr||0)+"px"});this.cTT=e;this.oldRotation=t;this.oldAlign=l}}else this.alignOnAdd=!0},setSpanRotation:function(d,h,f){var c={},b=this.renderer.getTransformKey();c[b]=c.transform="rotate("+d+"deg)";c[b+(B?"Origin":"-origin")]=c.transformOrigin=100*h+"% "+f+"px";
C(this.element,c)},getSpanCorrection:function(d,h,f){this.xCorr=-d*f;this.yCorr=-h}});E(g.prototype,{getTransformKey:function(){return p&&!/Edge/.test(q.navigator.userAgent)?"-ms-transform":z?"-webkit-transform":B?"MozTransform":q.opera?"-o-transform":""},html:function(d,h,f){var c=this.createElement("span"),b=c.element,a=c.renderer,l=a.isSVG,n=function(a,b){["opacity","visibility"].forEach(function(c){a[c+"Setter"]=function(e,k,f){var l=a.div?a.div.style:b;m.prototype[c+"Setter"].call(this,e,k,f);
l&&(l[k]=e)}});a.addedSetters=!0};c.textSetter=function(a){a!==b.innerHTML&&(delete this.bBox,delete this.oldTextWidth);this.textStr=a;b.innerHTML=D(a,"");c.doTransform=!0};l&&n(c,c.element.style);c.xSetter=c.ySetter=c.alignSetter=c.rotationSetter=function(a,b){"align"===b&&(b="textAlign");c[b]=a;c.doTransform=!0};c.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};c.attr({text:d,x:Math.round(h),y:Math.round(f)}).css({position:"absolute"});a.styledMode||c.css({fontFamily:this.style.fontFamily,
fontSize:this.style.fontSize});b.style.whiteSpace="nowrap";c.css=c.htmlCss;l&&(c.add=function(f){var l=a.box.parentNode,h=[];if(this.parentGroup=f){var e=f.div;if(!e){for(;f;)h.push(f),f=f.parentGroup;h.reverse().forEach(function(a){function b(e,b){a[b]=e;"translateX"===b?f.left=e+"px":f.top=e+"px";a.doTransform=!0}var k=M(a.element,"class");e=a.div=a.div||v("div",k?{className:k}:void 0,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,
pointerEvents:a.styles&&a.styles.pointerEvents},e||l);var f=e.style;E(a,{classSetter:function(a){return function(e){this.element.setAttribute("class",e);a.className=e}}(e),on:function(){h[0].div&&c.on.apply({element:h[0].div},arguments);return a},translateXSetter:b,translateYSetter:b});a.addedSetters||n(a)})}}else e=l;e.appendChild(b);c.added=!0;c.alignOnAdd&&c.htmlUpdateTransform();return c});return c}})});K(y,"parts/Time.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.defined,
F=g.extend,E=g.isObject,D=g.objectEach,x=g.pad,v=g.pick,C=g.splat,B=d.merge,p=d.timeUnits,z=d.win;d.Time=function(d){this.update(d,!1)};d.Time.prototype={defaultOptions:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},update:function(d){var q=v(d&&d.useUTC,!0),m=this;this.options=d=B(!0,this.options||{},d);this.Date=d.Date||z.Date||Date;this.timezoneOffset=(this.useUTC=q)&&d.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();(this.variableTimezone=
!(q&&!d.getTimezoneOffset&&!d.timezone))||this.timezoneOffset?(this.get=function(h,f){var c=f.getTime(),b=c-m.getTimezoneOffset(f);f.setTime(b);h=f["getUTC"+h]();f.setTime(c);return h},this.set=function(h,f,c){if("Milliseconds"===h||"Seconds"===h||"Minutes"===h&&0===f.getTimezoneOffset()%60)f["set"+h](c);else{var b=m.getTimezoneOffset(f);b=f.getTime()-b;f.setTime(b);f["setUTC"+h](c);h=m.getTimezoneOffset(f);b=f.getTime()+h;f.setTime(b)}}):q?(this.get=function(h,f){return f["getUTC"+h]()},this.set=
function(h,f,c){return f["setUTC"+h](c)}):(this.get=function(h,f){return f["get"+h]()},this.set=function(h,f,c){return f["set"+h](c)})},makeTime:function(m,q,g,h,f,c){if(this.useUTC){var b=this.Date.UTC.apply(0,arguments);var a=this.getTimezoneOffset(b);b+=a;var l=this.getTimezoneOffset(b);a!==l?b+=l-a:a-36E5!==this.getTimezoneOffset(b-36E5)||d.isSafari||(b-=36E5)}else b=(new this.Date(m,q,v(g,1),v(h,0),v(f,0),v(c,0))).getTime();return b},timezoneOffsetFunction:function(){var m=this,q=this.options,
g=z.moment;if(!this.useUTC)return function(h){return 6E4*(new Date(h)).getTimezoneOffset()};if(q.timezone){if(g)return function(h){return 6E4*-g.tz(h,q.timezone).utcOffset()};d.error(25)}return this.useUTC&&q.getTimezoneOffset?function(h){return 6E4*q.getTimezoneOffset(h)}:function(){return 6E4*(m.timezoneOffset||0)}},dateFormat:function(m,q,g){if(!M(q)||isNaN(q))return d.defaultOptions.lang.invalidDate||"";m=v(m,"%Y-%m-%d %H:%M:%S");var h=this,f=new this.Date(q),c=this.get("Hours",f),b=this.get("Day",
f),a=this.get("Date",f),l=this.get("Month",f),n=this.get("FullYear",f),t=d.defaultOptions.lang,I=t.weekdays,r=t.shortWeekdays;f=F({a:r?r[b]:I[b].substr(0,3),A:I[b],d:x(a),e:x(a,2," "),w:b,b:t.shortMonths[l],B:t.months[l],m:x(l+1),o:l+1,y:n.toString().substr(2,2),Y:n,H:x(c),k:c,I:x(c%12||12),l:c%12||12,M:x(h.get("Minutes",f)),p:12>c?"AM":"PM",P:12>c?"am":"pm",S:x(f.getSeconds()),L:x(Math.floor(q%1E3),3)},d.dateFormats);D(f,function(a,b){for(;-1!==m.indexOf("%"+b);)m=m.replace("%"+b,"function"===typeof a?
a.call(h,q):a)});return g?m.substr(0,1).toUpperCase()+m.substr(1):m},resolveDTLFormat:function(d){return E(d,!0)?d:(d=C(d),{main:d[0],from:d[1],to:d[2]})},getTimeTicks:function(d,q,g,h){var f=this,c=[],b={};var a=new f.Date(q);var l=d.unitRange,n=d.count||1,t;h=v(h,1);if(M(q)){f.set("Milliseconds",a,l>=p.second?0:n*Math.floor(f.get("Milliseconds",a)/n));l>=p.second&&f.set("Seconds",a,l>=p.minute?0:n*Math.floor(f.get("Seconds",a)/n));l>=p.minute&&f.set("Minutes",a,l>=p.hour?0:n*Math.floor(f.get("Minutes",
a)/n));l>=p.hour&&f.set("Hours",a,l>=p.day?0:n*Math.floor(f.get("Hours",a)/n));l>=p.day&&f.set("Date",a,l>=p.month?1:Math.max(1,n*Math.floor(f.get("Date",a)/n)));if(l>=p.month){f.set("Month",a,l>=p.year?0:n*Math.floor(f.get("Month",a)/n));var m=f.get("FullYear",a)}l>=p.year&&f.set("FullYear",a,m-m%n);l===p.week&&(m=f.get("Day",a),f.set("Date",a,f.get("Date",a)-m+h+(m<h?-7:0)));m=f.get("FullYear",a);h=f.get("Month",a);var r=f.get("Date",a),e=f.get("Hours",a);q=a.getTime();f.variableTimezone&&(t=g-
q>4*p.month||f.getTimezoneOffset(q)!==f.getTimezoneOffset(g));q=a.getTime();for(a=1;q<g;)c.push(q),q=l===p.year?f.makeTime(m+a*n,0):l===p.month?f.makeTime(m,h+a*n):!t||l!==p.day&&l!==p.week?t&&l===p.hour&&1<n?f.makeTime(m,h,r,e+a*n):q+l*n:f.makeTime(m,h,r+a*n*(l===p.day?1:7)),a++;c.push(q);l<=p.hour&&1E4>c.length&&c.forEach(function(a){0===a%18E5&&"000000000"===f.dateFormat("%H%M%S%L",a)&&(b[a]="day")})}c.info=F(d,{higherRanks:b,totalRange:l*n});return c}}});K(y,"parts/Options.js",[y["parts/Globals.js"]],
function(d){var g=d.color,M=d.merge;d.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),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:{},time:d.Time.prototype.defaultOptions,chart:{styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",
margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},
itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:d.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:d.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:g("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",
pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};d.setOptions=function(g){d.defaultOptions=M(!0,d.defaultOptions,g);(g.time||g.global)&&d.time.update(M(d.defaultOptions.global,d.defaultOptions.time,g.global,g.time));return d.defaultOptions};d.getOptions=function(){return d.defaultOptions};d.defaultPlotOptions=
d.defaultOptions.plotOptions;d.time=new d.Time(M(d.defaultOptions.global,d.defaultOptions.time));d.dateFormat=function(g,E,D){return d.time.dateFormat(g,E,D)};""});K(y,"parts/Tick.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.clamp,F=g.correctFloat,E=g.defined,D=g.destroyObjectProperties,x=g.extend,v=g.isNumber,C=g.objectEach,B=g.pick,p=d.fireEvent,z=d.merge,m=d.deg2rad;d.Tick=function(d,m,h,f,c){this.axis=d;this.pos=m;this.type=h||"";this.isNewLabel=this.isNew=!0;this.parameters=
c||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;h||f||this.addLabel()};d.Tick.prototype={addLabel:function(){var d=this,m=d.axis,h=m.options,f=m.chart,c=m.categories,b=m.names,a=d.pos,l=B(d.options&&d.options.labels,h.labels),n=m.tickPositions,t=a===n[0],g=a===n[n.length-1];b=this.parameters.category||(c?B(c[a],b[a],a):a);var r=d.label;c=(!l.step||1===l.step)&&1===m.tickInterval;n=n.info;var e,k;if(m.isDatetimeAxis&&n){var u=f.time.resolveDTLFormat(h.dateTimeLabelFormats[!h.grid&&
n.higherRanks[a]||n.unitName]);var H=u.main}d.isFirst=t;d.isLast=g;d.formatCtx={axis:m,chart:f,isFirst:t,isLast:g,dateTimeLabelFormat:H,tickPositionInfo:n,value:m.isLog?F(m.lin2log(b)):b,pos:a};h=m.labelFormatter.call(d.formatCtx,this.formatCtx);if(k=u&&u.list)d.shortenLabel=function(){for(e=0;e<k.length;e++)if(r.attr({text:m.labelFormatter.call(x(d.formatCtx,{dateTimeLabelFormat:k[e]}))}),r.getBBox().width<m.getSlotWidth(d)-2*B(l.padding,5))return;r.attr({text:""})};c&&m._addedPlotLB&&m.isXAxis&&
d.moveLabel(h,l);E(r)||d.movedLabel?r&&r.textStr!==h&&!c&&(!r.textWidth||l.style&&l.style.width||r.styles.width||r.css({width:null}),r.attr({text:h}),r.textPxLength=r.getBBox().width):(d.label=r=d.createLabel({x:0,y:0},h,l),d.rotation=0)},moveLabel:function(d,m){var h=this,f=h.label,c=!1,b=h.axis,a=b.reversed,l=b.chart.inverted;f&&f.textStr===d?(h.movedLabel=f,c=!0,delete h.label):C(b.ticks,function(a){c||a.isNew||a===h||!a.label||a.label.textStr!==d||(h.movedLabel=a.label,c=!0,a.labelPos=h.movedLabel.xy,
delete a.label)});if(!c&&(h.labelPos||f)){var n=h.labelPos||f.xy;f=l?n.x:a?0:b.width+b.left;b=l?a?b.width+b.left:0:n.y;h.movedLabel=h.createLabel({x:f,y:b},d,m);h.movedLabel&&h.movedLabel.attr({opacity:0})}},createLabel:function(d,m,h){var f=this.axis,c=f.chart;if(d=E(m)&&h.enabled?c.renderer.text(m,d.x,d.y,h.useHTML).add(f.labelGroup):null)c.styledMode||d.css(z(h.style)),d.textPxLength=d.getBBox().width;return d},replaceMovedLabel:function(){var d=this.label,m=this.axis,h=m.reversed,f=this.axis.chart.inverted;
if(d&&!this.isNew){var c=f?d.xy.x:h?m.left:m.width+m.left;h=f?h?m.width+m.top:m.top:d.xy.y;d.animate({x:c,y:h,opacity:0},void 0,d.destroy);delete this.label}m.isDirty=!0;this.label=this.movedLabel;delete this.movedLabel},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(d){var g=this.axis,h=g.options.labels,f=d.x,c=g.chart.chartWidth,b=g.chart.spacing,a=B(g.labelLeft,Math.min(g.pos,b[3]));b=B(g.labelRight,Math.max(g.isRadial?
0:g.pos+g.len,c-b[1]));var l=this.label,n=this.rotation,t={left:0,center:.5,right:1}[g.labelAlign||l.attr("align")],q=l.getBBox().width,r=g.getSlotWidth(this),e=r,k=1,u,H={};if(n||"justify"!==B(h.overflow,"justify"))0>n&&f-t*q<a?u=Math.round(f/Math.cos(n*m)-a):0<n&&f+t*q>b&&(u=Math.round((c-f)/Math.cos(n*m)));else if(c=f+(1-t)*q,f-t*q<a?e=d.x+e*(1-t)-a:c>b&&(e=b-d.x+e*t,k=-1),e=Math.min(r,e),e<r&&"center"===g.labelAlign&&(d.x+=k*(r-e-t*(r-Math.min(q,e)))),q>e||g.autoRotation&&(l.styles||{}).width)u=
e;u&&(this.shortenLabel?this.shortenLabel():(H.width=Math.floor(u),(h.style||{}).textOverflow||(H.textOverflow="ellipsis"),l.css(H)))},getPosition:function(d,m,h,f){var c=this.axis,b=c.chart,a=f&&b.oldChartHeight||b.chartHeight;d={x:d?F(c.translate(m+h,null,null,f)+c.transB):c.left+c.offset+(c.opposite?(f&&b.oldChartWidth||b.chartWidth)-c.right-c.left:0),y:d?a-c.bottom+c.offset-(c.opposite?c.height:0):F(a-c.translate(m+h,null,null,f)-c.transB)};d.y=M(d.y,-1E5,1E5);p(this,"afterGetPosition",{pos:d});
return d},getLabelPosition:function(d,g,h,f,c,b,a,l){var n=this.axis,t=n.transA,q=n.isLinked&&n.linkedParent?n.linkedParent.reversed:n.reversed,r=n.staggerLines,e=n.tickRotCorr||{x:0,y:0},k=c.y,u=f||n.reserveSpaceDefault?0:-n.labelOffset*("center"===n.labelAlign?.5:1),H={};E(k)||(k=0===n.side?h.rotation?-8:-h.getBBox().height:2===n.side?e.y+8:Math.cos(h.rotation*m)*(e.y-h.getBBox(!1,0).height/2));d=d+c.x+u+e.x-(b&&f?b*t*(q?-1:1):0);g=g+k-(b&&!f?b*t*(q?1:-1):0);r&&(h=a/(l||1)%r,n.opposite&&(h=r-h-
1),g+=n.labelOffset/r*h);H.x=d;H.y=Math.round(g);p(this,"afterGetLabelPosition",{pos:H,tickmarkOffset:b,index:a});return H},getMarkPath:function(d,m,h,f,c,b){return b.crispLine(["M",d,m,"L",d+(c?0:-h),m+(c?h:0)],f)},renderGridLine:function(d,m,h){var f=this.axis,c=f.options,b=this.gridLine,a={},l=this.pos,n=this.type,t=B(this.tickmarkOffset,f.tickmarkOffset),g=f.chart.renderer,r=n?n+"Grid":"grid",e=c[r+"LineWidth"],k=c[r+"LineColor"];c=c[r+"LineDashStyle"];b||(f.chart.styledMode||(a.stroke=k,a["stroke-width"]=
e,c&&(a.dashstyle=c)),n||(a.zIndex=1),d&&(m=0),this.gridLine=b=g.path().attr(a).addClass("highcharts-"+(n?n+"-":"")+"grid-line").add(f.gridGroup));if(b&&(h=f.getPlotLinePath({value:l+t,lineWidth:b.strokeWidth()*h,force:"pass",old:d})))b[d||this.isNew?"attr":"animate"]({d:h,opacity:m})},renderMark:function(d,m,h){var f=this.axis,c=f.options,b=f.chart.renderer,a=this.type,l=a?a+"Tick":"tick",n=f.tickSize(l),t=this.mark,g=!t,r=d.x;d=d.y;var e=B(c[l+"Width"],!a&&f.isXAxis?1:0);c=c[l+"Color"];n&&(f.opposite&&
(n[0]=-n[0]),g&&(this.mark=t=b.path().addClass("highcharts-"+(a?a+"-":"")+"tick").add(f.axisGroup),f.chart.styledMode||t.attr({stroke:c,"stroke-width":e})),t[g?"attr":"animate"]({d:this.getMarkPath(r,d,n[0],t.strokeWidth()*h,f.horiz,b),opacity:m}))},renderLabel:function(d,m,h,f){var c=this.axis,b=c.horiz,a=c.options,l=this.label,n=a.labels,t=n.step;c=B(this.tickmarkOffset,c.tickmarkOffset);var g=!0,r=d.x;d=d.y;l&&v(r)&&(l.xy=d=this.getLabelPosition(r,d,l,b,n,c,f,t),this.isFirst&&!this.isLast&&!B(a.showFirstLabel,
1)||this.isLast&&!this.isFirst&&!B(a.showLastLabel,1)?g=!1:!b||n.step||n.rotation||m||0===h||this.handleOverflow(d),t&&f%t&&(g=!1),g&&v(d.y)?(d.opacity=h,l[this.isNewLabel?"attr":"animate"](d),this.isNewLabel=!1):(l.attr("y",-9999),this.isNewLabel=!0))},render:function(m,g,h){var f=this.axis,c=f.horiz,b=this.pos,a=B(this.tickmarkOffset,f.tickmarkOffset);b=this.getPosition(c,b,a,g);a=b.x;var l=b.y;f=c&&a===f.pos+f.len||!c&&l===f.pos?-1:1;h=B(h,1);this.isActive=!0;this.renderGridLine(g,h,f);this.renderMark(b,
h,f);this.renderLabel(b,g,h,m);this.isNew=!1;d.fireEvent(this,"afterRender")},destroy:function(){D(this,this.axis)}}});K(y,"parts/Axis.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.animObject,F=g.arrayMax,E=g.arrayMin,D=g.clamp,x=g.correctFloat,v=g.defined,C=g.destroyObjectProperties,B=g.extend,p=g.isArray,z=g.isNumber,m=g.isString,q=g.objectEach,w=g.pick,h=g.relativeLength,f=g.splat,c=g.syncTimeout,b=d.addEvent,a=d.color,l=d.defaultOptions,n=d.deg2rad,t=d.fireEvent,I=
d.format,r=d.getMagnitude,e=d.merge,k=d.normalizeTickInterval,u=d.removeEvent,H=d.seriesTypes,G=d.Tick;g=function(){this.init.apply(this,arguments)};B(g.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",
fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,
showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){var a=this.axis.chart.numberFormatter;return a(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],
x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(a,e){var c=e.isX,k=this;k.chart=a;k.horiz=a.inverted&&!k.isZAxis?!c:c;k.isXAxis=c;k.coll=k.coll||(c?"xAxis":"yAxis");t(this,"init",{userOptions:e});k.opposite=e.opposite;k.side=e.side||(k.horiz?k.opposite?0:2:k.opposite?1:3);k.setOptions(e);var A=this.options,l=A.type;k.labelFormatter=A.labels.formatter||k.defaultLabelFormatter;k.userOptions=e;k.minPixelPadding=0;k.reversed=
A.reversed;k.visible=!1!==A.visible;k.zoomEnabled=!1!==A.zoomEnabled;k.hasNames="category"===l||!0===A.categories;k.categories=A.categories||k.hasNames;k.names||(k.names=[],k.names.keys={});k.plotLinesAndBandsGroups={};k.isLog="logarithmic"===l;k.isDatetimeAxis="datetime"===l;k.positiveValuesOnly=k.isLog&&!k.allowNegativeLog;k.isLinked=v(A.linkedTo);k.ticks={};k.labelEdge=[];k.minorTicks={};k.plotLinesAndBands=[];k.alternateBands={};k.len=0;k.minRange=k.userMinRange=A.minRange||A.maxZoom;k.range=
A.range;k.offset=A.offset||0;k.stacks={};k.oldStacks={};k.stacksTouched=0;k.max=null;k.min=null;k.crosshair=w(A.crosshair,f(a.options.tooltip.crosshairs)[c?0:1],!1);e=k.options.events;-1===a.axes.indexOf(k)&&(c?a.axes.splice(a.xAxis.length,0,k):a.axes.push(k),a[k.coll].push(k));k.series=k.series||[];a.inverted&&!k.isZAxis&&c&&"undefined"===typeof k.reversed&&(k.reversed=!0);q(e,function(a,e){d.isFunction(a)&&b(k,e,a)});k.lin2log=A.linearToLogConverter||k.lin2log;k.isLog&&(k.val2lin=k.log2lin,k.lin2val=
k.lin2log);t(this,"afterInit")},setOptions:function(a){this.options=e(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e(l[this.coll],a));t(this,"afterSetOptions",{userOptions:a})},defaultLabelFormatter:function(){var a=this.axis,e=this.value,b=a.chart.time,c=a.categories,k=this.dateTimeLabelFormat,f=l.lang,u=f.numericSymbols;f=f.numericSymbolMagnitude||1E3;
var d=u&&u.length,h=a.options.labels.format;a=a.isLog?Math.abs(e):a.tickInterval;var t=this.chart,n=t.numberFormatter;if(h)var r=I(h,this,t);else if(c)r=e;else if(k)r=b.dateFormat(k,e);else if(d&&1E3<=a)for(;d--&&"undefined"===typeof r;)b=Math.pow(f,d+1),a>=b&&0===10*e%b&&null!==u[d]&&0!==e&&(r=n(e/b,-1)+u[d]);"undefined"===typeof r&&(r=1E4<=Math.abs(e)?n(e,-1):n(e,-1,void 0,""));return r},getSeriesExtremes:function(){var a=this,e=a.chart,b;t(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=
!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();a.series.forEach(function(c){if(c.visible||!e.options.chart.ignoreHiddenSeries){var k=c.options,f=k.threshold;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=f&&(f=null);if(a.isXAxis){if(k=c.xData,k.length){b=c.getXExtremes(k);var A=b.min;var l=b.max;z(A)||A instanceof Date||(k=k.filter(z),b=c.getXExtremes(k),A=b.min,l=b.max);k.length&&(a.dataMin=Math.min(w(a.dataMin,A),A),a.dataMax=Math.max(w(a.dataMax,
l),l))}}else if(c.getExtremes(),l=c.dataMax,A=c.dataMin,v(A)&&v(l)&&(a.dataMin=Math.min(w(a.dataMin,A),A),a.dataMax=Math.max(w(a.dataMax,l),l)),v(f)&&(a.threshold=f),!k.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});t(this,"afterGetSeriesExtremes")},translate:function(a,e,b,c,k,f){var A=this.linkedParent||this,l=1,u=0,J=c?A.oldTransA:A.transA;c=c?A.oldMin:A.min;var d=A.minPixelPadding;k=(A.isOrdinal||A.isBroken||A.isLog&&k)&&A.lin2val;J||(J=A.transA);b&&(l*=-1,u=A.len);A.reversed&&(l*=
-1,u-=l*(A.sector||A.len));e?(a=(a*l+u-d)/J+c,k&&(a=A.lin2val(a))):(k&&(a=A.val2lin(a)),a=z(c)?l*(a-c)*J+u+l*d+(z(f)?J*f:0):void 0);return a},toPixels:function(a,e){return this.translate(a,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(a,e){return this.translate(a-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a){var e=this,b=e.chart,c=e.left,k=e.top,f=a.old,A=a.value,l=a.translatedValue,u=a.lineWidth,d=a.force,h,n,r,H,G=f&&b.oldChartHeight||b.chartHeight,m=f&&b.oldChartWidth||
b.chartWidth,g,q=e.transB,I=function(a,e,b){if("pass"!==d&&a<e||a>b)d?a=D(a,e,b):g=!0;return a};a={value:A,lineWidth:u,old:f,force:d,acrossPanes:a.acrossPanes,translatedValue:l};t(this,"getPlotLinePath",a,function(a){l=w(l,e.translate(A,null,null,f));l=D(l,-1E5,1E5);h=r=Math.round(l+q);n=H=Math.round(G-l-q);z(l)?e.horiz?(n=k,H=G-e.bottom,h=r=I(h,c,c+e.width)):(h=c,r=m-e.right,n=H=I(n,k,k+e.height)):(g=!0,d=!1);a.path=g&&!d?null:b.renderer.crispLine(["M",h,n,"L",r,H],u||1)});return a.path},getLinearTickPositions:function(a,
e,b){var c=x(Math.floor(e/a)*a);b=x(Math.ceil(b/a)*a);var k=[],f;x(c+a)===c&&(f=20);if(this.single)return[e];for(e=c;e<=b;){k.push(e);e=x(e+a,f);if(e===l)break;var l=e}return k},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?w(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a=this,e=a.options,b=a.tickPositions,c=a.minorTickInterval,k=[],f=a.pointRangePadding||0,l=a.min-f;f=a.max+f;var u=f-l;if(u&&u/c<a.len/3)if(a.isLog)this.paddedTicks.forEach(function(e,
b,f){b&&k.push.apply(k,a.getLogTickPositions(c,f[b-1],f[b],!0))});else if(a.isDatetimeAxis&&"auto"===this.getMinorTickInterval())k=k.concat(a.getTimeTicks(a.normalizeTimeTickInterval(c),l,f,e.startOfWeek));else for(e=l+(b[0]-l)%c;e<=f&&e!==k[0];e+=c)k.push(e);0!==k.length&&a.trimTicks(k);return k},adjustForMinRange:function(){var a=this.options,e=this.min,b=this.max,c,k,f,l,u;this.isXAxis&&"undefined"===typeof this.minRange&&!this.isLog&&(v(a.min)||v(a.max)?this.minRange=null:(this.series.forEach(function(a){l=
a.xData;for(k=u=a.xIncrement?1:l.length-1;0<k;k--)if(f=l[k]-l[k-1],"undefined"===typeof c||f<c)c=f}),this.minRange=Math.min(5*c,this.dataMax-this.dataMin)));if(b-e<this.minRange){var d=this.dataMax-this.dataMin>=this.minRange;var h=this.minRange;var t=(h-b+e)/2;t=[e-t,w(a.min,e-t)];d&&(t[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin);e=F(t);b=[e+h,w(a.max,e+h)];d&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax);b=E(b);b-e<h&&(t[0]=b-h,t[1]=w(a.min,b-h),e=F(t))}this.min=e;this.max=
b},getClosest:function(){var a;this.categories?a=1:this.series.forEach(function(e){var b=e.closestPointRange,c=e.visible||!e.chart.options.chart.ignoreHiddenSeries;!e.noSharedTooltip&&v(b)&&c&&(a=v(a)?Math.min(a,b):b)});return a},nameToX:function(a){var e=p(this.categories),b=e?this.categories:this.names,c=a.options.x;a.series.requireSorting=!1;v(c)||(c=!1===this.options.uniqueNames?a.series.autoIncrement():e?b.indexOf(a.name):w(b.keys[a.name],-1));if(-1===c){if(!e)var k=b.length}else k=c;"undefined"!==
typeof k&&(this.names[k]=a.name,this.names.keys[a.name]=k);return k},updateNames:function(){var a=this,e=this.names;0<e.length&&(Object.keys(e.keys).forEach(function(a){delete e.keys[a]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(e){e.xIncrement=null;if(!e.points||e.isDirtyData)a.max=Math.max(a.max,e.xData.length-1),e.processData(),e.generatePoints();e.data.forEach(function(b,c){if(b&&b.options&&"undefined"!==typeof b.name){var k=a.nameToX(b);"undefined"!==typeof k&&
k!==b.x&&(b.x=k,e.xData[c]=k)}})}))},setAxisTranslation:function(a){var e=this,b=e.max-e.min,c=e.axisPointRange||0,k=0,f=0,l=e.linkedParent,u=!!e.categories,A=e.transA,d=e.isXAxis;if(d||u||c){var h=e.getClosest();l?(k=l.minPointOffset,f=l.pointRangePadding):e.series.forEach(function(a){var b=u?1:d?w(a.options.pointRange,h,0):e.axisPointRange||0,l=a.options.pointPlacement;c=Math.max(c,b);if(!e.single||u)a=H.xrange&&a instanceof H.xrange?!d:d,k=Math.max(k,a&&m(l)?0:b/2),f=Math.max(f,a&&"on"===l?0:b)});
l=e.ordinalSlope&&h?e.ordinalSlope/h:1;e.minPointOffset=k*=l;e.pointRangePadding=f*=l;e.pointRange=Math.min(c,e.single&&u?1:b);d&&(e.closestPointRange=h)}a&&(e.oldTransA=A);e.translationSlope=e.transA=A=e.staticScale||e.len/(b+f||1);e.transB=e.horiz?e.left:e.bottom;e.minPixelPadding=A*k;t(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(a){var e=this,b=e.chart,c=e.options,f=e.isLog,l=e.isDatetimeAxis,u=e.isXAxis,A=e.isLinked,h=c.maxPadding,
n=c.minPadding,H=c.tickInterval,G=c.tickPixelInterval,m=e.categories,g=z(e.threshold)?e.threshold:null,q=e.softThreshold;l||m||A||this.getTickAmount();var I=w(e.userMin,c.min);var p=w(e.userMax,c.max);if(A){e.linkedParent=b[e.coll][c.linkedTo];var C=e.linkedParent.getExtremes();e.min=w(C.min,C.dataMin);e.max=w(C.max,C.dataMax);c.type!==e.linkedParent.options.type&&d.error(11,1,b)}else{if(!q&&v(g))if(e.dataMin>=g)C=g,n=0;else if(e.dataMax<=g){var B=g;h=0}e.min=w(I,C,e.dataMin);e.max=w(p,B,e.dataMax)}f&&
(e.positiveValuesOnly&&!a&&0>=Math.min(e.min,w(e.dataMin,e.min))&&d.error(10,1,b),e.min=x(e.log2lin(e.min),16),e.max=x(e.log2lin(e.max),16));e.range&&v(e.max)&&(e.userMin=e.min=I=Math.max(e.dataMin,e.minFromRange()),e.userMax=p=e.max,e.range=null);t(e,"foundExtremes");e.beforePadding&&e.beforePadding();e.adjustForMinRange();!(m||e.axisPointRange||e.usePercentage||A)&&v(e.min)&&v(e.max)&&(b=e.max-e.min)&&(!v(I)&&n&&(e.min-=b*n),!v(p)&&h&&(e.max+=b*h));z(e.userMin)||(z(c.softMin)&&c.softMin<e.min&&
(e.min=I=c.softMin),z(c.floor)&&(e.min=Math.max(e.min,c.floor)));z(e.userMax)||(z(c.softMax)&&c.softMax>e.max&&(e.max=p=c.softMax),z(c.ceiling)&&(e.max=Math.min(e.max,c.ceiling)));q&&v(e.dataMin)&&(g=g||0,!v(I)&&e.min<g&&e.dataMin>=g?e.min=e.options.minRange?Math.min(g,e.max-e.minRange):g:!v(p)&&e.max>g&&e.dataMax<=g&&(e.max=e.options.minRange?Math.max(g,e.min+e.minRange):g));e.tickInterval=e.min===e.max||"undefined"===typeof e.min||"undefined"===typeof e.max?1:A&&!H&&G===e.linkedParent.options.tickPixelInterval?
H=e.linkedParent.tickInterval:w(H,this.tickAmount?(e.max-e.min)/Math.max(this.tickAmount-1,1):void 0,m?1:(e.max-e.min)*G/Math.max(e.len,G));u&&!a&&e.series.forEach(function(a){a.processData(e.min!==e.oldMin||e.max!==e.oldMax)});e.setAxisTranslation(!0);e.beforeSetTickPositions&&e.beforeSetTickPositions();e.postProcessTickInterval&&(e.tickInterval=e.postProcessTickInterval(e.tickInterval));e.pointRange&&!H&&(e.tickInterval=Math.max(e.pointRange,e.tickInterval));a=w(c.minTickInterval,e.isDatetimeAxis&&
e.closestPointRange);!H&&e.tickInterval<a&&(e.tickInterval=a);l||f||H||(e.tickInterval=k(e.tickInterval,null,r(e.tickInterval),w(c.allowDecimals,!(.5<e.tickInterval&&5>e.tickInterval&&1E3<e.max&&9999>e.max)),!!this.tickAmount));this.tickAmount||(e.tickInterval=e.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,e=a.tickPositions;var b=this.getMinorTickInterval();var c=a.tickPositioner,k=a.startOnTick,f=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===
a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===b&&this.tickInterval?this.tickInterval/5:b;this.single=this.min===this.max&&v(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=b=e&&e.slice();!b&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(b=[this.min,this.max],d.error(19,!1,this.chart)):b=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),b.length>this.len&&(b=[b[0],b.pop()],b[0]===b[1]&&(b.length=1)),this.tickPositions=b,c&&(c=c.apply(this,[this.min,this.max])))&&(this.tickPositions=b=c);this.paddedTicks=b.slice(0);this.trimTicks(b,k,f);this.isLinked||(this.single&&2>b.length&&!this.categories&&(this.min-=
.5,this.max+=.5),e||c||this.adjustTickAmount());t(this,"afterSetTickPositions")},trimTicks:function(a,e,b){var c=a[0],k=a[a.length-1],f=this.minPointOffset||0;t(this,"trimTicks");if(!this.isLinked){if(e&&-Infinity!==c)this.min=c;else for(;this.min-f>a[0];)a.shift();if(b)this.max=k;else for(;this.max+f<a[a.length-1];)a.pop();0===a.length&&v(c)&&!this.options.tickPositions&&a.push((k+c)/2)}},alignToOthers:function(){var a={},e,b=this.options;!1===this.chart.options.chart.alignTicks||!1===b.alignTicks||
!1===b.startOnTick||!1===b.endOnTick||this.isLog||this.chart[this.coll].forEach(function(b){var c=b.options;c=[b.horiz?c.left:c.top,c.width,c.height,c.pane].join();b.series.length&&(a[c]?e=!0:a[c]=1)});return e},getTickAmount:function(){var a=this.options,e=a.tickAmount,b=a.tickPixelInterval;!v(a.tickInterval)&&this.len<b&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(e=2);!e&&this.alignToOthers()&&(e=Math.ceil(this.len/b)+1);4>e&&(this.finalTickAmt=e,e=5);this.tickAmount=e},adjustTickAmount:function(){var a=
this.options,e=this.tickInterval,b=this.tickPositions,c=this.tickAmount,k=this.finalTickAmt,f=b&&b.length,l=w(this.threshold,this.softThreshold?0:null),u;if(this.hasData()){if(f<c){for(u=this.min;b.length<c;)b.length%2||u===l?b.push(x(b[b.length-1]+e)):b.unshift(x(b[0]-e));this.transA*=(f-1)/(c-1);this.min=a.startOnTick?b[0]:Math.min(this.min,b[0]);this.max=a.endOnTick?b[b.length-1]:Math.max(this.max,b[b.length-1])}else f>c&&(this.tickInterval*=2,this.setTickPositions());if(v(k)){for(e=a=b.length;e--;)(3===
k&&1===e%2||2>=k&&0<e&&e<a-1)&&b.splice(e,1);this.finalTickAmt=void 0}}},setScale:function(){var a=this.series.some(function(a){return a.isDirtyData||a.isDirty||a.xAxis&&a.xAxis.isDirty}),e;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();(e=this.len!==this.oldAxisLength)||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=e||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks();t(this,"afterSetScale")},setExtremes:function(a,e,b,c,k){var f=this,l=f.chart;b=w(b,!0);f.series.forEach(function(a){delete a.kdTree});k=B(k,{min:a,max:e});t(f,"setExtremes",k,function(){f.userMin=a;f.userMax=e;f.eventArgs=k;b&&l.redraw(c)})},zoom:function(a,e){var b=this.dataMin,c=this.dataMax,k=this.options,
f=Math.min(b,w(k.min,b)),l=Math.max(c,w(k.max,c));a={newMin:a,newMax:e};t(this,"zoom",a,function(a){var e=a.newMin,k=a.newMax;if(e!==this.min||k!==this.max)this.allowZoomOutside||(v(b)&&(e<f&&(e=f),e>l&&(e=l)),v(c)&&(k<f&&(k=f),k>l&&(k=l))),this.displayBtn="undefined"!==typeof e||"undefined"!==typeof k,this.setExtremes(e,k,!1,void 0,{trigger:"zoom"});a.zoomed=!0});return a.zoomed},setAxisSize:function(){var a=this.chart,e=this.options,b=e.offsets||[0,0,0,0],c=this.horiz,k=this.width=Math.round(h(w(e.width,
a.plotWidth-b[3]+b[1]),a.plotWidth)),f=this.height=Math.round(h(w(e.height,a.plotHeight-b[0]+b[2]),a.plotHeight)),l=this.top=Math.round(h(w(e.top,a.plotTop+b[0]),a.plotHeight,a.plotTop));e=this.left=Math.round(h(w(e.left,a.plotLeft+b[3]),a.plotWidth,a.plotLeft));this.bottom=a.chartHeight-f-l;this.right=a.chartWidth-k-e;this.len=Math.max(c?k:f,0);this.pos=c?e:l},getExtremes:function(){var a=this.isLog;return{min:a?x(this.lin2log(this.min)):this.min,max:a?x(this.lin2log(this.max)):this.max,dataMin:this.dataMin,
dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var e=this.isLog,b=e?this.lin2log(this.min):this.min;e=e?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=b:Infinity===a?a=e:b>a?a=b:e<a&&(a=e);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){var e=(w(a,0)-90*this.side+720)%360;a={align:"center"};t(this,"autoLabelAlign",a,function(a){15<e&&165>e?a.align="right":195<e&&345>e&&(a.align="left")});return a.align},tickSize:function(a){var e=
this.options,b=e[a+"Length"],c=w(e[a+"Width"],"tick"===a&&this.isXAxis&&!this.categories?1:0);if(c&&b){"inside"===e[a+"Position"]&&(b=-b);var k=[b,c]}a={tickSize:k};t(this,"afterTickSize",a);return a.tickSize},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,e=this.horiz,b=this.tickInterval,
c=b,k=this.len/(((this.categories?1:0)+this.max-this.min)/b),f,l=a.rotation,u=this.labelMetrics(),d,h=Number.MAX_VALUE,t,r=this.max-this.min,H=function(a){var e=a/(k||1);e=1<e?Math.ceil(e):1;e*b>r&&Infinity!==a&&Infinity!==k&&r&&(e=Math.ceil(r/b));return x(e*b)};e?(t=!a.staggerLines&&!a.step&&(v(l)?[l]:k<w(a.autoRotationLimit,80)&&a.autoRotation))&&t.forEach(function(a){if(a===l||a&&-90<=a&&90>=a){d=H(Math.abs(u.h/Math.sin(n*a)));var e=d+Math.abs(a/360);e<h&&(h=e,f=a,c=d)}}):a.step||(c=H(u.h));this.autoRotation=
t;this.labelRotation=w(f,l);return c},getSlotWidth:function(a){var e=this.chart,b=this.horiz,c=this.options.labels,k=Math.max(this.tickPositions.length-(this.categories?0:1),1),f=e.margin[3];return a&&a.slotWidth||b&&2>(c.step||0)&&!c.rotation&&(this.staggerLines||1)*this.len/k||!b&&(c.style&&parseInt(c.style.width,10)||f&&f-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var a=this.chart,e=a.renderer,b=this.tickPositions,c=this.ticks,k=this.options.labels,f=k&&k.style||{},l=this.horiz,
u=this.getSlotWidth(),d=Math.max(1,Math.round(u-2*(k.padding||5))),h={},t=this.labelMetrics(),n=k.style&&k.style.textOverflow,r=0;m(k.rotation)||(h.rotation=k.rotation||0);b.forEach(function(a){a=c[a];a.movedLabel&&a.replaceMovedLabel();a&&a.label&&a.label.textPxLength>r&&(r=a.label.textPxLength)});this.maxLabelLength=r;if(this.autoRotation)r>d&&r>t.h?h.rotation=this.labelRotation:this.labelRotation=0;else if(u){var H=d;if(!n){var G="clip";for(d=b.length;!l&&d--;){var g=b[d];if(g=c[g].label)g.styles&&
"ellipsis"===g.styles.textOverflow?g.css({textOverflow:"clip"}):g.textPxLength>u&&g.css({width:u+"px"}),g.getBBox().height>this.len/b.length-(t.h-t.f)&&(g.specificTextOverflow="ellipsis")}}}h.rotation&&(H=r>.5*a.chartHeight?.33*a.chartHeight:r,n||(G="ellipsis"));if(this.labelAlign=k.align||this.autoLabelAlign(this.labelRotation))h.align=this.labelAlign;b.forEach(function(a){var e=(a=c[a])&&a.label,b=f.width,k={};e&&(e.attr(h),a.shortenLabel?a.shortenLabel():H&&!b&&"nowrap"!==f.whiteSpace&&(H<e.textPxLength||
"SPAN"===e.element.tagName)?(k.width=H,n||(k.textOverflow=e.specificTextOverflow||G),e.css(k)):e.styles&&e.styles.width&&!k.width&&!b&&e.css({width:null}),delete e.specificTextOverflow,a.rotation=h.rotation)},this);this.tickRotCorr=e.rotCorr(t.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.series.some(function(a){return a.hasData()})||this.options.showEmpty&&v(this.min)&&v(this.max)},addTitle:function(a){var b=this.chart.renderer,c=this.horiz,k=this.opposite,f=this.options.title,
l,u=this.chart.styledMode;this.axisTitle||((l=f.textAlign)||(l=(c?{low:"left",middle:"center",high:"right"}:{low:k?"right":"left",middle:"center",high:k?"left":"right"})[f.align]),this.axisTitle=b.text(f.text,0,0,f.useHTML).attr({zIndex:7,rotation:f.rotation||0,align:l}).addClass("highcharts-axis-title"),u||this.axisTitle.css(e(f.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0);u||f.style.width||this.isRadial||this.axisTitle.css({width:this.len});this.axisTitle[a?"show":"hide"](a)},
generateTick:function(a){var e=this.ticks;e[a]?e[a].addLabel():e[a]=new G(this,a)},getOffset:function(){var a=this,e=a.chart,b=e.renderer,c=a.options,k=a.tickPositions,f=a.ticks,l=a.horiz,u=a.side,d=e.inverted&&!a.isZAxis?[1,0,3,2][u]:u,h,n=0,r=0,H=c.title,G=c.labels,g=0,m=e.axisOffset;e=e.clipOffset;var I=[-1,1,1,-1][u],p=c.className,z=a.axisParent;var x=a.hasData();a.showAxis=h=x||w(c.showEmpty,!0);a.staggerLines=a.horiz&&G.staggerLines;a.axisGroup||(a.gridGroup=b.g("grid").attr({zIndex:c.gridZIndex||
1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(p||"")).add(z),a.axisGroup=b.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(p||"")).add(z),a.labelGroup=b.g("axis-labels").attr({zIndex:G.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(p||"")).add(z));x||a.isLinked?(k.forEach(function(e,b){a.generateTick(e,b)}),a.renderUnsquish(),a.reserveSpaceDefault=0===u||2===u||{1:"left",3:"right"}[u]===a.labelAlign,w(G.reserveSpace,"center"===
a.labelAlign?!0:null,a.reserveSpaceDefault)&&k.forEach(function(a){g=Math.max(f[a].getLabelSize(),g)}),a.staggerLines&&(g*=a.staggerLines),a.labelOffset=g*(a.opposite?-1:1)):q(f,function(a,e){a.destroy();delete f[e]});if(H&&H.text&&!1!==H.enabled&&(a.addTitle(h),h&&!1!==H.reserveSpace)){a.titleOffset=n=a.axisTitle.getBBox()[l?"height":"width"];var C=H.offset;r=v(C)?0:w(H.margin,l?5:10)}a.renderLine();a.offset=I*w(c.offset,m[u]?m[u]+(c.margin||0):0);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};b=0===u?-a.labelMetrics().h:
2===u?a.tickRotCorr.y:0;r=Math.abs(g)+r;g&&(r=r-b+I*(l?w(G.y,a.tickRotCorr.y+8*I):G.x));a.axisTitleMargin=w(C,r);a.getMaxLabelDimensions&&(a.maxLabelDimensions=a.getMaxLabelDimensions(f,k));l=this.tickSize("tick");m[u]=Math.max(m[u],a.axisTitleMargin+n+I*a.offset,r,k&&k.length&&l?l[0]+I*a.offset:0);c=c.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);e[d]=Math.max(e[d],c);t(this,"afterGetOffset")},getLinePath:function(a){var e=this.chart,b=this.opposite,c=this.offset,k=this.horiz,f=this.left+(b?
this.width:0)+c;c=e.chartHeight-this.bottom-(b?this.height:0)+c;b&&(a*=-1);return e.renderer.crispLine(["M",k?this.left:f,k?c:this.top,"L",k?e.chartWidth-this.right:f,k?c:e.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,
e=this.left,b=this.top,c=this.len,k=this.options.title,f=a?e:b,l=this.opposite,u=this.offset,d=k.x||0,h=k.y||0,n=this.axisTitle,r=this.chart.renderer.fontMetrics(k.style&&k.style.fontSize,n);n=Math.max(n.getBBox(null,0).height-r.h-1,0);c={low:f+(a?0:c),middle:f+c/2,high:f+(a?c:0)}[k.align];e=(a?b+this.height:e)+(a?1:-1)*(l?-1:1)*this.axisTitleMargin+[-n,n,r.f,-n][this.side];a={x:a?c+d:e+(l?this.width:0)+u+d,y:a?e+h-(l?this.height:0)+u:c+h};t(this,"afterGetTitlePosition",{titlePosition:a});return a},
renderMinorTick:function(a){var e=this.chart.hasRendered&&z(this.oldMin),b=this.minorTicks;b[a]||(b[a]=new G(this,a,"minor"));e&&b[a].isNew&&b[a].render(null,!0);b[a].render(null,!1,1)},renderTick:function(a,e){var b=this.isLinked,c=this.ticks,k=this.chart.hasRendered&&z(this.oldMin);if(!b||a>=this.min&&a<=this.max)c[a]||(c[a]=new G(this,a)),k&&c[a].isNew&&c[a].render(e,!0,-1),c[a].render(e)},render:function(){var a=this,e=a.chart,b=a.options,k=a.isLog,f=a.isLinked,l=a.tickPositions,u=a.axisTitle,
h=a.ticks,n=a.minorTicks,r=a.alternateBands,H=b.stackLabels,g=b.alternateGridColor,m=a.tickmarkOffset,I=a.axisLine,p=a.showAxis,w=M(e.renderer.globalAnimation),v,x;a.labelEdge.length=0;a.overlap=!1;[h,n,r].forEach(function(a){q(a,function(a){a.isActive=!1})});if(a.hasData()||f)a.minorTickInterval&&!a.categories&&a.getMinorTickPositions().forEach(function(e){a.renderMinorTick(e)}),l.length&&(l.forEach(function(e,b){a.renderTick(e,b)}),m&&(0===a.min||a.single)&&(h[-1]||(h[-1]=new G(a,-1,null,!0)),h[-1].render(-1))),
g&&l.forEach(function(b,c){x="undefined"!==typeof l[c+1]?l[c+1]+m:a.max-m;0===c%2&&b<a.max&&x<=a.max+(e.polar?-m:m)&&(r[b]||(r[b]=new d.PlotLineOrBand(a)),v=b+m,r[b].options={from:k?a.lin2log(v):v,to:k?a.lin2log(x):x,color:g},r[b].render(),r[b].isActive=!0)}),a._addedPlotLB||((b.plotLines||[]).concat(b.plotBands||[]).forEach(function(e){a.addPlotBandOrLine(e)}),a._addedPlotLB=!0);[h,n,r].forEach(function(a){var b,k=[],f=w.duration;q(a,function(a,e){a.isActive||(a.render(e,!1,0),a.isActive=!1,k.push(e))});
c(function(){for(b=k.length;b--;)a[k[b]]&&!a[k[b]].isActive&&(a[k[b]].destroy(),delete a[k[b]])},a!==r&&e.hasRendered&&f?f:0)});I&&(I[I.isPlaced?"animate":"attr"]({d:this.getLinePath(I.strokeWidth())}),I.isPlaced=!0,I[p?"show":"hide"](p));u&&p&&(b=a.getTitlePosition(),z(b.y)?(u[u.isNew?"attr":"animate"](b),u.isNew=!1):(u.attr("y",-9999),u.isNew=!0));H&&H.enabled&&a.renderStackTotals();a.isDirty=!1;t(this,"afterRender")},redraw:function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(a){a.render()}));
this.series.forEach(function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var e=this,b=e.stacks,c=e.plotLinesAndBands,k;t(this,"destroy",{keepEvents:a});a||u(e);q(b,function(a,e){C(a);b[e]=null});[e.ticks,e.minorTicks,e.alternateBands].forEach(function(a){C(a)});if(c)for(a=c.length;a--;)c[a].destroy();"stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(a){e[a]&&(e[a]=e[a].destroy())});
for(k in e.plotLinesAndBandsGroups)e.plotLinesAndBandsGroups[k]=e.plotLinesAndBandsGroups[k].destroy();q(e,function(a,b){-1===e.keepProps.indexOf(b)&&delete e[b]})},drawCrosshair:function(e,b){var c=this.crosshair,k=w(c.snap,!0),f,l=this.cross;t(this,"drawCrosshair",{e:e,point:b});e||(e=this.cross&&this.cross.e);if(this.crosshair&&!1!==(v(b)||!k)){k?v(b)&&(f=w("colorAxis"!==this.coll?b.crosshairPos:null,this.isXAxis?b.plotX:this.len-b.plotY)):f=e&&(this.horiz?e.chartX-this.pos:this.len-e.chartY+this.pos);
if(v(f)){var u={value:b&&(this.isXAxis?b.x:w(b.stackY,b.y)),translatedValue:f};this.chart.polar&&B(u,{isCrosshair:!0,chartX:e&&e.chartX,chartY:e&&e.chartY,point:b});u=this.getPlotLinePath(u)||null}if(!v(u)){this.hideCrosshair();return}k=this.categories&&!this.isRadial;l||(this.cross=l=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(k?"category ":"thin ")+c.className).attr({zIndex:w(c.zIndex,2)}).add(),this.chart.styledMode||(l.attr({stroke:c.color||(k?a("#ccd6eb").setOpacity(.25).get():
"#cccccc"),"stroke-width":w(c.width,1)}).css({"pointer-events":"none"}),c.dashStyle&&l.attr({dashstyle:c.dashStyle})));l.show().attr({d:u});k&&!c.width&&l.attr({"stroke-width":this.transA});this.cross.e=e}else this.hideCrosshair();t(this,"afterDrawCrosshair",{e:e,point:b})},hideCrosshair:function(){this.cross&&this.cross.hide();t(this,"afterHideCrosshair")}});return d.Axis=g});K(y,"parts/DateTimeAxis.js",[y["parts/Globals.js"]],function(d){var g=d.Axis,M=d.getMagnitude,F=d.normalizeTickInterval,E=
d.timeUnits;g.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)};g.prototype.normalizeTimeTickInterval=function(d,g){var v=g||[["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]];g=v[v.length-1];var x=E[g[0]],B=g[1],p;for(p=0;p<v.length&&!(g=v[p],x=E[g[0]],B=g[1],v[p+1]&&d<=(x*B[B.length-1]+E[v[p+1][0]])/
2);p++);x===E.year&&d<5*x&&(B=[1,2,5]);d=F(d/x,B,"year"===g[0]?Math.max(M(d/x),1):1);return{unitRange:x,count:d,unitName:g[0]}}});K(y,"parts/LogarithmicAxis.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.pick;g=d.Axis;var F=d.getMagnitude,E=d.normalizeTickInterval;g.prototype.getLogTickPositions=function(d,g,v,C){var x=this.options,p=this.len,z=[];C||(this._minorAutoInterval=null);if(.5<=d)d=Math.round(d),z=this.getLinearTickPositions(d,g,v);else if(.08<=d){p=Math.floor(g);
var m,q;for(x=.3<d?[1,2,4]:.15<d?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];p<v+1&&!q;p++){var w=x.length;for(m=0;m<w&&!q;m++){var h=this.log2lin(this.lin2log(p)*x[m]);h>g&&(!C||f<=v)&&"undefined"!==typeof f&&z.push(f);f>v&&(q=!0);var f=h}}}else g=this.lin2log(g),v=this.lin2log(v),d=C?this.getMinorTickInterval():x.tickInterval,d=M("auto"===d?null:d,this._minorAutoInterval,x.tickPixelInterval/(C?5:1)*(v-g)/((C?p/this.tickPositions.length:p)||1)),d=E(d,null,F(d)),z=this.getLinearTickPositions(d,g,v).map(this.log2lin),
C||(this._minorAutoInterval=d/5);C||(this.tickInterval=d);return z};g.prototype.log2lin=function(d){return Math.log(d)/Math.LN10};g.prototype.lin2log=function(d){return Math.pow(10,d)}});K(y,"parts/PlotLineOrBand.js",[y["parts/Globals.js"],y["parts/Axis.js"],y["parts/Utilities.js"]],function(d,g,M){var F=M.arrayMax,E=M.arrayMin,D=M.defined,x=M.destroyObjectProperties,v=M.erase,C=M.extend,B=M.objectEach,p=M.pick,z=d.merge;d.PlotLineOrBand=function(d,g){this.axis=d;g&&(this.options=g,this.id=g.id)};
d.PlotLineOrBand.prototype={render:function(){d.fireEvent(this,"render");var g=this,q=g.axis,w=q.horiz,h=g.options,f=h.label,c=g.label,b=h.to,a=h.from,l=h.value,n=D(a)&&D(b),t=D(l),I=g.svgElem,r=!I,e=[],k=h.color,u=p(h.zIndex,0),H=h.events;e={"class":"highcharts-plot-"+(n?"band ":"line ")+(h.className||"")};var G={},A=q.chart.renderer,J=n?"bands":"lines";q.isLog&&(a=q.log2lin(a),b=q.log2lin(b),l=q.log2lin(l));q.chart.styledMode||(t?(e.stroke=k||"#999999",e["stroke-width"]=p(h.width,1),h.dashStyle&&
(e.dashstyle=h.dashStyle)):n&&(e.fill=k||"#e6ebf5",h.borderWidth&&(e.stroke=h.borderColor,e["stroke-width"]=h.borderWidth)));G.zIndex=u;J+="-"+u;(k=q.plotLinesAndBandsGroups[J])||(q.plotLinesAndBandsGroups[J]=k=A.g("plot-"+J).attr(G).add());r&&(g.svgElem=I=A.path().attr(e).add(k));if(t)e=q.getPlotLinePath({value:l,lineWidth:I.strokeWidth(),acrossPanes:h.acrossPanes});else if(n)e=q.getPlotBandPath(a,b,h);else return;(r||!I.d)&&e&&e.length?(I.attr({d:e}),H&&B(H,function(a,e){I.on(e,function(a){H[e].apply(g,
[a])})})):I&&(e?(I.show(!0),I.animate({d:e})):I.d&&(I.hide(),c&&(g.label=c=c.destroy())));f&&(D(f.text)||D(f.formatter))&&e&&e.length&&0<q.width&&0<q.height&&!e.isFlat?(f=z({align:w&&n&&"center",x:w?!n&&4:10,verticalAlign:!w&&n&&"middle",y:w?n?16:10:n?6:-4,rotation:w&&!n&&90},f),this.renderLabel(f,e,n,u)):c&&c.hide();return g},renderLabel:function(d,g,p,h){var f=this.label,c=this.axis.chart.renderer;f||(f={align:d.textAlign||d.align,rotation:d.rotation,"class":"highcharts-plot-"+(p?"band":"line")+
"-label "+(d.className||"")},f.zIndex=h,h=this.getLabelText(d),this.label=f=c.text(h,0,0,d.useHTML).attr(f).add(),this.axis.chart.styledMode||f.css(d.style));c=g.xBounds||[g[1],g[4],p?g[6]:g[1]];g=g.yBounds||[g[2],g[5],p?g[7]:g[2]];p=E(c);h=E(g);f.align(d,!1,{x:p,y:h,width:F(c)-p,height:F(g)-h});f.show(!0)},getLabelText:function(d){return D(d.formatter)?d.formatter.call(this):d.text},destroy:function(){v(this.axis.plotLinesAndBands,this);delete this.axis;x(this)}};C(g.prototype,{getPlotBandPath:function(d,
g){var m=this.getPlotLinePath({value:g,force:!0,acrossPanes:this.options.acrossPanes}),h=this.getPlotLinePath({value:d,force:!0,acrossPanes:this.options.acrossPanes}),f=[],c=this.horiz,b=1;d=d<this.min&&g<this.min||d>this.max&&g>this.max;if(h&&m){if(d){var a=h.toString()===m.toString();b=0}for(d=0;d<h.length;d+=6)c&&m[d+1]===h[d+1]?(m[d+1]+=b,m[d+4]+=b):c||m[d+2]!==h[d+2]||(m[d+2]+=b,m[d+5]+=b),f.push("M",h[d+1],h[d+2],"L",h[d+4],h[d+5],m[d+4],m[d+5],m[d+1],m[d+2],"z"),f.isFlat=a}return f},addPlotBand:function(d){return this.addPlotBandOrLine(d,
"plotBands")},addPlotLine:function(d){return this.addPlotBandOrLine(d,"plotLines")},addPlotBandOrLine:function(g,q){var m=(new d.PlotLineOrBand(this,g)).render(),h=this.userOptions;if(m){if(q){var f=h[q]||[];f.push(g);h[q]=f}this.plotLinesAndBands.push(m)}return m},removePlotBandOrLine:function(d){for(var g=this.plotLinesAndBands,m=this.options,h=this.userOptions,f=g.length;f--;)g[f].id===d&&g[f].destroy();[m.plotLines||[],h.plotLines||[],m.plotBands||[],h.plotBands||[]].forEach(function(c){for(f=
c.length;f--;)c[f].id===d&&v(c,c[f])})},removePlotBand:function(d){this.removePlotBandOrLine(d)},removePlotLine:function(d){this.removePlotBandOrLine(d)}})});K(y,"parts/Tooltip.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var M=g.clamp,F=g.defined,E=g.discardElement,D=g.extend,x=g.isNumber,v=g.isString,C=g.pick,B=g.splat,p=g.syncTimeout;"";var z=d.doc,m=d.format,q=d.merge,w=d.timeUnits;d.Tooltip=function(){this.init.apply(this,arguments)};d.Tooltip.prototype={init:function(d,
f){this.chart=d;this.options=f;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=f.split&&!d.inverted&&!d.polar;this.shared=f.shared||this.split;this.outside=C(f.outside,!(!d.scrollablePixelsX&&!d.scrollablePixelsY))},cleanSplit:function(d){this.chart.series.forEach(function(f){var c=f&&f.tt;c&&(!c.isActive||d?f.tt=c.destroy():c.isActive=!1)})},applyFilter:function(){var d=this.chart;d.renderer.definition({tagName:"filter",id:"drop-shadow-"+d.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"}]}]});d.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+d.index+"{filter:url(#drop-shadow-"+d.index+")}"})},getLabel:function(){var h=this,f=this.chart.renderer,c=this.chart.styledMode,b=this.options,a="tooltip"+(F(b.className)?
" "+b.className:""),l;if(!this.label){this.outside&&(this.container=l=d.doc.createElement("div"),l.className="highcharts-tooltip-container",d.css(l,{position:"absolute",top:"1px",pointerEvents:b.style&&b.style.pointerEvents,zIndex:3}),d.doc.body.appendChild(l),this.renderer=f=new d.Renderer(l,0,0,{},void 0,void 0,f.styledMode));this.split?this.label=f.g(a):(this.label=f.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,a).attr({padding:b.padding,r:b.borderRadius}),c||this.label.attr({fill:b.backgroundColor,
"stroke-width":b.borderWidth}).css(b.style).shadow(b.shadow));c&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index));if(h.outside&&!h.split){var n={x:this.label.xSetter,y:this.label.ySetter};this.label.xSetter=function(a,b){n[b].call(this.label,h.distance);l.style.left=a+"px"};this.label.ySetter=function(a,b){n[b].call(this.label,h.distance);l.style.top=a+"px"}}this.label.attr({zIndex:8}).add()}return this.label},update:function(d){this.destroy();q(!0,this.chart.options.tooltip.userOptions,
d);this.init(this.chart,q(!0,this.options,d))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());this.renderer&&(this.renderer=this.renderer.destroy(),E(this.container));d.clearTimeout(this.hideTimer);d.clearTimeout(this.tooltipTimeout)},move:function(h,f,c,b){var a=this,l=a.now,n=!1!==a.options.animation&&!a.isHidden&&(1<Math.abs(h-l.x)||1<Math.abs(f-l.y)),t=a.followPointer||1<a.len;D(l,{x:n?(2*l.x+h)/
3:h,y:n?(l.y+f)/2:f,anchorX:t?void 0:n?(2*l.anchorX+c)/3:c,anchorY:t?void 0:n?(l.anchorY+b)/2:b});a.getLabel().attr(l);n&&(d.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){a&&a.move(h,f,c,b)},32))},hide:function(h){var f=this;d.clearTimeout(this.hideTimer);h=C(h,this.options.hideDelay,500);this.isHidden||(this.hideTimer=p(function(){f.getLabel()[h?"fadeOut":"hide"]();f.isHidden=!0},h))},getAnchor:function(d,f){var c=this.chart,b=c.pointer,a=c.inverted,l=c.plotTop,h=c.plotLeft,
t=0,g=0,r,e;d=B(d);this.followPointer&&f?("undefined"===typeof f.chartX&&(f=b.normalize(f)),d=[f.chartX-c.plotLeft,f.chartY-l]):d[0].tooltipPos?d=d[0].tooltipPos:(d.forEach(function(b){r=b.series.yAxis;e=b.series.xAxis;t+=b.plotX+(!a&&e?e.left-h:0);g+=(b.plotLow?(b.plotLow+b.plotHigh)/2:b.plotY)+(!a&&r?r.top-l:0)}),t/=d.length,g/=d.length,d=[a?c.plotWidth-g:t,this.shared&&!a&&1<d.length&&f?f.chartY-l:a?c.plotHeight-t:g]);return d.map(Math.round)},getPosition:function(d,f,c){var b=this.chart,a=this.distance,
l={},h=b.inverted&&c.h||0,t,g=this.outside,r=g?z.documentElement.clientWidth-2*a:b.chartWidth,e=g?Math.max(z.body.scrollHeight,z.documentElement.scrollHeight,z.body.offsetHeight,z.documentElement.offsetHeight,z.documentElement.clientHeight):b.chartHeight,k=b.pointer.getChartPosition(),u=b.containerScaling,H=function(a){return u?a*u.scaleX:a},G=function(a){return u?a*u.scaleY:a},A=function(l){var u="x"===l;return[l,u?r:e,u?d:f].concat(g?[u?H(d):G(f),u?k.left-a+H(c.plotX+b.plotLeft):k.top-a+G(c.plotY+
b.plotTop),0,u?r:e]:[u?d:f,u?c.plotX+b.plotLeft:c.plotY+b.plotTop,u?b.plotLeft:b.plotTop,u?b.plotLeft+b.plotWidth:b.plotTop+b.plotHeight])},m=A("y"),L=A("x"),q=!this.followPointer&&C(c.ttBelow,!b.inverted===!!c.negative),p=function(e,b,c,k,f,u,d){var t="y"===e?G(a):H(a),n=(c-k)/2,r=k<f-a,A=f+a+k<b,g=f-t-c+n;f=f+t-n;if(q&&A)l[e]=f;else if(!q&&r)l[e]=g;else if(r)l[e]=Math.min(d-k,0>g-h?g:g-h);else if(A)l[e]=Math.max(u,f+h+c>b?f:f+h);else return!1},v=function(e,b,c,k,f){var u;f<a||f>b-a?u=!1:l[e]=f<
c/2?1:f>b-k/2?b-k-2:f-c/2;return u},w=function(a){var e=m;m=L;L=e;t=a},x=function(){!1!==p.apply(0,m)?!1!==v.apply(0,L)||t||(w(!0),x()):t?l.x=l.y=0:(w(!0),x())};(b.inverted||1<this.len)&&w();x();return l},defaultFormatter:function(d){var f=this.points||B(this);var c=[d.tooltipFooterHeaderFormatter(f[0])];c=c.concat(d.bodyFormatter(f));c.push(d.tooltipFooterHeaderFormatter(f[0],!0));return c},refresh:function(h,f){var c=this.chart,b=this.options,a=h,l={},n=[],t=b.formatter||this.defaultFormatter;l=
this.shared;var g=c.styledMode;if(b.enabled){d.clearTimeout(this.hideTimer);this.followPointer=B(a)[0].series.tooltipOptions.followPointer;var r=this.getAnchor(a,f);f=r[0];var e=r[1];!l||a.series&&a.series.noSharedTooltip?l=a.getLabelConfig():(c.pointer.applyInactiveState(a),a.forEach(function(a){a.setState("hover");n.push(a.getLabelConfig())}),l={x:a[0].category,y:a[0].y},l.points=n,a=a[0]);this.len=n.length;c=t.call(l,this);t=a.series;this.distance=C(t.tooltipOptions.distance,16);!1===c?this.hide():
(this.split?this.renderSplit(c,B(h)):(h=this.getLabel(),b.style.width&&!g||h.css({width:this.chart.spacingBox.width}),h.attr({text:c&&c.join?c.join(""):c}),h.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+C(a.colorIndex,t.colorIndex)),g||h.attr({stroke:b.borderColor||a.color||t.color||"#666666"}),this.updatePosition({plotX:f,plotY:e,negative:a.negative,ttBelow:a.ttBelow,h:r[2]||0})),this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1);d.fireEvent(this,
"refresh")}},renderSplit:function(h,f){function c(a,e,b,c,k){void 0===k&&(k=!0);b?(e=B?0:y,a=M(a-c/2,N.left,N.right-c)):(e-=E,a=k?a-c-z:a+z,a=M(a,k?a:N.left,N.right));return{x:a,y:e}}var b=this,a=b.chart,l=b.chart,n=l.chartWidth,t=l.chartHeight,g=l.plotHeight,r=l.plotLeft,e=l.plotTop,k=l.plotWidth,u=l.pointer,H=l.renderer,G=l.scrollablePixelsX;G=void 0===G?0:G;var A=l.scrollablePixelsY,m=void 0===A?0:A;A=l.scrollingContainer;A=void 0===A?{scrollLeft:0,scrollTop:0}:A;var L=A.scrollLeft,q=A.scrollTop,
p=l.styledMode,z=b.distance,w=b.options,x=b.options.positioner,N={left:G?r:0,right:G?r+k-G:n,top:m?e:0,bottom:m?e+g-m:t},ba=b.getLabel(),B=!(!a.xAxis[0]||!a.xAxis[0].opposite),E=e,F=0,y=g-m;v(h)&&(h=[!1,h]);h=h.slice(0,f.length+1).reduce(function(a,k,l){if(!1!==k&&""!==k){l=f[l-1]||{isHeader:!0,plotX:f[0].plotX,plotY:g,series:{}};var u=l.isHeader,d=u?b:l.series,h=d.tt,t=l.isHeader;var n=l.series;var A="highcharts-color-"+C(l.colorIndex,n.colorIndex,"none");h||(h={padding:w.padding,r:w.borderRadius},
p||(h.fill=w.backgroundColor,h["stroke-width"]=w.borderWidth),h=H.label(null,null,null,w[t?"headerShape":"shape"]||"callout",null,null,w.useHTML).addClass(t?"highcharts-tooltip-header ":"highcharts-tooltip-box "+A).attr(h).add(ba));h.isActive=!0;h.attr({text:k});p||h.css(w.style).shadow(w.shadow).attr({stroke:w.borderColor||l.color||n.color||"#333333"});k=d.tt=h;t=k.getBBox();d=t.width+k.strokeWidth();u&&(F=t.height,y+=F,B&&(E-=F));n=l.plotX;n=void 0===n?0:n;A=l.plotY;A=void 0===A?0:A;var G=l.series;
l.isHeader?(n=r+n-L,A=e+(g-m)/2):(h=G.xAxis,G=G.yAxis,n=h.pos+M(n,-z,h.len+z)-L,A=G.pos+M(A,0,G.len)-q);n=M(n,N.left-z,N.right+z);A=M(A,N.top,N.bottom);t=t.height+1;h=x?x.call(b,d,t,l):c(n,A,u,d);a.push({align:x?0:void 0,anchorX:n,anchorY:A,boxWidth:d,point:l,rank:C(h.rank,u?1:0),size:t,target:h.y,tt:k,x:h.x})}return a},[]);!x&&h.some(function(a){return 0>a.x})&&(h=h.map(function(a){var e=c(a.anchorX,a.anchorY,a.point.isHeader,a.boxWidth,!1);return D(a,{target:e.y,x:e.x})}));b.cleanSplit();d.distribute(h,
y,void 0);h.forEach(function(a){var e=a.pos;a.tt.attr({visibility:"undefined"===typeof e?"hidden":"inherit",x:a.x,y:e+E,anchorX:a.anchorX,anchorY:a.anchorY})});h=b.container;a=b.renderer;b.outside&&h&&a&&(l=ba.getBBox(),a.setSize(l.width+l.x,l.height+l.y,!1),u=u.getChartPosition(),h.style.left=u.left+"px",h.style.top=u.top+"px")},updatePosition:function(h){var f=this.chart,c=f.pointer,b=this.getLabel(),a=h.plotX+f.plotLeft,l=h.plotY+f.plotTop;c=c.getChartPosition();h=(this.options.positioner||this.getPosition).call(this,
b.width,b.height,h);if(this.outside){var n=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(b.width+n,b.height+n,!1);if(f=f.containerScaling)d.css(this.container,{transform:"scale("+f.scaleX+", "+f.scaleY+")"}),a*=f.scaleX,l*=f.scaleY;a+=c.left-h.x;l+=c.top-h.y}this.move(Math.round(h.x),Math.round(h.y||0),a,l)},getDateFormat:function(d,f,c,b){var a=this.chart.time,l=a.dateFormat("%m-%d %H:%M:%S.%L",f),h={millisecond:15,second:12,minute:9,hour:6,day:3},t="millisecond";for(g in w){if(d===
w.week&&+a.dateFormat("%w",f)===c&&"00:00:00.000"===l.substr(6)){var g="week";break}if(w[g]>d){g=t;break}if(h[g]&&l.substr(h[g])!=="01-01 00:00:00.000".substr(h[g]))break;"week"!==g&&(t=g)}if(g)var r=a.resolveDTLFormat(b[g]).main;return r},getXDateFormat:function(d,f,c){f=f.dateTimeLabelFormats;var b=c&&c.closestPointRange;return(b?this.getDateFormat(b,d.x,c.options.startOfWeek,f):f.day)||f.year},tooltipFooterHeaderFormatter:function(h,f){var c=f?"footer":"header",b=h.series,a=b.tooltipOptions,l=
a.xDateFormat,n=b.xAxis,t=n&&"datetime"===n.options.type&&x(h.key),g=a[c+"Format"];f={isFooter:f,labelConfig:h};d.fireEvent(this,"headerFormatter",f,function(c){t&&!l&&(l=this.getXDateFormat(h,a,n));t&&l&&(h.point&&h.point.tooltipDateKeys||["key"]).forEach(function(a){g=g.replace("{point."+a+"}","{point."+a+":"+l+"}")});b.chart.styledMode&&(g=this.styledModeFormat(g));c.text=m(g,{point:h,series:b},this.chart)});return f.text},bodyFormatter:function(d){return d.map(function(f){var c=f.series.tooltipOptions;
return(c[(f.point.formatPrefix||"point")+"Formatter"]||f.point.tooltipFormatter).call(f.point,c[(f.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(d){return d.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')}}});K(y,"parts/Pointer.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.attr,F=g.defined,E=g.extend,D=g.isNumber,x=g.isObject,v=g.objectEach,
C=g.offset,B=g.pick,p=g.splat,z=d.addEvent,m=d.charts,q=d.color,w=d.css,h=d.find,f=d.fireEvent,c=d.Tooltip;d.Pointer=function(b,a){this.init(b,a)};d.Pointer.prototype={init:function(b,a){this.options=a;this.chart=b;this.runChartClick=a.chart.events&&!!a.chart.events.click;this.pinchDown=[];this.lastValidTouch={};c&&(b.tooltip=new c(b,a.tooltip),this.followTouchMove=B(a.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(b){var a=this.chart,c=a.options.chart,f=c.zoomType||"";a=a.inverted;
/touch/.test(b.type)&&(f=B(c.pinchType,f));this.zoomX=b=/x/.test(f);this.zoomY=f=/y/.test(f);this.zoomHor=b&&!a||f&&a;this.zoomVert=f&&!a||b&&a;this.hasZoom=b||f},getChartPosition:function(){var b=this.chart;b=b.scrollingContainer||b.container;return this.chartPosition||(this.chartPosition=C(b))},normalize:function(b,a){var c=b.touches?b.touches.length?b.touches.item(0):b.changedTouches[0]:b;a||(a=this.getChartPosition());var f=c.pageX-a.left;a=c.pageY-a.top;if(c=this.chart.containerScaling)f/=c.scaleX,
a/=c.scaleY;return E(b,{chartX:Math.round(f),chartY:Math.round(a)})},getCoordinates:function(b){var a={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(c){a[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(b[c.horiz?"chartX":"chartY"])})});return a},findNearestKDPoint:function(b,a,c){var f;b.forEach(function(b){var l=!(b.noSharedTooltip&&a)&&0>b.options.findNearestPointBy.indexOf("y");b=b.searchPoint(c,l);if((l=x(b,!0))&&!(l=!x(f,!0))){l=f.distX-b.distX;var d=f.dist-b.dist,e=(b.series.group&&
b.series.group.zIndex)-(f.series.group&&f.series.group.zIndex);l=0<(0!==l&&a?l:0!==d?d:0!==e?e:f.series.index>b.series.index?-1:1)}l&&(f=b)});return f},getPointFromEvent:function(b){b=b.target;for(var a;b&&!a;)a=b.point,b=b.parentNode;return a},getChartCoordinatesFromPoint:function(b,a){var c=b.series,f=c.xAxis;c=c.yAxis;var d=B(b.clientX,b.plotX),h=b.shapeArgs;if(f&&c)return a?{chartX:f.len+f.pos-d,chartY:c.len+c.pos-b.plotY}:{chartX:d+f.pos,chartY:b.plotY+c.pos};if(h&&h.x&&h.y)return{chartX:h.x,
chartY:h.y}},getHoverData:function(b,a,c,f,d,g){var l,e=[];f=!(!f||!b);var k=a&&!a.stickyTracking?[a]:c.filter(function(a){return a.visible&&!(!d&&a.directTouch)&&B(a.options.enableMouseTracking,!0)&&a.stickyTracking});a=(l=f||!g?b:this.findNearestKDPoint(k,d,g))&&l.series;l&&(d&&!a.noSharedTooltip?(k=c.filter(function(a){return a.visible&&!(!d&&a.directTouch)&&B(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),k.forEach(function(a){var b=h(a.points,function(a){return a.x===l.x&&!a.isNull});
x(b)&&(a.chart.isBoosting&&(b=a.getPoint(b)),e.push(b))})):e.push(l));return{hoverPoint:l,hoverSeries:a,hoverPoints:e}},runPointActions:function(b,a){var c=this.chart,f=c.tooltip&&c.tooltip.options.enabled?c.tooltip:void 0,h=f?f.shared:!1,g=a||c.hoverPoint,r=g&&g.series||c.hoverSeries;r=this.getHoverData(g,r,c.series,(!b||"touchmove"!==b.type)&&(!!a||r&&r.directTouch&&this.isDirectTouch),h,b);g=r.hoverPoint;var e=r.hoverPoints;a=(r=r.hoverSeries)&&r.tooltipOptions.followPointer;h=h&&r&&!r.noSharedTooltip;
if(g&&(g!==c.hoverPoint||f&&f.isHidden)){(c.hoverPoints||[]).forEach(function(a){-1===e.indexOf(a)&&a.setState()});if(c.hoverSeries!==r)r.onMouseOver();this.applyInactiveState(e);(e||[]).forEach(function(a){a.setState("hover")});c.hoverPoint&&c.hoverPoint.firePointEvent("mouseOut");if(!g.series)return;g.firePointEvent("mouseOver");c.hoverPoints=e;c.hoverPoint=g;f&&f.refresh(h?e:g,b)}else a&&f&&!f.isHidden&&(g=f.getAnchor([{}],b),f.updatePosition({plotX:g[0],plotY:g[1]}));this.unDocMouseMove||(this.unDocMouseMove=
z(c.container.ownerDocument,"mousemove",function(a){var e=m[d.hoverChartIndex];if(e)e.pointer.onDocumentMouseMove(a)}));c.axes.forEach(function(a){var c=B(a.crosshair.snap,!0),k=c?d.find(e,function(e){return e.series[a.coll]===a}):void 0;k||!c?a.drawCrosshair(b,k):a.hideCrosshair()})},applyInactiveState:function(b){var a=[],c;(b||[]).forEach(function(b){c=b.series;a.push(c);c.linkedParent&&a.push(c.linkedParent);c.linkedSeries&&(a=a.concat(c.linkedSeries));c.navigatorSeries&&a.push(c.navigatorSeries)});
this.chart.series.forEach(function(b){-1===a.indexOf(b)?b.setState("inactive",!0):b.options.inactiveOtherPoints&&b.setAllPointsToState("inactive")})},reset:function(b,a){var c=this.chart,f=c.hoverSeries,d=c.hoverPoint,h=c.hoverPoints,r=c.tooltip,e=r&&r.shared?h:d;b&&e&&p(e).forEach(function(a){a.series.isCartesian&&"undefined"===typeof a.plotX&&(b=!1)});if(b)r&&e&&p(e).length&&(r.refresh(e),r.shared&&h?h.forEach(function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,
a),a.series.yAxis.crosshair&&a.series.yAxis.drawCrosshair(null,a))}):d&&(d.setState(d.state,!0),c.axes.forEach(function(a){a.crosshair&&d.series[a.coll]===a&&a.drawCrosshair(null,d)})));else{if(d)d.onMouseOut();h&&h.forEach(function(a){a.setState()});if(f)f.onMouseOut();r&&r.hide(a);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());c.axes.forEach(function(a){a.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(b,a){var c=this.chart,f;c.series.forEach(function(d){f=
b||d.getPlotBox();d.xAxis&&d.xAxis.zoomEnabled&&d.group&&(d.group.attr(f),d.markerGroup&&(d.markerGroup.attr(f),d.markerGroup.clip(a?c.clipRect:null)),d.dataLabelsGroup&&d.dataLabelsGroup.attr(f))});c.clipRect.attr(a||c.clipBox)},dragStart:function(b){var a=this.chart;a.mouseIsDown=b.type;a.cancelClick=!1;a.mouseDownX=this.mouseDownX=b.chartX;a.mouseDownY=this.mouseDownY=b.chartY},drag:function(b){var a=this.chart,c=a.options.chart,f=b.chartX,d=b.chartY,h=this.zoomHor,r=this.zoomVert,e=a.plotLeft,
k=a.plotTop,u=a.plotWidth,g=a.plotHeight,G=this.selectionMarker,A=this.mouseDownX,m=this.mouseDownY,L=x(c.panning)?c.panning&&c.panning.enabled:c.panning,p=c.panKey&&b[c.panKey+"Key"];if(!G||!G.touch)if(f<e?f=e:f>e+u&&(f=e+u),d<k?d=k:d>k+g&&(d=k+g),this.hasDragged=Math.sqrt(Math.pow(A-f,2)+Math.pow(m-d,2)),10<this.hasDragged){var v=a.isInsidePlot(A-e,m-k);a.hasCartesianSeries&&(this.zoomX||this.zoomY)&&v&&!p&&!G&&(this.selectionMarker=G=a.renderer.rect(e,k,h?1:u,r?1:g,0).attr({"class":"highcharts-selection-marker",
zIndex:7}).add(),a.styledMode||G.attr({fill:c.selectionMarkerFill||q("#335cad").setOpacity(.25).get()}));G&&h&&(f-=A,G.attr({width:Math.abs(f),x:(0<f?0:f)+A}));G&&r&&(f=d-m,G.attr({height:Math.abs(f),y:(0<f?0:f)+m}));v&&!G&&L&&a.pan(b,c.panning)}},drop:function(b){var a=this,c=this.chart,d=this.hasPinched;if(this.selectionMarker){var h={originalEvent:b,xAxis:[],yAxis:[]},g=this.selectionMarker,r=g.attr?g.attr("x"):g.x,e=g.attr?g.attr("y"):g.y,k=g.attr?g.attr("width"):g.width,u=g.attr?g.attr("height"):
g.height,H;if(this.hasDragged||d)c.axes.forEach(function(c){if(c.zoomEnabled&&F(c.min)&&(d||a[{xAxis:"zoomX",yAxis:"zoomY"}[c.coll]])){var f=c.horiz,l="touchend"===b.type?c.minPixelPadding:0,t=c.toValue((f?r:e)+l);f=c.toValue((f?r+k:e+u)-l);h[c.coll].push({axis:c,min:Math.min(t,f),max:Math.max(t,f)});H=!0}}),H&&f(c,"selection",h,function(a){c.zoom(E(a,d?{animation:!1}:null))});D(c.index)&&(this.selectionMarker=this.selectionMarker.destroy());d&&this.scaleGroups()}c&&D(c.index)&&(w(c.container,{cursor:c._cursor}),
c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(b){b=this.normalize(b);2!==b.button&&(this.zoomOption(b),b.preventDefault&&b.preventDefault(),this.dragStart(b))},onDocumentMouseUp:function(b){m[d.hoverChartIndex]&&m[d.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(b){var a=this.chart,c=this.chartPosition;b=this.normalize(b,c);!c||this.inClass(b.target,"highcharts-tracker")||a.isInsidePlot(b.chartX-
a.plotLeft,b.chartY-a.plotTop)||this.reset()},onContainerMouseLeave:function(b){var a=m[d.hoverChartIndex];a&&(b.relatedTarget||b.toElement)&&(a.pointer.reset(),a.pointer.chartPosition=void 0)},onContainerMouseMove:function(b){var a=this.chart;F(d.hoverChartIndex)&&m[d.hoverChartIndex]&&m[d.hoverChartIndex].mouseIsDown||(d.hoverChartIndex=a.index);b=this.normalize(b);b.preventDefault||(b.returnValue=!1);"mousedown"===a.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!a.isInsidePlot(b.chartX-
a.plotLeft,b.chartY-a.plotTop)||a.openMenu||this.runPointActions(b)},inClass:function(b,a){for(var c;b;){if(c=y(b,"class")){if(-1!==c.indexOf(a))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}b=b.parentNode}},onTrackerMouseOut:function(b){var a=this.chart.hoverSeries;b=b.relatedTarget||b.toElement;this.isDirectTouch=!1;if(!(!a||!b||a.stickyTracking||this.inClass(b,"highcharts-tooltip")||this.inClass(b,"highcharts-series-"+a.index)&&this.inClass(b,"highcharts-tracker")))a.onMouseOut()},
onContainerClick:function(b){var a=this.chart,c=a.hoverPoint,d=a.plotLeft,h=a.plotTop;b=this.normalize(b);a.cancelClick||(c&&this.inClass(b.target,"highcharts-tracker")?(f(c.series,"click",E(b,{point:c})),a.hoverPoint&&c.firePointEvent("click",b)):(E(b,this.getCoordinates(b)),a.isInsidePlot(b.chartX-d,b.chartY-h)&&f(a,"click",b)))},setDOMEvents:function(){var b=this,a=b.chart.container,c=a.ownerDocument;a.onmousedown=function(a){b.onContainerMouseDown(a)};a.onmousemove=function(a){b.onContainerMouseMove(a)};
a.onclick=function(a){b.onContainerClick(a)};this.unbindContainerMouseLeave=z(a,"mouseleave",b.onContainerMouseLeave);d.unbindDocumentMouseUp||(d.unbindDocumentMouseUp=z(c,"mouseup",b.onDocumentMouseUp));d.hasTouch&&(z(a,"touchstart",function(a){b.onContainerTouchStart(a)}),z(a,"touchmove",function(a){b.onContainerTouchMove(a)}),d.unbindDocumentTouchEnd||(d.unbindDocumentTouchEnd=z(c,"touchend",b.onDocumentTouchEnd)))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();this.unbindContainerMouseLeave();
d.chartCount||(d.unbindDocumentMouseUp&&(d.unbindDocumentMouseUp=d.unbindDocumentMouseUp()),d.unbindDocumentTouchEnd&&(d.unbindDocumentTouchEnd=d.unbindDocumentTouchEnd()));clearInterval(b.tooltipTimeout);v(b,function(a,c){b[c]=null})}}});K(y,"parts/TouchPointer.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.extend,F=g.pick,E=d.charts,D=d.noop;y(d.Pointer.prototype,{pinchTranslate:function(d,g,C,B,p,z){this.zoomHor&&this.pinchTranslateDirection(!0,d,g,C,B,p,z);this.zoomVert&&
this.pinchTranslateDirection(!1,d,g,C,B,p,z)},pinchTranslateDirection:function(d,g,C,B,p,z,m,q){var v=this.chart,h=d?"x":"y",f=d?"X":"Y",c="chart"+f,b=d?"width":"height",a=v["plot"+(d?"Left":"Top")],l,n,t=q||1,I=v.inverted,r=v.bounds[d?"h":"v"],e=1===g.length,k=g[0][c],u=C[0][c],H=!e&&g[1][c],G=!e&&C[1][c];C=function(){!e&&20<Math.abs(k-H)&&(t=q||Math.abs(u-G)/Math.abs(k-H));n=(a-u)/t+k;l=v["plot"+(d?"Width":"Height")]/t};C();g=n;if(g<r.min){g=r.min;var A=!0}else g+l>r.max&&(g=r.max-l,A=!0);A?(u-=
.8*(u-m[h][0]),e||(G-=.8*(G-m[h][1])),C()):m[h]=[u,G];I||(z[h]=n-a,z[b]=l);z=I?1/t:t;p[b]=l;p[h]=g;B[I?d?"scaleY":"scaleX":"scale"+f]=t;B["translate"+f]=z*a+(u-z*k)},pinch:function(d){var g=this,x=g.chart,B=g.pinchDown,p=d.touches,z=p.length,m=g.lastValidTouch,q=g.hasZoom,w=g.selectionMarker,h={},f=1===z&&(g.inClass(d.target,"highcharts-tracker")&&x.runTrackerClick||g.runChartClick),c={};1<z&&(g.initiated=!0);q&&g.initiated&&!f&&d.preventDefault();[].map.call(p,function(b){return g.normalize(b)});
"touchstart"===d.type?([].forEach.call(p,function(b,a){B[a]={chartX:b.chartX,chartY:b.chartY}}),m.x=[B[0].chartX,B[1]&&B[1].chartX],m.y=[B[0].chartY,B[1]&&B[1].chartY],x.axes.forEach(function(b){if(b.zoomEnabled){var a=x.bounds[b.horiz?"h":"v"],c=b.minPixelPadding,f=b.toPixels(Math.min(F(b.options.min,b.dataMin),b.dataMin)),d=b.toPixels(Math.max(F(b.options.max,b.dataMax),b.dataMax)),h=Math.max(f,d);a.min=Math.min(b.pos,Math.min(f,d)-c);a.max=Math.max(b.pos+b.len,h+c)}}),g.res=!0):g.followTouchMove&&
1===z?this.runPointActions(g.normalize(d)):B.length&&(w||(g.selectionMarker=w=y({destroy:D,touch:!0},x.plotBox)),g.pinchTranslate(B,p,h,w,c,m),g.hasPinched=q,g.scaleGroups(h,c),g.res&&(g.res=!1,this.reset(!1,0)))},touch:function(g,v){var x=this.chart,B;if(x.index!==d.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});d.hoverChartIndex=x.index;if(1===g.touches.length)if(g=this.normalize(g),(B=x.isInsidePlot(g.chartX-x.plotLeft,g.chartY-x.plotTop))&&!x.openMenu){v&&this.runPointActions(g);
if("touchmove"===g.type){v=this.pinchDown;var p=v[0]?4<=Math.sqrt(Math.pow(v[0].chartX-g.chartX,2)+Math.pow(v[0].chartY-g.chartY,2)):!1}F(p,!0)&&this.pinch(g)}else v&&this.reset();else 2===g.touches.length&&this.pinch(g)},onContainerTouchStart:function(d){this.zoomOption(d);this.touch(d,!0)},onContainerTouchMove:function(d){this.touch(d)},onDocumentTouchEnd:function(g){E[d.hoverChartIndex]&&E[d.hoverChartIndex].pointer.drop(g)}})});K(y,"parts/MSPointer.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],
function(d,g){var y=g.extend,F=g.objectEach;g=g.wrap;var E=d.addEvent,D=d.charts,x=d.css,v=d.doc,C=d.noop,B=d.Pointer,p=d.removeEvent,z=d.win;if(!d.hasTouch&&(z.PointerEvent||z.MSPointerEvent)){var m={},q=!!z.PointerEvent,w=function(){var f=[];f.item=function(c){return this[c]};F(m,function(c){f.push({pageX:c.pageX,pageY:c.pageY,target:c.target})});return f},h=function(f,c,b,a){"touch"!==f.pointerType&&f.pointerType!==f.MSPOINTER_TYPE_TOUCH||!D[d.hoverChartIndex]||(a(f),a=D[d.hoverChartIndex].pointer,
a[c]({type:b,target:f.currentTarget,preventDefault:C,touches:w()}))};y(B.prototype,{onContainerPointerDown:function(f){h(f,"onContainerTouchStart","touchstart",function(c){m[c.pointerId]={pageX:c.pageX,pageY:c.pageY,target:c.currentTarget}})},onContainerPointerMove:function(f){h(f,"onContainerTouchMove","touchmove",function(c){m[c.pointerId]={pageX:c.pageX,pageY:c.pageY};m[c.pointerId].target||(m[c.pointerId].target=c.currentTarget)})},onDocumentPointerUp:function(f){h(f,"onDocumentTouchEnd","touchend",
function(c){delete m[c.pointerId]})},batchMSEvents:function(f){f(this.chart.container,q?"pointerdown":"MSPointerDown",this.onContainerPointerDown);f(this.chart.container,q?"pointermove":"MSPointerMove",this.onContainerPointerMove);f(v,q?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});g(B.prototype,"init",function(f,c,b){f.call(this,c,b);this.hasZoom&&x(c.container,{"-ms-touch-action":"none","touch-action":"none"})});g(B.prototype,"setDOMEvents",function(f){f.apply(this);(this.hasZoom||this.followTouchMove)&&
this.batchMSEvents(E)});g(B.prototype,"destroy",function(f){this.batchMSEvents(p);f.call(this)})}});K(y,"parts/Legend.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.defined,F=g.discardElement,E=g.isNumber,D=g.pick,x=g.relativeLength,v=g.setAnimation,C=g.syncTimeout;g=g.wrap;var B=d.addEvent,p=d.css,z=d.fireEvent,m=d.isFirefox,q=d.marginNames,w=d.merge,h=d.stableSort,f=d.win;d.Legend=function(c,b){this.init(c,b)};d.Legend.prototype={init:function(c,b){this.chart=c;this.setOptions(b);
b.enabled&&(this.render(),B(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=B(this.chart,"render",function(){this.legend.proximatePositions();this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},setOptions:function(c){var b=D(c.padding,8);this.options=c;this.chart.styledMode||(this.itemStyle=c.itemStyle,this.itemHiddenStyle=w(this.itemStyle,c.itemHiddenStyle));this.itemMarginTop=c.itemMarginTop||0;this.itemMarginBottom=c.itemMarginBottom||
0;this.padding=b;this.initialItemY=b-5;this.symbolWidth=D(c.symbolWidth,16);this.pages=[];this.proximate="proximate"===c.layout&&!this.chart.inverted},update:function(c,b){var a=this.chart;this.setOptions(w(!0,this.options,c));this.destroy();a.isDirtyLegend=a.isDirtyBox=!0;D(b,!0)&&a.redraw();z(this,"afterUpdate")},colorizeItem:function(c,b){c.legendGroup[b?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var a=this.options,f=c.legendItem,d=c.legendLine,h=c.legendSymbol,
g=this.itemHiddenStyle.color;a=b?a.itemStyle.color:g;var r=b?c.color||g:g,e=c.options&&c.options.marker,k={fill:r};f&&f.css({fill:a,color:a});d&&d.attr({stroke:r});h&&(e&&h.isMarker&&(k=c.pointAttribs(),b||(k.stroke=k.fill=g)),h.attr(k))}z(this,"afterColorizeItem",{item:c,visible:b})},positionItems:function(){this.allItems.forEach(this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()},positionItem:function(c){var b=this.options,a=b.symbolPadding;b=!b.rtl;var f=c._legendItemPos,
d=f[0];f=f[1];var h=c.checkbox;if((c=c.legendGroup)&&c.element)c[y(c.translateY)?"animate":"attr"]({translateX:b?d:this.legendWidth-d-2*a-4,translateY:f});h&&(h.x=d,h.y=f)},destroyItem:function(c){var b=c.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(a){c[a]&&(c[a]=c[a].destroy())});b&&F(c.checkbox)},destroy:function(){function c(b){this[b]&&(this[b]=this[b].destroy())}this.getAllItems().forEach(function(b){["legendItem","legendGroup"].forEach(c,b)});"clipRect up down pager nav box title group".split(" ").forEach(c,
this);this.display=null},positionCheckboxes:function(){var c=this.group&&this.group.alignAttr,b=this.clipHeight||this.legendHeight,a=this.titleHeight;if(c){var f=c.translateY;this.allItems.forEach(function(d){var l=d.checkbox;if(l){var h=f+a+l.y+(this.scrollOffset||0)+3;p(l,{left:c.translateX+d.checkboxOffset+l.x-20+"px",top:h+"px",display:this.proximate||h>f-6&&h<f+b-6?"":"none"})}},this)}},renderTitle:function(){var c=this.options,b=this.padding,a=c.title,f=0;a.text&&(this.title||(this.title=this.chart.renderer.label(a.text,
b-3,b-4,null,null,null,c.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(a.style),this.title.add(this.group)),a.width||this.title.css({width:this.maxLegendWidth+"px"}),c=this.title.getBBox(),f=c.height,this.offsetWidth=c.width,this.contentGroup.attr({translateY:f}));this.titleHeight=f},setText:function(c){var b=this.options;c.legendItem.attr({text:b.labelFormat?d.format(b.labelFormat,c,this.chart):b.labelFormatter.call(c)})},renderItem:function(c){var b=this.chart,
a=b.renderer,f=this.options,d=this.symbolWidth,h=f.symbolPadding,g=this.itemStyle,r=this.itemHiddenStyle,e="horizontal"===f.layout?D(f.itemDistance,20):0,k=!f.rtl,u=c.legendItem,H=!c.series,G=!H&&c.series.drawLegendSymbol?c.series:c,A=G.options;A=this.createCheckboxForItem&&A&&A.showCheckbox;e=d+h+e+(A?20:0);var m=f.useHTML,L=c.options.className;u||(c.legendGroup=a.g("legend-item").addClass("highcharts-"+G.type+"-series highcharts-color-"+c.colorIndex+(L?" "+L:"")+(H?" highcharts-series-"+c.index:
"")).attr({zIndex:1}).add(this.scrollGroup),c.legendItem=u=a.text("",k?d+h:-h,this.baseline||0,m),b.styledMode||u.css(w(c.visible?g:r)),u.attr({align:k?"left":"right",zIndex:2}).add(c.legendGroup),this.baseline||(this.fontMetrics=a.fontMetrics(b.styledMode?12:g.fontSize,u),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,u.attr("y",this.baseline)),this.symbolHeight=f.symbolHeight||this.fontMetrics.f,G.drawLegendSymbol(this,c),this.setItemEvents&&this.setItemEvents(c,u,m));A&&!c.checkbox&&this.createCheckboxForItem(c);
this.colorizeItem(c,c.visible);!b.styledMode&&g.width||u.css({width:(f.itemWidth||this.widthOption||b.spacingBox.width)-e});this.setText(c);b=u.getBBox();c.itemWidth=c.checkboxOffset=f.itemWidth||c.legendItemWidth||b.width+e;this.maxItemWidth=Math.max(this.maxItemWidth,c.itemWidth);this.totalItemWidth+=c.itemWidth;this.itemHeight=c.itemHeight=Math.round(c.legendItemHeight||b.height||this.symbolHeight)},layoutItem:function(c){var b=this.options,a=this.padding,f="horizontal"===b.layout,d=c.itemHeight,
h=this.itemMarginBottom,g=this.itemMarginTop,r=f?D(b.itemDistance,20):0,e=this.maxLegendWidth;b=b.alignColumns&&this.totalItemWidth>e?this.maxItemWidth:c.itemWidth;f&&this.itemX-a+b>e&&(this.itemX=a,this.lastLineHeight&&(this.itemY+=g+this.lastLineHeight+h),this.lastLineHeight=0);this.lastItemY=g+this.itemY+h;this.lastLineHeight=Math.max(d,this.lastLineHeight);c._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=b:(this.itemY+=g+d+h,this.lastLineHeight=d);this.offsetWidth=this.widthOption||Math.max((f?
this.itemX-a-(c.checkbox?0:r):b)+a,this.offsetWidth)},getAllItems:function(){var c=[];this.chart.series.forEach(function(b){var a=b&&b.options;b&&D(a.showInLegend,y(a.linkedTo)?!1:void 0,!0)&&(c=c.concat(b.legendItems||("point"===a.legendType?b.data:b)))});z(this,"afterGetAllItems",{allItems:c});return c},getAlignment:function(){var c=this.options;return this.proximate?c.align.charAt(0)+"tv":c.floating?"":c.align.charAt(0)+c.verticalAlign.charAt(0)+c.layout.charAt(0)},adjustMargins:function(c,b){var a=
this.chart,f=this.options,d=this.getAlignment();d&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(l,h){l.test(d)&&!y(c[h])&&(a[q[h]]=Math.max(a[q[h]],a.legend[(h+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][h]*f[h%2?"x":"y"]+D(f.margin,12)+b[h]+(a.titleOffset[h]||0)))})},proximatePositions:function(){var c=this.chart,b=[],a="left"===this.options.align;this.allItems.forEach(function(f){var l=a;if(f.yAxis&&f.points){f.xAxis.options.reversed&&(l=!l);var h=d.find(l?f.points:
f.points.slice(0).reverse(),function(a){return E(a.plotY)});l=this.itemMarginTop+f.legendItem.getBBox().height+this.itemMarginBottom;var g=f.yAxis.top-c.plotTop;f.visible?(h=h?h.plotY:f.yAxis.height,h+=g-.3*l):h=g+f.yAxis.height;b.push({target:h,size:l,item:f})}},this);d.distribute(b,c.plotHeight);b.forEach(function(a){a.item._legendItemPos[1]=c.plotTop-c.spacing[0]+a.pos})},render:function(){var c=this.chart,b=c.renderer,a=this.group,f,d=this.box,g=this.options,m=this.padding;this.itemX=m;this.itemY=
this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=x(g.width,c.spacingBox.width-m);var r=c.spacingBox.width-2*m-g.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(r/=2);this.maxLegendWidth=this.widthOption||r;a||(this.group=a=b.g("legend").attr({zIndex:7}).add(),this.contentGroup=b.g().attr({zIndex:1}).add(a),this.scrollGroup=b.g().add(this.contentGroup));this.renderTitle();r=this.getAllItems();h(r,function(a,e){return(a.options&&a.options.legendIndex||0)-(e.options&&
e.options.legendIndex||0)});g.reversed&&r.reverse();this.allItems=r;this.display=f=!!r.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;r.forEach(this.renderItem,this);r.forEach(this.layoutItem,this);r=(this.widthOption||this.offsetWidth)+m;var e=this.lastItemY+this.lastLineHeight+this.titleHeight;e=this.handleOverflow(e);e+=m;d||(this.box=d=b.rect().addClass("highcharts-legend-box").attr({r:g.borderRadius}).add(a),d.isNew=!0);c.styledMode||d.attr({stroke:g.borderColor,
"stroke-width":g.borderWidth||0,fill:g.backgroundColor||"none"}).shadow(g.shadow);0<r&&0<e&&(d[d.isNew?"attr":"animate"](d.crisp.call({},{x:0,y:0,width:r,height:e},d.strokeWidth())),d.isNew=!1);d[f?"show":"hide"]();c.styledMode&&"none"===a.getStyle("display")&&(r=e=0);this.legendWidth=r;this.legendHeight=e;f&&(b=c.spacingBox,d=b.y,/(lth|ct|rth)/.test(this.getAlignment())&&0<c.titleOffset[0]?d+=c.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<c.titleOffset[2]&&(d-=c.titleOffset[2]),d!==
b.y&&(b=w(b,{y:d})),a.align(w(g,{width:r,height:e,verticalAlign:this.proximate?"top":g.verticalAlign}),!0,b));this.proximate||this.positionItems();z(this,"afterRender")},handleOverflow:function(c){var b=this,a=this.chart,f=a.renderer,d=this.options,h=d.y,g=this.padding;h=a.spacingBox.height+("top"===d.verticalAlign?-h:h)-g;var r=d.maxHeight,e,k=this.clipRect,u=d.navigation,H=D(u.animation,!0),G=u.arrowSize||12,A=this.nav,m=this.pages,L,q=this.allItems,p=function(a){"number"===typeof a?k.attr({height:a}):
k&&(b.clipRect=k.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+g+"px,9999px,"+(g+a)+"px,0)":"auto")},z=function(e){b[e]=f.circle(0,0,1.3*G).translate(G/2,G/2).add(A);a.styledMode||b[e].attr("fill","rgba(0,0,0,0.0001)");return b[e]};"horizontal"!==d.layout||"middle"===d.verticalAlign||d.floating||(h/=2);r&&(h=Math.min(h,r));m.length=0;c>h&&!1!==u.enabled?(this.clipHeight=e=Math.max(h-20-this.titleHeight-g,0),this.currentPage=D(this.currentPage,1),this.fullHeight=
c,q.forEach(function(a,b){var c=a._legendItemPos[1],k=Math.round(a.legendItem.getBBox().height),f=m.length;if(!f||c-m[f-1]>e&&(L||c)!==m[f-1])m.push(L||c),f++;a.pageIx=f-1;L&&(q[b-1].pageIx=f-1);b===q.length-1&&c+k-m[f-1]>e&&c!==L&&(m.push(c),a.pageIx=f);c!==L&&(L=c)}),k||(k=b.clipRect=f.clipRect(0,g,9999,0),b.contentGroup.clip(k)),p(e),A||(this.nav=A=f.g().attr({zIndex:1}).add(this.group),this.up=f.symbol("triangle",0,0,G,G).add(A),z("upTracker").on("click",function(){b.scroll(-1,H)}),this.pager=
f.text("",15,10).addClass("highcharts-legend-navigation"),a.styledMode||this.pager.css(u.style),this.pager.add(A),this.down=f.symbol("triangle-down",0,0,G,G).add(A),z("downTracker").on("click",function(){b.scroll(1,H)})),b.scroll(0),c=h):A&&(p(),this.nav=A.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return c},scroll:function(c,b){var a=this,f=this.chart,h=this.pages,g=h.length,m=this.currentPage+c;c=this.clipHeight;var r=this.options.navigation,e=this.pager,k=this.padding;m>
g&&(m=g);0<m&&("undefined"!==typeof b&&v(b,f),this.nav.attr({translateX:k,translateY:c+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(a){a.attr({"class":1===m?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),e.attr({text:m+"/"+g}),[this.down,this.downTracker].forEach(function(a){a.attr({x:18+this.pager.getBBox().width,"class":m===g?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),f.styledMode||(this.up.attr({fill:1===
m?r.inactiveColor:r.activeColor}),this.upTracker.css({cursor:1===m?"default":"pointer"}),this.down.attr({fill:m===g?r.inactiveColor:r.activeColor}),this.downTracker.css({cursor:m===g?"default":"pointer"})),this.scrollOffset=-h[m-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=m,this.positionCheckboxes(),b=d.animObject(D(b,f.renderer.globalAnimation,!0)),C(function(){z(a,"afterScroll",{currentPage:m})},b.duration||0))}};d.LegendSymbolMixin={drawRectangle:function(c,
b){var a=c.symbolHeight,f=c.options.squareSymbol;b.legendSymbol=this.chart.renderer.rect(f?(c.symbolWidth-a)/2:0,c.baseline-a+1,f?a:c.symbolWidth,a,D(c.options.symbolRadius,a/2)).addClass("highcharts-point").attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(c){var b=this.options,a=b.marker,f=c.symbolWidth,d=c.symbolHeight,h=d/2,g=this.chart.renderer,r=this.legendGroup;c=c.baseline-Math.round(.3*c.fontMetrics.b);var e={};this.chart.styledMode||(e={"stroke-width":b.lineWidth||0},b.dashStyle&&
(e.dashstyle=b.dashStyle));this.legendLine=g.path(["M",0,c,"L",f,c]).addClass("highcharts-graph").attr(e).add(r);a&&!1!==a.enabled&&f&&(b=Math.min(D(a.radius,h),h),0===this.symbol.indexOf("url")&&(a=w(a,{width:d,height:d}),b=0),this.legendSymbol=a=g.symbol(this.symbol,f/2-b,c-b,2*b,2*b,a).addClass("highcharts-point").add(r),a.isMarker=!0)}};(/Trident\/7\.0/.test(f.navigator&&f.navigator.userAgent)||m)&&g(d.Legend.prototype,"positionItem",function(c,b){var a=this,f=function(){b._legendItemPos&&c.call(a,
b)};f();a.bubbleLegend||setTimeout(f)})});K(y,"parts/Chart.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.animObject,F=g.attr,E=g.defined,D=g.discardElement,x=g.erase,v=g.extend,C=g.isArray,B=g.isNumber,p=g.isObject,z=g.isString,m=g.numberFormat,q=g.objectEach,w=g.pick,h=g.pInt,f=g.relativeLength,c=g.setAnimation,b=g.splat,a=g.syncTimeout,l=d.addEvent,n=d.animate,t=d.doc,I=d.Axis,r=d.createElement,e=d.defaultOptions,k=d.charts,u=d.css,H=d.find,G=d.fireEvent,A=d.Legend,J=
d.marginNames,L=d.merge,Q=d.Pointer,V=d.removeEvent,U=d.seriesTypes,P=d.win,O=d.Chart=function(){this.getArgs.apply(this,arguments)};d.chart=function(a,e,b){return new O(a,e,b)};v(O.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(z(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(a,b){var c,f=a.series,u=a.plotOptions||{};G(this,"init",{args:arguments},function(){a.series=null;c=L(e,a);q(c.plotOptions,function(a,e){p(a)&&(a.tooltip=u[e]&&
L(u[e].tooltip)||void 0)});c.tooltip.userOptions=a.chart&&a.chart.forExport&&a.tooltip.userOptions||a.tooltip;c.series=a.series=f;this.userOptions=a;var h=c.chart,g=h.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.labelCollectors=[];this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.time=a.time&&Object.keys(a.time).length?new d.Time(a.time):d.time;this.numberFormatter=h.numberFormatter||m;this.styledMode=h.styledMode;this.hasCartesianSeries=h.showAxes;
var r=this;r.index=k.length;k.push(r);d.chartCount++;g&&q(g,function(a,e){d.isFunction(a)&&l(r,e,a)});r.xAxis=[];r.yAxis=[];r.pointCount=r.colorCounter=r.symbolCounter=0;G(r,"afterInit");r.firstRender()})},initSeries:function(a){var e=this.options.chart;e=a.type||e.type||e.defaultSeriesType;var b=U[e];b||d.error(17,!0,this,{missingModuleFor:e});e=new b;e.init(this,a);return e},setSeriesData:function(){this.getSeriesOrderByLinks().forEach(function(a){a.points||a.data||!a.enabledDataSorting||a.setData(a.options.data,
!1)})},getSeriesOrderByLinks:function(){return this.series.concat().sort(function(a,e){return a.linkedSeries.length||e.linkedSeries.length?e.linkedSeries.length-a.linkedSeries.length:0})},orderSeries:function(a){var e=this.series;for(a=a||0;a<e.length;a++)e[a]&&(e[a].index=a,e[a].name=e[a].getName())},isInsidePlot:function(a,e,b){var c=b?e:a;a=b?a:e;return 0<=c&&c<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(a){G(this,"beforeRedraw");var e=this.axes,b=this.series,k=this.pointer,f=this.legend,
d=this.userOptions.legend,u=this.isDirtyLegend,l=this.hasCartesianSeries,h=this.isDirtyBox,g=this.renderer,r=g.isHidden(),A=[];this.setResponsive&&this.setResponsive(!1);c(a,this);r&&this.temporaryDisplay();this.layOutTitles();for(a=b.length;a--;){var H=b[a];if(H.options.stacking){var t=!0;if(H.isDirty){var n=!0;break}}}if(n)for(a=b.length;a--;)H=b[a],H.options.stacking&&(H.isDirty=!0);b.forEach(function(a){a.isDirty&&("point"===a.options.legendType?(a.updateTotals&&a.updateTotals(),u=!0):d&&(d.labelFormatter||
d.labelFormat)&&(u=!0));a.isDirtyData&&G(a,"updatedData")});u&&f&&f.options.enabled&&(f.render(),this.isDirtyLegend=!1);t&&this.getStacks();l&&e.forEach(function(a){a.updateNames();a.setScale()});this.getMargins();l&&(e.forEach(function(a){a.isDirty&&(h=!0)}),e.forEach(function(a){var e=a.min+","+a.max;a.extKey!==e&&(a.extKey=e,A.push(function(){G(a,"afterSetExtremes",v(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(h||t)&&a.redraw()}));h&&this.drawChartBox();G(this,"predraw");b.forEach(function(a){(h||
a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});k&&k.reset(!0);g.draw();G(this,"redraw");G(this,"render");r&&this.temporaryDisplay(!0);A.forEach(function(a){a.call()})},get:function(a){function e(e){return e.id===a||e.options&&e.options.id===a}var b=this.series,c;var k=H(this.axes,e)||H(this.series,e);for(c=0;!k&&c<b.length;c++)k=H(b[c].points||[],e);return k},getAxes:function(){var a=this,e=this.options,c=e.xAxis=b(e.xAxis||{});e=e.yAxis=b(e.yAxis||{});G(this,"getAxes");c.forEach(function(a,
e){a.index=e;a.isX=!0});e.forEach(function(a,e){a.index=e});c.concat(e).forEach(function(e){new I(a,e)});G(this,"afterGetAxes")},getSelectedPoints:function(){var a=[];this.series.forEach(function(e){a=a.concat((e[e.hasGroupedData?"points":"data"]||[]).filter(function(a){return w(a.selectedStaging,a.selected)}))});return a},getSelectedSeries:function(){return this.series.filter(function(a){return a.selected})},setTitle:function(a,e,b){this.applyDescription("title",a);this.applyDescription("subtitle",
e);this.applyDescription("caption",void 0);this.layOutTitles(b)},applyDescription:function(a,e){var b=this,c="title"===a?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};c=this.options[a]=L(!this.styledMode&&{style:c},this.options[a],e);var k=this[a];k&&e&&(this[a]=k=k.destroy());c&&!k&&(k=this.renderer.text(c.text,0,0,c.useHTML).attr({align:c.align,"class":"highcharts-"+a,zIndex:c.zIndex||4}).add(),k.update=function(e){b[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[a]](e)},
this.styledMode||k.css(c.style),this[a]=k)},layOutTitles:function(a){var e=[0,0,0],b=this.renderer,c=this.spacingBox;["title","subtitle","caption"].forEach(function(a){var k=this[a],f=this.options[a],d=f.verticalAlign||"top";a="title"===a?-3:"top"===d?e[0]+2:0;if(k){if(!this.styledMode)var u=f.style.fontSize;u=b.fontMetrics(u,k).b;k.css({width:(f.width||c.width+(f.widthAdjust||0))+"px"});var l=Math.round(k.getBBox(f.useHTML).height);k.align(v({y:"bottom"===d?u:a+u,height:l},f),!1,"spacingBox");f.floating||
("top"===d?e[0]=Math.ceil(e[0]+l):"bottom"===d&&(e[2]=Math.ceil(e[2]+l)))}},this);e[0]&&"top"===(this.options.title.verticalAlign||"top")&&(e[0]+=this.options.title.margin);e[2]&&"bottom"===this.options.caption.verticalAlign&&(e[2]+=this.options.caption.margin);var k=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e;G(this,"afterLayOutTitles");!this.isDirtyBox&&k&&(this.isDirtyBox=this.isDirtyLegend=k,this.hasRendered&&w(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=
this.options.chart,e=a.width;a=a.height;var b=this.renderTo;E(e)||(this.containerWidth=d.getStyle(b,"width"));E(a)||(this.containerHeight=d.getStyle(b,"height"));this.chartWidth=Math.max(0,e||this.containerWidth||600);this.chartHeight=Math.max(0,f(a,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(a){var e=this.renderTo;if(a)for(;e&&e.style;)e.hcOrigStyle&&(d.css(e,e.hcOrigStyle),delete e.hcOrigStyle),e.hcOrigDetached&&(t.body.removeChild(e),e.hcOrigDetached=
!1),e=e.parentNode;else for(;e&&e.style;){t.body.contains(e)||e.parentNode||(e.hcOrigDetached=!0,t.body.appendChild(e));if("none"===d.getStyle(e,"display",!1)||e.hcOricDetached)e.hcOrigStyle={display:e.style.display,height:e.style.height,overflow:e.style.overflow},a={display:"block",overflow:"hidden"},e!==this.renderTo&&(a.height=0),d.css(e,a),e.offsetWidth||e.style.setProperty("display","block","important");e=e.parentNode;if(e===t.body)break}},setClassName:function(a){this.container.className="highcharts-container "+
(a||"")},getContainer:function(){var a=this.options,e=a.chart;var b=this.renderTo;var c=d.uniqueKey(),f,l;b||(this.renderTo=b=e.renderTo);z(b)&&(this.renderTo=b=t.getElementById(b));b||d.error(13,!0,this);var g=h(F(b,"data-highcharts-chart"));B(g)&&k[g]&&k[g].hasRendered&&k[g].destroy();F(b,"data-highcharts-chart",this.index);b.innerHTML="";e.skipClone||b.offsetWidth||this.temporaryDisplay();this.getChartSize();g=this.chartWidth;var A=this.chartHeight;u(b,{overflow:"hidden"});this.styledMode||(f=
v({position:"relative",overflow:"hidden",width:g+"px",height:A+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},e.style));this.container=b=r("div",{id:c},f,b);this._cursor=b.style.cursor;this.renderer=new (d[e.renderer]||d.Renderer)(b,g,A,null,e.forExport,a.exporting&&a.exporting.allowHTML,this.styledMode);this.setClassName(e.className);if(this.styledMode)for(l in a.defs)this.renderer.definition(a.defs[l]);else this.renderer.setStyle(e.style);this.renderer.chartIndex=
this.index;G(this,"afterGetContainer")},getMargins:function(a){var e=this.spacing,b=this.margin,c=this.titleOffset;this.resetMargins();c[0]&&!E(b[0])&&(this.plotTop=Math.max(this.plotTop,c[0]+e[0]));c[2]&&!E(b[2])&&(this.marginBottom=Math.max(this.marginBottom,c[2]+e[2]));this.legend&&this.legend.display&&this.legend.adjustMargins(b,e);G(this,"getMargins");a||this.getAxisMargins()},getAxisMargins:function(){var a=this,e=a.axisOffset=[0,0,0,0],b=a.colorAxis,c=a.margin,k=function(a){a.forEach(function(a){a.visible&&
a.getOffset()})};a.hasCartesianSeries?k(a.axes):b&&b.length&&k(b);J.forEach(function(b,k){E(c[k])||(a[b]+=e[k])});a.setChartSize()},reflow:function(e){var b=this,c=b.options.chart,k=b.renderTo,f=E(c.width)&&E(c.height),u=c.width||d.getStyle(k,"width");c=c.height||d.getStyle(k,"height");k=e?e.target:P;if(!f&&!b.isPrinting&&u&&c&&(k===P||k===t)){if(u!==b.containerWidth||c!==b.containerHeight)d.clearTimeout(b.reflowTimeout),b.reflowTimeout=a(function(){b.container&&b.setSize(void 0,void 0,!1)},e?100:
0);b.containerWidth=u;b.containerHeight=c}},setReflow:function(a){var e=this;!1===a||this.unbindReflow?!1===a&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=l(P,"resize",function(a){e.options&&e.reflow(a)}),l(this,"destroy",this.unbindReflow))},setSize:function(e,b,k){var f=this,d=f.renderer;f.isResizing+=1;c(k,f);f.oldChartHeight=f.chartHeight;f.oldChartWidth=f.chartWidth;"undefined"!==typeof e&&(f.options.chart.width=e);"undefined"!==typeof b&&(f.options.chart.height=
b);f.getChartSize();if(!f.styledMode){var l=d.globalAnimation;(l?n:u)(f.container,{width:f.chartWidth+"px",height:f.chartHeight+"px"},l)}f.setChartSize(!0);d.setSize(f.chartWidth,f.chartHeight,k);f.axes.forEach(function(a){a.isDirty=!0;a.setScale()});f.isDirtyLegend=!0;f.isDirtyBox=!0;f.layOutTitles();f.getMargins();f.redraw(k);f.oldChartHeight=null;G(f,"resize");a(function(){f&&G(f,"endResize",null,function(){--f.isResizing})},y(l).duration||0)},setChartSize:function(a){var e=this.inverted,b=this.renderer,
c=this.chartWidth,k=this.chartHeight,f=this.options.chart,d=this.spacing,u=this.clipOffset,l,h,g,r;this.plotLeft=l=Math.round(this.plotLeft);this.plotTop=h=Math.round(this.plotTop);this.plotWidth=g=Math.max(0,Math.round(c-l-this.marginRight));this.plotHeight=r=Math.max(0,Math.round(k-h-this.marginBottom));this.plotSizeX=e?r:g;this.plotSizeY=e?g:r;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=b.spacingBox={x:d[3],y:d[0],width:c-d[3]-d[1],height:k-d[0]-d[2]};this.plotBox=b.plotBox={x:l,
y:h,width:g,height:r};c=2*Math.floor(this.plotBorderWidth/2);e=Math.ceil(Math.max(c,u[3])/2);b=Math.ceil(Math.max(c,u[0])/2);this.clipBox={x:e,y:b,width:Math.floor(this.plotSizeX-Math.max(c,u[1])/2-e),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(c,u[2])/2-b))};a||this.axes.forEach(function(a){a.setAxisSize();a.setAxisTranslation()});G(this,"afterSetChartSize",{skipAxes:a})},resetMargins:function(){G(this,"resetMargins");var a=this,e=a.options.chart;["margin","spacing"].forEach(function(b){var c=
e[b],k=p(c)?c:[c,c,c,c];["Top","Right","Bottom","Left"].forEach(function(c,f){a[b][f]=w(e[b+c],k[f])})});J.forEach(function(e,b){a[e]=w(a.margin[b],a.spacing[b])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,e=this.renderer,b=this.chartWidth,c=this.chartHeight,k=this.chartBackground,f=this.plotBackground,d=this.plotBorder,u=this.styledMode,l=this.plotBGImage,h=a.backgroundColor,g=a.plotBackgroundColor,r=a.plotBackgroundImage,A,H=this.plotLeft,t=
this.plotTop,n=this.plotWidth,m=this.plotHeight,L=this.plotBox,J=this.clipRect,q=this.clipBox,p="animate";k||(this.chartBackground=k=e.rect().addClass("highcharts-background").add(),p="attr");if(u)var z=A=k.strokeWidth();else{z=a.borderWidth||0;A=z+(a.shadow?8:0);h={fill:h||"none"};if(z||k["stroke-width"])h.stroke=a.borderColor,h["stroke-width"]=z;k.attr(h).shadow(a.shadow)}k[p]({x:A/2,y:A/2,width:b-A-z%2,height:c-A-z%2,r:a.borderRadius});p="animate";f||(p="attr",this.plotBackground=f=e.rect().addClass("highcharts-plot-background").add());
f[p](L);u||(f.attr({fill:g||"none"}).shadow(a.plotShadow),r&&(l?(r!==l.attr("href")&&l.attr("href",r),l.animate(L)):this.plotBGImage=e.image(r,H,t,n,m).add()));J?J.animate({width:q.width,height:q.height}):this.clipRect=e.clipRect(q);p="animate";d||(p="attr",this.plotBorder=d=e.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());u||d.attr({stroke:a.plotBorderColor,"stroke-width":a.plotBorderWidth||0,fill:"none"});d[p](d.crisp({x:H,y:t,width:n,height:m},-d.strokeWidth()));this.isDirtyBox=
!1;G(this,"afterDrawChartBox")},propFromSeries:function(){var a=this,e=a.options.chart,b,c=a.options.series,k,f;["inverted","angular","polar"].forEach(function(d){b=U[e.type||e.defaultSeriesType];f=e[d]||b&&b.prototype[d];for(k=c&&c.length;!f&&k--;)(b=U[c[k].type])&&b.prototype[d]&&(f=!0);a[d]=f})},linkSeries:function(){var a=this,e=a.series;e.forEach(function(a){a.linkedSeries.length=0});e.forEach(function(e){var b=e.options.linkedTo;z(b)&&(b=":previous"===b?a.series[e.index-1]:a.get(b))&&b.linkedParent!==
e&&(b.linkedSeries.push(e),e.linkedParent=b,b.enabledDataSorting&&e.setDataSortingOptions(),e.visible=w(e.options.visible,b.options.visible,e.visible))});G(this,"afterLinkSeries")},renderSeries:function(){this.series.forEach(function(a){a.translate();a.render()})},renderLabels:function(){var a=this,e=a.options.labels;e.items&&e.items.forEach(function(b){var c=v(e.style,b.style),k=h(c.left)+a.plotLeft,f=h(c.top)+a.plotTop+12;delete c.left;delete c.top;a.renderer.text(b.html,k,f).attr({zIndex:2}).css(c).add()})},
render:function(){var a=this.axes,e=this.colorAxis,b=this.renderer,c=this.options,k=0,f=function(a){a.forEach(function(a){a.visible&&a.render()})};this.setTitle();this.legend=new A(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;a.some(function(a){if(a.horiz&&a.visible&&a.options.labels.enabled&&a.series.length)return k=21,!0});var d=this.plotHeight=Math.max(this.plotHeight-k,0);a.forEach(function(a){a.setScale()});this.getAxisMargins();var u=
1.1<c/this.plotWidth;var l=1.05<d/this.plotHeight;if(u||l)a.forEach(function(a){(a.horiz&&u||!a.horiz&&l)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries?f(a):e&&e.length&&f(e);this.seriesGroup||(this.seriesGroup=b.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.updateContainerScaling();this.hasRendered=!0},addCredits:function(a){var e=this;a=L(!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&&(P.location.href=a.href)}).attr({align:a.position.align,zIndex:8}),e.styledMode||this.credits.css(a.style),this.credits.add().align(a.position),this.credits.update=function(a){e.credits=e.credits.destroy();e.addCredits(a)})},updateContainerScaling:function(){var a=this.container;if(a.offsetWidth&&a.offsetHeight&&a.getBoundingClientRect){var e=
a.getBoundingClientRect(),b=e.width/a.offsetWidth;a=e.height/a.offsetHeight;1!==b||1!==a?this.containerScaling={scaleX:b,scaleY:a}:delete this.containerScaling}},destroy:function(){var a=this,e=a.axes,b=a.series,c=a.container,f,u=c&&c.parentNode;G(a,"destroy");a.renderer.forExport?x(k,a):k[a.index]=void 0;d.chartCount--;a.renderTo.removeAttribute("data-highcharts-chart");V(a);for(f=e.length;f--;)e[f]=e[f].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(f=b.length;f--;)b[f]=
b[f].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(e){var b=a[e];b&&b.destroy&&(a[e]=b.destroy())});c&&(c.innerHTML="",V(c),u&&D(c));q(a,function(e,b){delete a[b]})},firstRender:function(){var a=this,e=a.options;if(!a.isReadyToRender||a.isReadyToRender()){a.getContainer();a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();(C(e.series)?
e.series:[]).forEach(function(e){a.initSeries(e)});a.linkSeries();a.setSeriesData();G(a,"beforeRender");Q&&(a.pointer=new Q(a,e));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){this.callbacks.concat([this.callback]).forEach(function(a){a&&"undefined"!==typeof this.index&&a.apply(this,[this])},this);G(this,"load");G(this,"render");E(this.index)&&this.setReflow(this.options.chart.reflow);this.onload=null}})});K(y,"parts/ScrollablePlotArea.js",[y["parts/Globals.js"],
y["parts/Utilities.js"]],function(d,g){var y=g.pick,F=d.addEvent;g=d.Chart;"";F(g,"afterSetChartSize",function(g){var D=this.options.chart.scrollablePlotArea,x=D&&D.minWidth;D=D&&D.minHeight;if(!this.renderer.forExport){if(x){if(this.scrollablePixelsX=x=Math.max(0,x-this.chartWidth)){this.plotWidth+=x;this.inverted?(this.clipBox.height+=x,this.plotBox.height+=x):(this.clipBox.width+=x,this.plotBox.width+=x);var v={1:{name:"right",value:x}}}}else D&&(this.scrollablePixelsY=x=Math.max(0,D-this.chartHeight))&&
(this.plotHeight+=x,this.inverted?(this.clipBox.width+=x,this.plotBox.width+=x):(this.clipBox.height+=x,this.plotBox.height+=x),v={2:{name:"bottom",value:x}});v&&!g.skipAxes&&this.axes.forEach(function(g){v[g.side]?g.getPlotLinePath=function(){var x=v[g.side].name,p=this[x];this[x]=p-v[g.side].value;var z=d.Axis.prototype.getPlotLinePath.apply(this,arguments);this[x]=p;return z}:(g.setAxisSize(),g.setAxisTranslation())})}});F(g,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&
this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()});g.prototype.setUpScrolling=function(){var g={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(g.overflowX="auto");this.scrollablePixelsY&&(g.overflowY="auto");this.scrollingContainer=d.createElement("div",{className:"highcharts-scrolling"},g,this.renderTo);this.innerContainer=d.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer);this.innerContainer.appendChild(this.container);
this.setUpScrolling=null};g.prototype.moveFixedElements=function(){var d=this.container,g=this.fixedRenderer,x=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),v;this.scrollablePixelsX&&!this.inverted?v=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?
v=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?v=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(v=".highcharts-yaxis");x.push(v,v+"-labels");x.forEach(function(v){[].forEach.call(d.querySelectorAll(v),function(d){(d.namespaceURI===g.SVG_NS?g.box:g.box.parentNode).appendChild(d);d.style.pointerEvents="auto"})})};g.prototype.applyFixed=function(){var g,D=!this.fixedDiv,x=this.options.chart.scrollablePlotArea;D?(this.fixedDiv=d.createElement("div",{className:"highcharts-fixed"},
{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.renderTo.style.overflow="visible",this.fixedRenderer=g=new d.Renderer(this.fixedDiv,this.chartWidth,this.chartHeight),this.scrollableMask=g.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":y(x.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),this.moveFixedElements(),F(this,"afterShowResetZoom",this.moveFixedElements),
F(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight);g=this.chartWidth+(this.scrollablePixelsX||0);var v=this.chartHeight+(this.scrollablePixelsY||0);d.stop(this.container);this.container.style.width=g+"px";this.container.style.height=v+"px";this.renderer.boxWrapper.attr({width:g,height:v,viewBox:[0,0,g,v].join(" ")});this.chartBackground.attr({width:g,height:v});this.scrollablePixelsY&&(this.scrollingContainer.style.height=this.chartHeight+
"px");D&&(x.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*x.scrollPositionX),x.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*x.scrollPositionY));v=this.axisOffset;D=this.plotTop-v[0]-1;x=this.plotLeft-v[3]-1;g=this.plotTop+this.plotHeight+v[2]+1;v=this.plotLeft+this.plotWidth+v[1]+1;var C=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),B=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);D=this.scrollablePixelsX?["M",0,D,"L",
this.plotLeft-1,D,"L",this.plotLeft-1,g,"L",0,g,"Z","M",C,D,"L",this.chartWidth,D,"L",this.chartWidth,g,"L",C,g,"Z"]:this.scrollablePixelsY?["M",x,0,"L",x,this.plotTop-1,"L",v,this.plotTop-1,"L",v,0,"Z","M",x,B,"L",x,this.chartHeight,"L",v,this.chartHeight,"L",v,B,"Z"]:["M",0,0];"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:D})}});K(y,"parts/Point.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.animObject,F=g.defined,E=g.erase,D=g.extend,x=g.isArray,v=
g.isNumber,C=g.isObject,B=g.syncTimeout,p=g.pick,z,m=d.fireEvent,q=d.format,w=d.uniqueKey,h=d.removeEvent;d.Point=z=function(){};d.Point.prototype={init:function(f,c,b){this.series=f;this.applyOptions(c,b);this.id=F(this.id)?this.id:w();this.resolveColor();f.chart.pointCount++;m(this,"afterInit");return this},resolveColor:function(){var f=this.series;var c=f.chart.options.chart.colorCount;var b=f.chart.styledMode;b||this.options.color||(this.color=f.color);f.options.colorByPoint?(b||(c=f.options.colors||
f.chart.options.colors,this.color=this.color||c[f.colorCounter],c=c.length),b=f.colorCounter,f.colorCounter++,f.colorCounter===c&&(f.colorCounter=0)):b=f.colorIndex;this.colorIndex=p(this.colorIndex,b)},applyOptions:function(f,c){var b=this.series,a=b.options.pointValKey||b.pointValKey;f=z.prototype.optionsToObject.call(this,f);D(this,f);this.options=this.options?D(this.options,f):f;f.group&&delete this.group;f.dataLabels&&delete this.dataLabels;a&&(this.y=this[a]);this.formatPrefix=(this.isNull=
p(this.isValid&&!this.isValid(),null===this.x||!v(this.y)))?"null":"point";this.selected&&(this.state="select");"name"in this&&"undefined"===typeof c&&b.xAxis&&b.xAxis.hasNames&&(this.x=b.xAxis.nameToX(this));"undefined"===typeof this.x&&b&&(this.x="undefined"===typeof c?b.autoIncrement(this):c);return this},setNestedProperty:function(f,c,b){b.split(".").reduce(function(a,b,f,d){a[b]=d.length-1===f?c:C(a[b],!0)?a[b]:{};return a[b]},f);return f},optionsToObject:function(f){var c={},b=this.series,a=
b.options.keys,l=a||b.pointArrayMap||["y"],h=l.length,g=0,m=0;if(v(f)||null===f)c[l[0]]=f;else if(x(f))for(!a&&f.length>h&&(b=typeof f[0],"string"===b?c.name=f[0]:"number"===b&&(c.x=f[0]),g++);m<h;)a&&"undefined"===typeof f[g]||(0<l[m].indexOf(".")?d.Point.prototype.setNestedProperty(c,f[g],l[m]):c[l[m]]=f[g]),g++,m++;else"object"===typeof f&&(c=f,f.dataLabels&&(b._hasPointLabels=!0),f.marker&&(b._hasPointMarkers=!0));return c},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":
"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+("undefined"!==typeof 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 f=this.series,c=f.zones;f=f.zoneAxis||"y";var b=0,a;for(a=c[b];this[f]>=a.value;)a=c[++b];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=a&&a.color&&
!this.options.color?a.color:this.nonZonedColor;return a},hasNewShapeType:function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},destroy:function(){function f(){d&&(c.setState(),E(d,c),d.length||(a.hoverPoints=null));if(c===a.hoverPoint)c.onMouseOut();if(c.graphic||c.dataLabel||c.dataLabels)h(c),c.destroyElements();for(t in c)c[t]=null}var c=this,b=c.series,a=b.chart;b=b.options.dataSorting;var d=a.hoverPoints,g=y(c.series.chart.renderer.globalAnimation),
t;b&&b.enabled?(this.animateBeforeDestroy(),B(f,g.duration)):f();a.pointCount--;c.legendItem&&a.legend.destroyItem(c)},animateBeforeDestroy:function(){var f=this,c={x:f.startXPos,opacity:0},b,a=f.getGraphicalProps();a.singular.forEach(function(a){b="dataLabel"===a;f[a]=f[a].animate(b?{x:f[a].startXPos,y:f[a].startYPos,opacity:0}:c)});a.plural.forEach(function(a){f[a].forEach(function(a){a.element&&a.animate(D({x:f.startXPos},a.startYPos?{x:a.startXPos,y:a.startYPos}:{}))})})},destroyElements:function(f){var c=
this;f=c.getGraphicalProps(f);f.singular.forEach(function(b){c[b]=c[b].destroy()});f.plural.forEach(function(b){c[b].forEach(function(a){a.element&&a.destroy()});delete c[b]})},getGraphicalProps:function(f){var c=this,b=[],a,d={singular:[],plural:[]};f=f||{graphic:1,dataLabel:1};f.graphic&&b.push("graphic","shadowGroup");f.dataLabel&&b.push("dataLabel","dataLabelUpper","connector");for(a=b.length;a--;){var h=b[a];c[h]&&d.singular.push(h)}["dataLabel","connector"].forEach(function(a){var b=a+"s";f[a]&&
c[b]&&d.plural.push(b)});return d},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(f){var c=this.series,b=c.tooltipOptions,a=p(b.valueDecimals,""),d=b.valuePrefix||"",h=b.valueSuffix||"";c.chart.styledMode&&(f=c.chart.tooltip.styledModeFormat(f));(c.pointArrayMap||["y"]).forEach(function(b){b="{point."+
b;if(d||h)f=f.replace(RegExp(b+"}","g"),d+b+"}"+h);f=f.replace(RegExp(b+"}","g"),b+":,."+a+"f}")});return q(f,{point:this,series:this.series},c.chart)},firePointEvent:function(f,c,b){var a=this,d=this.series.options;(d.point.events[f]||a.options&&a.options.events&&a.options.events[f])&&this.importEvents();"click"===f&&d.allowPointSelect&&(b=function(b){a.select&&a.select(null,b.ctrlKey||b.metaKey||b.shiftKey)});m(this,f,c,b)},visible:!0}});K(y,"parts/Series.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],
function(d,g){var y=g.animObject,F=g.arrayMax,E=g.arrayMin,D=g.clamp,x=g.correctFloat,v=g.defined,C=g.erase,B=g.extend,p=g.isArray,z=g.isNumber,m=g.isString,q=g.objectEach,w=g.pick,h=g.splat,f=g.syncTimeout,c=d.addEvent,b=d.defaultOptions,a=d.defaultPlotOptions,l=d.fireEvent,n=d.merge,t=d.removeEvent,I=d.SVGElement,r=d.win;d.Series=d.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,
radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){var a=this.series.chart.numberFormatter;return null===this.y?"":a(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,
states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"},{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,eventsToUnbind:[],isCartesian:!0,parallelArrays:["x","y"],pointClass:d.Point,requireSorting:!0,sorted:!0,init:function(a,b){l(this,"init",{options:b});var e=this,
k=a.series,f;this.eventOptions=this.eventOptions||{};e.chart=a;e.options=b=e.setOptions(b);e.linkedSeries=[];e.bindAxes();B(e,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});var h=b.events;q(h,function(a,b){d.isFunction(a)&&e.eventOptions[b]!==a&&(d.isFunction(e.eventOptions[b])&&t(e,b,e.eventOptions[b]),e.eventOptions[b]=a,c(e,b,a))});if(h&&h.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;e.getColor();e.getSymbol();e.parallelArrays.forEach(function(a){e[a+
"Data"]||(e[a+"Data"]=[])});e.isCartesian&&(a.hasCartesianSeries=!0);k.length&&(f=k[k.length-1]);e._i=w(f&&f._i,-1)+1;a.orderSeries(this.insert(k));b.dataSorting&&b.dataSorting.enabled?e.setDataSortingOptions():e.points||e.data||e.setData(b.data,!1);l(this,"afterInit")},insert:function(a){var e=this.options.index,b;if(z(e)){for(b=a.length;b--;)if(e>=w(a[b].options.index,a[b]._i)){a.splice(b+1,0,this);break}-1===b&&a.unshift(this);b+=1}else a.push(this);return w(b,a.length-1)},bindAxes:function(){var a=
this,b=a.options,c=a.chart,f;l(this,"bindAxes",null,function(){(a.axisTypes||[]).forEach(function(e){c[e].forEach(function(c){f=c.options;if(b[e]===f.index||"undefined"!==typeof b[e]&&b[e]===f.id||"undefined"===typeof b[e]&&0===f.index)a.insert(c.series),a[e]=c,c.isDirty=!0});a[e]||a.optionalAxis===e||d.error(18,!0,c)})})},updateParallelArrays:function(a,b){var e=a.series,c=arguments,k=z(b)?function(c){var k="y"===c&&e.toYData?e.toYData(a):a[c];e[c+"Data"][b]=k}:function(a){Array.prototype[b].apply(e[a+
"Data"],Array.prototype.slice.call(c,2))};e.parallelArrays.forEach(k)},hasData:function(){return this.visible&&"undefined"!==typeof this.dataMax&&"undefined"!==typeof this.dataMin||this.visible&&this.yData&&0<this.yData.length},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,f=a.pointIntervalUnit,d=this.chart.time;b=w(b,a.pointStart,0);this.pointInterval=c=w(this.pointInterval,a.pointInterval,1);f&&(a=new d.Date(b),"day"===f?d.set("Date",a,d.get("Date",a)+c):"month"===f?d.set("Month",
a,d.get("Month",a)+c):"year"===f&&d.set("FullYear",a,d.get("FullYear",a)+c),c=a.getTime()-b);this.xIncrement=b+c;return b},setDataSortingOptions:function(){var a=this.options;B(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1});v(a.pointRange)||(a.pointRange=1)},setOptions:function(a){var e=this.chart,c=e.options,f=c.plotOptions,d=e.userOptions||{};a=n(a);e=e.styledMode;var h={plotOptions:f,userOptions:a};l(this,"setOptions",h);var g=h.plotOptions[this.type],r=d.plotOptions||{};
this.userOptions=h.userOptions;d=n(g,f.series,d.plotOptions&&d.plotOptions[this.type],a);this.tooltipOptions=n(b.tooltip,b.plotOptions.series&&b.plotOptions.series.tooltip,b.plotOptions[this.type].tooltip,c.tooltip.userOptions,f.series&&f.series.tooltip,f[this.type].tooltip,a.tooltip);this.stickyTracking=w(a.stickyTracking,r[this.type]&&r[this.type].stickyTracking,r.series&&r.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:d.stickyTracking);null===g.marker&&delete d.marker;
this.zoneAxis=d.zoneAxis;c=this.zones=(d.zones||[]).slice();!d.negativeColor&&!d.negativeFillColor||d.zones||(f={value:d[this.zoneAxis+"Threshold"]||d.threshold||0,className:"highcharts-negative"},e||(f.color=d.negativeColor,f.fillColor=d.negativeFillColor),c.push(f));c.length&&v(c[c.length-1].value)&&c.push(e?{}:{color:this.color,fillColor:this.fillColor});l(this,"afterSetOptions",{options:d});return d},getName:function(){return w(this.options.name,"Series "+(this.index+1))},getCyclic:function(a,
b,c){var e=this.chart,f=this.userOptions,k=a+"Index",d=a+"Counter",u=c?c.length:w(e.options.chart[a+"Count"],e[a+"Count"]);if(!b){var h=w(f[k],f["_"+k]);v(h)||(e.series.length||(e[d]=0),f["_"+k]=h=e[d]%u,e[d]+=1);c&&(b=c[h])}"undefined"!==typeof h&&(this[k]=h);this[a]=b},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||a[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",
this.options.marker.symbol,this.chart.options.symbols)},findPointIndex:function(a,b){var e=a.id,c=a.x,f=this.points,k,h=this.options.dataSorting;if(e)var l=this.chart.get(e);else if(this.linkedParent||this.enabledDataSorting){var g=h&&h.matchByName?"name":"index";l=d.find(f,function(e){return!e.touched&&e[g]===a[g]});if(!l)return}if(l){var r=l&&l.index;"undefined"!==typeof r&&(k=!0)}"undefined"===typeof r&&z(c)&&(r=this.xData.indexOf(c,b));-1!==r&&"undefined"!==typeof r&&this.cropped&&(r=r>=this.cropStart?
r-this.cropStart:r);!k&&f[r]&&f[r].touched&&(r=void 0);return r},drawLegendSymbol:d.LegendSymbolMixin.drawLineMarker,updateData:function(a,b){var e=this.options,c=e.dataSorting,f=this.points,k=[],d,h,l,g=this.requireSorting,r=a.length===f.length,t=!0;this.xIncrement=null;a.forEach(function(a,b){var h=v(a)&&this.pointClass.prototype.optionsToObject.call({series:this},a)||{};var u=h.x;if(h.id||z(u)){if(u=this.findPointIndex(h,l),-1===u||"undefined"===typeof u?k.push(a):f[u]&&a!==e.data[u]?(f[u].update(a,
!1,null,!1),f[u].touched=!0,g&&(l=u+1)):f[u]&&(f[u].touched=!0),!r||b!==u||c&&c.enabled||this.hasDerivedData)d=!0}else k.push(a)},this);if(d)for(a=f.length;a--;)(h=f[a])&&!h.touched&&h.remove&&h.remove(!1,b);else!r||c&&c.enabled?t=!1:(a.forEach(function(a,e){f[e].update&&a!==f[e].y&&f[e].update(a,!1,null,!1)}),k.length=0);f.forEach(function(a){a&&(a.touched=!1)});if(!t)return!1;k.forEach(function(a){this.addPoint(a,!1,null,null,!1)},this);null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=
F(this.xData),this.autoIncrement());return!0},setData:function(a,b,c,f){var e=this,k=e.points,h=k&&k.length||0,l,u=e.options,g=e.chart,r=u.dataSorting,t=null,H=e.xAxis;t=u.turboThreshold;var n=this.xData,q=this.yData,v=(l=e.pointArrayMap)&&l.length,I=u.keys,x=0,C=1,B;a=a||[];l=a.length;b=w(b,!0);r&&r.enabled&&(a=this.sortData(a));!1!==f&&l&&h&&!e.cropped&&!e.hasGroupedData&&e.visible&&!e.isSeriesBoosting&&(B=this.updateData(a,c));if(!B){e.xIncrement=null;e.colorCounter=0;this.parallelArrays.forEach(function(a){e[a+
"Data"].length=0});if(t&&l>t)if(t=e.getFirstValidPoint(a),z(t))for(c=0;c<l;c++)n[c]=this.autoIncrement(),q[c]=a[c];else if(p(t))if(v)for(c=0;c<l;c++)f=a[c],n[c]=f[0],q[c]=f.slice(1,v+1);else for(I&&(x=I.indexOf("x"),C=I.indexOf("y"),x=0<=x?x:0,C=0<=C?C:1),c=0;c<l;c++)f=a[c],n[c]=f[x],q[c]=f[C];else d.error(12,!1,g);else for(c=0;c<l;c++)"undefined"!==typeof a[c]&&(f={series:e},e.pointClass.prototype.applyOptions.apply(f,[a[c]]),e.updateParallelArrays(f,c));q&&m(q[0])&&d.error(14,!0,g);e.data=[];e.options.data=
e.userOptions.data=a;for(c=h;c--;)k[c]&&k[c].destroy&&k[c].destroy();H&&(H.minRange=H.userMinRange);e.isDirty=g.isDirtyBox=!0;e.isDirtyData=!!k;c=!1}"point"===u.legendType&&(this.processData(),this.generatePoints());b&&g.redraw(c)},sortData:function(a){var e=this,b=e.options.dataSorting.sortKey||"y",c=function(a,e){return v(e)&&a.pointClass.prototype.optionsToObject.call({series:a},e)||{}};a.forEach(function(b,f){a[f]=c(e,b);a[f].index=f},this);a.concat().sort(function(a,e){return z(e[b])?e[b]-a[b]:
-1}).forEach(function(a,e){a.x=e},this);e.linkedSeries&&e.linkedSeries.forEach(function(e){var b=e.options,f=b.data;b.dataSorting&&b.dataSorting.enabled||!f||(f.forEach(function(b,k){f[k]=c(e,b);a[k]&&(f[k].x=a[k].x,f[k].index=k)}),e.setData(f,!1))});return a},processData:function(a){var e=this.xData,b=this.yData,c=e.length;var f=0;var h=this.xAxis,l=this.options;var g=l.cropThreshold;var r=this.getExtremesFromAll||l.getExtremesFromAll,t=this.isCartesian;l=h&&h.val2lin;var n=h&&h.isLog,m=this.requireSorting;
if(t&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(h){a=h.getExtremes();var q=a.min;var p=a.max}if(t&&this.sorted&&!r&&(!g||c>g||this.forceCrop))if(e[c-1]<q||e[0]>p)e=[],b=[];else if(this.yData&&(e[0]<q||e[c-1]>p)){f=this.cropData(this.xData,this.yData,q,p);e=f.xData;b=f.yData;f=f.start;var z=!0}for(g=e.length||1;--g;)if(c=n?l(e[g])-l(e[g-1]):e[g]-e[g-1],0<c&&("undefined"===typeof w||c<w))var w=c;else 0>c&&m&&(d.error(15,!1,this.chart),m=!1);this.cropped=z;this.cropStart=f;this.processedXData=
e;this.processedYData=b;this.closestPointRange=this.basePointRange=w},cropData:function(a,b,c,f,d){var e=a.length,k=0,h=e,l;d=w(d,this.cropShoulder);for(l=0;l<e;l++)if(a[l]>=c){k=Math.max(0,l-d);break}for(c=l;c<e;c++)if(a[c]>f){h=c+d;break}return{xData:a.slice(k,h),yData:b.slice(k,h),start:k,end:h}},generatePoints:function(){var a=this.options,b=a.data,c=this.data,f,d=this.processedXData,g=this.processedYData,r=this.pointClass,t=d.length,n=this.cropStart||0,m=this.hasGroupedData;a=a.keys;var q=[],
p;c||m||(c=[],c.length=b.length,c=this.data=c);a&&m&&(this.options.keys=!1);for(p=0;p<t;p++){var z=n+p;if(m){var w=(new r).init(this,[d[p]].concat(h(g[p])));w.dataGroup=this.groupMap[p];w.dataGroup.options&&(w.options=w.dataGroup.options,B(w,w.dataGroup.options),delete w.dataLabels)}else(w=c[z])||"undefined"===typeof b[z]||(c[z]=w=(new r).init(this,b[z],d[p]));w&&(w.index=z,q[p]=w)}this.options.keys=a;if(c&&(t!==(f=c.length)||m))for(p=0;p<f;p++)p!==n||m||(p+=t),c[p]&&(c[p].destroyElements(),c[p].plotX=
void 0);this.data=c;this.points=q;l(this,"afterGeneratePoints")},getXExtremes:function(a){return{min:E(a),max:F(a)}},getExtremes:function(a){var e=this.xAxis,b=this.yAxis,c=this.processedXData||this.xData,f=[],d=0,h=0;var g=0;var r=this.requireSorting?this.cropShoulder:0,t=b?b.positiveValuesOnly:!1,n;a=a||this.stackedYData||this.processedYData||[];b=a.length;e&&(g=e.getExtremes(),h=g.min,g=g.max);for(n=0;n<b;n++){var m=c[n];var q=a[n];var w=(z(q)||p(q))&&(q.length||0<q||!t);m=this.getExtremesFromAll||
this.options.getExtremesFromAll||this.cropped||!e||(c[n+r]||m)>=h&&(c[n-r]||m)<=g;if(w&&m)if(w=q.length)for(;w--;)z(q[w])&&(f[d++]=q[w]);else f[d++]=q}this.dataMin=E(f);this.dataMax=F(f);l(this,"afterGetExtremes")},getFirstValidPoint:function(a){for(var e=null,b=a.length,c=0;null===e&&c<b;)e=a[c],c++;return e},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,f=c.categories,d=this.enabledDataSorting,h=this.yAxis,g=this.points,
r=g.length,t=!!this.modifyValue,n,m=this.pointPlacementToXValue(),q=z(m),I=a.threshold,C=a.startFromThreshold?I:0,B,E=this.zoneAxis||"y",F=Number.MAX_VALUE;for(n=0;n<r;n++){var y=g[n],M=y.x;var R=y.y;var X=y.low,K=b&&h.stacks[(this.negStacks&&R<(C?0:I)?"-":"")+this.stackKey];h.positiveValuesOnly&&null!==R&&0>=R&&(y.isNull=!0);y.plotX=B=x(D(c.translate(M,0,0,0,1,m,"flags"===this.type),-1E5,1E5));if(b&&this.visible&&K&&K[M]){var aa=this.getStackIndicator(aa,M,this.index);if(!y.isNull){var W=K[M];var Y=
W.points[aa.key]}}p(Y)&&(X=Y[0],R=Y[1],X===C&&aa.key===K[M].base&&(X=w(z(I)&&I,h.min)),h.positiveValuesOnly&&0>=X&&(X=null),y.total=y.stackTotal=W.total,y.percentage=W.total&&y.y/W.total*100,y.stackY=R,this.irregularWidths||W.setOffset(this.pointXOffset||0,this.barW||0));y.yBottom=v(X)?D(h.translate(X,0,1,0,1),-1E5,1E5):null;t&&(R=this.modifyValue(R,y));y.plotY=R="number"===typeof R&&Infinity!==R?D(h.translate(R,0,1,0,1),-1E5,1E5):void 0;y.isInside="undefined"!==typeof R&&0<=R&&R<=h.len&&0<=B&&B<=
c.len;y.clientX=q?x(c.translate(M,0,0,0,1,m)):B;y.negative=y[E]<(a[E+"Threshold"]||I||0);y.category=f&&"undefined"!==typeof f[y.x]?f[y.x]:y.x;if(!y.isNull&&!1!==y.visible){"undefined"!==typeof S&&(F=Math.min(F,Math.abs(B-S)));var S=B}y.zone=this.zones.length&&y.getZone();!y.graphic&&this.group&&d&&(y.isNew=!0)}this.closestPointRangePx=F;l(this,"afterTranslate")},getValidPoints:function(a,b,c){var e=this.chart;return(a||this.points||[]).filter(function(a){return b&&!e.isInsidePlot(a.plotX,a.plotY,
e.inverted)?!1:!1!==a.visible&&(c||!a.isNull)})},getClipBox:function(a,b){var e=this.options,c=this.chart,f=c.inverted,k=this.xAxis,d=k&&this.yAxis;a&&!1===e.clip&&d?a=f?{y:-c.chartWidth+d.len+d.pos,height:c.chartWidth,width:c.chartHeight,x:-c.chartHeight+k.len+k.pos}:{y:-d.pos,height:c.chartHeight,width:c.chartWidth,x:-k.pos}:(a=this.clipBox||c.clipBox,b&&(a.width=c.plotSizeX,a.x=0));return b?{width:a.width,x:a.x}:a},setClip:function(a){var e=this.chart,b=this.options,c=e.renderer,f=e.inverted,d=
this.clipBox,h=this.getClipBox(a),l=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,h.height,b.xAxis,b.yAxis].join(),g=e[l],r=e[l+"m"];g||(a&&(h.width=0,f&&(h.x=e.plotSizeX+(!1!==b.clip?0:e.plotTop)),e[l+"m"]=r=c.clipRect(f?e.plotSizeX+99:-99,f?-e.plotLeft:-e.plotTop,99,f?e.chartWidth:e.chartHeight)),e[l]=g=c.clipRect(h),g.count={length:0});a&&!g.count[this.index]&&(g.count[this.index]=!0,g.count.length+=1);if(!1!==b.clip||a)this.group.clip(a||d?g:e.clipRect),this.markerGroup.clip(r),
this.sharedClipKey=l;a||(g.count[this.index]&&(delete g.count[this.index],--g.count.length),0===g.count.length&&l&&e[l]&&(d||(e[l]=e[l].destroy()),e[l+"m"]&&(e[l+"m"]=e[l+"m"].destroy())))},animate:function(a){var e=this.chart,b=y(this.options.animation);if(a)this.setClip(b);else{var c=this.sharedClipKey;a=e[c];var f=this.getClipBox(b,!0);a&&a.animate(f,b);e[c+"m"]&&e[c+"m"].animate({width:f.width+99,x:f.x-(e.inverted?0:99)},b);this.animate=null}},afterAnimate:function(){this.setClip();l(this,"afterAnimate");
this.finishedAnimating=!0},drawPoints:function(){var a=this.points,b=this.chart,c,f,d=this.options.marker,h=this[this.specialGroup]||this.markerGroup,l=this.xAxis,g=w(d.enabled,!l||l.isRadial?!0:null,this.closestPointRangePx>=d.enabledThreshold*d.radius);if(!1!==d.enabled||this._hasPointMarkers)for(c=0;c<a.length;c++){var r=a[c];var t=(f=r.graphic)?"animate":"attr";var n=r.marker||{};var m=!!r.marker;if((g&&"undefined"===typeof n.enabled||n.enabled)&&!r.isNull&&!1!==r.visible){var q=w(n.symbol,this.symbol);
var p=this.markerAttribs(r,r.selected&&"select");this.enabledDataSorting&&(r.startXPos=l.reversed?-p.width:l.width);var z=!1!==r.isInside;f?f[z?"show":"hide"](z).animate(p):z&&(0<p.width||r.hasImage)&&(r.graphic=f=b.renderer.symbol(q,p.x,p.y,p.width,p.height,m?n:d).add(h),this.enabledDataSorting&&b.hasRendered&&(f.attr({x:r.startXPos}),t="animate"));f&&"animate"===t&&f[z?"show":"hide"](z).animate(p);if(f&&!b.styledMode)f[t](this.pointAttribs(r,r.selected&&"select"));f&&f.addClass(r.getClassName(),
!0)}else f&&(r.graphic=f.destroy())}},markerAttribs:function(a,b){var e=this.options.marker,c=a.marker||{},f=c.symbol||e.symbol,k=w(c.radius,e.radius);b&&(e=e.states[b],b=c.states&&c.states[b],k=w(b&&b.radius,e&&e.radius,k+(e&&e.radiusPlus||0)));a.hasImage=f&&0===f.indexOf("url");a.hasImage&&(k=0);a={x:Math.floor(a.plotX)-k,y:a.plotY-k};k&&(a.width=a.height=2*k);return a},pointAttribs:function(a,b){var e=this.options.marker,c=a&&a.options,f=c&&c.marker||{},k=this.color,d=c&&c.color,h=a&&a.color;c=
w(f.lineWidth,e.lineWidth);var l=a&&a.zone&&a.zone.color;a=1;k=d||l||h||k;d=f.fillColor||e.fillColor||k;k=f.lineColor||e.lineColor||k;b=b||"normal";e=e.states[b];b=f.states&&f.states[b]||{};c=w(b.lineWidth,e.lineWidth,c+w(b.lineWidthPlus,e.lineWidthPlus,0));d=b.fillColor||e.fillColor||d;k=b.lineColor||e.lineColor||k;a=w(b.opacity,e.opacity,a);return{stroke:k,"stroke-width":c,fill:d,opacity:a}},destroy:function(a){var e=this,b=e.chart,c=/AppleWebKit\/533/.test(r.navigator.userAgent),f,h,g=e.data||
[],t,n;l(e,"destroy");this.removeEvents(a);(e.axisTypes||[]).forEach(function(a){(n=e[a])&&n.series&&(C(n.series,e),n.isDirty=n.forceRedraw=!0)});e.legendItem&&e.chart.legend.destroyItem(e);for(h=g.length;h--;)(t=g[h])&&t.destroy&&t.destroy();e.points=null;d.clearTimeout(e.animationTimeout);q(e,function(a,e){a instanceof I&&!a.survive&&(f=c&&"group"===e?"hide":"destroy",a[f]())});b.hoverSeries===e&&(b.hoverSeries=null);C(b.series,e);b.orderSeries();q(e,function(b,c){a&&"hcEvents"===c||delete e[c]})},
getGraphPath:function(a,b,c){var e=this,f=e.options,k=f.step,d,h=[],l=[],g;a=a||e.points;(d=a.reversed)&&a.reverse();(k={right:1,center:2}[k]||k&&3)&&d&&(k=4-k);a=this.getValidPoints(a,!1,!(f.connectNulls&&!b&&!c));a.forEach(function(d,u){var r=d.plotX,t=d.plotY,n=a[u-1];(d.leftCliff||n&&n.rightCliff)&&!c&&(g=!0);d.isNull&&!v(b)&&0<u?g=!f.connectNulls:d.isNull&&!b?g=!0:(0===u||g?u=["M",d.plotX,d.plotY]:e.getPointSpline?u=e.getPointSpline(a,d,u):k?(u=1===k?["L",n.plotX,t]:2===k?["L",(n.plotX+r)/2,
n.plotY,"L",(n.plotX+r)/2,t]:["L",r,n.plotY],u.push("L",r,t)):u=["L",r,t],l.push(d.x),k&&(l.push(d.x),2===k&&l.push(d.x)),h.push.apply(h,u),g=!1)});h.xMap=l;return e.graphPath=h},drawGraph:function(){var a=this,b=this.options,c=(this.gappedPath||this.getGraphPath).call(this),f=this.chart.styledMode,d=[["graph","highcharts-graph"]];f||d[0].push(b.lineColor||this.color||"#cccccc",b.dashStyle);d=a.getZonesGraphs(d);d.forEach(function(e,k){var d=e[0],h=a[d],l=h?"animate":"attr";h?(h.endX=a.preventGraphAnimation?
null:c.xMap,h.animate({d:c})):c.length&&(a[d]=h=a.chart.renderer.path(c).addClass(e[1]).attr({zIndex:1}).add(a.group));h&&!f&&(d={stroke:e[2],"stroke-width":b.lineWidth,fill:a.fillGraph&&a.color||"none"},e[3]?d.dashstyle=e[3]:"square"!==b.linecap&&(d["stroke-linecap"]=d["stroke-linejoin"]="round"),h[l](d).shadow(2>k&&b.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},getZonesGraphs:function(a){this.zones.forEach(function(e,b){b=["zone-graph-"+b,"highcharts-graph highcharts-zone-graph-"+b+" "+(e.className||
"")];this.chart.styledMode||b.push(e.color||this.color,e.dashStyle||this.options.dashStyle);a.push(b)},this);return a},applyZones:function(){var a=this,b=this.chart,c=b.renderer,f=this.zones,d,h,l=this.clips||[],g,r=this.graph,t=this.area,n=Math.max(b.chartWidth,b.chartHeight),m=this[(this.zoneAxis||"y")+"Axis"],q=b.inverted,p,z,v,I=!1;if(f.length&&(r||t)&&m&&"undefined"!==typeof m.min){var x=m.reversed;var C=m.horiz;r&&!this.showLine&&r.hide();t&&t.hide();var B=m.getExtremes();f.forEach(function(e,
f){d=x?C?b.plotWidth:0:C?0:m.toPixels(B.min)||0;d=D(w(h,d),0,n);h=D(Math.round(m.toPixels(w(e.value,B.max),!0)||0),0,n);I&&(d=h=m.toPixels(B.max));p=Math.abs(d-h);z=Math.min(d,h);v=Math.max(d,h);m.isXAxis?(g={x:q?v:z,y:0,width:p,height:n},C||(g.x=b.plotHeight-g.x)):(g={x:0,y:q?v:z,width:n,height:p},C&&(g.y=b.plotWidth-g.y));q&&c.isVML&&(g=m.isXAxis?{x:0,y:x?z:v,height:g.width,width:b.chartWidth}:{x:g.y-b.plotLeft-b.spacingBox.x,y:0,width:g.height,height:b.chartHeight});l[f]?l[f].animate(g):l[f]=c.clipRect(g);
r&&a["zone-graph-"+f].clip(l[f]);t&&a["zone-area-"+f].clip(l[f]);I=e.value>B.max;a.resetZones&&0===h&&(h=void 0)});this.clips=l}else a.visible&&(r&&r.show(!0),t&&t.show(!0))},invertGroups:function(a){function e(){["group","markerGroup"].forEach(function(e){b[e]&&(f.renderer.isVML&&b[e].attr({width:b.yAxis.len,height:b.xAxis.len}),b[e].width=b.yAxis.len,b[e].height=b.xAxis.len,b[e].invert(b.isRadialSeries?!1:a))})}var b=this,f=b.chart;b.xAxis&&(b.eventsToUnbind.push(c(f,"resize",e)),e(),b.invertGroups=
e)},plotGroup:function(a,b,c,f,d){var e=this[a],k=!e;k&&(this[a]=e=this.chart.renderer.g().attr({zIndex:f||.1}).add(d));e.addClass("highcharts-"+b+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(v(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(e.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);e.attr({visibility:c})[k?"attr":"animate"](this.getPlotBox());return e},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;
a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},removeEvents:function(a){a?this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind.length=0):t(this)},render:function(){var a=this,b=a.chart,c=a.options,d=!!a.animate&&b.renderer.isSVG&&y(c.animation).duration,h=a.visible?"inherit":"hidden",g=c.zIndex,r=a.hasRendered,t=b.seriesGroup,n=b.inverted;l(this,"render");var m=a.plotGroup("group","series",
h,g,t);a.markerGroup=a.plotGroup("markerGroup","markers",h,g,t);d&&a.animate(!0);m.inverted=a.isCartesian||a.invertable?n:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.visible&&a.drawPoints();a.drawDataLabels&&a.drawDataLabels();a.redrawPoints&&a.redrawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(n);!1===c.clip||a.sharedClipKey||r||m.clip(b.clipRect);d&&a.animate();r||(a.animationTimeout=f(function(){a.afterAnimate()},d||0));a.isDirty=!1;a.hasRendered=
!0;l(a,"afterRender")},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,f=this.xAxis,d=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:w(f&&f.left,a.plotLeft),translateY:w(d&&d.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var e=this.xAxis,c=this.yAxis,f=this.chart.inverted;return this.searchKDTree({clientX:f?e.len-a.chartY+e.pos:a.chartX-
e.pos,plotY:f?c.len-a.chartX+c.pos:a.chartY-c.pos},b,a)},buildKDTree:function(a){function e(a,c,f){var k;if(k=a&&a.length){var d=b.kdAxisArray[c%f];a.sort(function(a,e){return a[d]-e[d]});k=Math.floor(k/2);return{point:a[k],left:e(a.slice(0,k),c+1,f),right:e(a.slice(k+1),c+1,f)}}}this.buildingKdTree=!0;var b=this,c=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;f(function(){b.kdTree=e(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow||a&&"touchstart"===
a.type?0:1)},searchKDTree:function(a,b,c){function e(a,b,c,l){var g=b.point,r=f.kdAxisArray[c%l],u=g;var t=v(a[k])&&v(g[k])?Math.pow(a[k]-g[k],2):null;var n=v(a[d])&&v(g[d])?Math.pow(a[d]-g[d],2):null;n=(t||0)+(n||0);g.dist=v(n)?Math.sqrt(n):Number.MAX_VALUE;g.distX=v(t)?Math.sqrt(t):Number.MAX_VALUE;r=a[r]-g[r];n=0>r?"left":"right";t=0>r?"right":"left";b[n]&&(n=e(a,b[n],c+1,l),u=n[h]<u[h]?n:g);b[t]&&Math.sqrt(r*r)<u[h]&&(a=e(a,b[t],c+1,l),u=a[h]<u[h]?a:u);return u}var f=this,k=this.kdAxisArray[0],
d=this.kdAxisArray[1],h=b?"distX":"dist";b=-1<f.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree(c);if(this.kdTree)return e(a,this.kdTree,b,b)},pointPlacementToXValue:function(){var a=this.xAxis,b=this.options.pointPlacement;"between"===b&&(b=a.reversed?-.5:.5);z(b)&&(b*=w(this.options.pointRange||a.pointRange));return b}});""});K(y,"parts/Stacking.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.correctFloat,F=g.defined,E=g.destroyObjectProperties,
D=g.objectEach,x=g.pick;g=d.Axis;var v=d.Chart,C=d.format,B=d.Series;d.StackItem=function(d,g,m,q,w){var h=d.chart.inverted;this.axis=d;this.isNegative=m;this.options=g=g||{};this.x=q;this.total=null;this.points={};this.stack=w;this.rightCliff=this.leftCliff=0;this.alignOptions={align:g.align||(h?m?"left":"right":"center"),verticalAlign:g.verticalAlign||(h?"middle":m?"bottom":"top"),y:g.y,x:g.x};this.textAlign=g.textAlign||(h?m?"right":"left":"center")};d.StackItem.prototype={destroy:function(){E(this,
this.axis)},render:function(d){var g=this.axis.chart,m=this.options,q=m.format;q=q?C(q,this,g):m.formatter.call(this);this.label?this.label.attr({text:q,visibility:"hidden"}):(this.label=g.renderer.label(q,null,null,m.shape,null,null,m.useHTML,!1,"stack-labels"),q={text:q,align:this.textAlign,rotation:m.rotation,padding:x(m.padding,0),visibility:"hidden"},this.label.attr(q),g.styledMode||this.label.css(m.style),this.label.added||this.label.add(d));this.label.labelrank=g.plotHeight},setOffset:function(d,
g,m,q,w){var h=this.axis,f=h.chart;q=h.translate(h.usePercentage?100:q?q:this.total,0,0,0,1);m=h.translate(m?m:0);m=F(q)&&Math.abs(q-m);d=x(w,f.xAxis[0].translate(this.x))+d;h=F(q)&&this.getStackBox(f,this,d,q,g,m,h);g=this.label;d=this.isNegative;w="justify"===x(this.options.overflow,"justify");if(g&&h){m=g.getBBox();var c=f.inverted?d?m.width:0:m.width/2,b=f.inverted?m.height/2:d?-4:m.height+4;this.alignOptions.x=x(this.options.x,0);g.align(this.alignOptions,null,h);q=g.alignAttr;g.show();q.y-=
b;w&&(q.x-=c,B.prototype.justifyDataLabel.call(this.axis,g,this.alignOptions,q,m,h),q.x+=c);q.x=g.alignAttr.x;g.attr({x:q.x,y:q.y});x(!w&&this.options.crop,!0)&&((f=f.isInsidePlot(g.x+(f.inverted?0:-m.width/2),g.y)&&f.isInsidePlot(g.x+(f.inverted?d?-m.width:m.width:m.width/2),g.y+m.height))||g.hide())}},getStackBox:function(d,g,m,q,w,h,f){var c=g.axis.reversed,b=d.inverted;d=f.height+f.pos-(b?d.plotLeft:d.plotTop);g=g.isNegative&&!c||!g.isNegative&&c;return{x:b?g?q:q-h:m,y:b?d-m-w:g?d-q-h:d-q,width:b?
h:w,height:b?w:h}}};v.prototype.getStacks=function(){var d=this,g=d.inverted;d.yAxis.forEach(function(d){d.stacks&&d.hasVisibleSeries&&(d.oldStacks=d.stacks)});d.series.forEach(function(m){var q=m.xAxis&&m.xAxis.options||{};!m.options.stacking||!0!==m.visible&&!1!==d.options.chart.ignoreHiddenSeries||(m.stackKey=[m.type,x(m.options.stack,""),g?q.top:q.left,g?q.height:q.width].join())})};g.prototype.buildStacks=function(){var g=this.series,v=x(this.options.reversedStacks,!0),m=g.length,q;if(!this.isXAxis){this.usePercentage=
!1;for(q=m;q--;){var w=g[v?q:m-q-1];w.setStackedPoints()}for(q=0;q<m;q++)g[q].modifyStacks();d.fireEvent(this,"afterBuildStacks")}};g.prototype.renderStackTotals=function(){var d=this.chart,g=d.renderer,m=this.stacks,q=this.stackTotalGroup;q||(this.stackTotalGroup=q=g.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());q.translate(d.plotLeft,d.plotTop);D(m,function(d){D(d,function(d){d.render(q)})})};g.prototype.resetStacks=function(){var d=this,g=d.stacks;d.isXAxis||D(g,function(g){D(g,
function(m,p){m.touched<d.stacksTouched?(m.destroy(),delete g[p]):(m.total=null,m.cumulative=null)})})};g.prototype.cleanStacks=function(){if(!this.isXAxis){if(this.oldStacks)var d=this.stacks=this.oldStacks;D(d,function(d){D(d,function(d){d.cumulative=d.total})})}};B.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var g=this.processedXData,v=this.processedYData,m=[],q=v.length,w=this.options,h=w.threshold,f=x(w.startFromThreshold&&
h,0),c=w.stack;w=w.stacking;var b=this.stackKey,a="-"+b,l=this.negStacks,n=this.yAxis,t=n.stacks,I=n.oldStacks,r,e;n.stacksTouched+=1;for(e=0;e<q;e++){var k=g[e];var u=v[e];var H=this.getStackIndicator(H,k,this.index);var G=H.key;var A=(r=l&&u<(f?0:h))?a:b;t[A]||(t[A]={});t[A][k]||(I[A]&&I[A][k]?(t[A][k]=I[A][k],t[A][k].total=null):t[A][k]=new d.StackItem(n,n.options.stackLabels,r,k,c));A=t[A][k];null!==u?(A.points[G]=A.points[this.index]=[x(A.cumulative,f)],F(A.cumulative)||(A.base=G),A.touched=
n.stacksTouched,0<H.index&&!1===this.singleStacks&&(A.points[G][0]=A.points[this.index+","+k+",0"][0])):A.points[G]=A.points[this.index]=null;"percent"===w?(r=r?b:a,l&&t[r]&&t[r][k]?(r=t[r][k],A.total=r.total=Math.max(r.total,A.total)+Math.abs(u)||0):A.total=y(A.total+(Math.abs(u)||0))):A.total=y(A.total+(u||0));A.cumulative=x(A.cumulative,f)+(u||0);null!==u&&(A.points[G].push(A.cumulative),m[e]=A.cumulative)}"percent"===w&&(n.usePercentage=!0);this.stackedYData=m;n.oldStacks={}}};B.prototype.modifyStacks=
function(){var d=this,g=d.stackKey,m=d.yAxis.stacks,q=d.processedXData,w,h=d.options.stacking;d[h+"Stacker"]&&[g,"-"+g].forEach(function(f){for(var c=q.length,b,a;c--;)if(b=q[c],w=d.getStackIndicator(w,b,d.index,f),a=(b=m[f]&&m[f][b])&&b.points[w.key])d[h+"Stacker"](a,b,c)})};B.prototype.percentStacker=function(d,g,m){g=g.total?100/g.total:0;d[0]=y(d[0]*g);d[1]=y(d[1]*g);this.stackedYData[m]=d[1]};B.prototype.getStackIndicator=function(d,g,m,q){!F(d)||d.x!==g||q&&d.key!==q?d={x:g,index:0,key:q}:d.index++;
d.key=[m,g,d.index].join();return d}});K(y,"parts/Dynamics.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.defined,F=g.erase,E=g.extend,D=g.isArray,x=g.isNumber,v=g.isObject,C=g.isString,B=g.objectEach,p=g.pick,z=g.relativeLength,m=g.setAnimation,q=g.splat,w=d.addEvent,h=d.animate,f=d.Axis;g=d.Chart;var c=d.createElement,b=d.css,a=d.fireEvent,l=d.merge,n=d.Point,t=d.Series,I=d.seriesTypes;d.cleanRecursively=function(a,e){var b={};B(a,function(c,f){if(v(a[f],!0)&&!a.nodeType&&
e[f])c=d.cleanRecursively(a[f],e[f]),Object.keys(c).length&&(b[f]=c);else if(v(a[f])||a[f]!==e[f])b[f]=a[f]});return b};E(g.prototype,{addSeries:function(b,e,c){var f,d=this;b&&(e=p(e,!0),a(d,"addSeries",{options:b},function(){f=d.initSeries(b);d.isDirtyLegend=!0;d.linkSeries();f.enabledDataSorting&&f.setData(b.data,!1);a(d,"afterAddSeries",{series:f});e&&d.redraw(c)}));return f},addAxis:function(a,e,b,c){return this.createAxis(e?"xAxis":"yAxis",{axis:a,redraw:b,animation:c})},addColorAxis:function(a,
e,b){return this.createAxis("colorAxis",{axis:a,redraw:e,animation:b})},createAxis:function(a,e){var b=this.options,c="colorAxis"===a,h=e.redraw,g=e.animation;e=l(e.axis,{index:this[a].length,isX:"xAxis"===a});var r=c?new d.ColorAxis(this,e):new f(this,e);b[a]=q(b[a]||{});b[a].push(e);c&&(this.isDirtyLegend=!0,this.axes.forEach(function(a){a.series=[]}),this.series.forEach(function(a){a.bindAxes();a.isDirtyData=!0}));p(h,!0)&&this.redraw(g);return r},showLoading:function(a){var e=this,f=e.options,
d=e.loadingDiv,g=f.loading,l=function(){d&&b(d,{left:e.plotLeft+"px",top:e.plotTop+"px",width:e.plotWidth+"px",height:e.plotHeight+"px"})};d||(e.loadingDiv=d=c("div",{className:"highcharts-loading highcharts-loading-hidden"},null,e.container),e.loadingSpan=c("span",{className:"highcharts-loading-inner"},null,d),w(e,"redraw",l));d.className="highcharts-loading";e.loadingSpan.innerHTML=p(a,f.lang.loading,"");e.styledMode||(b(d,E(g.style,{zIndex:10})),b(e.loadingSpan,g.labelStyle),e.loadingShown||(b(d,
{opacity:0,display:""}),h(d,{opacity:g.style.opacity||.5},{duration:g.showDuration||0})));e.loadingShown=!0;l()},hideLoading:function(){var a=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",this.styledMode||h(e,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){b(e,{display:"none"})}}));this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),collectionsWithUpdate:["xAxis","yAxis","zAxis","series"],update:function(b,e,c,f){var k=this,h={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},g,u,r,t=b.isResponsiveOptions,n=[];a(k,"update",
{options:b});t||k.setResponsive(!1,!0);b=d.cleanRecursively(b,k.options);l(!0,k.userOptions,b);if(g=b.chart){l(!0,k.options.chart,g);"className"in g&&k.setClassName(g.className);"reflow"in g&&k.setReflow(g.reflow);if("inverted"in g||"polar"in g||"type"in g){k.propFromSeries();var m=!0}"alignTicks"in g&&(m=!0);B(g,function(a,e){-1!==k.propsRequireUpdateSeries.indexOf("chart."+e)&&(u=!0);-1!==k.propsRequireDirtyBox.indexOf(e)&&(k.isDirtyBox=!0);t||-1===k.propsRequireReflow.indexOf(e)||(r=!0)});!k.styledMode&&
"style"in g&&k.renderer.setStyle(g.style)}!k.styledMode&&b.colors&&(this.options.colors=b.colors);b.plotOptions&&l(!0,this.options.plotOptions,b.plotOptions);b.time&&this.time===d.time&&(this.time=new d.Time(b.time));B(b,function(a,e){if(k[e]&&"function"===typeof k[e].update)k[e].update(a,!1);else if("function"===typeof k[h[e]])k[h[e]](a);"chart"!==e&&-1!==k.propsRequireUpdateSeries.indexOf(e)&&(u=!0)});this.collectionsWithUpdate.forEach(function(a){if(b[a]){if("series"===a){var e=[];k[a].forEach(function(a,
b){a.options.isInternal||e.push(p(a.options.index,b))})}q(b[a]).forEach(function(b,f){(f=y(b.id)&&k.get(b.id)||k[a][e?e[f]:f])&&f.coll===a&&(f.update(b,!1),c&&(f.touched=!0));!f&&c&&k.collectionsWithInit[a]&&(k.collectionsWithInit[a][0].apply(k,[b].concat(k.collectionsWithInit[a][1]||[]).concat([!1])).touched=!0)});c&&k[a].forEach(function(a){a.touched||a.options.isInternal?delete a.touched:n.push(a)})}});n.forEach(function(a){a.remove&&a.remove(!1)});m&&k.axes.forEach(function(a){a.update({},!1)});
u&&k.getSeriesOrderByLinks().forEach(function(a){a.chart&&a.update({},!1)},this);b.loading&&l(!0,k.options.loading,b.loading);m=g&&g.width;g=g&&g.height;C(g)&&(g=z(g,m||k.chartWidth));r||x(m)&&m!==k.chartWidth||x(g)&&g!==k.chartHeight?k.setSize(m,g,f):p(e,!0)&&k.redraw(f);a(k,"afterUpdate",{options:b,redraw:e,animation:f})},setSubtitle:function(a,e){this.applyDescription("subtitle",a);this.layOutTitles(e)},setCaption:function(a,e){this.applyDescription("caption",a);this.layOutTitles(e)}});g.prototype.collectionsWithInit=
{xAxis:[g.prototype.addAxis,[!0]],yAxis:[g.prototype.addAxis,[!1]],series:[g.prototype.addSeries]};E(n.prototype,{update:function(a,e,b,c){function f(){d.applyOptions(a);null===d.y&&g&&(d.graphic=g.destroy());v(a,!0)&&(g&&g.element&&a&&a.marker&&"undefined"!==typeof a.marker.symbol&&(d.graphic=g.destroy()),a&&a.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy()),d.connector&&(d.connector=d.connector.destroy()));h=d.index;k.updateParallelArrays(d,h);u.data[h]=v(u.data[h],!0)||v(a,!0)?d.options:
p(a,u.data[h]);k.isDirty=k.isDirtyData=!0;!k.fixedBox&&k.hasCartesianSeries&&(l.isDirtyBox=!0);"point"===u.legendType&&(l.isDirtyLegend=!0);e&&l.redraw(b)}var d=this,k=d.series,g=d.graphic,h,l=k.chart,u=k.options;e=p(e,!0);!1===c?f():d.firePointEvent("update",{options:a},f)},remove:function(a,e){this.series.removePoint(this.series.data.indexOf(this),a,e)}});E(t.prototype,{addPoint:function(b,e,c,f,d){var k=this.options,g=this.data,h=this.chart,l=this.xAxis;l=l&&l.hasNames&&l.names;var u=k.data,r=
this.xData,t;e=p(e,!0);var n={series:this};this.pointClass.prototype.applyOptions.apply(n,[b]);var m=n.x;var q=r.length;if(this.requireSorting&&m<r[q-1])for(t=!0;q&&r[q-1]>m;)q--;this.updateParallelArrays(n,"splice",q,0,0);this.updateParallelArrays(n,q);l&&n.name&&(l[m]=n.name);u.splice(q,0,b);t&&(this.data.splice(q,0,null),this.processData());"point"===k.legendType&&this.generatePoints();c&&(g[0]&&g[0].remove?g[0].remove(!1):(g.shift(),this.updateParallelArrays(n,"shift"),u.shift()));!1!==d&&a(this,
"addPoint",{point:n});this.isDirtyData=this.isDirty=!0;e&&h.redraw(f)},removePoint:function(a,e,b){var c=this,f=c.data,d=f[a],k=c.points,g=c.chart,h=function(){k&&k.length===f.length&&k.splice(a,1);f.splice(a,1);c.options.data.splice(a,1);c.updateParallelArrays(d||{series:c},"splice",a,1);d&&d.destroy();c.isDirty=!0;c.isDirtyData=!0;e&&g.redraw()};m(b,g);e=p(e,!0);d?d.firePointEvent("remove",null,h):h()},remove:function(b,e,c,f){function d(){k.destroy(f);k.remove=null;g.isDirtyLegend=g.isDirtyBox=
!0;g.linkSeries();p(b,!0)&&g.redraw(e)}var k=this,g=k.chart;!1!==c?a(k,"remove",null,d):d()},update:function(b,e){b=d.cleanRecursively(b,this.userOptions);a(this,"update",{options:b});var c=this,f=c.chart,g=c.userOptions,h=c.initialType||c.type,r=b.type||g.type||f.options.chart.type,t=!(this.hasDerivedData||b.dataGrouping||r&&r!==this.type||"undefined"!==typeof b.pointStart||b.pointInterval||b.pointIntervalUnit||b.keys),n=I[h].prototype,m,q=["group","markerGroup","dataLabelsGroup","transformGroup"],
w=["eventOptions","navigatorSeries","baseSeries"],v=c.finishedAnimating&&{animation:!1},z={};t&&(w.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","_hasPointMarkers","_hasPointLabels","mapMap","mapData","minY","maxY","minX","maxX"),!1!==b.visible&&w.push("area","graph"),c.parallelArrays.forEach(function(a){w.push(a+"Data")}),b.data&&(b.dataSorting&&E(c.options.dataSorting,b.dataSorting),this.setData(b.data,!1)));b=l(g,v,{index:"undefined"===typeof g.index?c.index:
g.index,pointStart:p(g.pointStart,c.xData[0])},!t&&{data:c.options.data},b);t&&b.data&&(b.data=c.options.data);w=q.concat(w);w.forEach(function(a){w[a]=c[a];delete c[a]});c.remove(!1,null,!1,!0);for(m in n)c[m]=void 0;I[r||h]?E(c,I[r||h].prototype):d.error(17,!0,f,{missingModuleFor:r||h});w.forEach(function(a){c[a]=w[a]});c.init(f,b);if(t&&this.points){var x=c.options;!1===x.visible?(z.graphic=1,z.dataLabel=1):c._hasPointLabels||(r=x.marker,n=x.dataLabels,r&&(!1===r.enabled||"symbol"in r)&&(z.graphic=
1),n&&!1===n.enabled&&(z.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(z).length&&a.destroyElements(z),!1===x.showInLegend&&a.legendItem&&f.legend.destroyItem(a))},this)}b.zIndex!==g.zIndex&&q.forEach(function(a){c[a]&&c[a].attr({zIndex:b.zIndex})});c.initialType=h;f.linkSeries();a(this,"afterUpdate");p(e,!0)&&f.redraw(t?void 0:!1)},setName:function(a){this.name=this.options.name=this.userOptions.name=a;this.chart.isDirtyLegend=!0}});E(f.prototype,{update:function(a,
e){var b=this.chart,c=a&&a.events||{};a=l(this.userOptions,a);b.options[this.coll].indexOf&&(b.options[this.coll][b.options[this.coll].indexOf(this.userOptions)]=a);B(b.options[this.coll].events,function(a,e){"undefined"===typeof c[e]&&(c[e]=void 0)});this.destroy(!0);this.init(b,E(a,{events:c}));b.isDirtyBox=!0;p(e,!0)&&b.redraw()},remove:function(a){for(var e=this.chart,b=this.coll,c=this.series,f=c.length;f--;)c[f]&&c[f].remove(!1);F(e.axes,this);F(e[b],this);D(e.options[b])?e.options[b].splice(this.options.index,
1):delete e.options[b];e[b].forEach(function(a,e){a.options.index=a.userOptions.index=e});this.destroy();e.isDirtyBox=!0;p(a,!0)&&e.redraw()},setTitle:function(a,e){this.update({title:a},e)},setCategories:function(a,e){this.update({categories:a},e)}})});K(y,"parts/AreaSeries.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.objectEach,F=g.pick,E=d.color,D=d.Series;g=d.seriesType;g("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(d){var g=
[],x=[],B=this.xAxis,p=this.yAxis,z=p.stacks[this.stackKey],m={},q=this.index,w=p.series,h=w.length,f=F(p.options.reversedStacks,!0)?1:-1,c;d=d||this.points;if(this.options.stacking){for(c=0;c<d.length;c++)d[c].leftNull=d[c].rightNull=void 0,m[d[c].x]=d[c];y(z,function(a,b){null!==a.total&&x.push(b)});x.sort(function(a,b){return a-b});var b=w.map(function(a){return a.visible});x.forEach(function(a,d){var l=0,t,w;if(m[a]&&!m[a].isNull)g.push(m[a]),[-1,1].forEach(function(g){var e=1===g?"rightNull":
"leftNull",k=0,l=z[x[d+g]];if(l)for(c=q;0<=c&&c<h;)t=l.points[c],t||(c===q?m[a][e]=!0:b[c]&&(w=z[a].points[c])&&(k-=w[1]-w[0])),c+=f;m[a][1===g?"rightCliff":"leftCliff"]=k});else{for(c=q;0<=c&&c<h;){if(t=z[a].points[c]){l=t[1];break}c+=f}l=p.translate(l,0,1,0,1);g.push({isNull:!0,plotX:B.translate(a,0,0,0,1),x:a,plotY:l,yBottom:l})}})}return g},getGraphPath:function(d){var g=D.prototype.getGraphPath,x=this.options,B=x.stacking,p=this.yAxis,z,m=[],q=[],w=this.index,h=p.stacks[this.stackKey],f=x.threshold,
c=Math.round(p.getThreshold(x.threshold));x=F(x.connectNulls,"percent"===B);var b=function(a,b,g){var e=d[a];a=B&&h[e.x].points[w];var k=e[g+"Null"]||0;g=e[g+"Cliff"]||0;e=!0;if(g||k){var u=(k?a[0]:a[1])+g;var t=a[0]+g;e=!!k}else!B&&d[b]&&d[b].isNull&&(u=t=f);"undefined"!==typeof u&&(q.push({plotX:l,plotY:null===u?c:p.getThreshold(u),isNull:e,isCliff:!0}),m.push({plotX:l,plotY:null===t?c:p.getThreshold(t),doCurve:!1}))};d=d||this.points;B&&(d=this.getStackPoints(d));for(z=0;z<d.length;z++){B||(d[z].leftCliff=
d[z].rightCliff=d[z].leftNull=d[z].rightNull=void 0);var a=d[z].isNull;var l=F(d[z].rectPlotX,d[z].plotX);var n=F(d[z].yBottom,c);if(!a||x)x||b(z,z-1,"left"),a&&!B&&x||(q.push(d[z]),m.push({x:z,plotX:l,plotY:n})),x||b(z,z+1,"right")}z=g.call(this,q,!0,!0);m.reversed=!0;a=g.call(this,m,!0,!0);a.length&&(a[0]="L");a=z.concat(a);g=g.call(this,q,!1,x);a.xMap=z.xMap;this.areaPath=a;return g},drawGraph:function(){this.areaPath=[];D.prototype.drawGraph.apply(this);var d=this,g=this.areaPath,C=this.options,
B=[["area","highcharts-area",this.color,C.fillColor]];this.zones.forEach(function(g,v){B.push(["zone-area-"+v,"highcharts-area highcharts-zone-area-"+v+" "+g.className,g.color||d.color,g.fillColor||C.fillColor])});B.forEach(function(p){var v=p[0],m=d[v],q=m?"animate":"attr",w={};m?(m.endX=d.preventGraphAnimation?null:g.xMap,m.animate({d:g})):(w.zIndex=0,m=d[v]=d.chart.renderer.path(g).addClass(p[1]).add(d.group),m.isArea=!0);d.chart.styledMode||(w.fill=F(p[3],E(p[2]).setOpacity(F(C.fillOpacity,.75)).get()));
m[q](w);m.startX=g.xMap;m.shiftUnit=C.step?2:1})},drawLegendSymbol:d.LegendSymbolMixin.drawRectangle});""});K(y,"parts/SplineSeries.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.pick;d=d.seriesType;d("spline","line",{},{getPointSpline:function(d,g,D){var x=g.plotX,v=g.plotY,C=d[D-1];D=d[D+1];if(C&&!C.isNull&&!1!==C.doCurve&&!g.isCliff&&D&&!D.isNull&&!1!==D.doCurve&&!g.isCliff){d=C.plotY;var B=D.plotX;D=D.plotY;var p=0;var z=(1.5*x+C.plotX)/2.5;var m=(1.5*v+d)/2.5;B=(1.5*
x+B)/2.5;var q=(1.5*v+D)/2.5;B!==z&&(p=(q-m)*(B-x)/(B-z)+v-q);m+=p;q+=p;m>d&&m>v?(m=Math.max(d,v),q=2*v-m):m<d&&m<v&&(m=Math.min(d,v),q=2*v-m);q>D&&q>v?(q=Math.max(D,v),m=2*v-q):q<D&&q<v&&(q=Math.min(D,v),m=2*v-q);g.rightContX=B;g.rightContY=q}g=["C",y(C.rightContX,C.plotX),y(C.rightContY,C.plotY),y(z,x),y(m,v),x,v];C.rightContX=C.rightContY=null;return g}});""});K(y,"parts/AreaSplineSeries.js",[y["parts/Globals.js"]],function(d){var g=d.seriesTypes.area.prototype,y=d.seriesType;y("areaspline","spline",
d.defaultPlotOptions.area,{getStackPoints:g.getStackPoints,getGraphPath:g.getGraphPath,drawGraph:g.drawGraph,drawLegendSymbol:d.LegendSymbolMixin.drawRectangle});""});K(y,"parts/ColumnSeries.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.animObject,F=g.clamp,E=g.defined,D=g.extend,x=g.isNumber,v=g.pick,C=d.color,B=d.merge,p=d.Series;g=d.seriesType;var z=d.svg;g("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,
pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){p.prototype.init.apply(this,arguments);var d=this,g=d.chart;g.hasRendered&&g.series.forEach(function(g){g.type===d.type&&(g.isDirty=!0)})},
getColumnMetrics:function(){var d=this,g=d.options,w=d.xAxis,h=d.yAxis,f=w.options.reversedStacks;f=w.reversed&&!f||!w.reversed&&f;var c,b={},a=0;!1===g.grouping?a=1:d.chart.series.forEach(function(f){var g=f.yAxis,e=f.options;if(f.type===d.type&&(f.visible||!d.chart.options.chart.ignoreHiddenSeries)&&h.len===g.len&&h.pos===g.pos){if(e.stacking){c=f.stackKey;"undefined"===typeof b[c]&&(b[c]=a++);var k=b[c]}else!1!==e.grouping&&(k=a++);f.columnIndex=k}});var l=Math.min(Math.abs(w.transA)*(w.ordinalSlope||
g.pointRange||w.closestPointRange||w.tickInterval||1),w.len),n=l*g.groupPadding,t=(l-2*n)/(a||1);g=Math.min(g.maxPointWidth||w.len,v(g.pointWidth,t*(1-2*g.pointPadding)));d.columnMetrics={width:g,offset:(t-g)/2+(n+((d.columnIndex||0)+(f?1:0))*t-l/2)*(f?-1:1)};return d.columnMetrics},crispCol:function(d,g,w,h){var f=this.chart,c=this.borderWidth,b=-(c%2?.5:0);c=c%2?.5:1;f.inverted&&f.renderer.isVML&&(c+=1);this.options.crisp&&(w=Math.round(d+w)+b,d=Math.round(d)+b,w-=d);h=Math.round(g+h)+c;b=.5>=Math.abs(g)&&
.5<h;g=Math.round(g)+c;h-=g;b&&h&&(--g,h+=1);return{x:d,y:g,width:w,height:h}},translate:function(){var d=this,g=d.chart,w=d.options,h=d.dense=2>d.closestPointRange*d.xAxis.transA;h=d.borderWidth=v(w.borderWidth,h?0:1);var f=d.yAxis,c=w.threshold,b=d.translatedThreshold=f.getThreshold(c),a=v(w.minPointLength,5),l=d.getColumnMetrics(),n=l.width,t=d.barW=Math.max(n,1+2*h),z=d.pointXOffset=l.offset,r=d.dataMin,e=d.dataMax;g.inverted&&(b-=.5);w.pointPadding&&(t=Math.ceil(t));p.prototype.translate.apply(d);
d.points.forEach(function(k){var h=v(k.yBottom,b),l=999+Math.abs(h),m=n;l=F(k.plotY,-l,f.len+l);var A=k.plotX+z,q=t,w=Math.min(l,h),p=Math.max(l,h)-w;if(a&&Math.abs(p)<a){p=a;var I=!f.reversed&&!k.negative||f.reversed&&k.negative;k.y===c&&d.dataMax<=c&&f.min<c&&r!==e&&(I=!I);w=Math.abs(w-b)>a?h-a:b-(I?a:0)}E(k.options.pointWidth)&&(m=q=Math.ceil(k.options.pointWidth),A-=Math.round((m-n)/2));k.barX=A;k.pointWidth=m;k.tooltipPos=g.inverted?[f.len+f.pos-g.plotLeft-l,d.xAxis.len-A-q/2,p]:[A+q/2,l+f.pos-
g.plotTop,p];k.shapeType=d.pointClass.prototype.shapeType||"rect";k.shapeArgs=d.crispCol.apply(d,k.isNull?[A,b,q,0]:[A,w,q,p])})},getSymbol:d.noop,drawLegendSymbol:d.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(d,g){var m=this.options,h=this.pointAttrToOptions||{};var f=h.stroke||"borderColor";var c=h["stroke-width"]||"borderWidth",b=d&&d.color||this.color,a=d&&d[f]||m[f]||this.color||b,l=d&&d[c]||
m[c]||this[c]||0;h=d&&d.options.dashStyle||m.dashStyle;var n=v(d&&d.opacity,m.opacity,1);if(d&&this.zones.length){var t=d.getZone();b=d.options.color||t&&(t.color||d.nonZonedColor)||this.color;t&&(a=t.borderColor||a,h=t.dashStyle||h,l=t.borderWidth||l)}g&&d&&(d=B(m.states[g],d.options.states&&d.options.states[g]||{}),g=d.brightness,b=d.color||"undefined"!==typeof g&&C(b).brighten(d.brightness).get()||b,a=d[f]||a,l=d[c]||l,h=d.dashStyle||h,n=v(d.opacity,n));f={fill:b,stroke:a,"stroke-width":l,opacity:n};
h&&(f.dashstyle=h);return f},drawPoints:function(){var d=this,g=this.chart,p=d.options,h=g.renderer,f=p.animationLimit||250,c;d.points.forEach(function(b){var a=b.graphic,l=!!a,n=a&&g.pointCount<f?"animate":"attr";if(x(b.plotY)&&null!==b.y){c=b.shapeArgs;a&&b.hasNewShapeType()&&(a=a.destroy());d.enabledDataSorting&&(b.startXPos=d.xAxis.reversed?-(c?c.width:0):d.xAxis.width);a||(b.graphic=a=h[b.shapeType](c).add(b.group||d.group))&&d.enabledDataSorting&&g.hasRendered&&g.pointCount<f&&(a.attr({x:b.startXPos}),
l=!0,n="animate");if(a&&l)a[n](B(c));if(p.borderRadius)a[n]({r:p.borderRadius});g.styledMode||a[n](d.pointAttribs(b,b.selected&&"select")).shadow(!1!==b.allowShadow&&p.shadow,null,p.stacking&&!p.borderRadius);a.addClass(b.getClassName(),!0)}else a&&(b.graphic=a.destroy())})},animate:function(d){var g=this,m=this.yAxis,h=g.options,f=this.chart.inverted,c={},b=f?"translateX":"translateY";if(z)if(d)c.scaleY=.001,d=F(m.toPixels(h.threshold),m.pos,m.pos+m.len),f?c.translateX=d-m.len:c.translateY=d,g.clipBox&&
g.setClip(),g.group.attr(c);else{var a=g.group.attr(b);g.group.animate({scaleY:1},D(y(g.options.animation),{step:function(f,d){c[b]=a+d.pos*(m.pos-a);g.group.attr(c)}}));g.animate=null}},remove:function(){var d=this,g=d.chart;g.hasRendered&&g.series.forEach(function(g){g.type===d.type&&(g.isDirty=!0)});p.prototype.remove.apply(d,arguments)}});""});K(y,"parts/BarSeries.js",[y["parts/Globals.js"]],function(d){d=d.seriesType;d("bar","column",null,{inverted:!0});""});K(y,"parts/ScatterSeries.js",[y["parts/Globals.js"]],
function(d){var g=d.Series,y=d.seriesType;y("scatter","line",{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&
g.prototype.drawGraph.call(this)},applyJitter:function(){var d=this,g=this.options.jitter,y=this.points.length;g&&this.points.forEach(function(x,v){["x","y"].forEach(function(C,B){var p="plot"+C.toUpperCase();if(g[C]&&!x.isNull){var z=d[C+"Axis"];var m=g[C]*z.transA;if(z&&!z.isLog){var q=Math.max(0,x[p]-m);z=Math.min(z.len,x[p]+m);B=1E4*Math.sin(v+B*y);x[p]=q+(z-q)*(B-Math.floor(B));"x"===C&&(x.clientX=x.plotX)}}})})}});d.addEvent(g,"afterTranslate",function(){this.applyJitter&&this.applyJitter()});
""});K(y,"mixins/centered-series.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.isNumber,F=g.pick,E=g.relativeLength,D=d.deg2rad;d.CenteredSeriesMixin={getCenter:function(){var d=this.options,g=this.chart,C=2*(d.slicedOffset||0),B=g.plotWidth-2*C;g=g.plotHeight-2*C;var p=d.center;p=[F(p[0],"50%"),F(p[1],"50%"),d.size||"100%",d.innerSize||0];var z=Math.min(B,g),m;for(m=0;4>m;++m){var q=p[m];d=2>m||2===m&&/%$/.test(q);p[m]=E(q,[B,g,z,p[2]][m])+(d?C:0)}p[3]>p[2]&&(p[3]=p[2]);
return p},getStartAndEndRadians:function(d,g){d=y(d)?d:0;g=y(g)&&g>d&&360>g-d?g:d+360;return{start:D*(d+-90),end:D*(g+-90)}}}});K(y,"parts/PieSeries.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.clamp,F=g.defined,E=g.isNumber,D=g.pick,x=g.relativeLength,v=g.setAnimation,C=d.addEvent;g=d.CenteredSeriesMixin;var B=g.getStartAndEndRadians,p=d.merge,z=d.noop,m=d.Point,q=d.Series,w=d.seriesType,h=d.fireEvent;w("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,
connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,
trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:d.seriesTypes.column.prototype.pointAttribs,animate:function(f){var c=this,b=c.points,a=c.startAngleRad;f||(b.forEach(function(b){var f=b.graphic,d=b.shapeArgs;f&&d&&(f.attr({r:D(b.startR,c.center&&c.center[3]/2),start:a,end:a}),f.animate({r:d.r,start:d.start,end:d.end},c.options.animation))}),c.animate=null)},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var f,c=0,b=this.points,a=b.length,d=this.options.ignoreHiddenPoint;
for(f=0;f<a;f++){var g=b[f];c+=d&&!g.visible?0:g.isNull?0:g.y}this.total=c;for(f=0;f<a;f++)g=b[f],g.percentage=0<c&&(g.visible||!d)?g.y/c*100:0,g.total=c},generatePoints:function(){q.prototype.generatePoints.call(this);this.updateTotals()},getX:function(f,c,b){var a=this.center,d=this.radii?this.radii[b.index]:a[2]/2;f=Math.asin(y((f-a[1])/(d+b.labelDistance),-1,1));return a[0]+(c?-1:1)*Math.cos(f)*(d+b.labelDistance)+(0<b.labelDistance?(c?-1:1)*this.options.dataLabels.padding:0)},translate:function(f){this.generatePoints();
var c=0,b=this.options,a=b.slicedOffset,d=a+(b.borderWidth||0),g=B(b.startAngle,b.endAngle),t=this.startAngleRad=g.start;g=(this.endAngleRad=g.end)-t;var m=this.points,r=b.dataLabels.distance;b=b.ignoreHiddenPoint;var e,k=m.length;f||(this.center=f=this.getCenter());for(e=0;e<k;e++){var u=m[e];var q=t+c*g;if(!b||u.visible)c+=u.percentage/100;var p=t+c*g;u.shapeType="arc";u.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:Math.round(1E3*q)/1E3,end:Math.round(1E3*p)/1E3};u.labelDistance=D(u.options.dataLabels&&
u.options.dataLabels.distance,r);u.labelDistance=x(u.labelDistance,u.shapeArgs.r);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,u.labelDistance);p=(p+q)/2;p>1.5*Math.PI?p-=2*Math.PI:p<-Math.PI/2&&(p+=2*Math.PI);u.slicedTranslation={translateX:Math.round(Math.cos(p)*a),translateY:Math.round(Math.sin(p)*a)};var A=Math.cos(p)*f[2]/2;var w=Math.sin(p)*f[2]/2;u.tooltipPos=[f[0]+.7*A,f[1]+.7*w];u.half=p<-Math.PI/2||p>Math.PI/2?1:0;u.angle=p;q=Math.min(d,u.labelDistance/5);u.labelPosition={natural:{x:f[0]+
A+Math.cos(p)*u.labelDistance,y:f[1]+w+Math.sin(p)*u.labelDistance},"final":{},alignment:0>u.labelDistance?"center":u.half?"right":"left",connectorPosition:{breakAt:{x:f[0]+A+Math.cos(p)*q,y:f[1]+w+Math.sin(p)*q},touchingSliceAt:{x:f[0]+A,y:f[1]+w}}}}h(this,"afterTranslate")},drawEmpty:function(){var f=this.options;if(0===this.total){var c=this.center[0];var b=this.center[1];this.graph||(this.graph=this.chart.renderer.circle(c,b,0).addClass("highcharts-graph").add(this.group));this.graph.animate({"stroke-width":f.borderWidth,
cx:c,cy:b,r:this.center[2]/2,fill:f.fillColor||"none",stroke:f.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},redrawPoints:function(){var f=this,c=f.chart,b=c.renderer,a,d,g,h,m=f.options.shadow;this.drawEmpty();!m||f.shadowGroup||c.styledMode||(f.shadowGroup=b.g("shadow").attr({zIndex:-1}).add(f.group));f.points.forEach(function(l){var e={};d=l.graphic;if(!l.isNull&&d){h=l.shapeArgs;a=l.getTranslate();if(!c.styledMode){var k=l.shadowGroup;m&&!k&&(k=l.shadowGroup=b.g("shadow").add(f.shadowGroup));
k&&k.attr(a);g=f.pointAttribs(l,l.selected&&"select")}l.delayedRendering?(d.setRadialReference(f.center).attr(h).attr(a),c.styledMode||d.attr(g).attr({"stroke-linejoin":"round"}).shadow(m,k),l.delayedRendering=!1):(d.setRadialReference(f.center),c.styledMode||p(!0,e,g),p(!0,e,h,a),d.animate(e));d.attr({visibility:l.visible?"inherit":"hidden"});d.addClass(l.getClassName())}else d&&(l.graphic=d.destroy())})},drawPoints:function(){var f=this.chart.renderer;this.points.forEach(function(c){c.graphic||
(c.graphic=f[c.shapeType](c.shapeArgs).add(c.series.group),c.delayedRendering=!0)})},searchPoint:z,sortByAngle:function(f,c){f.sort(function(b,a){return"undefined"!==typeof b.angle&&(a.angle-b.angle)*c})},drawLegendSymbol:d.LegendSymbolMixin.drawRectangle,getCenter:g.getCenter,getSymbol:z,drawGraph:null},{init:function(){m.prototype.init.apply(this,arguments);var f=this;f.name=D(f.name,"Slice");var c=function(b){f.slice("select"===b.type)};C(f,"select",c);C(f,"unselect",c);return f},isValid:function(){return E(this.y)&&
0<=this.y},setVisible:function(f,c){var b=this,a=b.series,d=a.chart,g=a.options.ignoreHiddenPoint;c=D(c,g);f!==b.visible&&(b.visible=b.options.visible=f="undefined"===typeof f?!b.visible:f,a.options.data[a.data.indexOf(b)]=b.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(a){if(b[a])b[a][f?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,f),f||"hover"!==b.state||b.setState(""),g&&(a.isDirty=!0),c&&d.redraw())},slice:function(f,c,b){var a=this.series;v(b,a.chart);
D(c,!0);this.sliced=this.options.sliced=F(f)?f:!this.sliced;a.options.data[a.data.indexOf(this)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(f){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+f,c.r+f,{innerR:c.r-1,start:c.start,end:c.end})},connectorShapes:{fixedOffset:function(f,
c,b){var a=c.breakAt;c=c.touchingSliceAt;return["M",f.x,f.y].concat(b.softConnector?["C",f.x+("left"===f.alignment?-5:5),f.y,2*a.x-c.x,2*a.y-c.y,a.x,a.y]:["L",a.x,a.y]).concat(["L",c.x,c.y])},straight:function(f,c){c=c.touchingSliceAt;return["M",f.x,f.y,"L",c.x,c.y]},crookedLine:function(f,c,b){c=c.touchingSliceAt;var a=this.series,d=a.center[0],g=a.chart.plotWidth,h=a.chart.plotLeft;a=f.alignment;var m=this.shapeArgs.r;b=x(b.crookDistance,1);b="left"===a?d+m+(g+h-d-m)*(1-b):h+(d-m)*b;d=["L",b,f.y];
if("left"===a?b>f.x||b<c.x:b<f.x||b>c.x)d=[];return["M",f.x,f.y].concat(d).concat(["L",c.x,c.y])}},getConnectorPath:function(){var f=this.labelPosition,c=this.series.options.dataLabels,b=c.connectorShape,a=this.connectorShapes;a[b]&&(b=a[b]);return b.call(this,{x:f.final.x,y:f.final.y,alignment:f.alignment},f.connectorPosition,c)}});""});K(y,"parts/DataLabels.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.animObject,F=g.arrayMax,E=g.clamp,D=g.defined,x=g.extend,v=g.isArray,
C=g.objectEach,B=g.pick,p=g.relativeLength,z=g.splat,m=d.format,q=d.merge;g=d.noop;var w=d.Series,h=d.seriesTypes,f=d.stableSort;d.distribute=function(c,b,a){function g(a,e){return a.target-e.target}var h,t=!0,m=c,r=[];var e=0;var k=m.reducedLen||b;for(h=c.length;h--;)e+=c[h].size;if(e>k){f(c,function(a,e){return(e.rank||0)-(a.rank||0)});for(e=h=0;e<=k;)e+=c[h].size,h++;r=c.splice(h-1,c.length)}f(c,g);for(c=c.map(function(a){return{size:a.size,targets:[a.target],align:B(a.align,.5)}});t;){for(h=c.length;h--;)t=
c[h],e=(Math.min.apply(0,t.targets)+Math.max.apply(0,t.targets))/2,t.pos=E(e-t.size*t.align,0,b-t.size);h=c.length;for(t=!1;h--;)0<h&&c[h-1].pos+c[h-1].size>c[h].pos&&(c[h-1].size+=c[h].size,c[h-1].targets=c[h-1].targets.concat(c[h].targets),c[h-1].align=.5,c[h-1].pos+c[h-1].size>b&&(c[h-1].pos=b-c[h-1].size),c.splice(h,1),t=!0)}m.push.apply(m,r);h=0;c.some(function(e){var c=0;if(e.targets.some(function(){m[h].pos=e.pos+c;if(Math.abs(m[h].pos-m[h].target)>a)return m.slice(0,h+1).forEach(function(a){delete a.pos}),
m.reducedLen=(m.reducedLen||b)-.1*b,m.reducedLen>.1*b&&d.distribute(m,b,a),!0;c+=m[h].size;h++}))return!0});f(m,g)};w.prototype.drawDataLabels=function(){function c(a,e){var b=e.filter;return b?(e=b.operator,a=a[b.property],b=b.value,">"===e&&a>b||"<"===e&&a<b||">="===e&&a>=b||"<="===e&&a<=b||"=="===e&&a==b||"==="===e&&a===b?!0:!1):!0}function b(a,e){var b=[],c;if(v(a)&&!v(e))b=a.map(function(a){return q(a,e)});else if(v(e)&&!v(a))b=e.map(function(e){return q(a,e)});else if(v(a)||v(e))for(c=Math.max(a.length,
e.length);c--;)b[c]=q(a[c],e[c]);else b=q(a,e);return b}var a=this,f=a.chart,g=a.options,h=g.dataLabels,p=a.points,r,e=a.hasRendered||0,k=y(g.animation).duration,u=Math.min(k,200),H=!f.renderer.forExport&&B(h.defer,0<u),w=f.renderer;h=b(b(f.options.plotOptions&&f.options.plotOptions.series&&f.options.plotOptions.series.dataLabels,f.options.plotOptions&&f.options.plotOptions[a.type]&&f.options.plotOptions[a.type].dataLabels),h);d.fireEvent(this,"drawDataLabels");if(v(h)||h.enabled||a._hasPointLabels){var A=
a.plotGroup("dataLabelsGroup","data-labels",H&&!e?"hidden":"inherit",h.zIndex||6);H&&(A.attr({opacity:+e}),e||setTimeout(function(){var e=a.dataLabelsGroup;e&&(a.visible&&A.show(!0),e[g.animation?"animate":"attr"]({opacity:1},{duration:u}))},k-u));p.forEach(function(e){r=z(b(h,e.dlOptions||e.options&&e.options.dataLabels));r.forEach(function(b,d){var k=b.enabled&&(!e.isNull||e.dataLabelOnNull)&&c(e,b),h=e.dataLabels?e.dataLabels[d]:e.dataLabel,l=e.connectors?e.connectors[d]:e.connector,u=B(b.distance,
e.labelDistance),t=!h;if(k){var r=e.getLabelConfig();var n=B(b[e.formatPrefix+"Format"],b.format);r=D(n)?m(n,r,f):(b[e.formatPrefix+"Formatter"]||b.formatter).call(r,b);n=b.style;var q=b.rotation;f.styledMode||(n.color=B(b.color,n.color,a.color,"#000000"),"contrast"===n.color?(e.contrastColor=w.getContrast(e.color||a.color),n.color=!D(u)&&b.inside||0>u||g.stacking?e.contrastColor:"#000000"):delete e.contrastColor,g.cursor&&(n.cursor=g.cursor));var p={r:b.borderRadius||0,rotation:q,padding:b.padding,
zIndex:1};f.styledMode||(p.fill=b.backgroundColor,p.stroke=b.borderColor,p["stroke-width"]=b.borderWidth);C(p,function(a,e){"undefined"===typeof a&&delete p[e]})}!h||k&&D(r)?k&&D(r)&&(h?p.text=r:(e.dataLabels=e.dataLabels||[],h=e.dataLabels[d]=q?w.text(r,0,-9999).addClass("highcharts-data-label"):w.label(r,0,-9999,b.shape,null,null,b.useHTML,null,"data-label"),d||(e.dataLabel=h),h.addClass(" highcharts-data-label-color-"+e.colorIndex+" "+(b.className||"")+(b.useHTML?" highcharts-tracker":""))),h.options=
b,h.attr(p),f.styledMode||h.css(n).shadow(b.shadow),h.added||h.add(A),b.textPath&&!b.useHTML&&(h.setTextPath(e.getDataLabelPath&&e.getDataLabelPath(h)||e.graphic,b.textPath),e.dataLabelPath&&!b.textPath.enabled&&(e.dataLabelPath=e.dataLabelPath.destroy())),a.alignDataLabel(e,h,b,null,t)):(e.dataLabel=e.dataLabel&&e.dataLabel.destroy(),e.dataLabels&&(1===e.dataLabels.length?delete e.dataLabels:delete e.dataLabels[d]),d||delete e.dataLabel,l&&(e.connector=e.connector.destroy(),e.connectors&&(1===e.connectors.length?
delete e.connectors:delete e.connectors[d])))})})}d.fireEvent(this,"afterDrawDataLabels")};w.prototype.alignDataLabel=function(c,b,a,f,d){var g=this,h=this.chart,l=this.isCartesian&&h.inverted,e=this.enabledDataSorting,k=B(c.dlBox&&c.dlBox.centerX,c.plotX,-9999),u=B(c.plotY,-9999),n=b.getBBox(),m=a.rotation,A=a.align,q=h.isInsidePlot(k,Math.round(u),l),p="justify"===B(a.overflow,e?"none":"justify"),w=this.visible&&(c.series.forceDL||e&&!p||q||f&&h.isInsidePlot(k,l?f.x+1:f.y+f.height-1,l));var v=function(a){e&&
g.xAxis&&!p&&g.setDataLabelStartPos(c,b,d,q,a)};if(w){var z=h.renderer.fontMetrics(h.styledMode?void 0:a.style.fontSize,b).b;f=x({x:l?this.yAxis.len-u:k,y:Math.round(l?this.xAxis.len-k:u),width:0,height:0},f);x(a,{width:n.width,height:n.height});m?(p=!1,k=h.renderer.rotCorr(z,m),k={x:f.x+a.x+f.width/2+k.x,y:f.y+a.y+{top:0,middle:.5,bottom:1}[a.verticalAlign]*f.height},v(k),b[d?"attr":"animate"](k).attr({align:A}),v=(m+720)%360,v=180<v&&360>v,"left"===A?k.y-=v?n.height:0:"center"===A?(k.x-=n.width/
2,k.y-=n.height/2):"right"===A&&(k.x-=n.width,k.y-=v?0:n.height),b.placed=!0,b.alignAttr=k):(v(f),b.align(a,null,f),k=b.alignAttr);p&&0<=f.height?this.justifyDataLabel(b,a,k,n,f,d):B(a.crop,!0)&&(w=h.isInsidePlot(k.x,k.y)&&h.isInsidePlot(k.x+n.width,k.y+n.height));if(a.shape&&!m)b[d?"attr":"animate"]({anchorX:l?h.plotWidth-c.plotY:c.plotX,anchorY:l?h.plotHeight-c.plotX:c.plotY})}d&&e&&(b.placed=!1);w||e&&!p||(b.hide(!0),b.placed=!1)};w.prototype.setDataLabelStartPos=function(c,b,a,f,d){var g=this.chart,
h=g.inverted,l=this.xAxis,e=l.reversed,k=h?b.height/2:b.width/2;c=(c=c.pointWidth)?c/2:0;l=h?d.x:e?-k-c:l.width-k+c;d=h?e?this.yAxis.height-k+c:-k-c:d.y;b.startXPos=l;b.startYPos=d;f?"hidden"===b.visibility&&(b.show(),b.attr({opacity:0}).animate({opacity:1})):b.attr({opacity:1}).animate({opacity:0},void 0,b.hide);g.hasRendered&&(a&&b.attr({x:b.startXPos,y:b.startYPos}),b.placed=!0)};w.prototype.justifyDataLabel=function(c,b,a,f,d,g){var h=this.chart,l=b.align,e=b.verticalAlign,k=c.box?0:c.padding||
0;var u=a.x+k;if(0>u){"right"===l?(b.align="left",b.inside=!0):b.x=-u;var t=!0}u=a.x+f.width-k;u>h.plotWidth&&("left"===l?(b.align="right",b.inside=!0):b.x=h.plotWidth-u,t=!0);u=a.y+k;0>u&&("bottom"===e?(b.verticalAlign="top",b.inside=!0):b.y=-u,t=!0);u=a.y+f.height-k;u>h.plotHeight&&("top"===e?(b.verticalAlign="bottom",b.inside=!0):b.y=h.plotHeight-u,t=!0);t&&(c.placed=!g,c.align(b,null,d));return t};h.pie&&(h.pie.prototype.dataLabelPositioners={radialDistributionY:function(c){return c.top+c.distributeBox.pos},
radialDistributionX:function(c,b,a,f){return c.getX(a<b.top+2||a>b.bottom-2?f:a,b.half,b)},justify:function(c,b,a){return a[0]+(c.half?-1:1)*(b+c.labelDistance)},alignToPlotEdges:function(c,b,a,f){c=c.getBBox().width;return b?c+f:a-c-f},alignToConnectors:function(c,b,a,f){var d=0,g;c.forEach(function(a){g=a.dataLabel.getBBox().width;g>d&&(d=g)});return b?d+f:a-d-f}},h.pie.prototype.drawDataLabels=function(){var c=this,b=c.data,a,f=c.chart,g=c.options.dataLabels,h=g.connectorPadding,m,r=f.plotWidth,
e=f.plotHeight,k=f.plotLeft,u=Math.round(f.chartWidth/3),p,v=c.center,A=v[2]/2,z=v[1],x,C,y,E,P=[[],[]],O,N,M,K,T=[0,0,0,0],Z=c.dataLabelPositioners,da;c.visible&&(g.enabled||c._hasPointLabels)&&(b.forEach(function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),w.prototype.drawDataLabels.apply(c),b.forEach(function(a){a.dataLabel&&(a.visible?(P[a.half].push(a),a.dataLabel._pos=null,!D(g.style.width)&&
!D(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>u&&(a.dataLabel.css({width:.7*u}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&1===a.dataLabels.length&&delete a.dataLabels))}),P.forEach(function(b,l){var u=b.length,t=[],n;if(u){c.sortByAngle(b,l-.5);if(0<c.maxLabelDistance){var m=Math.max(0,z-A-c.maxLabelDistance);var q=Math.min(z+A+c.maxLabelDistance,f.plotHeight);b.forEach(function(a){0<a.labelDistance&&
a.dataLabel&&(a.top=Math.max(0,z-A-a.labelDistance),a.bottom=Math.min(z+A+a.labelDistance,f.plotHeight),n=a.dataLabel.getBBox().height||21,a.distributeBox={target:a.labelPosition.natural.y-a.top+n/2,size:n,rank:a.y},t.push(a.distributeBox))});m=q+n-m;d.distribute(t,m,m/5)}for(K=0;K<u;K++){a=b[K];y=a.labelPosition;x=a.dataLabel;M=!1===a.visible?"hidden":"inherit";N=m=y.natural.y;t&&D(a.distributeBox)&&("undefined"===typeof a.distributeBox.pos?M="hidden":(E=a.distributeBox.size,N=Z.radialDistributionY(a)));
delete a.positionIndex;if(g.justify)O=Z.justify(a,A,v);else switch(g.alignTo){case "connectors":O=Z.alignToConnectors(b,l,r,k);break;case "plotEdges":O=Z.alignToPlotEdges(x,l,r,k);break;default:O=Z.radialDistributionX(c,a,N,m)}x._attr={visibility:M,align:y.alignment};x._pos={x:O+g.x+({left:h,right:-h}[y.alignment]||0),y:N+g.y-10};y.final.x=O;y.final.y=N;B(g.crop,!0)&&(C=x.getBBox().width,m=null,O-C<h&&1===l?(m=Math.round(C-O+h),T[3]=Math.max(m,T[3])):O+C>r-h&&0===l&&(m=Math.round(O+C-r+h),T[1]=Math.max(m,
T[1])),0>N-E/2?T[0]=Math.max(Math.round(-N+E/2),T[0]):N+E/2>e&&(T[2]=Math.max(Math.round(N+E/2-e),T[2])),x.sideOverflow=m)}}}),0===F(T)||this.verifyDataLabelOverflow(T))&&(this.placeDataLabels(),this.points.forEach(function(a){da=q(g,a.options.dataLabels);if(m=B(da.connectorWidth,1)){var e;p=a.connector;if((x=a.dataLabel)&&x._pos&&a.visible&&0<a.labelDistance){M=x._attr.visibility;if(e=!p)a.connector=p=f.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex+(a.className?
" "+a.className:"")).add(c.dataLabelsGroup),f.styledMode||p.attr({"stroke-width":m,stroke:da.connectorColor||a.color||"#666666"});p[e?"attr":"animate"]({d:a.getConnectorPath()});p.attr("visibility",M)}else p&&(a.connector=p.destroy())}}))},h.pie.prototype.placeDataLabels=function(){this.points.forEach(function(c){var b=c.dataLabel,a;b&&c.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=Math.max(b.getBBox().width-b.sideOverflow,0),b.css({width:b._attr.width+"px",textOverflow:(this.options.dataLabels.style||
{}).textOverflow||"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999}));delete c.distributeBox},this)},h.pie.prototype.alignDataLabel=g,h.pie.prototype.verifyDataLabelOverflow=function(c){var b=this.center,a=this.options,f=a.center,d=a.minSize||80,g=null!==a.size;if(!g){if(null!==f[0])var h=Math.max(b[2]-Math.max(c[1],c[3]),d);else h=Math.max(b[2]-c[1]-c[3],d),b[0]+=(c[3]-c[1])/2;null!==f[1]?h=E(h,d,b[2]-Math.max(c[0],c[2])):(h=E(h,d,b[2]-c[0]-
c[2]),b[1]+=(c[0]-c[2])/2);h<b[2]?(b[2]=h,b[3]=Math.min(p(a.innerSize||0,h),h),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):g=!0}return g});h.column&&(h.column.prototype.alignDataLabel=function(c,b,a,f,d){var g=this.chart.inverted,h=c.series,l=c.dlBox||c.shapeArgs,e=B(c.below,c.plotY>B(this.translatedThreshold,h.yAxis.len)),k=B(a.inside,!!this.options.stacking);l&&(f=q(l),0>f.y&&(f.height+=f.y,f.y=0),l=f.y+f.height-h.yAxis.len,0<l&&(f.height-=l),g&&(f={x:h.yAxis.len-f.y-f.height,
y:h.xAxis.len-f.x-f.width,width:f.height,height:f.width}),k||(g?(f.x+=e?0:f.width,f.width=0):(f.y+=e?f.height:0,f.height=0)));a.align=B(a.align,!g||k?"center":e?"right":"left");a.verticalAlign=B(a.verticalAlign,g||k?"middle":e?"top":"bottom");w.prototype.alignDataLabel.call(this,c,b,a,f,d);f&&(0>=f.height&&f.y===this.chart.plotHeight||0>=f.width&&0===f.x)&&(b.hide(!0),b.placed=!1);a.inside&&c.contrastColor&&b.css({color:c.contrastColor})})});K(y,"modules/overlapping-datalabels.src.js",[y["parts/Globals.js"],
y["parts/Utilities.js"]],function(d,g){var y=g.isArray,F=g.objectEach,E=g.pick;g=d.Chart;var D=d.addEvent,x=d.fireEvent;D(g,"render",function(){var d=[];(this.labelCollectors||[]).forEach(function(g){d=d.concat(g())});(this.yAxis||[]).forEach(function(g){g.options.stackLabels&&!g.options.stackLabels.allowOverlap&&F(g.stacks,function(g){F(g,function(g){d.push(g.label)})})});(this.series||[]).forEach(function(g){var v=g.options.dataLabels;g.visible&&(!1!==v.enabled||g._hasPointLabels)&&g.points.forEach(function(g){g.visible&&
(y(g.dataLabels)?g.dataLabels:g.dataLabel?[g.dataLabel]:[]).forEach(function(p){var m=p.options;p.labelrank=E(m.labelrank,g.labelrank,g.shapeArgs&&g.shapeArgs.height);m.allowOverlap||d.push(p)})})});this.hideOverlappingLabels(d)});g.prototype.hideOverlappingLabels=function(d){var g=this,v=d.length,p=g.renderer,z,m,q,w=!1;var h=function(b){var a=b.box?0:b.padding||0;var c=0;if(b&&(!b.alignAttr||b.placed)){var f=b.alignAttr||{x:b.attr("x"),y:b.attr("y")};var d=b.parentGroup;b.width||(c=b.getBBox(),
b.width=c.width,b.height=c.height,c=p.fontMetrics(null,b.element).h);return{x:f.x+(d.translateX||0)+a,y:f.y+(d.translateY||0)+a-c,width:b.width-2*a,height:b.height-2*a}}};for(m=0;m<v;m++)if(z=d[m])z.oldOpacity=z.opacity,z.newOpacity=1,z.absoluteBox=h(z);d.sort(function(b,a){return(a.labelrank||0)-(b.labelrank||0)});for(m=0;m<v;m++){var f=(h=d[m])&&h.absoluteBox;for(z=m+1;z<v;++z){var c=(q=d[z])&&q.absoluteBox;!f||!c||h===q||0===h.newOpacity||0===q.newOpacity||c.x>f.x+f.width||c.x+c.width<f.x||c.y>
f.y+f.height||c.y+c.height<f.y||((h.labelrank<q.labelrank?h:q).newOpacity=0)}}d.forEach(function(b){var a;if(b){var c=b.newOpacity;b.oldOpacity!==c&&(b.alignAttr&&b.placed?(c?b.show(!0):a=function(){b.hide(!0);b.placed=!1},w=!0,b.alignAttr.opacity=c,b[b.isOld?"animate":"attr"](b.alignAttr,null,a),x(g,"afterHideOverlappingLabel")):b.attr({opacity:c}));b.isOld=!0}});w&&x(g,"afterHideAllOverlappingLabels")}});K(y,"parts/Interaction.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=
g.defined,F=g.extend,E=g.isArray,D=g.isObject,x=g.objectEach,v=g.pick,C=d.addEvent;g=d.Chart;var B=d.createElement,p=d.css,z=d.defaultOptions,m=d.defaultPlotOptions,q=d.fireEvent,w=d.hasTouch,h=d.Legend,f=d.merge,c=d.Point,b=d.Series,a=d.seriesTypes,l=d.svg;var n=d.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,e=function(a){var e=c.getPointFromEvent(a);"undefined"!==typeof e&&(c.isDirectTouch=!0,e.onMouseOver(a))},f;a.points.forEach(function(a){f=E(a.dataLabels)?a.dataLabels:
a.dataLabel?[a.dataLabel]:[];a.graphic&&(a.graphic.element.point=a);f.forEach(function(e){e.div?e.div.point=a:e.element.point=a})});a._hasTracking||(a.trackerGroups.forEach(function(f){if(a[f]){a[f].addClass("highcharts-tracker").on("mouseover",e).on("mouseout",function(a){c.onTrackerMouseOut(a)});if(w)a[f].on("touchstart",e);!b.styledMode&&a.options.cursor&&a[f].css(p).css({cursor:a.options.cursor})}}),a._hasTracking=!0);q(this,"afterDrawTracker")},drawTrackerGraph:function(){var a=this,b=a.options,
c=b.trackByArea,e=[].concat(c?a.areaPath:a.graphPath),f=e.length,d=a.chart,g=d.pointer,h=d.renderer,m=d.options.tooltip.snap,n=a.tracker,p,v=function(){if(d.hoverSeries!==a)a.onMouseOver()},z="rgba(192,192,192,"+(l?.0001:.002)+")";if(f&&!c)for(p=f+1;p--;)"M"===e[p]&&e.splice(p+1,0,e[p+1]-m,e[p+2],"L"),(p&&"M"===e[p]||p===f)&&e.splice(p,0,"L",e[p-2]+m,e[p-1]);n?n.attr({d:e}):a.graph&&(a.tracker=h.path(e).attr({visibility:a.visible?"visible":"hidden",zIndex:2}).addClass(c?"highcharts-tracker-area":
"highcharts-tracker-line").add(a.group),d.styledMode||a.tracker.attr({"stroke-linejoin":"round",stroke:z,fill:c?z:"none","stroke-width":a.graph.strokeWidth()+(c?0:2*m)}),[a.tracker,a.markerGroup].forEach(function(a){a.addClass("highcharts-tracker").on("mouseover",v).on("mouseout",function(a){g.onTrackerMouseOut(a)});b.cursor&&!d.styledMode&&a.css({cursor:b.cursor});if(w)a.on("touchstart",v)}));q(this,"afterDrawTracker")}};a.column&&(a.column.prototype.drawTracker=n.drawTrackerPoint);a.pie&&(a.pie.prototype.drawTracker=
n.drawTrackerPoint);a.scatter&&(a.scatter.prototype.drawTracker=n.drawTrackerPoint);F(h.prototype,{setItemEvents:function(a,b,d){var e=this,k=e.chart.renderer.boxWrapper,g=a instanceof c,h="highcharts-legend-"+(g?"point":"series")+"-active",l=e.chart.styledMode;(d?b:a.legendGroup).on("mouseover",function(){a.visible&&e.allItems.forEach(function(e){a!==e&&e.setState("inactive",!g)});a.setState("hover");a.visible&&k.addClass(h);l||b.css(e.options.itemHoverStyle)}).on("mouseout",function(){e.chart.styledMode||
b.css(f(a.visible?e.itemStyle:e.itemHiddenStyle));e.allItems.forEach(function(e){a!==e&&e.setState("",!g)});k.removeClass(h);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible();e.allItems.forEach(function(e){a!==e&&e.setState(a.visible?"inactive":"",!g)})};k.removeClass(h);b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):q(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=B("input",{type:"checkbox",className:"highcharts-legend-checkbox",
checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);C(a.checkbox,"click",function(b){q(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});F(g.prototype,{showResetZoom:function(){function a(){b.zoomOut()}var b=this,c=z.lang,e=b.options.chart.resetZoomButton,f=e.theme,d=f.states,g="chart"===e.relativeTo||"spaceBox"===e.relativeTo?null:"plotBox";q(this,"beforeShowResetZoom",null,function(){b.resetZoomButton=b.renderer.button(c.resetZoom,
null,null,a,f,d&&d.hover).attr({align:e.position.align,title:c.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(e.position,!1,g)});q(this,"afterShowResetZoom")},zoomOut:function(){q(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(a){var b=this,c,e=b.pointer,f=!1,d=b.inverted?e.mouseDownX:e.mouseDownY;!a||a.resetSelection?(b.axes.forEach(function(a){c=a.zoom()}),e.initiated=!1):a.xAxis.concat(a.yAxis).forEach(function(a){var k=a.axis,g=b.inverted?k.left:k.top,h=b.inverted?
g+k.width:g+k.height,l=k.isXAxis,u=!1;if(!l&&d>=g&&d<=h||l||!y(d))u=!0;e[l?"zoomX":"zoomY"]&&u&&(c=k.zoom(a.min,a.max),k.displayBtn&&(f=!0))});var g=b.resetZoomButton;f&&!g?b.showResetZoom():!f&&D(g)&&(b.resetZoomButton=g.destroy());c&&b.redraw(v(b.options.chart.animation,a&&a.animation,100>b.pointCount))},pan:function(a,b){var c=this,e=c.hoverPoints,f=c.options.chart,d;b="object"===typeof b?b:{enabled:b,type:"x"};f&&f.panning&&(f.panning=b);var g=b.type;q(this,"pan",{originalEvent:a},function(){e&&
e.forEach(function(a){a.setState()});var b=[1];"xy"===g?b=[1,0]:"y"===g&&(b=[0]);b.forEach(function(e){var b=c[e?"xAxis":"yAxis"][0],f=b.options,g=b.horiz,k=a[g?"chartX":"chartY"];g=g?"mouseDownX":"mouseDownY";var h=c[g],l=(b.pointRange||0)/2,u=b.reversed&&!c.inverted||!b.reversed&&c.inverted?-1:1,r=b.getExtremes(),m=b.toValue(h-k,!0)+l*u;u=b.toValue(h+b.len-k,!0)-l*u;var t=u<m;h=t?u:m;m=t?m:u;u=Math.min(r.dataMin,l?r.min:b.toValue(b.toPixels(r.min)-b.minPixelPadding));l=Math.max(r.dataMax,l?r.max:
b.toValue(b.toPixels(r.max)+b.minPixelPadding));if(!f.ordinal){e&&(f=u-h,0<f&&(m+=f,h=u),f=m-l,0<f&&(m=l,h-=f));if(b.series.length&&h!==r.min&&m!==r.max&&e||b.panningState&&h>=b.panningState.startMin&&m<=b.panningState.startMax)b.setExtremes(h,m,!1,!1,{trigger:"pan"}),d=!0;c[g]=k}});d&&c.redraw(!1);p(c.container,{cursor:"move"})})}});F(c.prototype,{select:function(a,b){var c=this,e=c.series,f=e.chart;this.selectedStaging=a=v(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=
c.options.selected=a;e.options.data[e.data.indexOf(c)]=c.options;c.setState(a&&"select");b||f.getSelectedPoints().forEach(function(a){var e=a.series;a.selected&&a!==c&&(a.selected=a.options.selected=!1,e.options.data[e.data.indexOf(a)]=a.options,a.setState(f.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),a.firePointEvent("unselect"))})});delete this.selectedStaging},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");this.series.options.inactiveOtherPoints||(a.hoverPoints||[]).forEach(function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=this,b=f(a.series.options.point,a.options).events;a.events=b;x(b,function(b,e){d.isFunction(b)&&C(a,e,b)});this.hasImportedEvents=!0}},setState:function(a,b){var c=this.series,e=this.state,f=c.options.states[a||
"normal"]||{},d=m[c.type].marker&&c.options.marker,g=d&&!1===d.enabled,h=d&&d.states&&d.states[a||"normal"]||{},l=!1===h.enabled,n=c.stateMarkerGraphic,t=this.marker||{},p=c.chart,w=c.halo,z,x=d&&c.markerAttribs;a=a||"";if(!(a===this.state&&!b||this.selected&&"select"!==a||!1===f.enabled||a&&(l||g&&!1===h.enabled)||a&&t.states&&t.states[a]&&!1===t.states[a].enabled)){this.state=a;x&&(z=c.markerAttribs(this,a));if(this.graphic){e&&this.graphic.removeClass("highcharts-point-"+e);a&&this.graphic.addClass("highcharts-point-"+
a);if(!p.styledMode){var B=c.pointAttribs(this,a);var y=v(p.options.chart.animation,f.animation);c.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(a){a&&a.animate({opacity:B.opacity},y)}),this.connector&&this.connector.animate({opacity:B.opacity},y));this.graphic.animate(B,y)}z&&this.graphic.animate(z,v(p.options.chart.animation,h.animation,d.animation));n&&n.hide()}else{if(a&&h){e=t.symbol||c.symbol;n&&n.currentSymbol!==e&&(n=n.destroy());if(z)if(n)n[b?"animate":"attr"]({x:z.x,
y:z.y});else e&&(c.stateMarkerGraphic=n=p.renderer.symbol(e,z.x,z.y,z.width,z.height).add(c.markerGroup),n.currentSymbol=e);!p.styledMode&&n&&n.attr(c.pointAttribs(this,a))}n&&(n[a&&this.isInside?"show":"hide"](),n.element.point=this)}a=f.halo;f=(n=this.graphic||n)&&n.visibility||"inherit";a&&a.size&&n&&"hidden"!==f&&!this.isCluster?(w||(c.halo=w=p.renderer.path().add(n.parentGroup)),w.show()[b?"animate":"attr"]({d:this.haloPath(a.size)}),w.attr({"class":"highcharts-halo highcharts-color-"+v(this.colorIndex,
c.colorIndex)+(this.className?" "+this.className:""),visibility:f,zIndex:-1}),w.point=this,p.styledMode||w.attr(F({fill:this.color||c.color,"fill-opacity":a.opacity},a.attributes))):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)},null,w.hide);q(this,"afterSetState")}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});F(b.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();
this.options.events.mouseOver&&q(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&&q(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();b.series.forEach(function(a){a.setState("",!0)})},setState:function(a,b){var c=this,e=c.options,f=c.graph,d=e.inactiveOtherPoints,g=e.states,h=e.lineWidth,l=e.opacity,m=v(g[a||
"normal"]&&g[a||"normal"].animation,c.chart.options.chart.animation);e=0;a=a||"";if(c.state!==a&&([c.group,c.markerGroup,c.dataLabelsGroup].forEach(function(e){e&&(c.state&&e.removeClass("highcharts-series-"+c.state),a&&e.addClass("highcharts-series-"+a))}),c.state=a,!c.chart.styledMode)){if(g[a]&&!1===g[a].enabled)return;a&&(h=g[a].lineWidth||h+(g[a].lineWidthPlus||0),l=v(g[a].opacity,l));if(f&&!f.dashstyle)for(g={"stroke-width":h},f.animate(g,m);c["zone-graph-"+e];)c["zone-graph-"+e].attr(g),e+=
1;d||[c.group,c.markerGroup,c.dataLabelsGroup,c.labelBySeries].forEach(function(a){a&&a.animate({opacity:l},m)})}b&&d&&c.points&&c.setAllPointsToState(a)},setAllPointsToState:function(a){this.points.forEach(function(b){b.setState&&b.setState(a)})},setVisible:function(a,b){var c=this,e=c.chart,f=c.legendItem,d=e.options.chart.ignoreHiddenSeries,g=c.visible;var h=(c.visible=a=c.options.visible=c.userOptions.visible="undefined"===typeof a?!g:a)?"show":"hide";["group","dataLabelsGroup","markerGroup",
"tracker","tt"].forEach(function(a){if(c[a])c[a][h]()});if(e.hoverSeries===c||(e.hoverPoint&&e.hoverPoint.series)===c)c.onMouseOut();f&&e.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&e.series.forEach(function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});c.linkedSeries.forEach(function(e){e.setVisible(a,!1)});d&&(e.isDirtyBox=!0);q(c,h);!1!==b&&e.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=this.options.selected=
"undefined"===typeof a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);q(this,a?"select":"unselect")},drawTracker:n.drawTrackerGraph})});K(y,"parts/Responsive.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.isArray,F=g.isObject,E=g.objectEach,D=g.pick,x=g.splat;g=d.Chart;g.prototype.setResponsive=function(g,x){var v=this.options.responsive,p=[],z=this.currentResponsive;!x&&v&&v.rules&&v.rules.forEach(function(g){"undefined"===typeof g._id&&(g._id=d.uniqueKey());
this.matchResponsiveRule(g,p)},this);x=d.merge.apply(0,p.map(function(g){return d.find(v.rules,function(d){return d._id===g}).chartOptions}));x.isResponsiveOptions=!0;p=p.toString()||void 0;p!==(z&&z.ruleIds)&&(z&&this.update(z.undoOptions,g,!0),p?(z=this.currentOptions(x),z.isResponsiveOptions=!0,this.currentResponsive={ruleIds:p,mergedOptions:x,undoOptions:z},this.update(x,g,!0)):this.currentResponsive=void 0)};g.prototype.matchResponsiveRule=function(d,g){var v=d.condition;(v.callback||function(){return this.chartWidth<=
D(v.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=D(v.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=D(v.minWidth,0)&&this.chartHeight>=D(v.minHeight,0)}).call(this)&&g.push(d._id)};g.prototype.currentOptions=function(d){function g(d,m,p,w){var h;E(d,function(f,c){if(!w&&-1<v.collectionsWithUpdate.indexOf(c))for(f=x(f),p[c]=[],h=0;h<f.length;h++)m[c][h]&&(p[c][h]={},g(f[h],m[c][h],p[c][h],w+1));else F(f)?(p[c]=y(f)?[]:{},g(f,m[c]||{},p[c],w+1)):p[c]="undefined"===typeof m[c]?null:m[c]})}var v=this,
p={};g(d,this.options,p,0);return p}});K(y,"masters/highcharts.src.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.extend;y(d,{animObject:g.animObject,arrayMax:g.arrayMax,arrayMin:g.arrayMin,attr:g.attr,correctFloat:g.correctFloat,defined:g.defined,destroyObjectProperties:g.destroyObjectProperties,discardElement:g.discardElement,erase:g.erase,extend:g.extend,extendClass:g.extendClass,isArray:g.isArray,isClass:g.isClass,isDOMElement:g.isDOMElement,isNumber:g.isNumber,isObject:g.isObject,
isString:g.isString,numberFormat:g.numberFormat,objectEach:g.objectEach,offset:g.offset,pad:g.pad,pick:g.pick,pInt:g.pInt,relativeLength:g.relativeLength,setAnimation:g.setAnimation,splat:g.splat,syncTimeout:g.syncTimeout,wrap:g.wrap});return d});K(y,"parts/Scrollbar.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){function y(d,f,c){this.init(d,f,c)}var F=g.correctFloat,E=g.defined,D=g.destroyObjectProperties,x=g.pick,v=d.addEvent;g=d.Axis;var C=d.defaultOptions,B=d.fireEvent,p=d.hasTouch,
z=d.merge,m=d.removeEvent,q,w={height:d.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};C.scrollbar=z(!0,w,C.scrollbar);d.swapXY=q=function(d,f){var c=d.length;
if(f)for(f=0;f<c;f+=3){var b=d[f+1];d[f+1]=d[f+2];d[f+2]=b}return d};y.prototype={init:function(d,f,c){this.scrollbarButtons=[];this.renderer=d;this.userOptions=f;this.options=z(w,f);this.chart=c;this.size=x(this.options.size,this.options.height);f.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var d=this.renderer,f=this.options,c=this.size,b=this.chart.styledMode,a;this.group=a=d.g("scrollbar").attr({zIndex:f.zIndex,translateY:-99999}).add();this.track=d.rect().addClass("highcharts-scrollbar-track").attr({x:0,
r:f.trackBorderRadius||0,height:c,width:c}).add(a);b||this.track.attr({fill:f.trackBackgroundColor,stroke:f.trackBorderColor,"stroke-width":f.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=d.g().add(a);this.scrollbar=d.rect().addClass("highcharts-scrollbar-thumb").attr({height:c,width:c,r:f.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=d.path(q(["M",-3,c/4,"L",-3,2*c/3,"M",0,c/4,"L",0,2*c/3,
"M",3,c/4,"L",3,2*c/3],f.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);b||(this.scrollbar.attr({fill:f.barBackgroundColor,stroke:f.barBorderColor,"stroke-width":f.barBorderWidth}),this.scrollbarRifles.attr({stroke:f.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(d,
f,c,b){var a=this.options.vertical,g=0,h=this.rendered?"animate":"attr";this.x=d;this.y=f+this.trackBorderWidth;this.width=c;this.xOffset=this.height=b;this.yOffset=g;a?(this.width=this.yOffset=c=g=this.size,this.xOffset=f=0,this.barWidth=b-2*c,this.x=d+=this.options.margin):(this.height=this.xOffset=b=f=this.size,this.barWidth=c-2*b,this.y+=this.options.margin);this.group[h]({translateX:d,translateY:this.y});this.track[h]({width:c,height:b});this.scrollbarButtons[1][h]({translateX:a?0:c-f,translateY:a?
b-g:0})},drawScrollbarButton:function(d){var f=this.renderer,c=this.scrollbarButtons,b=this.options,a=this.size;var g=f.g().add(this.group);c.push(g);g=f.rect().addClass("highcharts-scrollbar-button").add(g);this.chart.styledMode||g.attr({stroke:b.buttonBorderColor,"stroke-width":b.buttonBorderWidth,fill:b.buttonBackgroundColor});g.attr(g.crisp({x:-.5,y:-.5,width:a+1,height:a+1,r:b.buttonBorderRadius},g.strokeWidth()));g=f.path(q(["M",a/2+(d?-1:1),a/2-3,"L",a/2+(d?-1:1),a/2+3,"L",a/2+(d?2:-2),a/2],
b.vertical)).addClass("highcharts-scrollbar-arrow").add(c[d]);this.chart.styledMode||g.attr({fill:b.buttonArrowColor})},setRange:function(d,f){var c=this.options,b=c.vertical,a=c.minWidth,g=this.barWidth,h,m=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(E(g)){d=Math.max(d,0);var p=Math.ceil(g*d);this.calculatedWidth=h=F(g*Math.min(f,1)-p);h<a&&(p=(g-a+h)*d,h=a);a=Math.floor(p+this.xOffset+this.yOffset);g=h/2-.5;this.from=d;this.to=f;b?(this.scrollbarGroup[m]({translateY:a}),
this.scrollbar[m]({height:h}),this.scrollbarRifles[m]({translateY:g}),this.scrollbarTop=a,this.scrollbarLeft=0):(this.scrollbarGroup[m]({translateX:a}),this.scrollbar[m]({width:h}),this.scrollbarRifles[m]({translateX:g}),this.scrollbarLeft=a,this.scrollbarTop=0);12>=h?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===c.showFull&&(0>=d&&1<=f?this.group.hide():this.group.show());this.rendered=!0}},initEvents:function(){var d=this;d.mouseMoveHandler=function(f){var c=d.chart.pointer.normalize(f),
b=d.options.vertical?"chartY":"chartX",a=d.initPositions;!d.grabbedCenter||f.touches&&0===f.touches[0][b]||(c=d.cursorToScrollbarPosition(c)[b],b=d[b],b=c-b,d.hasDragged=!0,d.updatePosition(a[0]+b,a[1]+b),d.hasDragged&&B(d,"changed",{from:d.from,to:d.to,trigger:"scrollbar",DOMType:f.type,DOMEvent:f}))};d.mouseUpHandler=function(f){d.hasDragged&&B(d,"changed",{from:d.from,to:d.to,trigger:"scrollbar",DOMType:f.type,DOMEvent:f});d.grabbedCenter=d.hasDragged=d.chartX=d.chartY=null};d.mouseDownHandler=
function(f){f=d.chart.pointer.normalize(f);f=d.cursorToScrollbarPosition(f);d.chartX=f.chartX;d.chartY=f.chartY;d.initPositions=[d.from,d.to];d.grabbedCenter=!0};d.buttonToMinClick=function(f){var c=F(d.to-d.from)*d.options.step;d.updatePosition(F(d.from-c),F(d.to-c));B(d,"changed",{from:d.from,to:d.to,trigger:"scrollbar",DOMEvent:f})};d.buttonToMaxClick=function(f){var c=(d.to-d.from)*d.options.step;d.updatePosition(d.from+c,d.to+c);B(d,"changed",{from:d.from,to:d.to,trigger:"scrollbar",DOMEvent:f})};
d.trackClick=function(f){var c=d.chart.pointer.normalize(f),b=d.to-d.from,a=d.y+d.scrollbarTop,g=d.x+d.scrollbarLeft;d.options.vertical&&c.chartY>a||!d.options.vertical&&c.chartX>g?d.updatePosition(d.from+b,d.to+b):d.updatePosition(d.from-b,d.to-b);B(d,"changed",{from:d.from,to:d.to,trigger:"scrollbar",DOMEvent:f})}},cursorToScrollbarPosition:function(d){var f=this.options;f=f.minWidth>this.calculatedWidth?f.minWidth:0;return{chartX:(d.chartX-this.x-this.xOffset)/(this.barWidth-f),chartY:(d.chartY-
this.y-this.yOffset)/(this.barWidth-f)}},updatePosition:function(d,f){1<f&&(d=F(1-F(f-d)),f=1);0>d&&(f=F(f-d),d=0);this.from=d;this.to=f},update:function(d){this.destroy();this.init(this.chart.renderer,z(!0,this.options,d),this.chart)},addEvents:function(){var d=this.options.inverted?[1,0]:[0,1],f=this.scrollbarButtons,c=this.scrollbarGroup.element,b=this.mouseDownHandler,a=this.mouseMoveHandler,g=this.mouseUpHandler;d=[[f[d[0]].element,"click",this.buttonToMinClick],[f[d[1]].element,"click",this.buttonToMaxClick],
[this.track.element,"click",this.trackClick],[c,"mousedown",b],[c.ownerDocument,"mousemove",a],[c.ownerDocument,"mouseup",g]];p&&d.push([c,"touchstart",b],[c.ownerDocument,"touchmove",a],[c.ownerDocument,"touchend",g]);d.forEach(function(a){v.apply(null,a)});this._events=d},removeEvents:function(){this._events.forEach(function(d){m.apply(null,d)});this._events.length=0},destroy:function(){var d=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(d){this[d]&&
this[d].destroy&&(this[d]=this[d].destroy())},this);d&&this===d.scrollbar&&(d.scrollbar=null,D(d.scrollbarButtons))}};d.Scrollbar||(v(g,"afterInit",function(){var g=this;g.options&&g.options.scrollbar&&g.options.scrollbar.enabled&&(g.options.scrollbar.vertical=!g.horiz,g.options.startOnTick=g.options.endOnTick=!1,g.scrollbar=new y(g.chart.renderer,g.options.scrollbar,g.chart),v(g.scrollbar,"changed",function(f){var c=Math.min(x(g.options.min,g.min),g.min,g.dataMin),b=Math.max(x(g.options.max,g.max),
g.max,g.dataMax)-c;if(g.horiz&&!g.reversed||!g.horiz&&g.reversed){var a=c+b*this.to;c+=b*this.from}else a=c+b*(1-this.from),c+=b*(1-this.to);x(this.options.liveRedraw,d.svg&&!d.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===f.DOMType||!E(f.DOMType)?g.setExtremes(c,a,!0,"mousemove"!==f.DOMType,f):this.setRange(this.from,this.to)}))}),v(g,"afterRender",function(){var d=Math.min(x(this.options.min,this.min),this.min,x(this.dataMin,this.min)),f=Math.max(x(this.options.max,this.max),this.max,x(this.dataMax,
this.max)),c=this.scrollbar,b=this.axisTitleMargin+(this.titleOffset||0),a=this.chart.scrollbarsOffsets,g=this.options.margin||0;c&&(this.horiz?(this.opposite||(a[1]+=b),c.position(this.left,this.top+this.height+2+a[1]-(this.opposite?g:0),this.width,this.height),this.opposite||(a[1]+=g),b=1):(this.opposite&&(a[0]+=b),c.position(this.left+this.width+2+a[0]-(this.opposite?0:g),this.top,this.width,this.height),this.opposite&&(a[0]+=g),b=0),a[b]+=c.size+c.options.margin,isNaN(d)||isNaN(f)||!E(this.min)||
!E(this.max)||this.min===this.max?c.setRange(0,1):(a=(this.min-d)/(f-d),d=(this.max-d)/(f-d),this.horiz&&!this.reversed||!this.horiz&&this.reversed?c.setRange(a,d):c.setRange(1-d,1-a)))}),v(g,"afterGetOffset",function(){var d=this.horiz?2:1,f=this.scrollbar;f&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[d]+=f.size+f.options.margin)}),d.Scrollbar=y)});K(y,"parts/Navigator.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){function y(a){this.init(a)}var F=g.clamp,E=g.correctFloat,
D=g.defined,x=g.destroyObjectProperties,v=g.erase,C=g.extend,B=g.isArray,p=g.isNumber,z=g.pick,m=g.splat,q=d.addEvent,w=d.Axis;g=d.Chart;var h=d.color,f=d.defaultOptions,c=d.hasTouch,b=d.isTouchDevice,a=d.merge,l=d.removeEvent,n=d.Scrollbar,t=d.Series,I=function(a){for(var e=[],b=1;b<arguments.length;b++)e[b-1]=arguments[b];e=[].filter.call(e,p);if(e.length)return Math[a].apply(0,e)};var r="undefined"===typeof d.seriesTypes.areaspline?"line":"areaspline";C(f,{navigator:{height:40,margin:25,maskInside:!0,
handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:h("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:r,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:[["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,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,
endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});d.Renderer.prototype.symbols["navigator-handle"]=function(a,b,c,d,f){a=f.width/2;b=Math.round(a/3)+.5;f=f.height;return["M",-a-1,.5,"L",a,.5,"L",a,f+.5,"L",-a-1,f+.5,"L",-a-1,.5,"M",-b,4,"L",-b,f-3,"M",b-1,4,"L",b-1,f-3]};w.prototype.toFixedRange=function(a,b,c,d){var e=this.chart&&this.chart.fixedRange,f=(this.pointRange||0)/2;a=z(c,this.translate(a,!0,!this.horiz));b=z(d,this.translate(b,
!0,!this.horiz));var g=e&&(b-a)/e;D(c)||(a=E(a+f));D(d)||(b=E(b-f));.7<g&&1.3>g&&(d?a=b-e:b=a+e);p(a)&&p(b)||(a=b=void 0);return{min:a,max:b}};y.prototype={drawHandle:function(a,b,c,d){var e=this.navigatorOptions.handles.height;this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(a,10)+.5-e)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/2-e/2-1)})},drawOutline:function(a,b,c,d){var e=this.navigatorOptions.maskInside,
f=this.outline.strokeWidth(),g=f/2;f=f%2/2;var k=this.outlineHeight,h=this.scrollbarHeight,l=this.size,u=this.left-h,m=this.top;c?(u-=g,c=m+b+f,b=m+a+f,a=["M",u+k,m-h-f,"L",u+k,c,"L",u,c,"L",u,b,"L",u+k,b,"L",u+k,m+l+h].concat(e?["M",u+k,c-g,"L",u+k,b+g]:[])):(a+=u+h-f,b+=u+h-f,m+=g,a=["M",u,m,"L",a,m,"L",a,m+k,"L",b,m+k,"L",b,m,"L",u+l+2*h,m].concat(e?["M",a-g,m,"L",b+g,m]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var e=this.left,f=this.top,g=this.height;if(c){var k=[e,e,e];var h=
[f,f+a,f+b];var l=[g,g,g];var u=[a,b-a,this.size-b]}else k=[e,e+a,e+b],h=[f,f,f],l=[a,b-a,this.size-b],u=[g,g,g];this.shades.forEach(function(a,b){a[d]({x:k[b],y:h[b],width:l[b],height:u[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,f=d.renderer,g,h={cursor:d.inverted?"ns-resize":"ew-resize"};a.navigatorGroup=g=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!c,c,!c].forEach(function(e,c){a.shades[c]=f.rect().addClass("highcharts-navigator-mask"+
(1===c?"-inside":"-outside")).add(g);d.styledMode||a.shades[c].attr({fill:e?b.maskFill:"rgba(0,0,0,0)"}).css(1===c&&h)});a.outline=f.path().addClass("highcharts-navigator-outline").add(g);d.styledMode||a.outline.attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor});b.handles.enabled&&[0,1].forEach(function(e){b.handles.inverted=d.inverted;a.handles[e]=f.symbol(b.handles.symbols[e],-b.handles.width/2-1,0,b.handles.width,b.handles.height,b.handles);a.handles[e].attr({zIndex:7-e}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+
["left","right"][e]).add(g);if(!d.styledMode){var c=b.handles;a.handles[e].attr({fill:c.backgroundColor,stroke:c.borderColor,"stroke-width":c.lineWidth}).css(h)}})},update:function(b){(this.series||[]).forEach(function(a){a.baseSeries&&delete a.baseSeries.navigatorSeries});this.destroy();a(!0,this.chart.options.navigator,this.options,b);this.init(this.chart)},render:function(a,b,c,d){var e=this.chart,f=this.scrollbarHeight,g,k=this.xAxis,h=k.pointRange||0;var l=k.fake?e.xAxis[0]:k;var u=this.navigatorEnabled,
m,n=this.rendered;var r=e.inverted;var t=e.xAxis[0].minRange,q=e.xAxis[0].options.maxRange;if(!this.hasDragged||D(c)){a=E(a-h/2);b=E(b+h/2);if(!p(a)||!p(b))if(n)c=0,d=z(k.width,l.width);else return;this.left=z(k.left,e.plotLeft+f+(r?e.plotWidth:0));this.size=m=g=z(k.len,(r?e.plotHeight:e.plotWidth)-2*f);e=r?f:g+2*f;c=z(c,k.toPixels(a,!0));d=z(d,k.toPixels(b,!0));p(c)&&Infinity!==Math.abs(c)||(c=0,d=e);a=k.toValue(c,!0);b=k.toValue(d,!0);var w=Math.abs(E(b-a));w<t?this.grabbedLeft?c=k.toPixels(b-t-
h,!0):this.grabbedRight&&(d=k.toPixels(a+t+h,!0)):D(q)&&E(w-h)>q&&(this.grabbedLeft?c=k.toPixels(b-q-h,!0):this.grabbedRight&&(d=k.toPixels(a+q+h,!0)));this.zoomedMax=F(Math.max(c,d),0,m);this.zoomedMin=F(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(c,d),0,m);this.range=this.zoomedMax-this.zoomedMin;m=Math.round(this.zoomedMax);c=Math.round(this.zoomedMin);u&&(this.navigatorGroup.attr({visibility:"visible"}),n=n&&!this.hasDragged?"animate":"attr",this.drawMasks(c,m,r,n),this.drawOutline(c,
m,r,n),this.navigatorOptions.handles.enabled&&(this.drawHandle(c,0,r,n),this.drawHandle(m,1,r,n)));this.scrollbar&&(r?(r=this.top-f,l=this.left-f+(u||!l.opposite?0:(l.titleOffset||0)+l.axisTitleMargin),f=g+2*f):(r=this.top+(u?this.height:-f),l=this.left-f),this.scrollbar.position(l,r,e,f),this.scrollbar.setRange(this.zoomedMin/(g||1),this.zoomedMax/(g||1)));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,d=b.container,f=[],g,h;a.mouseMoveHandler=g=function(b){a.onMouseMove(b)};a.mouseUpHandler=
h=function(b){a.onMouseUp(b)};f=a.getPartsEvents("mousedown");f.push(q(b.renderTo,"mousemove",g),q(d.ownerDocument,"mouseup",h));c&&(f.push(q(b.renderTo,"touchmove",g),q(d.ownerDocument,"touchend",h)),f.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=f;a.series&&a.series[0]&&f.push(q(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,e=[];["shades","handles"].forEach(function(c){b[c].forEach(function(d,f){e.push(q(d.element,
a,function(a){b[c+"Mousedown"](a,f)}))})});return e},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var e=this.chart,c=this.xAxis,d=this.zoomedMin,f=this.left,g=this.size,k=this.range,h=a.chartX;e.inverted&&(h=a.chartY,f=this.top);if(1===b)this.grabbedCenter=h,this.fixedWidth=k,this.dragOffset=h-d;else{a=h-f-k/2;if(0===b)a=Math.max(0,a);else if(2===b&&a+k>=g)if(a=g-k,this.reversedExtremes){a-=k;var l=this.getUnionExtremes().dataMin}else var m=this.getUnionExtremes().dataMax;a!==d&&
(this.fixedWidth=k,b=c.toFixedRange(a,a+k,l,m),D(b.min)&&e.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 e=a.xAxis[0],c=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=c?e.min:e.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=c?e.max:e.min);a.fixedRange=null},onMouseMove:function(a){var e=
this,c=e.chart,f=e.left,g=e.navigatorSize,h=e.range,l=e.dragOffset,m=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,m&&(f=e.top,c=a.chartY),e.grabbedLeft?(e.hasDragged=!0,e.render(0,0,c-f,e.otherHandlePos)):e.grabbedRight?(e.hasDragged=!0,e.render(0,0,e.otherHandlePos,c-f)):e.grabbedCenter&&(e.hasDragged=!0,c<l?c=l:c>g+l-h&&(c=g+l-h),e.render(0,0,c-l,c-l+h)),e.hasDragged&&e.scrollbar&&z(e.scrollbar.options.liveRedraw,d.svg&&!b&&!this.chart.isBoosting)&&(a.DOMType=
a.type,setTimeout(function(){e.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,e=this.xAxis,c=this.scrollbar,d=a.DOMEvent||a;if(this.hasDragged&&(!c||!c.hasDragged)||"scrollbar"===a.trigger){c=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var f=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var g=this.fixedExtreme;this.zoomedMax===this.size&&(g=this.reversedExtremes?c.dataMin:c.dataMax);0===this.zoomedMin&&(f=this.reversedExtremes?c.dataMax:c.dataMin);
e=e.toFixedRange(this.zoomedMin,this.zoomedMax,f,g);D(e.min)&&b.xAxis[0].setExtremes(Math.min(e.min,e.max),Math.max(e.min,e.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:d})}"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),
this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(function(a){l(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&l(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(b){var e=b.options,c=e.navigator,d=c.enabled,f=e.scrollbar,g=f.enabled;e=d?c.height:0;var h=g?f.height:0;this.handles=[];this.shades=[];this.chart=
b;this.setBaseSeries();this.height=e;this.scrollbarHeight=h;this.scrollbarEnabled=g;this.navigatorEnabled=d;this.navigatorOptions=c;this.scrollbarOptions=f;this.outlineHeight=e+h;this.opposite=z(c.opposite,!(d||!b.inverted));var l=this;d=l.baseSeries;f=b.xAxis.length;g=b.yAxis.length;var m=d&&d[0]&&d[0].xAxis||b.xAxis[0]||{options:{}};b.isDirtyBox=!0;l.navigatorEnabled?(l.xAxis=new w(b,a({breaks:m.options.breaks,ordinal:m.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,
type:"datetime",index:f,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},b.inverted?{offsets:[h,0,-h,0],width:e}:{offsets:[0,-h,0,h],height:e})),l.yAxis=new w(b,a(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:g,isInternal:!0,zoomEnabled:!1},b.inverted?{width:e}:{height:e})),d||c.series.data?l.updateNavigatorSeries(!1):0===b.series.length&&(l.unbindRedraw=q(b,"beforeRedraw",function(){0<b.series.length&&!l.series&&(l.setBaseSeries(),
l.unbindRedraw())})),l.reversedExtremes=b.inverted&&!l.xAxis.reversed||!b.inverted&&l.xAxis.reversed,l.renderElements(),l.addMouseEvents()):l.xAxis={translate:function(a,e){var c=b.xAxis[0],d=c.getExtremes(),f=c.len-2*h,g=I("min",c.options.min,d.dataMin);c=I("max",c.options.max,d.dataMax)-g;return e?a*c/f+g:f*(a-g)/c},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:w.prototype.toFixedRange,fake:!0};b.options.scrollbar.enabled&&(b.scrollbar=
l.scrollbar=new n(b.renderer,a(b.options.scrollbar,{margin:l.navigatorEnabled?0:10,vertical:b.inverted}),b),q(l.scrollbar,"changed",function(a){var e=l.size,c=e*this.to;e*=this.from;l.hasDragged=l.scrollbar.hasDragged;l.render(0,0,e,c);(b.options.scrollbar.liveRedraw||"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType)&&setTimeout(function(){l.onMouseUp(a)})}));l.addBaseSeriesEvents();l.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],e=this.xAxis,c=e.options,d=b.options,f;a&&
null===b.dataMin||(f={dataMin:z(c&&c.min,I("min",d.min,b.dataMin,e.dataMin,e.min)),dataMax:z(c&&c.max,I("max",d.max,b.dataMax,e.dataMax,e.max))});return f},setBaseSeries:function(a,b){var e=this.chart,c=this.baseSeries=[];a=a||e.options&&e.options.navigator.baseSeries||(e.series.length?d.find(e.series,function(a){return!a.options.isInternal}).index:0);(e.series||[]).forEach(function(b,e){b.options.isInternal||!b.options.showInNavigator&&(e!==a&&b.options.id!==a||!1===b.options.showInNavigator)||c.push(b)});
this.xAxis&&!this.xAxis.fake&&this.updateNavigatorSeries(!0,b)},updateNavigatorSeries:function(b,c){var e=this,d=e.chart,g=e.baseSeries,k,h,n=e.navigatorOptions.series,r,t={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:!1,isInternal:!0,states:{inactive:{opacity:1}}},p=e.series=(e.series||[]).filter(function(a){var b=a.baseSeries;return 0>g.indexOf(b)?(b&&(l(b,"updatedData",e.updatedDataHandler),delete b.navigatorSeries),
a.chart&&a.destroy(),!1):!0});g&&g.length&&g.forEach(function(b){var l=b.navigatorSeries,m=C({color:b.color,visible:b.visible},B(n)?f.navigator.series:n);l&&!1===e.navigatorOptions.adaptToUpdatedData||(t.name="Navigator "+g.length,k=b.options||{},r=k.navigatorOptions||{},h=a(k,t,m,r),h.pointRange=z(m.pointRange,r.pointRange,f.plotOptions[h.type||"line"].pointRange),m=r.data||m.data,e.hasNavigatorData=e.hasNavigatorData||!!m,h.data=m||k.data&&k.data.slice(0),l&&l.options?l.update(h,c):(b.navigatorSeries=
d.initSeries(h),b.navigatorSeries.baseSeries=b,p.push(b.navigatorSeries)))});if(n.data&&(!g||!g.length)||B(n))e.hasNavigatorData=!1,n=m(n),n.forEach(function(b,c){t.name="Navigator "+(p.length+1);h=a(f.navigator.series,{color:d.series[c]&&!d.series[c].options.isInternal&&d.series[c].color||d.options.colors[c]||d.options.colors[0]},t,b);h.data=b.data;h.data&&(e.hasNavigatorData=!0,p.push(d.initSeries(h)))});b&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];
b[0]&&b[0].xAxis&&q(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);b.forEach(function(b){q(b,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});q(b,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&b.xAxis&&q(b,"updatedData",this.updatedDataHandler);q(b,"remove",function(){this.navigatorSeries&&(v(a.series,this.navigatorSeries),D(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),
delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(a){return this.baseSeries.reduce(function(a,b){return Math.min(a,b.xData?b.xData[0]:a)},a)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;"undefined"!==typeof a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax;b=b.max-b.min;var f=a.stickToMin,g=a.stickToMax,
h=z(this.options.overscroll,0),l=a.series&&a.series[0],m=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(f){var n=c;var r=n+b}g&&(r=d+h,f||(n=Math.max(r-b,a.getBaseSeriesMin(l&&l.xData?l.xData[0]:-Number.MAX_VALUE))));m&&(f||g)&&p(n)&&(this.min=this.userMin=n,this.max=this.userMax=r)}a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,b=this.navigatorSeries,c=a.getBaseSeriesMin(this.xData[0]);a.stickToMax=a.reversedExtremes?
0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=p(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!a.stickToMax);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||(this.eventsToUnbind=[]);this.eventsToUnbind.push(q(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)}),q(this.chart,"getMargins",function(){var a=this.navigator,b=a.opposite?"plotTop":"marginBottom";this.inverted&&(b=a.opposite?"marginRight":"plotLeft");this[b]=(this[b]||0)+(a.navigatorEnabled||!this.inverted?a.outlineHeight:0)+a.navigatorOptions.margin}))},destroy:function(){this.removeEvents();this.xAxis&&(v(this.chart.xAxis,this.xAxis),v(this.chart.axes,this.xAxis));this.yAxis&&(v(this.chart.yAxis,this.yAxis),v(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(a){a.destroy&&
a.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);[this.handles].forEach(function(a){x(a)},this)}};d.Navigator||(d.Navigator=y,q(w,"zoom",function(a){var e=this.chart.options,c=e.chart.zoomType,d=e.chart.pinchType,f=e.navigator;e=e.rangeSelector;this.isXAxis&&(f&&f.enabled||e&&e.enabled)&&("y"===c?a.zoomed=!1:(!b&&"xy"===c||
b&&"xy"===d)&&this.options.range&&(c=this.previousZoom,D(a.newMin)?this.previousZoom=[this.min,this.max]:c&&(a.newMin=c[0],a.newMax=c[1],delete this.previousZoom)));"undefined"!==typeof a.zoomed&&a.preventDefault()}),q(g,"beforeShowResetZoom",function(){var a=this.options,c=a.navigator,d=a.rangeSelector;if((c&&c.enabled||d&&d.enabled)&&(!b&&"x"===a.chart.zoomType||b&&"x"===a.chart.pinchType))return!1}),q(g,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=
this.navigator=new y(this)}),q(g,"afterSetChartSize",function(){var a=this.legend,b=this.navigator;if(b){var c=a&&a.options;var d=b.xAxis;var f=b.yAxis;var g=b.scrollbarHeight;this.inverted?(b.left=b.opposite?this.chartWidth-g-b.height:this.spacing[3]+g,b.top=this.plotTop+g):(b.left=this.plotLeft+g,b.top=b.navigatorOptions.top||this.chartHeight-b.height-g-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(c&&"bottom"===c.verticalAlign&&c.enabled&&!c.floating?
a.legendHeight+z(c.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));d&&f&&(this.inverted?d.options.left=f.options.left=b.left:d.options.top=f.options.top=b.top,d.setAxisSize(),f.setAxisSize())}}),q(g,"update",function(b){var e=b.options.navigator||{},c=b.options.scrollbar||{};this.navigator||this.scroller||!e.enabled&&!c.enabled||(a(!0,this.options.navigator,e),a(!0,this.options.scrollbar,c),delete b.options.navigator,delete b.options.scrollbar)}),q(g,"afterUpdate",function(a){this.navigator||
this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new y(this),z(a.redraw,!0)&&this.redraw(a.animation))}),q(g,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),q(t,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),g.prototype.callbacks.push(function(a){var b=a.navigator;b&&a.xAxis[0]&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))}))});
K(y,"parts/OrdinalAxis.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.defined,F=g.extend,E=g.pick;g=d.addEvent;var D=d.Axis,x=d.Chart,v=d.css,C=d.noop,B=d.timeUnits;g(d.Series,"updatedData",function(){var d=this.xAxis;d&&d.options.ordinal&&delete d.ordinalIndex});D.prototype.getTimeTicks=function(d,g,m,q,w,h,f){var c=0,b,a,l={},n=[],t=-Number.MAX_VALUE,p=this.options.tickPixelInterval,r=this.chart.time,e=[];if(!this.options.ordinal&&!this.options.breaks||!w||3>w.length||
"undefined"===typeof g)return r.getTimeTicks.apply(r,arguments);var k=w.length;for(b=0;b<k;b++){var u=b&&w[b-1]>m;w[b]<g&&(c=b);if(b===k-1||w[b+1]-w[b]>5*h||u){if(w[b]>t){for(a=r.getTimeTicks(d,w[c],w[b],q);a.length&&a[0]<=t;)a.shift();a.length&&(t=a[a.length-1]);e.push(n.length);n=n.concat(a)}c=b+1}if(u)break}a=a.info;if(f&&a.unitRange<=B.hour){b=n.length-1;for(c=1;c<b;c++)if(r.dateFormat("%d",n[c])!==r.dateFormat("%d",n[c-1])){l[n[c]]="day";var v=!0}v&&(l[n[0]]="day");a.higherRanks=l}a.segmentStarts=
e;n.info=a;if(f&&y(p)){c=e=n.length;v=[];var z;for(r=[];c--;)b=this.translate(n[c]),z&&(r[c]=z-b),v[c]=z=b;r.sort();r=r[Math.floor(r.length/2)];r<.6*p&&(r=null);c=n[e-1]>m?e-1:e;for(z=void 0;c--;)b=v[c],e=Math.abs(z-b),z&&e<.8*p&&(null===r||e<.8*r)?(l[n[c]]&&!l[n[c+1]]?(e=c+1,z=b):e=c,n.splice(e,1)):z=b}return n};F(D.prototype,{beforeSetTickPositions:function(){var d=[],g,m=!1,q=this.getExtremes(),w=q.min,h=q.max,f,c=this.isXAxis&&!!this.options.breaks;q=this.options.ordinal;var b=Number.MAX_VALUE,
a=this.chart.options.chart.ignoreHiddenSeries,l;if(q||c){this.series.forEach(function(f,h){g=[];if(!(a&&!1===f.visible||!1===f.takeOrdinalPosition&&!c)&&(d=d.concat(f.processedXData),n=d.length,d.sort(function(a,b){return a-b}),b=Math.min(b,E(f.closestPointRange,b)),n)){for(h=0;h<n-1;)d[h]!==d[h+1]&&g.push(d[h+1]),h++;g[0]!==d[0]&&g.unshift(d[0]);d=g}f.isSeriesBoosting&&(l=!0)});l&&(d.length=0);var n=d.length;if(2<n){var t=d[1]-d[0];for(f=n-1;f--&&!m;)d[f+1]-d[f]!==t&&(m=!0);!this.options.keepOrdinalPadding&&
(d[0]-w>t||h-d[d.length-1]>t)&&(m=!0)}else this.options.overscroll&&(2===n?b=d[1]-d[0]:1===n?(b=this.options.overscroll,d=[d[0],d[0]+b]):b=this.overscrollPointsRange);m?(this.options.overscroll&&(this.overscrollPointsRange=b,d=d.concat(this.getOverscrollPositions())),this.ordinalPositions=d,t=this.ordinal2lin(Math.max(w,d[0]),!0),f=Math.max(this.ordinal2lin(Math.min(h,d[d.length-1]),!0),1),this.ordinalSlope=h=(h-w)/(f-t),this.ordinalOffset=w-t*h):(this.overscrollPointsRange=E(this.closestPointRange,
this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=q&&m;this.groupIntervalFactor=null},val2lin:function(d,g){var m=this.ordinalPositions;if(m){var q=m.length,p;for(p=q;p--;)if(m[p]===d){var h=p;break}for(p=q-1;p--;)if(d>m[p]||0===p){d=(d-m[p])/(m[p+1]-m[p]);h=p+d;break}g=g?h:this.ordinalSlope*(h||0)+this.ordinalOffset}else g=d;return g},lin2val:function(d,g){var m=this.ordinalPositions;if(m){var q=this.ordinalSlope,p=this.ordinalOffset,h=
m.length-1;if(g)if(0>d)d=m[0];else if(d>h)d=m[h];else{h=Math.floor(d);var f=d-h}else for(;h--;)if(g=q*h+p,d>=g){q=q*(h+1)+p;f=(d-g)/(q-g);break}return"undefined"!==typeof f&&"undefined"!==typeof m[h]?m[h]+(f?f*(m[h+1]-m[h]):0):d}return d},getExtendedPositions:function(){var d=this,g=d.chart,m=d.series[0].currentDataGrouping,q=d.ordinalIndex,w=m?m.count+m.unitName:"raw",h=d.options.overscroll,f=d.getExtremes(),c;q||(q=d.ordinalIndex={});if(!q[w]){var b={series:[],chart:g,getExtremes:function(){return{min:f.dataMin,
max:f.dataMax+h}},options:{ordinal:!0},val2lin:D.prototype.val2lin,ordinal2lin:D.prototype.ordinal2lin};d.series.forEach(function(a){c={xAxis:b,xData:a.xData.slice(),chart:g,destroyGroupedData:C};c.xData=c.xData.concat(d.getOverscrollPositions());c.options={dataGrouping:m?{enabled:!0,forced:!0,approximation:"open",units:[[m.unitName,[m.count]]]}:{enabled:!1}};a.processData.apply(c);b.series.push(c)});d.beforeSetTickPositions.apply(b);q[w]=b.ordinalPositions}return q[w]},getOverscrollPositions:function(){var d=
this.options.overscroll,g=this.overscrollPointsRange,m=[],q=this.dataMax;if(y(g))for(m.push(q);q<=this.dataMax+d;)q+=g,m.push(q);return m},getGroupIntervalFactor:function(d,g,m){m=m.processedXData;var q=m.length,p=[];var h=this.groupIntervalFactor;if(!h){for(h=0;h<q-1;h++)p[h]=m[h+1]-m[h];p.sort(function(d,c){return d-c});p=p[Math.floor(q/2)];d=Math.max(d,m[0]);g=Math.min(g,m[q-1]);this.groupIntervalFactor=h=q*p/(g-d)}return h},postProcessTickInterval:function(d){var g=this.ordinalSlope;return g?
this.options.breaks?this.closestPointRange||d:d/(g/this.closestPointRange):d}});D.prototype.ordinal2lin=D.prototype.val2lin;g(x,"pan",function(d){var g=this.xAxis[0],m=g.options.overscroll,q=d.originalEvent.chartX,p=this.options.chart&&this.options.chart.panning,h=!1;if(p&&"y"!==p.type&&g.options.ordinal&&g.series.length){var f=this.mouseDownX,c=g.getExtremes(),b=c.dataMax,a=c.min,l=c.max,n=this.hoverPoints,t=g.closestPointRange||g.overscrollPointsRange;f=(f-q)/(g.translationSlope*(g.ordinalSlope||
t));var x={ordinalPositions:g.getExtendedPositions()};t=g.lin2val;var r=g.val2lin;if(!x.ordinalPositions)h=!0;else if(1<Math.abs(f)){n&&n.forEach(function(a){a.setState()});if(0>f){n=x;var e=g.ordinalPositions?g:x}else n=g.ordinalPositions?g:x,e=x;x=e.ordinalPositions;b>x[x.length-1]&&x.push(b);this.fixedRange=l-a;f=g.toFixedRange(null,null,t.apply(n,[r.apply(n,[a,!0])+f,!0]),t.apply(e,[r.apply(e,[l,!0])+f,!0]));f.min>=Math.min(c.dataMin,a)&&f.max<=Math.max(b,l)+m&&g.setExtremes(f.min,f.max,!0,!1,
{trigger:"pan"});this.mouseDownX=q;v(this.container,{cursor:"move"})}}else h=!0;h||p&&/y/.test(p.type)?m&&(g.max=g.dataMax+m):d.preventDefault()});g(D,"foundExtremes",function(){this.isXAxis&&y(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&y(this.userMin)&&(this.min+=this.options.overscroll))});g(D,"afterSetScale",function(){this.horiz&&
!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)})});K(y,"modules/broken-axis.src.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.extend,F=g.isArray,E=g.pick;g=d.addEvent;var D=d.find,x=d.fireEvent,v=d.Axis,C=d.Series,B=function(d,g){return D(g,function(g){return g.from<d&&d<g.to})};y(v.prototype,{isInBreak:function(d,g){var m=d.repeat||Infinity,q=d.from,p=d.to-d.from;g=g>=q?(g-q)%m:m-(q-g)%m;return d.inclusive?
g<=p:g<p&&0!==g},isInAnyBreak:function(d,g){var m=this.options.breaks,q=m&&m.length,p;if(q){for(;q--;)if(this.isInBreak(m[q],d)){var h=!0;p||(p=E(m[q].showPoints,!this.isXAxis))}var f=h&&g?h&&!p:h}return f}});g(v,"afterInit",function(){"function"===typeof this.setBreaks&&this.setBreaks(this.options.breaks,!1)});g(v,"afterSetTickPositions",function(){if(this.isBroken){var d=this.tickPositions,g=this.tickPositions.info,m=[],q;for(q=0;q<d.length;q++)this.isInAnyBreak(d[q])||m.push(d[q]);this.tickPositions=
m;this.tickPositions.info=g}});g(v,"afterSetOptions",function(){this.isBroken&&(this.options.ordinal=!1)});v.prototype.setBreaks=function(d,g){function m(d){var c=d,b;for(b=0;b<p.breakArray.length;b++){var a=p.breakArray[b];if(a.to<=d)c-=a.len;else if(a.from>=d)break;else if(p.isInBreak(a,d)){c-=d-a.from;break}}return c}function q(d){var c;for(c=0;c<p.breakArray.length;c++){var b=p.breakArray[c];if(b.from>=d)break;else b.to<d?d+=b.len:p.isInBreak(b,d)&&(d+=b.len)}return d}var p=this,h=F(d)&&!!d.length;
p.isDirty=p.isBroken!==h;p.isBroken=h;p.options.breaks=p.userOptions.breaks=d;p.forceRedraw=!0;p.series.forEach(function(d){d.isDirty=!0});h||p.val2lin!==m||(delete p.val2lin,delete p.lin2val);h&&(p.userOptions.ordinal=!1,p.val2lin=m,p.lin2val=q,p.setExtremes=function(d,c,b,a,g){if(this.isBroken){for(var f,h=this.options.breaks;f=B(d,h);)d=f.to;for(;f=B(c,h);)c=f.from;c<d&&(c=d)}v.prototype.setExtremes.call(this,d,c,b,a,g)},p.setAxisTranslation=function(d){v.prototype.setAxisTranslation.call(this,
d);this.unitLength=null;if(this.isBroken){d=p.options.breaks;var c=[],b=[],a=0,f,g=p.userMin||p.min,h=p.userMax||p.max,m=E(p.pointRangePadding,0),r;d.forEach(function(a){f=a.repeat||Infinity;p.isInBreak(a,g)&&(g+=a.to%f-g%f);p.isInBreak(a,h)&&(h-=h%f-a.from%f)});d.forEach(function(a){k=a.from;for(f=a.repeat||Infinity;k-f>g;)k-=f;for(;k<g;)k+=f;for(r=k;r<h;r+=f)c.push({value:r,move:"in"}),c.push({value:r+(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});var e=0;var k=g;c.forEach(function(c){e+="in"===c.move?1:-1;1===e&&"in"===c.move&&(k=c.value);0===e&&(b.push({from:k,to:c.value,len:c.value-k-(c.size||0)}),a+=c.value-k-(c.size||0))});p.breakArray=b;p.unitLength=h-g-a+m;x(p,"afterBreaks");p.staticScale?p.transA=p.staticScale:p.unitLength&&(p.transA*=(h-p.min+m)/p.unitLength);m&&(p.minPixelPadding=p.transA*p.minPointOffset);p.min=g;p.max=h}});E(g,!0)&&this.chart.redraw()};g(C,"afterGeneratePoints",
function(){var d=this.options.connectNulls,g=this.points,m=this.xAxis,q=this.yAxis;if(this.isDirty)for(var v=g.length;v--;){var h=g[v],f=!(null===h.y&&!1===d)&&(m&&m.isInAnyBreak(h.x,!0)||q&&q.isInAnyBreak(h.y,!0));h.visible=f?!1:!1!==h.options.visible}});g(C,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,E(this.pointArrayMap,["y"]))});d.Series.prototype.drawBreaks=function(d,g){var m=this,p=m.points,v,h,f,c;d&&g.forEach(function(b){v=d.breakArray||[];h=d.isXAxis?
d.min:E(m.options.threshold,d.min);p.forEach(function(a){c=E(a["stack"+b.toUpperCase()],a[b]);v.forEach(function(b){f=!1;if(h<b.from&&c>b.to||h>b.from&&c<b.from)f="pointBreak";else if(h<b.from&&c>b.from&&c<b.to||h>b.from&&c>b.to&&c<b.from)f="pointInBreak";f&&x(d,f,{point:a,brk:b})})})})};d.Series.prototype.gappedPath=function(){var g=this.currentDataGrouping,v=g&&g.gapSize;g=this.options.gapSize;var m=this.points.slice(),q=m.length-1,w=this.yAxis,h;if(g&&0<q)for("value"!==this.options.gapUnit&&(g*=
this.basePointRange),v&&v>g&&v>=this.basePointRange&&(g=v),h=void 0;q--;)h&&!1!==h.visible||(h=m[q+1]),v=m[q],!1!==h.visible&&!1!==v.visible&&(h.x-v.x>g&&(h=(v.x+h.x)/2,m.splice(q+1,0,{isNull:!0,x:h}),this.options.stacking&&(h=w.stacks[this.stackKey][h]=new d.StackItem(w,w.options.stackLabels,!1,h,this.stack),h.total=0)),h=v);return this.getGraphPath(m)}});K(y,"masters/modules/broken-axis.src.js",[],function(){});K(y,"parts/DataGrouping.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,
g){var y=g.arrayMax,F=g.arrayMin,E=g.correctFloat,D=g.defined,x=g.extend,v=g.isNumber,C=g.pick;g=d.addEvent;var B=d.Axis,p=d.defaultPlotOptions,z=d.format,m=d.merge,q=d.Point,w=d.Series,h=d.Tooltip,f=d.approximations={sum:function(a){var b=a.length;if(!b&&a.hasNulls)var e=null;else if(b)for(e=0;b--;)e+=a[b];return e},average:function(a){var b=a.length;a=f.sum(a);v(a)&&b&&(a=E(a/b));return a},averages:function(){var a=[];[].forEach.call(arguments,function(b){a.push(f.average(b))});return"undefined"===
typeof a[0]?void 0:a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?y(a):a.hasNulls?null:void 0},low:function(a){return a.length?F(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,c,d){a=f.open(a);b=f.high(b);c=f.low(c);d=f.close(d);if(v(a)||v(b)||v(c)||v(d))return[a,b,c,d]},range:function(a,b){a=f.low(a);b=f.high(b);if(v(a)||v(b))return[a,b];if(null===a&&null===b)return null}},c=function(a,
b,c,d){var e=this,g=e.data,h=e.options&&e.options.data,k=[],l=[],n=[],r=a.length,u=!!b,t=[],p=e.pointArrayMap,q=p&&p.length,w=["x"].concat(p||["y"]),x=0,z=0,y;d="function"===typeof d?d:f[d]?f[d]:f[e.getDGApproximation&&e.getDGApproximation()||"average"];q?p.forEach(function(){t.push([])}):t.push([]);var H=q||1;for(y=0;y<=r&&!(a[y]>=c[0]);y++);for(y;y<=r;y++){for(;"undefined"!==typeof c[x+1]&&a[y]>=c[x+1]||y===r;){var B=c[x];e.dataGroupInfo={start:e.cropStart+z,length:t[0].length};var C=d.apply(e,
t);e.pointClass&&!D(e.dataGroupInfo.options)&&(e.dataGroupInfo.options=m(e.pointClass.prototype.optionsToObject.call({series:e},e.options.data[e.cropStart+z])),w.forEach(function(a){delete e.dataGroupInfo.options[a]}));"undefined"!==typeof C&&(k.push(B),l.push(C),n.push(e.dataGroupInfo));z=y;for(B=0;B<H;B++)t[B].length=0,t[B].hasNulls=!1;x+=1;if(y===r)break}if(y===r)break;if(p)for(B=e.cropStart+y,C=g&&g[B]||e.pointClass.prototype.applyOptions.apply({series:e},[h[B]]),B=0;B<q;B++){var E=C[p[B]];v(E)?
t[B].push(E):null===E&&(t[B].hasNulls=!0)}else B=u?b[y]:null,v(B)?t[0].push(B):null===B&&(t[0].hasNulls=!0)}return{groupedXData:k,groupedYData:l,groupMap:n}},b={approximations:f,groupData:c},a=w.prototype,l=a.processData,n=a.generatePoints,t={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:{},arearange:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},r=d.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]];a.getDGApproximation=function(){return d.seriesTypes.arearange&&this instanceof d.seriesTypes.arearange?"range":d.seriesTypes.ohlc&&this instanceof d.seriesTypes.ohlc?"ohlc":d.seriesTypes.column&&this instanceof d.seriesTypes.column?"sum":"average"};a.groupData=c;a.processData=function(){var b=this.chart,c=this.options.dataGrouping,d=!1!==this.allowDG&&c&&C(c.enabled,b.options.isStock),f=this.visible||!b.options.chart.ignoreHiddenSeries,
g,h=this.currentDataGrouping,m=!1;this.forceCrop=d;this.groupPixelWidth=null;this.hasProcessed=!0;d&&!this.requireSorting&&(this.requireSorting=m=!0);d=!1===l.apply(this,arguments)||!d;m&&(this.requireSorting=!1);if(!d){this.destroyGroupedData();d=c.groupAll?this.xData:this.processedXData;var n=c.groupAll?this.yData:this.processedYData,t=b.plotSizeX;b=this.xAxis;var p=b.options.ordinal,q=this.groupPixelWidth=b.getGroupPixelWidth&&b.getGroupPixelWidth();if(q){this.isDirty=g=!0;this.points=null;m=b.getExtremes();
var v=m.min;m=m.max;p=p&&b.getGroupIntervalFactor(v,m,this)||1;q=q*(m-v)/t*p;t=b.getTimeTicks(b.normalizeTimeTickInterval(q,c.units||r),Math.min(v,d[0]),Math.max(m,d[d.length-1]),b.options.startOfWeek,d,this.closestPointRange);n=a.groupData.apply(this,[d,n,t,c.approximation]);d=n.groupedXData;p=n.groupedYData;var w=0;if(c.smoothed&&d.length){var x=d.length-1;for(d[x]=Math.min(d[x],m);x--&&0<x;)d[x]+=q/2;d[0]=Math.max(d[0],v)}for(x=1;x<t.length;x++)t.info.segmentStarts&&-1!==t.info.segmentStarts.indexOf(x)||
(w=Math.max(t[x]-t[x-1],w));v=t.info;v.gapSize=w;this.closestPointRange=t.info.totalRange;this.groupMap=n.groupMap;if(D(d[0])&&d[0]<b.min&&f){if(!D(b.options.min)&&b.min<=b.dataMin||b.min===b.dataMin)b.min=Math.min(d[0],b.min);b.dataMin=Math.min(d[0],b.dataMin)}c.groupAll&&(c=this.cropData(d,p,b.min,b.max,1),d=c.xData,p=c.yData);this.processedXData=d;this.processedYData=p}else this.groupMap=null;this.hasGroupedData=g;this.currentDataGrouping=v;this.preventGraphAnimation=(h&&h.totalRange)!==(v&&v.totalRange)}};
a.destroyGroupedData=function(){this.groupedData&&(this.groupedData.forEach(function(a,b){a&&(this.groupedData[b]=a.destroy?a.destroy():null)},this),this.groupedData.length=0)};a.generatePoints=function(){n.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};g(q,"update",function(){if(this.dataGroup)return d.error(24,!1,this.series.chart),!1});g(h,"headerFormatter",function(a){var b=this.chart,c=b.time,e=a.labelConfig,d=e.series,f=d.tooltipOptions,g=d.options.dataGrouping,
h=f.xDateFormat,l=d.xAxis,m=f[(a.isFooter?"footer":"header")+"Format"];if(l&&"datetime"===l.options.type&&g&&v(e.key)){var n=d.currentDataGrouping;g=g.dateTimeLabelFormats||t.dateTimeLabelFormats;if(n)if(f=g[n.unitName],1===n.count)h=f[0];else{h=f[1];var r=f[2]}else!h&&g&&(h=this.getXDateFormat(e,f,l));h=c.dateFormat(h,e.key);r&&(h+=c.dateFormat(r,e.key+n.totalRange-1));d.chart.styledMode&&(m=this.styledModeFormat(m));a.text=z(m,{point:x(e.point,{key:h}),series:d},b);a.preventDefault()}});g(w,"destroy",
a.destroyGroupedData);g(w,"afterSetOptions",function(a){a=a.options;var b=this.type,c=this.chart.options.plotOptions,e=p[b].dataGrouping,d=this.useCommonDataGrouping&&t;if(I[b]||d)e||(e=m(t,I[b])),a.dataGrouping=m(d,e,c.series&&c.series.dataGrouping,c[b].dataGrouping,this.userOptions.dataGrouping)});g(B,"afterSetScale",function(){this.series.forEach(function(a){a.hasProcessed=!1})});B.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,d=0,f=!1,g;for(c=b;c--;)(g=a[c].options.dataGrouping)&&
(d=Math.max(d,C(g.groupPixelWidth,t.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/d||b&&g.forced)&&(f=!0);return f?d:0};B.prototype.setDataGrouping=function(a,b){var c;b=C(b,!0);a||(a={forced:!1,units:null});if(this instanceof B)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else this.chart.options.series.forEach(function(b){b.dataGrouping=a},!1);this.ordinalSlope=
null;b&&this.chart.redraw()};d.dataGrouping=b;"";return b});K(y,"parts/OHLCSeries.js",[y["parts/Globals.js"]],function(d){var g=d.Point,y=d.seriesType,F=d.seriesTypes;y("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low",
"close"],toYData:function(d){return[d.open,d.high,d.low,d.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},init:function(){F.column.prototype.init.apply(this,arguments);this.options.stacking=!1},pointAttribs:function(d,g){g=F.column.prototype.pointAttribs.call(this,d,g);var x=this.options;delete g.fill;!d.options.color&&x.upColor&&d.open<d.close&&(g.stroke=x.upColor);return g},translate:function(){var d=this,g=d.yAxis,x=!!d.modifyValue,v=["plotOpen","plotHigh",
"plotLow","plotClose","yBottom"];F.column.prototype.translate.apply(d);d.points.forEach(function(y){[y.open,y.high,y.low,y.close,y.low].forEach(function(B,p){null!==B&&(x&&(B=d.modifyValue(B)),y[v[p]]=g.toPixels(B,!0))});y.tooltipPos[1]=y.plotHigh+g.pos-d.chart.plotTop})},drawPoints:function(){var d=this,g=d.chart;d.points.forEach(function(x){var v=x.graphic,y=!v;if("undefined"!==typeof x.plotY){v||(x.graphic=v=g.renderer.path().add(d.group));g.styledMode||v.attr(d.pointAttribs(x,x.selected&&"select"));
var B=v.strokeWidth()%2/2;var p=Math.round(x.plotX)-B;var z=Math.round(x.shapeArgs.width/2);var m=["M",p,Math.round(x.yBottom),"L",p,Math.round(x.plotHigh)];if(null!==x.open){var q=Math.round(x.plotOpen)+B;m.push("M",p,q,"L",p-z,q)}null!==x.close&&(q=Math.round(x.plotClose)+B,m.push("M",p,q,"L",p+z,q));v[y?"attr":"animate"]({d:m}).addClass(x.getClassName(),!0)}})},animate:null},{getClassName:function(){return g.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}});
""});K(y,"parts/CandlestickSeries.js",[y["parts/Globals.js"]],function(d){var g=d.defaultPlotOptions,y=d.merge,F=d.seriesType,E=d.seriesTypes;F("candlestick","ohlc",y(g.column,{states:{hover:{lineWidth:2}},tooltip:g.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(d,g){var v=E.column.prototype.pointAttribs.call(this,d,g),x=this.options,y=d.open<d.close,p=x.lineColor||this.color;v["stroke-width"]=x.lineWidth;v.fill=d.options.color||
(y?x.upColor||this.color:this.color);v.stroke=d.options.lineColor||(y?x.upLineColor||p:p);g&&(d=x.states[g],v.fill=d.color||v.fill,v.stroke=d.lineColor||v.stroke,v["stroke-width"]=d.lineWidth||v["stroke-width"]);return v},drawPoints:function(){var d=this,g=d.chart,v=d.yAxis.reversed;d.points.forEach(function(x){var y=x.graphic,p=!y;if("undefined"!==typeof x.plotY){y||(x.graphic=y=g.renderer.path().add(d.group));d.chart.styledMode||y.attr(d.pointAttribs(x,x.selected&&"select")).shadow(d.options.shadow);
var z=y.strokeWidth()%2/2;var m=Math.round(x.plotX)-z;var q=x.plotOpen;var w=x.plotClose;var h=Math.min(q,w);q=Math.max(q,w);var f=Math.round(x.shapeArgs.width/2);w=v?q!==x.yBottom:Math.round(h)!==Math.round(x.plotHigh);var c=v?Math.round(h)!==Math.round(x.plotHigh):q!==x.yBottom;h=Math.round(h)+z;q=Math.round(q)+z;z=[];z.push("M",m-f,q,"L",m-f,h,"L",m+f,h,"L",m+f,q,"Z","M",m,h,"L",m,w?Math.round(v?x.yBottom:x.plotHigh):h,"M",m,q,"L",m,c?Math.round(v?x.plotHigh:x.yBottom):q);y[p?"attr":"animate"]({d:z}).addClass(x.getClassName(),
!0)}})}});""});K(y,"mixins/on-series.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.defined,F=d.seriesTypes,E=d.stableSort;return{getPlotBox:function(){return d.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){F.column.prototype.translate.apply(this);var d=this,g=d.options,v=d.chart,C=d.points,B=C.length-1,p,z=g.onSeries;z=z&&v.get(z);g=g.onKey||"y";var m=z&&z.options.step,q=z&&z.points,w=q&&q.length,
h=v.inverted,f=d.xAxis,c=d.yAxis,b=0,a;if(z&&z.visible&&w){b=(z.pointXOffset||0)+(z.barW||0)/2;v=z.currentDataGrouping;var l=q[w-1].x+(v?v.totalRange:0);E(C,function(a,b){return a.x-b.x});for(g="plot"+g[0].toUpperCase()+g.substr(1);w--&&C[B];){var n=q[w];v=C[B];v.y=n.y;if(n.x<=v.x&&"undefined"!==typeof n[g]){if(v.x<=l&&(v.plotY=n[g],n.x<v.x&&!m&&(a=q[w+1])&&"undefined"!==typeof a[g])){var t=(v.x-n.x)/(a.x-n.x);v.plotY+=t*(a[g]-n[g]);v.y+=t*(a.y-n.y)}B--;w++;if(0>B)break}}}C.forEach(function(a,g){a.plotX+=
b;if("undefined"===typeof a.plotY||h)0<=a.plotX&&a.plotX<=f.len?h?(a.plotY=f.translate(a.x,0,1,0,1),a.plotX=y(a.y)?c.translate(a.y,0,0,0,1):0):a.plotY=(f.opposite?0:d.yAxis.len)+f.offset:a.shapeArgs={};if((p=C[g-1])&&p.plotX===a.plotX){"undefined"===typeof p.stackIndex&&(p.stackIndex=0);var e=p.stackIndex+1}a.stackIndex=e});this.onSeries=z}}});K(y,"parts/FlagsSeries.js",[y["parts/Globals.js"],y["parts/Utilities.js"],y["mixins/on-series.js"]],function(d,g,y){function F(d){h[d+"pin"]=function(c,b,a,
f,g){var l=g&&g.anchorX;g=g&&g.anchorY;"circle"===d&&f>a&&(c-=Math.round((f-a)/2),a=f);var m=h[d](c,b,a,f);l&&g&&(m.push("M","circle"===d?c+a/2:m[1]+m[4]/2,b>g?b:b+f,"L",l,g),m=m.concat(h.circle(l-1,g-1,2,2)));return m}}var E=g.defined,D=g.isNumber,x=g.objectEach,v=g.wrap,C=d.addEvent,B=d.merge;g=d.noop;var p=d.Renderer,z=d.Series,m=d.seriesType,q=d.TrackerMixin,w=d.VMLRenderer,h=d.SVGRenderer.prototype.symbols;m("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",
tooltip:{pointFormat:"{point.text}<br/>"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:z.prototype.init,pointAttribs:function(d,c){var b=this.options,a=d&&d.color||this.color,f=b.lineColor,g=d&&d.lineWidth;d=d&&d.fillColor||b.fillColor;c&&(d=b.states[c].fillColor,f=b.states[c].lineColor,
g=b.states[c].lineWidth);return{fill:d||a,stroke:f||a,"stroke-width":g||b.lineWidth||0}},translate:y.translate,getPlotBox:y.getPlotBox,drawPoints:function(){var f=this.points,c=this.chart,b=c.renderer,a=c.inverted,g=this.options,h=g.y,m,p=this.yAxis,r={},e=[];for(m=f.length;m--;){var k=f[m];var u=(a?k.plotY:k.plotX)>this.xAxis.len;var q=k.plotX;var w=k.stackIndex;var A=k.options.shape||g.shape;var z=k.plotY;"undefined"!==typeof z&&(z=k.plotY+h-("undefined"!==typeof w&&w*g.stackDistance));k.anchorX=
w?void 0:k.plotX;var y=w?void 0:k.plotY;var C="flag"!==A;w=k.graphic;"undefined"!==typeof z&&0<=q&&!u?(w||(w=k.graphic=b.label("",null,null,A,null,null,g.useHTML),c.styledMode||w.attr(this.pointAttribs(k)).css(B(g.style,k.style)),w.attr({align:C?"center":"left",width:g.width,height:g.height,"text-align":g.textAlign}).addClass("highcharts-point").add(this.markerGroup),k.graphic.div&&(k.graphic.div.point=k),c.styledMode||w.shadow(g.shadow),w.isNew=!0),0<q&&(q-=w.strokeWidth()%2),A={y:z,anchorY:y},g.allowOverlapX&&
(A.x=q,A.anchorX=k.anchorX),w.attr({text:k.options.title||g.title||"A"})[w.isNew?"attr":"animate"](A),g.allowOverlapX||(r[k.plotX]?r[k.plotX].size=Math.max(r[k.plotX].size,w.width):r[k.plotX]={align:C?.5:0,size:w.width,target:q,anchorX:q}),k.tooltipPos=[q,z+p.pos-c.plotTop]):w&&(k.graphic=w.destroy())}g.allowOverlapX||(x(r,function(a){a.plotX=a.anchorX;e.push(a)}),d.distribute(e,a?p.len:this.xAxis.len,100),f.forEach(function(a){var b=a.graphic&&r[a.plotX];b&&(a.graphic[a.graphic.isNew?"attr":"animate"]({x:b.pos+
b.align*b.size,anchorX:a.anchorX}),E(b.pos)?a.graphic.isNew=!1:(a.graphic.attr({x:-9999,anchorX:-9999}),a.graphic.isNew=!0))}));g.useHTML&&v(this.markerGroup,"on",function(a){return d.SVGElement.prototype.on.apply(a.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var d=this.points;q.drawTrackerPoint.apply(this);d.forEach(function(c){var b=c.graphic;b&&C(b.element,"mouseover",function(){0<c.stackIndex&&!c.raised&&(c._y=b.y,b.attr({y:c._y-8}),c.raised=!0);
d.forEach(function(a){a!==c&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:function(d){d?this.setClip():this.animate=null},setClip:function(){z.prototype.setClip.apply(this,arguments);!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:g,invertGroups:g},{isValid:function(){return D(this.y)||"undefined"===typeof this.y}});h.flag=function(d,c,b,a,g){var f=g&&g.anchorX||d;g=g&&g.anchorY||c;return h.circle(f-1,g-1,
2,2).concat(["M",f,g,"L",d,c+a,d,c,d+b,c,d+b,c+a,d,c+a,"Z"])};F("circle");F("square");p===w&&["circlepin","flag","squarepin"].forEach(function(d){w.prototype.symbols[d]=h[d]});""});K(y,"parts/RangeSelector.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){function y(a){this.init(a)}var F=g.defined,E=g.destroyObjectProperties,D=g.discardElement,x=g.extend,v=g.isNumber,C=g.objectEach,B=g.pick,p=g.pInt,z=g.splat,m=d.addEvent,q=d.Axis;g=d.Chart;var w=d.css,h=d.createElement,f=d.defaultOptions,
c=d.fireEvent,b=d.merge;x(f,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});f.lang=b(f.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});y.prototype={clickButton:function(a,b){var c=this.chart,d=this.buttonOptions[a],f=c.xAxis[0],g=c.scroller&&c.scroller.getUnionExtremes()||f||{},e=g.dataMin,
h=g.dataMax,l=f&&Math.round(Math.min(f.max,B(h,f.max))),p=d.type;g=d._range;var w,A=d.dataGrouping;if(null!==e&&null!==h){c.fixedRange=g;A&&(this.forcedDataGrouping=!0,q.prototype.setDataGrouping.call(f||{chart:this.chart},A,!1),this.frozenStates=d.preserveDataGrouping);if("month"===p||"year"===p)if(f){p={range:d,max:l,chart:c,dataMin:e,dataMax:h};var x=f.minFromRange.call(p);v(p.newMax)&&(l=p.newMax)}else g=d;else if(g)x=Math.max(l-g,e),l=Math.min(x+g,h);else if("ytd"===p)if(f)"undefined"===typeof h&&
(e=Number.MAX_VALUE,h=Number.MIN_VALUE,c.series.forEach(function(a){a=a.xData;e=Math.min(a[0],e);h=Math.max(a[a.length-1],h)}),b=!1),l=this.getYTDExtremes(h,e,c.time.useUTC),x=w=l.min,l=l.max;else{this.deferredYTDClick=a;return}else"all"===p&&f&&(x=e,l=h);x+=d._offsetMin;l+=d._offsetMax;this.setSelected(a);if(f)f.setExtremes(x,l,B(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d});else{var y=z(c.options.xAxis)[0];var C=y.range;y.range=g;var D=y.min;y.min=w;m(c,"load",function(){y.range=
C;y.min=D})}}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(a){var b=this,d=a.options.rangeSelector,f=d.buttons||[].concat(b.defaultButtons),g=d.selected,h=function(){var a=b.minInput,d=b.maxInput;a&&a.blur&&c(a,"blur");d&&d.blur&&c(d,"blur")};b.chart=a;b.options=d;b.buttons=
[];b.buttonOptions=f;this.unMouseDown=m(a.container,"mousedown",h);this.unResize=m(a,"resize",h);f.forEach(b.computeButtonRange);"undefined"!==typeof g&&f[g]&&this.clickButton(g,!1);m(a,"load",function(){a.xAxis&&a.xAxis[0]&&m(a.xAxis[0],"setExtremes",function(c){this.max-this.min!==a.fixedRange&&"rangeSelectorButton"!==c.trigger&&"updatedData"!==c.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this,b=this.chart,c=b.xAxis[0],d=
Math.round(c.max-c.min),f=!c.hasVisibleSeries,g=b.scroller&&b.scroller.getUnionExtremes()||c,e=g.dataMin,h=g.dataMax;b=a.getYTDExtremes(h,e,b.time.useUTC);var m=b.min,p=b.max,q=a.selected,w=v(q),x=a.options.allButtonsEnabled,z=a.buttons;a.buttonOptions.forEach(function(b,g){var k=b._range,l=b.type,n=b.count||1,r=z[g],t=0,u=b._offsetMax-b._offsetMin;b=g===q;var v=k>h-e,A=k<c.minRange,y=!1,B=!1;k=k===d;("month"===l||"year"===l)&&d+36E5>=864E5*{month:28,year:365}[l]*n-u&&d-36E5<=864E5*{month:31,year:366}[l]*
n+u?k=!0:"ytd"===l?(k=p-m+u===d,y=!b):"all"===l&&(k=c.max-c.min>=h-e,B=!b&&w&&k);l=!x&&(v||A||B||f);n=b&&k||k&&!w&&!y||b&&a.frozenStates;l?t=3:n&&(w=!0,t=2);r.state!==t&&(r.setState(t),0===t&&q===g&&a.setSelected(null))})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=B(a.offsetMin,0);a._offsetMax=B(a.offsetMax,
0);a._range+=a._offsetMax-a._offsetMin},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this.chart.time,f=this[a+"Input"];F(b)&&(f.previousValue=f.HCTime,f.HCTime=b);f.value=d.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",f.HCTime);this[a+"DateBox"].attr({text:d.dateFormat(c.inputDateFormat||"%b %e, %Y",f.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];w(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){w(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function c(){var a=y.value,b=(e.inputDateParser||Date.parse)(a),c=m.xAxis[0],d=m.scroller&&m.scroller.xAxis?m.scroller.xAxis:c,f=d.dataMin;d=d.dataMax;b!==y.previousValue&&(y.previousValue=b,v(b)||(b=a.split("-"),b=Date.UTC(p(b[0]),p(b[1])-1,p(b[2]))),v(b)&&(m.time.useUTC||(b+=6E4*(new Date).getTimezoneOffset()),u?b>g.maxInput.HCTime?b=void 0:
b<f&&(b=f):b<g.minInput.HCTime?b=void 0:b>d&&(b=d),"undefined"!==typeof b&&c.setExtremes(u?b:c.min,u?c.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var g=this,m=g.chart,q=m.renderer.style||{},r=m.renderer,e=m.options.rangeSelector,k=g.div,u="min"===a,y,z,A=this.inputGroup;this[a+"Label"]=z=r.label(f.lang[u?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(A);A.offset+=z.width+5;this[a+"DateBox"]=r=r.label("",A.offset).addClass("highcharts-range-input").attr({padding:2,
width:e.inputBoxWidth||90,height:e.inputBoxHeight||17,"text-align":"center"}).on("click",function(){g.showInput(a);g[a+"Input"].focus()});m.styledMode||r.attr({stroke:e.inputBoxBorderColor||"#cccccc","stroke-width":1});r.add(A);A.offset+=r.width+(u?10:0);this[a+"Input"]=y=h("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:m.plotTop+"px"},k);m.styledMode||(z.css(b(q,e.labelStyle)),r.css(b({color:"#333333"},q,e.inputStyle)),w(y,x({position:"absolute",border:0,width:"1px",height:"1px",
padding:0,textAlign:"center",fontSize:q.fontSize,fontFamily:q.fontFamily,top:"-9999em"},e.inputStyle)));y.onfocus=function(){g.showInput(a)};y.onblur=function(){y===d.doc.activeElement&&c();g.hideInput(a);y.blur()};y.onchange=c;y.onkeypress=function(a){13===a.keyCode&&c()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector;a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}},getYTDExtremes:function(a,b,c){var d=
this.chart.time,f=new d.Date(a),g=d.get("FullYear",f);c=c?d.Date.UTC(g,0,1):+new d.Date(g,0,1);b=Math.max(b||0,c);f=f.getTime();return{max:Math.min(a||f,f),min:b}},render:function(a,b){var c=this,d=c.chart,g=d.renderer,l=d.container,e=d.options,k=e.exporting&&!1!==e.exporting.enabled&&e.navigation&&e.navigation.buttonOptions,m=f.lang,p=c.div,q=e.rangeSelector,v=B(e.chart.style&&e.chart.style.zIndex,0)+1;e=q.floating;var w=c.buttons;p=c.inputGroup;var x=q.buttonTheme,y=q.buttonPosition,z=q.inputPosition,
C=q.inputEnabled,D=x&&x.states,E=d.plotLeft,F=c.buttonGroup;var K=c.rendered;var M=c.options.verticalAlign,T=d.legend,Z=T&&T.options,S=y.y,R=z.y,X=K||!1,fa=X?"animate":"attr",aa=0,W=0,Y;if(!1!==q.enabled){K||(c.group=K=g.g("range-selector-group").attr({zIndex:7}).add(),c.buttonGroup=F=g.g("range-selector-buttons").add(K),c.zoomText=g.text(m.rangeSelectorZoom,0,15).add(F),d.styledMode||(c.zoomText.css(q.labelStyle),x["stroke-width"]=B(x["stroke-width"],0)),c.buttonOptions.forEach(function(a,b){w[b]=
g.button(a.text,0,0,function(d){var e=a.events&&a.events.click,f;e&&(f=e.call(a,d));!1!==f&&c.clickButton(b);c.isActive=!0},x,D&&D.hover,D&&D.select,D&&D.disabled).attr({"text-align":"center"}).add(F)}),!1!==C&&(c.div=p=h("div",null,{position:"relative",height:0,zIndex:v}),l.parentNode.insertBefore(p,l),c.inputGroup=p=g.g("input-group").add(K),p.offset=0,c.drawInput("min"),c.drawInput("max")));c.zoomText[fa]({x:B(E+y.x,E)});var ea=B(E+y.x,E)+c.zoomText.getBBox().width+5;c.buttonOptions.forEach(function(a,
b){w[b][fa]({x:ea});ea+=w[b].width+B(q.buttonSpacing,5)});E=d.plotLeft-d.spacing[3];c.updateButtonStates();k&&this.titleCollision(d)&&"top"===M&&"right"===y.align&&y.y+F.getBBox().height-12<(k.y||0)+k.height&&(aa=-40);"left"===y.align?Y=y.x-d.spacing[3]:"right"===y.align&&(Y=y.x+aa-d.spacing[1]);F.align({y:y.y,width:F.getBBox().width,align:y.align,x:Y},!0,d.spacingBox);c.group.placed=X;c.buttonGroup.placed=X;!1!==C&&(aa=k&&this.titleCollision(d)&&"top"===M&&"right"===z.align&&z.y-p.getBBox().height-
12<(k.y||0)+k.height+d.spacing[0]?-40:0,"left"===z.align?Y=E:"right"===z.align&&(Y=-Math.max(d.axisOffset[1],-aa)),p.align({y:z.y,width:p.getBBox().width,align:z.align,x:z.x+Y-2},!0,d.spacingBox),l=p.alignAttr.translateX+p.alignOptions.x-aa+p.getBBox().x+2,k=p.alignOptions.width,m=F.alignAttr.translateX+F.getBBox().x,Y=F.getBBox().width+20,(z.align===y.align||m+Y>l&&l+k>m&&S<R+p.getBBox().height)&&p.attr({translateX:p.alignAttr.translateX+(d.axisOffset[1]>=-aa?0:-aa),translateY:p.alignAttr.translateY+
F.getBBox().height+10}),c.setInputValue("min",a),c.setInputValue("max",b),c.inputGroup.placed=X);c.group.align({verticalAlign:M},!0,d.spacingBox);a=c.group.getBBox().height+20;b=c.group.alignAttr.translateY;"bottom"===M&&(T=Z&&"bottom"===Z.verticalAlign&&Z.enabled&&!Z.floating?T.legendHeight+B(Z.margin,10):0,a=a+T-20,W=b-a-(e?0:q.y)-(d.titleOffset?d.titleOffset[2]:0)-10);if("top"===M)e&&(W=0),d.titleOffset&&d.titleOffset[0]&&(W=d.titleOffset[0]),W+=d.margin[0]-d.spacing[0]||0;else if("middle"===M)if(R===
S)W=0>R?b+void 0:b;else if(R||S)W=0>R||0>S?W-Math.min(R,S):b-a+NaN;c.group.translate(q.x,q.y+Math.floor(W));!1!==C&&(c.minInput.style.marginTop=c.group.translateY+"px",c.maxInput.style.marginTop=c.group.translateY+"px");c.rendered=!0}},getHeight:function(){var a=this.options,b=this.group,c=a.y,d=a.buttonPosition.y,f=a.inputPosition.y;if(a.height)return a.height;a=b?b.getBBox(!0).height+13+c:0;b=Math.min(f,d);if(0>f&&0>d||0<f&&0<d)a+=Math.abs(b);return a},titleCollision:function(a){return!(a.options.title.text||
a.options.subtitle.text)},update:function(a){var c=this.chart;b(!0,c.options.rangeSelector,a);this.destroy();this.init(c);c.rangeSelector.render()},destroy:function(){var a=this,b=a.minInput,c=a.maxInput;a.unMouseDown();a.unResize();E(a.buttons);b&&(b.onfocus=b.onblur=b.onchange=null);c&&(c.onfocus=c.onblur=c.onchange=null);C(a,function(b,c){b&&"chart"!==c&&(b.destroy?b.destroy():b.nodeType&&D(this[c]));b!==y.prototype[c]&&(a[c]=null)},this)}};q.prototype.minFromRange=function(){var a=this.range,
b={month:"Month",year:"FullYear"}[a.type],c=this.max,d=this.chart.time,f=function(a,c){var e=new d.Date(a),f=d.get(b,e);d.set(b,e,f+c);f===d.get(b,e)&&d.set("Date",e,0);return e.getTime()-a};if(v(a)){var g=c-a;var e=a}else g=c+f(c,-a.count),this.chart&&(this.chart.fixedRange=c-g);var h=B(this.dataMin,Number.MIN_VALUE);v(g)||(g=h);g<=h&&(g=h,"undefined"===typeof e&&(e=f(g,a.count)),this.newMax=Math.min(g+e,this.dataMax));v(c)||(g=void 0);return g};d.RangeSelector||(m(g,"afterGetContainer",function(){this.options.rangeSelector.enabled&&
(this.rangeSelector=new y(this))}),m(g,"beforeRender",function(){var a=this.axes,b=this.rangeSelector;b&&(v(b.deferredYTDClick)&&(b.clickButton(b.deferredYTDClick),delete b.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),b.render(),a=b.options.verticalAlign,b.options.floating||("bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))}),m(g,"update",function(a){var b=a.options.rangeSelector;a=this.rangeSelector;var c=this.extraBottomMargin,
d=this.extraTopMargin;b&&b.enabled&&!F(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new y(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),b=b&&b.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===b?this.extraBottomMargin=!0:"middle"!==b&&(this.extraTopMargin=!0)),this.extraBottomMargin!==c||this.extraTopMargin!==d)&&(this.isDirtyBox=!0)}),m(g,"render",function(){var a=this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,
"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0))}),m(g,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))}),g.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();v(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector;if(d){var f=m(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)});var g=m(a,"redraw",b);b()}m(a,"destroy",function(){d&&
(g(),f())})}),d.RangeSelector=y)});K(y,"parts/StockChart.js",[y["parts/Globals.js"],y["parts/Utilities.js"]],function(d,g){var y=g.arrayMax,F=g.arrayMin,E=g.clamp,D=g.defined,x=g.extend,v=g.isNumber,C=g.isString,B=g.pick,p=g.splat;g=d.addEvent;var z=d.Axis,m=d.Chart,q=d.format,w=d.merge,h=d.Point,f=d.Renderer,c=d.Series,b=d.SVGRenderer,a=d.VMLRenderer,l=c.prototype,n=l.init,t=l.processData,I=h.prototype.tooltipFormatter;d.StockChart=d.stockChart=function(a,b,c){var e=C(a)||a.nodeName,f=arguments[e?
1:0],g=f,h=f.series,k=d.getOptions(),l,r=f.chart&&f.chart.panning,n=B(f.navigator&&f.navigator.enabled,k.navigator.enabled,!0),q=r&&/y/.test(r.type),t={startOnTick:!1,endOnTick:!1};f.xAxis=p(f.xAxis||{}).map(function(a,b){return w({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},k.xAxis,k.xAxis&&k.xAxis[b],a,{type:"datetime",categories:null},n?t:null)});f.yAxis=p(f.yAxis||{}).map(function(a,b){l=B(a.opposite,!0);return w({labels:{y:-2},
opposite:l,showLastLabel:!(!a.categories&&"category"!==a.type),title:{text:null}},k.yAxis,k.yAxis&&k.yAxis[b],a,q?t:null)});f.series=null;f=w({chart:{panning:{enabled:!0,type:"x"},pinchType:"x"},navigator:{enabled:n},scrollbar:{enabled:B(k.scrollbar.enabled,!0)},rangeSelector:{enabled:B(k.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:B(k.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},f,{isStock:!0});f.series=g.series=h;return e?new m(a,f,c):new m(f,b)};g(c,"setOptions",function(a){function b(a){return d.seriesTypes[a]&&
c instanceof d.seriesTypes[a]}var c=this,f;this.chart.options.isStock&&(b("column")||b("columnrange")?f={borderWidth:0,shadow:!1}:!b("line")||b("scatter")||b("sma")||(f={marker:{enabled:!1,radius:2}}),f&&(a.plotOptions[this.type]=w(a.plotOptions[this.type],f)))});g(z,"autoLabelAlign",function(a){var b=this.chart,c=this.options;b=b._labelPanes=b._labelPanes||{};var d=this.options.labels;this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled&&(15===d.x&&(d.x=0),"undefined"===
typeof d.align&&(d.align="right"),b[c]=this,a.align="right",a.preventDefault()))});g(z,"destroy",function(){var a=this.chart,b=this.options&&this.options.top+","+this.options.height;b&&a._labelPanes&&a._labelPanes[b]===this&&delete a._labelPanes[b]});g(z,"getPlotLinePath",function(a){function b(a){var b="xAxis"===a?"yAxis":"xAxis";a=c.options[b];return v(a)?[g[b][a]]:C(a)?[g.get(a)]:f.map(function(a){return a[b]})}var c=this,f=this.isLinked&&!this.series?this.linkedParent.series:this.series,g=c.chart,
h=g.renderer,l=c.left,m=c.top,r,n,p,q,t=[],w=[],x=a.translatedValue,y=a.value,z=a.force;if(g.options.isStock&&!1!==a.acrossPanes&&"xAxis"===c.coll||"yAxis"===c.coll){a.preventDefault();w=b(c.coll);var F=c.isXAxis?g.yAxis:g.xAxis;F.forEach(function(a){if(D(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis";b=D(a.options[b])?g[b][a.options[b]]:g[b][0];c===b&&w.push(a)}});var I=w.length?[]:[c.isXAxis?g.yAxis[0]:g.xAxis[0]];w.forEach(function(a){-1!==I.indexOf(a)||
d.find(I,function(b){return b.pos===a.pos&&b.len===a.len})||I.push(a)});var K=B(x,c.translate(y,null,null,a.old));v(K)&&(c.horiz?I.forEach(function(a){var b;n=a.pos;q=n+a.len;r=p=Math.round(K+c.transB);"pass"!==z&&(r<l||r>l+c.width)&&(z?r=p=E(r,l,l+c.width):b=!0);b||t.push("M",r,n,"L",p,q)}):I.forEach(function(a){var b;r=a.pos;p=r+a.len;n=q=Math.round(m+c.height-K);"pass"!==z&&(n<m||n>m+c.height)&&(z?n=q=E(n,m,m+c.height):b=!0);b||t.push("M",r,n,"L",p,q)}));a.path=0<t.length?h.crispPolyLine(t,a.lineWidth||
1):null}});b.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};f===a&&(a.prototype.crispPolyLine=b.prototype.crispPolyLine);g(z,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});g(z,"afterDrawCrosshair",function(a){var b,c;if(D(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var d=this.chart,f=this.options.crosshair.label,
g=this.horiz,h=this.opposite,l=this.left,m=this.top,r=this.crossLabel,n=f.format,p="",t="inside"===this.options.tickPosition,v=!1!==this.crosshair.snap,w=0,y=a.e||this.cross&&this.cross.e,z=a.point;var C=this.lin2log;if(this.isLog){a=C(this.min);var E=C(this.max)}else a=this.min,E=this.max;C=g?"center":h?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";r||(r=this.crossLabel=d.renderer.label(null,null,null,f.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&
" highcharts-color-"+this.series[0].colorIndex)).attr({align:f.align||C,padding:B(f.padding,8),r:B(f.borderRadius,3),zIndex:2}).add(this.labelGroup),d.styledMode||r.attr({fill:f.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:f.borderColor||"","stroke-width":f.borderWidth||0}).css(x({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},f.style)));g?(C=v?z.plotX+l:y.chartX,m+=h?0:this.height):(C=h?this.width+l:0,m=v?z.plotY+m:y.chartY);n||f.formatter||(this.isDatetimeAxis&&
(p="%b %d, %Y"),n="{value"+(p?":"+p:"")+"}");p=v?z[this.isXAxis?"x":"y"]:this.toValue(g?y.chartX:y.chartY);r.attr({text:n?q(n,{value:p},d):f.formatter.call(this,p),x:C,y:m,visibility:p<a||p>E?"hidden":"visible"});f=r.getBBox();if(g){if(t&&!h||!t&&h)m=r.y-f.height}else m=r.y-f.height/2;g?(b=l-f.x,c=l+this.width-f.x):(b="left"===this.labelAlign?l:0,c="right"===this.labelAlign?l+this.width:d.chartWidth);r.translateX<b&&(w=b-r.translateX);r.translateX+f.width>=c&&(w=-(r.translateX+f.width-c));r.attr({x:C+
w,y:m,anchorX:g?C:this.opposite?0:d.chartWidth,anchorY:g?this.opposite?d.chartHeight:0:m+f.height/2})}});l.init=function(){n.apply(this,arguments);this.setCompare(this.options.compare)};l.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;return"undefined"!==typeof b&&"undefined"!==typeof d?(b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b):0}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=
!0)};l.processData=function(a){var b,c=-1,d=!0===this.options.compareStart?0:1;t.apply(this,arguments);if(this.xAxis&&this.processedYData){var f=this.processedXData;var g=this.processedYData;var h=g.length;this.pointArrayMap&&(c=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y"));for(b=0;b<h-d;b++){var l=g[b]&&-1<c?g[b][c]:g[b];if(v(l)&&f[b+d]>=this.xAxis.min&&0!==l){this.compareValue=l;break}}}};g(c,"afterGetExtremes",function(){if(this.modifyValue){var a=[this.modifyValue(this.dataMin),
this.modifyValue(this.dataMax)];this.dataMin=F(a);this.dataMax=y(a)}});z.prototype.setCompare=function(a,b){this.isXAxis||(this.series.forEach(function(b){b.setCompare(a)}),B(b,!0)&&this.chart.redraw())};h.prototype.tooltipFormatter=function(a){var b=this.series.chart.numberFormatter;a=a.replace("{point.change}",(0<this.change?"+":"")+b(this.change,B(this.series.tooltipOptions.changeDecimals,2)));return I.apply(this,[a])};g(c,"render",function(){var a=this.chart;if(!(a.is3d&&a.is3d()||a.polar)&&this.xAxis&&
!this.xAxis.isRadial){var b=this.yAxis.len;if(this.xAxis.axisLine){var c=a.plotTop+a.plotHeight-this.yAxis.pos-this.yAxis.len,d=Math.floor(this.xAxis.axisLine.strokeWidth()/2);0<=c&&(b-=Math.max(d-c,0))}!this.clipBox&&this.animate?(this.clipBox=w(a.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=b):a[this.sharedClipKey]&&(a[this.sharedClipKey].animate({width:this.xAxis.len,height:b}),a[this.sharedClipKey+"m"]&&a[this.sharedClipKey+"m"].animate({width:this.xAxis.len}))}});g(m,"update",
function(a){a=a.options;"scrollbar"in a&&this.navigator&&(w(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},!1),delete a.scrollbar)});g(z,"afterSetScale",function(){var a=this,b=a.chart.options.chart&&a.chart.options.chart.panning;if(b&&("y"===b.type||"xy"===b.type)&&!a.isXAxis&&!D(a.panningState)){var c=Number.MAX_VALUE,f=Number.MIN_VALUE;a.series.forEach(function(b){c=Math.min(d.arrayMin(b.yData),c)-(a.min&&a.dataMin?a.dataMin-a.min:0);f=Math.max(d.arrayMax(b.yData),f)+(a.max&&a.dataMax?
a.max-a.dataMax:0)});a.panningState={startMin:c,startMax:f}}})});K(y,"masters/modules/stock.src.js",[],function(){});K(y,"masters/highstock.src.js",[y["masters/highcharts.src.js"]],function(d){d.product="Highstock";return d});y["masters/highstock.src.js"]._modules=y;return y["masters/highstock.src.js"]});

+ 87
- 1
root/js/solardash.base.js View File

@@ -1,17 +1,103 @@
//jquery
#include "jquery.js"

//highcharts
#include "highstock.js"

socket.onopen = function() {
// connected
}

// Indexes for chart series
consumIdx = 0;
gridIdx = 1;
prodIdx = 2;

var msgNumbs = {
p: "#production",
ng: "#netgrid",
c: "#consumption",
};

socket.onmessage = function(m) {
var msg = m.data.split(" ");
if (msg[0] in msgNumbs) {
// production value
// simple update values
var num = parseFloat(msg[1]);
$(msgNumbs[msg[0]]).text(num.toString());
} else if (msg[0] == 'o') {
// received overview data
var data = JSON.parse(msg[1]);
console.log(solarchart);
solarchart.navigator.series[consumIdx].setData(data.consumption, false);
solarchart.navigator.series[gridIdx].setData(data.grid, false);
solarchart.navigator.series[prodIdx].setData(data.production, false);
solarchart.redraw();
}
}

var solarchart = Highcharts.stockChart('solarchart', {
chart: {
type: 'area',
zoomType: 'x'
},
title: {
text: 'Panel Production'
},
subtitle: {
text: document.ontouchstart === undefined ?
'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
},
navigator: {
adaptToUpdatedData: false, // XXX - keep?
series: [
{
name: 'consumptionNav',
showInNavigator: true,
data: [],
},
{
name: 'gridNav',
showInNavigator: true,
data: [],
},
{
name: 'productionNav',
showInNavigator: true,
data: [],
},
]
},
xAxis: {
type: "datetime",
title: {
enabled: false
}
},
yAxis: {
title: {
text: 'kW'
}
},
tooltip: {
split: true,
valueSuffix: ' kW'
},
plotOptions: {
area: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
},
series: [
{
name: 'grid',
data: fakeData,
},
]
});

+ 45
- 7
root/js/solardash.file.jspp View File

@@ -1,11 +1,5 @@
// Interface for testing, provides testing data, and dynamic updates, etc.

//jquery
#include "jquery.js"

//highcharts
#include "highcharts.js"

// WebSocket emulation class for testing
function WebSocketTest(actions) {
this.actions = actions.slice(); // copy
@@ -19,6 +13,11 @@ function WebSocketTest(actions) {
// Internal
WebSocketTest.prototype.processNextItem = function () {
var item = this.actions.pop()
if (item === undefined) {
console.log("WebSocketTest finished running");
return;
}

var wst = this;
setTimeout(function() {
item[1](wst);
@@ -28,12 +27,51 @@ WebSocketTest.prototype.processNextItem = function () {
return this;
}

fakeData = [
[ 1578544199000, 0.3934 ],
[ 1578544209000, 0.4934 ],
[ 1578544219000, 0.5234 ],
[ 1578544229000, 0.4734 ],
[ 1578544239000, 0.4334 ],
[ 1578544249000, 0.2334 ],
[ 1578544259000, 0.1034 ],
[ 1578544269000, -0.4334 ],
[ 1578544279000, -0.6334 ],
[ 1578544289000, -0.2334 ],
]

fakeConData = [
[ 1578544199000, 0.3934 ],
[ 1578544209000, 0.4934 ],
[ 1578544219000, 0.5234 ],
[ 1578544229000, 0.4734 ],
[ 1578544239000, 0.4334 ],
[ 1578544249000, 0.2334 ],
[ 1578544259000, 0.1034 ],
[ 1578544269000, 0.4334 ],
[ 1578544279000, 0.6334 ],
[ 1578544289000, 0.2334 ],
]

fakeOverviewData = {
grid: fakeData,
consumption: fakeConData,
production: fakeConData,
}


// Setup the socket that will be used
var socket = new WebSocketTest([
[ 10, function(a) { a.onopen(new Object()) } ],
[ 10, function(a) { a.onmessage(new MessageEvent('websockettest', {
data : 'o ' + JSON.stringify(fakeOverviewData)
})) } ],
[ 10, function(a) { a.onmessage(new MessageEvent('websockettest', {
data : 'p .123'
})) } ],
[ 10, function(a) { a.onmessage(new MessageEvent('websockettest', {
data : 'c .302'
})) } ],
[ 10, function(a) { a.onmessage(new MessageEvent('websockettest', {
data : 'ng .758'
})) } ],
@@ -41,7 +79,7 @@ var socket = new WebSocketTest([
data : 'p .234'
})) } ],
[ 10, function(a) { a.onmessage(new MessageEvent('websockettest', {
data : 'ng .584'
data : 'ng -.584'
})) } ],
]);



+ 3
- 0
root/js/solardash.https.jspp View File

@@ -0,0 +1,3 @@
var socket = new WebSocket('wss://' + location.host + '/solar.ws');

#include "solardash.base.js"

Loading…
Cancel
Save