highcharts
Version:
JavaScript charting framework
13 lines • 136 kB
JavaScript
!/**
* Highcharts JS v12.5.0 (2026-01-12)
* @module highcharts/modules/accessibility
* @requires highcharts
*
* Accessibility module
*
* (c) 2010-2026 Highsoft AS
* Author: Oystein Moseng
*
* A commercial license may be required depending on use.
* See www.highcharts.com/license
*/function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Templating,e._Highcharts.AST,e._Highcharts.Legend,e._Highcharts.Axis,e._Highcharts.Color,e._Highcharts.SeriesRegistry,e._Highcharts.RendererRegistry,e._Highcharts.SVGRenderer,e._Highcharts.Point,e._Highcharts.Series):"function"==typeof define&&define.amd?define("highcharts/modules/accessibility",["highcharts/highcharts"],function(e){return t(e,e.Templating,e.AST,e.Legend,e.Axis,e.Color,e.SeriesRegistry,e.RendererRegistry,e.SVGRenderer,e.Point,e.Series)}):"object"==typeof exports?exports["highcharts/modules/accessibility"]=t(e._Highcharts,e._Highcharts.Templating,e._Highcharts.AST,e._Highcharts.Legend,e._Highcharts.Axis,e._Highcharts.Color,e._Highcharts.SeriesRegistry,e._Highcharts.RendererRegistry,e._Highcharts.SVGRenderer,e._Highcharts.Point,e._Highcharts.Series):e.Highcharts=t(e.Highcharts,e.Highcharts.Templating,e.Highcharts.AST,e.Highcharts.Legend,e.Highcharts.Axis,e.Highcharts.Color,e.Highcharts.SeriesRegistry,e.Highcharts.RendererRegistry,e.Highcharts.SVGRenderer,e.Highcharts.Point,e.Highcharts.Series)}("u"<typeof window?this:window,(e,t,i,s,r,n,o,a,l,h,c)=>(()=>{"use strict";let d;var u,p,g,m,b={260:e=>{e.exports=h},512:e=>{e.exports=o},532:e=>{e.exports=r},540:e=>{e.exports=l},608:e=>{e.exports=a},620:e=>{e.exports=n},632:e=>{e.exports=s},660:e=>{e.exports=i},820:e=>{e.exports=c},944:t=>{t.exports=e},984:e=>{e.exports=t}},x={};function f(e){var t=x[e];if(void 0!==t)return t.exports;var i=x[e]={exports:{}};return b[e](i,i.exports,f),i.exports}f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var i in t)f.o(t,i)&&!f.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var y={};f.d(y,{default:()=>rO});var v=f(944),w=f.n(v);let{doc:E,win:A}=w(),{css:T}=w(),M=A.EventTarget&&new A.EventTarget||"none";function k(e){if("function"==typeof A.MouseEvent)return new A.MouseEvent(e.type,e);if(E?.createEvent){let t=E.createEvent("MouseEvent");if(t.initMouseEvent)return t.initMouseEvent(e.type,e.bubbles,e.cancelable,e.view||A,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),t}return C(e.type)}function C(e,t,i){let s=t||{x:0,y:0};if("function"==typeof A.MouseEvent)return new A.MouseEvent(e,{bubbles:!0,cancelable:!0,composed:!0,button:0,buttons:1,relatedTarget:i||M,view:A,detail:+("click"===e),screenX:s.x,screenY:s.y,clientX:s.x,clientY:s.y});if(E?.createEvent){let t=E.createEvent("MouseEvent");if(t.initMouseEvent)return t.initMouseEvent(e,!0,!0,A,+("click"===e),s.x,s.y,s.x,s.y,!1,!1,!1,!1,0,null),t}return{type:e}}let S={addClass:function(e,t){e.classList?e.classList.add(t):0>e.className.indexOf(t)&&(e.className+=" "+t)},cloneMouseEvent:k,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 A.TouchEvent){let i=new A.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=k(e);return i.touches=e.touches,i.changedTouches=e.changedTouches,i.targetTouches=e.targetTouches,i},escapeStringForHTML:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},getElement:function(e){return E.getElementById(e)},getFakeMouseEvent:C,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 r=(e=>{let t=e;for(;t=t.previousSibling;){let e=t.tagName||"";if(i(e))return e}return""})(e);if(r)return t(r);let n=e.parentElement;if(!n)return"h6";let o=n.tagName;return i(o)?t(o):s(n)};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:M,stripHTMLTagsFromString:function(e,t=!1){return"string"==typeof e?t?e.replace(/<\/?[^>]+(>|$)/g,""):e.replace(/<\/?(?!\s)[^>]+(>|$)/g,""):e},visuallyHideElement:function(e){T(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})}};var P=f(984),D=f.n(P);let{format:N}=D(),{getNestedProperty:B,pick:I}=w();var F=u||(u={});function O(e,t,i){let s=(e,t)=>{let i=e.slice(t||0),s=i.indexOf("{"),r=i.indexOf("}");if(s>-1&&r>s)return{statement:i.substring(s+1,r),begin:t+s+1,end:t+r}},r=[],n,o,a=0;do n=s(e,a),(o=e.substring(a,n&&n.begin-1)).length&&r.push({value:o,type:"constant"}),n&&r.push({value:n.statement,type:"statement"}),a=n?n.end+1:a+1;while(n);return r.forEach(e=>{"statement"===e.type&&(e.value=function(e,t){let i,s,r=e.indexOf("#each("),n=e.indexOf("#plural("),o=e.indexOf("["),a=e.indexOf("]");if(r>-1){let n=e.slice(r).indexOf(")")+r,o=e.substring(0,r),a=e.substring(n+1),l=e.substring(r+6,n).split(","),h=Number(l[1]),c;if(s="",i=B(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(n>-1){var l;let i=e.slice(n).indexOf(")")+n,r=e.substring(n+8,i).split(",");switch(Number(B(r[0],t))){case 0:s=I(r[4],r[1]);break;case 1:s=I(r[2],r[1]);break;case 2:s=I(r[3],r[1]);break;default:s=r[1]}return s?(l=s).trim&&l.trim()||l.replace(/^\s+|\s+$/g,""):""}if(o>-1){let s,r=e.substring(0,o),n=Number(e.substring(o+1,a));return i=B(r,t),!isNaN(n)&&i&&(n<0?void 0===(s=i[i.length+n])&&(s=i[0]):void 0===(s=i[n])&&(s=i[i.length-1])),void 0!==s?s:""}return"{"+e+"}"}(e.value,t))}),N(r.reduce((e,t)=>e+t.value,""),t,i)}function R(e,t){let i=e.split("."),s=this.options.lang,r=0;for(;r<i.length;++r)s=s&&s[i[r]];return"string"==typeof s?O(s,t,this):""}F.compose=function(e){let t=e.prototype;t.langFormat||(t.langFormat=R)},F.i18nFormat=O;let L=u,{doc:H}=w(),{stripHTMLTagsFromString:z}=S,{defined:q,find:U,fireEvent:G}=w();function K(e){if(e.points&&e.points.length){let t=U(e.points,e=>!!e.graphic);return t&&t.graphic&&t.graphic.element}}function V(e){let t=K(e);return t&&t.parentNode||e.graph&&e.graph.element||e.group&&e.group.element}let W={fireEventOnWrappedOrUnwrappedElement:function e(t,i){let s=i.type,r=t.hcEvents;H?.createEvent&&(t.dispatchEvent||t.fireEvent)?t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(s,i):r&&r[s]?G(t,s,i):t.element&&e(t.element,i)},getChartTitle:function(e){return z(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 r,n,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?(r=(t=e).chart,t.dataMax&&t.dataMin?r.langFormat("accessibility.axis.rangeCategories",{chart:r,axis:t,numCategories:t.dataMax-t.dataMin+1}):""):e.dateTime&&(0===e.min||0===e.dataMin)?(n=(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)),n.langFormat("accessibility.axis.timeRange"+h,{chart:n,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,r;for(;s--;)if(r=U(e[s].points||[],function(e){return e.x===t&&e.y===i}))return r},getSeriesFirstPointElement:K,getSeriesFromName:function(e,t){return t?(e.series||[]).filter(function(e){return e.name===t}):e.series},getSeriesA11yElement:V,unhideChartElementFromAT:function e(t,i){i.setAttribute("aria-hidden",!1),i!==t.renderTo&&i.parentNode&&i.parentNode!==H.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=V(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,r=s&&s.scrollbar;if(r&&q(r.to)&&q(r.from)){let t=r.to-r.from,i=function(e,t){if(!q(e.dataMin)||!q(e.dataMax))return 0;let i=e.toPixels(e.dataMin),s=e.toPixels(e.dataMax),r="xAxis"===e.coll?"x":"y";return(e.toPixels(t[r]||0)-i)/(s-i)}(s,e);r.updatePosition(i-t/2,i+t/2),G(r,"changed",{from:r.from,to:r.to,trigger:"scrollbar",DOMEvent:null})}}},{doc:X}=w(),{removeElement:Y}=S,j=class{constructor(){this.elements=[]}createElement(){let e=X.createElement.apply(X,arguments);return this.elements.push(e),e}removeElement(e){Y(e),this.elements.splice(this.elements.indexOf(e),1)}destroyCreatedElements(){this.elements.forEach(function(e){Y(e)}),this.elements=[]}},{addEvent:_}=w(),Z=class{constructor(){this.eventRemovers=[]}addEvent(){let e=_.apply(w(),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:$}=W,{getFakeMouseEvent:Q}=S,J=class{destroy(){}getKeyboardNavigation(){return[]}init(){}onChartRender(){}onChartUpdate(){}initBase(e,t){this.chart=e,this.eventProvider=new Z,this.domElementProvider=new j,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){$(e,Q("click"))}destroyBase(){this.domElementProvider.destroyCreatedElements(),this.eventProvider.removeAddedEvents()}},{find:ee}=w(),et=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=ee(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:ei,getChartTitle:es}=W,{doc:er}=w(),{stripHTMLTagsFromString:en}=S,eo=class extends J{onChartUpdate(){this.handleSVGTitleElement(),this.setSVGContainerLabel(),this.setGraphicContainerAttrs(),this.setRenderToAttrs(),this.makeCreditsAccessible()}handleSVGTitleElement(){let e=this.chart,t="highcharts-title-"+e.index,i=en(e.langFormat("accessibility.svgContainerTitle",{chartTitle:es(e)}));if(i.length){let s=this.svgTitleElement=this.svgTitleElement||er.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:es(e)});e.renderer.box&&t.length&&e.renderer.box.setAttribute("aria-label",t)}setGraphicContainerAttrs(){let e=this.chart,t=e.langFormat("accessibility.graphicContainerLabel",{chartTitle:es(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:es(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:en(t.textStr,e.renderer.forExport)})),ei(e,t.element))}getKeyboardNavigation(){let e=this.chart;return new et(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)}},{addEvent:ea,pick:el}=w();!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||ea(s,"focusin",function(){}),s.focus(),i.hideBrowserFocusOutline&&(s.style.outline="none")),this.focusElement&&this.focusElement.removeFocusBorder(),this.focusElement=e,ea(this,"endResize",function(){this.renderFocusBorder()}),this.renderFocusBorder()}function r(e,i){this.focusBorder&&this.removeFocusBorder();let s=this.getBBox(),r=el(e,3),n=this.parentGroup,o=this.scaleX||n&&n.scaleX,a=this.scaleY||n&&n.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-r,d=s.y-r,u=s.width+2*r,p=s.height+2*r,g=!!this.text;if("text"===this.element.nodeName||g){let e,t,i=!!this.rotation,n=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*n.x-r),isNaN(a)||(d=a-("start"===this.attr("text-anchor")?h:s.height)*n.y-r),g&&i){let e=u;u=p,p=e,isNaN(o)||(c=o-s.height*n.x-r),isNaN(a)||(d=a-s.width*n.y-r)}}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(n),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",r=e[s]||e._defaultSetter;e.focusBorderUpdateHooks[s]=r,e[s]=function(){let t=r.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 n(){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=r,a.removeFocusBorder=n)}}(p||(p={}));let eh=p;var ec=f(660),ed=f.n(ec);let{doc:eu}=w(),{addClass:ep,visuallyHideElement:eg}=S,{attr:em}=w(),eb=class{constructor(e,t){this.chart=e,this.domElementProvider=new j,this.announceRegion=this.addAnnounceRegion(t)}destroy(){this.domElementProvider.destroyCreatedElements()}announce(e){ed().setElementHTML(this.announceRegion,e),this.clearAnnouncementRegionTimer&&clearTimeout(this.clearAnnouncementRegionTimer),this.clearAnnouncementRegionTimer=setTimeout(()=>{this.announceRegion.innerHTML=ed().emptyHTML,delete this.clearAnnouncementRegionTimer},3e3)}addAnnounceRegion(e){let t=this.chart.announcerContainer||this.createAnnouncerContainer(),i=this.domElementProvider.createElement("div");return em(i,{"aria-hidden":!1,"aria-live":e,"aria-atomic":!0}),this.chart.styledMode?ep(i,"highcharts-visually-hidden"):eg(i),t.appendChild(i),i}createAnnouncerContainer(){let e=this.chart,t=eu.createElement("div");return em(t,{"aria-hidden":!1,class:"highcharts-announcer-container"}),t.style.position="relative",e.renderTo.insertBefore(t,e.renderTo.firstChild),e.announcerContainer=t,t}},{escapeStringForHTML:ex,stripHTMLTagsFromString:ef}=S;function ey(e){return(e.annotations||[]).reduce((e,t)=>(t.options&&!1!==t.options.visible&&(e=e.concat(t.labels)),e),[])}function ev(e){return e.options&&e.options.accessibility&&e.options.accessibility.description||e.graphic&&e.graphic.text&&e.graphic.text.textStr||""}function ew(e){let t=e.options&&e.options.accessibility&&e.options.accessibility.description;if(t)return t;let i=e.chart,s=ev(e),r=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),n=r.length,o=n>1?"MultiplePoints":n?"SinglePoint":"NoPoints",a={annotationText:s,annotation:e,numPoints:n,annotationPoint:r[0],additionalAnnotationPoints:r.slice(1)};return i.langFormat("accessibility.screenReaderSection.annotations.description"+o,a)}function eE(e){return ey(e).map(t=>{let i=ex(ef(ew(t),e.renderer.forExport));return i?`<li>${i}</li>`:""})}let eA={getAnnotationsInfoHTML:function(e){let t=e.annotations;if(!(t&&t.length))return"";let i=eE(e);return`<ul style="list-style-type: none">${i.join(" ")}</ul>`},getAnnotationLabelDescription:ew,getAnnotationListItems:eE,getPointAnnotationTexts:function(e){let t=ey(e.series.chart).filter(t=>t.points.indexOf(e)>-1);return t.length?t.map(e=>`${ev(e)}`):[]}},{getAnnotationsInfoHTML:eT}=eA,{getAxisDescription:eM,getAxisRangeDescription:ek,getChartTitle:eC,unhideChartElementFromAT:eS}=W,{format:eP}=D(),{doc:eD}=w(),{addClass:eN,getElement:eB,getHeadingTagNameForElement:eI,stripHTMLTagsFromString:eF,visuallyHideElement:eO}=S,{attr:eR,pick:eL,replaceNested:eH}=w();function ez(e){return eH(e,[/<([\w\-.:!]+)\b[^<>]*>\s*<\/\1>/g,""])}let eq=class extends J{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 eb(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.defaultBeforeChartFormatter(i)},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.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=eP(e,this.chart),i=eD.querySelectorAll(t);if(1===i.length)return i[0]}setLinkedDescriptionAttrs(){let e=this.linkedDescriptionElement;e&&(e.setAttribute("aria-hidden","true"),eN(e,"highcharts-linked-description"))}updateScreenReaderSection(e){let t=this.chart,i=this.screenReaderSections[e],s=i.buildContent(t),r=i.element=i.element||this.createElement("div"),n=r.firstChild||this.createElement("div");s?(this.setScreenReaderSectionAttribs(r,e),ed().setElementHTML(n,s),r.appendChild(n),i.insertIntoDOM(r,t),t.styledMode?eN(n,"highcharts-visually-hidden"):eO(n),eS(t,n),i.afterInserted&&i.afterInserted()):(r.parentNode&&r.parentNode.removeChild(r),i.element=null)}setScreenReaderSectionAttribs(e,t){let i=this.chart,s=i.langFormat("accessibility.screenReaderSection."+t+"RegionLabel",{chart:i,chartTitle:eC(i)});eR(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,r="highcharts-a11y-sonify-data-btn-"+e.index,n="hc-linkto-highcharts-data-table-"+e.index,o=eT(e),a=e.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:e}),l={headingTagName:eI(e.renderTo),chartTitle:eC(e),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:i.xAxis,yAxisDescription:i.yAxis,playAsSoundButton:s?this.getSonifyButtonText(r):"",viewTableButton:e.exporting?.getCSV?this.getDataTableButtonText(n):"",annotationsTitle:o?a:"",annotationsList:o},h=L.i18nFormat(t,l,e);return this.dataTableButtonId=n,this.sonifyButtonId=r,ez(h)}defaultAfterChartFormatter(){let e=this.chart,t=e.options.accessibility.screenReaderSection.afterChartFormat;if(!t)return"";let i={endOfChartMarker:this.getEndOfChartMarkerText()};return ez(L.i18nFormat(t,i,e))}getLinkedDescription(){let e=this.linkedDescriptionElement;return eF(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,r,n=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 n?"map"===n||"tiledwebmap"===n?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),r=e.series&&e.series.length<2?"Single":"Multiple",(e.langFormat("accessibility.chartTypes."+i+r,l)||e.langFormat("accessibility.chartTypes.default"+r,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:eC(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:eC(t)})+"</button>"}getSubtitleText(){let e=this.chart.options.subtitle;return eF(e&&e.text||"",this.chart.renderer.forExport)}getEndOfChartMarkerText(){let e=eB(`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=eB(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)})}initDataTableButton(e){let t=this.viewDataTableButton=eB(e),i=this.chart,s=e.replace("hc-linkto-","");t&&(eR(t,{tabindex:-1,"aria-expanded":!!eB(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]&&eL(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,r=t("xAxis",!e.angular&&s&&i),n=t("yAxis",s&&i),o={};return r&&(o.xAxis=this.getAxisDescriptionText("xAxis")),n&&(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 eM(e)}),ranges:i.map(function(e){return ek(e)}),numAxes:i.length})}destroy(){this.announcer&&this.announcer.destroy()}},{attr:eU}=w(),{getChartTitle:eG,unhideChartElementFromAT:eK}=W,{getFakeMouseEvent:eV}=S;function eW(e){return e.exporting?.svgElements?.[0]}class eX extends J{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(),eK(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,r=eW(i);e=i.options.exporting,t=eW(i),e&&!1!==e.enabled&&e.accessibility&&e.accessibility.enabled&&t&&t.element&&r&&(this.exportButtonProxy=s.addProxyElement("chartMenu",{click:r},"button",{"aria-label":i.langFormat("accessibility.exporting.menuButtonLabel",{chart:i,chartTitle:eG(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&&eU(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 et(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,r=t.highlightedExportItemIx||0;for(;r--;)if(t.highlightExportItem(r))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(){eV("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(eV("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(eV("mouseout")),t.onmouseover&&t.onmouseover(eV("mouseover")),this.highlightedExportItemIx=e,!0}return!1}function r(){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 n=e.prototype;n.hideExportMenu||(n.hideExportMenu=i,n.highlightExportItem=s,n.highlightLastExportItem=r,n.showExportMenu=t)}}(eX||(eX={}));let eY=eX,{doc:ej,win:e_}=w(),{addEvent:eZ,defined:e$,fireEvent:eQ}=w(),{getElement:eJ,simulatedEventTarget:e0}=S;class e1{constructor(e,t){this.currentModuleIx=NaN,this.modules=[],this.init(e,t)}init(e,t){let i=this.eventProvider=new Z;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(ej,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=eJ(`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,r=s&&s.keyboardNavigation;if(r&&r.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!==e0){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||e_.event,s=this.modules&&this.modules.length&&this.modules[this.currentModuleIx],r=i.target;if((!r||"INPUT"!==r.nodeName||r.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),r=this.chart,n=r.container;r.renderTo.hasAttribute("tabindex")?(n.removeAttribute("tabindex"),e=r.renderTo):e=n,this.tabindexContainer=e;let o=e.getAttribute("tabindex");s&&!o?e.setAttribute("tabindex","0"):s||r.container.removeAttribute("tabindex")}createExitAnchor(){let e=this.chart,t=this.exitAnchor=ej.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&&e$(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||e_.event,r=!(s.relatedTarget&&t.container.contains(s.relatedTarget)||i.exiting);if(t.focusElement&&delete t.focusElement,r){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 e2(){let e=this;eQ(this,"dismissPopupContent",{},function(){e.tooltip&&e.tooltip.hide(0),e.hideExportMenu()})}function e3(e){27===(e.which||e.keyCode)&&w().charts&&w().charts.forEach(e=>{e&&e.dismissPopupContent&&e.dismissPopupContent()})}(e1||(e1={})).compose=function(e){eY.compose(e);let t=e.prototype;return!t.dismissPopupContent&&(t.dismissPopupContent=e2,ej&&eZ(ej,"keydown",e3)),e};let e5=e1;var e4=f(632),e6=f.n(e4);let{animObject:e9}=w(),{doc:e8}=w(),{addEvent:e7,fireEvent:te,isNumber:tt,pick:ti,syncTimeout:ts}=w(),{getChartTitle:tr}=W,{stripHTMLTagsFromString:tn,addClass:to,removeClass:ta}=S;function tl(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 th(e,t){let i=t.legendItem||{};for(let s of(t.setState(e?"hover":"",!0),["group","label","symbol"])){let t=i[s],r=t&&t.element||t;r&&te(r,e?"mouseover":"mouseout")}}class tc extends J{constructor(){super(...arguments),this.highlightedLegendItemIx=NaN,this.proxyGroup=null}init(){let e=this;this.recreateProxies(),this.addEvent(e6(),"afterScroll",function(){this.chart===e.chart&&(e.proxyProvider.updateGroupProxyElementPositions("legend"),e.updateLegendItemProxyVisibility(),e.highlightedLegendItemIx>-1&&this.chart.highlightLegendItem(e.highlightedLegendItemIx))}),this.addEvent(e6(),"afterPositionItem",function(t){this.chart===e.chart&&this.chart.renderer&&e.updateProxyPositionForItem(t.item)}),this.addEvent(e6(),"afterRender",function(){this.chart===e.chart&&this.chart.renderer&&e.recreateProxies()&&ts(()=>e.proxyProvider.updateGroupProxyElementPositions("legend"),e9(ti(this.chart.renderer.globalAnimation,!0)).duration)})}updateLegendItemProxyVisibility(){let e,t=this.chart,i=t.legend,s=i.allItems||[],r=i.currentPage||1,n=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]>n||t!==r-1}l?t.styledMode?to(a,"highcharts-a11y-invisible"):a.style.visibility="hidden":(ta(a,"highcharts-a11y-invisible"),a.style.visibility="")}})}onChartRender(){tl(this.chart)||this.removeProxies()}highlightAdjacentLegendPage(e){let t=this.chart,i=t.legend,s=(i.currentPage||1)+e,r=i.pages||[];if(s>0&&s<=r.length){let e=0;for(let r of i.allItems)((r.legendItem||{}).pageIx||0)+1===s&&t.highlightLegendItem(e)&&(this.highlightedLegendItemIx=e),++e}}updateProxyPositionForItem(e){e.a11yProxyElement&&e.a11yProxyElement.refreshPosition()}recreateProxies(){let e=e8.activeElement,t=this.proxyGroup,i=e&&t&&t.contains(e);return this.removeProxies(),!!tl(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=tn((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:tr(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,r=t.label?.styles?.textOverflow==="ellipsis";if(!t.label||!t.group)return;let n=this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:tn(e.name,this.chart.renderer.forExport),item:e}),o={tabindex:-1,"aria-pressed":e.visible,"aria-label":n,title:""};r&&-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 et(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=>th(!1,e))}})}onKbdArrowKey(e,t){let{keyCodes:{left:i,up:s},highlightedLegendItemIx:r,chart:n}=this,o=n.legend.allItems.length,a=n.options.accessibility.keyboardNavigation.wrapAround,l=t===i||t===s?-1:1;return n.highlightLegendItem(r+l)?this.highlightedLegendItemIx+=l:a&&o>1&&(this.highlightedLegendItemIx=l>0?0:o-1,n.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(!tl(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 td(e){let t=this.legend.allItems,i=this.accessibility&&this.accessibility.components.legend.highlightedLegendItemIx,s=t[e],r=s?.legendItem||{};if(s){var n;let o,a;tt(i)&&t[i]&&th(!1,t[i]),n=this.legend,o=(n.allItems[e].legendItem||{}).pageIx,a=n.currentPage,void 0!==o&&o+1!==a&&n.scroll(1+o-a);let l=r.label,h=s.a11yProxyElement&&s.a11yProxyElement.innerElement;return l&&l.element&&h&&this.setFocusToElement(l,h),th(!0,s),!0}return!1}function tu(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")}(tc||(tc={})).compose=function(e,t){let i=e.prototype;i.highlightLegendItem||(i.highlightLegendItem=td,e7(t,"afterColorizeItem",tu))};let tp=tc;var tg=f(532),tm=f.n(tg);let{isTouchDevice:tb}=w(),{addEvent:tx,merge:tf,pick:ty}=w(),tv=[];function tw(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function tE(){let e,t,i,s=this.legend,r=this.navigator;if(r){e=s&&s.options,t=r.xAxis,i=r.yAxis;let{scrollbarHeight:n,scrollButtonSize:o}=r;this.inverted?(r.left=r.opposite?this.chartWidth-n-r.height:this.spacing[3]+n,r.top=this.plotTop+o):(r.left=ty(t.left,this.plotLeft+o),r.top=r.navigatorOptions.top||this.chartHeight-r.height-n-(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+ty(e.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),t&&i&&(this.inverted?t.options.left=i.options.left=r.left:t.options.top=i.options.top=r.top,t.setAxisSize(),i.setAxisSize())}}function tA(e){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new d(this),ty(e.redraw,!0)&&this.redraw(e.animation))}function tT(){let e=this.options;(e.navigator.enabled||e.scrollbar.enabled)&&(this.scroller=this.navigator=new d(this))}function tM(){let e=this.options,t=e.navigator,i=e.rangeSelector;if((t&&t.enabled||i&&i.enabled)&&(!tb&&"x"===this.zooming.type||tb&&"x"===this.zooming.pinchType))return!1}function tk(e){let t=e.navigator;if(t&&e.xAxis[0]){let i=e.xAxis[0].getExtremes();t.render(i.min,i.max)}}function tC(e){let t=e.options.navigator||{},i=e.options.scrollbar||{};!this.navigator&&!this.scroller&&(t.enabled||i.enabled)&&(tf(!0,this.options.navigator,t),tf(!0,this.options.scrollbar,i),delete e.options.navigator,delete e.options.scrollbar)}let tS=function(e,t){if(w().pushUnique(tv,e)){let i=e.prototype;d=t,i.callbacks.push(tk),tx(e,"afterAddSeries",tw),tx(e,"afterSetChartSize",tE),tx(e,"afterUpdate",tA),tx(e,"beforeRender",tT),tx(e,"beforeShowResetZoom",tM),tx(e,"update",tC)}},{isTouchDevice:tP}=w(),{addEvent:tD,correctFloat:tN,defined:tB,isNumber:tI,pick:tF}=w();function tO(){this.navigatorAxis||(this.navigatorAxis=new tL(this))}function tR(e){let t,i=this.chart,s=i.options,r=s.navigator,n=this.navigatorAxis,o=i.zooming.pinchType,a=s.rangeSelector,l=i.zooming.type;if(this.isXAxis&&(r?.enabled||a?.enabled)){if("y"===l&&"zoom"===e.trigger)t=!1;else if(("zoom"===e.trigger&&"xy"===l||tP&&"xy"===o)&&this.options.range){let t=n.previousZoom;tB(e.min)?n.previousZoom=[this.min,this.max]:t&&(e.min=t[0],e.max=t[1],n.previousZoom=void 0)}}void 0!==t&&e.preventDefault()}class tL{static compose(e){e.keepProps.includes("navigatorAxis")||(e.keepProps.push("navigatorAxis"),tD(e,"init",tO),tD(e,"setExtremes",tR))}constructor(e){this.axis=e}destroy(){this.axis=void 0}toFixedRange(e,t,i,s){let r=this.axis,n=(r.pointRange||0)/2,o=tF(i,r.translate(e,!0,!r.horiz)),a=tF(s,r.translate(t,!0,!r.horiz));return tB(i)||(o=tN(o+n)),tB(s)||(a=tN(a-n)),tI(o)&&tI(a)||(o=a=void 0),{min:o,max:a}}}var tH=f(620),tz=f.n(tH),tq=f(512),tU=f.n(tq);let{parse:tG}=tz(),{seriesTypes:tK}=tU(),tV={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:tG("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===tK.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}},{defined:tW,isNumber:tX,pick:tY}=w(),{relativeLength:tj}=w(),t_={"navigator-handle":function(e,t,i,s,r={}){var n,o,a,l,h;let c=r.width?r.width/2:i,d=tj(r.borderRadius||0,Math.min(2*c,s));return[["M",-1.5,(s=r.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(n=-c-1,o=.5,a=2*c+1,l=s,h={r:d},h?.r?function(e,t,i,s,r){let n=r?.r||0;return[["M",e+n,t],["L",e+i-n,t],["A",n,n,0,0,1,e+i,t+n],["L",e+i,t+s-n],["A",n,n,0,0,1,e+i-n,t+s],["L",e+n,t+s],["A",n,n,0,0,1,e,t+s-n],["L",e,t+n],["A",n,n,0,0,1,e+n,t],["Z"]]}(n,.5,a,l,h):[["M",n,.5],["L",n+a,.5],["L",n+a,.5+l],["L",n,.5+l],["Z"]])]}};var tZ=f(608),t$=f.n(tZ);let{defined:tQ}=w(),{defaultOptions:tJ}=w(),{composed:t0}=w(),{getRendererType:t1}=t$(),{setFixedRange:t2}={setFixedRange:function(e){let t=this.xAxis[0];tQ(t.dataMax)&&tQ(t.dataMin)&&e?this.fixedRange=Math.min(e,t.dataMax-t.dataMin):this.fixedRange=e}},{addEvent:t3,extend:t5,pushUnique:t4}=w();function t6(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let t9=function(e,t,i){tL.compose(t),t4(t0,"Navigator")&&(e.prototype.setFixedRange=t2,t5(t1().prototype.symbols,t_),t5(tJ,{navigator:tV}),t3(i,"afterUpdate",t6))},{composed:t8}=w(),{addEvent:t7,correctFloat:ie,defined:it,pick:ii,pushUnique:is}=w();!function(e){let t;function i(e){let t=ii(e.options?.min,e.min),i=ii(e.options?.max,e.max);return{axisMin:t,axisMax:i,scrollMin:it(e.dataMin)?Math.min(t,e.min??1/0,e.dataMin,e.threshold??1/0):t,scrollMax:e.treeGrid?.adjustedMax??(it(e.dataMax)?Math.max(i,e.max??-1/0,e.dataMax,e.threshold??-1/0):i)}}function s(){let e=this.scrollbar,t=e&&!e.options.opposite,i=this.horiz?2:t?3:1;e&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[i]+=e.size+(e.options.margin||0))}function r(){let e=this;e.options?.scrollbar?.enabled&&(e.options.scrollbar.vertical=!e.horiz,e.options.startOnTick=e.options.endOnTick=!1,e.scrollbar=new t(e.chart.renderer,e.options.scrollbar,e.chart),t7(e.scrollbar,"changed",function(t){let s,r,{axisMin:n,axisMax:o,scrollMin:a,scrollMax:l}=i(e),h=e.toPixels(a),c=e.toPixels(l)-h;if(it(n)&&it(o))if(e.horiz&&!e.reversed||!e.horiz&&e.reversed?(s=Math.min(l,e.toValue(h+c*this.to)),r=Math.max(a,e.toValue(h+c*this.from))):(s=Math.min(l,e.toValue(h+c*(1-this.from))),r=Math.max(a,e.toValue(h+c*(1-this.to)))),this.shouldUpdateExtremes(t.DOMType)){let i="mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&void 0;e.setExtremes(ie(r),ie(s),!0,i,t)}else this.setRange(this.from,this.to)}))}function n(){let e,t,s,{scrollMin:r,scrollMax:n}=i(this),o=this.scrollbar,a=(this.axisTitleMargin||0)+(this.titleOffset||0),l=this.chart.scrollbarsOffsets,h=this.options.margin||0;if(o&&l){if(this.horiz)this.opposite||(l[1]+=a),o.position(this.left,this.top+this.height+2+l[1]-(this.opposite?h:0),this.width,this.height),this.opposite||(l[1]+=h),e=1;else{let t;this.opposite&&(l[0]+=a),t=o.options.opposite?this.left+this.width+2+l[0]-(this.opposite?0:h):this.opposite?0:h,o.position(t,this.top,this.width,this.height),this.opposite&&(l[0]+=h),e=0}if(l[e]+=o.size+(o.options.margin||0),isNaN(r)||isNaN(n)||!it(this.min)||!it(this.max)||it(this.dataMin)&&this.dataMin===this.dataMax)o.setRange(0,1);else if(this.min===this.max){let e=this.pointRange/(this.dataMax