UNPKG

highcharts-fork-vermorxt

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