/* Highcharts JS v9.1.0 (2021-05-03) Accessibility module (c) 2010-2021 Highsoft AS Author: Oystein Moseng License: www.highcharts.com/license */ (function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/modules/accessibility",["highcharts"],function(v){b(v);b.Highcharts=v;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function v(b,g,n,l){b.hasOwnProperty(g)||(b[g]=l.apply(null,n))}b=b?b._modules:{};v(b,"Accessibility/Utils/HTMLUtilities.js",[b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,g){var w=b.doc,l=b.win,t= g.merge;return{addClass:function(b,f){b.classList?b.classList.add(f):0>b.className.indexOf(f)&&(b.className+=f)},escapeStringForHTML:function(b){return b.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},getElement:function(b){return w.getElementById(b)},getFakeMouseEvent:function(b){if("function"===typeof l.MouseEvent)return new l.MouseEvent(b);if(w.createEvent){var f=w.createEvent("MouseEvent");if(f.initMouseEvent)return f.initMouseEvent(b, !0,!0,l,"click"===b?1:0,0,0,0,0,!1,!1,!1,!1,0,null),f}return{type:b}},getHeadingTagNameForElement:function(b){var f=function(b){b=parseInt(b.slice(1),10);return"h"+Math.min(6,b+1)},q=function(b){var k;a:{for(k=b;k=k.previousSibling;){var e=k.tagName||"";if(/H[1-6]/.test(e)){k=e;break a}}k=""}if(k)return f(k);b=b.parentElement;if(!b)return"p";k=b.tagName;return/H[1-6]/.test(k)?f(k):q(b)};return q(b)},removeElement:function(b){b&&b.parentNode&&b.parentNode.removeChild(b)},reverseChildNodes:function(b){for(var f= b.childNodes.length;f--;)b.appendChild(b.childNodes[f])},setElAttrs:function(b,f){Object.keys(f).forEach(function(q){var k=f[q];null===k?b.removeAttribute(q):b.setAttribute(q,k)})},stripHTMLTagsFromString:function(b){return"string"===typeof b?b.replace(/<\/?[^>]+(>|$)/g,""):b},visuallyHideElement:function(b){t(!0,b.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(1px, 1px, 1px, 1px)",marginTop:"-3px","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)", filter:"alpha(opacity=1)",opacity:"0.01"})}}});v(b,"Accessibility/Utils/ChartUtilities.js",[b["Accessibility/Utils/HTMLUtilities.js"],b["Core/Utilities.js"]],function(b,g){function w(a){var c=a.chart,d={},h="Seconds";d.Seconds=((a.max||0)-(a.min||0))/1E3;d.Minutes=d.Seconds/60;d.Hours=d.Minutes/60;d.Days=d.Hours/24;["Minutes","Hours","Days"].forEach(function(a){2e||b!==c-1;d.a11yProxyElement&&(d.a11yProxyElement.style.visibility=b?"hidden":"visible")})},onChartRender:function(){f(this.chart)?this.updateProxiesPositions():this.removeProxies()},onChartUpdate:function(){this.updateLegendTitle()},updateProxiesPositions:function(){for(var a=0,c=this.proxyElementsList;a/g," "));a=a.langFormat("accessibility.legend.legendLabel"+(e?"":"NoTitle"), {chart:a,legendTitle:e});this.legendProxyGroup&&this.legendProxyGroup.setAttribute("aria-label",a)},addLegendProxyGroup:function(){this.legendProxyGroup=this.addProxyGroup({"aria-label":"_placeholder_",role:"all"===this.chart.options.accessibility.landmarkVerbosity?"region":null})},proxyLegendItems:function(){var a=this;(this.chart.legend&&this.chart.legend.allItems||[]).forEach(function(d){d.legendItem&&d.legendItem.element&&a.proxyLegendItem(d)})},proxyLegendItem:function(a){if(a.legendItem&&a.legendGroup){var d= this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:c(a.name),item:a}),e=a.legendGroup.div?a.legendItem:a.legendGroup;a.a11yProxyElement=this.createProxyButton(a.legendItem,this.legendProxyGroup,{tabindex:-1,"aria-pressed":a.visible,"aria-label":d},e);this.proxyElementsList.push({item:a,element:a.a11yProxyElement,posElement:e})}},getKeyboardNavigation:function(){var a=this.keyCodes,c=this;return new t(this.chart,{keyCodeMap:[[[a.left,a.right,a.up,a.down],function(a){return c.onKbdArrowKey(this, a)}],[[a.enter,a.space],function(d){return b.isFirefox&&d===a.space?this.response.success:c.onKbdClick(this)}]],validate:function(){return c.shouldHaveLegendNavigation()},init:function(a){return c.onKbdNavigationInit(a)}})},onKbdArrowKey:function(a,c){var d=this.keyCodes,e=a.response,b=this.chart,h=b.options.accessibility,k=b.legend.allItems.length;c=c===d.left||c===d.up?-1:1;return b.highlightLegendItem(this.highlightedLegendItemIx+c)?(this.highlightedLegendItemIx+=c,e.success):1=k&&c||0<=k&&!c||5>m||a(e))&&m"+b+"":""})}var r=b.escapeStringForHTML, f=b.stripHTMLTagsFromString;return{getAnnotationsInfoHTML:function(b){var f=b.annotations;return f&&f.length?'
    '+t(b).join(" ")+"
":""},getAnnotationLabelDescription:l,getAnnotationListItems:t,getPointAnnotationTexts:function(b){var f=g(b.series.chart).filter(function(f){return-1c&&a.graphic&&a.graphic.element)})||null:null}function q(a){var c=a.chart.options.accessibility.series.pointDescriptionEnabledThreshold;return!!(!1!==c&&a.points&&a.points.length>= c)}function k(a){var c=a.options.accessibility||{};return!q(a)&&!c.exposeAsGroupOnly}function p(a){var c=a.chart.options.accessibility.keyboardNavigation.seriesNavigation;return!(!a.points||!(a.points.length"," "),e=a.id&&0>a.id.indexOf("highcharts-"),m="x, "+a.x;return a.name||c||b||(e?a.id:m)}function z(a,c,d){var b=c||"",m=d||"";return a.series.pointArrayMap.reduce(function(c,d){c+=c.length?", ":"";var h=e(a,G(a[d],a.options[d]));return c+(d+": "+b+h+m)},"")}function H(a){var c=a.series,d=c.chart.options.accessibility.point|| {},b=c.tooltipOptions||{},m=d.valuePrefix||b.valuePrefix||"";d=d.valueSuffix||b.valueSuffix||"";b=e(a,a["undefined"!==typeof a.value?"value":"y"]);return a.isNull?c.chart.langFormat("accessibility.series.nullPointValue",{point:a}):c.pointArrayMap?z(a,m,d):m+b+d}function D(a){var c=a.series,d=c.chart,b=d.options.accessibility.point.valueDescriptionFormat,e=(c=G(c.xAxis&&c.xAxis.options.accessibility&&c.xAxis.options.accessibility.enabled,!d.angular))?h(a):"";a={point:a,index:L(a.index)?a.index+1:"", xDescription:e,value:H(a),separator:c?", ":""};return J(b,a,d)}function w(a){var c=a.series,d=c.chart,b=D(a),e=a.options&&a.options.accessibility&&a.options.accessibility.description;e=e?" "+e:"";c=1b&&da.dataMax&&(c=a.dataMax,d=c-e);this.setExtremes(d,c)};g.prototype=new b; l(g.prototype,{init:function(){var b=this,a=this.chart;["afterShowResetZoom","afterDrilldown","drillupall"].forEach(function(c){b.addEvent(a,c,function(){b.updateProxyOverlays()})})},onChartUpdate:function(){var b=this.chart,a=this;b.mapNavButtons&&b.mapNavButtons.forEach(function(c,d){f(b,c.element);a.setMapNavButtonAttrs(c.element,"accessibility.zoom.mapZoom"+(d?"Out":"In"))})},setMapNavButtonAttrs:function(b,a){var c=this.chart;a=c.langFormat(a,{chart:c});k(b,{tabindex:-1,role:"button","aria-label":a})}, onChartRender:function(){this.updateProxyOverlays()},updateProxyOverlays:function(){var b=this.chart;q(this.drillUpProxyGroup);q(this.resetZoomProxyGroup);b.resetZoomButton&&this.recreateProxyButtonAndGroup(b.resetZoomButton,"resetZoomProxyButton","resetZoomProxyGroup",b.langFormat("accessibility.zoom.resetZoomButton",{chart:b}));b.drillUpButton&&this.recreateProxyButtonAndGroup(b.drillUpButton,"drillUpProxyButton","drillUpProxyGroup",b.langFormat("accessibility.drillUpButton",{chart:b,buttonText:b.getDrilldownBackText()}))}, recreateProxyButtonAndGroup:function(b,a,c,d){q(this[c]);this[c]=this.addProxyGroup();this[a]=this.createProxyButton(b,this[c],{"aria-label":d,tabindex:-1})},getMapZoomNavigation:function(){var b=this.keyCodes,a=this.chart,c=this;return new t(a,{keyCodeMap:[[[b.up,b.down,b.left,b.right],function(a){return c.onMapKbdArrow(this,a)}],[[b.tab],function(a,b){return c.onMapKbdTab(this,b)}],[[b.space,b.enter],function(){return c.onMapKbdClick(this)}]],validate:function(){return!!(a.mapZoom&&a.mapNavButtons&& a.mapNavButtons.length)},init:function(a){return c.onMapNavInit(a)}})},onMapKbdArrow:function(b,a){var c=this.keyCodes;this.chart[a===c.up||a===c.down?"yAxis":"xAxis"][0].panStep(a===c.left||a===c.up?-1:1);return b.response.success},onMapKbdTab:function(b,a){var c=this.chart;b=b.response;var d=(a=a.shiftKey)&&!this.focusedMapNavButtonIx||!a&&this.focusedMapNavButtonIx;c.mapNavButtons[this.focusedMapNavButtonIx].setState(0);if(d)return c.mapZoom(),b[a?"prev":"next"];this.focusedMapNavButtonIx+=a?-1: 1;a=c.mapNavButtons[this.focusedMapNavButtonIx];c.setFocusToElement(a.box,a.element);a.setState(2);return b.success},onMapKbdClick:function(b){this.fakeClickEvent(this.chart.mapNavButtons[this.focusedMapNavButtonIx].element);return b.response.success},onMapNavInit:function(b){var a=this.chart,c=a.mapNavButtons[0],d=a.mapNavButtons[1];c=0g-k,z=h=864E5*{month:28,year:365}[C]*G-A&&e-36E5<=864E5*{month:31,year:366}[C]*G+A?h=!0:"ytd"===C?(h=y-u+A===e,n=!c):"all"===C&&(h=d.max-d.min>=g-k,t=!c&&q&&h);C=!l&&(O||z||t||f);G=c&&h||h&&!q&&!n||c&&a.frozenStates;C?I=3:G&&(q=!0,I=2);L.state!==I&&(L.setState(I),b&&(b.options[m+1].disabled=C,2===I&&(b.selectedIndex=m+1)),0===I&&p===m&&a.setSelected())})}; f.prototype.computeButtonRange=function(a){var c=a.type,b=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[c])a._range=d[c]*b;else if("month"===c||"year"===c)a._range=864E5*{month:30,year:365}[c]*b;a._offsetMin=B(a.offsetMin,0);a._offsetMax=B(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin};f.prototype.getInputValue=function(a){a="min"===a?this.minInput:this.maxInput;var c=this.chart.options.rangeSelector,b=this.chart.time;return a?("text"===a.type&&c.inputDateParser|| this.defaultInputDateParser)(a.value,b.useUTC,b):0};f.prototype.setInputValue=function(a,b){var d=this.options,e=this.chart.time,f="min"===a?this.minInput:this.maxInput;a="min"===a?this.minDateBox:this.maxDateBox;if(f){var m=f.getAttribute("data-hc-time");m=c(m)?Number(m):void 0;c(b)&&(c(m)&&f.setAttribute("data-hc-time-previous",m),f.setAttribute("data-hc-time",b),m=b);f.value=e.dateFormat(this.inputTypeFormats[f.type]||d.inputEditDateFormat,m);a&&a.attr({text:e.dateFormat(d.inputDateFormat,m)})}}; f.prototype.setInputExtremes=function(a,c,b){if(a="min"===a?this.minInput:this.maxInput){var d=this.inputTypeFormats[a.type],e=this.chart.time;d&&(c=e.dateFormat(d,c),a.min!==c&&(a.min=c),b=e.dateFormat(d,b),a.max!==b&&(a.max=b))}};f.prototype.showInput=function(c){var b="min"===c?this.minDateBox:this.maxDateBox;if((c="min"===c?this.minInput:this.maxInput)&&b&&this.inputGroup){var d="text"===c.type,e=this.inputGroup,f=e.translateX;e=e.translateY;var m=this.options.inputBoxWidth;a(c,{width:d?b.width+ (m?-2:20)+"px":"auto",height:d?b.height-2+"px":"auto",border:"2px solid silver"});d&&m?a(c,{left:f+b.x+"px",top:e+"px"}):a(c,{left:Math.min(Math.round(b.x+f-(c.offsetWidth-b.width)/2),this.chart.chartWidth-c.offsetWidth)+"px",top:e-1-(c.offsetHeight-b.height)/2+"px"})}};f.prototype.hideInput=function(c){(c="min"===c?this.minInput:this.maxInput)&&a(c,{top:"-9999em",border:0,width:"1px",height:"1px"})};f.prototype.defaultInputDateParser=function(a,c,b){var d=a.split("/").join("-").split(" ").join("T"); -1===d.indexOf("T")&&(d+="T00:00");if(c)d+="Z";else{var e;if(e=n.isSafari)e=d,e=!(6=e?"+"+F(-e)+":00":"-"+F(e)+":00")}d=Date.parse(d);w(d)||(a=a.split("-"),d=Date.UTC(u(a[0]),u(a[1])-1,u(a[2])));b&&c&&w(d)&&(d+=b.getTimezoneOffset(d));return d};f.prototype.drawInput=function(c){function b(){var a=m.getInputValue(c),b=d.xAxis[0],e=d.scroller&&d.scroller.xAxis?d.scroller.xAxis: b,f=e.dataMin;e=e.dataMax;var h=m.maxInput,k=m.minInput;a!==Number(x.getAttribute("data-hc-time-previous"))&&w(a)&&(x.setAttribute("data-hc-time-previous",a),p&&h&&w(f)?a>Number(h.getAttribute("data-hc-time"))?a=void 0:ae&&(a=e)),"undefined"!==typeof a&&b.setExtremes(p?a:b.min,p?b.max:a,void 0,void 0,{trigger:"rangeSelectorInput"}))}var d=this.chart,f=this.div,h=this.inputGroup,m=this,g=d.renderer.style||{},u=d.renderer,y=d.options.rangeSelector, p="min"===c,l=k.lang[p?"rangeSelectorFrom":"rangeSelectorTo"];l=u.label(l,0).addClass("highcharts-range-label").attr({padding:l?2:0}).add(h);u=u.label("",0).addClass("highcharts-range-input").attr({padding:2,width:y.inputBoxWidth,height:y.inputBoxHeight,"text-align":"center"}).on("click",function(){m.showInput(c);m[c+"Input"].focus()});d.styledMode||u.attr({stroke:y.inputBoxBorderColor,"stroke-width":1});u.add(h);var x=e("input",{name:c,className:"highcharts-range-selector"},void 0,f);x.setAttribute("type", q(y.inputDateFormat||"%b %e, %Y"));d.styledMode||(l.css(v(g,y.labelStyle)),u.css(v({color:t.neutralColor80},g,y.inputStyle)),a(x,z({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:g.fontSize,fontFamily:g.fontFamily,top:"-9999em"},y.inputStyle)));x.onfocus=function(){m.showInput(c)};x.onblur=function(){x===n.doc.activeElement&&b();m.hideInput(c);m.setInputValue(c);x.blur()};var A=!1;x.onchange=function(){A||(b(),m.hideInput(c), x.blur())};x.onkeypress=function(a){13===a.keyCode&&b()};x.onkeydown=function(a){A=!0;38!==a.keyCode&&40!==a.keyCode||b()};x.onkeyup=function(){A=!1};return{dateBox:u,input:x,label:l}};f.prototype.getPosition=function(){var a=this.chart,c=a.options.rangeSelector;a="top"===c.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+c.buttonPosition.y,inputTop:a+c.inputPosition.y-10}};f.prototype.getYTDExtremes=function(a,c,b){var d=this.chart.time,e=new d.Date(a),f=d.get("FullYear",e);b=b?d.Date.UTC(f, 0,1):+new d.Date(f,0,1);c=Math.max(c,b);e=e.getTime();return{max:Math.min(a||e,e),min:c}};f.prototype.render=function(a,b){var d=this.chart,f=d.renderer,h=d.container,m=d.options,k=m.rangeSelector,g=B(m.chart.style&&m.chart.style.zIndex,0)+1;m=k.inputEnabled;if(!1!==k.enabled){this.rendered||(this.group=f.g("range-selector-group").attr({zIndex:7}).add(),this.div=e("div",void 0,{position:"relative",height:0,zIndex:g}),this.buttonOptions.length&&this.renderButtons(),h.parentNode&&h.parentNode.insertBefore(this.div, h),m&&(this.inputGroup=f.g("input-group").add(this.group),f=this.drawInput("min"),this.minDateBox=f.dateBox,this.minLabel=f.label,this.minInput=f.input,f=this.drawInput("max"),this.maxDateBox=f.dateBox,this.maxLabel=f.label,this.maxInput=f.input));if(m&&(this.setInputValue("min",a),this.setInputValue("max",b),a=d.scroller&&d.scroller.getUnionExtremes()||d.xAxis[0]||{},c(a.dataMin)&&c(a.dataMax)&&(d=d.xAxis[0].minRange||0,this.setInputExtremes("min",a.dataMin,Math.min(a.dataMax,this.getInputValue("max"))- d),this.setInputExtremes("max",Math.max(a.dataMin,this.getInputValue("min"))+d,a.dataMax)),this.inputGroup)){var u=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(a){if(a){var c=a.getBBox().width;c&&(a.attr({x:u}),u+=c+k.inputSpacing)}})}this.alignElements();this.rendered=!0}};f.prototype.renderButtons=function(){var a=this,c=this.buttons,b=this.options,d=k.lang,f=this.chart.renderer,h=v(b.buttonTheme),g=h&&h.states,u=h.width||28;delete h.width;delete h.states;this.buttonGroup= f.g("range-selector-buttons").add(this.group);var y=this.dropdown=e("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:.0001},this.div);p(y,"touchstart",function(){y.style.fontSize="16px"});[[n.isMS?"mouseover":"mouseenter"],[n.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(b){var d=b[0],e=b[1];p(y,d,function(){var b=c[a.currentButtonIndex()];b&&D(b.element,e||d)})});this.zoomText=f.text(d.rangeSelectorZoom,0, 15).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(b.labelStyle),h["stroke-width"]=B(h["stroke-width"],0));e("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,y);this.buttonOptions.forEach(function(b,d){e("option",{textContent:b.title||b.text},void 0,y);c[d]=f.button(b.text,0,0,function(c){var e=b.events&&b.events.click,f;e&&(f=e.call(b,c));!1!==f&&a.clickButton(d);a.isActive=!0},h,g&&g.hover,g&&g.select,g&&g.disabled).attr({"text-align":"center",width:u}).add(a.buttonGroup); b.title&&c[d].attr("title",b.title)})};f.prototype.alignElements=function(){var a=this,c=this.buttonGroup,b=this.buttons,d=this.chart,e=this.group,f=this.inputGroup,h=this.options,k=this.zoomText,g=d.options,u=g.exporting&&!1!==g.exporting.enabled&&g.navigation&&g.navigation.buttonOptions;g=h.buttonPosition;var y=h.inputPosition,p=h.verticalAlign,x=function(c,b){return u&&a.titleCollision(d)&&"top"===p&&"right"===b.align&&b.y-c.getBBox().height-12<(u.y||0)+(u.height||0)+d.spacing[0]?-40:0},l=d.plotLeft; if(e&&g&&y){var q=g.x-d.spacing[3];if(c){this.positionButtons();if(!this.initialButtonGroupWidth){var A=0;k&&(A+=k.getBBox().width+5);b.forEach(function(a,c){A+=a.width;c!==b.length-1&&(A+=h.buttonSpacing)});this.initialButtonGroupWidth=A}l-=d.spacing[3];this.updateButtonStates();k=x(c,g);this.alignButtonGroup(k);e.placed=c.placed=d.hasLoaded}c=0;f&&(c=x(f,y),"left"===y.align?q=l:"right"===y.align&&(q=-Math.max(d.axisOffset[1],-c)),f.align({y:y.y,width:f.getBBox().width,align:y.align,x:y.x+q-2},!0, d.spacingBox),f.placed=d.hasLoaded);this.handleCollision(c);e.align({verticalAlign:p},!0,d.spacingBox);f=e.alignAttr.translateY;c=e.getBBox().height+20;x=0;"bottom"===p&&(x=(x=d.legend&&d.legend.options)&&"bottom"===x.verticalAlign&&x.enabled&&!x.floating?d.legend.legendHeight+B(x.margin,10):0,c=c+x-20,x=f-c-(h.floating?0:h.y)-(d.titleOffset?d.titleOffset[2]:0)-10);if("top"===p)h.floating&&(x=0),d.titleOffset&&d.titleOffset[0]&&(x=d.titleOffset[0]),x+=d.margin[0]-d.spacing[0]||0;else if("middle"=== p)if(y.y===g.y)x=f;else if(y.y||g.y)x=0>y.y||0>g.y?x-Math.min(y.y,g.y):f-c;e.translate(h.x,h.y+Math.floor(x));g=this.minInput;y=this.maxInput;f=this.dropdown;h.inputEnabled&&g&&y&&(g.style.marginTop=e.translateY+"px",y.style.marginTop=e.translateY+"px");f&&(f.style.marginTop=e.translateY+"px")}};f.prototype.alignButtonGroup=function(a,c){var b=this.chart,d=this.buttonGroup,e=this.options.buttonPosition,f=b.plotLeft-b.spacing[3],h=e.x-b.spacing[3];"right"===e.align?h+=a-f:"center"===e.align&&(h-=f/ 2);d&&d.align({y:e.y,width:B(c,this.initialButtonGroupWidth),align:e.align,x:h},!0,b.spacingBox)};f.prototype.positionButtons=function(){var a=this.buttons,c=this.chart,b=this.options,d=this.zoomText,e=c.hasLoaded?"animate":"attr",f=b.buttonPosition,h=c.plotLeft,k=h;d&&"hidden"!==d.visibility&&(d[e]({x:B(h+f.x,h)}),k+=f.x+d.getBBox().width+5);this.buttonOptions.forEach(function(c,d){if("hidden"!==a[d].visibility)a[d][e]({x:k}),k+=a[d].width+b.buttonSpacing;else a[d][e]({x:h})})};f.prototype.handleCollision= function(a){var c=this,b=this.chart,d=this.buttonGroup,e=this.inputGroup,f=this.options,h=f.buttonPosition,k=f.dropdown,g=f.inputPosition;f=function(){var a=0;c.buttons.forEach(function(c){c=c.getBBox();c.width>a&&(a=c.width)});return a};var m=function(c){if(e&&d){var b=e.alignAttr.translateX+e.alignOptions.x-a+e.getBBox().x+2,f=e.alignOptions.width,k=d.alignAttr.translateX+d.getBBox().x;return k+c>b&&b+f>k&&h.y=-a?0:-a),translateY:e.alignAttr.translateY+d.getBBox().height+10})};if(d){if("always"===k){this.collapseButtons(a);m(f())&&u();return}"never"===k&&this.expandButtons()}e&&d?g.align===h.align||m(this.initialButtonGroupWidth+20)?"responsive"===k?(this.collapseButtons(a),m(f())&&u()):u():"responsive"===k&&this.expandButtons():d&&"responsive"===k&&(this.initialButtonGroupWidth>b.plotWidth?this.collapseButtons(a):this.expandButtons())};f.prototype.collapseButtons=function(a){var c=this.buttons, b=this.buttonOptions,d=this.dropdown,e=this.options,f=this.zoomText,h=function(a){return{text:a?a+" \u25be":"\u25be",width:"auto",paddingLeft:8,paddingRight:8}};f&&f.hide();var k=!1;b.forEach(function(a,b){b=c[b];2!==b.state?b.hide():(b.show(),b.attr(h(a.text)),k=!0)});k||(d&&(d.selectedIndex=0),c[0].show(),c[0].attr(h(this.zoomText&&this.zoomText.textStr)));b=e.buttonPosition.align;this.positionButtons();"right"!==b&&"center"!==b||this.alignButtonGroup(a,c[this.currentButtonIndex()].getBBox().width); this.showDropdown()};f.prototype.expandButtons=function(){var a=this.buttons,c=this.buttonOptions,b=this.options,d=this.zoomText;this.hideDropdown();d&&d.show();c.forEach(function(c,d){d=a[d];d.show();d.attr({text:c.text,width:b.buttonTheme.width||28,paddingLeft:"unset",paddingRight:"unset"});2>d.state&&d.setState(0)});this.positionButtons()};f.prototype.currentButtonIndex=function(){var a=this.dropdown;return a&&0e&&0>d||0e?c.accessibility&&(c.accessibility.keyboardNavigation.tabindexContainer.focus(),c.accessibility.keyboardNavigation[0>a?"prev":"next"]()):b&&(a=b[e?"maxDateBox":"minDateBox"],b= b[e?"maxInput":"minInput"],a&&b&&c.setFocusToElement(a,b))},onInputNavInit:function(c){var b=this,e=this,f=this.chart,k=0this.series.length?"Single":"Multiple";return(this.langFormat("accessibility.chartTypes."+a+d, c)||this.langFormat("accessibility.chartTypes.default"+d,c))+(b?" "+b:"")};l=function(){};l.prototype=new t;g(l.prototype,{init:function(){var a=this.chart,b=this;this.initRegionsDefinitions();this.addEvent(a,"aftergetTableAST",function(a){b.onDataTableCreated(a)});this.addEvent(a,"afterViewData",function(a){b.dataTableDiv=a;setTimeout(function(){b.focusDataTable()},300)});this.announcer=new r(a,"assertive")},initRegionsDefinitions:function(){var a=this;this.screenReaderSections={before:{element:null, buildContent:function(b){var c=b.options.accessibility.screenReaderSection.beforeChartFormatter;return c?c(b):a.defaultBeforeChartFormatter(b)},insertIntoDOM:function(a,b){b.renderTo.insertBefore(a,b.renderTo.firstChild)},afterInserted:function(){"undefined"!==typeof a.sonifyButtonId&&a.initSonifyButton(a.sonifyButtonId);"undefined"!==typeof a.dataTableButtonId&&a.initDataTableButton(a.dataTableButtonId)}},after:{element:null,buildContent:function(b){var c=b.options.accessibility.screenReaderSection.afterChartFormatter; return c?c(b):a.defaultAfterChartFormatter()},insertIntoDOM:function(a,b){b.renderTo.insertBefore(a,b.container.nextSibling)}}}},onChartRender:function(){var a=this;this.linkedDescriptionElement=this.getLinkedDescriptionElement();this.setLinkedDescriptionAttrs();Object.keys(this.screenReaderSections).forEach(function(b){a.updateScreenReaderSection(b)})},getLinkedDescriptionElement:function(){var a=this.chart.options.accessibility.linkedDescription;if(a){if("string"!==typeof a)return a;a=p(a,this.chart); a=e.querySelectorAll(a);if(1===a.length)return a[0]}},setLinkedDescriptionAttrs:function(){var a=this.linkedDescriptionElement;a&&(a.setAttribute("aria-hidden","true"),D(a,"highcharts-linked-description"))},updateScreenReaderSection:function(a){var c=this.chart,d=this.screenReaderSections[a],e=d.buildContent(c),f=d.element=d.element||this.createElement("div"),h=f.firstChild||this.createElement("div");this.setScreenReaderSectionAttribs(f,a);b.setElementHTML(h,e);f.appendChild(h);d.insertIntoDOM(f, c);B(h);v(c,h);d.afterInserted&&d.afterInserted()},setScreenReaderSectionAttribs:function(a,b){var c=this.chart,d=c.langFormat("accessibility.screenReaderSection."+b+"RegionLabel",{chart:c});E(a,{id:"highcharts-screen-reader-region-"+b+"-"+c.index,"aria-label":d});a.style.position="relative";"all"===c.options.accessibility.landmarkVerbosity&&d&&a.setAttribute("role","region")},defaultBeforeChartFormatter:function(){var a=this.chart,b=a.options.accessibility.screenReaderSection.beforeChartFormat,d= this.getAxesDescription(),e=a.sonify&&a.options.sonification&&a.options.sonification.enabled,f="highcharts-a11y-sonify-data-btn-"+a.index,h="hc-linkto-highcharts-data-table-"+a.index,k=c(a),g=a.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:a});d={headingTagName:N(a.renderTo),chartTitle:w(a),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:d.xAxis,yAxisDescription:d.yAxis,playAsSoundButton:e? this.getSonifyButtonText(f):"",viewTableButton:a.getCSV?this.getDataTableButtonText(h):"",annotationsTitle:k?g:"",annotationsList:k};a=n.i18nFormat(b,d,a);this.dataTableButtonId=h;this.sonifyButtonId=f;return a.replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},defaultAfterChartFormatter:function(){var a=this.chart,b=a.options.accessibility.screenReaderSection.afterChartFormat,c={endOfChartMarker:this.getEndOfChartMarkerText()};return n.i18nFormat(b,c,a).replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},getLinkedDescription:function(){var a= this.linkedDescriptionElement;return F(a&&a.innerHTML||"")},getLongdescText:function(){var a=this.chart.options,b=a.caption;b=b&&b.text;var c=this.getLinkedDescription();return a.accessibility.description||c||b||""},getTypeDescriptionText:function(){var a=this.chart;return a.types?a.options.accessibility.typeDescription||a.getTypeDescription(a.types):""},getDataTableButtonText:function(a){var b=this.chart;b=b.langFormat("accessibility.table.viewAsDataTableButtonText",{chart:b,chartTitle:w(b)});return'"},getSonifyButtonText:function(a){var b=this.chart;if(b.options.sonification&&!1===b.options.sonification.enabled)return"";b=b.langFormat("accessibility.sonification.playAsSoundButtonText",{chart:b,chartTitle:w(b)});return'"},getSubtitleText:function(){var a=this.chart.options.subtitle;return F(a&&a.text||"")},getEndOfChartMarkerText:function(){var a=this.chart,b=a.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:a});return'
'+b+"
"},onDataTableCreated:function(a){var b=this.chart;if(b.options.accessibility.enabled){this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded","true");var c=a.tree.attributes||{};c.tabindex=-1;c.summary=b.langFormat("accessibility.table.tableSummary",{chart:b});a.tree.attributes=c}},focusDataTable:function(){var a=this.dataTableDiv;(a=a&&a.getElementsByTagName("table")[0])&&a.focus&&a.focus()},initSonifyButton:function(a){var b=this,c=this.sonifyButton= M(a),d=this.chart,e=function(a){c&&(c.setAttribute("aria-hidden","true"),c.setAttribute("aria-label",""));a.preventDefault();a.stopPropagation();a=d.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:d});b.announcer.announce(a);setTimeout(function(){c&&(c.removeAttribute("aria-hidden"),c.removeAttribute("aria-label"));d.sonify&&d.sonify()},1E3)};c&&d&&(E(c,{tabindex:-1}),c.onclick=function(a){(d.options.accessibility&&d.options.accessibility.screenReaderSection.onPlayAsSoundClick|| e).call(this,a,d)})},initDataTableButton:function(a){var b=this.viewDataTableButton=M(a),c=this.chart;a=a.replace("hc-linkto-","");b&&(E(b,{tabindex:-1,"aria-expanded":!!M(a)}),b.onclick=c.options.accessibility.screenReaderSection.onViewDataTableClick||function(){c.viewData()})},getAxesDescription:function(){var b=this.chart,c=function(c,d){c=b[c];return 1b.types.indexOf("map"),e=!!b.hasCartesianSeries, f=c("xAxis",!b.angular&&e&&d);c=c("yAxis",e&&d);d={};f&&(d.xAxis=this.getAxisDescriptionText("xAxis"));c&&(d.yAxis=this.getAxisDescriptionText("yAxis"));return d},getAxisDescriptionText:function(a){var b=this.chart,c=b[a];return b.langFormat("accessibility.axis."+a+"Description"+(1{chartTitle}
{typeDescription}
{chartSubtitle}
{chartLongdesc}
{playAsSoundButton}
{viewTableButton}
{xAxisDescription}
{yAxisDescription}
{annotationsTitle}{annotationsList}
", afterChartFormat:"{endOfChartMarker}",axisRangeDateFormat:"%Y-%m-%d %H:%M:%S"},series:{describeSingleSeries:!1,pointDescriptionEnabledThreshold:200},point:{valueDescriptionFormat:"{index}. {xDescription}{separator}{value}."},landmarkVerbosity:"all",linkedDescription:'*[data-highcharts-chart="{index}"] + .highcharts-description',keyboardNavigation:{enabled:!0,focusBorder:{enabled:!0,hideBrowserFocusOutline:!0,style:{color:b.highlightColor80,lineWidth:2,borderRadius:3},margin:2},order:["series","zoom", "rangeSelector","legend","chartMenu"],wrapAround:!0,seriesNavigation:{skipNullPoints:!0,pointNavigationEnabledThreshold:!1}},announceNewData:{enabled:!1,minAnnounceInterval:5E3,interruptUser:!1}},legend:{accessibility:{enabled:!0,keyboardNavigation:{enabled:!0}}},exporting:{accessibility:{enabled:!0}}}});v(b,"Accessibility/Options/LangOptions.js",[],function(){return{accessibility:{defaultChartTitle:"Chart",chartContainerLabel:"{title}. Highcharts interactive chart.",svgContainerLabel:"Interactive chart", drillUpButton:"{buttonText}",credits:"Chart credits: {creditsStr}",thousandsSep:",",svgContainerTitle:"",graphicContainerLabel:"",screenReaderSection:{beforeRegionLabel:"Chart screen reader information.",afterRegionLabel:"",annotations:{heading:"Chart annotations summary",descriptionSinglePoint:"{annotationText}. Related to {annotationPoint}",descriptionMultiplePoints:"{annotationText}. Related to {annotationPoint}{ Also related to, #each(additionalAnnotationPoints)}",descriptionNoPoints:"{annotationText}"}, endOfChartMarker:"End of interactive chart."},sonification:{playAsSoundButtonText:"Play as sound, {chartTitle}",playAsSoundClickAnnouncement:"Play"},legend:{legendLabelNoTitle:"Toggle series visibility",legendLabel:"Chart legend: {legendTitle}",legendItem:"Show {itemName}"},zoom:{mapZoomIn:"Zoom chart",mapZoomOut:"Zoom out chart",resetZoomButton:"Reset zoom"},rangeSelector:{dropdownLabel:"{rangeTitle}",minInputLabel:"Select start date.",maxInputLabel:"Select end date.",clickButtonAnnouncement:"Viewing {axisRangeDescription}"}, table:{viewAsDataTableButtonText:"View as data table, {chartTitle}",tableSummary:"Table representation of chart."},announceNewData:{newDataAnnounce:"Updated data for chart {chartTitle}",newSeriesAnnounceSingle:"New data series: {seriesDesc}",newPointAnnounceSingle:"New data point: {pointDesc}",newSeriesAnnounceMultiple:"New data series in chart {chartTitle}: {seriesDesc}",newPointAnnounceMultiple:"New data point in chart {chartTitle}: {pointDesc}"},seriesTypeDescriptions:{boxplot:"Box plot charts are typically used to display groups of statistical data. Each data point in the chart can have up to 5 values: minimum, lower quartile, median, upper quartile, and maximum.", arearange:"Arearange charts are line charts displaying a range between a lower and higher value for each point.",areasplinerange:"These charts are line charts displaying a range between a lower and higher value for each point.",bubble:"Bubble charts are scatter charts where each data point also has a size value.",columnrange:"Columnrange charts are column charts displaying a range between a lower and higher value for each point.",errorbar:"Errorbar series are used to display the variability of the data.", funnel:"Funnel charts are used to display reduction of data in stages.",pyramid:"Pyramid charts consist of a single pyramid with item heights corresponding to each point value.",waterfall:"A waterfall chart is a column chart where each column contributes towards a total end value."},chartTypes:{emptyChart:"Empty chart",mapTypeDescription:"Map of {mapTitle} with {numSeries} data series.",unknownMap:"Map of unspecified region with {numSeries} data series.",combinationChart:"Combination chart with {numSeries} data series.", defaultSingle:"Chart with {numPoints} data {#plural(numPoints, points, point)}.",defaultMultiple:"Chart with {numSeries} data series.",splineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",splineMultiple:"Line chart with {numSeries} lines.",lineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",lineMultiple:"Line chart with {numSeries} lines.",columnSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",columnMultiple:"Bar chart with {numSeries} data series.", barSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",barMultiple:"Bar chart with {numSeries} data series.",pieSingle:"Pie chart with {numPoints} {#plural(numPoints, slices, slice)}.",pieMultiple:"Pie chart with {numSeries} pies.",scatterSingle:"Scatter chart with {numPoints} {#plural(numPoints, points, point)}.",scatterMultiple:"Scatter chart with {numSeries} data series.",boxplotSingle:"Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotMultiple:"Boxplot with {numSeries} data series.", bubbleSingle:"Bubble chart with {numPoints} {#plural(numPoints, bubbles, bubble)}.",bubbleMultiple:"Bubble chart with {numSeries} data series."},axis:{xAxisDescriptionSingular:"The chart has 1 X axis displaying {names[0]}. {ranges[0]}",xAxisDescriptionPlural:"The chart has {numAxes} X axes displaying {#each(names, -1) }and {names[-1]}.",yAxisDescriptionSingular:"The chart has 1 Y axis displaying {names[0]}. {ranges[0]}",yAxisDescriptionPlural:"The chart has {numAxes} Y axes displaying {#each(names, -1) }and {names[-1]}.", timeRangeDays:"Range: {range} days.",timeRangeHours:"Range: {range} hours.",timeRangeMinutes:"Range: {range} minutes.",timeRangeSeconds:"Range: {range} seconds.",rangeFromTo:"Range: {rangeFrom} to {rangeTo}.",rangeCategories:"Range: {numCategories} categories."},exporting:{chartMenuLabel:"Chart menu",menuButtonLabel:"View chart menu",exportRegionLabel:"Chart menu"},series:{summary:{"default":"{name}, series {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",defaultCombination:"{name}, series {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.", line:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",lineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",spline:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",splineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.",column:"{name}, bar series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bars, bar)}.", columnCombination:"{name}, series {ix} of {numSeries}. Bar series with {numPoints} {#plural(numPoints, bars, bar)}.",bar:"{name}, bar series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bars, bar)}.",barCombination:"{name}, series {ix} of {numSeries}. Bar series with {numPoints} {#plural(numPoints, bars, bar)}.",pie:"{name}, pie {ix} of {numSeries} with {numPoints} {#plural(numPoints, slices, slice)}.",pieCombination:"{name}, series {ix} of {numSeries}. Pie with {numPoints} {#plural(numPoints, slices, slice)}.", scatter:"{name}, scatter plot {ix} of {numSeries} with {numPoints} {#plural(numPoints, points, point)}.",scatterCombination:"{name}, series {ix} of {numSeries}, scatter plot with {numPoints} {#plural(numPoints, points, point)}.",boxplot:"{name}, boxplot {ix} of {numSeries} with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotCombination:"{name}, series {ix} of {numSeries}. Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.",bubble:"{name}, bubble series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bubbles, bubble)}.", bubbleCombination:"{name}, series {ix} of {numSeries}. Bubble series with {numPoints} {#plural(numPoints, bubbles, bubble)}.",map:"{name}, map {ix} of {numSeries} with {numPoints} {#plural(numPoints, areas, area)}.",mapCombination:"{name}, series {ix} of {numSeries}. Map with {numPoints} {#plural(numPoints, areas, area)}.",mapline:"{name}, line {ix} of {numSeries} with {numPoints} data {#plural(numPoints, points, point)}.",maplineCombination:"{name}, series {ix} of {numSeries}. Line with {numPoints} data {#plural(numPoints, points, point)}.", mapbubble:"{name}, bubble series {ix} of {numSeries} with {numPoints} {#plural(numPoints, bubbles, bubble)}.",mapbubbleCombination:"{name}, series {ix} of {numSeries}. Bubble series with {numPoints} {#plural(numPoints, bubbles, bubble)}."},description:"{description}",xAxisDescription:"X axis, {name}",yAxisDescription:"Y axis, {name}",nullPointValue:"No value",pointAnnotationsDescription:"{Annotation: #each(annotations). }"}}}});v(b,"Accessibility/Options/DeprecatedOptions.js",[b["Core/Utilities.js"]], function(b){function g(b,f,e){for(var a,c=0;cf?g.length+f:Math.min(f,g.length),a=0;ae?(b=g[g.length+e],"undefined"===typeof b&&(b=g[0])):(b=g[e],"undefined"===typeof b&&(b=g[g.length-1]))),"undefined"!==typeof b?b:""):"{"+b+"}"}var t=g.format,r=n.pick;b.i18nFormat=function(b,g,k){var f=function(a,b){a=a.slice(b||0);var c=a.indexOf("{"),d=a.indexOf("}");if(-1c)return{statement:a.substring(c+1,d),begin:b+c+1,end:b+d}}, e=[],a=0;do{var c=f(b,a);var d=b.substring(a,c&&c.begin-1);d.length&&e.push({value:d,type:"constant"});c&&e.push({value:c.statement,type:"statement"});a=c?c.end+1:a+1}while(c);e.forEach(function(a){"statement"===a.type&&(a.value=l(a.value,g))});return t(e.reduce(function(a,b){return a+b.value},""),g,k)};b.Chart.prototype.langFormat=function(f,g){f=f.split(".");for(var k=this.options.lang,l=0;l