UNPKG

highcharts

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