UNPKG

highcharts

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