highcharts
Version:
JavaScript charting framework
105 lines (103 loc) • 230 kB
JavaScript
/*
Highcharts JS v7.1.0 (2019-04-01)
(c) 2009-2018 Torstein Honsi
License: www.highcharts.com/license
*/
(function(N,K){"object"===typeof module&&module.exports?(K["default"]=K,module.exports=N.document?K(N):K):"function"===typeof define&&define.amd?define("highcharts/highcharts",function(){return K(N)}):(N.Highcharts&&N.Highcharts.error(16,!0),N.Highcharts=K(N))})("undefined"!==typeof window?window:this,function(N){function K(a,C,I,H){a.hasOwnProperty(C)||(a[C]=H.apply(null,I))}var F={};K(F,"parts/Globals.js",[],function(){var a="undefined"===typeof N?"undefined"!==typeof window?window:{}:N,C=a.document,
I=a.navigator&&a.navigator.userAgent||"",H=C&&C.createElementNS&&!!C.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,k=/(edge|msie|trident)/i.test(I)&&!a.opera,d=-1!==I.indexOf("Firefox"),q=-1!==I.indexOf("Chrome"),t=d&&4>parseInt(I.split("Firefox/")[1],10);return{product:"Highcharts",version:"7.1.0",deg2rad:2*Math.PI/360,doc:C,hasBidiBug:t,hasTouch:C&&void 0!==C.documentElement.ontouchstart,isMS:k,isWebKit:-1!==I.indexOf("AppleWebKit"),isFirefox:d,isChrome:q,isSafari:!q&&-1!==I.indexOf("Safari"),
isTouchDevice:/(Mobile|Android|Windows Phone)/.test(I),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:H,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});K(F,"parts/Utilities.js",[F["parts/Globals.js"]],function(a){a.timers=[];var C=a.charts,I=a.doc,H=a.win;a.error=function(k,d,q){var t=a.isNumber(k)?"Highcharts error #"+k+": www.highcharts.com/errors/"+k:k,u=function(){if(d)throw Error(t);H.console&&
console.log(t)};q?a.fireEvent(q,"displayError",{code:k,message:t},u):u()};a.Fx=function(a,d,q){this.options=d;this.elem=a;this.prop=q};a.Fx.prototype={dSetter:function(){var a=this.paths[0],d=this.paths[1],q=[],t=this.now,u=a.length,v;if(1===t)q=this.toD;else if(u===d.length&&1>t)for(;u--;)v=parseFloat(a[u]),q[u]=isNaN(v)?d[u]:t*parseFloat(d[u]-v)+v;else q=d;this.elem.attr("d",q,null,!0)},update:function(){var a=this.elem,d=this.prop,q=this.now,t=this.options.step;if(this[d+"Setter"])this[d+"Setter"]();
else a.attr?a.element&&a.attr(d,q,null,!0):a.style[d]=q+this.unit;t&&t.call(a,q,this)},run:function(k,d,q){var t=this,u=t.options,v=function(a){return v.stopped?!1:t.step(a)},p=H.requestAnimationFrame||function(a){setTimeout(a,13)},g=function(){for(var e=0;e<a.timers.length;e++)a.timers[e]()||a.timers.splice(e--,1);a.timers.length&&p(g)};k!==d||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=k,this.end=d,this.unit=q,this.now=this.start,this.pos=0,v.elem=this.elem,v.prop=
this.prop,v()&&1===a.timers.push(v)&&p(g)):(delete u.curAnim[this.prop],u.complete&&0===Object.keys(u.curAnim).length&&u.complete.call(this.elem))},step:function(k){var d=+new Date,q,t=this.options,u=this.elem,v=t.complete,p=t.duration,g=t.curAnim;u.attr&&!u.element?k=!1:k||d>=p+this.startTime?(this.now=this.end,this.pos=1,this.update(),q=g[this.prop]=!0,a.objectEach(g,function(a){!0!==a&&(q=!1)}),q&&v&&v.call(u),k=!1):(this.pos=t.easing((d-this.startTime)/p),this.now=this.start+(this.end-this.start)*
this.pos,this.update(),k=!0);return k},initPath:function(k,d,q){function t(a){var b,f;for(c=a.length;c--;)b="M"===a[c]||"L"===a[c],f=/[a-zA-Z]/.test(a[c+3]),b&&f&&a.splice(c+1,0,a[c+1],a[c+2],a[c+1],a[c+2])}function u(a,f){for(;a.length<b;){a[0]=f[b-a.length];var e=a.slice(0,l);[].splice.apply(a,[0,0].concat(e));w&&(e=a.slice(a.length-l),[].splice.apply(a,[a.length,0].concat(e)),c--)}a[0]="M"}function v(a,c){for(var e=(b-a.length)/l;0<e&&e--;)f=a.slice().splice(a.length/r-l,l*r),f[0]=c[b-l-e*l],m&&
(f[l-6]=f[l-2],f[l-5]=f[l-1]),[].splice.apply(a,[a.length/r,0].concat(f)),w&&e--}d=d||"";var p,g=k.startX,e=k.endX,m=-1<d.indexOf("C"),l=m?7:3,b,f,c;d=d.split(" ");q=q.slice();var w=k.isArea,r=w?2:1,J;m&&(t(d),t(q));if(g&&e){for(c=0;c<g.length;c++)if(g[c]===e[0]){p=c;break}else if(g[0]===e[e.length-g.length+c]){p=c;J=!0;break}void 0===p&&(d=[])}d.length&&a.isNumber(p)&&(b=q.length+p*r*l,J?(u(d,q),v(q,d)):(u(q,d),v(d,q)));return[d,q]},fillSetter:function(){a.Fx.prototype.strokeSetter.apply(this,arguments)},
strokeSetter:function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)}};a.merge=function(){var k,d=arguments,q,t={},u=function(d,p){"object"!==typeof d&&(d={});a.objectEach(p,function(g,e){!a.isObject(g,!0)||a.isClass(g)||a.isDOMElement(g)?d[e]=p[e]:d[e]=u(d[e]||{},g)});return d};!0===d[0]&&(t=d[1],d=Array.prototype.slice.call(d,2));q=d.length;for(k=0;k<q;k++)t=u(t,d[k]);return t};a.pInt=function(a,d){return parseInt(a,d||10)};a.isString=function(a){return"string"===
typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(k,d){return!!k&&"object"===typeof k&&(!d||!a.isArray(k))};a.isDOMElement=function(k){return a.isObject(k)&&"number"===typeof k.nodeType};a.isClass=function(k){var d=k&&k.constructor;return!(!a.isObject(k,!0)||a.isDOMElement(k)||!d||!d.name||"Object"===d.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a};a.erase=
function(a,d){for(var k=a.length;k--;)if(a[k]===d){a.splice(k,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(k,d,q){var t;a.isString(d)?a.defined(q)?k.setAttribute(d,q):k&&k.getAttribute&&((t=k.getAttribute(d))||"class"!==d||(t=k.getAttribute(d+"Name"))):a.defined(d)&&a.isObject(d)&&a.objectEach(d,function(a,d){k.setAttribute(d,a)});return t};a.splat=function(k){return a.isArray(k)?k:[k]};a.syncTimeout=function(a,d,q){if(d)return setTimeout(a,d,q);a.call(0,q)};a.clearTimeout=
function(k){a.defined(k)&&clearTimeout(k)};a.extend=function(a,d){var k;a||(a={});for(k in d)a[k]=d[k];return a};a.pick=function(){var a=arguments,d,q,t=a.length;for(d=0;d<t;d++)if(q=a[d],void 0!==q&&null!==q)return q};a.css=function(k,d){a.isMS&&!a.svg&&d&&void 0!==d.opacity&&(d.filter="alpha(opacity\x3d"+100*d.opacity+")");a.extend(k.style,d)};a.createElement=function(k,d,q,t,u){k=I.createElement(k);var v=a.css;d&&a.extend(k,d);u&&v(k,{padding:0,border:"none",margin:0});q&&v(k,q);t&&t.appendChild(k);
return k};a.extendClass=function(k,d){var q=function(){};q.prototype=new k;a.extend(q.prototype,d);return q};a.pad=function(a,d,q){return Array((d||2)+1-String(a).replace("-","").length).join(q||0)+a};a.relativeLength=function(a,d,q){return/%$/.test(a)?d*parseFloat(a)/100+(q||0):parseFloat(a)};a.wrap=function(a,d,q){var k=a[d];a[d]=function(){var a=Array.prototype.slice.call(arguments),d=arguments,p=this;p.proceed=function(){k.apply(p,arguments.length?arguments:d)};a.unshift(k);a=q.apply(this,a);
p.proceed=null;return a}};a.datePropsToTimestamps=function(k){a.objectEach(k,function(d,q){a.isObject(d)&&"function"===typeof d.getTime?k[q]=d.getTime():(a.isObject(d)||a.isArray(d))&&a.datePropsToTimestamps(d)})};a.formatSingle=function(k,d,q){var t=/\.([0-9])/,u=a.defaultOptions.lang;/f$/.test(k)?(q=(q=k.match(t))?q[1]:-1,null!==d&&(d=a.numberFormat(d,q,u.decimalPoint,-1<k.indexOf(",")?u.thousandsSep:""))):d=(q||a.time).dateFormat(k,d);return d};a.format=function(k,d,q){for(var t="{",u=!1,v,p,g,
e,m=[],l;k;){t=k.indexOf(t);if(-1===t)break;v=k.slice(0,t);if(u){v=v.split(":");p=v.shift().split(".");e=p.length;l=d;for(g=0;g<e;g++)l&&(l=l[p[g]]);v.length&&(l=a.formatSingle(v.join(":"),l,q));m.push(l)}else m.push(v);k=k.slice(t+1);t=(u=!u)?"}":"{"}m.push(k);return m.join("")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(k,d,q,t,u){var v,p=k;q=a.pick(q,1);v=k/q;d||(d=u?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===t&&(1===
q?d=d.filter(function(a){return 0===a%1}):.1>=q&&(d=[1/q])));for(t=0;t<d.length&&!(p=d[t],u&&p*q>=k||!u&&v<=(d[t]+(d[t+1]||d[t]))/2);t++);return p=a.correctFloat(p*q,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,d){var k=a.length,t,u;for(u=0;u<k;u++)a[u].safeI=u;a.sort(function(a,p){t=d(a,p);return 0===t?a.safeI-p.safeI:t});for(u=0;u<k;u++)delete a[u].safeI};a.arrayMin=function(a){for(var d=a.length,k=a[0];d--;)a[d]<k&&(k=a[d]);return k};a.arrayMax=function(a){for(var d=a.length,
k=a[0];d--;)a[d]>k&&(k=a[d]);return k};a.destroyObjectProperties=function(k,d){a.objectEach(k,function(a,t){a&&a!==d&&a.destroy&&a.destroy();delete k[t]})};a.discardElement=function(k){var d=a.garbageBin;d||(d=a.createElement("div"));k&&d.appendChild(k);d.innerHTML=""};a.correctFloat=function(a,d){return parseFloat(a.toPrecision(d||14))};a.setAnimation=function(k,d){d.renderer.globalAnimation=a.pick(k,d.options.chart.animation,!0)};a.animObject=function(k){return a.isObject(k)?a.merge(k):{duration:k?
500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(k,d,q,t){k=+k||0;d=+d;var u=a.defaultOptions.lang,v=(k.toString().split(".")[1]||"").split("e")[0].length,p,g,e=k.toString().split("e");-1===d?d=Math.min(v,20):a.isNumber(d)?d&&e[1]&&0>e[1]&&(p=d+ +e[1],0<=p?(e[0]=(+e[0]).toExponential(p).split("e")[0],d=p):(e[0]=e[0].split(".")[0]||0,k=20>d?(e[0]*Math.pow(10,e[1])).toFixed(d):0,e[1]=0)):d=2;g=(Math.abs(e[1]?
e[0]:k)+Math.pow(10,-Math.max(d,v)-1)).toFixed(d);v=String(a.pInt(g));p=3<v.length?v.length%3:0;q=a.pick(q,u.decimalPoint);t=a.pick(t,u.thousandsSep);k=(0>k?"-":"")+(p?v.substr(0,p)+t:"");k+=v.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+t);d&&(k+=q+g.slice(-d));e[1]&&0!==+k&&(k+="e"+e[1]);return k};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(k,d,q){if("width"===d)return Math.max(0,Math.min(k.offsetWidth,k.scrollWidth,k.getBoundingClientRect&&"none"===a.getStyle(k,
"transform",!1)?Math.floor(k.getBoundingClientRect().width):Infinity)-a.getStyle(k,"padding-left")-a.getStyle(k,"padding-right"));if("height"===d)return Math.max(0,Math.min(k.offsetHeight,k.scrollHeight)-a.getStyle(k,"padding-top")-a.getStyle(k,"padding-bottom"));H.getComputedStyle||a.error(27,!0);if(k=H.getComputedStyle(k,void 0))k=k.getPropertyValue(d),a.pick(q,"opacity"!==d)&&(k=a.pInt(k));return k};a.inArray=function(a,d,q){return d.indexOf(a,q)};a.find=Array.prototype.find?function(a,d){return a.find(d)}:
function(a,d){var k,t=a.length;for(k=0;k<t;k++)if(d(a[k],k))return a[k]};a.keys=Object.keys;a.offset=function(a){var d=I.documentElement;a=a.parentElement||a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(H.pageYOffset||d.scrollTop)-(d.clientTop||0),left:a.left+(H.pageXOffset||d.scrollLeft)-(d.clientLeft||0)}};a.stop=function(k,d){for(var q=a.timers.length;q--;)a.timers[q].elem!==k||d&&d!==a.timers[q].prop||(a.timers[q].stopped=!0)};a.objectEach=function(a,d,q){for(var k in a)a.hasOwnProperty(k)&&
d.call(q||a[k],a[k],k,a)};a.objectEach({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(k,d){a[d]=function(a){return Array.prototype[k].apply(a,[].slice.call(arguments,1))}});a.addEvent=function(k,d,q,t){var u,v=k.addEventListener||a.addEventListenerPolyfill;u="function"===typeof k&&k.prototype?k.prototype.protoEvents=k.prototype.protoEvents||{}:k.hcEvents=k.hcEvents||{};a.Point&&k instanceof a.Point&&k.series&&k.series.chart&&(k.series.chart.runTrackerClick=!0);v&&v.call(k,
d,q,!1);u[d]||(u[d]=[]);u[d].push(q);t&&a.isNumber(t.order)&&(q.order=t.order,u[d].sort(function(a,g){return a.order-g.order}));return function(){a.removeEvent(k,d,q)}};a.removeEvent=function(k,d,q){function t(g,e){var m=k.removeEventListener||a.removeEventListenerPolyfill;m&&m.call(k,g,e,!1)}function u(g){var e,m;k.nodeName&&(d?(e={},e[d]=!0):e=g,a.objectEach(e,function(a,b){if(g[b])for(m=g[b].length;m--;)t(b,g[b][m])}))}var v,p;["protoEvents","hcEvents"].forEach(function(a){var e=k[a];e&&(d?(v=
e[d]||[],q?(p=v.indexOf(q),-1<p&&(v.splice(p,1),e[d]=v),t(d,q)):(u(e),e[d]=[])):(u(e),k[a]={}))})};a.fireEvent=function(k,d,q,t){var u,v,p,g,e;q=q||{};I.createEvent&&(k.dispatchEvent||k.fireEvent)?(u=I.createEvent("Events"),u.initEvent(d,!0,!0),a.extend(u,q),k.dispatchEvent?k.dispatchEvent(u):k.fireEvent(d,u)):["protoEvents","hcEvents"].forEach(function(m){if(k[m])for(v=k[m][d]||[],p=v.length,q.target||a.extend(q,{preventDefault:function(){q.defaultPrevented=!0},target:k,type:d}),g=0;g<p;g++)(e=v[g])&&
!1===e.call(k,q)&&q.preventDefault()});t&&!q.defaultPrevented&&t.call(k,q)};a.animate=function(k,d,q){var t,u="",v,p,g;a.isObject(q)||(g=arguments,q={duration:g[2],easing:g[3],complete:g[4]});a.isNumber(q.duration)||(q.duration=400);q.easing="function"===typeof q.easing?q.easing:Math[q.easing]||Math.easeInOutSine;q.curAnim=a.merge(d);a.objectEach(d,function(e,g){a.stop(k,g);p=new a.Fx(k,q,g);v=null;"d"===g?(p.paths=p.initPath(k,k.d,d.d),p.toD=d.d,t=0,v=1):k.attr?t=k.attr(g):(t=parseFloat(a.getStyle(k,
g))||0,"opacity"!==g&&(u="px"));v||(v=e);v&&v.match&&v.match("px")&&(v=v.replace(/px/g,""));p.run(t,v,u)})};a.seriesType=function(k,d,q,t,u){var v=a.getOptions(),p=a.seriesTypes;v.plotOptions[k]=a.merge(v.plotOptions[d],q);p[k]=a.extendClass(p[d]||function(){},t);p[k].prototype.type=k;u&&(p[k].prototype.pointClass=a.extendClass(a.Point,u));return p[k]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),d=0;return function(){return"highcharts-"+a+"-"+d++}}();a.isFunction=function(a){return"function"===
typeof a};H.jQuery&&(H.jQuery.fn.highcharts=function(){var k=[].slice.call(arguments);if(this[0])return k[0]?(new (a[a.isString(k[0])?k.shift():"Chart"])(this[0],k[0],k[1]),this):C[a.attr(this[0],"data-highcharts-chart")]})});K(F,"parts/Color.js",[F["parts/Globals.js"]],function(a){var C=a.isNumber,I=a.merge,H=a.pInt;a.Color=function(k){if(!(this instanceof a.Color))return new a.Color(k);this.init(k)};a.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
parse:function(a){return[H(a[1]),H(a[2]),H(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[H(a[1]),H(a[2]),H(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(k){var d,q,t,u;if((this.input=k=this.names[k&&k.toLowerCase?k.toLowerCase():""]||k)&&k.stops)this.stops=k.stops.map(function(d){return new a.Color(d[1])});else if(k&&k.charAt&&"#"===k.charAt()&&(d=k.length,k=parseInt(k.substr(1),16),7===d?q=[(k&16711680)>>
16,(k&65280)>>8,k&255,1]:4===d&&(q=[(k&3840)>>4|(k&3840)>>8,(k&240)>>4|k&240,(k&15)<<4|k&15,1])),!q)for(t=this.parsers.length;t--&&!q;)u=this.parsers[t],(d=u.regex.exec(k))&&(q=u.parse(d));this.rgba=q||[]},get:function(a){var d=this.input,k=this.rgba,t;this.stops?(t=I(d),t.stops=[].concat(t.stops),this.stops.forEach(function(d,k){t.stops[k]=[t.stops[k][0],d.get(a)]})):t=k&&C(k[0])?"rgb"===a||!a&&1===k[3]?"rgb("+k[0]+","+k[1]+","+k[2]+")":"a"===a?k[3]:"rgba("+k.join(",")+")":d;return t},brighten:function(a){var d,
k=this.rgba;if(this.stops)this.stops.forEach(function(d){d.brighten(a)});else if(C(a)&&0!==a)for(d=0;3>d;d++)k[d]+=H(255*a),0>k[d]&&(k[d]=0),255<k[d]&&(k[d]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this},tweenTo:function(a,d){var k=this.rgba,t=a.rgba;t.length&&k&&k.length?(a=1!==t[3]||1!==k[3],d=(a?"rgba(":"rgb(")+Math.round(t[0]+(k[0]-t[0])*(1-d))+","+Math.round(t[1]+(k[1]-t[1])*(1-d))+","+Math.round(t[2]+(k[2]-t[2])*(1-d))+(a?","+(t[3]+(k[3]-t[3])*(1-d)):"")+")"):d=a.input||
"none";return d}};a.color=function(k){return new a.Color(k)}});K(F,"parts/SvgRenderer.js",[F["parts/Globals.js"]],function(a){var C,I,H=a.addEvent,k=a.animate,d=a.attr,q=a.charts,t=a.color,u=a.css,v=a.createElement,p=a.defined,g=a.deg2rad,e=a.destroyObjectProperties,m=a.doc,l=a.extend,b=a.erase,f=a.hasTouch,c=a.isArray,w=a.isFirefox,r=a.isMS,J=a.isObject,G=a.isString,B=a.isWebKit,n=a.merge,E=a.noop,z=a.objectEach,A=a.pick,D=a.pInt,h=a.removeEvent,y=a.splat,M=a.stop,R=a.svg,L=a.SVG_NS,S=a.symbolSizes,
P=a.win;C=a.SVGElement=function(){return this};l(C.prototype,{opacity:1,SVG_NS:L,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),init:function(x,h){this.element="span"===h?v(h):m.createElementNS(this.SVG_NS,h);this.renderer=x;a.fireEvent(this,"afterInit")},animate:function(x,h,c){var b=a.animObject(A(h,this.renderer.globalAnimation,!0));A(m.hidden,m.msHidden,m.webkitHidden,!1)&&(b.duration=0);
0!==b.duration?(c&&(b.complete=c),k(this,x,b)):(this.attr(x,null,c),a.objectEach(x,function(a,x){b.step&&b.step.call(this,a,{prop:x,pos:1})},this));return this},complexColor:function(x,h,b){var f=this.renderer,e,y,l,g,L,m,w,E,Q,r,d,D=[],R;a.fireEvent(this.renderer,"complexColor",{args:arguments},function(){x.radialGradient?y="radialGradient":x.linearGradient&&(y="linearGradient");y&&(l=x[y],L=f.gradients,w=x.stops,r=b.radialReference,c(l)&&(x[y]=l={x1:l[0],y1:l[1],x2:l[2],y2:l[3],gradientUnits:"userSpaceOnUse"}),
"radialGradient"===y&&r&&!p(l.gradientUnits)&&(g=l,l=n(l,f.getRadialAttr(r,g),{gradientUnits:"userSpaceOnUse"})),z(l,function(a,x){"id"!==x&&D.push(x,a)}),z(w,function(a){D.push(a)}),D=D.join(","),L[D]?d=L[D].attr("id"):(l.id=d=a.uniqueKey(),L[D]=m=f.createElement(y).attr(l).add(f.defs),m.radAttr=g,m.stops=[],w.forEach(function(x){0===x[1].indexOf("rgba")?(e=a.color(x[1]),E=e.get("rgb"),Q=e.get("a")):(E=x[1],Q=1);x=f.createElement("stop").attr({offset:x[0],"stop-color":E,"stop-opacity":Q}).add(m);
m.stops.push(x)})),R="url("+f.url+"#"+d+")",b.setAttribute(h,R),b.gradient=D,x.toString=function(){return R})})},applyTextOutline:function(x){var h=this.element,b,c,f;-1!==x.indexOf("contrast")&&(x=x.replace(/contrast/g,this.renderer.getContrast(h.style.fill)));x=x.split(" ");b=x[x.length-1];(c=x[0])&&"none"!==c&&a.svg&&(this.fakeTS=!0,x=[].slice.call(h.getElementsByTagName("tspan")),this.ySetter=this.xSetter,c=c.replace(/(^[\d\.]+)(.*?)$/g,function(a,x,h){return 2*x+h}),this.removeTextOutline(x),
f=h.firstChild,x.forEach(function(a,x){0===x&&(a.setAttribute("x",h.getAttribute("x")),x=h.getAttribute("y"),a.setAttribute("y",x||0),null===x&&h.setAttribute("y",0));a=a.cloneNode(1);d(a,{"class":"highcharts-text-outline",fill:b,stroke:b,"stroke-width":c,"stroke-linejoin":"round"});h.insertBefore(a,f)}))},removeTextOutline:function(a){for(var x=a.length,h;x--;)h=a[x],"highcharts-text-outline"===h.getAttribute("class")&&b(a,this.element.removeChild(h))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),
attr:function(x,h,c,b){var f,y=this.element,e,n=this,l,g,L=this.symbolCustomAttribs;"string"===typeof x&&void 0!==h&&(f=x,x={},x[f]=h);"string"===typeof x?n=(this[x+"Getter"]||this._defaultGetter).call(this,x,y):(z(x,function(h,c){l=!1;b||M(this,c);this.symbolName&&-1!==a.inArray(c,L)&&(e||(this.symbolAttr(x),e=!0),l=!0);!this.rotation||"x"!==c&&"y"!==c||(this.doTransform=!0);l||(g=this[c+"Setter"]||this._defaultSetter,g.call(this,h,c,y),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c)&&
this.updateShadows(c,h,g))},this),this.afterSetters());c&&c.call(this);return n},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a,h,c){for(var x=this.shadows,b=x.length;b--;)c.call(x[b],"height"===a?Math.max(h-(x[b].cutHeight||0),0):"d"===a?this.d:h,a,x[b])},addClass:function(a,h){var x=this.attr("class")||"";h||(a=(a||"").split(/ /g).reduce(function(a,h){-1===x.indexOf(h)&&a.push(h);return a},x?[x]:[]).join(" "));a!==x&&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(a,""))},symbolAttr:function(a){var x=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(h){x[h]=A(a[h],x[h])});x.attr({d:x.renderer.symbols[x.symbolName](x.x,x.y,x.width,x.height,x)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},
crisp:function(a,h){var x;h=h||a.strokeWidth||0;x=Math.round(h)%2/2;a.x=Math.floor(a.x||this.x||0)+x;a.y=Math.floor(a.y||this.y||0)+x;a.width=Math.floor((a.width||this.width||0)-2*x);a.height=Math.floor((a.height||this.height||0)-2*x);p(a.strokeWidth)&&(a.strokeWidth=h);return a},css:function(a){var x=this.styles,h={},c=this.element,b,f="",y,e=!x,n=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);x&&z(a,function(a,c){a!==x[c]&&(h[c]=a,e=!0)});e&&(x&&(a=l(x,h)),a&&(null===a.width||
"auto"===a.width?delete this.textWidth:"text"===c.nodeName.toLowerCase()&&a.width&&(b=this.textWidth=D(a.width))),this.styles=a,b&&!R&&this.renderer.forExport&&delete a.width,c.namespaceURI===this.SVG_NS?(y=function(a,x){return"-"+x.toLowerCase()},z(a,function(a,x){-1===n.indexOf(x)&&(f+=x.replace(/([A-Z])/g,y)+":"+a+";")}),f&&d(c,"style",f)):u(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 P.getComputedStyle(this.element||
this,"").getPropertyValue(a)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var a=this.getStyle("stroke-width"),h;a.indexOf("px")===a.length-2?a=D(a):(h=m.createElementNS(L,"rect"),d(h,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(h),a=h.getBBox().width,h.parentNode.removeChild(h));return a},on:function(a,h){var x=this,c=x.element;f&&"click"===a?(c.ontouchstart=function(a){x.touchEventFired=Date.now();a.preventDefault();h.call(c,a)},c.onclick=
function(a){(-1===P.navigator.userAgent.indexOf("Android")||1100<Date.now()-(x.touchEventFired||0))&&h.call(c,a)}):c["on"+a]=h;return this},setRadialReference:function(a){var x=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;x&&x.radAttr&&x.animate(this.renderer.getRadialAttr(a,x.radAttr));return this},translate:function(a,h){return this.attr({translateX:a,translateY:h})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=
this.translateX||0,h=this.translateY||0,c=this.scaleX,b=this.scaleY,f=this.inverted,y=this.rotation,e=this.matrix,n=this.element;f&&(a+=this.width,h+=this.height);a=["translate("+a+","+h+")"];p(e)&&a.push("matrix("+e.join(",")+")");f?a.push("rotate(90) scale(-1,1)"):y&&a.push("rotate("+y+" "+A(this.rotationOriginX,n.getAttribute("x"),0)+" "+A(this.rotationOriginY,n.getAttribute("y")||0)+")");(p(c)||p(b))&&a.push("scale("+A(c,1)+" "+A(b,1)+")");a.length&&n.setAttribute("transform",a.join(" "))},toFront:function(){var a=
this.element;a.parentNode.appendChild(a);return this},align:function(a,h,c){var x,f,y,e,n={};f=this.renderer;y=f.alignedObjects;var l,g;if(a){if(this.alignOptions=a,this.alignByTranslate=h,!c||G(c))this.alignTo=x=c||"renderer",b(y,this),y.push(this),c=null}else a=this.alignOptions,h=this.alignByTranslate,x=this.alignTo;c=A(c,f[x],f);x=a.align;f=a.verticalAlign;y=(c.x||0)+(a.x||0);e=(c.y||0)+(a.y||0);"right"===x?l=1:"center"===x&&(l=2);l&&(y+=(c.width-(a.width||0))/l);n[h?"translateX":"x"]=Math.round(y);
"bottom"===f?g=1:"middle"===f&&(g=2);g&&(e+=(c.height-(a.height||0))/g);n[h?"translateY":"y"]=Math.round(e);this[this.placed?"animate":"attr"](n);this.placed=!0;this.alignAttr=n;return this},getBBox:function(a,h){var x,c=this.renderer,b,f=this.element,y=this.styles,e,n=this.textStr,L,m=c.cache,w=c.cacheKeys,E=f.namespaceURI===this.SVG_NS,r;h=A(h,this.rotation);b=h*g;e=c.styledMode?f&&C.prototype.getStyle.call(f,"font-size"):y&&y.fontSize;p(n)&&(r=n.toString(),-1===r.indexOf("\x3c")&&(r=r.replace(/[0-9]/g,
"0")),r+=["",h||0,e,this.textWidth,y&&y.textOverflow].join());r&&!a&&(x=m[r]);if(!x){if(E||c.forExport){try{(L=this.fakeTS&&function(a){[].forEach.call(f.querySelectorAll(".highcharts-text-outline"),function(x){x.style.display=a})})&&L("none"),x=f.getBBox?l({},f.getBBox()):{width:f.offsetWidth,height:f.offsetHeight},L&&L("")}catch(ba){}if(!x||0>x.width)x={width:0,height:0}}else x=this.htmlGetBBox();c.isSVG&&(a=x.width,c=x.height,E&&(x.height=c={"11px,17":14,"13px,20":16}[y&&y.fontSize+","+Math.round(c)]||
c),h&&(x.width=Math.abs(c*Math.sin(b))+Math.abs(a*Math.cos(b)),x.height=Math.abs(c*Math.cos(b))+Math.abs(a*Math.sin(b))));if(r&&0<x.height){for(;250<w.length;)delete m[w.shift()];m[r]||w.push(r);m[r]=x}}return x},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var x=this;x.animate({opacity:0},{duration:a||150,complete:function(){x.attr({y:-9999})}})},add:function(a){var x=this.renderer,h=this.element,
c;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&x.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)c=this.zIndexSetter();c||(a?a.element:x.box).appendChild(h);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var x=a.parentNode;x&&x.removeChild(a)},destroy:function(){var a=this,h=a.element||{},c=a.renderer,f=c.isSVG&&"SPAN"===h.nodeName&&a.parentGroup,y=h.ownerSVGElement,e=a.clipPath;h.onclick=h.onmouseout=h.onmouseover=h.onmousemove=
h.point=null;M(a);e&&y&&([].forEach.call(y.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){-1<a.getAttribute("clip-path").indexOf(e.element.id)&&a.removeAttribute("clip-path")}),a.clipPath=e.destroy());if(a.stops){for(y=0;y<a.stops.length;y++)a.stops[y]=a.stops[y].destroy();a.stops=null}a.safeRemoveChild(h);for(c.styledMode||a.destroyShadows();f&&f.div&&0===f.div.childNodes.length;)h=f.parentGroup,a.safeRemoveChild(f.div),delete f.div,f=h;a.alignTo&&b(c.alignedObjects,a);z(a,function(h,x){delete a[x]});
return null},shadow:function(a,h,c){var x=[],b,f,y=this.element,e,n,l,g;if(!a)this.destroyShadows();else if(!this.shadows){n=A(a.width,3);l=(a.opacity||.15)/n;g=this.parentInverted?"(-1,-1)":"("+A(a.offsetX,1)+", "+A(a.offsetY,1)+")";for(b=1;b<=n;b++)f=y.cloneNode(0),e=2*n+1-2*b,d(f,{stroke:a.color||"#000000","stroke-opacity":l*b,"stroke-width":e,transform:"translate"+g,fill:"none"}),f.setAttribute("class",(f.getAttribute("class")||"")+" highcharts-shadow"),c&&(d(f,"height",Math.max(d(f,"height")-
e,0)),f.cutHeight=e),h?h.element.appendChild(f):y.parentNode&&y.parentNode.insertBefore(f,y),x.push(f);this.shadows=x}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=A(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,h,c){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[h]!==a&&(c.setAttribute(h,a),this[h]=a)},dashstyleSetter:function(a){var h,x=this["stroke-width"];"inherit"===x&&(x=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(h=a.length;h--;)a[h]=
D(a[h])*x;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){var h={left:"start",center:"middle",right:"end"};h[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",h[a]))},opacitySetter:function(a,h,c){this[h]=a;c.setAttribute(h,a)},titleSetter:function(a){var h=this.element.getElementsByTagName("title")[0];h||(h=m.createElementNS(this.SVG_NS,"title"),this.element.appendChild(h));h.firstChild&&h.removeChild(h.firstChild);h.appendChild(m.createTextNode(String(A(a),
"").replace(/<[^>]*>/g,"").replace(/</g,"\x3c").replace(/>/g,"\x3e")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(h,c){var x=this.element,b={textAnchor:"text-anchor"},f,y=!1,e,l=this.textPathWrapper,g=!l;c=n(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},c);f=c.attributes;if(h&&c&&c.enabled){this.options&&this.options.padding&&(f.dx=-this.options.padding);l||(this.textPathWrapper=
l=this.renderer.createElement("textPath"),y=!0);e=l.element;(c=h.element.getAttribute("id"))||h.element.setAttribute("id",c=a.uniqueKey());if(g)for(h=x.getElementsByTagName("tspan");h.length;)h[0].setAttribute("y",0),e.appendChild(h[0]);y&&l.add({element:this.text?this.text.element:x});e.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+c);p(f.dy)&&(e.parentNode.setAttribute("dy",f.dy),delete f.dy);p(f.dx)&&(e.parentNode.setAttribute("dx",f.dx),delete f.dx);a.objectEach(f,
function(a,h){e.setAttribute(b[h]||h,a)});x.removeAttribute("transform");this.removeTextOutline.call(l,[].slice.call(x.getElementsByTagName("tspan")));this.applyTextOutline=this.updateTransform=E}else l&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(x,h));return this},destroyTextPath:function(a,h){var x;h.element.setAttribute("id","");for(x=this.textPathWrapper.element.childNodes;x.length;)a.firstChild.appendChild(x[0]);a.firstChild.removeChild(this.textPathWrapper.element);
delete h.textPathWrapper},fillSetter:function(a,h,c){"string"===typeof a?c.setAttribute(h,a):a&&this.complexColor(a,h,c)},visibilitySetter:function(a,h,c){"inherit"===a?c.removeAttribute(h):this[h]!==a&&c.setAttribute(h,a);this[h]=a},zIndexSetter:function(a,h){var c=this.renderer,x=this.parentGroup,f=(x||c).element||c.box,b,y=this.element,e,n,c=f===c.box;b=this.added;var l;p(a)?(y.setAttribute("data-z-index",a),a=+a,this[h]===a&&(b=!1)):p(this[h])&&y.removeAttribute("data-z-index");this[h]=a;if(b){(a=
this.zIndex)&&x&&(x.handleZ=!0);h=f.childNodes;for(l=h.length-1;0<=l&&!e;l--)if(x=h[l],b=x.getAttribute("data-z-index"),n=!p(b),x!==y)if(0>a&&n&&!c&&!l)f.insertBefore(y,h[l]),e=!0;else if(D(b)<=a||n&&(!p(a)||0<=a))f.insertBefore(y,h[l+1]||null),e=!0;e||(f.insertBefore(y,h[c?3:0]||null),e=!0)}return e},_defaultSetter:function(a,h,c){c.setAttribute(h,a)}});C.prototype.yGetter=C.prototype.xGetter;C.prototype.translateXSetter=C.prototype.translateYSetter=C.prototype.rotationSetter=C.prototype.verticalAlignSetter=
C.prototype.rotationOriginXSetter=C.prototype.rotationOriginYSetter=C.prototype.scaleXSetter=C.prototype.scaleYSetter=C.prototype.matrixSetter=function(a,h){this[h]=a;this.doTransform=!0};C.prototype["stroke-widthSetter"]=C.prototype.strokeSetter=function(a,h,c){this[h]=a;this.stroke&&this["stroke-width"]?(C.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===h&&0===a&&this.hasStroke&&(c.removeAttribute("stroke"),
this.hasStroke=!1)};I=a.SVGRenderer=function(){this.init.apply(this,arguments)};l(I.prototype,{Element:C,SVG_NS:L,init:function(a,h,c,f,b,y,e){var x;x=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});e||x.css(this.getStyle(f));f=x.element;a.appendChild(f);d(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&d(f,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=f;this.boxWrapper=x;this.alignedObjects=[];this.url=(w||B)&&m.getElementsByTagName("base").length?P.location.href.split("#")[0].replace(/<[^>]*>/g,
"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(m.createTextNode("Created with Highcharts 7.1.0"));this.defs=this.createElement("defs").add();this.allowHTML=y;this.forExport=b;this.styledMode=e;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(h,c,!1);var n;w&&a.getBoundingClientRect&&(h=function(){u(a,{left:0,top:0});n=a.getBoundingClientRect();u(a,{left:Math.ceil(n.left)-n.left+"px",top:Math.ceil(n.top)-n.top+
"px"})},h(),this.unSubPixelFix=H(P,"resize",h))},definition:function(a){function h(a,x){var f;y(a).forEach(function(a){var b=c.createElement(a.tagName),y={};z(a,function(a,h){"tagName"!==h&&"children"!==h&&"textContent"!==h&&(y[h]=a)});b.attr(y);b.add(x||c.defs);a.textContent&&b.element.appendChild(m.createTextNode(a.textContent));h(a.children||[],b);f=b});return f}var c=this;return h(a)},getStyle:function(a){return this.style=l({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();e(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var h=new this.Element;h.init(this,a);return h},draw:E,getRadialAttr:function(a,h){return{cx:a[0]-a[2]/
2+h.cx*a[2],cy:a[1]-a[2]/2+h.cy*a[2],r:h.r*a[2]}},truncate:function(a,h,c,f,b,y,e){var x=this,n=a.rotation,l,g=f?1:0,L=(c||f).length,w=L,E=[],r=function(a){h.firstChild&&h.removeChild(h.firstChild);a&&h.appendChild(m.createTextNode(a))},p=function(y,n){n=n||y;if(void 0===E[n])if(h.getSubStringLength)try{E[n]=b+h.getSubStringLength(0,f?n+1:n)}catch(ca){}else x.getSpanWidth&&(r(e(c||f,y)),E[n]=b+x.getSpanWidth(a,h));return E[n]},z,d;a.rotation=0;z=p(h.textContent.length);if(d=b+z>y){for(;g<=L;)w=Math.ceil((g+
L)/2),f&&(l=e(f,w)),z=p(w,l&&l.length-1),g===L?g=L+1:z>y?L=w-1:g=w;0===L?r(""):c&&L===c.length-1||r(l||e(c||f,w))}f&&f.splice(0,w);a.actualWidth=z;a.rotation=n;return d},escapes:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;","'":"\x26#39;",'"':"\x26quot;"},buildText:function(a){var h=a.element,c=this,f=c.forExport,b=A(a.textStr,"").toString(),x=-1!==b.indexOf("\x3c"),y=h.childNodes,e,n=d(h,"x"),l=a.styles,g=a.textWidth,w=l&&l.lineHeight,E=l&&l.textOutline,r=l&&"ellipsis"===l.textOverflow,p=
l&&"nowrap"===l.whiteSpace,B=l&&l.fontSize,M,S,G=y.length,l=g&&!a.added&&this.box,J=function(a){var b;c.styledMode||(b=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:B||c.style.fontSize||12);return w?D(w):c.fontMetrics(b,a.getAttribute("style")?a:h).h},k=function(a,h){z(c.escapes,function(c,b){h&&-1!==h.indexOf(c)||(a=a.toString().replace(new RegExp(c,"g"),b))});return a},P=function(a,h){var c;c=a.indexOf("\x3c");a=a.substring(c,a.indexOf("\x3e")-c);c=a.indexOf(h+"\x3d");if(-1!==c&&(c=c+h.length+
1,h=a.charAt(c),'"'===h||"'"===h))return a=a.substring(c+1),a.substring(0,a.indexOf(h))};M=[b,r,p,w,E,B,g].join();if(M!==a.textCache){for(a.textCache=M;G--;)h.removeChild(y[G]);x||E||r||g||-1!==b.indexOf(" ")?(l&&l.appendChild(h),x?(b=c.styledMode?b.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e'):b.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g,'\x3cspan style\x3d"font-style:italic"\x3e'),
b=b.replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g)):b=[b],b=b.filter(function(a){return""!==a}),b.forEach(function(b,x){var y,l=0,w=0;b=b.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");y=b.split("|||");y.forEach(function(b){if(""!==b||1===y.length){var E={},z=m.createElementNS(c.SVG_NS,"tspan"),D,A;(D=P(b,"class"))&&d(z,"class",D);if(D=P(b,"style"))D=D.replace(/(;| |^)color([ :])/,"$1fill$2"),d(z,"style",
D);(A=P(b,"href"))&&!f&&(d(z,"onclick",'location.href\x3d"'+A+'"'),d(z,"class","highcharts-anchor"),c.styledMode||u(z,{cursor:"pointer"}));b=k(b.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==b){z.appendChild(m.createTextNode(b));l?E.dx=0:x&&null!==n&&(E.x=n);d(z,E);h.appendChild(z);!l&&S&&(!R&&f&&u(z,{display:"block"}),d(z,"dy",J(z)));if(g){var M=b.replace(/([^\^])-/g,"$1- ").split(" "),E=!p&&(1<y.length||x||1<M.length);A=0;var G=J(z);if(r)e=c.truncate(a,z,b,void 0,0,Math.max(0,g-parseInt(B||
12,10)),function(a,h){return a.substring(0,h)+"\u2026"});else if(E)for(;M.length;)M.length&&!p&&0<A&&(z=m.createElementNS(L,"tspan"),d(z,{dy:G,x:n}),D&&d(z,"style",D),z.appendChild(m.createTextNode(M.join(" ").replace(/- /g,"-"))),h.appendChild(z)),c.truncate(a,z,null,M,0===A?w:0,g,function(a,h){return M.slice(0,h).join(" ").replace(/- /g,"-")}),w=a.actualWidth,A++}l++}}});S=S||h.childNodes.length}),r&&e&&a.attr("title",k(a.textStr,["\x26lt;","\x26gt;"])),l&&l.removeChild(h),E&&a.applyTextOutline&&
a.applyTextOutline(E)):h.appendChild(m.createTextNode(k(b)))}},getContrast:function(a){a=t(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,h,c,b,f,y,e,g,L,w){var x=this.label(a,h,c,L,null,null,w,null,"button"),m=0,E=this.styledMode;x.attr(n({padding:8,r:2},f));if(!E){var z,p,d,D;f=n({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},f);z=f.style;delete f.style;y=n(f,{fill:"#e6e6e6"},y);
p=y.style;delete y.style;e=n(f,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},e);d=e.style;delete e.style;g=n(f,{style:{color:"#cccccc"}},g);D=g.style;delete g.style}H(x.element,r?"mouseover":"mouseenter",function(){3!==m&&x.setState(1)});H(x.element,r?"mouseout":"mouseleave",function(){3!==m&&x.setState(m)});x.setState=function(a){1!==a&&(x.state=m=a);x.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||
0]);E||x.attr([f,y,e,g][a||0]).css([z,p,d,D][a||0])};E||x.attr(f).css(l({cursor:"default"},z));return x.on("click",function(a){3!==m&&b.call(x,a)})},crispLine:function(a,h){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-h%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+h%2/2);return a},path:function(a){var h=this.styledMode?{}:{fill:"none"};c(a)?h.d=a:J(a)&&l(h,a);return this.createElement("path").attr(h)},circle:function(a,h,c){a=J(a)?a:void 0===a?{}:{x:a,y:h,r:c};h=this.createElement("circle");h.xSetter=
h.ySetter=function(a,h,c){c.setAttribute("c"+h,a)};return h.attr(a)},arc:function(a,h,c,b,f,y){J(a)?(b=a,h=b.y,c=b.r,a=b.x):b={innerR:b,start:f,end:y};a=this.symbol("arc",a,h,c,c,b);a.r=c;return a},rect:function(a,h,c,b,f,y){f=J(a)?a.r:f;var e=this.createElement("rect");a=J(a)?a:void 0===a?{}:{x:a,y:h,width:Math.max(c,0),height:Math.max(b,0)};this.styledMode||(void 0!==y&&(a.strokeWidth=y,a=e.crisp(a)),a.fill="none");f&&(a.r=f);e.rSetter=function(a,h,c){e.r=a;d(c,{rx:a,ry:a})};e.rGetter=function(){return e.r};
return e.attr(a)},setSize:function(a,h,c){var b=this.alignedObjects,f=b.length;this.width=a;this.height=h;for(this.boxWrapper.animate({width:a,height:h},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:A(c,!0)?void 0:0});f--;)b[f].align()},g:function(a){var h=this.createElement("g");return a?h.attr({"class":"highcharts-"+a}):h},image:function(a,h,c,b,f,y){var e={preserveAspectRatio:"none"},x,n=function(a,h){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink",
"href",h):a.setAttribute("hc-svg-href",h)},g=function(h){n(x.element,a);y.call(x,h)};1<arguments.length&&l(e,{x:h,y:c,width:b,height:f});x=this.createElement("image").attr(e);y?(n(x.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d"),e=new P.Image,H(e,"load",g),e.src=a,e.complete&&g({})):n(x.element,a);return x},symbol:function(a,h,c,b,f,y){var e=this,n,x=/^url\((.*?)\)$/,g=x.test(a),L=!g&&(this.symbols[a]?a:"circle"),w=L&&this.symbols[L],E=p(h)&&w&&w.call(this.symbols,
Math.round(h),Math.round(c),b,f,y),r,z;w?(n=this.path(E),e.styledMode||n.attr("fill","none"),l(n,{symbolName:L,x:h,y:c,width:b,height:f}),y&&l(n,y)):g&&(r=a.match(x)[1],n=this.image(r),n.imgwidth=A(S[r]&&S[r].width,y&&y.width),n.imgheight=A(S[r]&&S[r].height,y&&y.height),z=function(){n.attr({width:n.width,height:n.height})},["width","height"].forEach(function(a){n[a+"Setter"]=function(a,h){var c={},b=this["img"+h],f="width"===h?"translateX":"translateY";this[h]=a;p(b)&&(y&&"within"===y.backgroundSize&&
this.width&&this.height&&(b=Math.round(b*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(h,b),this.alignByTranslate||(c[f]=((this[h]||0)-b)/2,this.attr(c)))}}),p(h)&&n.attr({x:h,y:c}),n.isImg=!0,p(n.imgwidth)&&p(n.imgheight)?z():(n.attr({width:0,height:0}),v("img",{onload:function(){var a=q[e.chartIndex];0===this.width&&(u(this,{position:"absolute",top:"-999em"}),m.body.appendChild(this));S[r]={width:this.width,height:this.height};n.imgwidth=
this.width;n.imgheight=this.height;n.element&&z();this.parentNode&&this.parentNode.removeChild(this);e.imgCount--;if(!e.imgCount&&a&&a.onload)a.onload()},src:r}),this.imgCount++));return n},symbols:{circle:function(a,h,c,b){return this.arc(a+c/2,h+b/2,c/2,b/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(a,h,c,b){return["M",a,h,"L",a+c,h,a+c,h+b,a,h+b,"Z"]},triangle:function(a,h,c,b){return["M",a+c/2,h,"L",a+c,h+b,a,h+b,"Z"]},"triangle-down":function(a,h,c,b){return["M",a,h,"L",a+c,
h,a+c/2,h+b,"Z"]},diamond:function(a,h,c,b){return["M",a+c/2,h,"L",a+c,h+b/2,a+c/2,h+b,a,h+b/2,"Z"]},arc:function(a,h,c,b,f){var y=f.start,e=f.r||c,n=f.r||b||c,l=f.end-.001;c=f.innerR;b=A(f.open,.001>Math.abs(f.end-f.start-2*Math.PI));var x=Math.cos(y),g=Math.sin(y),L=Math.cos(l),l=Math.sin(l),y=.001>f.end-y-Math.PI?0:1;f=["M",a+e*x,h+n*g,"A",e,n,0,y,A(f.clockwise,1),a+e*L,h+n*l];p(c)&&f.push(b?"M":"L",a+c*L,h+c*l,"A",c,c,0,y,0,a+c*x,h+c*g);f.push(b?"":"Z");return f},callout:function(a,h,c,b,f){var y=
Math.min(f&&f.r||0,c,b),e=y+6,n=f&&f.anchorX;f=f&&f.anchorY;var l;l=["M",a+y,h,"L",a+c-y,h,"C",a+c,h,a+c,h,a+c,h+y,"L",a+c,h+b-y,"C",a+c,h+b,a+c,h+b,a+c-y,h+b,"L",a+y,h+b,"C",a,h+b,a,h+b,a,h+b-y,"L",a,h+y,"C",a,h,a,h,a+y,h];n&&n>c?f>h+e&&f<h+b-e?l.splice(13,3,"L",a+c,f-6,a+c+6,f,a+c,f+6,a+c,h+b-y):l.splice(13,3,"L",a+c,b/2,n,f,a+c,b/2,a+c,h+b-y):n&&0>n?f>h+e&&f<h+b-e?l.splice(33,3,"L",a,f+6,a-6,f,a,f-6,a,h+y):l.splice(33,3,"L",a,b/2,n,f,a,b/2,a,h+y):f&&f>b&&n>a+e&&n<a+c-e?l.splice(23,3,"L",n+6,h+
b,n,h+b+6,n-6,h+b,a+y,h+b):f&&0>f&&n>a+e&&n<a+c-e&&l.splice(3,3,"L",n-6,h,n,h-6,n+6,h,c-y,h);return l}},clipRect:function(h,c,b,f){var y=a.uniqueKey()+"-",e=this.createElement("clipPath").attr({id:y}).add(this.defs);h=this.rect(h,c,b,f,0).add(e);h.id=y;h.clipPath=e;h.count=0;return h},text:function(a,h,c,b){var f={};if(b&&(this.allowHTML||!this.forExport))return this.html(a,h,c);f.x=Math.round(h||0);c&&(f.y=Math.round(c));p(a)&&(f.text=a);a=this.createElement("text").attr(f);b||(a.xSetter=function(a,
h,c){var b=c.getElementsByTagName("tspan"),f,y=c.getAttribute(h),e;for(e=0;e<b.length;e++)f=b[e],f.getAttribute(h)===y&&f.setAttribute(h,a);c.setAttribute(h,a)});return a},fontMetrics:function(a,h){a=!this.styledMode&&/px/.test(a)||!P.getComputedStyle?a||h&&h.style&&h.style.fontSize||this.style&&this.style.fontSize:h&&C.prototype.getStyle.call(h,"font-size");a=/px/.test(a)?D(a):12;h=24>a?a+3:Math.round(1.2*a);return{h:h,b:Math.round(.8*h),f:a}},rotCorr:function(a,h,c){var b=a;h&&c&&(b=Math.max(b*
Math.cos(h*g),4));return{x:-a/3*Math.sin(h*g),y:b}},label:function(c,b,f,y,e,g,L,w,m){var x=this,E=x.styledMode,r=x.g("button"!==m&&"label"),z=r.text=x.text("",0,0,L).attr({zIndex:1}),d,D,R=0,A=3,M=0,B,S,G,k,J,P={},v,q,t=/^url\((.*?)\)$/.test(y),u=E||t,Q=function(){return E?d.strokeWidth()%2/2:(v?parseInt(v,10):0)%2/2},U,T,O;m&&r.addClass("highcharts-"+m);U=function(){var a=z.element.style,h={};D=(void 0===B||void 0===S||J)&&p(z.textStr)&&z.getBBox();r.width=(B||D.width||0)+2*A+M;r.height=(S||D.height||
0)+2*A;q=A+Math.min(x.fontMetrics(a&&a.fontSize,z).b,D?D.height:Infinity);u&&(d||(r.box=d=x.symbols[y]||t?x.symbol(y):x.rect(),d.addClass(("button"===m?"":"highcharts-label-box")+(m?" highcharts-"+m+"-box":"")),d.add(r),a=Q(),h.x=a,h.y=(w?-q:0)+a),h.width=Math.round(r.width),h.height=Math.round(r.height),d.attr(l(h,P)),P={})};T=function(){var a=M+A,h;h=w?0:q;p(B)&&D&&("center"===J||"right"===J)&&(a+={center:.5,right:1}[J]*(B-D.width));if(a!==z.x||h!==z.y)z.attr("x",a),z.hasBoxWidthChanged&&(D=z.getBBox(!0),
U()),void 0!==h&&z.attr("y",h);z.x=a;z.y=h};O=function(a,h){d?d.attr(a,h):P[a]=h};r.onAdd=function(){z.add(r);r.attr({text:c||0===c?c:"",x:b,y:f});d&&p(e)&&r.attr({anchorX:e,anchorY:g})};r.widthSetter=function(h){B=a.isNumber(h)?h:null};r.heightSetter=function(a){S=a};r["text-alignSetter"]=function(a){J=a};r.paddingSetter=function(a){p(a)&&a!==A&&(A=r.padding=a,T())};r.paddingLeftSetter=function(a){p(a)&&a!==M&&(M=a,T())};r.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==R&&(R=a,D&&r.attr({x:G}))};
r.textSetter=function(a){void 0!==a&&z.attr({text:a});U();T()};r["stroke-widthSetter"]=function(a,h){a&&(u=!0);v=this["stroke-width"]=a;O(h,a)};E?r.rSetter=function(a,h){O(h,a)}:r.strokeSetter=r.fillSetter=r.rSetter=function(a,h){"r"!==h&&("fill"===h&&a&&(u=!0),r[h]=a);O(h,a)};r.anchorXSetter=function(a,h){e=r.anchorX=a;O(h,Math.round(a)-Q()-G)};r.anchorYSetter=function(a,h){g=r.anchorY=a;O(h,a-k)};r.xSetter=function(a){r.x=a;R&&(a-=R*((B||D.width)+2*A),r["forceAnimate:x"]=!0);G=Math.round(a);r.attr("translateX",
G)};r.ySetter=function(a){k=r.y=Math.round(a);r.attr("translateY",k)};var aa=r.css;L={css:function(a){if(a){var h={};a=n(a);r.textProps.forEach(function(c){void 0!==a[c]&&(h[c]=a[c],delete a[c])});z.css(h);"width"in h&&U();"fontSize"in h&&(U(),T())}return aa.call(r,a)},getBBox:function(){return{width:D.width+2*A,height:D.height+2*A,x:D.x-A,y:D.y-A}},destroy:function(){h(r.element,"mouseenter");h(r.element,"mouseleave");z&&(z=z.destroy());d&&(d=d.destroy());C.prototype.destroy.call(r);r=x=U=T=O=null}};
E||(L.shadow=function(a){a&&(U(),d&&d.shadow(a));return r});return l(r,L)}});a.Renderer=I});K(F,"parts/Html.js",[F["parts/Globals.js"]],function(a){var C=a.attr,I=a.createElement,H=a.css,k=a.defined,d=a.extend,q=a.isFirefox,t=a.isMS,u=a.isWebKit,v=a.pick,p=a.pInt,g=a.SVGElement,e=a.SVGRenderer,m=a.win;d(g.prototype,{htmlCss:function(a){var b="SPAN"===this.element.tagName&&a&&"width"in a,f=v(b&&a.width,void 0),c;b&&(delete a.width,this.textWidth=f,c=!0);a&&"ellipsis"===a.textOverflow&&(a.whiteSpace=
"nowrap",a.overflow="hidden");this.styles=d(this.styles,a);H(this.element,a);c&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var a=this.element;return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,f=this.translateX||0,c=this.translateY||0,e=this.x||0,g=this.y||0,m=this.textAlign||"left",d={left:0,center:.5,right:1}[m],B=this.styles,n=B&&B.whiteSpace;H(b,{marginLeft:f,marginTop:c});
!a.styledMode&&this.shadows&&this.shadows.forEach(function(a){H(a,{marginLeft:f+1,marginTop:c+1})});this.inverted&&[].forEach.call(b.childNodes,function(c){a.invertChild(c,b)});if("SPAN"===b.tagName){var B=this.rotation,E=this.textWidth&&p(this.textWidth),z=[B,m,b.innerHTML,this.textWidth,this.textAlign].join(),A;(A=E!==this.oldTextWidth)&&!(A=E>this.oldTextWidth)&&((A=this.textPxLength)||(H(b,{width:"",whiteSpace:n||"nowrap"}),A=b.offsetWidth),A=A>E);A&&(/[ \-]/.test(b.textContent||b.innerText)||
"ellipsis"===b.style.textOverflow)?(H(b,{width:E+"px",display:"block",whiteSpace:n||"normal"}),this.oldTextWidth=E,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;z!==this.cTT&&(n=a.fontMetrics(b.style.fontSize,b).b,!k(B)||B===(this.oldRotation||0)&&m===this.oldAlign||this.setSpanRotation(B,d,n),this.getSpanCorrection(!k(B)&&this.textPxLength||b.offsetWidth,n,d,B,m));H(b,{left:e+(this.xCorr||0)+"px",top:g+(this.yCorr||0)+"px"});this.cTT=z;this.oldRotation=B;this.oldAlign=m}}else this.alignOnAdd=
!0},setSpanRotation:function(a,b,f){var c={},e=this.renderer.getTransformKey();c[e]=c.transform="rotate("+a+"deg)";c[e+(q?"Origin":"-origin")]=c.transformOrigin=100*b+"% "+f+"px";H(this.element,c)},getSpanCorrection:function(a,b,f){this.xCorr=-a*f;this.yCorr=-b}});d(e.prototype,{getTransformKey:function(){return t&&!/Edge/.test(m.navigator.userAgent)?"-ms-transform":u?"-webkit-transform":q?"MozTransform":m.opera?"-o-transform":""},html:function(e,b,f){var c=this.createElement("span"),l=c.element,
r=c.renderer,m=r.isSVG,p=function(a,c){["opacity","visibility"].forEach(function(b){a[b+"Setter"]=function(f,e,h){var y=a.div?a.div.style:c;g.prototype[b+"Setter"].call(this,f,e,h);y&&(y[e]=f)}});a.addedSetters=!0},B=a.charts[r.chartIndex],B=B&&B.styledMode;c.textSetter=function(a){a!==l.innerHTML&&(delete this.bBox,delete this.oldTextWidth);this.textStr=a;l.innerHTML=v(a,"");c.doTransform=!0};m&&p(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:e,x:Math.round(b),y:Math.round(f)}).css({position:"absolute"});B||c.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});l.style.whiteSpace="nowrap";c.css=c.htmlCss;m&&(c.add=function(a){var b,f=r.box.parentNode,e=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)e.push(a),a=a.parentGroup;e.reverse().forEach(function(a){function h(h,c){a[c]=
h;"translateX"===c?y.left=h+"px":y.top=h+"px";a.doTransform=!0}var y,n=C(a.element,"class");n&&(n={className:n});b=a.div=a.div||I("div",n,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},b||f);y=b.style;d(a,{classSetter:function(a){return function(h){this.element.setAttribute("class",h);a.className=h}}(b),on:function(){e[0].div&&c.on.apply({element:e[0].div},arguments);return a},translateXSetter:h,
translateYSetter:h});a.addedSetters||p(a)})}}else b=f;b.appendChild(l);c.added=!0;c.alignOnAdd&&c.htmlUpdateTransform();return c});return c}})});K(F,"parts/Time.js",[F["parts/Globals.js"]],function(a){var C=a.defined,I=a.extend,H=a.merge,k=a.pick,d=a.timeUnits,q=a.win;a.Time=function(a){this.update(a,!1)};a.Time.prototype={defau