!function(t,e){"object"==typeof module&&module.exports?(e.default=e,module.exports=t.document?e(t):e):"function"==typeof define&&define.amd?define(function(){return e(t)}):t.Highcharts=e(t)}("undefined"!=typeof window?window:this,function(t){var e,i,s,n,o,r,a,h,l=(e=void 0===t?"undefined"!=typeof window?window:{}:t,i=e.document,s=e.navigator&&e.navigator.userAgent||"",n=i&&i.createElementNS&&!!i.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o=/(edge|msie|trident)/i.test(s)&&!e.opera,r=-1!==s.indexOf("Firefox"),a=-1!==s.indexOf("Chrome"),h=r&&4>parseInt(s.split("Firefox/")[1],10),e.Highcharts?e.Highcharts.error(16,!0):{product:"Highcharts",version:"7.0.3",deg2rad:2*Math.PI/360,doc:i,hasBidiBug:h,hasTouch:i&&void 0!==i.documentElement.ontouchstart,isMS:o,isWebKit:-1!==s.indexOf("AppleWebKit"),isFirefox:r,isChrome:a,isSafari:!a&&-1!==s.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(s),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:n,win:e,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]});!function(t){t.timers=[];var e=t.charts,i=t.doc,s=t.win;t.error=function(e,i,n){var o=t.isNumber(e)?"Highcharts error #"+e+": www.highcharts.com/errors/"+e:e;if(n&&t.fireEvent(n,"displayError",{code:e}),i)throw Error(o);s.console&&console.log(o)},t.Fx=function(t,e,i){this.options=e,this.elem=t,this.prop=i},t.Fx.prototype={dSetter:function(){var t,e=this.paths[0],i=this.paths[1],s=[],n=this.now,o=e.length;if(1===n)s=this.toD;else if(o===i.length&&1>n)for(;o--;)t=parseFloat(e[o]),s[o]=isNaN(t)?i[o]:n*parseFloat(i[o]-t)+t;else s=i;this.elem.attr("d",s,null,!0)},update:function(){var t=this.elem,e=this.prop,i=this.now,s=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,s&&s.call(t,i,this)},run:function(e,i,n){var o=this,r=o.options,a=function(t){return!a.stopped&&o.step(t)},h=s.requestAnimationFrame||function(t){setTimeout(t,13)},l=function(){for(var e=0;e=a+this.startTime?(this.now=this.end,this.pos=1,this.update(),i=h[this.prop]=!0,t.objectEach(h,function(t){!0!==t&&(i=!1)}),i&&r&&r.call(o),e=!1):(this.pos=n.easing((s-this.startTime)/a),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e},initPath:function(e,i,s){function n(t){var e,i;for(c=t.length;c--;)e="M"===t[c]||"L"===t[c],i=/[a-zA-Z]/.test(t[c+3]),e&&i&&t.splice(c+1,0,t[c+1],t[c+2],t[c+1],t[c+2])}function o(t,e){for(;t.lengtht&&-1/0=s&&(i=[1/s]))),n=0;n=e||!o&&r<=(i[n]+(i[n+1]||i[n]))/2));n++);return t.correctFloat(a*s,-Math.round(Math.log(.001)/Math.LN10))},t.stableSort=function(t,e){var i,s,n=t.length;for(s=0;si&&(i=t[e]);return i},t.destroyObjectProperties=function(e,i){t.objectEach(e,function(t,s){t&&t!==i&&t.destroy&&t.destroy(),delete e[s]})},t.discardElement=function(e){var i=t.garbageBin;i||(i=t.createElement("div")),e&&i.appendChild(e),i.innerHTML=""},t.correctFloat=function(t,e){return parseFloat(t.toPrecision(e||14))},t.setAnimation=function(e,i){i.renderer.globalAnimation=t.pick(e,i.options.chart.animation,!0)},t.animObject=function(e){return t.isObject(e)?t.merge(e):{duration:e?500:0}},t.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},t.numberFormat=function(e,i,s,n){e=+e||0,i=+i;var o,r,a=t.defaultOptions.lang,h=(e.toString().split(".")[1]||"").split("e")[0].length,l=e.toString().split("e");return-1===i?i=Math.min(h,20):t.isNumber(i)?i&&l[1]&&0>l[1]&&(0<=(o=i+ +l[1])?(l[0]=(+l[0]).toExponential(o).split("e")[0],i=o):(l[0]=l[0].split(".")[0]||0,e=20>i?(l[0]*Math.pow(10,l[1])).toFixed(i):0,l[1]=0)):i=2,r=(Math.abs(l[1]?l[0]:e)+Math.pow(10,-Math.max(i,h)-1)).toFixed(i),o=3<(h=String(t.pInt(r))).length?h.length%3:0,s=t.pick(s,a.decimalPoint),n=t.pick(n,a.thousandsSep),e=(0>e?"-":"")+(o?h.substr(0,o)+n:""),e+=h.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+n),i&&(e+=s+r.slice(-i)),l[1]&&0!=+e&&(e+="e"+l[1]),e},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getStyle=function(e,i,n){return"width"===i?Math.max(0,Math.min(e.offsetWidth,e.scrollWidth,e.getBoundingClientRect&&"none"===t.getStyle(e,"transform",!1)?Math.floor(e.getBoundingClientRect().width):1/0)-t.getStyle(e,"padding-left")-t.getStyle(e,"padding-right")):"height"===i?Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-t.getStyle(e,"padding-top")-t.getStyle(e,"padding-bottom")):(s.getComputedStyle||t.error(27,!0),(e=s.getComputedStyle(e,void 0))&&(e=e.getPropertyValue(i),t.pick(n,"opacity"!==i)&&(e=t.pInt(e))),e)},t.inArray=function(t,e,i){return e.indexOf(t,i)},t.find=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,s=t.length;for(i=0;i>16,(65280&e)>>8,255&e,1]:4===i&&(s=[(3840&e)>>4|(3840&e)>>8,(240&e)>>4|240&e,(15&e)<<4|15&e,1])),!s)for(n=this.parsers.length;n--&&!s;)(i=(o=this.parsers[n]).regex.exec(e))&&(s=o.parse(i));this.rgba=s||[]},get:function(t){var s,n=this.input,o=this.rgba;return this.stops?((s=i(n)).stops=[].concat(s.stops),this.stops.forEach(function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]})):s=o&&e(o[0])?"rgb"===t||!t&&1===o[3]?"rgb("+o[0]+","+o[1]+","+o[2]+")":"a"===t?o[3]:"rgba("+o.join(",")+")":n,s},brighten:function(t){var i,n=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(e(t)&&0!==t)for(i=0;3>i;i++)n[i]+=s(255*t),0>n[i]&&(n[i]=0),255s.width)&&(s={width:0,height:0})}else s=this.htmlGetBBox();if(h.isSVG&&(t=s.width,h=s.height,x&&(s.height=h={"11px,17":14,"13px,20":16}[p&&p.fontSize+","+Math.round(h)]||h),i&&(s.width=Math.abs(h*Math.sin(n))+Math.abs(t*Math.cos(n)),s.height=Math.abs(h*Math.cos(n))+Math.abs(t*Math.sin(n)))),a&&0]*>/g,"").replace(/</g,"<").replace(/>/g,">")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},zIndexSetter:function(t,e){var i,s,n,o,r=this.renderer,a=this.parentGroup,h=(a||r).element||r.box,l=this.element;r=h===r.box;if(i=this.added,c(t)?(l.setAttribute("data-z-index",t),t=+t,this[e]===t&&(i=!1)):c(this[e])&&l.removeAttribute("data-z-index"),this[e]=t,i){for((t=this.zIndex)&&a&&(a.handleZ=!0),o=(e=h.childNodes).length-1;0<=o&&!s;o--)i=(a=e[o]).getAttribute("data-z-index"),n=!c(i),a!==l&&(0>t&&n&&!r&&!o?(h.insertBefore(l,e[o]),s=!0):(L(i)<=t||n&&(!c(t)||0<=t))&&(h.insertBefore(l,e[o+1]||null),s=!0));s||(h.insertBefore(l,e[r?3:0]||null),s=!0)}return s},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}}),e.prototype.yGetter=e.prototype.xGetter,e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.rotationSetter=e.prototype.verticalAlignSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.matrixSetter=function(t,e){this[e]=t,this.doTransform=!0},e.prototype["stroke-widthSetter"]=e.prototype.strokeSetter=function(t,i,s){this[i]=t,this.stroke&&this["stroke-width"]?(e.prototype.fillSetter.call(this,this.stroke,"stroke",s),s.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===t&&this.hasStroke&&(s.removeAttribute("stroke"),this.hasStroke=!1)},i=t.SVGRenderer=function(){this.init.apply(this,arguments)},f(i.prototype,{Element:e,SVG_NS:D,init:function(t,e,i,n,r,a,l){var c,d;c=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),l||c.css(this.getStyle(n)),n=c.element,t.appendChild(n),o(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&o(n,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=n,this.boxWrapper=c,this.alignedObjects=[],this.url=(y||M)&&u.getElementsByTagName("base").length?z.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 7.0.3")),this.defs=this.createElement("defs").add(),this.allowHTML=a,this.forExport=r,this.styledMode=l,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1),y&&t.getBoundingClientRect&&((e=function(){h(t,{left:0,top:0}),d=t.getBoundingClientRect(),h(t,{left:Math.ceil(d.left)-d.left+"px",top:Math.ceil(d.top)-d.top+"px"})})(),this.unSubPixelFix=s(z,"resize",e))},definition:function(t){var e=this;return function t(i,s){var n;return P(i).forEach(function(i){var o=e.createElement(i.tagName),r={};T(i,function(t,e){"tagName"!==e&&"children"!==e&&"textContent"!==e&&(r[e]=t)}),o.attr(r),o.add(s||e.defs),i.textContent&&o.element.appendChild(u.createTextNode(i.textContent)),t(i.children||[],o),n=o}),n}(t)},getStyle:function(t){return this.style=f({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},setStyle:function(t){this.boxWrapper.css(this.getStyle(t))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),p(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:S,getRadialAttr:function(t,e){return{cx:t[0]-t[2]/2+e.cx*t[2],cy:t[1]-t[2]/2+e.cy*t[2],r:e.r*t[2]}},truncate:function(t,e,i,s,n,o,r){var a,h,l,c=this,d=t.rotation,p=s?1:0,f=(i||s).length,g=f,m=[],x=function(t){e.firstChild&&e.removeChild(e.firstChild),t&&e.appendChild(u.createTextNode(t))},y=function(o,a){if(void 0===m[a=a||o])if(e.getSubStringLength)try{m[a]=n+e.getSubStringLength(0,s?a+1:a)}catch(t){}else c.getSpanWidth&&(x(r(i||s,o)),m[a]=n+c.getSpanWidth(t,e));return m[a]};if(t.rotation=0,h=y(e.textContent.length),l=n+h>o){for(;p<=f;)g=Math.ceil((p+f)/2),s&&(a=r(s,g)),h=y(g,a&&a.length-1),p===f?p=f+1:h>o?f=g-1:p=g;0===f?x(""):i&&f===i.length-1||x(a||r(i||s,g))}return s&&s.splice(0,g),t.actualWidth=h,t.rotation=d,l},escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},buildText:function(t){var e,i,s,n=t.element,r=this,a=r.forExport,l=A(t.textStr,"").toString(),c=-1!==l.indexOf("<"),d=n.childNodes,p=o(n,"x"),f=t.styles,g=t.textWidth,m=f&&f.lineHeight,x=f&&f.textOutline,y=f&&"ellipsis"===f.textOverflow,v=f&&"nowrap"===f.whiteSpace,b=f&&f.fontSize,k=d.length,M=(f=g&&!t.added&&this.box,function(t){var e;return r.styledMode||(e=/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:b||r.style.fontSize||12),m?L(m):r.fontMetrics(e,t.getAttribute("style")?t:n).h}),w=function(t,e){return T(r.escapes,function(i,s){e&&-1!==e.indexOf(i)||(t=t.toString().replace(new RegExp(i,"g"),s))}),t},S=function(t,e){var i;if(i=t.indexOf("<"),-1!==(i=(t=t.substring(i,t.indexOf(">")-i)).indexOf(e+"="))&&(i=i+e.length+1,'"'===(e=t.charAt(i))||"'"===e))return(t=t.substring(i+1)).substring(0,t.indexOf(e))};if((i=[l,y,v,m,x,b,g].join())!==t.textCache){for(t.textCache=i;k--;)n.removeChild(d[k]);c||x||y||g||-1!==l.indexOf(" ")?(f&&f.appendChild(n),c?l=(l=r.styledMode?l.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,''):l.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'')).replace(//g,"").split(//g):l=[l],(l=l.filter(function(t){return""!==t})).forEach(function(i,l){var c,d=0,f=0;i=i.replace(/^\s+|\s+$/g,"").replace(//g,"|||"),(c=i.split("|||")).forEach(function(i){if(""!==i||1===c.length){var m,x,k={},T=u.createElementNS(r.SVG_NS,"tspan");if((m=S(i,"class"))&&o(T,"class",m),(m=S(i,"style"))&&(m=m.replace(/(;| |^)color([ :])/,"$1fill$2"),o(T,"style",m)),(x=S(i,"href"))&&!a&&(o(T,"onclick",'location.href="'+x+'"'),o(T,"class","highcharts-anchor"),r.styledMode||h(T,{cursor:"pointer"}))," "!==(i=w(i.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" "))){if(T.appendChild(u.createTextNode(i)),d?k.dx=0:l&&null!==p&&(k.x=p),o(T,k),n.appendChild(T),!d&&s&&(!E&&a&&h(T,{display:"block"}),o(T,"dy",M(T))),g){var A=i.replace(/([^\^])-/g,"$1- ").split(" ");k=!v&&(1Math.abs(n.end-n.start-2*Math.PI));var l=Math.cos(o),d=Math.sin(o),p=Math.cos(h);h=Math.sin(h);return r=["M",t+r*l,e+a*d,"A",r,a,0,n=.001>n.end-o-Math.PI?0:1,1,t+r*p,e+a*h],c(i)&&r.push(s?"M":"L",t+i*p,e+i*h,"A",i,i,0,n,0,t+i*l,e+i*d),r.push(s?"":"Z"),r},callout:function(t,e,i,s,n){var o,r=Math.min(n&&n.r||0,i,s),a=r+6,h=n&&n.anchorX;return n=n&&n.anchorY,o=["M",t+r,e,"L",t+i-r,e,"C",t+i,e,t+i,e,t+i,e+r,"L",t+i,e+s-r,"C",t+i,e+s,t+i,e+s,t+i-r,e+s,"L",t+r,e+s,"C",t,e+s,t,e+s,t,e+s-r,"L",t,e+r,"C",t,e,t,e,t+r,e],h&&h>i?n>e+a&&nh?n>e+a&&ns&&h>t+a&&hn&&h>t+a&&h(t=/px/.test(t)?L(t):12)?t+3:Math.round(1.2*t),b:Math.round(.8*i),f:t}},rotCorr:function(t,e,i){var s=t;return e&&i&&(s=Math.max(s*Math.cos(e*d),4)),{x:-t/3*Math.sin(e*d),y:s}},label:function(i,s,n,o,r,a,h,l,d){var p,u,g,m,x,y,v,b,k,M,S,T,A=this,L=A.styledMode,P=A.g("button"!==d&&"label"),O=P.text=A.text("",0,0,h).attr({zIndex:1}),E=0,D=3,I=0,z={},B=/^url\((.*?)\)$/.test(o),N=L||B,R=function(){return L?p.strokeWidth()%2/2:(b?parseInt(b,10):0)%2/2};d&&P.addClass("highcharts-"+d),M=function(){var t=O.element.style,e={};u=(void 0===g||void 0===m||v)&&c(O.textStr)&&O.getBBox(),P.width=(g||u.width||0)+2*D+I,P.height=(m||u.height||0)+2*D,k=D+Math.min(A.fontMetrics(t&&t.fontSize,O).b,u?u.height:1/0),N&&(p||(P.box=p=A.symbols[o]||B?A.symbol(o):A.rect(),p.addClass(("button"===d?"":"highcharts-label-box")+(d?" highcharts-"+d+"-box":"")),p.add(P),t=R(),e.x=t,e.y=(l?-k:0)+t),e.width=Math.round(P.width),e.height=Math.round(P.height),p.attr(f(e,z)),z={})},S=function(){var t,e=I+D;t=l?0:k,c(g)&&u&&("center"===v||"right"===v)&&(e+={center:.5,right:1}[v]*(g-u.width)),e===O.x&&t===O.y||(O.attr("x",e),O.hasBoxWidthChanged&&(u=O.getBBox(!0),M()),void 0!==t&&O.attr("y",t)),O.x=e,O.y=t},T=function(t,e){p?p.attr(t,e):z[t]=e},P.onAdd=function(){O.add(P),P.attr({text:i||0===i?i:"",x:s,y:n}),p&&c(r)&&P.attr({anchorX:r,anchorY:a})},P.widthSetter=function(e){g=t.isNumber(e)?e:null},P.heightSetter=function(t){m=t},P["text-alignSetter"]=function(t){v=t},P.paddingSetter=function(t){c(t)&&t!==D&&(D=P.padding=t,S())},P.paddingLeftSetter=function(t){c(t)&&t!==I&&(I=t,S())},P.alignSetter=function(t){(t={left:0,center:.5,right:1}[t])!==E&&(E=t,u&&P.attr({x:x}))},P.textSetter=function(t){void 0!==t&&O.textSetter(t),M(),S()},P["stroke-widthSetter"]=function(t,e){t&&(N=!0),b=this["stroke-width"]=t,T(e,t)},L?P.rSetter=function(t,e){T(e,t)}:P.strokeSetter=P.fillSetter=P.rSetter=function(t,e){"r"!==e&&("fill"===e&&t&&(N=!0),P[e]=t),T(e,t)},P.anchorXSetter=function(t,e){r=P.anchorX=t,T(e,Math.round(t)-R()-x)},P.anchorYSetter=function(t,e){a=P.anchorY=t,T(e,t-y)},P.xSetter=function(t){P.x=t,E&&(t-=E*((g||u.width)+2*D),P["forceAnimate:x"]=!0),x=Math.round(t),P.attr("translateX",x)},P.ySetter=function(t){y=P.y=Math.round(t),P.attr("translateY",y)};var W=P.css;return h={css:function(t){if(t){var e={};t=w(t),P.textProps.forEach(function(i){void 0!==t[i]&&(e[i]=t[i],delete t[i])}),O.css(e),"width"in e&&M(),"fontSize"in e&&(M(),S())}return W.call(P,t)},getBBox:function(){return{width:u.width+2*D,height:u.height+2*D,x:u.x-D,y:u.y-D}},destroy:function(){C(P.element,"mouseenter"),C(P.element,"mouseleave"),O&&(O=O.destroy()),p&&(p=p.destroy()),e.prototype.destroy.call(P),P=A=M=S=T=null}},L||(h.shadow=function(t){return t&&(M(),p&&p.shadow(t)),P}),f(P,h)}}),t.Renderer=i}(l),function(t){var e=t.attr,i=t.createElement,s=t.css,n=t.defined,o=t.extend,r=t.isFirefox,a=t.isMS,h=t.isWebKit,l=t.pick,c=t.pInt,d=t.SVGElement,p=t.SVGRenderer,u=t.win;o(d.prototype,{htmlCss:function(t){var e,i="SPAN"===this.element.tagName&&t&&"width"in t,n=l(i&&t.width,void 0);return i&&(delete t.width,this.textWidth=n,e=!0),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=o(this.styles,t),s(this.element,t),e&&this.htmlUpdateTransform(),this},htmlGetBBox:function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,o=this.translateY||0,r=this.x||0,a=this.y||0,h=this.textAlign||"left",l={left:0,center:.5,right:1}[h],d=(u=this.styles)&&u.whiteSpace;if(s(e,{marginLeft:i,marginTop:o}),!t.styledMode&&this.shadows&&this.shadows.forEach(function(t){s(t,{marginLeft:i+1,marginTop:o+1})}),this.inverted&&[].forEach.call(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var p,u=this.rotation,f=this.textWidth&&c(this.textWidth),g=[u,h,e.innerHTML,this.textWidth,this.textAlign].join();(p=f!==this.oldTextWidth)&&!(p=f>this.oldTextWidth)&&((p=this.textPxLength)||(s(e,{width:"",whiteSpace:d||"nowrap"}),p=e.offsetWidth),p=p>f),p&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)?(s(e,{width:f+"px",display:"block",whiteSpace:d||"normal"}),this.oldTextWidth=f,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1,g!==this.cTT&&(d=t.fontMetrics(e.style.fontSize,e).b,!n(u)||u===(this.oldRotation||0)&&h===this.oldAlign||this.setSpanRotation(u,l,d),this.getSpanCorrection(!n(u)&&this.textPxLength||e.offsetWidth,d,l,u,h)),s(e,{left:r+(this.xCorr||0)+"px",top:a+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=u,this.oldAlign=h}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},o=this.renderer.getTransformKey();n[o]=n.transform="rotate("+t+"deg)",n[o+(r?"Origin":"-origin")]=n.transformOrigin=100*e+"% "+i+"px",s(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),o(p.prototype,{getTransformKey:function(){return a&&!/Edge/.test(u.navigator.userAgent)?"-ms-transform":h?"-webkit-transform":r?"MozTransform":u.opera?"-o-transform":""},html:function(s,n,r){var a=this.createElement("span"),h=a.element,c=a.renderer,p=c.isSVG,u=function(t,e){["opacity","visibility"].forEach(function(i){t[i+"Setter"]=function(t,s,n){d.prototype[i+"Setter"].call(this,t,s,n),e[s]=t}}),t.addedSetters=!0},f=(f=t.charts[c.chartIndex])&&f.styledMode;return a.textSetter=function(t){t!==h.innerHTML&&delete this.bBox,this.textStr=t,h.innerHTML=l(t,""),a.doTransform=!0},p&&u(a,a.element.style),a.xSetter=a.ySetter=a.alignSetter=a.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),a[e]=t,a.doTransform=!0},a.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},a.attr({text:s,x:Math.round(n),y:Math.round(r)}).css({position:"absolute"}),f||a.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),h.style.whiteSpace="nowrap",a.css=a.htmlCss,p&&(a.add=function(t){var s,n=c.box.parentNode,r=[];if(this.parentGroup=t){if(!(s=t.div)){for(;t;)r.push(t),t=t.parentGroup;r.reverse().forEach(function(t){function h(e,i){t[i]=e,"translateX"===i?l.left=e+"px":l.top=e+"px",t.doTransform=!0}var l,c=e(t.element,"class");c&&(c={className:c}),s=t.div=t.div||i("div",c,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,pointerEvents:t.styles&&t.styles.pointerEvents},s||n),l=s.style,o(t,{classSetter:function(t){return function(e){this.element.setAttribute("class",e),t.className=e}}(s),on:function(){return r[0].div&&a.on.apply({element:r[0].div},arguments),t},translateXSetter:h,translateYSetter:h}),t.addedSetters||u(t,l)})}}else s=n;return s.appendChild(h),a.added=!0,a.alignOnAdd&&a.htmlUpdateTransform(),a}),a}})}(l),function(t){var e=t.defined,i=t.extend,s=t.merge,n=t.pick,o=t.timeUnits,r=t.win;t.Time=function(t){this.update(t,!1)},t.Time.prototype={defaultOptions:{},update:function(t){var e=n(t&&t.useUTC,!0),i=this;this.options=t=s(!0,this.options||{},t),this.Date=t.Date||r.Date||Date,this.timezoneOffset=(this.useUTC=e)&&t.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),(this.variableTimezone=!(e&&!t.getTimezoneOffset&&!t.timezone))||this.timezoneOffset?(this.get=function(t,e){var s=e.getTime(),n=s-i.getTimezoneOffset(e);return e.setTime(n),t=e["getUTC"+t](),e.setTime(s),t},this.set=function(t,e,s){var n;"Milliseconds"===t||"Seconds"===t||"Minutes"===t&&0==e.getTimezoneOffset()%60?e["set"+t](s):(n=i.getTimezoneOffset(e),n=e.getTime()-n,e.setTime(n),e["setUTC"+t](s),t=i.getTimezoneOffset(e),n=e.getTime()+t,e.setTime(n))}):e?(this.get=function(t,e){return e["getUTC"+t]()},this.set=function(t,e,i){return e["setUTC"+t](i)}):(this.get=function(t,e){return e["get"+t]()},this.set=function(t,e,i){return e["set"+t](i)})},makeTime:function(e,i,s,o,r,a){var h,l,c;return this.useUTC?(h=this.Date.UTC.apply(0,arguments),h+=l=this.getTimezoneOffset(h),l!==(c=this.getTimezoneOffset(h))?h+=c-l:l-36e5!==this.getTimezoneOffset(h-36e5)||t.isSafari||(h-=36e5)):h=new this.Date(e,i,n(s,1),n(o,0),n(r,0),n(a,0)).getTime(),h},timezoneOffsetFunction:function(){var e=this,i=this.options,s=r.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t).getTimezoneOffset()};if(i.timezone){if(s)return function(t){return 6e4*-s.tz(t,i.timezone).utcOffset()};t.error(25)}return this.useUTC&&i.getTimezoneOffset?function(t){return 6e4*i.getTimezoneOffset(t)}:function(){return 6e4*(e.timezoneOffset||0)}},dateFormat:function(e,i,s){if(!t.defined(i)||isNaN(i))return t.defaultOptions.lang.invalidDate||"";e=t.pick(e,"%Y-%m-%d %H:%M:%S");var n=this,o=new this.Date(i),r=this.get("Hours",o),a=this.get("Day",o),h=this.get("Date",o),l=this.get("Month",o),c=this.get("FullYear",o),d=t.defaultOptions.lang,p=d.weekdays,u=d.shortWeekdays,f=t.pad;o=t.extend({a:u?u[a]:p[a].substr(0,3),A:p[a],d:f(h),e:f(h,2," "),w:a,b:d.shortMonths[l],B:d.months[l],m:f(l+1),o:l+1,y:c.toString().substr(2,2),Y:c,H:f(r),k:r,I:f(r%12||12),l:r%12||12,M:f(n.get("Minutes",o)),p:12>r?"AM":"PM",P:12>r?"am":"pm",S:f(o.getSeconds()),L:f(Math.floor(i%1e3),3)},t.dateFormats);return t.objectEach(o,function(t,s){for(;-1!==e.indexOf("%"+s);)e=e.replace("%"+s,"function"==typeof t?t.call(n,i):t)}),s?e.substr(0,1).toUpperCase()+e.substr(1):e},resolveDTLFormat:function(e){return t.isObject(e,!0)?e:{main:(e=t.splat(e))[0],from:e[1],to:e[2]}},getTimeTicks:function(t,s,r,a){var h,l,c=this,d=[],p={};h=new c.Date(s);var u,f=t.unitRange,g=t.count||1;if(a=n(a,1),e(s)){c.set("Milliseconds",h,f>=o.second?0:g*Math.floor(c.get("Milliseconds",h)/g)),f>=o.second&&c.set("Seconds",h,f>=o.minute?0:g*Math.floor(c.get("Seconds",h)/g)),f>=o.minute&&c.set("Minutes",h,f>=o.hour?0:g*Math.floor(c.get("Minutes",h)/g)),f>=o.hour&&c.set("Hours",h,f>=o.day?0:g*Math.floor(c.get("Hours",h)/g)),f>=o.day&&c.set("Date",h,f>=o.month?1:Math.max(1,g*Math.floor(c.get("Date",h)/g))),f>=o.month&&(c.set("Month",h,f>=o.year?0:g*Math.floor(c.get("Month",h)/g)),l=c.get("FullYear",h)),f>=o.year&&c.set("FullYear",h,l-l%g),f===o.week&&(l=c.get("Day",h),c.set("Date",h,c.get("Date",h)-l+a+(l4*o.month||c.getTimezoneOffset(s)!==c.getTimezoneOffset(r)),s=h.getTime(),h=1;sd.length&&d.forEach(function(t){0==t%18e5&&"000000000"===c.dateFormat("%H%M%S%L",t)&&(p[t]="day")})}return d.info=i(t,{higherRanks:p,totalRange:f*g}),d}}}(l),function(t){var e=t.color,i=t.merge;t.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:t.Time.prototype.defaultOptions,chart:{styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:t.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:t.isTouchDevice?25:10,headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',backgroundColor:e("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},t.setOptions=function(e){return t.defaultOptions=i(!0,t.defaultOptions,e),t.time.update(i(t.defaultOptions.global,t.defaultOptions.time),!1),t.defaultOptions},t.getOptions=function(){return t.defaultOptions},t.defaultPlotOptions=t.defaultOptions.plotOptions,t.time=new t.Time(i(t.defaultOptions.global,t.defaultOptions.time)),t.dateFormat=function(e,i,s){return t.time.dateFormat(e,i,s)}}(l),function(t){var e=t.correctFloat,i=t.defined,s=t.destroyObjectProperties,n=t.fireEvent,o=t.isNumber,r=t.merge,a=t.pick,h=t.deg2rad;t.Tick=function(t,e,i,s,n){this.axis=t,this.pos=e,this.type=i||"",this.isNewLabel=this.isNew=!0,this.parameters=n||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,i||s||this.addLabel()},t.Tick.prototype={addLabel:function(){var s,n,o,h,l=this,c=l.axis,d=c.options,p=c.chart,u=c.categories,f=c.names,g=l.pos,m=a(l.options&&l.options.labels,d.labels),x=g===(b=c.tickPositions)[0],y=g===b[b.length-1],v=(u=this.parameters.category||(u?a(u[g],f[g],g):g),l.label),b=b.info;c.isDatetimeAxis&&b&&(s=(n=p.time.resolveDTLFormat(d.dateTimeLabelFormats[!d.grid&&b.higherRanks[g]||b.unitName])).main),l.isFirst=x,l.isLast=y,l.formatCtx={axis:c,chart:p,isFirst:x,isLast:y,dateTimeLabelFormat:s,tickPositionInfo:b,value:c.isLog?e(c.lin2log(u)):u,pos:g},d=c.labelFormatter.call(l.formatCtx,this.formatCtx),(h=n&&n.list)&&(l.shortenLabel=function(){for(o=0;od&&n-p*ur&&(e=Math.round((o-n)/Math.cos(d*h))):(o=n+(1-p)*u,n-p*ur&&(g=r-t.x+g*p,m=-1),(g=Math.min(f,g))g||i.autoRotation&&(c.styles||{}).width)&&(e=g)),e&&(this.shortenLabel?this.shortenLabel():(x.width=Math.floor(e),(s.style||{}).textOverflow||(x.textOverflow="ellipsis"),c.css(x)))},getPosition:function(e,i,s,o){var r=this.axis,a=r.chart,h=o&&a.oldChartHeight||a.chartHeight;return e={x:e?t.correctFloat(r.translate(i+s,null,null,o)+r.transB):r.left+r.offset+(r.opposite?(o&&a.oldChartWidth||a.chartWidth)-r.right-r.left:0),y:e?h-r.bottom+r.offset-(r.opposite?r.height:0):t.correctFloat(h-r.translate(i+s,null,null,o)-r.transB)},n(this,"afterGetPosition",{pos:e}),e},getLabelPosition:function(t,e,s,o,r,a,l,c){var d=this.axis,p=d.transA,u=d.reversed,f=d.staggerLines,g=d.tickRotCorr||{x:0,y:0},m=r.y,x=o||d.reserveSpaceDefault?0:-d.labelOffset*("center"===d.labelAlign?.5:1),y={};return i(m)||(m=0===d.side?s.rotation?-8:-s.getBBox().height:2===d.side?g.y+8:Math.cos(s.rotation*h)*(g.y-s.getBBox(!1,0).height/2)),t=t+r.x+x+g.x-(a&&o?a*p*(u?-1:1):0),e=e+m-(a&&!o?a*p*(u?1:-1):0),f&&(s=l/(c||1)%f,d.opposite&&(s=f-s-1),e+=d.labelOffset/f*s),y.x=t,y.y=Math.round(e),n(this,"afterGetLabelPosition",{pos:y,tickmarkOffset:a,index:l}),y},getMarkPath:function(t,e,i,s,n,o){return o.crispLine(["M",t,e,"L",t+(n?0:-i),e+(n?i:0)],s)},renderGridLine:function(t,e,i){var s=this.axis,n=s.options,o=this.gridLine,r={},h=this.pos,l=this.type,c=a(this.tickmarkOffset,s.tickmarkOffset),d=s.chart.renderer,p=l?l+"Grid":"grid",u=n[p+"LineWidth"],f=n[p+"LineColor"];n=n[p+"LineDashStyle"];o||(s.chart.styledMode||(r.stroke=f,r["stroke-width"]=u,n&&(r.dashstyle=n)),l||(r.zIndex=1),t&&(e=0),this.gridLine=o=d.path().attr(r).addClass("highcharts-"+(l?l+"-":"")+"grid-line").add(s.gridGroup)),o&&(i=s.getPlotLinePath(h+c,o.strokeWidth()*i,t,"pass"))&&o[t||this.isNew?"attr":"animate"]({d:i,opacity:e})},renderMark:function(t,e,i){var s=this.axis,n=s.options,o=s.chart.renderer,r=this.type,h=r?r+"Tick":"tick",l=s.tickSize(h),c=this.mark,d=!c,p=t.x;t=t.y;var u=a(n[h+"Width"],!r&&s.isXAxis?1:0);n=n[h+"Color"];l&&(s.opposite&&(l[0]=-l[0]),d&&(this.mark=c=o.path().addClass("highcharts-"+(r?r+"-":"")+"tick").add(s.axisGroup),s.chart.styledMode||c.attr({stroke:n,"stroke-width":u})),c[d?"attr":"animate"]({d:this.getMarkPath(p,t,l[0],c.strokeWidth()*i,s.horiz,o),opacity:e}))},renderLabel:function(t,e,i,s){var n=(d=this.axis).horiz,r=d.options,h=this.label,l=r.labels,c=l.step,d=a(this.tickmarkOffset,d.tickmarkOffset),p=!0,u=t.x;t=t.y,h&&o(u)&&(h.xy=t=this.getLabelPosition(u,t,h,n,l,d,s,c),this.isFirst&&!this.isLast&&!a(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!a(r.showLastLabel,1)?p=!1:!n||l.step||l.rotation||e||0===i||this.handleOverflow(t),c&&s%c&&(p=!1),p&&o(t.y)?(t.opacity=i,h[this.isNewLabel?"attr":"animate"](t),this.isNewLabel=!1):(h.attr("y",-9999),this.isNewLabel=!0))},render:function(e,i,s){var n=(l=this.axis).horiz,o=this.pos,r=a(this.tickmarkOffset,l.tickmarkOffset),h=(r=(o=this.getPosition(n,o,r,i)).x,o.y),l=n&&r===l.pos+l.len||!n&&h===l.pos?-1:1;s=a(s,1),this.isActive=!0,this.renderGridLine(i,s,l),this.renderMark(o,s,l),this.renderLabel(o,i,s,e),this.isNew=!1,t.fireEvent(this,"afterRender")},destroy:function(){s(this,this.axis)}}}(l);var c=function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,n=t.arrayMin,o=t.color,r=t.correctFloat,a=t.defaultOptions,h=t.defined,l=t.deg2rad,c=t.destroyObjectProperties,d=t.extend,p=t.fireEvent,u=t.format,f=t.getMagnitude,g=t.isArray,m=t.isNumber,x=t.isString,y=t.merge,v=t.normalizeTickInterval,b=t.objectEach,k=t.pick,M=t.removeEvent,w=t.splat,S=t.syncTimeout,T=t.Tick,A=function(){this.init.apply(this,arguments)};return t.extend(A.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return t.numberFormat(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(t,i){var s=i.isX,n=this;n.chart=t,n.horiz=t.inverted&&!n.isZAxis?!s:s,n.isXAxis=s,n.coll=n.coll||(s?"xAxis":"yAxis"),p(this,"init",{userOptions:i}),n.opposite=i.opposite,n.side=i.side||(n.horiz?n.opposite?0:2:n.opposite?1:3),n.setOptions(i);var o=this.options,r=o.type;n.labelFormatter=o.labels.formatter||n.defaultLabelFormatter,n.userOptions=i,n.minPixelPadding=0,n.reversed=o.reversed,n.visible=!1!==o.visible,n.zoomEnabled=!1!==o.zoomEnabled,n.hasNames="category"===r||!0===o.categories,n.categories=o.categories||n.hasNames,n.names||(n.names=[],n.names.keys={}),n.plotLinesAndBandsGroups={},n.isLog="logarithmic"===r,n.isDatetimeAxis="datetime"===r,n.positiveValuesOnly=n.isLog&&!n.allowNegativeLog,n.isLinked=h(o.linkedTo),n.ticks={},n.labelEdge=[],n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=o.minRange||o.maxZoom,n.range=o.range,n.offset=o.offset||0,n.stacks={},n.oldStacks={},n.stacksTouched=0,n.max=null,n.min=null,n.crosshair=k(o.crosshair,w(t.options.tooltip.crosshairs)[s?0:1],!1),i=n.options.events,-1===t.axes.indexOf(n)&&(s?t.axes.splice(t.xAxis.length,0,n):t.axes.push(n),t[n.coll].push(n)),n.series=n.series||[],t.inverted&&!n.isZAxis&&s&&void 0===n.reversed&&(n.reversed=!0),b(i,function(t,i){e(n,i,t)}),n.lin2log=o.linearToLogConverter||n.lin2log,n.isLog&&(n.val2lin=n.log2lin,n.lin2val=n.lin2log),p(this,"afterInit")},setOptions:function(t){this.options=y(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],y(a[this.coll],t)),p(this,"afterSetOptions",{userOptions:t})},defaultLabelFormatter:function(){var e,i=this.axis,s=this.value,n=i.chart.time,o=i.categories,r=this.dateTimeLabelFormat,h=(l=a.lang).numericSymbols,l=l.numericSymbolMagnitude||1e3,c=h&&h.length,d=i.options.labels.format;i=i.isLog?Math.abs(s):i.tickInterval;if(d)e=u(d,this,n);else if(o)e=s;else if(r)e=n.dateFormat(r,s);else if(c&&1e3<=i)for(;c--&&void 0===e;)i>=(n=Math.pow(l,c+1))&&0==10*s%n&&null!==h[c]&&0!==s&&(e=t.numberFormat(s/n,-1)+h[c]);return void 0===e&&(e=1e4<=Math.abs(s)?t.numberFormat(s,-1):t.numberFormat(s,-1,void 0,"")),e},getSeriesExtremes:function(){var t=this,e=t.chart;p(this,"getSeriesExtremes",null,function(){t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.threshold=null,t.softThreshold=!t.isXAxis,t.buildStacks&&t.buildStacks(),t.series.forEach(function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var o,r=i.options,a=r.threshold;t.hasVisibleSeries=!0,t.positiveValuesOnly&&0>=a&&(a=null),t.isXAxis?(r=i.xData).length&&(i=n(r),o=s(r),m(i)||i instanceof Date||(r=r.filter(m),i=n(r),o=s(r)),r.length&&(t.dataMin=Math.min(k(t.dataMin,r[0],i),i),t.dataMax=Math.max(k(t.dataMax,r[0],o),o))):(i.getExtremes(),o=i.dataMax,i=i.dataMin,h(i)&&h(o)&&(t.dataMin=Math.min(k(t.dataMin,i),i),t.dataMax=Math.max(k(t.dataMax,o),o)),h(a)&&(t.threshold=a),(!r.softThreshold||t.positiveValuesOnly)&&(t.softThreshold=!1))}})}),p(this,"afterGetSeriesExtremes")},translate:function(t,e,i,s,n,o){var r=this.linkedParent||this,a=1,h=0,l=s?r.oldTransA:r.transA;s=s?r.oldMin:r.min;var c=r.minPixelPadding;return n=(r.isOrdinal||r.isBroken||r.isLog&&n)&&r.lin2val,l||(l=r.transA),i&&(a*=-1,h=r.len),r.reversed&&(h-=(a*=-1)*(r.sector||r.len)),e?(t=(t*a+h-c)/l+s,n&&(t=r.lin2val(t))):(n&&(t=r.val2lin(t)),t=m(s)?a*(t-s)*l+h+a*c+(m(o)?l*o:0):void 0),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,s,n){var o,r,a,h,l,c,d=this,u=d.chart,f=d.left,g=d.top,x=i&&u.oldChartHeight||u.chartHeight,y=i&&u.oldChartWidth||u.chartWidth,v=d.transB,b=function(t,e,i){return("pass"!==s&&ti)&&(s?t=Math.min(Math.max(e,t),i):l=!0),t};return p(this,"getPlotLinePath",c={value:t,lineWidth:e,old:i,force:s,translatedValue:n},function(c){n=k(n,d.translate(t,null,null,i)),n=Math.min(Math.max(-1e5,n),1e5),o=a=Math.round(n+v),r=h=Math.round(x-n-v),m(n)?d.horiz?(r=g,h=x-d.bottom,o=a=b(o,f,f+d.width)):(o=f,a=y-d.right,r=h=b(r,g,g+d.height)):(l=!0,s=!1),c.path=l&&!s?null:u.renderer.crispLine(["M",o,r,"L",a,h],e||1)}),c.path},getLinearTickPositions:function(t,e,i){var s,n=r(Math.floor(e/t)*t);i=r(Math.ceil(i/t)*t);var o,a=[];if(r(n+t)===n&&(o=20),this.single)return[e];for(e=n;e<=i&&(a.push(e),(e=r(e+t,o))!==s);)s=e;return a},getMinorTickInterval:function(){var t=this.options;return!0===t.minorTicks?k(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},getMinorTickPositions:function(){var t=this,e=t.options,i=t.tickPositions,s=t.minorTickInterval,n=[],o=t.pointRangePadding||0,r=t.min-o,a=(o=t.max+o)-r;if(a&&a/s=this.minRange,t=[d-(t=((l=this.minRange)-p+d)/2),k(c.min,d-t)],e&&(t[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),p=[(d=s(t))+l,k(c.max,d+l)],e&&(p[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),(p=n(p))-d=T?(i=T,b=0):a.dataMax<=T&&(s=T,y=0)),a.min=k(n,i,a.dataMin),a.max=k(o,s,a.dataMax)),d&&(a.positiveValuesOnly&&!e&&0>=Math.min(a.min,k(a.dataMin,a.min))&&t.error(10,1,l),a.min=r(a.log2lin(a.min),15),a.max=r(a.log2lin(a.max),15)),a.range&&h(a.max)&&(a.userMin=a.min=n=Math.max(a.dataMin,a.minFromRange()),a.userMax=o=a.max,a.range=null),p(a,"foundExtremes"),a.beforePadding&&a.beforePadding(),a.adjustForMinRange(),!(S||a.axisPointRange||a.usePercentage||x)&&h(a.min)&&h(a.max)&&(l=a.max-a.min)&&(!h(n)&&b&&(a.min-=l*b),!h(o)&&y&&(a.max+=l*y)),m(c.softMin)&&!m(a.userMin)&&(a.min=Math.min(a.min,c.softMin)),m(c.softMax)&&!m(a.userMax)&&(a.max=Math.max(a.max,c.softMax)),m(c.floor)&&(a.min=Math.min(Math.max(a.min,c.floor),Number.MAX_VALUE)),m(c.ceiling)&&(a.max=Math.max(Math.min(a.max,c.ceiling),k(a.userMax,-Number.MAX_VALUE))),A&&h(a.dataMin)&&(T=T||0,!h(n)&&a.min=T?a.min=T:!h(o)&&a.max>T&&a.dataMax<=T&&(a.max=T)),a.tickInterval=a.min===a.max||void 0===a.min||void 0===a.max?1:x&&!M&&w===a.linkedParent.options.tickPixelInterval?M=a.linkedParent.tickInterval:k(M,this.tickAmount?(a.max-a.min)/Math.max(this.tickAmount-1,1):void 0,S?1:(a.max-a.min)*w/Math.max(a.len,w)),g&&!e&&a.series.forEach(function(t){t.processData(a.min!==a.oldMin||a.max!==a.oldMax)}),a.setAxisTranslation(!0),a.beforeSetTickPositions&&a.beforeSetTickPositions(),a.postProcessTickInterval&&(a.tickInterval=a.postProcessTickInterval(a.tickInterval)),a.pointRange&&!M&&(a.tickInterval=Math.max(a.pointRange,a.tickInterval)),e=k(c.minTickInterval,a.isDatetimeAxis&&a.closestPointRange),!M&&a.tickIntervala.tickInterval&&1e3a.max)),!!this.tickAmount)),this.tickAmount||(a.tickInterval=a.unsquish()),this.setTickPositions()},setTickPositions:function(){var e,i=this.options,s=i.tickPositions;e=this.getMinorTickInterval();var n=i.tickPositioner,o=i.startOnTick,r=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e,this.single=this.min===this.max&&h(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==i.allowDecimals),this.tickPositions=e=s&&s.slice(),!e&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(e=[this.min,this.max],t.error(19,!1,this.chart)):e=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),e.length>this.len&&((e=[e[0],e.pop()])[0]===e[1]&&(e.length=1)),this.tickPositions=e,n&&(n=n.apply(this,[this.min,this.max])))&&(this.tickPositions=e=n),this.paddedTicks=e.slice(0),this.trimTicks(e,o,r),this.isLinked||(this.single&&2>e.length&&(this.min-=.5,this.max+=.5),s||n||this.adjustTickAmount()),p(this,"afterSetTickPositions")},trimTicks:function(t,e,i){var s=t[0],n=t[t.length-1],o=this.minPointOffset||0;if(p(this,"trimTicks"),!this.isLinked){if(e&&-1/0!==s)this.min=s;else for(;this.min-o>t[0];)t.shift();if(i)this.max=n;else for(;this.max+oe&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var t,e=this.options,i=this.tickInterval,s=this.tickPositions,n=this.tickAmount,o=this.finalTickAmt,a=s&&s.length,l=k(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(an&&(this.tickInterval*=2,this.setTickPositions());if(h(o)){for(i=e=s.length;i--;)(3===o&&1==i%2||2>=o&&0r&&(e=r)),h(s)&&(nr&&(n=r))),this.displayBtn=void 0!==e||void 0!==n,this.setExtremes(e,n,!1,void 0,{trigger:"zoom"})),t.zoomed=!0}),t.zoomed},setAxisSize:function(){var e=this.chart,i=(a=this.options).offsets||[0,0,0,0],s=this.horiz,n=this.width=Math.round(t.relativeLength(k(a.width,e.plotWidth-i[3]+i[1]),e.plotWidth)),o=this.height=Math.round(t.relativeLength(k(a.height,e.plotHeight-i[0]+i[2]),e.plotHeight)),r=this.top=Math.round(t.relativeLength(k(a.top,e.plotTop+i[0]),e.plotHeight,e.plotTop)),a=this.left=Math.round(t.relativeLength(k(a.left,e.plotLeft+i[3]),e.plotWidth,e.plotLeft));this.bottom=e.chartHeight-o-r,this.right=e.chartWidth-n-a,this.len=Math.max(s?n:o,0),this.pos=s?a:r},getExtremes:function(){var t=this.isLog;return{min:t?r(this.lin2log(this.min)):this.min,max:t?r(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=(i=this.isLog)?this.lin2log(this.min):this.min,i=i?this.lin2log(this.max):this.max;return null===t||-1/0===t?t=e:1/0===t?t=i:e>t?t=e:ie?t.align="right":195e&&(t.align="left")}),t.align},tickSize:function(t){var e,i=this.options,s=i[t+"Length"],n=k(i[t+"Width"],"tick"===t&&this.isXAxis?1:0);return n&&s&&("inside"===i[t+"Position"]&&(s=-s),e=[s,n]),p(this,"afterTickSize",t={tickSize:e}),t.tickSize},labelMetrics:function(){var t=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[t]&&this.ticks[t].label)},unsquish:function(){var t,e,i,s=this.options.labels,n=this.horiz,o=this.tickInterval,a=o,c=this.len/(((this.categories?1:0)+this.max-this.min)/o),d=s.rotation,p=this.labelMetrics(),u=Number.MAX_VALUE,f=this.max-this.min,g=function(t){var e;return(e=1<(e=t/(c||1))?Math.ceil(e):1)*o>f&&1/0!==t&&1/0!==c&&(e=Math.ceil(f/o)),r(e*o)};return n?(i=!s.staggerLines&&!s.step&&(h(d)?[d]:c=i)&&((s=(e=g(Math.abs(p.h/Math.sin(l*i))))+Math.abs(i/360))(s.step||0)&&!s.rotation&&(this.staggerLines||1)*this.len/n||!i&&(s.style&&parseInt(s.style.width,10)||o&&o-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var t,e,i,s=this.chart,n=s.renderer,o=this.tickPositions,r=this.ticks,a=this.options.labels,h=a&&a.style||{},l=this.horiz,c=this.getSlotWidth(),d=Math.max(1,Math.round(c-2*(a.padding||5))),p={},u=this.labelMetrics(),f=a.style&&a.style.textOverflow,g=0;if(x(a.rotation)||(p.rotation=a.rotation||0),o.forEach(function(t){(t=r[t])&&t.label&&t.label.textPxLength>g&&(g=t.label.textPxLength)}),this.maxLabelLength=g,this.autoRotation)g>d&&g>u.h?p.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(t=d,!f))for(e="clip",d=o.length;!l&&d--;)i=o[d],(i=r[i].label)&&(i.styles&&"ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>c&&i.css({width:c+"px"}),i.getBBox().height>this.len/o.length-(u.h-u.f)&&(i.specificTextOverflow="ellipsis"));p.rotation&&(t=g>.5*s.chartHeight?.33*s.chartHeight:g,f||(e="ellipsis")),(this.labelAlign=a.align||this.autoLabelAlign(this.labelRotation))&&(p.align=this.labelAlign),o.forEach(function(i){var s=(i=r[i])&&i.label,n=h.width,o={};s&&(s.attr(p),i.shortenLabel?i.shortenLabel():t&&!n&&"nowrap"!==h.whiteSpace&&(t=this.min&&t<=this.max)&&(s[t]||(s[t]=new T(this,t)),n&&s[t].isNew&&s[t].render(e,!0,-1),s[t].render(e))},render:function(){var e,s,n=this,o=n.chart,r=n.options,a=n.isLog,h=n.isLinked,l=n.tickPositions,c=n.axisTitle,d=n.ticks,u=n.minorTicks,f=n.alternateBands,g=r.stackLabels,x=r.alternateGridColor,y=n.tickmarkOffset,v=n.axisLine,k=n.showAxis,M=i(o.renderer.globalAnimation);n.labelEdge.length=0,n.overlap=!1,[d,u,f].forEach(function(t){b(t,function(t){t.isActive=!1})}),(n.hasData()||h)&&(n.minorTickInterval&&!n.categories&&n.getMinorTickPositions().forEach(function(t){n.renderMinorTick(t)}),l.length&&(l.forEach(function(t,e){n.renderTick(t,e)}),y&&(0===n.min||n.single)&&(d[-1]||(d[-1]=new T(n,-1,null,!0)),d[-1].render(-1))),x&&l.forEach(function(i,r){s=void 0!==l[r+1]?l[r+1]+y:n.max-y,0==r%2&&ie&&(!r||u<=o)&&void 0!==u&&l.push(u),u>o&&(f=!0),u=p}else e=this.lin2log(e),o=this.lin2log(o),t=r?this.getMinorTickInterval():a.tickInterval,t=n("auto"===t?null:t,this._minorAutoInterval,a.tickPixelInterval/(r?5:1)*(o-e)/((r?h/this.tickPositions.length:h)||1)),t=s(t,null,i(t)),l=this.getLinearTickPositions(t,e,o).map(this.log2lin),r||(this._minorAutoInterval=t/5);return r||(this.tickInterval=t),l},e.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},e.prototype.lin2log=function(t){return Math.pow(10,t)}}(l),function(t,e){var i=t.arrayMax,s=t.arrayMin,n=t.defined,o=t.destroyObjectProperties,r=t.erase,a=t.merge,h=t.pick;t.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},t.PlotLineOrBand.prototype={render:function(){t.fireEvent(this,"render");var e=this,i=e.axis,s=i.horiz,o=e.options,r=o.label,l=e.label,c=o.to,d=o.from,p=o.value,u=n(d)&&n(c),f=n(p),g=e.svgElem,m=!g,x=[],y=o.color,v=h(o.zIndex,0),b=o.events,k=(x={class:"highcharts-plot-"+(u?"band ":"line ")+(o.className||"")},{}),M=i.chart.renderer,w=u?"bands":"lines";if(i.isLog&&(d=i.log2lin(d),c=i.log2lin(c),p=i.log2lin(p)),i.chart.styledMode||(f?(x.stroke=y,x["stroke-width"]=o.width,o.dashStyle&&(x.dashstyle=o.dashStyle)):u&&(y&&(x.fill=y),o.borderWidth&&(x.stroke=o.borderColor,x["stroke-width"]=o.borderWidth))),k.zIndex=v,w+="-"+v,(y=i.plotLinesAndBandsGroups[w])||(i.plotLinesAndBandsGroups[w]=y=M.g("plot-"+w).attr(k).add()),m&&(e.svgElem=g=M.path().attr(x).add(y)),f)x=i.getPlotLinePath(p,g.strokeWidth());else{if(!u)return;x=i.getPlotBandPath(d,c,o)}return m&&x&&x.length?(g.attr({d:x}),b&&t.objectEach(b,function(t,i){g.on(i,function(t){b[i].apply(e,[t])})})):g&&(x?(g.show(),g.animate({d:x})):(g.hide(),l&&(e.label=l=l.destroy()))),r&&n(r.text)&&x&&x.length&&0this.max&&e>this.max,n&&s)for(t&&(i=n.toString()===s.toString(),a=0),t=0;td-l?d:d-l);else{if(!c)return!1;h[t]=Math.max(n,s+l+i>e?s:s+l)}}.apply(0,f)?!1!==function(t,e,i,s){var n;return se-a?n=!1:h[t]=se-i/2?e-i-2:s-i/2,n}.apply(0,g)||n||(x(!0),y()):n?h.x=h.y=0:(x(!0),y())};return(o.inverted||1m&&(l=!1),t=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0),t-=u,e.isHeader&&(t=s?-d:a.plotHeight+d),o.push({target:t,rank:e.isHeader?1:0,size:f.tt.getBBox().height+1,point:e,x:m,tt:g})}}),this.cleanSplit(),c.positioner&&o.forEach(function(t){var e=c.positioner.call(n,t.tt.getBBox().width,t.size,t.point);t.x=e.x,t.align=0,t.target=e.y,t.rank=r(e.rank,t.rank)}),t.distribute(o,a.plotHeight+d),o.forEach(function(t){var e=t.point,i=e.series;t.tt.attr({visibility:void 0===t.pos?"hidden":"inherit",x:l||e.isHeader||c.positioner?t.x:e.plotX+a.plotLeft+n.distance,y:t.pos+u,anchorX:e.isHeader?e.plotX+a.plotLeft:e.plotX+i.xAxis.pos,anchorY:e.isHeader?a.plotTop+a.plotHeight/2:e.plotY+i.yAxis.pos})})},updatePosition:function(t){var e,i=this.chart,s=this.getLabel(),n=(this.options.positioner||this.getPosition).call(this,s.width,s.height,t),o=t.plotX+i.plotLeft;t=t.plotY+i.plotTop,this.outside&&(e=(this.options.borderWidth||0)+2*this.distance,this.renderer.setSize(s.width+e,s.height+e,!1),o+=i.pointer.chartPosition.left-n.x,t+=i.pointer.chartPosition.top-n.y),this.move(Math.round(n.x),Math.round(n.y||0),o,t)},getDateFormat:function(t,e,i,s){var n,o,r=this.chart.time,a=r.dateFormat("%m-%d %H:%M:%S.%L",e),h={millisecond:15,second:12,minute:9,hour:6,day:3},c="millisecond";for(o in l){if(t===l.week&&+r.dateFormat("%w",e)===i&&"00:00:00.000"===a.substr(6)){o="week";break}if(l[o]>t){o=c;break}if(h[o]&&a.substr(h[o])!=="01-01 00:00:00.000".substr(h[o]))break;"week"!==o&&(c=o)}return o&&(n=r.resolveDTLFormat(s[o]).main),n},getXDateFormat:function(t,e,i){e=e.dateTimeLabelFormats;var s=i&&i.closestPointRange;return(s?this.getDateFormat(s,t.x,i.options.startOfWeek,e):e.day)||e.year},tooltipFooterHeaderFormatter:function(e,i){var o=i?"footer":"header",r=e.series,a=r.tooltipOptions,h=a.xDateFormat,l=r.xAxis,c=l&&"datetime"===l.options.type&&n(e.key),d=a[o+"Format"];return i={isFooter:i,labelConfig:e},t.fireEvent(this,"headerFormatter",i,function(t){c&&!h&&(h=this.getXDateFormat(e,a,l)),c&&h&&(e.point&&e.point.tooltipDateKeys||["key"]).forEach(function(t){d=d.replace("{point."+t+"}","{point."+t+":"+h+"}")}),r.chart.styledMode&&(d=this.styledModeFormat(d)),t.text=s(d,{point:e,series:r},this.chart.time)}),i.text},bodyFormatter:function(t){return t.map(function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")})},styledModeFormat:function(t){return t.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')}}}(l),function(t){var e=t.addEvent,i=t.attr,s=t.charts,n=t.color,o=t.css,r=t.defined,a=t.extend,h=t.find,l=t.fireEvent,c=t.isNumber,d=t.isObject,p=t.offset,u=t.pick,f=t.splat,g=t.Tooltip;t.Pointer=function(t,e){this.init(t,e)},t.Pointer.prototype={init:function(t,e){this.options=e,this.chart=t,this.runChartClick=e.chart.events&&!!e.chart.events.click,this.pinchDown=[],this.lastValidTouch={},g&&(t.tooltip=new g(t,e.tooltip),this.followTouchMove=u(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(t){var e=(s=this.chart).options.chart,i=e.zoomType||"",s=s.inverted;/touch/.test(t.type)&&(i=u(e.pinchType,i)),this.zoomX=t=/x/.test(i),this.zoomY=i=/y/.test(i),this.zoomHor=t&&!s||i&&s,this.zoomVert=i&&!s||t&&s,this.hasZoom=t||i},normalize:function(t,e){var i;return i=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t,e||(this.chartPosition=e=p(this.chart.container)),a(t,{chartX:Math.round(i.pageX-e.left),chartY:Math.round(i.pageY-e.top)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},findNearestKDPoint:function(t,e,i){var s;return t.forEach(function(t){var n=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,n),(n=d(t,!0))&&!(n=!d(s,!0))){n=s.distX-t.distX;var o=s.dist-t.dist,r=(t.series.group&&t.series.group.zIndex)-(s.series.group&&s.series.group.zIndex);n=0<(0!==n&&e?n:0!==o?o:0!==r?r:s.series.index>t.series.index?-1:1)}n&&(s=t)}),s},getPointFromEvent:function(t){t=t.target;for(var e;t&&!e;)e=t.point,t=t.parentNode;return e},getChartCoordinatesFromPoint:function(t,e){var i=(s=t.series).xAxis,s=s.yAxis,n=u(t.clientX,t.plotX),o=t.shapeArgs;return i&&s?e?{chartX:i.len+i.pos-n,chartY:s.len+s.pos-t.plotY}:{chartX:n+i.pos,chartY:t.plotY+s.pos}:o&&o.x&&o.y?{chartX:o.x,chartY:o.y}:void 0},getHoverData:function(t,e,i,s,n,o){var r,a=[];s=!(!s||!t);var l=e&&!e.stickyTracking?[e]:i.filter(function(t){return t.visible&&!(!n&&t.directTouch)&&u(t.options.enableMouseTracking,!0)&&t.stickyTracking});return e=(r=s?t:this.findNearestKDPoint(l,n,o))&&r.series,r&&(n&&!e.noSharedTooltip?(l=i.filter(function(t){return t.visible&&!(!n&&t.directTouch)&&u(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip})).forEach(function(t){var e=h(t.points,function(t){return t.x===r.x&&!t.isNull});d(e)&&(t.chart.isBoosting&&(e=t.getPoint(e)),a.push(e))}):a.push(r)),{hoverPoint:r,hoverSeries:e,hoverPoints:a}},runPointActions:function(i,n){var o,r=this.chart,a=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,h=!!a&&a.shared,l=(c=n||r.hoverPoint)&&c.series||r.hoverSeries,c=(l=this.getHoverData(c,l,r.series,"touchmove"!==i.type&&(!!n||l&&l.directTouch&&this.isDirectTouch),h,i)).hoverPoint;if(o=l.hoverPoints,n=(l=l.hoverSeries)&&l.tooltipOptions.followPointer,h=h&&l&&!l.noSharedTooltip,c&&(c!==r.hoverPoint||a&&a.isHidden)){if((r.hoverPoints||[]).forEach(function(t){-1===o.indexOf(t)&&t.setState()}),(o||[]).forEach(function(t){t.setState("hover")}),r.hoverSeries!==l&&l.onMouseOver(),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!c.series)return;c.firePointEvent("mouseOver"),r.hoverPoints=o,r.hoverPoint=c,a&&a.refresh(h?o:c,i)}else n&&a&&!a.isHidden&&(c=a.getAnchor([{}],i),a.updatePosition({plotX:c[0],plotY:c[1]}));this.unDocMouseMove||(this.unDocMouseMove=e(r.container.ownerDocument,"mousemove",function(e){var i=s[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)})),r.axes.forEach(function(e){var s=u(e.crosshair.snap,!0),n=s?t.find(o,function(t){return t.series[e.coll]===e}):void 0;n||!s?e.drawCrosshair(i,n):e.hideCrosshair()})},reset:function(t,e){var i=this.chart,s=i.hoverSeries,n=i.hoverPoint,o=i.hoverPoints,r=i.tooltip,a=r&&r.shared?o:n;t&&a&&f(a).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?r&&a&&f(a).length&&(r.refresh(a),r.shared&&o?o.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):n&&(n.setState(n.state,!0),i.axes.forEach(function(t){t.crosshair&&t.drawCrosshair(null,n)}))):(n&&n.onMouseOut(),o&&o.forEach(function(t){t.setState()}),s&&s.onMouseOut(),r&&r.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,s=this.chart;s.series.forEach(function(n){i=t||n.getPlotBox(),n.xAxis&&n.xAxis.zoomEnabled&&n.group&&(n.group.attr(i),n.markerGroup&&(n.markerGroup.attr(i),n.markerGroup.clip(e?s.clipRect:null)),n.dataLabelsGroup&&n.dataLabelsGroup.attr(i))}),s.clipRect.attr(e||s.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,s=i.options.chart,o=t.chartX,r=t.chartY,a=this.zoomHor,h=this.zoomVert,l=i.plotLeft,c=i.plotTop,d=i.plotWidth,p=i.plotHeight,u=this.selectionMarker,f=this.mouseDownX,g=this.mouseDownY,m=s.panKey&&t[s.panKey+"Key"];u&&u.touch||(ol+d&&(o=l+d),rc+p&&(r=c+p),this.hasDragged=Math.sqrt(Math.pow(f-o,2)+Math.pow(g-r,2)),10v.max&&(e=v.max-h,c=!0),c?(M-=.8*(M-r[p][0]),b||(S-=.8*(S-r[p][1])),i()):r[p]=[M,S],y||(o[p]=l-m,o[g]=h),o=y?1/x:x,n[g]=h,n[p]=e,s[y?t?"scaleY":"scaleX":"scale"+u]=x,s["translate"+u]=o*m+(M-o*k)},pinch:function(t){var e=this,o=e.chart,r=e.pinchDown,a=t.touches,h=a.length,l=e.lastValidTouch,c=e.hasZoom,d=e.selectionMarker,p={},u=1===h&&(e.inClass(t.target,"highcharts-tracker")&&o.runTrackerClick||e.runChartClick),f={};1t-6&&rh?this.maxItemWidth:t.itemWidth;s&&this.itemX-i+e>h&&(this.itemX=i,this.itemY+=r+this.lastLineHeight+o,this.lastLineHeight=0),this.lastItemY=r+this.itemY+o,this.lastLineHeight=Math.max(n,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],s?this.itemX+=e:(this.itemY+=r+n+o,this.lastLineHeight=n),this.offsetWidth=this.widthOption||Math.max((s?this.itemX-i-(t.checkbox?0:a):e)+i,this.offsetWidth)},getAllItems:function(){var t=[];return this.chart.series.forEach(function(e){var i=e&&e.options;e&&l(i.showInLegend,!n(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),o(this,"afterGetAllItems",{allItems:t}),t},getAlignment:function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},adjustMargins:function(t,e){var i=this.chart,s=this.options,o=this.getAlignment(),r=void 0!==i.options.title.margin?i.titleOffset+i.options.title.margin:0;o&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(h,c){h.test(o)&&!n(t[c])&&(i[a[c]]=Math.max(i[a[c]],i.legend[(c+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][c]*s[c%2?"x":"y"]+l(s.margin,12)+e[c]+(0===c&&(0===i.titleOffset?0:r))))})},proximatePositions:function(){var e=this.chart,i=[],s="left"===this.options.align;this.allItems.forEach(function(n){var o,r;o=s,n.xAxis&&n.points&&(n.xAxis.options.reversed&&(o=!o),o=t.find(o?n.points:n.points.slice(0).reverse(),function(e){return t.isNumber(e.plotY)}),r=n.legendGroup.getBBox().height,i.push({target:n.visible?(o?o.plotY:n.xAxis.height)-.3*r:e.plotHeight,size:r,item:n}))},this),t.distribute(i,e.plotHeight),i.forEach(function(t){t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos})},render:function(){var e,i,s,n=this.chart,r=n.renderer,a=this.group,l=this.box,c=this.options,p=this.padding;this.itemX=p,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=t.relativeLength(c.width,n.spacingBox.width-p),e=n.spacingBox.width-2*p-c.x,-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(e/=2),this.maxLegendWidth=this.widthOption||e,a||(this.group=a=r.g("legend").attr({zIndex:7}).add(),this.contentGroup=r.g().attr({zIndex:1}).add(a),this.scrollGroup=r.g().add(this.contentGroup)),this.renderTitle(),e=this.getAllItems(),d(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),this.allItems=e,this.display=i=!!e.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,e.forEach(this.renderItem,this),e.forEach(this.layoutItem,this),e=(this.widthOption||this.offsetWidth)+p,s=this.lastItemY+this.lastLineHeight+this.titleHeight,s=this.handleOverflow(s),s+=p,l||(this.box=l=r.rect().addClass("highcharts-legend-box").attr({r:c.borderRadius}).add(a),l.isNew=!0),n.styledMode||l.attr({stroke:c.borderColor,"stroke-width":c.borderWidth||0,fill:c.backgroundColor||"none"}).shadow(c.shadow),0a&&!1!==p.enabled?(this.clipHeight=e=Math.max(a-20-this.titleHeight-h,0),this.currentPage=l(this.currentPage,1),this.fullHeight=t,x.forEach(function(t,s){var n=t._legendItemPos[1],o=Math.round(t.legendItem.getBBox().height),r=m.length;(!r||n-m[r-1]>e&&(i||n)!==m[r-1])&&(m.push(i||n),r++),t.pageIx=r-1,i&&(x[s-1].pageIx=r-1),s===x.length-1&&n+o-m[r-1]>e&&n!==i&&(m.push(n),t.pageIx=r),n!==i&&(i=n)}),d||(d=s.clipRect=o.clipRect(0,h,9999,0),s.contentGroup.clip(d)),y(e),g||(this.nav=g=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,f,f).on("click",function(){s.scroll(-1,u)}).add(g),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation"),n.styledMode||this.pager.css(p.style),this.pager.add(g),this.down=o.symbol("triangle-down",0,0,f,f).on("click",function(){s.scroll(1,u)}).add(g)),s.scroll(0),t=a):g&&(y(),this.nav=g.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,s=i.length;t=this.currentPage+t;var n=this.clipHeight,o=this.options.navigation,r=this.pager,a=this.padding;t>s&&(t=s),0h&&("string"===(s=typeof e[0])?i.name=e[0]:"number"===s&&(i.x=e[0]),l++);c=t.value;)t=e[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=t&&t.color&&!this.options.color?t.color:this.nonZonedColor,t},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;for(t in e.pointCount--,i&&(this.setState(),s(i,this),i.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel||this.dataLabels)&&(d(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this),this)this[t]=null},destroyElements:function(){for(var t,e=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],i=6;i--;)this[t=e[i]]&&(this[t]=this[t].destroy());this.dataLabels&&(this.dataLabels.forEach(function(t){t.element&&t.destroy()}),delete this.dataLabels),this.connectors&&(this.connectors.forEach(function(t){t.element&&t.destroy()}),delete this.connectors)},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,s=h(i.valueDecimals,""),n=i.valuePrefix||"",r=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(n||r)&&(t=t.replace(RegExp(e+"}","g"),n+e+"}"+r)),t=t.replace(RegExp(e+"}","g"),e+":,."+s+"f}")}),o(t,{point:this,series:this.series},e.chart.time)},firePointEvent:function(t,e,i){var s=this,o=this.series.options;(o.point.events[t]||s.options&&s.options.events&&s.options.events[t])&&this.importEvents(),"click"===t&&o.allowPointSelect&&(i=function(t){s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),n(this,t,e,i)},visible:!0}}(l),function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,n=t.arrayMin,o=t.correctFloat,r=t.defaultOptions,a=t.defaultPlotOptions,h=t.defined,l=t.erase,c=t.extend,d=t.fireEvent,p=t.isArray,u=t.isNumber,f=t.isString,g=t.merge,m=t.objectEach,x=t.pick,y=t.removeEvent,v=t.splat,b=t.SVGElement,k=t.syncTimeout,M=t.win;t.Series=t.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":t.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:t.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",cropShoulder:1,init:function(t,i){d(this,"init",{options:i});var s,n,o=this,r=t.series;o.chart=t,o.options=i=o.setOptions(i),o.linkedSeries=[],o.bindAxes(),c(o,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected}),s=i.events,m(s,function(t,i){o.hcEvents&&o.hcEvents[i]&&-1!==o.hcEvents[i].indexOf(t)||e(o,i,t)}),(s&&s.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(t.runTrackerClick=!0),o.getColor(),o.getSymbol(),o.parallelArrays.forEach(function(t){o[t+"Data"]=[]}),o.setData(i.data,!1),o.isCartesian&&(t.hasCartesianSeries=!0),r.length&&(n=r[r.length-1]),o._i=x(n&&n._i,-1)+1,t.orderSeries(this.insert(r)),d(this,"afterInit")},insert:function(t){var e,i=this.options.index;if(u(i)){for(e=t.length;e--;)if(i>=x(t[e].options.index,t[e]._i)){t.splice(e+1,0,this);break}-1===e&&t.unshift(this),e+=1}else t.push(this);return x(e,t.length-1)},bindAxes:function(){var e,i=this,s=i.options,n=i.chart;d(this,"bindAxes",null,function(){(i.axisTypes||[]).forEach(function(o){n[o].forEach(function(t){e=t.options,(s[o]===e.index||void 0!==s[o]&&s[o]===e.id||void 0===s[o]&&0===e.index)&&(i.insert(t.series),i[o]=t,t.isDirty=!0)}),i[o]||i.optionalAxis===o||t.error(18,!0,n)})})},updateParallelArrays:function(t,e){var i=t.series,s=arguments,n=u(e)?function(s){var n="y"===s&&i.toYData?i.toYData(t):t[s];i[s+"Data"][e]=n}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(s,2))};i.parallelArrays.forEach(n)},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,s=e.pointIntervalUnit,n=this.chart.time;i=x(i,e.pointStart,0);return this.pointInterval=t=x(this.pointInterval,e.pointInterval,1),s&&(e=new n.Date(i),"day"===s?n.set("Date",e,n.get("Date",e)+t):"month"===s?n.set("Month",e,n.get("Month",e)+t):"year"===s&&n.set("FullYear",e,n.get("FullYear",e)+t),t=e.getTime()-i),this.xIncrement=i+t,i},setOptions:function(t){var e=this.chart,i=e.options,s=i.plotOptions,n=(e.userOptions||{}).plotOptions||{},o=s[this.type],a=g(t);return t=e.styledMode,d(this,"setOptions",{userOptions:a}),this.userOptions=a,e=g(o,s.series,a),this.tooltipOptions=g(r.tooltip,r.plotOptions.series&&r.plotOptions.series.tooltip,r.plotOptions[this.type].tooltip,i.tooltip.userOptions,s.series&&s.series.tooltip,s[this.type].tooltip,a.tooltip),this.stickyTracking=x(a.stickyTracking,n[this.type]&&n[this.type].stickyTracking,n.series&&n.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||e.stickyTracking),null===o.marker&&delete e.marker,this.zoneAxis=e.zoneAxis,i=this.zones=(e.zones||[]).slice(),!e.negativeColor&&!e.negativeFillColor||e.zones||(s={value:e[this.zoneAxis+"Threshold"]||e.threshold||0,className:"highcharts-negative"},t||(s.color=e.negativeColor,s.fillColor=e.negativeFillColor),i.push(s)),i.length&&h(i[i.length-1].value)&&i.push(t?{}:{color:this.color,fillColor:this.fillColor}),d(this,"afterSetOptions",{options:e}),e},getName:function(){return x(this.options.name,"Series "+(this.index+1))},getCyclic:function(t,e,i){var s,n=this.chart,o=this.userOptions,r=t+"Index",a=t+"Counter",l=i?i.length:x(n.options.chart[t+"Count"],n[t+"Count"]);e||(s=x(o[r],o["_"+r]),h(s)||(n.series.length||(n[a]=0),o["_"+r]=s=n[a]%l,n[a]+=1),i&&(e=i[s])),void 0!==s&&(this[r]=s),this[t]=e},getColor:function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||a[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:t.LegendSymbolMixin.drawLineMarker,updateData:function(e){var i,s,n,o=this.options,r=this.points,a=[],h=this.requireSorting;if(this.xIncrement=null,e.forEach(function(e){var s,l,c;c=(s=t.defined(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e)||{}).x,((s=s.id)||u(c))&&(s&&(l=(l=this.chart.get(s))&&l.index),void 0===l&&u(c)&&(l=this.xData.indexOf(c,n)),-1!==l&&void 0!==l&&this.cropped&&(l=l>=this.cropStart?l-this.cropStart:l),-1===l||void 0===l||r[l]&&r[l].touched?a.push(e):e!==o.data[l]?(r[l].update(e,!1,null,!1),r[l].touched=!0,h&&(n=l+1)):r[l]&&(r[l].touched=!0),i=!0)},this),i)for(e=r.length;e--;)(s=r[e]).touched||s.remove(!1),s.touched=!1;else{if(e.length!==r.length)return!1;e.forEach(function(t,e){r[e].update&&t!==o.data[e]&&r[e].update(t,!1,null,!1)})}return a.forEach(function(t){this.addPoint(t,!1)},this),!0},setData:function(e,i,s,n){var o,r,a=this,h=a.points,l=h&&h.length||0,c=a.options,d=a.chart,g=null,m=a.xAxis,y=c.turboThreshold,v=this.xData,b=this.yData,k=(o=a.pointArrayMap)&&o.length,M=c.keys,w=0,S=1;if(o=(e=e||[]).length,i=x(i,!0),!1!==n&&o&&l&&!a.cropped&&!a.hasGroupedData&&a.visible&&!a.isSeriesBoosting&&(r=this.updateData(e)),!r){if(a.xIncrement=null,a.colorCounter=0,this.parallelArrays.forEach(function(t){a[t+"Data"].length=0}),y&&o>y){for(s=0;null===g&&sh||this.forceCrop)&&(s[o-1]d?(s=[],n=[]):this.yData&&(s[0]d)&&(s=(i=this.cropData(this.xData,this.yData,c,d)).xData,n=i.yData,i=i.start,r=!0)),h=s.length||1;--h;)0<(o=g?f(s[h])-f(s[h-1]):s[h]-s[h-1])&&(void 0===a||oo&&m&&(t.error(15,!1,this.chart),m=!1);this.cropped=r,this.cropStart=i,this.processedXData=s,this.processedYData=n,this.closestPointRange=a},cropData:function(t,e,i,s,n){var o,r=t.length,a=0,h=r;for(n=x(n,this.cropShoulder),o=0;o=i){a=Math.max(0,o-n);break}for(i=o;is){h=i+n;break}return{xData:t.slice(a,h),yData:e.slice(a,h),start:a,end:h}},generatePoints:function(){var t,e,i,s,n=(f=this.options).data,o=this.data,r=this.processedXData,a=this.processedYData,h=this.pointClass,l=r.length,p=this.cropStart||0,u=this.hasGroupedData,f=f.keys,g=[];for(o||u||((o=[]).length=n.length,o=this.data=o),f&&u&&(this.options.keys=!1),s=0;s=g&&(l[a-x]||o)<=m,i&&o)if(i=r.length)for(;i--;)"number"==typeof r[i]&&(c[f++]=r[i]);else c[f++]=r;this.dataMin=n(c),this.dataMax=s(c),d(this,"afterGetExtremes")},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i,s,n,r=this.options,a=r.stacking,l=this.xAxis,c=l.categories,p=this.yAxis,f=this.points,g=f.length,m=!!this.modifyValue,y=this.pointPlacementToXValue(),v=u(y),b=r.threshold,k=r.startFromThreshold?b:0,M=this.zoneAxis||"y",w=Number.MAX_VALUE;for(t=0;t=A&&(S.isNull=!0),S.plotX=e=o(Math.min(Math.max(-1e5,l.translate(T,0,0,0,1,y,"flags"===this.type)),1e5)),a&&this.visible&&!S.isNull&&C&&C[T]&&(n=this.getStackIndicator(n,T,this.index),i=(A=(L=C[T]).points[n.key])[0],A=A[1],i===k&&n.key===C[T].base&&(i=x(u(b)&&b,p.min)),p.positiveValuesOnly&&0>=i&&(i=null),S.total=S.stackTotal=L.total,S.percentage=L.total&&S.y/L.total*100,S.stackY=A,L.setOffset(this.pointXOffset||0,this.barW||0)),S.yBottom=h(i)?Math.min(Math.max(-1e5,p.translate(i,0,1,0,1)),1e5):null,m&&(A=this.modifyValue(A,S)),S.plotY=i="number"==typeof A&&1/0!==A?Math.min(Math.max(-1e5,p.translate(A,0,1,0,1)),1e5):void 0,S.isInside=void 0!==i&&0<=i&&i<=p.len&&0<=e&&e<=l.len,S.clientX=v?o(l.translate(T,0,0,0,1,y)):e,S.negative=S[M]<(r[M+"Threshold"]||b||0),S.category=c&&void 0!==c[S.x]?c[S.x]:S.x,S.isNull||(void 0!==s&&(w=Math.min(w,Math.abs(e-s))),s=e),S.zone=this.zones.length&&S.getZone()}this.closestPointRangePx=w,d(this,"afterTranslate")},getValidPoints:function(t,e,i){var s=this.chart;return(t||this.points||[]).filter(function(t){return!(e&&!s.isInsidePlot(t.plotX,t.plotY,s.inverted))&&(i||!t.isNull)})},setClip:function(t){var e=this.chart,i=this.options,s=e.renderer,n=e.inverted,o=this.clipBox,r=o||e.clipBox,a=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,r.height,i.xAxis,i.yAxis].join(),h=e[a],l=e[a+"m"];h||(t&&(r.width=0,n&&(r.x=e.plotSizeX),e[a+"m"]=l=s.clipRect(n?e.plotSizeX+99:-99,n?-e.plotLeft:-e.plotTop,99,n?e.chartWidth:e.chartHeight)),e[a]=h=s.clipRect(r),h.count={length:0}),t&&!h.count[this.index]&&(h.count[this.index]=!0,h.count.length+=1),!1!==i.clip&&(this.group.clip(t||o?h:e.clipRect),this.markerGroup.clip(l),this.sharedClipKey=a),t||(h.count[this.index]&&(delete h.count[this.index],--h.count.length),0===h.count.length&&a&&e[a]&&(o||(e[a]=e[a].destroy()),e[a+"m"]&&(e[a+"m"]=e[a+"m"].destroy())))},animate:function(t){var e,s=this.chart,n=i(this.options.animation);t?this.setClip(n):((t=s[e=this.sharedClipKey])&&t.animate({width:s.plotSizeX,x:0},n),s[e+"m"]&&s[e+"m"].animate({width:s.plotSizeX+99,x:0},n),this.animate=null)},afterAnimate:function(){this.setClip(),d(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var t,e,i,s,n,o,r,a=this.points,h=this.chart,l=this.options.marker,c=this[this.specialGroup]||this.markerGroup;t=this.xAxis;var d,p=x(l.enabled,!(t&&!t.isRadial)||null,this.closestPointRangePx>=l.enabledThreshold*l.radius);if(!1!==l.enabled||this._hasPointMarkers)for(t=0;to&&e.shadow))),a&&(a.startX=i.xMap,a.isArea=i.isArea)})},getZonesGraphs:function(t){return this.zones.forEach(function(e,i){i=["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||"")],this.chart.styledMode||i.push(e.color||this.color,e.dashStyle||this.options.dashStyle),t.push(i)},this),t},applyZones:function(){var t,e,i,s,n,o,r,a,h,l=this,c=this.chart,d=c.renderer,p=this.zones,u=this.clips||[],f=this.graph,g=this.area,m=Math.max(c.chartWidth,c.chartHeight),y=this[(this.zoneAxis||"y")+"Axis"],v=c.inverted,b=!1;p.length&&(f||g)&&y&&void 0!==y.min&&(n=y.reversed,o=y.horiz,f&&!this.showLine&&f.hide(),g&&g.hide(),s=y.getExtremes(),p.forEach(function(p,k){t=n?o?c.plotWidth:0:o?0:y.toPixels(s.min)||0,t=Math.min(Math.max(x(e,t),0),m),e=Math.min(Math.max(Math.round(y.toPixels(x(p.value,s.max),!0)||0),0),m),b&&(t=e=y.toPixels(s.max)),r=Math.abs(t-e),a=Math.min(t,e),h=Math.max(t,e),y.isXAxis?(i={x:v?h:a,y:0,width:r,height:m},o||(i.x=c.plotHeight-i.x)):(i={x:0,y:v?h:a,width:m,height:r},o&&(i.y=c.plotWidth-i.y)),v&&d.isVML&&(i=y.isXAxis?{x:0,y:n?a:h,height:i.width,width:c.chartWidth}:{x:i.y-c.plotLeft-c.spacingBox.x,y:0,width:i.height,height:c.chartHeight}),u[k]?u[k].animate(i):(u[k]=d.clipRect(i),f&&l["zone-graph-"+k].clip(u[k]),g&&l["zone-area-"+k].clip(u[k])),b=p.value>s.max,l.resetZones&&0===e&&(e=void 0)}),this.clips=u)},invertGroups:function(t){function i(){["group","markerGroup"].forEach(function(e){n[e]&&(o.renderer.isVML&&n[e].attr({width:n.yAxis.len,height:n.xAxis.len}),n[e].width=n.yAxis.len,n[e].height=n.xAxis.len,n[e].invert(t))})}var s,n=this,o=n.chart;n.xAxis&&(s=e(o,"resize",i),e(n,"destroy",s),i(),n.invertGroups=i)},plotGroup:function(t,e,i,s,n){var o=this[t],r=!o;return r&&(this[t]=o=this.chart.renderer.g().attr({zIndex:s||.1}).add(n)),o.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(h(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr({visibility:i})[r?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,s=e.chart,n=e.options,o=!!e.animate&&s.renderer.isSVG&&i(n.animation).duration,r=e.visible?"inherit":"hidden",a=n.zIndex,h=e.hasRendered,l=s.seriesGroup,c=s.inverted;d(this,"render"),t=e.plotGroup("group","series",r,a,l),e.markerGroup=e.plotGroup("markerGroup","markers",r,a,l),o&&e.animate(!0),t.inverted=!!e.isCartesian&&c,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(c),!1===n.clip||e.sharedClipKey||h||t.clip(s.clipRect),o&&e.animate(),h||(e.animationTimeout=k(function(){e.afterAnimate()},o)),e.isDirty=!1,e.hasRendered=!0,d(e,"afterRender")},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,s=this.xAxis,n=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:x(s&&s.left,t.plotLeft),translateY:x(n&&n.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,s=this.yAxis,n=this.chart.inverted;return this.searchKDTree({clientX:n?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:n?s.len-t.chartX+s.pos:t.chartY-s.pos},e,t)},buildKDTree:function(t){this.buildingKdTree=!0;var e=this,i=-1(u=e[u]-p[u])?"right":"left",i[c=0>u?"left":"right"]&&(f=(c=t(e,i[c],a+1,l))[r]a;)r--;this.updateParallelArrays(n,"splice",r,0,0),this.updateParallelArrays(n,r),d&&n.name&&(d[a]=n.name),p.splice(r,0,t),o&&(this.data.splice(r,0,null),this.processData()),"point"===h.legendType&&this.generatePoints(),i&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(n,"shift"),p.shift())),this.isDirtyData=this.isDirty=!0,e&&c.redraw(s)},removePoint:function(t,e,i){var s=this,n=s.data,o=n[t],r=s.points,a=s.chart,h=function(){r&&r.length===n.length&&r.splice(t,1),n.splice(t,1),s.options.data.splice(t,1),s.updateParallelArrays(o||{series:s},"splice",t,1),o&&o.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&a.redraw()};b(i,a),e=m(e,!0),o?o.firePointEvent("remove",null,h):h()},remove:function(t,e,i,s){function n(){o.destroy(s),o.remove=null,r.isDirtyLegend=r.isDirtyBox=!0,r.linkSeries(),m(t,!0)&&r.redraw(e)}var o=this,r=o.chart;!1!==i?c(o,"remove",null,n):n()},update:function(e,i){e=t.cleanRecursively(e,this.userOptions);var s,n=this,o=n.chart,r=n.userOptions,a=n.initialType||n.type,h=e.type||r.type||o.options.chart.type,d=v[a].prototype,p=["group","markerGroup","dataLabelsGroup"],u=["navigatorSeries","baseSeries"],g=n.finishedAnimating&&{animation:!1},x=["data","name","turboThreshold"],y=Object.keys(e),b=0t&&o>l?a=2*l-(o=Math.max(t,l)):os&&a>l?o=2*l-(a=Math.max(s,l)):a=Math.abs(e)&&.5t.closestPointRange*t.xAxis.transA,o=(s=t.borderWidth=a(i.borderWidth,s?0:1),t.yAxis),r=i.threshold,l=t.translatedThreshold=o.getThreshold(r),c=a(i.minPointLength,5),d=t.getColumnMetrics(),p=d.width,u=t.barW=Math.max(p,1+2*s),f=t.pointXOffset=d.offset;e.inverted&&(l-=.5),i.pointPadding&&(u=Math.ceil(u)),h.prototype.translate.apply(t),t.points.forEach(function(i){var s,h=a(i.yBottom,l),d=999+Math.abs(h),g=p,m=(d=Math.min(Math.max(-d,i.plotY),o.len+d),i.plotX+f),x=u,y=Math.min(d,h),v=Math.max(d,h)-y;c&&Math.abs(v)c?h-c:l-(s?c:0)),n(i.options.pointWidth)&&(g=x=Math.ceil(i.options.pointWidth),m-=Math.round((g-p)/2)),i.barX=m,i.pointWidth=g,i.tooltipPos=e.inverted?[o.len+o.pos-e.plotLeft-d,t.xAxis.len-m-x/2,v]:[m+x/2,d+o.pos-e.plotTop,v],i.shapeType=i.shapeType||"rect",i.shapeArgs=t.crispCol.apply(t,i.isNull?[m,l,x,0]:[m,y,x,v])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var s,n=this.options;s=(c=this.pointAttrToOptions||{}).stroke||"borderColor";var o=c["stroke-width"]||"borderWidth",a=t&&t.color||this.color,h=t&&t[s]||n[s]||this.color||a,l=t&&t[o]||n[o]||this[o]||0,c=n.dashStyle;return t&&this.zones.length&&(a=t.getZone(),a=t.options.color||a&&a.color||this.color),e&&(e=(t=r(n.states[e],t.options.states&&t.options.states[e]||{})).brightness,a=t.color||void 0!==e&&i(a).brighten(t.brightness).get()||a,h=t[s]||h,l=t[o]||l,c=t.dashStyle||c),s={fill:a,stroke:h,"stroke-width":l},c&&(s.dashstyle=c),s},drawPoints:function(){var t,e=this,i=this.chart,s=e.options,n=i.renderer,a=s.animationLimit||250;e.points.forEach(function(h){var l=h.graphic,c=l&&i.pointCount
{series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&e.prototype.drawGraph.call(this)},applyJitter:function(){var t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach(function(s,n){["x","y"].forEach(function(o,r){var a,h,l,c="plot"+o.toUpperCase();e[o]&&!s.isNull&&(a=t[o+"Axis"],l=e[o]*a.transA,a&&!a.isLog&&(h=Math.max(0,s[c]-l),a=Math.min(a.len,s[c]+l),r=1e4*Math.sin(n+r*i),s[c]=h+(a-h)*(r-Math.floor(r)),"x"===o&&(s.clientX=s.plotX)))})})}}),t.addEvent(e,"afterTranslate",function(){this.applyJitter&&this.applyJitter()})}(l),function(t){var e=t.deg2rad,i=t.isNumber,s=t.pick,n=t.relativeLength;t.CenteredSeriesMixin={getCenter:function(){var t,e,i=this.options,o=this.chart,r=2*(i.slicedOffset||0),a=o.plotWidth-2*r,h=(o=o.plotHeight-2*r,i.center),l=(h=[s(h[0],"50%"),s(h[1],"50%"),i.size||"100%",i.innerSize||0],Math.min(a,o));for(t=0;4>t;++t)e=h[t],i=2>t||2===t&&/%$/.test(e),h[t]=n(e,[a,o,l,h[2]][t])+(i?r:0);return h[3]>h[2]&&(h[3]=h[2]),h},getStartAndEndRadians:function(t,s){return t=i(t)?t:0,s=i(s)&&s>t&&360>s-t?s:t+360,{start:e*(t+-90),end:e*(s+-90)}}}}(l),function(t){var e=t.addEvent,i=t.CenteredSeriesMixin,s=t.defined,n=t.extend,o=i.getStartAndEndRadians,r=t.noop,a=t.pick,h=t.Point,l=t.Series,c=t.seriesType,d=t.setAnimation;c("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0,connectorShape:"fixedOffset",crookDistance:"70%"},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:t.seriesTypes.column.prototype.pointAttribs,animate:function(t){var e=this,i=e.points,s=e.startAngleRad;t||(i.forEach(function(t){var i=t.graphic,n=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:s,end:s}),i.animate({r:n.r,start:n.start,end:n.end},e.options.animation))}),e.animate=null)},updateTotals:function(){var t,e,i=0,s=this.points,n=s.length,o=this.options.ignoreHiddenPoint;for(t=0;t1.5*Math.PI?i-=2*Math.PI:i<-Math.PI/2&&(i+=2*Math.PI),h.slicedTranslation={translateX:Math.round(Math.cos(i)*c),translateY:Math.round(Math.sin(i)*c)},s=Math.cos(i)*t[2]/2,n=Math.sin(i)*t[2]/2,h.tooltipPos=[t[0]+.7*s,t[1]+.7*n],h.half=i<-Math.PI/2||i>Math.PI/2?1:0,h.angle=i,e=Math.min(d,h.labelDistance/5),h.labelPosition={natural:{x:t[0]+s+Math.cos(i)*h.labelDistance,y:t[1]+n+Math.sin(i)*h.labelDistance},final:{},alignment:0>h.labelDistance?"center":h.half?"right":"left",connectorPosition:{breakAt:{x:t[0]+s+Math.cos(i)*e,y:t[1]+n+Math.sin(i)*e},touchingSliceAt:{x:t[0]+s,y:t[1]+n}}}},drawGraph:null,drawPoints:function(){var t,e,i,s,o=this,r=o.chart,a=r.renderer,h=o.options.shadow;!h||o.shadowGroup||r.styledMode||(o.shadowGroup=a.g("shadow").add(o.group)),o.points.forEach(function(l){if(e=l.graphic,l.isNull)e&&(l.graphic=e.destroy());else{if(s=l.shapeArgs,t=l.getTranslate(),!r.styledMode){var c=l.shadowGroup;h&&!c&&(c=l.shadowGroup=a.g("shadow").add(o.shadowGroup)),c&&c.attr(t),i=o.pointAttribs(l,l.selected&&"select")}e?(e.setRadialReference(o.center),r.styledMode||e.attr(i),e.animate(n(s,t))):(l.graphic=e=a[l.shapeType](s).setRadialReference(o.center).attr(t).add(o.group),r.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}).shadow(h,c)),e.attr({visibility:l.visible?"inherit":"hidden"}),e.addClass(l.getClassName())}})},searchPoint:r,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,getCenter:i.getCenter,getSymbol:r},{init:function(){h.prototype.init.apply(this,arguments);var t,i=this;return i.name=a(i.name,"Slice"),t=function(t){i.slice("select"===t.type)},e(i,"select",t),e(i,"unselect",t),i},isValid:function(){return t.isNumber(this.y,!0)&&0<=this.y},setVisible:function(t,e){var i=this,s=i.series,n=s.chart,o=s.options.ignoreHiddenPoint;e=a(e,o),t!==i.visible&&(i.visible=i.options.visible=t=void 0===t?!i.visible:t,s.options.data[s.data.indexOf(i)]=i.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&n.legend.colorizeItem(i,t),t||"hover"!==i.state||i.setState(""),o&&(s.isDirty=!0),e&&n.redraw())},slice:function(t,e,i){var n=this.series;d(i,n.chart),a(e,!0),this.sliced=this.options.sliced=s(t)?t:!this.sliced,n.options.data[n.data.indexOf(this)]=this.options,this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(t){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r-1,start:e.start,end:e.end})},connectorShapes:{fixedOffset:function(t,e,i){var s=e.breakAt;return e=e.touchingSliceAt,["M",t.x,t.y].concat(i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*s.x-e.x,2*s.y-e.y,s.x,s.y]:["L",s.x,s.y]).concat(["L",e.x,e.y])},straight:function(t,e){return e=e.touchingSliceAt,["M",t.x,t.y,"L",e.x,e.y]},crookedLine:function(e,i,s){i=i.touchingSliceAt;var n=(a=this.series).center[0],o=a.chart.plotWidth,r=a.chart.plotLeft,a=e.alignment,h=this.shapeArgs.r;return s=t.relativeLength(s.crookDistance,1),n=["L",s="left"===a?n+h+(o+r-n-h)*(1-s):r+(n-h)*s,e.y],("left"===a?s>e.x||si.x)&&(n=[]),["M",e.x,e.y].concat(n).concat(["L",i.x,i.y])}},getConnectorPath:function(){var t=this.labelPosition,e=this.series.options.dataLabels,i=e.connectorShape,s=this.connectorShapes;return s[i]&&(i=s[i]),i.call(this,{x:t.final.x,y:t.final.y,alignment:t.alignment},t.connectorPosition,e)}})}(l),function(t){var e=t.addEvent,i=t.arrayMax,s=t.defined,n=t.extend,o=t.format,r=t.merge,a=t.noop,h=t.pick,l=t.relativeLength,c=t.Series,d=t.seriesTypes,p=t.stableSort,u=t.isArray,f=t.splat;t.distribute=function(e,i,s){function n(t,e){return t.target-e.target}var o,r,a=!0,l=e,c=[];r=0;var d=l.reducedLen||i;for(o=e.length;o--;)r+=e[o].size;if(r>d){for(p(e,function(t,e){return(e.rank||0)-(t.rank||0)}),r=o=0;r<=d;)r+=e[o].size,o++;c=e.splice(o-1,e.length)}for(p(e,n),e=e.map(function(t){return{size:t.size,targets:[t.target],align:h(t.align,.5)}});a;){for(o=e.length;o--;)a=e[o],r=(Math.min.apply(0,a.targets)+Math.max.apply(0,a.targets))/2,a.pos=Math.min(Math.max(0,r-a.size*a.align),i-a.size);for(o=e.length,a=!1;o--;)0e[o].pos&&(e[o-1].size+=e[o].size,e[o-1].targets=e[o-1].targets.concat(e[o].targets),e[o-1].align=.5,e[o-1].pos+e[o-1].size>i&&(e[o-1].pos=i-e[o-1].size),e.splice(o,1),a=!0)}l.push.apply(l,c),o=0,e.some(function(e){var n=0;if(e.targets.some(function(){if(l[o].pos=e.pos+n,Math.abs(l[o].pos-l[o].target)>s)return l.slice(0,o+1).forEach(function(t){delete t.pos}),l.reducedLen=(l.reducedLen||i)-.1*i,l.reducedLen>.1*i&&t.distribute(l,i,s),!0;n+=l[o].size,o++}))return!0}),p(l,n)},c.prototype.drawDataLabels=function(){function i(t,e){var i,s=[];if(u(t)&&!u(e))s=t.map(function(t){return r(t,e)});else if(u(e)&&!u(t))s=e.map(function(e){return r(t,e)});else if(u(t)||u(e))for(i=Math.max(t.length,e.length);i--;)s[i]=r(t[i],e[i]);else s=r(t,e);return s}var n,a=this,l=a.chart,c=a.options,d=c.dataLabels,p=a.points,g=a.hasRendered||0,m=h(d.defer,!!c.animation),x=l.renderer;d=i(i(l.options.plotOptions&&l.options.plotOptions.series&&l.options.plotOptions.series.dataLabels,l.options.plotOptions&&l.options.plotOptions[a.type]&&l.options.plotOptions[a.type].dataLabels),d);t.fireEvent(this,"drawDataLabels"),(u(d)||d.enabled||a._hasPointLabels)&&(n=a.plotGroup("dataLabelsGroup","data-labels",m&&!g?"hidden":"visible",d.zIndex||6),m&&(n.attr({opacity:+g}),g||e(a,"afterAnimate",function(){a.visible&&n.show(!0),n[c.animation?"animate":"attr"]({opacity:1},{duration:200})})),p.forEach(function(e){f(i(d,e.dlOptions||e.options&&e.options.dataLabels)).forEach(function(i,r){var d,p,u,f,g=i.enabled&&!e.isNull&&function(t,e){var i=e.filter;return!i||(e=i.operator,t=t[i.property],i=i.value,">"===e&&t>i||"<"===e&&t="===e&&t>=i||"<="===e&&t<=i||"=="===e&&t==i||"==="===e&&t===i)}(e,i),m=e.dataLabels?e.dataLabels[r]:e.dataLabel,y=e.connectors?e.connectors[r]:e.connector,v=!m;g&&(d=e.getLabelConfig(),p=i[e.formatPrefix+"Format"]||i.format,d=s(p)?o(p,d,l.time):(i[e.formatPrefix+"Formatter"]||i.formatter).call(d,i),p=i.style,u=i.rotation,l.styledMode||(p.color=h(i.color,p.color,a.color,"#000000"),"contrast"===p.color&&(e.contrastColor=x.getContrast(e.color||a.color),p.color=i.inside||0>h(i.distance,e.labelDistance)||c.stacking?e.contrastColor:"#000000"),c.cursor&&(p.cursor=c.cursor)),f={r:i.borderRadius||0,rotation:u,padding:i.padding,zIndex:1},l.styledMode||(f.fill=i.backgroundColor,f.stroke=i.borderColor,f["stroke-width"]=i.borderWidth),t.objectEach(f,function(t,e){void 0===t&&delete f[e]})),!m||g&&s(d)?g&&s(d)&&(m?f.text=d:(e.dataLabels=e.dataLabels||[],m=e.dataLabels[r]=u?x.text(d,0,-9999).addClass("highcharts-data-label"):x.label(d,0,-9999,i.shape,null,null,i.useHTML,null,"data-label"),r||(e.dataLabel=m),m.addClass(" highcharts-data-label-color-"+e.colorIndex+" "+(i.className||"")+(i.useHTML?" highcharts-tracker":""))),m.options=i,m.attr(f),l.styledMode||m.css(p).shadow(i.shadow),m.added||m.add(n),a.alignDataLabel(e,m,i,null,v)):(e.dataLabel=e.dataLabel&&e.dataLabel.destroy(),e.dataLabels&&(1===e.dataLabels.length?delete e.dataLabels:delete e.dataLabels[r]),r||delete e.dataLabel,y&&(e.connector=e.connector.destroy(),e.connectors&&(1===e.connectors.length?delete e.connectors:delete e.connectors[r])))})})),t.fireEvent(this,"afterDrawDataLabels")},c.prototype.alignDataLabel=function(t,e,i,s,o){var r,a=this.chart,l=this.isCartesian&&a.inverted,c=h(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),d=h(t.plotY,-9999),p=e.getBBox(),u=i.rotation,f=i.align,g=this.visible&&(t.series.forceDL||a.isInsidePlot(c,Math.round(d),l)||s&&a.isInsidePlot(c,l?s.x+1:s.y+s.height-1,l)),m="justify"===h(i.overflow,"justify");g&&(r=a.renderer.fontMetrics(a.styledMode?void 0:i.style.fontSize,e).b,s=n({x:l?this.yAxis.len-d:c,y:Math.round(l?this.xAxis.len-c:d),width:0,height:0},s),n(i,{width:p.width,height:p.height}),u?(m=!1,c=a.renderer.rotCorr(r,u),c={x:s.x+i.x+s.width/2+c.x,y:s.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*s.height},e[o?"attr":"animate"](c).attr({align:f}),d=180<(d=(u+720)%360)&&360>d,"left"===f?c.y-=d?p.height:0:"center"===f?(c.x-=p.width/2,c.y-=p.height/2):"right"===f&&(c.x-=p.width,c.y-=d?0:p.height),e.placed=!0,e.alignAttr=c):(e.align(i,null,s),c=e.alignAttr),m&&0<=s.height?t.isLabelJustified=this.justifyDataLabel(e,i,c,p,s,o):h(i.crop,!0)&&(g=a.isInsidePlot(c.x,c.y)&&a.isInsidePlot(c.x+p.width,c.y+p.height)),i.shape&&!u)&&e[o?"attr":"animate"]({anchorX:l?a.plotWidth-t.plotY:t.plotX,anchorY:l?a.plotHeight-t.plotX:t.plotY}),g||(e.attr({y:-9999}),e.placed=!1)},c.prototype.justifyDataLabel=function(t,e,i,s,n,o){var r,a,h=this.chart,l=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0;return 0>(r=i.x+d)&&("right"===l?e.align="left":e.x=-r,a=!0),(r=i.x+s.width-d)>h.plotWidth&&("left"===l?e.align="right":e.x=h.plotWidth-r,a=!0),0>(r=i.y+d)&&("bottom"===c?e.verticalAlign="top":e.y=-r,a=!0),(r=i.y+s.height-d)>h.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=h.plotHeight-r,a=!0),a&&(t.placed=!o,t.align(e,null,n)),a},d.pie&&(d.pie.prototype.dataLabelPositioners={radialDistributionY:function(t){return t.top+t.distributeBox.pos},radialDistributionX:function(t,e,i,s){return t.getX(ie.bottom-2?s:i,e.half,e)},justify:function(t,e,i){return i[0]+(t.half?-1:1)*(e+t.labelDistance)},alignToPlotEdges:function(t,e,i,s){return t=t.getBBox().width,e?t+s:i-t-s},alignToConnectors:function(t,e,i,s){var n,o=0;return t.forEach(function(t){(n=t.dataLabel.getBBox().width)>o&&(o=n)}),e?o+s:i-o-s}},d.pie.prototype.drawDataLabels=function(){var e,n,o,r,a,l,d,p,u,f,g=this,m=g.data,x=g.chart,y=g.options.dataLabels,v=y.connectorPadding,b=h(y.connectorWidth,1),k=x.plotWidth,M=x.plotHeight,w=x.plotLeft,S=Math.round(x.chartWidth/3),T=g.center,A=T[2]/2,L=T[1],C=[[],[]],P=[0,0,0,0],O=g.dataLabelPositioners;g.visible&&(y.enabled||g._hasPointLabels)&&(m.forEach(function(t){t.dataLabel&&t.visible&&t.dataLabel.shortened&&(t.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.dataLabel.shortened=!1)}),c.prototype.drawDataLabels.apply(g),m.forEach(function(t){t.dataLabel&&(t.visible?(C[t.half].push(t),t.dataLabel._pos=null,!s(y.style.width)&&!s(t.options.dataLabels&&t.options.dataLabels.style&&t.options.dataLabels.style.width)&&t.dataLabel.getBBox().width>S&&(t.dataLabel.css({width:.7*S}),t.dataLabel.shortened=!0)):(t.dataLabel=t.dataLabel.destroy(),t.dataLabels&&1===t.dataLabels.length&&delete t.dataLabels))}),C.forEach(function(i,n){var c,m,b,S=i.length,C=[];if(S)for(g.sortByAngle(i,n-.5),0k-v&&0===n&&(c=Math.round(d+r-k+v),P[1]=Math.max(c,P[1])),0>p-l/2?P[0]=Math.max(Math.round(l/2-p),P[0]):p+l/2>M&&(P[2]=Math.max(Math.round(p+l/2-M),P[2])),o.sideOverflow=c)}}),0===i(P)||this.verifyDataLabelOverflow(P))&&(this.placeDataLabels(),b&&this.points.forEach(function(t){var e;n=t.connector,(o=t.dataLabel)&&o._pos&&t.visible&&0h(this.translatedThreshold,a.yAxis.len)),p=h(i.inside,!!this.options.stacking);l&&(0>(s=r(l)).y&&(s.height+=s.y,s.y=0),0<(l=s.y+s.height-a.yAxis.len)&&(s.height-=l),o&&(s={x:a.yAxis.len-s.y-s.height,y:a.xAxis.len-s.x-s.width,width:s.height,height:s.width}),p||(o?(s.x+=d?0:s.width,s.width=0):(s.y+=d?s.height:0,s.height=0))),i.align=h(i.align,!o||p?"center":d?"right":"left"),i.verticalAlign=h(i.verticalAlign,o||p?"middle":d?"top":"bottom"),c.prototype.alignDataLabel.call(this,t,e,i,s,n),t.isLabelJustified&&t.contrastColor&&e.css({color:t.contrastColor})})}(l),function(t){var e=t.Chart,i=t.isArray,s=t.objectEach,n=t.pick,o=t.addEvent,r=t.fireEvent;o(e,"render",function(){var t=[];(this.labelCollectors||[]).forEach(function(e){t=t.concat(e())}),(this.yAxis||[]).forEach(function(e){e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&s(e.stacks,function(e){s(e,function(e){t.push(e.label)})})}),(this.series||[]).forEach(function(e){var s=e.options.dataLabels;e.visible&&(!1!==s.enabled||e._hasPointLabels)&&e.points.forEach(function(e){e.visible&&(i(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[]).forEach(function(i){var s=i.options;i.labelrank=n(s.labelrank,e.labelrank,e.shapeArgs&&e.shapeArgs.height),s.allowOverlap||t.push(i)})})}),this.hideOverlappingLabels(t)}),e.prototype.hideOverlappingLabels=function(t){var e,i,s,n,o,a,h=this,l=t.length,c=h.renderer,d=function(t,e,i,s,n,o,r,a){return!(n>t+i||n+re+s||o+athis.pointCount))},pan:function(t,e){var i,s=this,n=s.hoverPoints;l(this,"pan",{originalEvent:t},function(){n&&n.forEach(function(t){t.setState()}),("xy"===e?[1,0]:[1]).forEach(function(e){var n,o=(e=s[e?"xAxis":"yAxis"][0]).horiz,r=t[o?"chartX":"chartY"],a=s[o=o?"mouseDownX":"mouseDownY"],h=(e.pointRange||0)/2,l=e.reversed&&!s.inverted||!e.reversed&&s.inverted?-1:1,c=e.getExtremes(),d=e.toValue(a-r,!0)+h*l;a=(n=(l=e.toValue(a+e.len-r,!0)-h*l)=n(i.minWidth,0)&&this.chartHeight>=n(i.minHeight,0)}).call(this)&&e.push(t._id)},e.prototype.currentOptions=function(e){var n={};return function e(n,r,a,h){var l;t.objectEach(n,function(t,n){if(!h&&-1<["series","xAxis","yAxis"].indexOf(n))for(t=o(t),a[n]=[],l=0;l