UNPKG

highcharts

Version:
13 lines 137 kB
let e;/** * Highcharts JS v12.6.0 (2026-04-13) * @module highcharts/modules/accessibility * @requires highcharts * * Accessibility module * * (c) 2010-2026 Highsoft AS * Author: Øystein Moseng * * A commercial license may be required depending on use. * See www.highcharts.com/license */import*as t from"../highcharts.js";var i,s,n,r,o={};o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let a=t.default;var l=o.n(a);let{doc:h,win:c}=l();function d(e,t,i,s={}){let n="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(n,"hcEvents")||(n.hcEvents={});let r=n.hcEvents;l().Point&&e instanceof l().Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let o=e.addEventListener;o&&o.call(e,t,i,!!l().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==t.indexOf("touch"):s.passive,capture:!1}),r[t]||(r[t]=[]);let a={fn:i,order:"number"==typeof s.order?s.order:1/0};return r[t].push(a),r[t].sort((e,t)=>e.order-t.order),function(){F(e,t,i)}}function u(e,t,i){let s,n=k(t)&&!f(i),r=(t,i)=>{f(t)?e.setAttribute(i,t):n?(s=e.getAttribute(i))||"class"!==i||(s=e.getAttribute(i+"Name")):e.removeAttribute(i)};return k(t)?r(i,t):N(t,r),s}function p(e,t,i){return e>t?e<i?e:i:t}function g(e,t){return e>1e14?e:parseFloat(e.toPrecision(t||14))}function m(e,t=0,i){let s=t%2/2,n=i?-1:1;return(Math.round(e*n-s)+s)*n}function b(e,t){v(e.style,t)}function f(e){return null!=e}function x(e,t,i){N(e,function(s,n){s!==t&&s?.destroy&&s.destroy(),(s?.destroy||!i)&&delete e[n]})}function y(e,t){let i=e.length;for(;i--;)if(e[i]===t){e.splice(i,1);break}}function v(e,t){let i;for(i in e||(e={}),t)e[i]=t[i];return e}function w(e,t,i,s){if(i=i||{},h?.createEvent&&(e.dispatchEvent||e.fireEvent&&e!==l())){let s=h.createEvent("Events");s.initEvent(t,!0,!0),i=v(s,i),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(t,i)}else if(e.hcEvents){i.target||v(i,{preventDefault:function(){i.defaultPrevented=!0},target:e,type:t});let s=[],n=e,r=!1;for(;n.hcEvents;)Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents[t]&&(s.length&&(r=!0),s.unshift.apply(s,n.hcEvents[t])),n=Object.getPrototypeOf(n);r&&s.sort((e,t)=>e.order-t.order),s.forEach(t=>{!1===t.fn.call(e,i,e)&&i.preventDefault()})}s&&!i.defaultPrevented&&s.call(e,i)}function E(e,t){let i=e.split(".");for(;i.length&&f(t);){let e=i.shift();if(void 0===e||"__proto__"===e)return;if("this"===e){let e;return S(t)&&(e=t["@this"]),e??t}let s=t[e.replace(/[\\'"]/g,"")];if(!f(s)||"function"==typeof s||"number"==typeof s.nodeType||s===c)return;t=s}return t}let A=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){let i,s=e.length;for(i=0;i<s;i++)if(t(e[i],i))return e[i]};function T(e){f(e)&&clearTimeout(e)}function M(e){return S(e)&&"number"==typeof e.nodeType}function C(e){return"number"==typeof e&&!isNaN(e)&&e<1/0&&e>-1/0}function k(e){return"string"==typeof e}function P(e){let t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function S(e,t){return!!e&&"object"==typeof e&&(!t||!P(e))}function D(e,...t){let i,s=[e,...t],n={},r=function(e,t){return"object"!=typeof e&&(e={}),N(t,function(i,s){if("__proto__"!==s&&"constructor"!==s){let n;!S(i,!0)||(n=i?.constructor,S(i,!0)&&!M(i)&&n?.name&&"Object"!==n.name)||M(i)?e[s]=t[s]:e[s]=r(e[s]||{},i)}}),e};!0===e&&(n=s[1],s=Array.prototype.slice.call(s,2));let o=s.length;for(i=0;i<o;i++)n=r(n,s[i]);return n}function N(e,t,i){for(let s in e)Object.hasOwnProperty.call(e,s)&&t.call(i||e[s],e[s],s,e)}function B(){let e=arguments,t=e.length;for(let i=0;i<t;i++){let t=e[i];if(null!=t)return t}}function I(e,t){return 0>e.indexOf(t)&&!!e.push(t)}function F(e,t,i){function s(t,i){let s=e.removeEventListener;s&&s.call(e,t,i,!1)}function n(i){let n,r;e.nodeName&&(t?(n={})[t]=!0:n=i,N(n,function(e,t){if(i[t])for(r=i[t].length;r--;)s(t,i[t][r].fn)}))}let r="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(r,"hcEvents")){let e=r.hcEvents;if(t){let r=e[t]||[];i?(e[t]=r.filter(function(e){return i!==e.fn}),s(t,i)):(n(e),e[t]=[])}else n(e),delete r.hcEvents}}function O(e,t,i){return t>0?setTimeout(e,t,i):(e.call(0,i),-1)}let{doc:R,win:L}=l(),H=L.EventTarget&&new L.EventTarget||"none";function z(e){if("function"==typeof L.MouseEvent)return new L.MouseEvent(e.type,e);if(R?.createEvent){let t=R.createEvent("MouseEvent");if(t.initMouseEvent)return t.initMouseEvent(e.type,e.bubbles,e.cancelable,e.view||L,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),t}return q(e.type)}function q(e,t,i){let s=t||{x:0,y:0};if("function"==typeof L.MouseEvent)return new L.MouseEvent(e,{bubbles:!0,cancelable:!0,composed:!0,button:0,buttons:1,relatedTarget:i||H,view:L,detail:+("click"===e),screenX:s.x,screenY:s.y,clientX:s.x,clientY:s.y});if(R?.createEvent){let t=R.createEvent("MouseEvent");if(t.initMouseEvent)return t.initMouseEvent(e,!0,!0,L,+("click"===e),s.x,s.y,s.x,s.y,!1,!1,!1,!1,0,null),t}return{type:e}}let K={addClass:function(e,t){e.classList?e.classList.add(t):0>e.className.indexOf(t)&&(e.className+=" "+t)},cloneMouseEvent:z,cloneTouchEvent:function(e){let t=e=>{let t=[];for(let i=0;i<e.length;++i){let s=e.item(i);s&&t.push(s)}return t};if("function"==typeof L.TouchEvent){let i=new L.TouchEvent(e.type,{touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed,detail:e.detail,view:e.view});return e.defaultPrevented&&i.preventDefault(),i}let i=z(e);return i.touches=e.touches,i.changedTouches=e.changedTouches,i.targetTouches=e.targetTouches,i},escapeStringForHTML:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},getElement:function(e){return R.getElementById(e)},getFakeMouseEvent:q,getHeadingTagNameForElement:function(e){let t=e=>"h"+Math.min(6,parseInt(e.slice(1),10)+1),i=e=>/^H[1-6]$/i.test(e),s=e=>{let n=(e=>{let t=e;for(;t=t.previousSibling;){let e=t.tagName||"";if(i(e))return e}return""})(e);if(n)return t(n);let r=e.parentElement;if(!r)return"h6";let o=r.tagName;return i(o)?t(o):s(r)};return s(e)},removeChildNodes:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(t,"g"),"")},removeElement:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},reverseChildNodes:function(e){let t=e.childNodes.length;for(;t--;)e.appendChild(e.childNodes[t])},simulatedEventTarget:H,stripHTMLTagsFromString:function(e,t=!1){return"string"==typeof e?t?e.replace(/<\/?[^>]+(>|$)/g,""):e.replace(/<\/?(?!\s)[^>]+(>|$)/g,""):e},visuallyHideElement:function(e){b(e,{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:.01})}},G=t.default.Templating;var U=o.n(G);let{format:W}=U();var V=i||(i={});function X(e,t,i){let s=(e,t)=>{let i=e.slice(t||0),s=i.indexOf("{"),n=i.indexOf("}");if(s>-1&&n>s)return{statement:i.substring(s+1,n),begin:t+s+1,end:t+n}},n=[],r,o,a=0;do r=s(e,a),(o=e.substring(a,r&&r.begin-1)).length&&n.push({value:o,type:"constant"}),r&&n.push({value:r.statement,type:"statement"}),a=r?r.end+1:a+1;while(r);return n.forEach(e=>{"statement"===e.type&&(e.value=function(e,t){let i,s,n=e.indexOf("#each("),r=e.indexOf("#plural("),o=e.indexOf("["),a=e.indexOf("]");if(n>-1){let r=e.slice(n).indexOf(")")+n,o=e.substring(0,n),a=e.substring(r+1),l=e.substring(n+6,r).split(","),h=Number(l[1]),c;if(s="",i=E(l[0],t)){c=(h=isNaN(h)?i.length:h)<0?i.length+h:Math.min(h,i.length);for(let e=0;e<c;++e)s+=o+i[e]+a}return s.length?s:""}if(r>-1){var l;let i=e.slice(r).indexOf(")")+r,n=e.substring(r+8,i).split(",");switch(Number(E(n[0],t))){case 0:s=B(n[4],n[1]);break;case 1:s=B(n[2],n[1]);break;case 2:s=B(n[3],n[1]);break;default:s=n[1]}return s?(l=s).trim&&l.trim()||l.replace(/^\s+|\s+$/g,""):""}if(o>-1){let s,n=e.substring(0,o),r=Number(e.substring(o+1,a));return i=E(n,t),!isNaN(r)&&i&&(r<0?void 0===(s=i[i.length+r])&&(s=i[0]):void 0===(s=i[r])&&(s=i[i.length-1])),void 0!==s?s:""}return"{"+e+"}"}(e.value,t))}),W(n.reduce((e,t)=>e+t.value,""),t,i)}function Y(e,t){let i=e.split("."),s=this.options.lang,n=0;for(;n<i.length;++n)s=s&&s[i[n]];return"string"==typeof s?X(s,t,this):""}V.compose=function(e){let t=e.prototype;t.langFormat||(t.langFormat=Y)},V.i18nFormat=X;let j=i,{doc:Z}=l(),{stripHTMLTagsFromString:_}=K;function $(e){if(e.points&&e.points.length){let t=A(e.points,e=>!!e.graphic);return t&&t.graphic&&t.graphic.element}}function Q(e){let t=$(e);return t&&t.parentNode||e.graph&&e.graph.element||e.group&&e.group.element}let J={fireEventOnWrappedOrUnwrappedElement:function e(t,i){let s=i.type,n=t.hcEvents;Z?.createEvent&&(t.dispatchEvent||t.fireEvent)?t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(s,i):n&&n[s]?w(t,s,i):t.element&&e(t.element,i)},getChartTitle:function(e){return _(e.options.title.text||e.langFormat("accessibility.defaultChartTitle",{chart:e}),e.renderer.forExport)},getAxisDescription:function(e){return e&&(e.options.accessibility?.description||e.axisTitle?.textStr||e.options.id||e.categories&&e.chart.langFormat("accessibility.axis.defaultAxisNames.categories",{})||e.dateTime&&e.chart.langFormat("accessibility.axis.defaultAxisNames.time",{})||e.chart.langFormat("accessibility.axis.defaultAxisNames.values",{}))},getAxisRangeDescription:function(e){var t,i,s;let n,r,o,a,l,h,c,d,u,p,g,m,b=e.options||{};return b.accessibility&&void 0!==b.accessibility.rangeDescription?b.accessibility.rangeDescription:e.categories?(n=(t=e).chart,t.dataMax&&t.dataMin?n.langFormat("accessibility.axis.rangeCategories",{chart:n,axis:t,numCategories:t.dataMax-t.dataMin+1}):""):e.dateTime&&(0===e.min||0===e.dataMin)?(r=(i=e).chart,o={},a=i.dataMin||i.min||0,l=i.dataMax||i.max||0,h="Seconds",o.Seconds=(l-a)/1e3,o.Minutes=o.Seconds/60,o.Hours=o.Minutes/60,o.Days=o.Hours/24,["Minutes","Hours","Days"].forEach(function(e){o[e]>2&&(h=e)}),c=o[h].toFixed(+("Seconds"!==h&&"Minutes"!==h)),r.langFormat("accessibility.axis.timeRange"+h,{chart:r,axis:i,range:c.replace(".0","")})):(p=(u=(d=(s=e).chart).options)&&u.accessibility&&u.accessibility.screenReaderSection.axisRangeDateFormat||"",g={min:s.dataMin||s.min||0,max:s.dataMax||s.max||0},m=function(e){return s.dateTime?d.time.dateFormat(p,g[e]):g[e].toString()},d.langFormat("accessibility.axis.rangeFromTo",{chart:d,axis:s,rangeFrom:m("min"),rangeTo:m("max")}))},getPointFromXY:function(e,t,i){let s=e.length,n;for(;s--;)if(n=A(e[s].points||[],function(e){return e.x===t&&e.y===i}))return n},getSeriesFirstPointElement:$,getSeriesFromName:function(e,t){return t?(e.series||[]).filter(function(e){return e.name===t}):e.series},getSeriesA11yElement:Q,unhideChartElementFromAT:function e(t,i){i.setAttribute("aria-hidden",!1),i!==t.renderTo&&i.parentNode&&i.parentNode!==Z.body&&(Array.prototype.forEach.call(i.parentNode.childNodes,function(e){e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden",!0)}),e(t,i.parentNode))},hideSeriesFromAT:function(e){let t=Q(e);t&&t.setAttribute("aria-hidden",!0)},scrollAxisToPoint:function(e){let t=e.series.xAxis,i=e.series.yAxis,s=t&&t.scrollbar?t:i,n=s&&s.scrollbar;if(n&&f(n.to)&&f(n.from)){let t=n.to-n.from,i=function(e,t){if(!f(e.dataMin)||!f(e.dataMax))return 0;let i=e.toPixels(e.dataMin),s=e.toPixels(e.dataMax),n="xAxis"===e.coll?"x":"y";return(e.toPixels(t[n]||0)-i)/(s-i)}(s,e);n.updatePosition(i-t/2,i+t/2),w(n,"changed",{from:n.from,to:n.to,trigger:"scrollbar",DOMEvent:null})}}},{doc:ee}=l(),{removeElement:et}=K,ei=class{constructor(){this.elements=[]}createElement(){let e=ee.createElement.apply(ee,arguments);return this.elements.push(e),e}removeElement(e){et(e),this.elements.splice(this.elements.indexOf(e),1)}destroyCreatedElements(){this.elements.forEach(function(e){et(e)}),this.elements=[]}},es=class{constructor(){this.eventRemovers=[]}addEvent(){let e=d.apply(l(),arguments);return this.eventRemovers.push({element:arguments[0],remover:e}),e}removeEvent(e){let t=this.eventRemovers.map(e=>e.remover).indexOf(e);this.eventRemovers[t].remover(),this.eventRemovers.splice(t,1)}removeAddedEvents(){this.eventRemovers.map(e=>e.remover).forEach(e=>e()),this.eventRemovers=[]}},{fireEventOnWrappedOrUnwrappedElement:en}=J,{getFakeMouseEvent:er}=K,eo=class{destroy(){}getKeyboardNavigation(){return[]}init(){}onChartRender(){}onChartUpdate(){}initBase(e,t){this.chart=e,this.eventProvider=new es,this.domElementProvider=new ei,this.proxyProvider=t,this.keyCodes={left:37,right:39,up:38,down:40,enter:13,space:32,esc:27,tab:9,pageUp:33,pageDown:34,end:35,home:36}}addEvent(e,t,i,s){return this.eventProvider.addEvent(e,t,i,s)}createElement(e,t){return this.domElementProvider.createElement(e,t)}fakeClickEvent(e){en(e,er("click"))}destroyBase(){this.domElementProvider.destroyCreatedElements(),this.eventProvider.removeAddedEvents()}},ea=class{constructor(e,t){this.chart=e,this.keyCodeMap=t.keyCodeMap||[],this.validate=t.validate,this.init=t.init,this.terminate=t.terminate,this.response={success:1,prev:2,next:3,noHandler:4,fail:5}}run(e){let t=e.which||e.keyCode,i=this.response.noHandler,s=A(this.keyCodeMap,function(e){return e[0].indexOf(t)>-1});return s?i=s[1].call(this,t,e):9===t&&(i=this.response[e.shiftKey?"prev":"next"]),i}},{unhideChartElementFromAT:el,getChartTitle:eh}=J,{doc:ec}=l(),{stripHTMLTagsFromString:ed}=K,eu=class extends eo{onChartUpdate(){this.handleSVGTitleElement(),this.setSVGContainerLabel(),this.setGraphicContainerAttrs(),this.setRenderToAttrs(),this.makeCreditsAccessible()}handleSVGTitleElement(){let e=this.chart,t="highcharts-title-"+e.index,i=ed(e.langFormat("accessibility.svgContainerTitle",{chartTitle:eh(e)}));if(i.length){let s=this.svgTitleElement=this.svgTitleElement||ec.createElementNS("http://www.w3.org/2000/svg","title");s.textContent=i,s.id=t,e.renderTo.insertBefore(s,e.renderTo.firstChild)}}setSVGContainerLabel(){let e=this.chart,t=e.langFormat("accessibility.svgContainerLabel",{chartTitle:eh(e)});e.renderer.box&&t.length&&e.renderer.box.setAttribute("aria-label",t)}setGraphicContainerAttrs(){let e=this.chart,t=e.langFormat("accessibility.graphicContainerLabel",{chartTitle:eh(e)});t.length&&e.container.setAttribute("aria-label",t)}setRenderToAttrs(){let e=this.chart,t="disabled"!==e.options.accessibility.landmarkVerbosity,i=e.langFormat("accessibility.chartContainerLabel",{title:eh(e),chart:e});i&&(e.renderTo.setAttribute("role",t?"region":"group"),e.renderTo.setAttribute("aria-label",i))}makeCreditsAccessible(){let e=this.chart,t=e.credits;t&&(t.textStr&&t.element.setAttribute("aria-label",e.langFormat("accessibility.credits",{creditsStr:ed(t.textStr,e.renderer.forExport)})),el(e,t.element))}getKeyboardNavigation(){let e=this.chart;return new ea(e,{keyCodeMap:[],validate:function(){return!0},init:function(){let t=e.accessibility;t&&t.keyboardNavigation.tabindexContainer.focus()}})}destroy(){this.chart.renderTo.setAttribute("aria-hidden",!0)}};!function(e){let t=["x","y","transform","width","height","r","d","stroke-width"];function i(){let e=this.focusElement,t=this.options.accessibility.keyboardNavigation.focusBorder;e&&(e.removeFocusBorder(),t.enabled&&e.addFocusBorder(t.margin,{stroke:t.style.color,strokeWidth:t.style.lineWidth,r:t.style.borderRadius}))}function s(e,t){let i=this.options.accessibility.keyboardNavigation.focusBorder,s=t||e.element;s&&s.focus&&(s.hcEvents&&s.hcEvents.focusin||d(s,"focusin",function(){}),s.focus(),i.hideBrowserFocusOutline&&(s.style.outline="none")),this.focusElement&&this.focusElement.removeFocusBorder(),this.focusElement=e,d(this,"endResize",function(){this.renderFocusBorder()}),this.renderFocusBorder()}function n(e,i){this.focusBorder&&this.removeFocusBorder();let s=this.getBBox(),n=B(e,3),r=this.parentGroup,o=this.scaleX||r&&r.scaleX,a=this.scaleY||r&&r.scaleY,l=(o?!a:a)?Math.abs(o||a||1):(Math.abs(o||1)+Math.abs(a||1))/2,h=this.renderer.fontMetrics(this).h;s.x+=this.translateX?this.translateX:0,s.y+=this.translateY?this.translateY:0;let c=s.x-n,d=s.y-n,u=s.width+2*n,p=s.height+2*n,g=!!this.text;if("text"===this.element.nodeName||g){let e,t,i=!!this.rotation,r=g?{x:+!!i,y:0}:(e=0,t=0,"middle"===this.attr("text-anchor")?e=t=.5:this.rotation?e=.25:t=.75,{x:e,y:t}),o=+this.attr("x"),a=+this.attr("y");if(isNaN(o)||(c=o-s.width*r.x-n),isNaN(a)||(d=a-("start"===this.attr("text-anchor")?h:s.height)*r.y-n),g&&i){let e=u;u=p,p=e,isNaN(o)||(c=o-s.height*r.x-n),isNaN(a)||(d=a-s.width*r.y-n)}}this.focusBorder=this.renderer.rect(c,d,u,p,parseInt((i&&i.r||0).toString(),10)/l).addClass("highcharts-focus-border").attr({zIndex:99}).add(r),this.renderer.styledMode||this.focusBorder.attr({stroke:i&&i.stroke,"stroke-width":(i&&i.strokeWidth||0)/l}),function(e,...i){e.focusBorderUpdateHooks||(e.focusBorderUpdateHooks={},t.forEach(t=>{let s=t+"Setter",n=e[s]||e._defaultSetter;e.focusBorderUpdateHooks[s]=n,e[s]=function(){let t=n.apply(e,arguments);return e.addFocusBorder.apply(e,i),t}}))}(this,e,i),function(e){if(e.focusBorderDestroyHook)return;let t=e.destroy;e.destroy=function(){return e.focusBorder&&e.focusBorder.destroy&&e.focusBorder.destroy(),t.apply(e,arguments)},e.focusBorderDestroyHook=t}(this)}function r(){var e;e=this,e.focusBorderUpdateHooks&&(Object.keys(e.focusBorderUpdateHooks).forEach(t=>{let i=e.focusBorderUpdateHooks[t];i===e._defaultSetter?delete e[t]:e[t]=i}),delete e.focusBorderUpdateHooks),this.focusBorderDestroyHook&&(this.destroy=this.focusBorderDestroyHook,delete this.focusBorderDestroyHook),this.focusBorder&&(this.focusBorder.destroy(),delete this.focusBorder)}e.compose=function(e,t){let o=e.prototype,a=t.prototype;o.renderFocusBorder||(o.renderFocusBorder=i,o.setFocusToElement=s),a.addFocusBorder||(a.addFocusBorder=n,a.removeFocusBorder=r)}}(s||(s={}));let ep=s,eg=t.default.AST;var em=o.n(eg);let{doc:eb}=l(),{addClass:ef,visuallyHideElement:ex}=K,ey=class{constructor(e,t){this.chart=e,this.domElementProvider=new ei,this.announceRegion=this.addAnnounceRegion(t)}destroy(){this.domElementProvider.destroyCreatedElements()}announce(e){em().setElementHTML(this.announceRegion,e),this.clearAnnouncementRegionTimer&&T(this.clearAnnouncementRegionTimer),this.clearAnnouncementRegionTimer=setTimeout(()=>{this.announceRegion.innerHTML=em().emptyHTML,delete this.clearAnnouncementRegionTimer},3e3)}addAnnounceRegion(e){let t=this.chart.announcerContainer||this.createAnnouncerContainer(),i=this.domElementProvider.createElement("div");return u(i,{"aria-hidden":!1,"aria-live":e,"aria-atomic":!0}),this.chart.styledMode?ef(i,"highcharts-visually-hidden"):ex(i),t.appendChild(i),i}createAnnouncerContainer(){let e=this.chart,t=eb.createElement("div");return u(t,{"aria-hidden":!1,class:"highcharts-announcer-container"}),t.style.position="relative",e.renderTo.insertBefore(t,e.renderTo.firstChild),e.announcerContainer=t,t}},{escapeStringForHTML:ev,stripHTMLTagsFromString:ew}=K;function eE(e){return(e.annotations||[]).reduce((e,t)=>(t.options&&!1!==t.options.visible&&(e=e.concat(t.labels)),e),[])}function eA(e){return e.options&&e.options.accessibility&&e.options.accessibility.description||e.graphic&&e.graphic.text&&e.graphic.text.textStr||""}function eT(e){let t=e.options&&e.options.accessibility&&e.options.accessibility.description;if(t)return t;let i=e.chart,s=eA(e),n=e.points.filter(e=>!!e.graphic).map(e=>{let t=e.accessibility&&e.accessibility.valueDescription||e.graphic&&e.graphic.element&&e.graphic.element.getAttribute("aria-label")||"",i=e&&e.series.name||"";return(i?i+", ":"")+"data point "+t}).filter(e=>!!e),r=n.length,o=r>1?"MultiplePoints":r?"SinglePoint":"NoPoints",a={annotationText:s,annotation:e,numPoints:r,annotationPoint:n[0],additionalAnnotationPoints:n.slice(1)};return i.langFormat("accessibility.screenReaderSection.annotations.description"+o,a)}function eM(e){return eE(e).map(t=>{let i=ev(ew(eT(t),e.renderer.forExport));return i?`<li>${i}</li>`:""})}let eC={getAnnotationsInfoHTML:function(e){let t=e.annotations;if(!(t&&t.length))return"";let i=eM(e);return`<ul style="list-style-type: none">${i.join(" ")}</ul>`},getAnnotationLabelDescription:eT,getAnnotationListItems:eM,getPointAnnotationTexts:function(e){let t=eE(e.series.chart).filter(t=>t.points.indexOf(e)>-1);return t.length?t.map(e=>`${eA(e)}`):[]}},{getAnnotationsInfoHTML:ek}=eC,{getAxisDescription:eP,getAxisRangeDescription:eS,getChartTitle:eD,unhideChartElementFromAT:eN}=J,{format:eB}=U(),{doc:eI}=l(),{addClass:eF,getElement:eO,getHeadingTagNameForElement:eR,stripHTMLTagsFromString:eL,visuallyHideElement:eH}=K;function ez(e){return function(e,...t){let i,s;do for(s of(i=e,t))e=e.replace(s[0],s[1]);while(e!==i);return e}(e,[/<([\w\-.:!]+)\b[^<>]*>\s*<\/\1>/g,""])}let eq=class extends eo{constructor(){super(...arguments),this.screenReaderSections={}}init(){let e=this.chart,t=this;this.initRegionsDefinitions(),this.addEvent(e,"afterGetTableAST",function(e){t.onDataTableCreated(e)}),this.addEvent(e,"afterViewData",function(e){e.wasHidden&&(t.dataTableDiv=e.element,setTimeout(function(){t.focusDataTable()},300))}),this.addEvent(e,"afterHideData",function(){t.viewDataTableButton&&t.viewDataTableButton.setAttribute("aria-expanded","false")}),e.exporting&&this.addEvent(e,"afterPrint",function(){t.updateAllScreenReaderSections()}),this.announcer=new ey(e,"assertive")}initRegionsDefinitions(){let e=this,t=this.chart.options.accessibility;this.screenReaderSections={before:{element:null,buildContent:function(i){let s=t.screenReaderSection.beforeChartFormatter;return s?s(i,e):e.defaultBeforeChartFormatter()},insertIntoDOM:function(e,t){t.renderTo.insertBefore(e,t.renderTo.firstChild)},afterInserted:function(){void 0!==e.sonifyButtonId&&e.initSonifyButton(e.sonifyButtonId),void 0!==e.dataTableButtonId&&e.initDataTableButton(e.dataTableButtonId)}},after:{element:null,buildContent:function(i){let s=t.screenReaderSection.afterChartFormatter;return s?s(i,e):e.defaultAfterChartFormatter()},insertIntoDOM:function(e,t){t.renderTo.insertBefore(e,t.container.nextSibling)},afterInserted:function(){e.chart.accessibility&&t.keyboardNavigation.enabled&&e.chart.accessibility.keyboardNavigation.updateExitAnchor()}}}}onChartRender(){this.linkedDescriptionElement=this.getLinkedDescriptionElement(),this.setLinkedDescriptionAttrs(),this.updateAllScreenReaderSections()}updateAllScreenReaderSections(){let e=this;Object.keys(this.screenReaderSections).forEach(function(t){e.updateScreenReaderSection(t)})}getLinkedDescriptionElement(){let e=this.chart.options.accessibility.linkedDescription;if(!e)return;if("string"!=typeof e)return e;let t=eB(e,this.chart),i=eI.querySelectorAll(t);if(1===i.length)return i[0]}setLinkedDescriptionAttrs(){let e=this.linkedDescriptionElement;e&&(e.setAttribute("aria-hidden","true"),eF(e,"highcharts-linked-description"))}updateScreenReaderSection(e){let t=this.chart,i=this.screenReaderSections[e],s=i.buildContent(t),n=i.element=i.element||this.createElement("div"),r=n.firstChild||this.createElement("div");s?(this.setScreenReaderSectionAttribs(n,e),em().setElementHTML(r,s),n.appendChild(r),i.insertIntoDOM(n,t),t.styledMode?eF(r,"highcharts-visually-hidden"):eH(r),eN(t,r),i.afterInserted&&i.afterInserted()):(n.parentNode&&n.parentNode.removeChild(n),i.element=null)}setScreenReaderSectionAttribs(e,t){let i=this.chart,s=i.langFormat("accessibility.screenReaderSection."+t+"RegionLabel",{chart:i,chartTitle:eD(i)});u(e,{id:`highcharts-screen-reader-region-${t}-${i.index}`,"aria-label":s||void 0}),e.style.position="relative",s&&e.setAttribute("role","all"===i.options.accessibility.landmarkVerbosity?"region":"group")}defaultBeforeChartFormatter(){let e=this.chart,t=e.options.accessibility.screenReaderSection.beforeChartFormat;if(!t)return"";let i=this.getAxesDescription(),s=e.sonify&&e.options.sonification&&e.options.sonification.enabled,n="highcharts-a11y-sonify-data-btn-"+e.index,r="hc-linkto-highcharts-data-table-"+e.index,o=ek(e),a=e.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:e}),l={headingTagName:eR(e.renderTo),chartTitle:eD(e),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:i.xAxis,yAxisDescription:i.yAxis,playAsSoundButton:s?this.getSonifyButtonText(n):"",viewTableButton:e.exporting?.getCSV?this.getDataTableButtonText(r):"",annotationsTitle:o?a:"",annotationsList:o},h=j.i18nFormat(t,l,e);return this.dataTableButtonId=r,this.sonifyButtonId=n,ez(h)}defaultAfterChartFormatter(){let e=this.chart,t=e.options.accessibility.screenReaderSection.afterChartFormat;if(!t)return"";let i={endOfChartMarker:this.getEndOfChartMarkerText()};return ez(j.i18nFormat(t,i,e))}getLinkedDescription(){let e=this.linkedDescriptionElement;return eL(e&&e.innerHTML||"",this.chart.renderer.forExport)}getLongdescText(){let e=this.chart.options,t=e.caption,i=t&&t.text,s=this.getLinkedDescription();return e.accessibility.description||s||i||""}getTypeDescriptionText(){let e=this.chart;return e.types?e.options.accessibility.typeDescription||function(e,t){let i,s,n,r=t[0],o=e.series&&e.series[0]||{},a=e.mapView&&e.mapView.geoMap&&e.mapView.geoMap.title,l={numSeries:e.series.length,numPoints:o.points&&o.points.length,chart:e,mapTitle:a};return r?"map"===r||"tiledwebmap"===r?l.mapTitle?e.langFormat("accessibility.chartTypes.mapTypeDescription",l):e.langFormat("accessibility.chartTypes.unknownMap",l):e.types.length>1?e.langFormat("accessibility.chartTypes.combinationChart",l):(i=t[0],s=e.langFormat("accessibility.seriesTypeDescriptions."+i,l),n=e.series&&e.series.length<2?"Single":"Multiple",(e.langFormat("accessibility.chartTypes."+i+n,l)||e.langFormat("accessibility.chartTypes.default"+n,l))+(s?" "+s:"")):e.langFormat("accessibility.chartTypes.emptyChart",l)}(e,e.types):""}getDataTableButtonText(e){let t=this.chart;return'<button id="'+e+'">'+t.langFormat("accessibility.table.viewAsDataTableButtonText",{chart:t,chartTitle:eD(t)})+"</button>"}getSonifyButtonText(e){let t=this.chart;return t.options.sonification&&!1===t.options.sonification.enabled?"":'<button id="'+e+'">'+t.langFormat("accessibility.sonification.playAsSoundButtonText",{chart:t,chartTitle:eD(t)})+"</button>"}getSubtitleText(){let e=this.chart.options.subtitle;return eL(e&&e.text||"",this.chart.renderer.forExport)}getEndOfChartMarkerText(){let e=eO(`highcharts-end-of-chart-marker-${this.chart.index}`);if(e)return e.outerHTML;let t=this.chart,i=t.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:t});return'<div id="highcharts-end-of-chart-marker-'+t.index+'">'+i+"</div>"}onDataTableCreated(e){let t=this.chart;if(t.options.accessibility.enabled){this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded","true");let i=e.tree.attributes||{};i.tabindex=-1,i.summary=t.langFormat("accessibility.table.tableSummary",{chart:t}),e.tree.attributes=i}}focusDataTable(){let e=this.dataTableDiv,t=e&&e.getElementsByTagName("table")[0];t&&t.focus&&t.focus()}initSonifyButton(e){let t=this.sonifyButton=eO(e),i=this.chart,s=e=>{t&&(t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label","")),e.preventDefault(),e.stopPropagation();let s=i.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:i});this.announcer.announce(s),setTimeout(()=>{t&&(t.removeAttribute("aria-hidden"),t.removeAttribute("aria-label")),i.sonify&&i.sonify()},1e3)};t&&i&&(t.setAttribute("tabindex",-1),t.onclick=function(e){(i.options.accessibility&&i.options.accessibility.screenReaderSection.onPlayAsSoundClick||s).call(this,e,i,this)})}initDataTableButton(e){let t=this.viewDataTableButton=eO(e),i=this.chart,s=e.replace("hc-linkto-","");t&&(u(t,{tabindex:-1,"aria-expanded":!!eO(s)}),t.onclick=i.options.accessibility.screenReaderSection.onViewDataTableClick||function(){i.exporting?.viewData()})}getAxesDescription(){let e=this.chart,t=function(t,i){let s=e[t];return s.length>1||s[0]&&B(s[0].options.accessibility&&s[0].options.accessibility.enabled,i)},i=!!e.types&&0>e.types.indexOf("map")&&0>e.types.indexOf("treemap")&&0>e.types.indexOf("tilemap"),s=!!e.hasCartesianSeries,n=t("xAxis",!e.angular&&s&&i),r=t("yAxis",s&&i),o={};return n&&(o.xAxis=this.getAxisDescriptionText("xAxis")),r&&(o.yAxis=this.getAxisDescriptionText("yAxis")),o}getAxisDescriptionText(e){let t=this.chart,i=t[e];return t.langFormat("accessibility.axis."+e+"Description"+(i.length>1?"Plural":"Singular"),{chart:t,names:i.map(function(e){return eP(e)}),ranges:i.map(function(e){return eS(e)}),numAxes:i.length})}destroy(){this.announcer&&this.announcer.destroy()}},{getChartTitle:eK,unhideChartElementFromAT:eG}=J,{getFakeMouseEvent:eU}=K;function eW(e){return e.exporting?.svgElements?.[0]}class eV extends eo{init(){let e=this.chart,t=this;this.addEvent(e,"exportMenuShown",function(){t.onMenuShown()}),this.addEvent(e,"exportMenuHidden",function(){t.onMenuHidden()}),this.createProxyGroup()}onMenuHidden(){let e=this.chart.exporting?.contextMenuEl;e&&e.setAttribute("aria-hidden","true"),this.setExportButtonExpandedState("false")}onMenuShown(){let e=this.chart,t=e.exporting?.contextMenuEl;t&&(this.addAccessibleContextMenuAttribs(),eG(e,t)),this.setExportButtonExpandedState("true")}setExportButtonExpandedState(e){this.exportButtonProxy&&this.exportButtonProxy.innerElement.setAttribute("aria-expanded",e)}onChartRender(){let e=this.chart,t=e.focusElement,i=e.accessibility;this.proxyProvider.clearGroup("chartMenu"),this.proxyMenuButton(),this.exportButtonProxy&&t&&t===e.exporting?.group&&(t.focusBorder?e.setFocusToElement(t,this.exportButtonProxy.innerElement):i&&i.keyboardNavigation.tabindexContainer.focus())}proxyMenuButton(){let e,t,i=this.chart,s=this.proxyProvider,n=eW(i);e=i.options.exporting,t=eW(i),e&&!1!==e.enabled&&e.accessibility&&e.accessibility.enabled&&t&&t.element&&n&&(this.exportButtonProxy=s.addProxyElement("chartMenu",{click:n},"button",{"aria-label":i.langFormat("accessibility.exporting.menuButtonLabel",{chart:i,chartTitle:eK(i)}),"aria-expanded":!1,title:i.options.lang.contextButtonTitle||null}))}createProxyGroup(){this.chart&&this.proxyProvider&&this.proxyProvider.addGroup("chartMenu")}addAccessibleContextMenuAttribs(){let e=this.chart,t=e.exporting?.divElements;if(t&&t.length){t.forEach(e=>{e&&("LI"!==e.tagName||e.children&&e.children.length?e.setAttribute("aria-hidden","true"):e.setAttribute("tabindex",-1))});let i=t[0]&&t[0].parentNode;i&&u(i,{"aria-hidden":void 0,"aria-label":e.langFormat("accessibility.exporting.chartMenuLabel",{chart:e}),role:"list"})}}getKeyboardNavigation(){let e=this.keyCodes,t=this.chart,i=this;return new ea(t,{keyCodeMap:[[[e.left,e.up],function(){return i.onKbdPrevious(this)}],[[e.right,e.down],function(){return i.onKbdNext(this)}],[[e.enter,e.space],function(){return i.onKbdClick(this)}]],validate:function(){return!!t.exporting&&t.options.exporting?.buttons?.contextButton.enabled!==!1&&!1!==t.options.exporting.enabled&&!1!==(t.options.exporting.accessibility?.enabled||!1)},init:function(){let e=i.exportButtonProxy,s=i.chart.exporting?.group;e&&s&&t.setFocusToElement(s,e.innerElement)},terminate:function(){t.hideExportMenu()}})}onKbdPrevious(e){let t=this.chart,i=t.options.accessibility,s=e.response,n=t.highlightedExportItemIx||0;for(;n--;)if(t.highlightExportItem(n))return s.success;return i.keyboardNavigation.wrapAround?(t.highlightLastExportItem(),s.success):s.prev}onKbdNext(e){let t=this.chart,i=t.options.accessibility,s=e.response;for(let e=(t.highlightedExportItemIx||0)+1;e<(t.exporting?.divElements?.length||0);++e)if(t.highlightExportItem(e))return s.success;return i.keyboardNavigation.wrapAround?(t.highlightExportItem(0),s.success):s.next}onKbdClick(e){let t=this.chart,i=void 0!==t.highlightedExportItemIx&&t.exporting?.divElements?.[t.highlightedExportItemIx],s=eW(t)?.element;return t.exporting?.openMenu?i&&this.fakeClickEvent(i):(s&&this.fakeClickEvent(s),t.highlightExportItem(0)),e.response.success}}!function(e){function t(){let e=eW(this);if(e){let t=e.element;t.onclick&&(t.onclick=function(){eU("click")})}}function i(){let e=this.exporting?.divElements;e&&this.exporting?.contextMenuEl&&this.exporting?.openMenu&&(e.forEach(e=>{e&&"highcharts-menu-item"===e.className&&e.onmouseout&&e.onmouseout(eU("mouseout"))}),this.highlightedExportItemIx=0,this.exporting.contextMenuEl.hideMenu(),this.container.focus())}function s(e){let t=this.exporting?.divElements?.[e],i=void 0!==this.highlightedExportItemIx&&this.exporting?.divElements?.[this.highlightedExportItemIx];if(t&&"LI"===t.tagName&&!(t.children&&t.children.length)){let s=!!(this.renderTo.getElementsByTagName("g")[0]||{}).focus;return t.focus&&s&&t.focus(),i&&i.onmouseout&&i.onmouseout(eU("mouseout")),t.onmouseover&&t.onmouseover(eU("mouseover")),this.highlightedExportItemIx=e,!0}return!1}function n(){if(this.exporting?.divElements){let e=this.exporting?.divElements.length;for(;e--;)if(this.highlightExportItem(e))return!0}return!1}e.compose=function(e){let r=e.prototype;r.hideExportMenu||(r.hideExportMenu=i,r.highlightExportItem=s,r.highlightLastExportItem=n,r.showExportMenu=t)}}(eV||(eV={}));let eX=eV,{doc:eY,win:ej}=l(),{getElement:eZ,simulatedEventTarget:e_}=K;class e${constructor(e,t){this.currentModuleIx=NaN,this.modules=[],this.init(e,t)}init(e,t){let i=this.eventProvider=new es;this.chart=e,this.components=t,this.modules=[],this.currentModuleIx=0,this.update(),i.addEvent(this.tabindexContainer,"keydown",e=>this.onKeydown(e)),i.addEvent(this.tabindexContainer,"focus",e=>this.onFocus(e)),["mouseup","touchend"].forEach(e=>i.addEvent(eY,e,e=>this.onMouseUp(e))),["mousedown","touchstart"].forEach(t=>i.addEvent(e.renderTo,t,()=>{this.isClickingChart=!0}))}update(e){let t=this.chart.options.accessibility,i=t&&t.keyboardNavigation,s=this.components;this.updateContainerTabindex(),i&&i.enabled&&e&&e.length?(this.modules=e.reduce(function(e,t){let i=s[t].getKeyboardNavigation();return e.concat(i)},[]),this.updateExitAnchor()):(this.modules=[],this.currentModuleIx=0,this.removeExitAnchor())}updateExitAnchor(){let e=eZ(`highcharts-end-of-chart-marker-${this.chart.index}`);this.removeExitAnchor(),e?(this.makeElementAnExitAnchor(e),this.exitAnchor=e):this.createExitAnchor()}move(e){let t=this.modules&&this.modules[this.currentModuleIx];t&&t.terminate&&t.terminate(e),this.chart.focusElement&&this.chart.focusElement.removeFocusBorder(),this.currentModuleIx+=e;let i=this.modules&&this.modules[this.currentModuleIx];if(i){if(i.validate&&!i.validate())return this.move(e);if(i.init)return i.init(e),!0}return this.currentModuleIx=0,this.exiting=!0,e>0?this.exitAnchor&&this.exitAnchor.focus():this.tabindexContainer.focus(),!1}onFocus(e){let t=this.chart,i=e.relatedTarget&&t.container.contains(e.relatedTarget),s=t.options.accessibility,n=s&&s.keyboardNavigation;if(n&&n.enabled&&!this.exiting&&!this.tabbingInBackwards&&!this.isClickingChart&&!i){let e=this.getFirstValidModuleIx();null!==e&&(this.currentModuleIx=e,this.modules[e].init(1))}this.keyboardReset=!1,this.exiting=!1}onMouseUp(e){if(delete this.isClickingChart,!this.keyboardReset&&e.relatedTarget!==e_){let t=this.chart;if(!e.target||!t.container.contains(e.target)){let e=this.modules&&this.modules[this.currentModuleIx||0];e&&e.terminate&&e.terminate(),this.currentModuleIx=0}t.focusElement&&(t.focusElement.removeFocusBorder(),delete t.focusElement),this.keyboardReset=!0}}onKeydown(e){let t,i=e||ej.event,s=this.modules&&this.modules.length&&this.modules[this.currentModuleIx],n=i.target;if((!n||"INPUT"!==n.nodeName||n.classList.contains("highcharts-a11y-proxy-element"))&&(this.keyboardReset=!1,this.exiting=!1,s)){let e=s.run(i);e===s.response.success?t=!0:e===s.response.prev?t=this.move(-1):e===s.response.next&&(t=this.move(1)),t&&(i.preventDefault(),i.stopPropagation())}}updateContainerTabindex(){let e,t=this.chart.options.accessibility,i=t&&t.keyboardNavigation,s=!(i&&!1===i.enabled),n=this.chart,r=n.container;n.renderTo.hasAttribute("tabindex")?(r.removeAttribute("tabindex"),e=n.renderTo):e=r,this.tabindexContainer=e;let o=e.getAttribute("tabindex");s&&!o?e.setAttribute("tabindex","0"):s||n.container.removeAttribute("tabindex")}createExitAnchor(){let e=this.chart,t=this.exitAnchor=eY.createElement("div");e.renderTo.appendChild(t),this.makeElementAnExitAnchor(t)}makeElementAnExitAnchor(e){let t=this.tabindexContainer.getAttribute("tabindex")||0;e.setAttribute("class","highcharts-exit-anchor"),e.setAttribute("tabindex",t),e.setAttribute("aria-hidden",!1),this.addExitAnchorEventsToEl(e)}removeExitAnchor(){if(this.exitAnchor){let e=this.eventProvider.eventRemovers.find(e=>e.element===this.exitAnchor);e&&f(e.remover)&&this.eventProvider.removeEvent(e.remover),this.exitAnchor.parentNode&&this.exitAnchor.parentNode.removeChild(this.exitAnchor),delete this.exitAnchor}}addExitAnchorEventsToEl(e){let t=this.chart,i=this;this.eventProvider.addEvent(e,"focus",function(e){let s=e||ej.event,n=!(s.relatedTarget&&t.container.contains(s.relatedTarget)||i.exiting);if(t.focusElement&&delete t.focusElement,n){if(i.tabbingInBackwards=!0,i.tabindexContainer.focus(),delete i.tabbingInBackwards,s.preventDefault(),i.modules&&i.modules.length){i.currentModuleIx=i.modules.length-1;let e=i.modules[i.currentModuleIx];e&&e.validate&&!e.validate()?i.move(-1):e&&e.init(-1)}}else i.exiting=!1})}getFirstValidModuleIx(){let e=this.modules.length;for(let t=0;t<e;++t){let e=this.modules[t];if(!e.validate||e.validate())return t}return null}destroy(){this.removeExitAnchor(),this.eventProvider.removeAddedEvents(),this.chart.container.removeAttribute("tabindex")}}function eQ(){let e=this;w(this,"dismissPopupContent",{},function(){e.tooltip&&e.tooltip.hide(0),e.hideExportMenu()})}function eJ(e){27===(e.which||e.keyCode)&&l().charts&&l().charts.forEach(e=>{e&&e.dismissPopupContent&&e.dismissPopupContent()})}(e$||(e$={})).compose=function(e){eX.compose(e);let t=e.prototype;return!t.dismissPopupContent&&(t.dismissPopupContent=eQ,eY&&d(eY,"keydown",eJ)),e};let e0=e$,e1=t.default.Legend;var e2=o.n(e1);let{animObject:e3}=l(),{doc:e5}=l(),{getChartTitle:e4}=J,{stripHTMLTagsFromString:e9,addClass:e6,removeClass:e8}=K;function e7(e){let t=e.legend&&e.legend.allItems,i=e.options.legend.accessibility||{},s=e.colorAxis&&e.colorAxis.some(e=>!e.dataClasses||!e.dataClasses.length);return!!(t&&t.length&&!s&&!1!==i.enabled)}function te(e,t){let i=t.legendItem||{};for(let s of(t.setState(e?"hover":"",!0),["group","label","symbol"])){let t=i[s],n=t&&t.element||t;n&&w(n,e?"mouseover":"mouseout")}}class tt extends eo{constructor(){super(...arguments),this.highlightedLegendItemIx=NaN,this.proxyGroup=null}init(){let e=this;this.recreateProxies(),this.addEvent(e2(),"afterScroll",function(){this.chart===e.chart&&(e.proxyProvider.updateGroupProxyElementPositions("legend"),e.updateLegendItemProxyVisibility(),e.highlightedLegendItemIx>-1&&this.chart.highlightLegendItem(e.highlightedLegendItemIx))}),this.addEvent(e2(),"afterPositionItem",function(t){this.chart===e.chart&&this.chart.renderer&&e.updateProxyPositionForItem(t.item)}),this.addEvent(e2(),"afterRender",function(){this.chart===e.chart&&this.chart.renderer&&e.recreateProxies()&&O(()=>e.proxyProvider.updateGroupProxyElementPositions("legend"),e3(B(this.chart.renderer.globalAnimation,!0)).duration)})}updateLegendItemProxyVisibility(){let e,t=this.chart,i=t.legend,s=i.allItems||[],n=i.currentPage||1,r=i.clipHeight||0;s.forEach(s=>{if(s.a11yProxyElement){let o=i.pages&&i.pages.length,a=s.a11yProxyElement.element,l=!1;if(e=s.legendItem||{},o){let t=e.pageIx||0;l=(e.y||0)+(e.label?Math.round(e.label.getBBox().height):0)-i.pages[t]>r||t!==n-1}l?t.styledMode?e6(a,"highcharts-a11y-invisible"):a.style.visibility="hidden":(e8(a,"highcharts-a11y-invisible"),a.style.visibility="")}})}onChartRender(){e7(this.chart)||this.removeProxies()}highlightAdjacentLegendPage(e){let t=this.chart,i=t.legend,s=(i.currentPage||1)+e,n=i.pages||[];if(s>0&&s<=n.length){let e=0;for(let n of i.allItems)((n.legendItem||{}).pageIx||0)+1===s&&t.highlightLegendItem(e)&&(this.highlightedLegendItemIx=e),++e}}updateProxyPositionForItem(e){e.a11yProxyElement&&e.a11yProxyElement.refreshPosition()}recreateProxies(){let e=e5.activeElement,t=this.proxyGroup,i=e&&t&&t.contains(e);return this.removeProxies(),!!e7(this.chart)&&(this.addLegendProxyGroup(),this.proxyLegendItems(),this.updateLegendItemProxyVisibility(),this.updateLegendTitle(),i&&this.chart.highlightLegendItem(this.highlightedLegendItemIx),!0)}removeProxies(){this.proxyProvider.removeGroup("legend")}updateLegendTitle(){let e=this.chart,t=e9((e.legend&&e.legend.options.title&&e.legend.options.title.text||"").replace(/<br ?\/?>/g," "),e.renderer.forExport),i=e.langFormat("accessibility.legend.legendLabel"+(t?"":"NoTitle"),{chart:e,legendTitle:t,chartTitle:e4(e)});this.proxyProvider.updateGroupAttrs("legend",{"aria-label":i})}addLegendProxyGroup(){let e="all"===this.chart.options.accessibility.landmarkVerbosity?"region":null;this.proxyGroup=this.proxyProvider.addGroup("legend","ul",{"aria-label":"_placeholder_",role:e})}proxyLegendItems(){let e,t=this;((this.chart.legend||{}).allItems||[]).forEach(i=>{(e=i.legendItem||{}).label&&e.label.element&&t.proxyLegendItem(i)})}proxyLegendItem(e){let t=e.legendItem||{},i=e.legendItem?.label,s=i?.element,n=t.label?.styles?.textOverflow==="ellipsis";if(!t.label||!t.group)return;let r=this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:e9(e.name,this.chart.renderer.forExport),item:e}),o={tabindex:-1,"aria-pressed":e.visible,"aria-label":r,title:""};n&&-1!==(s.textContent||"").indexOf("…")&&(o.title=i?.textStr);let a=t.group.div?t.label:t.group;e.a11yProxyElement=this.proxyProvider.addProxyElement("legend",{click:t.label,visual:a.element},"button",o)}getKeyboardNavigation(){let e=this.keyCodes,t=this,i=this.chart;return new ea(i,{keyCodeMap:[[[e.left,e.right,e.up,e.down],function(e){return t.onKbdArrowKey(this,e)}],[[e.enter,e.space],function(){return t.onKbdClick(this)}],[[e.pageDown,e.pageUp],function(i){let s=i===e.pageDown?1:-1;return t.highlightAdjacentLegendPage(s),this.response.success}]],validate:function(){return t.shouldHaveLegendNavigation()},init:function(){i.highlightLegendItem(0),t.highlightedLegendItemIx=0},terminate:function(){t.highlightedLegendItemIx=-1,i.legend.allItems.forEach(e=>te(!1,e))}})}onKbdArrowKey(e,t){let{keyCodes:{left:i,up:s},highlightedLegendItemIx:n,chart:r}=this,o=r.legend.allItems.length,a=r.options.accessibility.keyboardNavigation.wrapAround,l=t===i||t===s?-1:1;return r.highlightLegendItem(n+l)?this.highlightedLegendItemIx+=l:a&&o>1&&(this.highlightedLegendItemIx=l>0?0:o-1,r.highlightLegendItem(this.highlightedLegendItemIx)),e.response.success}onKbdClick(e){let t=this.chart.legend.allItems[this.highlightedLegendItemIx];return t&&t.a11yProxyElement&&t.a11yProxyElement.click(),e.response.success}shouldHaveLegendNavigation(){if(!e7(this.chart))return!1;let e=this.chart,t=(e.options.legend||{}).accessibility||{};return!!(e.legend.display&&t.keyboardNavigation&&t.keyboardNavigation.enabled)}destroy(){this.removeProxies()}}function ti(e){let t=this.legend.allItems,i=this.accessibility&&this.accessibility.components.legend.highlightedLegendItemIx,s=t[e],n=s?.legendItem||{};if(s){var r;let o,a;C(i)&&t[i]&&te(!1,t[i]),r=this.legend,o=(r.allItems[e].legendItem||{}).pageIx,a=r.currentPage,void 0!==o&&o+1!==a&&r.scroll(1+o-a);let l=n.label,h=s.a11yProxyElement&&s.a11yProxyElement.innerElement;return l&&l.element&&h&&this.setFocusToElement(l,h),te(!0,s),!0}return!1}function ts(e){let t=this.chart.options.accessibility,i=e.item;t.enabled&&i&&i.a11yProxyElement&&i.a11yProxyElement.innerElement.setAttribute("aria-pressed",e.visible?"true":"false")}(tt||(tt={})).compose=function(e,t){let i=e.prototype;i.highlightLegendItem||(i.highlightLegendItem=ti,d(t,"afterColorizeItem",ts))};let tn=tt,tr=t.default.Axis;var to=o.n(tr);let{isTouchDevice:ta}=l(),tl=[];function th(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function tc(){let e,t,i,s=this.legend,n=this.navigator;if(n){e=s&&s.options,t=n.xAxis,i=n.yAxis;let{scrollbarHeight:r,scrollButtonSize:o}=n;this.inverted?(n.left=n.opposite?this.chartWidth-r-n.height:this.spacing[3]+r,n.top=this.plotTop+o):(n.left=B(t.left,this.plotLeft+o),n.top=n.navigatorOptions.top||this.chartHeight-n.height-r-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&"proximate"!==e.layout&&e.enabled&&!e.floating?s.legendHeight+B(e.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),t&&i&&(this.inverted?t.options.left=i.options.left=n.left:t.options.top=i.options.top=n.top,t.setAxisSize(),i.setAxisSize())}}function td(t){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this),B(t.redraw,!0)&&this.redraw(t.animation))}function tu(){let t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this))}function tp(){let e=this.options,t=e.navigator,i=e.rangeSelector;if((t&&t.enabled||i&&i.enabled)&&(!ta&&"x"===this.zooming.type||ta&&"x"===this.zooming.pinchType))return!1}function tg(e){let t=e.navigator;if(t&&e.xAxis[0]){let i=e.xAxis[0].getExtremes();t.render(i.min,i.max)}}function tm(e){let t=e.options.navigator||{},i=e.options.scrollbar||{};!this.navigator&&!this.scroller&&(t.enabled||i.enabled)&&(D(!0,this.options.navigator,t),D(!0,this.options.scrollbar,i),delete e.options.navigator,delete e.options.scrollbar)}let tb=function(t,i){if(I(tl,t)){let s=t.prototype;e=i,s.callbacks.push(tg),d(t,"afterAddSeries",th),d(t,"afterSetChartSize",tc),d(t,"afterUpdate",td),d(t,"beforeRender",tu),d(t,"beforeShowResetZoom",tp),d(t,"update",tm)}},{isTouchDevice:tf}=l();function tx(){this.navigatorAxis||(this.navigatorAxis=new tv(this))}function ty(e){let t,i=this.chart,s=i.options,n=s.navigator,r=this.navigatorAxis,o=i.zooming.pinchType,a=s.rangeSelector,l=i.zooming.type;if(this.isXAxis&&(n?.enabled||a?.enabled)){if("y"===l&&"zoom"===e.trigger)t=!1;else if(("zoom"===e.trigger&&"xy"===l||tf&&"xy"===o)&&this.options.range){let t=r.previousZoom;f(e.min)?r.previousZoom=[this.min,this.max]:t&&(e.min=t[0],e.max=t[1],r.previousZoom=void 0)}}void 0!==t&&e.preventDefault()}class tv{static compose(e){e.keepProps.includes("navigatorAxis")||(e.keepProps.push("navigatorAxis"),d(e,"init",tx),d(e,"setExtremes",ty))}constructor(e){this.axis=e}destroy(){this.axis=void 0}toFixedRange(e,t,i,s){let n=this.axis,r=(n.pointRange||0)/2,o=B(i,n.translate(e,!0,!n.horiz)),a=B(s,n.translate(t,!0,!n.horiz));return f(i)||(o=g(o+r)),f(s)||(a=g(a-r)),C(o)&&C(a)||(o=a=void 0),{min:o,max:a}}}let tw=t.default.Color;var tE=o.n(tw);let tA=t.default.SeriesRegistry;var tT=o.n(tA);let{parse:tM}=tE(),{seriesTypes:tC}=tT(),tk={height:40,margin:22,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:tM("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===tC.areaspline?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:void 0},tickLength:0,tickWidth:0}},tP={"navigator-handle":function(e,t,i,s,n={}){var r,o,a,l,h,c;let d=n.width?n.width/2:i,u=(r=n.borderRadius||0,o=Math.min(2*d,s),/%$/.test(r)?o*parseFloat(r)/100+0:parseFloat(r));return[["M",-1.5,(s=n.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(a=-d-1,l=2*d+1,h=s,c={r:u},c?.r?function(e,t,i,s,n){let r=n?.r||0;return[["M",e+r,t],["L",e+i-r,t],["A",r,r,0,0,1,e+i,t+r],["L",e+i,t+s-r],["A",r,r,0,0,1,e+i-r,t+s],["L",e+r,t+s],["A",r,r,0,0,1,e,t+s-r],["L",e,t+r],["A",r,r,0,0,1,e+r,t],["Z"]]}(a,.5,l,h,c):[["M",a,.5],["L",a+l,.5],["L",a+l,.5+h],["L",a,.5+h],["Z"]])]}},tS=t.default.RendererRegistry;var tD=o.n(tS);let{defaultOptions:tN}=l(),{composed:tB}=l(),{getRendererType:tI}=tD(),{setFixedRange:tF}={setFixedRange:function(e){let t=this.xAxis[0];f(t.dataMax)&&f(t.dataMin)&&e?this.fixedRange=Math.min(e,t.dataMax-t.dataMin):this.fixedRange=e}};function tO(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let tR=function(e,t,i){tv.compose(t),I(tB,"Navigator")&&(e.prototype.setFixedRange=tF,v(tI().prototype.symbols,tP),v(tN,{navigator:tk}),d(i,"afterUpdate",tO))},{composed:tL}=l();!function(e){let t;function i(e){let t=B(e.options?.min,e.min),i=B(e.options?.max,e.max);return{axisMin:t,axisMax:i,scrollMin:f(e.dataMin)?Math.min(t,e.min??1/0,e.dataMin,e.threshold??1/0):t,scrollMax:e.treeGrid?.adjustedMax??(f(e.dataMax)?