UNPKG

highcharts

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