UNPKG

highcharts

Version:
105 lines (103 loc) 348 kB
/* Highmaps JS v9.0.1 (2021-02-15) (c) 2011-2021 Torstein Honsi License: www.highcharts.com/license */ (function(V,J){"object"===typeof module&&module.exports?(J["default"]=J,module.exports=V.document?J(V):J):"function"===typeof define&&define.amd?define("highcharts/highmaps",function(){return J(V)}):(V.Highcharts&&V.Highcharts.error(16,!0),V.Highcharts=J(V))})("undefined"!==typeof window?window:this,function(V){function J(w,l,b,y){w.hasOwnProperty(l)||(w[l]=y.apply(null,b))}var b={};J(b,"Core/Globals.js",[],function(){var w="undefined"!==typeof V?V:"undefined"!==typeof window?window:{},l=w.document, b=w.navigator&&w.navigator.userAgent||"",y=l&&l.createElementNS&&!!l.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,z=/(edge|msie|trident)/i.test(b)&&!w.opera,C=-1!==b.indexOf("Firefox"),v=-1!==b.indexOf("Chrome"),t=C&&4>parseInt(b.split("Firefox/")[1],10),q=function(){};return{product:"Highcharts",version:"9.0.1",deg2rad:2*Math.PI/360,doc:l,hasBidiBug:t,hasTouch:!!w.TouchEvent,isMS:z,isWebKit:-1!==b.indexOf("AppleWebKit"),isFirefox:C,isChrome:v,isSafari:!v&&-1!==b.indexOf("Safari"), isTouchDevice:/(Mobile|Android|Windows Phone)/.test(b),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},supportsPassiveEvents:function(){var h=!1;if(!z){var c=Object.defineProperty({},"passive",{get:function(){h=!0}});w.addEventListener&&w.removeEventListener&&(w.addEventListener("testPassive",q,c),w.removeEventListener("testPassive",q,c))}return h}(),symbolSizes:{},svg:y,win:w,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:q,charts:[],dateFormats:{}}});J(b,"Core/Utilities.js", [b["Core/Globals.js"]],function(w){function l(d,g,M,m){var F=g?"Highcharts error":"Highcharts warning";32===d&&(d=F+": Deprecated member");var W=c(d),O=W?F+" #"+d+": www.highcharts.com/errors/"+d+"/":d.toString();F=function(){if(g)throw Error(O);a.console&&-1===l.messages.indexOf(O)&&console.warn(O)};if("undefined"!==typeof m){var f="";W&&(O+="?");n(m,function(d,a){f+="\n - "+a+": "+d;W&&(O+=encodeURI(a)+"="+encodeURI(d))});O+=f}M?e(M,"displayError",{code:d,message:O,params:m},F):F();l.messages.push(O)} function b(){var d,a=arguments,M={},e=function(a,d){"object"!==typeof a&&(a={});n(d,function(F,D){"__proto__"!==D&&"constructor"!==D&&(!t(F,!0)||h(F)||q(F)?a[D]=d[D]:a[D]=e(a[D]||{},F))});return a};!0===a[0]&&(M=a[1],a=Array.prototype.slice.call(a,2));var F=a.length;for(d=0;d<F;d++)M=e(M,a[d]);return M}function y(a,d){var e={};n(a,function(M,F){if(t(a[F],!0)&&!a.nodeType&&d[F])M=y(a[F],d[F]),Object.keys(M).length&&(e[F]=M);else if(t(a[F])||a[F]!==d[F])e[F]=a[F]});return e}function z(a,d){return parseInt(a, d||10)}function C(a){return"string"===typeof a}function v(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a}function t(a,d){return!!a&&"object"===typeof a&&(!d||!v(a))}function q(a){return t(a)&&"number"===typeof a.nodeType}function h(a){var d=a&&a.constructor;return!(!t(a,!0)||q(a)||!d||!d.name||"Object"===d.name)}function c(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a}function p(a){return"undefined"!==typeof a&&null!==a}function k(a, d,e){var M;C(d)?p(e)?a.setAttribute(d,e):a&&a.getAttribute&&((M=a.getAttribute(d))||"class"!==d||(M=a.getAttribute(d+"Name"))):n(d,function(d,e){a.setAttribute(e,d)});return M}function G(a,d){var e;a||(a={});for(e in d)a[e]=d[e];return a}function f(){for(var a=arguments,d=a.length,e=0;e<d;e++){var g=a[e];if("undefined"!==typeof g&&null!==g)return g}}function H(a,d){w.isMS&&!w.svg&&d&&"undefined"!==typeof d.opacity&&(d.filter="alpha(opacity="+100*d.opacity+")");G(a.style,d)}function x(a,e,M,g,F){a= d.createElement(a);e&&G(a,e);F&&H(a,{padding:"0",border:"none",margin:"0"});M&&H(a,M);g&&g.appendChild(a);return a}function K(a,d){return parseFloat(a.toPrecision(d||14))}function L(a,d,e,g){a=+a||0;d=+d;var F=w.defaultOptions.lang,M=(a.toString().split(".")[1]||"").split("e")[0].length,m=a.toString().split("e"),n=d;if(-1===d)d=Math.min(M,20);else if(!c(d))d=2;else if(d&&m[1]&&0>m[1]){var D=d+ +m[1];0<=D?(m[0]=(+m[0]).toExponential(D).split("e")[0],d=D):(m[0]=m[0].split(".")[0]||0,a=20>d?(m[0]*Math.pow(10, m[1])).toFixed(d):0,m[1]=0)}var O=(Math.abs(m[1]?m[0]:a)+Math.pow(10,-Math.max(d,M)-1)).toFixed(d);M=String(z(O));D=3<M.length?M.length%3:0;e=f(e,F.decimalPoint);g=f(g,F.thousandsSep);a=(0>a?"-":"")+(D?M.substr(0,D)+g:"");a=0>+m[1]&&!n?"0":a+M.substr(D).replace(/(\d{3})(?=\d)/g,"$1"+g);d&&(a+=e+O.slice(-d));m[1]&&0!==+a&&(a+="e"+m[1]);return a}function r(a,d){if(!a)return d;var e=a.split(".").reverse();if(1===e.length)return d[a];for(a=e.pop();"undefined"!==typeof a&&"undefined"!==typeof d&&null!== d;)d=d[a],a=e.pop();return d}function n(a,d,e){for(var M in a)Object.hasOwnProperty.call(a,M)&&d.call(e||a[M],a[M],M,a)}function u(a,d,e){function M(d,F){var e=a.removeEventListener||w.removeEventListenerPolyfill;e&&e.call(a,d,F,!1)}function F(F){var e;if(a.nodeName){if(d){var g={};g[d]=!0}else g=F;n(g,function(a,d){if(F[d])for(e=F[d].length;e--;)M(d,F[d][e].fn)})}}var g="function"===typeof a&&a.prototype||a;if(Object.hasOwnProperty.call(g,"hcEvents")){var m=g.hcEvents;d?(g=m[d]||[],e?(m[d]=g.filter(function(a){return e!== a.fn}),M(d,e)):(F(m),m[d]=[])):(F(m),delete g.hcEvents)}}function e(a,e,M,g){M=M||{};if(d.createEvent&&(a.dispatchEvent||a.fireEvent)){var F=d.createEvent("Events");F.initEvent(e,!0,!0);G(F,M);a.dispatchEvent?a.dispatchEvent(F):a.fireEvent(e,F)}else if(a.hcEvents){M.target||G(M,{preventDefault:function(){M.defaultPrevented=!0},target:a,type:e});F=[];for(var m=a,n=!1;m.hcEvents;)Object.hasOwnProperty.call(m,"hcEvents")&&m.hcEvents[e]&&(F.length&&(n=!0),F.unshift.apply(F,m.hcEvents[e])),m=Object.getPrototypeOf(m); n&&F.sort(function(a,d){return a.order-d.order});F.forEach(function(d){!1===d.fn.call(a,M)&&M.preventDefault()})}g&&!M.defaultPrevented&&g.call(a,M)}var g=w.charts,d=w.doc,a=w.win;"";(l||(l={})).messages=[];var m;Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};var E=Array.prototype.find?function(a,d){return a.find(d)}:function(a,d){var e,g=a.length;for(e=0;e<g;e++)if(d(a[e],e))return a[e]};n({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(a,d){w[d]= function(e){var g;l(32,!1,void 0,(g={},g["Highcharts."+d]="use Array."+a,g));return Array.prototype[a].apply(e,[].slice.call(arguments,1))}});var I,A=function(){var a=Math.random().toString(36).substring(2,9)+"-",d=0;return function(){return"highcharts-"+(I?"":a)+d++}}(),N=w.getOptions=function(){return w.defaultOptions},R=w.setOptions=function(a){w.defaultOptions=b(!0,w.defaultOptions,a);(a.time||a.global)&&w.time.update(b(w.defaultOptions.global,w.defaultOptions.time,a.global,a.time));return w.defaultOptions}; a.jQuery&&(a.jQuery.fn.highcharts=function(){var a=[].slice.call(arguments);if(this[0])return a[0]?(new (w[C(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):g[k(this[0],"data-highcharts-chart")]});return{addEvent:function(a,d,e,g){void 0===g&&(g={});var F="function"===typeof a&&a.prototype||a;Object.hasOwnProperty.call(F,"hcEvents")||(F.hcEvents={});F=F.hcEvents;w.Point&&a instanceof w.Point&&a.series&&a.series.chart&&(a.series.chart.runTrackerClick=!0);var m=a.addEventListener||w.addEventListenerPolyfill; m&&m.call(a,d,e,w.supportsPassiveEvents?{passive:void 0===g.passive?-1!==d.indexOf("touch"):g.passive,capture:!1}:!1);F[d]||(F[d]=[]);F[d].push({fn:e,order:"number"===typeof g.order?g.order:Infinity});F[d].sort(function(a,d){return a.order-d.order});return function(){u(a,d,e)}},arrayMax:function(a){for(var d=a.length,e=a[0];d--;)a[d]>e&&(e=a[d]);return e},arrayMin:function(a){for(var d=a.length,e=a[0];d--;)a[d]<e&&(e=a[d]);return e},attr:k,clamp:function(a,d,e){return a>d?a<e?a:e:d},cleanRecursively:y, clearTimeout:function(a){p(a)&&clearTimeout(a)},correctFloat:K,createElement:x,css:H,defined:p,destroyObjectProperties:function(a,d){n(a,function(e,g){e&&e!==d&&e.destroy&&e.destroy();delete a[g]})},discardElement:function(a){m||(m=x("div"));a&&m.appendChild(a);m.innerHTML=""},erase:function(a,d){for(var e=a.length;e--;)if(a[e]===d){a.splice(e,1);break}},error:l,extend:G,extendClass:function(a,d){var e=function(){};e.prototype=new a;G(e.prototype,d);return e},find:E,fireEvent:e,format:function(a, d,e){var g="{",F=!1,m=[],M=/f$/,n=/\.([0-9])/,D=w.defaultOptions.lang,f=e&&e.time||w.time;for(e=e&&e.numberFormatter||L;a;){var u=a.indexOf(g);if(-1===u)break;var E=a.slice(0,u);if(F){E=E.split(":");g=r(E.shift()||"",d);if(E.length&&"number"===typeof g)if(E=E.join(":"),M.test(E)){var k=parseInt((E.match(n)||["","-1"])[1],10);null!==g&&(g=e(g,k,D.decimalPoint,-1<E.indexOf(",")?D.thousandsSep:""))}else g=f.dateFormat(E,g);m.push(g)}else m.push(E);a=a.slice(u+1);g=(F=!F)?"}":"{"}m.push(a);return m.join("")}, getMagnitude:function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))},getNestedProperty:r,getOptions:N,getStyle:function(d,e,g){if("width"===e)return e=Math.min(d.offsetWidth,d.scrollWidth),g=d.getBoundingClientRect&&d.getBoundingClientRect().width,g<e&&g>=e-1&&(e=Math.floor(g)),Math.max(0,e-w.getStyle(d,"padding-left")-w.getStyle(d,"padding-right"));if("height"===e)return Math.max(0,Math.min(d.offsetHeight,d.scrollHeight)-w.getStyle(d,"padding-top")-w.getStyle(d,"padding-bottom"));a.getComputedStyle|| l(27,!0);if(d=a.getComputedStyle(d,void 0))d=d.getPropertyValue(e),f(g,"opacity"!==e)&&(d=z(d));return d},inArray:function(a,d,e){l(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"});return d.indexOf(a,e)},isArray:v,isClass:h,isDOMElement:q,isFunction:function(a){return"function"===typeof a},isNumber:c,isObject:t,isString:C,keys:function(a){l(32,!1,void 0,{"Highcharts.keys":"use Object.keys"});return Object.keys(a)},merge:b,normalizeTickInterval:function(a,d,e,g,F){var m=a;e=f(e,1);var n=a/ e;d||(d=F?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===g&&(1===e?d=d.filter(function(a){return 0===a%1}):.1>=e&&(d=[1/e])));for(g=0;g<d.length&&!(m=d[g],F&&m*e>=a||!F&&n<=(d[g]+(d[g+1]||d[g]))/2);g++);return m=K(m*e,-Math.round(Math.log(.001)/Math.LN10))},numberFormat:L,objectEach:n,offset:function(e){var g=d.documentElement;e=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:e.top+(a.pageYOffset||g.scrollTop)-(g.clientTop||0),left:e.left+(a.pageXOffset|| g.scrollLeft)-(g.clientLeft||0),width:e.width,height:e.height}},pad:function(a,d,e){return Array((d||2)+1-String(a).replace("-","").length).join(e||"0")+a},pick:f,pInt:z,relativeLength:function(a,d,e){return/%$/.test(a)?d*parseFloat(a)/100+(e||0):parseFloat(a)},removeEvent:u,setOptions:R,splat:function(a){return v(a)?a:[a]},stableSort:function(a,d){var e=a.length,g,F;for(F=0;F<e;F++)a[F].safeI=F;a.sort(function(a,e){g=d(a,e);return 0===g?a.safeI-e.safeI:g});for(F=0;F<e;F++)delete a[F].safeI},syncTimeout:function(a, d,e){if(0<d)return setTimeout(a,d,e);a.call(0,e);return-1},timeUnits:{millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},uniqueKey:A,useSerialIds:function(a){return I=f(a,I)},wrap:function(a,d,e){var g=a[d];a[d]=function(){var a=Array.prototype.slice.call(arguments),d=arguments,m=this;m.proceed=function(){g.apply(m,arguments.length?arguments:d)};a.unshift(g);a=e.apply(this,a);m.proceed=null;return a}}}});J(b,"Core/Renderer/HTML/AST.js",[b["Core/Globals.js"], b["Core/Utilities.js"]],function(w,l){var b=w.SVG_NS,y=l.attr,z=l.createElement,C=l.discardElement,v=l.error,t=l.isString,q=l.objectEach,h=l.splat;"";var c=!1;try{c=!!(new DOMParser).parseFromString("","text/html")}catch(p){}return function(){function p(k){this.nodes="string"===typeof k?this.parseMarkup(k):k}p.filterUserAttributes=function(k){q(k,function(c,f){var h=!0;-1===p.allowedAttributes.indexOf(f)&&(h=!1);-1!==["background","dynsrc","href","lowsrc","src"].indexOf(f)&&(h=t(c)&&p.allowedReferences.some(function(f){return 0=== c.indexOf(f)}));h||(v("Highcharts warning: Invalid attribute '"+f+"' in config"),delete k[f])});return k};p.setElementHTML=function(k,c){k.innerHTML="";c&&(new p(c)).addToDOM(k)};p.prototype.addToDOM=function(k){function c(f,k){var x;h(f).forEach(function(f){var h=f.tagName,r=f.textContent?w.doc.createTextNode(f.textContent):void 0;if(h)if("#text"===h)var n=r;else if(-1!==p.allowedTags.indexOf(h)){h=w.doc.createElementNS("svg"===h?b:k.namespaceURI||b,h);var u=f.attributes||{};q(f,function(e,g){"tagName"!== g&&"attributes"!==g&&"children"!==g&&"textContent"!==g&&(u[g]=e)});y(h,p.filterUserAttributes(u));r&&h.appendChild(r);c(f.children||[],h);n=h}else v("Highcharts warning: Invalid tagName '"+h+"' in config");n&&k.appendChild(n);x=n});return x}return c(this.nodes,k)};p.prototype.parseMarkup=function(k){var h=[];if(c)k=(new DOMParser).parseFromString(k,"text/html");else{var f=z("div");f.innerHTML=k;k={body:f}}var H=function(f,k){var c=f.nodeName.toLowerCase(),h={tagName:c};if("#text"===c){c=f.textContent|| "";if(/^[\s]*$/.test(c))return;h.textContent=c}if(c=f.attributes){var n={};[].forEach.call(c,function(e){n[e.name]=e.value});h.attributes=n}if(f.childNodes.length){var u=[];[].forEach.call(f.childNodes,function(e){H(e,u)});u.length&&(h.children=u)}k.push(h)};[].forEach.call(k.body.childNodes,function(f){return H(f,h)});f&&C(f);return h};p.allowedTags="a b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr ul #text".split(" "); p.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style result rowspan summary target tabindex text-align textAnchor textLength type valign width x x1 xy y y1 y2 zIndex".split(" "); p.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" ");return p}()});J(b,"Core/Color/Color.js",[b["Core/Globals.js"],b["Core/Utilities.js"]],function(w,l){var b=l.isNumber,y=l.merge,z=l.pInt;"";l=function(){function l(v){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(t){return[z(t[1]),z(t[2]),z(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[z(t[1]), z(t[2]),z(t[3]),1]}}];this.rgba=[];if(w.Color!==l)return new w.Color(v);if(!(this instanceof l))return new l(v);this.init(v)}l.parse=function(v){return new l(v)};l.prototype.init=function(v){var t,q;if((this.input=v=l.names[v&&v.toLowerCase?v.toLowerCase():""]||v)&&v.stops)this.stops=v.stops.map(function(c){return new l(c[1])});else{if(v&&v.charAt&&"#"===v.charAt()){var h=v.length;v=parseInt(v.substr(1),16);7===h?t=[(v&16711680)>>16,(v&65280)>>8,v&255,1]:4===h&&(t=[(v&3840)>>4|(v&3840)>>8,(v&240)>> 4|v&240,(v&15)<<4|v&15,1])}if(!t)for(q=this.parsers.length;q--&&!t;){var c=this.parsers[q];(h=c.regex.exec(v))&&(t=c.parse(h))}}this.rgba=t||[]};l.prototype.get=function(v){var t=this.input,q=this.rgba;if("undefined"!==typeof this.stops){var h=y(t);h.stops=[].concat(h.stops);this.stops.forEach(function(c,p){h.stops[p]=[h.stops[p][0],c.get(v)]})}else h=q&&b(q[0])?"rgb"===v||!v&&1===q[3]?"rgb("+q[0]+","+q[1]+","+q[2]+")":"a"===v?q[3]:"rgba("+q.join(",")+")":t;return h};l.prototype.brighten=function(v){var t, q=this.rgba;if(this.stops)this.stops.forEach(function(h){h.brighten(v)});else if(b(v)&&0!==v)for(t=0;3>t;t++)q[t]+=z(255*v),0>q[t]&&(q[t]=0),255<q[t]&&(q[t]=255);return this};l.prototype.setOpacity=function(v){this.rgba[3]=v;return this};l.prototype.tweenTo=function(v,t){var q=this.rgba,h=v.rgba;h.length&&q&&q.length?(v=1!==h[3]||1!==q[3],t=(v?"rgba(":"rgb(")+Math.round(h[0]+(q[0]-h[0])*(1-t))+","+Math.round(h[1]+(q[1]-h[1])*(1-t))+","+Math.round(h[2]+(q[2]-h[2])*(1-t))+(v?","+(h[3]+(q[3]-h[3])*(1- t)):"")+")"):t=v.input||"none";return t};l.names={white:"#ffffff",black:"#000000"};return l}();w.Color=l;w.color=l.parse;return l});J(b,"Core/Color/Palette.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),backgroundColor:"#ffffff",neutralColor100:"#000000",neutralColor80:"#333333",neutralColor60:"#666666",neutralColor40:"#999999",neutralColor20:"#cccccc",neutralColor10:"#e6e6e6",neutralColor5:"#f2f2f2",neutralColor3:"#f7f7f7", highlightColor100:"#003399",highlightColor80:"#335cad",highlightColor60:"#6685c2",highlightColor20:"#ccd6eb",highlightColor10:"#e6ebf5",indicatorPositiveLine:"#06b535",indicatorNegativeLine:"#f21313"}});J(b,"Core/Animation/Fx.js",[b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,l){var w=b.win,y=l.isNumber,z=l.objectEach;l=function(){function l(l,t,q){this.pos=NaN;this.options=t;this.elem=l;this.prop=q}l.prototype.dSetter=function(){var l=this.paths,t=l&&l[0];l=l&&l[1];var q=[],h=this.now|| 0;if(1!==h&&t&&l)if(t.length===l.length&&1>h)for(var c=0;c<l.length;c++){for(var p=t[c],k=l[c],G=[],f=0;f<k.length;f++){var H=p[f],x=k[f];y(H)&&y(x)&&("A"!==k[0]||4!==f&&5!==f)?G[f]=H+h*(x-H):G[f]=x}q.push(G)}else q=l;else q=this.toD||[];this.elem.attr("d",q,void 0,!0)};l.prototype.update=function(){var l=this.elem,t=this.prop,q=this.now,h=this.options.step;if(this[t+"Setter"])this[t+"Setter"]();else l.attr?l.element&&l.attr(t,q,null,!0):l.style[t]=q+this.unit;h&&h.call(l,q,this)};l.prototype.run= function(v,t,q){var h=this,c=h.options,p=function(f){return p.stopped?!1:h.step(f)},k=w.requestAnimationFrame||function(f){setTimeout(f,13)},G=function(){for(var f=0;f<l.timers.length;f++)l.timers[f]()||l.timers.splice(f--,1);l.timers.length&&k(G)};v!==t||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=v,this.end=t,this.unit=q,this.now=this.start,this.pos=0,p.elem=this.elem,p.prop=this.prop,p()&&1===l.timers.push(p)&&k(G)):(delete c.curAnim[this.prop],c.complete&&0===Object.keys(c.curAnim).length&& c.complete.call(this.elem))};l.prototype.step=function(l){var t=+new Date,q=this.options,h=this.elem,c=q.complete,p=q.duration,k=q.curAnim;if(h.attr&&!h.element)l=!1;else if(l||t>=p+this.startTime){this.now=this.end;this.pos=1;this.update();var G=k[this.prop]=!0;z(k,function(f){!0!==f&&(G=!1)});G&&c&&c.call(h);l=!1}else this.pos=q.easing((t-this.startTime)/p),this.now=this.start+(this.end-this.start)*this.pos,this.update(),l=!0;return l};l.prototype.initPath=function(l,t,q){function h(f,k){for(;f.length< K;){var n=f[0],u=k[K-f.length];u&&"M"===n[0]&&(f[0]="C"===u[0]?["C",n[1],n[2],n[1],n[2],n[1],n[2]]:["L",n[1],n[2]]);f.unshift(n);G&&f.push(f[f.length-1])}}function c(k,c){for(;k.length<K;)if(c=k[k.length/f-1].slice(),"C"===c[0]&&(c[1]=c[5],c[2]=c[6]),G){var n=k[k.length/f].slice();k.splice(k.length/2,0,c,n)}else k.push(c)}var p=l.startX,k=l.endX;t=t&&t.slice();q=q.slice();var G=l.isArea,f=G?2:1;if(!t)return[q,q];if(p&&k){for(l=0;l<p.length;l++)if(p[l]===k[0]){var H=l;break}else if(p[0]===k[k.length- p.length+l]){H=l;var x=!0;break}else if(p[p.length-1]===k[k.length-p.length+l]){H=p.length-l;break}"undefined"===typeof H&&(t=[])}if(t.length&&y(H)){var K=q.length+H*f;x?(h(t,q),c(q,t)):(h(q,t),c(t,q))}return[t,q]};l.prototype.fillSetter=function(){l.prototype.strokeSetter.apply(this,arguments)};l.prototype.strokeSetter=function(){this.elem.attr(this.prop,b.color(this.start).tweenTo(b.color(this.end),this.pos),null,!0)};l.timers=[];return l}();b.Fx=l;b.timers=l.timers;return l});J(b,"Core/Animation/AnimationUtilities.js", [b["Core/Animation/Fx.js"],b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,l,B){var w=B.defined,z=B.getStyle,C=B.isArray,v=B.isNumber,t=B.isObject,q=B.merge,h=B.objectEach,c=B.pick;B=l.setAnimation=function(f,k){k.renderer.globalAnimation=c(f,k.options.chart.animation,!0)};var p=l.animObject=function(f){return t(f)?q({duration:500,defer:0},f):{duration:f?500:0,defer:0}},k=l.getDeferredAnimation=function(f,k,c){var h=p(k),x=0,r=0;(c?[c]:f.series).forEach(function(n){n=p(n.options.animation); x=k&&w(k.defer)?h.defer:Math.max(x,n.duration+n.defer);r=Math.min(h.duration,n.duration)});f.renderer.forExport&&(x=0);return{defer:Math.max(0,x-r),duration:Math.min(x,r)}},G=l.stop=function(f,k){for(var c=b.timers.length;c--;)b.timers[c].elem!==f||k&&k!==b.timers[c].prop||(b.timers[c].stopped=!0)};return{animate:function(f,k,c){var x,p="",r,n;if(!t(c)){var u=arguments;c={duration:u[2],easing:u[3],complete:u[4]}}v(c.duration)||(c.duration=400);c.easing="function"===typeof c.easing?c.easing:Math[c.easing]|| Math.easeInOutSine;c.curAnim=q(k);h(k,function(e,g){G(f,g);n=new b(f,c,g);r=null;"d"===g&&C(k.d)?(n.paths=n.initPath(f,f.pathArray,k.d),n.toD=k.d,x=0,r=1):f.attr?x=f.attr(g):(x=parseFloat(z(f,g))||0,"opacity"!==g&&(p="px"));r||(r=e);r&&r.match&&r.match("px")&&(r=r.replace(/px/g,""));n.run(x,r,p)})},animObject:p,getDeferredAnimation:k,setAnimation:B,stop:G}});J(b,"Core/Renderer/SVG/SVGElement.js",[b["Core/Animation/AnimationUtilities.js"],b["Core/Renderer/HTML/AST.js"],b["Core/Color/Color.js"],b["Core/Globals.js"], b["Core/Color/Palette.js"],b["Core/Utilities.js"]],function(b,l,B,y,z,C){var v=b.animate,t=b.animObject,q=b.stop,h=y.deg2rad,c=y.doc,p=y.hasTouch,k=y.noop,G=y.svg,f=y.SVG_NS,H=y.win,x=C.attr,K=C.createElement,L=C.css,r=C.defined,n=C.erase,u=C.extend,e=C.fireEvent,g=C.isArray,d=C.isFunction,a=C.isNumber,m=C.isString,E=C.merge,I=C.objectEach,A=C.pick,N=C.pInt,R=C.syncTimeout,w=C.uniqueKey;"";b=function(){function b(){this.height=this.element=void 0;this.opacity=1;this.renderer=void 0;this.SVG_NS=f; this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ");this.width=void 0}b.prototype._defaultGetter=function(a){a=A(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a};b.prototype._defaultSetter=function(a,d,e){e.setAttribute(d,a)};b.prototype.add=function(a){var d=this.renderer,e=this.element;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;"undefined"!==typeof this.textStr&& "text"===this.element.nodeName&&d.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var g=this.zIndexSetter();g||(a?a.element:d.box).appendChild(e);if(this.onAdd)this.onAdd();return this};b.prototype.addClass=function(a,d){var e=d?"":this.attr("class")||"";a=(a||"").split(/ /g).reduce(function(a,d){-1===e.indexOf(d)&&a.push(d);return a},e?[e]:[]).join(" ");a!==e&&this.attr("class",a);return this};b.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform= !1)};b.prototype.align=function(a,d,e){var F,g={};var f=this.renderer;var D=f.alignedObjects;var k,M;if(a){if(this.alignOptions=a,this.alignByTranslate=d,!e||m(e))this.alignTo=F=e||"renderer",n(D,this),D.push(this),e=void 0}else a=this.alignOptions,d=this.alignByTranslate,F=this.alignTo;e=A(e,f[F],f);F=a.align;f=a.verticalAlign;D=(e.x||0)+(a.x||0);var E=(e.y||0)+(a.y||0);"right"===F?k=1:"center"===F&&(k=2);k&&(D+=(e.width-(a.width||0))/k);g[d?"translateX":"x"]=Math.round(D);"bottom"===f?M=1:"middle"=== f&&(M=2);M&&(E+=(e.height-(a.height||0))/M);g[d?"translateY":"y"]=Math.round(E);this[this.placed?"animate":"attr"](g);this.placed=!0;this.alignAttr=g;return this};b.prototype.alignSetter=function(a){var d={left:"start",center:"middle",right:"end"};d[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",d[a]))};b.prototype.animate=function(a,d,e){var F=this,g=t(A(d,this.renderer.globalAnimation,!0));d=g.defer;A(c.hidden,c.msHidden,c.webkitHidden,!1)&&(g.duration=0);0!==g.duration?(e&&(g.complete= e),R(function(){F.element&&v(F,a,g)},d)):(this.attr(a,void 0,e),I(a,function(a,d){g.step&&g.step.call(this,a,{prop:d,pos:1,elem:this})},this));return this};b.prototype.applyTextOutline=function(a){var d=this.element;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(d.style.fill)));var e=a.split(" ");a=e[e.length-1];if((e=e[0])&&"none"!==e&&y.svg){this.fakeTS=!0;this.ySetter=this.xSetter;e=e.replace(/(^[\d\.]+)(.*?)$/g,function(a,d,e){return 2*Number(d)+e});this.removeTextOutline(); var g=c.createElementNS(f,"tspan");x(g,{"class":"highcharts-text-outline",fill:a,stroke:a,"stroke-width":e,"stroke-linejoin":"round"});[].forEach.call(d.childNodes,function(a){var d=a.cloneNode(!0);d.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(a){return d.removeAttribute(a)});g.appendChild(d)});a=c.createElementNS(f,"tspan");a.textContent="\u200b";x(a,{x:d.getAttribute("x"),y:d.getAttribute("y")});g.appendChild(a);d.insertBefore(g,d.firstChild)}};b.prototype.attr=function(a, d,e,g){var F=this.element,m,D=this,n,f,k=this.symbolCustomAttribs;if("string"===typeof a&&"undefined"!==typeof d){var E=a;a={};a[E]=d}"string"===typeof a?D=(this[a+"Getter"]||this._defaultGetter).call(this,a,F):(I(a,function(d,e){n=!1;g||q(this,e);this.symbolName&&-1!==k.indexOf(e)&&(m||(this.symbolAttr(a),m=!0),n=!0);!this.rotation||"x"!==e&&"y"!==e||(this.doTransform=!0);n||(f=this[e+"Setter"]||this._defaultSetter,f.call(this,d,e,F),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(e)&& this.updateShadows(e,d,f))},this),this.afterSetters());e&&e.call(this);return D};b.prototype.clip=function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")};b.prototype.crisp=function(a,d){d=d||a.strokeWidth||0;var e=Math.round(d)%2/2;a.x=Math.floor(a.x||this.x||0)+e;a.y=Math.floor(a.y||this.y||0)+e;a.width=Math.floor((a.width||this.width||0)-2*e);a.height=Math.floor((a.height||this.height||0)-2*e);r(a.strokeWidth)&&(a.strokeWidth=d);return a};b.prototype.complexColor= function(a,d,F){var m=this.renderer,n,f,D,k,u,c,M,O,h,A,x=[],p;e(this.renderer,"complexColor",{args:arguments},function(){a.radialGradient?f="radialGradient":a.linearGradient&&(f="linearGradient");if(f){D=a[f];u=m.gradients;c=a.stops;h=F.radialReference;g(D)&&(a[f]=D={x1:D[0],y1:D[1],x2:D[2],y2:D[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===f&&h&&!r(D.gradientUnits)&&(k=D,D=E(D,m.getRadialAttr(h,k),{gradientUnits:"userSpaceOnUse"}));I(D,function(a,d){"id"!==d&&x.push(d,a)});I(c,function(a){x.push(a)}); x=x.join(",");if(u[x])A=u[x].attr("id");else{D.id=A=w();var e=u[x]=m.createElement(f).attr(D).add(m.defs);e.radAttr=k;e.stops=[];c.forEach(function(a){0===a[1].indexOf("rgba")?(n=B.parse(a[1]),M=n.get("rgb"),O=n.get("a")):(M=a[1],O=1);a=m.createElement("stop").attr({offset:a[0],"stop-color":M,"stop-opacity":O}).add(e);e.stops.push(a)})}p="url("+m.url+"#"+A+")";F.setAttribute(d,p);F.gradient=x;a.toString=function(){return p}}})};b.prototype.css=function(a){var d=this.styles,e={},g=this.element,m="", n=!d,D=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);d&&I(a,function(a,F){d&&d[F]!==a&&(e[F]=a,n=!0)});if(n){d&&(a=u(d,e));if(a)if(null===a.width||"auto"===a.width)delete this.textWidth;else if("text"===g.nodeName.toLowerCase()&&a.width)var f=this.textWidth=N(a.width);this.styles=a;f&&!G&&this.renderer.forExport&&delete a.width;if(g.namespaceURI===this.SVG_NS){var k=function(a,d){return"-"+d.toLowerCase()};I(a,function(a,d){-1===D.indexOf(d)&&(m+=d.replace(/([A-Z])/g,k)+":"+ a+";")});m&&x(g,"style",m)}else L(g,a);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this};b.prototype.dashstyleSetter=function(a){var d=this["stroke-width"];"inherit"===d&&(d=1);if(a=a&&a.toLowerCase()){var e=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=e.length;a--;)e[a]=""+N(e[a])*A(d,NaN);a=e.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}};b.prototype.destroy=function(){var a=this,d=a.element||{},e=a.renderer,g=e.isSVG&&"SPAN"===d.nodeName&&a.parentGroup||void 0,m=d.ownerSVGElement;d.onclick=d.onmouseout=d.onmouseover=d.onmousemove=d.point=null;q(a);if(a.clipPath&&m){var f=a.clipPath;[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"),function(a){-1<a.getAttribute("clip-path").indexOf(f.element.id)&& a.removeAttribute("clip-path")});a.clipPath=f.destroy()}if(a.stops){for(m=0;m<a.stops.length;m++)a.stops[m].destroy();a.stops.length=0;a.stops=void 0}a.safeRemoveChild(d);for(e.styledMode||a.destroyShadows();g&&g.div&&0===g.div.childNodes.length;)d=g.parentGroup,a.safeRemoveChild(g.div),delete g.div,g=d;a.alignTo&&n(e.alignedObjects,a);I(a,function(d,e){a[e]&&a[e].parentGroup===a&&a[e].destroy&&a[e].destroy();delete a[e]})};b.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)}, this);this.shadows=void 0};b.prototype.destroyTextPath=function(a,d){var e=a.getElementsByTagName("text")[0];if(e){if(e.removeAttribute("dx"),e.removeAttribute("dy"),d.element.setAttribute("id",""),this.textPathWrapper&&e.getElementsByTagName("textPath").length){for(a=this.textPathWrapper.element.childNodes;a.length;)e.appendChild(a[0]);e.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())};b.prototype.dSetter=function(a,d,e){g(a)&&("string"===typeof a[0]&&(a=this.renderer.pathToSegments(a)),this.pathArray=a,a=a.reduce(function(a,d,e){return d&&d.join?(e?a+" ":"")+d.join(" "):(d||"").toString()},""));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[d]!==a&&(e.setAttribute(d,a),this[d]=a)};b.prototype.fadeOut=function(a){var d=this;d.animate({opacity:0},{duration:A(a,150),complete:function(){d.attr({y:-9999}).hide()}})};b.prototype.fillSetter= function(a,d,e){"string"===typeof a?e.setAttribute(d,a):a&&this.complexColor(a,d,e)};b.prototype.getBBox=function(a,e){var g,m=this.renderer,n=this.element,f=this.styles,D=this.textStr,k=m.cache,E=m.cacheKeys,c=n.namespaceURI===this.SVG_NS;e=A(e,this.rotation,0);var O=m.styledMode?n&&b.prototype.getStyle.call(n,"font-size"):f&&f.fontSize;if(r(D)){var I=D.toString();-1===I.indexOf("<")&&(I=I.replace(/[0-9]/g,"0"));I+=["",e,O,this.textWidth,f&&f.textOverflow,f&&f.fontWeight].join()}I&&!a&&(g=k[I]); if(!g){if(c||m.forExport){try{var x=this.fakeTS&&function(a){var d=n.querySelector(".highcharts-text-outline");d&&L(d,{display:a})};d(x)&&x("none");g=n.getBBox?u({},n.getBBox()):{width:n.offsetWidth,height:n.offsetHeight};d(x)&&x("")}catch(ca){""}if(!g||0>g.width)g={width:0,height:0}}else g=this.htmlGetBBox();m.isSVG&&(a=g.width,m=g.height,c&&(g.height=m={"11px,17":14,"13px,20":16}[f&&f.fontSize+","+Math.round(m)]||m),e&&(f=e*h,g.width=Math.abs(m*Math.sin(f))+Math.abs(a*Math.cos(f)),g.height=Math.abs(m* Math.cos(f))+Math.abs(a*Math.sin(f))));if(I&&0<g.height){for(;250<E.length;)delete k[E.shift()];k[I]||E.push(I);k[I]=g}}return g};b.prototype.getStyle=function(a){return H.getComputedStyle(this.element||this,"").getPropertyValue(a)};b.prototype.hasClass=function(a){return-1!==(""+this.attr("class")).split(" ").indexOf(a)};b.prototype.hide=function(a){a?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this};b.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}};b.prototype.init= function(a,d){this.element="span"===d?K(d):c.createElementNS(this.SVG_NS,d);this.renderer=a;e(this,"afterInit")};b.prototype.invert=function(a){this.inverted=a;this.updateTransform();return this};b.prototype.on=function(a,d){var e,g,m=this.element,n;p&&"click"===a?(m.ontouchstart=function(a){e=a.touches[0].clientX;g=a.touches[0].clientY},m.ontouchend=function(a){e&&4<=Math.sqrt(Math.pow(e-a.changedTouches[0].clientX,2)+Math.pow(g-a.changedTouches[0].clientY,2))||d.call(m,a);n=!0;!1!==a.cancelable&& a.preventDefault()},m.onclick=function(a){n||d.call(m,a)}):m["on"+a]=d;return this};b.prototype.opacitySetter=function(a,d,e){this.opacity=a=Number(Number(a).toFixed(3));e.setAttribute(d,a)};b.prototype.removeClass=function(a){return this.attr("class",(""+this.attr("class")).replace(m(a)?new RegExp("(^| )"+a+"( |$)"):a," ").replace(/ +/g," ").trim())};b.prototype.removeTextOutline=function(){var a=this.element.querySelector("tspan.highcharts-text-outline");a&&this.safeRemoveChild(a)};b.prototype.safeRemoveChild= function(a){var d=a.parentNode;d&&d.removeChild(a)};b.prototype.setRadialReference=function(a){var d=this.element.gradient&&this.renderer.gradients[this.element.gradient];this.element.radialReference=a;d&&d.radAttr&&d.animate(this.renderer.getRadialAttr(a,d.radAttr));return this};b.prototype.setTextPath=function(d,e){var g=this.element,m=this.text?this.text.element:g,n={textAnchor:"text-anchor"},f=!1,D=this.textPathWrapper,u=!D;e=E(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}}, e);var c=l.filterUserAttributes(e.attributes);if(d&&e&&e.enabled){D&&null===D.element.parentNode?(u=!0,D=D.destroy()):D&&this.removeTextOutline.call(D.parentGroup);this.options&&this.options.padding&&(c.dx=-this.options.padding);D||(this.textPathWrapper=D=this.renderer.createElement("textPath"),f=!0);var h=D.element;(e=d.element.getAttribute("id"))||d.element.setAttribute("id",e=w());if(u)for(m.setAttribute("y",0),a(c.dx)&&m.setAttribute("x",-c.dx),d=[].slice.call(m.childNodes),u=0;u<d.length;u++){var A= d[u];A.nodeType!==Node.TEXT_NODE&&"tspan"!==A.nodeName||h.appendChild(A)}f&&D&&D.add({element:m});h.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+e);r(c.dy)&&(h.parentNode.setAttribute("dy",c.dy),delete c.dy);r(c.dx)&&(h.parentNode.setAttribute("dx",c.dx),delete c.dx);I(c,function(a,d){h.setAttribute(n[d]||d,a)});g.removeAttribute("transform");this.removeTextOutline.call(D);this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline= this.updateTransform=k}else D&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(g,d),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this};b.prototype.shadow=function(a,d,e){var g=[],m=this.element,F=!1,D=this.oldShadowOptions;var n={color:z.neutralColor100,offsetX:1,offsetY:1,opacity:.15,width:3};var f;!0===a?f=n:"object"===typeof a&&(f=u(n,a));f&&(f&&D&&I(f,function(a,d){a!==D[d]&&(F=!0)}),F&& this.destroyShadows(),this.oldShadowOptions=f);if(!f)this.destroyShadows();else if(!this.shadows){var k=f.opacity/f.width;var E=this.parentInverted?"translate(-1,-1)":"translate("+f.offsetX+", "+f.offsetY+")";for(n=1;n<=f.width;n++){var c=m.cloneNode(!1);var h=2*f.width+1-2*n;x(c,{stroke:a.color||z.neutralColor100,"stroke-opacity":k*n,"stroke-width":h,transform:E,fill:"none"});c.setAttribute("class",(c.getAttribute("class")||"")+" highcharts-shadow");e&&(x(c,"height",Math.max(x(c,"height")-h,0)), c.cutHeight=h);d?d.element.appendChild(c):m.parentNode&&m.parentNode.insertBefore(c,m);g.push(c)}this.shadows=g}return this};b.prototype.show=function(a){return this.attr({visibility:a?"inherit":"visible"})};b.prototype.strokeSetter=function(a,d,e){this[d]=a;this.stroke&&this["stroke-width"]?(b.prototype.fillSetter.call(this,this.stroke,"stroke",e),e.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===d&&0===a&&this.hasStroke?(e.removeAttribute("stroke"),this.hasStroke= !1):this.renderer.styledMode&&this["stroke-width"]&&(e.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};b.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var a=this.getStyle("stroke-width"),d=0;if(a.indexOf("px")===a.length-2)d=N(a);else if(""!==a){var e=c.createElementNS(f,"rect");x(e,{width:a,"stroke-width":0});this.element.parentNode.appendChild(e);d=e.getBBox().width;e.parentNode.removeChild(e)}return d};b.prototype.symbolAttr= function(a){var d=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(e){d[e]=A(a[e],d[e])});d.attr({d:d.renderer.symbols[d.symbolName](d.x,d.y,d.width,d.height,d)})};b.prototype.textSetter=function(a){a!==this.textStr&&(delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))};b.prototype.titleSetter=function(a){var d=this.element,e=d.getElementsByTagName("title")[0]||c.createElementNS(this.SVG_NS,"title");d.insertBefore?d.insertBefore(e, d.firstChild):d.appendChild(e);e.textContent=String(A(a,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")};b.prototype.toFront=function(){var a=this.element;a.parentNode.appendChild(a);return this};b.prototype.translate=function(a,d){return this.attr({translateX:a,translateY:d})};b.prototype.updateShadows=function(a,d,e){var g=this.shadows;if(g)for(var m=g.length;m--;)e.call(g[m],"height"===a?Math.max(d-(g[m].cutHeight||0),0):"d"===a?this.d:d,a,g[m])};b.prototype.updateTransform= function(){var a=this.translateX||0,d=this.translateY||0,e=this.scaleX,g=this.scaleY,m=this.inverted,n=this.rotation,D=this.matrix,f=this.element;m&&(a+=this.width,d+=this.height);a=["translate("+a+","+d+")"];r(D)&&a.push("matrix("+D.join(",")+")");m?a.push("rotate(90) scale(-1,1)"):n&&a.push("rotate("+n+" "+A(this.rotationOriginX,f.getAttribute("x"),0)+" "+A(this.rotationOriginY,f.getAttribute("y")||0)+")");(r(e)||r(g))&&a.push("scale("+A(e,1)+" "+A(g,1)+")");a.length&&f.setAttribute("transform", a.join(" "))};b.prototype.visibilitySetter=function(a,d,e){"inherit"===a?e.removeAttribute(d):this[d]!==a&&e.setAttribute(d,a);this[d]=a};b.prototype.xGetter=function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)};b.prototype.zIndexSetter=function(a,d){var e=this.renderer,g=this.parentGroup,m=(g||e).element||e.box,n=this.element,D=!1;e=m===e.box;var f=this.added;var k;r(a)?(n.setAttribute("data-z-index",a),a=+a,this[d]===a&&(f=!1)):r(this[d])&& n.removeAttribute("data-z-index");this[d]=a;if(f){(a=this.zIndex)&&g&&(g.handleZ=!0);d=m.childNodes;for(k=d.length-1;0<=k&&!D;k--){g=d[k];f=g.getAttribute("data-z-index");var E=!r(f);if(g!==n)if(0>a&&E&&!e&&!k)m.insertBefore(n,d[k]),D=!0;else if(N(f)<=a||E&&(!r(a)||0<=a))m.insertBefore(n,d[k+1]||null),D=!0}D||(m.insertBefore(n,d[e?3:0]||null),D=!0)}return D};return b}();b.prototype["stroke-widthSetter"]=b.prototype.strokeSetter;b.prototype.yGetter=b.prototype.xGetter;b.prototype.matrixSetter=b.prototype.rotationOriginXSetter= b.prototype.rotationOriginYSetter=b.prototype.rotationSetter=b.prototype.scaleXSetter=b.prototype.scaleYSetter=b.prototype.translateXSetter=b.prototype.translateYSetter=b.prototype.verticalAlignSetter=function(a,d){this[d]=a;this.doTransform=!0};y.SVGElement=b;return y.SVGElement});J(b,"Core/Renderer/SVG/SVGLabel.js",[b["Core/Renderer/SVG/SVGElement.js"],b["Core/Utilities.js"]],function(b,l){function w(c,h){v(c)?c!==this[h]&&(this[h]=c,this.updateTextPadding()):this[h]=void 0}var y=this&&this.__extends|| function(){var c=function(h,k){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,f){k.__proto__=f}||function(k,f){for(var c in f)f.hasOwnProperty(c)&&(k[c]=f[c])};return c(h,k)};return function(h,k){function p(){this.constructor=h}c(h,k);h.prototype=null===k?Object.create(k):(p.prototype=k.prototype,new p)}}(),z=l.defined,C=l.extend,v=l.isNumber,t=l.merge,q=l.pick,h=l.removeEvent;return function(c){function p(k,h,f,H,x,K,q,r,n,u){var e=c.call(this)||this;e.paddingSetter=w;e.paddingLeftSetter= w;e.paddingRightSetter=w;e.init(k,"g");e.textStr=h;e.x=f;e.y=H;e.anchorX=K;e.anchorY=q;e.baseline=n;e.className=u;"button"!==u&&e.addClass("highcharts-label");u&&e.addClass("highcharts-"+u);e.text=k.text("",0,0,r).attr({zIndex:1});if("string"===typeof x){var g=/^url\((.*?)\)$/.test(x);if(e.renderer.symbols[x]||g)e.symbolKey=x}e.bBox=p.emptyBBox;e.padding=3;e.baselineOffset=0;e.needsBox=k.styledMode||g;e.deferredAttr={};e.alignFactor=0;return e}y(p,c);p.prototype.alignSetter=function(k){k={left:0, center:.5,right:1}[k];k!==this.alignFactor&&(this.alignFactor=k,this.bBox&&v(this.xSetting)&&this.attr({x:this.xSetting}))};p.prototype.anchorXSetter=function(k,c){this.anchorX=k;this.boxAttr(c,Math.round(k)-this.getCrispAdjust()-this.xSetting)};p.prototype.anchorYSetter=function(k,c){this.anchorY=k;this.boxAttr(c,k-this.ySetting)};p.prototype.boxAttr=function(k,c){this.box?this.box.attr(k,c):this.deferredAttr[k]=c};p.prototype.css=function(k){if(k){var c={};k=t(k);p.textProps.forEach(function(f){"undefined"!== typeof k[f]&&(c[f]=k[f],delete k[f])});this.text.css(c);var f="width"in c;"fontSize"in c||"fontWeight"in c?this.updateTextPadding():f&&this.updateBoxSize()}return b.prototype.css.call(this,k)};p.prototype.destroy=function(){h(this.element,"mouseenter");h(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());b.prototype.destroy.call(this)};p.prototype.fillSetter=function(k,c){k&&(this.needsBox=!0);this.fill=k;this.boxAttr(c,k)};p.prototype.getBBox=function(){var k= this.bBox,c=this.padding,f=q(this.paddingLeft,c);return{width:this.width,height:this.height,x:k.x-f,y:k.y-c}};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(k){this.heightSetting=k};p.prototype.on=function(k,c){var f=this,h=f.text,x=h&&"SPAN"===h.element.tagName?h:void 0;if(x){var p=function(h){("mouseenter"===k||"mouseleave"===k)&&h.relatedTarget instanceof Element&&(f.element.compareDocumentPosition(h.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY||x.element.compareDocumentPosition(h.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||c.call(f.element,h)};x.on(k,p)}b.prototype.on.call(f,k,p||c);return f};p.prototype.onAdd=function(){var k=this.textStr;this.text.add(this);this.attr({text:z(k)?k:"",x:this.x,y:this.y});this.box&&z(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};p.prototype.rSetter=function(k,c){this.boxAttr(c, k)};p.prototype.shadow=function(k){k&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(k));return this};p.prototype.strokeSetter=function(k,c){this.stroke=k;this.boxAttr(c,k)};p.prototype["stroke-widthSetter"]=function(k,c){k&&(this.needsBox=!0);this["stroke-width"]=k;this.boxAttr(c,k)};p.prototype["text-alignSetter"]=function(k){this.textAlign=k};p.prototype.textSetter=function(k){"undefined"!==typeof k&&this.text.attr({text:k});this.updateTextPadding()};p.prototype.updateBoxSize= function(){var k=this.text.element.style,c={},f=this.padding,h=this.bBox=v(this.widthSetting)&&v(this.heightSetting)&&!this.textAlign||!z(this.text.textStr)?p.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth();this.height=(this.heightSetting||h.height||0)+2*f;this.baselineOffset=f+Math.min(this.renderer.fontMetrics(k&&k.fontSize,this.text).b,h.height||Infinity);this.needsBox&&(this.box||(k=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),k.addClass(("button"=== this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),k.add(this)),k=this.getCrispAdjust(),c.x=k,c.y=(this.baseline?-this.baselineOffset:0)+k,c.width=Math.round(this.width),c.height=Math.round(this.height),this.box.attr(C(c,this.deferredAttr)),this.deferredAttr={})};p.prototype.updateTextPadding=function(){var c=this.text;this.updateBoxSize();var h=this.baseline?0:this.baselineOffset,f=q(this.paddingLeft,this.padding);z(this.widthSetting)&&this.bBox&& ("center"===this.textAlign||"right"===this.textAlign)&&(f+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(f!==c.x||h!==c.y)c.attr("x",f),c.hasBoxWidthChanged&&(this.bBox=c.getBBox(!0)),"undefined"!==typeof h&&c.attr("y",h);c.x=f;c.y=h};p.prototype.widthSetter=function(c){this.widthSetting=v(c)?c:void 0};p.prototype.getPaddedWidth=function(){var c=this.padding,h=q(this.paddingLeft,c);c=q(this.paddingRight,c);return(this.widthSetting||this.bBox.width||0)+h+c};p.prototype.xSetter= function(c){this.x=c;this.alignFactor&&(c-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0);this.xSetting=Math.round(c);this.attr("translateX",this.xSetting)};p.prototype.ySetter=function(c){this.ySetting=this.y=Math.round(c);this.attr("translateY",this.ySetting)};p.emptyBBox={width:0,height:0,x:0,y:0};p.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" ");return p}(b)});J(b,"Core/Renderer/SVG/TextBuilder.js", [b["Core/Globals.js"],b["Core/Utilities.js"],b["Core/Renderer/HTML/AST.js"]],function(b,l,B){var w=b.doc,z=b.SVG_NS,C=l.attr,v=l.isString,t=l.objectEach,q=l.pick;return function(){function h(c){var h=c.styles;this.renderer=c.renderer;this.svgElement=c;this.width=c.textWidth;this.textLineHeight=h&&h.lineHeight;this.textOutline=h&&h.textOutline;this.ellipsis=!(!h||"ellipsis"!==h.textOverflow);this.noWrap=!(!h||"nowrap"!==h.whiteSpace);this.fontSize=h&&h.fontSize}h.prototype.buildSVG=function(){var c= this.svgElement,h=c.element,k=c.renderer,b=q(c.textStr,"").toString(),f=-1!==b.indexOf("<"),H=h.childNodes,x=H.length;k=this.width&&!c.added&&k.box;var K=/<br.*?>/g;var l=[b,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(l!==c.textCache){c.textCache=l;for(delete c.actualWidth;x--;)h.removeChild(H[x]);f||this.ellipsis||this.width||-1!==b.indexOf(" ")&&(!this.noWrap||K.test(b))?""!==b&&(k&&k.appendChild(h),b=new B(b),this.modifyTree(b.nodes),b.addToDOM(c.element), this.modifyDOM(),this.ellipsis&&-1!==(h.textContent||"").indexOf("\u2026")&&c.attr("title",this.unescapeEntities(c.textStr||"",["&lt;","&gt;"])),k&&k.removeChild(h)):h.appendChild(w.createTextNode(this.unescapeEntities(b)));v(this.textOutline)&&c.applyTextOutline&&c.applyTextOutline(this.textOutline)}};h.prototype.modifyDOM=function(){var c=this,h=this.svgElement,k=C(h.element,"x");[].forEach.call(h.element.querySelectorAll("tspan.highcharts-br"),function(f){f.nextSibling&&f.previousSibling&&C(f, {dy:c.getLineHeight(f.nextSibling),x:k})});var b=this.width||0;if(b){var f=function(f,p){var x=f.textContent||"",r=x.replace(/([^\^])-/g,"$1- ").split(" "),n=!c.noWrap&&(1<r.length||1<h.element.childNodes.length),u=c.getLineHeight(p),e=0,g=h.actualWidth;if(c.ellipsis)x&&c.truncate(f,x,void 0,0,Math.max(0,b-parseInt(c.fontSize||12,10)),function(d,a){return d.substring(0,a)+"\u2026"});else if(n){x=[];for(n=[];p.firstChild&&p.firstChild!==f;)n.push(p.firstChild),p.removeChild(p.firstChild);for(;r.length;)r.length&& !c.noWrap&&0<e&&(x.push(f.textContent||""),f.textContent=r.join(" ").replace(/- /g,"-")),c.truncate(f,void 0,r,0===e?g||0:0,b,function(d,a){return r.slice(0,a).join(" ").replace(/- /g,"-")}),g=h.actualWidth,e++;n.forEach(function(d){p.insertBefore(d,f)});x.forEach(function(d){p.insertBefore(w.createTextNode(d),f);d=w.createElementNS(z,"tspan");d.textContent="\u200b";C(d,{dy:u,x:k});p.insertBefore(d,f)})}},H=function(c){[].slice.call(c.childNodes).forEach(function(k){k.nodeType===Node.TEXT_NODE?f(k, c):(-1!==k.className.baseVal.indexOf("highcharts-br")&&(h.actualWidth=0),H(k))})};H(h.element)}};h.prototype.getLineHeight=function(c){var h;c=c.nodeType===Node.TEXT_NODE?c.parentElement:c;this.renderer.styledMode||(h=c&&/(px|em)$/.test(c.style.fontSize)?c.style.fontSize:this.fontSize||this.renderer.style.fontSize||12);return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(h,c||this.svgElement.element).h};h.prototype.modifyTree=function(c){var h=this,k=function(p, f){var H=p.tagName,x=h.renderer.styledMode,b=p.attributes||{};if("b"===H||"strong"===H)x?b["class"]="highcharts-strong":b.style="font-weight:bold;"+(b.style||"");else if("i"===H||"em"===H)x?b["class"]="highcharts-emphasized":b.style="font-style:italic;"+(b.style||"");v(b.style)&&(b.style=b.style.replace(/(;| |^)color([ :])/,"$1fill$2"));"br"===H&&(b["class"]="highcharts-br",p.textContent="\u200b",(f=c[f+1])&&f.textContent&&(f.textContent=f.textContent.replace(/^ +/gm,"")));"#text"!==H&&"a"!==H&&(p.tagName= "tspan");p.attributes=b;p.children&&p.children.filter(function(f){return"#text"!==f.tagName}).forEach(k)};for(c.forEach(k);c[0]&&"tspan"===c[0].tagName&&!c[0].children;)c.splice(0,1)};h.prototype.truncate=function(c,h,k,b,f,H){var x=this.svgElement,p=x.renderer,q=x.rotation,r=[],n=k?1:0,u=(h||k||"").length,e=u,g,d=function(a,d){d=d||a;var e=c.parentNode;if(e&&"undefined"===typeof r[d])if(e.getSubStringLength)try{r[d]=b+e.getSubStringLength(0,k?d+1:d)}catch(A){""}else p.getSpanWidth&&(c.textContent= H(h||k,a),r[d]=b+p.getSpanWidth(x,c));return r[d]};x.rotation=0;var a=d(c.textContent.length);if(b+a>f){for(;n<=u;)e=Math.ceil((n+u)/2),k&&(g=H(k,e)),a=d(e,g&&g.length-1),n===u?n=u+1:a>f?u=e-1:n=e;0===u?c.textContent="":h&&u===h.length-1||(c.textContent=g||H(h||k,e))}k&&k.splice(0,e);x.actualWidth=a;x.rotation=q};h.prototype.unescapeEntities=function(c,h){t(this.renderer.escapes,function(k,p){h&&-1!==h.indexOf(k)||(c=c.toString().replace(new RegExp(k,"g"),p))});return c};return h}()});J(b,"Core/Renderer/SVG/SVGRenderer.js", [b["Core/Color/Color.js"],b["Core/Globals.js"],b["Core/Color/Palette.js"],b["Core/Renderer/SVG/SVGElement.js"],b["Core/Renderer/SVG/SVGLabel.js"],b["Core/Renderer/HTML/AST.js"],b["Core/Renderer/SVG/TextBuilder.js"],b["Core/Utilities.js"]],function(b,l,B,y,z,C,v,t){var q=t.addEvent,h=t.attr,c=t.createElement,p=t.css,k=t.defined,G=t.destroyObjectProperties,f=t.extend,H=t.isArray,x=t.isNumber,K=t.isObject,L=t.isString,r=t.merge,n=t.pick,u=t.pInt,e=t.uniqueKey,g=l.charts,d=l.deg2rad,a=l.doc,m=l.isFirefox, E=l.isMS,I=l.isWebKit;