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AAS,CAEL,QAAW,iJACX4kC,mBAAoB,iJACpBC,KAAM,+IACNC,gBAAiB,uJACjBC,OAAQ,+IACRC,kBAAmB,uJACnBC,OAAQ,4IACRC,kBAAmB,oJACnBC,IAAK,4IACLC,eAAgB,oJAChB/F,IAAK,yIACLgG,eAAgB,iJAChBC,QAAS,kJACTC,mBAAoB,0JACpBjG,QAAS,0IACTkG,mBAAoB,kJACpBnD,OAAQ,qJACRoD,kBAAmB,6JACnB7sC,IAAK,uIACL8sC,eAAgB,+IAChBC,QAAS,+IACTC,mBAAoB,uJACpBC,UAAW,qJACXC,qBAAsB,8JAQ1Bx9C,YAAa,gBAObkV,iBAAkB,iBAOlBC,iBAAkB,iBAMlBsoC,eAAgB,WAOhBC,4BAA6B,0CHyDzC,YIjYA,IAAIC,GAAIC,EAAAA,EACRD,GAAE7iD,WAAa63C,GAAc73C,WAC7B6iD,GAAEE,mBAAqBz+C,EACvBu+C,GAAEG,kBAAoBnuC,EACtBguC,GAAE94C,uBAAyBA,EAC3B84C,GAAEp3C,0BAA4BA,EAC9Bo3C,GAAEI,6BAA+B5xB,GACjCwmB,GAAcz0C,QAAQy/C,GAAE3gC,MAAO2gC,GAAE/7B,OAAQ+7B,GAAEtT,MAAOsT,GAAE3T,OAAQ2T,GAAEjZ,WAAYiZ,GAAEnlB","sources":["../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Utils/HTMLUtilities.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/A11yI18n.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Utils/ChartUtilities.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Utils/DOMElementProvider.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Utils/EventProvider.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/AccessibilityComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/KeyboardNavigationHandler.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/ContainerComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/FocusBorder.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Utils/Announcer.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/AnnotationsA11y.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/InfoRegionsComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/MenuComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/KeyboardNavigation.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/LegendComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/ProxyElement.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/ProxyProvider.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Stock/RangeSelector/RangeSelectorDefaults.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Stock/RangeSelector/RangeSelectorComposition.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Stock/RangeSelector/RangeSelector.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/RangeSelectorComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Components/ZoomComponent.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/HighContrastMode.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Options/DeprecatedOptions.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Accessibility.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Options/A11yDefaults.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/HighContrastTheme.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/Accessibility/Options/LangDefaults.js","../../../../../node_modules/.pnpm/highcharts@10.3.3/node_modules/highcharts/es-modules/masters/modules/accessibility.src.js"],"sourcesContent":["/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Utility functions for accessibility module.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nvar doc = H.doc, win = H.win;\nimport U from '../../Core/Utilities.js';\nvar css = U.css;\n/* *\n *\n * Constants\n *\n * */\nvar simulatedEventTarget = win.EventTarget && new win.EventTarget() || 'none';\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * @private\n * @param {Highcharts.HTMLDOMElement} el\n * @param {string} className\n * @return {void}\n */\nfunction addClass(el, className) {\n if (el.classList) {\n el.classList.add(className);\n }\n else if (el.className.indexOf(className) < 0) {\n // Note: Dumb check for class name exists, should be fine for practical\n // use cases, but will return false positives if the element has a class\n // that contains the className.\n el.className += ' ' + className;\n }\n}\n/**\n * @private\n * @param {Highcharts.HTMLDOMElement} el\n * @param {string} className\n * @return {void}\n */\nfunction removeClass(el, className) {\n if (el.classList) {\n el.classList.remove(className);\n }\n else {\n // Note: Dumb logic that will break if the element has a class name that\n // consists of className plus something else.\n el.className = el.className.replace(new RegExp(className, 'g'), '');\n }\n}\n/**\n * Utility function to clone a mouse event for re-dispatching.\n * @private\n */\nfunction cloneMouseEvent(e) {\n if (typeof win.MouseEvent === 'function') {\n return new win.MouseEvent(e.type, e);\n }\n // No MouseEvent support, try using initMouseEvent\n if (doc.createEvent) {\n var evt = doc.createEvent('MouseEvent');\n if (evt.initMouseEvent) {\n evt.initMouseEvent(e.type, e.bubbles, // #10561, #12161\n e.cancelable, e.view || win, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);\n return evt;\n }\n }\n return getFakeMouseEvent(e.type);\n}\n/**\n * Utility function to clone a touch event for re-dispatching.\n * @private\n */\nfunction cloneTouchEvent(e) {\n var touchListToTouchArray = function (l) {\n var touchArray = [];\n for (var i = 0; i < l.length; ++i) {\n var item = l.item(i);\n if (item) {\n touchArray.push(item);\n }\n }\n return touchArray;\n };\n if (typeof win.TouchEvent === 'function') {\n var newEvent = new win.TouchEvent(e.type, {\n touches: touchListToTouchArray(e.touches),\n targetTouches: touchListToTouchArray(e.targetTouches),\n changedTouches: touchListToTouchArray(e.changedTouches),\n ctrlKey: e.ctrlKey,\n shiftKey: e.shiftKey,\n altKey: e.altKey,\n metaKey: e.metaKey,\n bubbles: e.bubbles,\n cancelable: e.cancelable,\n composed: e.composed,\n detail: e.detail,\n view: e.view\n });\n if (e.defaultPrevented) {\n newEvent.preventDefault();\n }\n return newEvent;\n }\n var fakeEvt = cloneMouseEvent(e);\n fakeEvt.touches = e.touches;\n fakeEvt.changedTouches = e.changedTouches;\n fakeEvt.targetTouches = e.targetTouches;\n return fakeEvt;\n}\n/**\n * @private\n */\nfunction escapeStringForHTML(str) {\n return str\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/\\//g, '/');\n}\n/**\n * Get an element by ID\n * @private\n */\nfunction getElement(id) {\n return doc.getElementById(id);\n}\n/**\n * Get a fake mouse event of a given type. If relatedTarget is not given,\n * it will point to simulatedEventTarget, as an indicator that the event\n * is fake.\n * @private\n */\nfunction getFakeMouseEvent(type, position, relatedTarget) {\n var pos = position || {\n x: 0,\n y: 0\n };\n if (typeof win.MouseEvent === 'function') {\n return new win.MouseEvent(type, {\n bubbles: true,\n cancelable: true,\n composed: true,\n button: 0,\n buttons: 1,\n relatedTarget: relatedTarget || simulatedEventTarget,\n view: win,\n detail: type === 'click' ? 1 : 0,\n screenX: pos.x,\n screenY: pos.y,\n clientX: pos.x,\n clientY: pos.y\n });\n }\n // No MouseEvent support, try using initMouseEvent\n if (doc.createEvent) {\n var evt = doc.createEvent('MouseEvent');\n if (evt.initMouseEvent) {\n evt.initMouseEvent(type, true, // Bubble\n true, // Cancel\n win, // View\n type === 'click' ? 1 : 0, // Detail\n // Coords\n pos.x, pos.y, pos.x, pos.y, \n // Pressed keys\n false, false, false, false, 0, // button\n null // related target\n );\n return evt;\n }\n }\n return { type: type };\n}\n/**\n * Get an appropriate heading level for an element. Corresponds to the\n * heading level below the previous heading in the DOM.\n *\n * Note: Only detects previous headings in the DOM that are siblings,\n * ancestors, or previous siblings of ancestors. Headings that are nested below\n * siblings of ancestors (cousins et.al) are not picked up. This is because it\n * is ambiguous whether or not the nesting is for layout purposes or indicates a\n * separate section.\n *\n * @private\n * @param {Highcharts.HTMLDOMElement} [element]\n * @return {string} The heading tag name (h1, h2 etc).\n * If no nearest heading is found, \"p\" is returned.\n */\nfunction getHeadingTagNameForElement(element) {\n var getIncreasedHeadingLevel = function (tagName) {\n var headingLevel = parseInt(tagName.slice(1), 10), newLevel = Math.min(6, headingLevel + 1);\n return 'h' + newLevel;\n };\n var isHeading = function (tagName) { return /H[1-6]/.test(tagName); };\n var getPreviousSiblingsHeading = function (el) {\n var sibling = el;\n while (sibling = sibling.previousSibling) { // eslint-disable-line\n var tagName = sibling.tagName || '';\n if (isHeading(tagName)) {\n return tagName;\n }\n }\n return '';\n };\n var getHeadingRecursive = function (el) {\n var prevSiblingsHeading = getPreviousSiblingsHeading(el);\n if (prevSiblingsHeading) {\n return getIncreasedHeadingLevel(prevSiblingsHeading);\n }\n // No previous siblings are headings, try parent node\n var parent = el.parentElement;\n if (!parent) {\n return 'p';\n }\n var parentTagName = parent.tagName;\n if (isHeading(parentTagName)) {\n return getIncreasedHeadingLevel(parentTagName);\n }\n return getHeadingRecursive(parent);\n };\n return getHeadingRecursive(element);\n}\n/**\n * Remove an element from the DOM.\n * @private\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]\n * @return {void}\n */\nfunction removeElement(element) {\n if (element && element.parentNode) {\n element.parentNode.removeChild(element);\n }\n}\n/**\n * Remove all child nodes from an element.\n * @private\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]\n * @return {void}\n */\nfunction removeChildNodes(element) {\n while (element.lastChild) {\n element.removeChild(element.lastChild);\n }\n}\n/**\n * Utility function. Reverses child nodes of a DOM element.\n * @private\n */\nfunction reverseChildNodes(node) {\n var i = node.childNodes.length;\n while (i--) {\n node.appendChild(node.childNodes[i]);\n }\n}\n/**\n * Used for aria-label attributes, painting on a canvas will fail if the\n * text contains tags.\n * @private\n */\nfunction stripHTMLTagsFromString(str) {\n return typeof str === 'string' ?\n str.replace(/<\\/?[^>]+(>|$)/g, '') : str;\n}\n/**\n * Utility function for hiding an element visually, but still keeping it\n * available to screen reader users.\n * @private\n */\nfunction visuallyHideElement(element) {\n css(element, {\n position: 'absolute',\n width: '1px',\n height: '1px',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n clip: 'rect(1px, 1px, 1px, 1px)',\n marginTop: '-3px',\n '-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha(Opacity=1)',\n filter: 'alpha(opacity=1)',\n opacity: 0.01\n });\n}\n/* *\n *\n * Default Export\n *\n * */\nvar HTMLUtilities = {\n addClass: addClass,\n cloneMouseEvent: cloneMouseEvent,\n cloneTouchEvent: cloneTouchEvent,\n escapeStringForHTML: escapeStringForHTML,\n getElement: getElement,\n getFakeMouseEvent: getFakeMouseEvent,\n getHeadingTagNameForElement: getHeadingTagNameForElement,\n removeChildNodes: removeChildNodes,\n removeClass: removeClass,\n removeElement: removeElement,\n reverseChildNodes: reverseChildNodes,\n simulatedEventTarget: simulatedEventTarget,\n stripHTMLTagsFromString: stripHTMLTagsFromString,\n visuallyHideElement: visuallyHideElement\n};\nexport default HTMLUtilities;\n","/* *\n *\n * Accessibility module - internationalization support\n *\n * (c) 2010-2021 Highsoft AS\n * Author: Øystein Moseng\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport F from '../Core/FormatUtilities.js';\nvar format = F.format;\nimport U from '../Core/Utilities.js';\nvar getNestedProperty = U.getNestedProperty, pick = U.pick;\n/* *\n *\n * Composition\n *\n * */\nvar A11yI18nComposition;\n(function (A11yI18nComposition) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n function compose(ChartClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.langFormat = langFormat;\n }\n return ChartClass;\n }\n A11yI18nComposition.compose = compose;\n /**\n * i18n utility function. Format a single array or plural statement in a\n * format string. If the statement is not an array or plural statement,\n * returns the statement within brackets. Invalid array statements return\n * an empty string.\n *\n * @private\n * @function formatExtendedStatement\n * @param {string} statement\n * @param {Highcharts.Dictionary<*>} ctx\n * Context to apply to the format string.\n */\n function formatExtendedStatement(statement, ctx) {\n var eachStart = statement.indexOf('#each('), pluralStart = statement.indexOf('#plural('), indexStart = statement.indexOf('['), indexEnd = statement.indexOf(']');\n var arr, result;\n // Dealing with an each-function?\n if (eachStart > -1) {\n var eachEnd = statement.slice(eachStart).indexOf(')') + eachStart, preEach = statement.substring(0, eachStart), postEach = statement.substring(eachEnd + 1), eachStatement = statement.substring(eachStart + 6, eachEnd), eachArguments = eachStatement.split(',');\n var lenArg = Number(eachArguments[1]), len = void 0;\n result = '';\n arr = getNestedProperty(eachArguments[0], ctx);\n if (arr) {\n lenArg = isNaN(lenArg) ? arr.length : lenArg;\n len = lenArg < 0 ?\n arr.length + lenArg :\n Math.min(lenArg, arr.length); // Overshoot\n // Run through the array for the specified length\n for (var i = 0; i < len; ++i) {\n result += preEach + arr[i] + postEach;\n }\n }\n return result.length ? result : '';\n }\n // Dealing with a plural-function?\n if (pluralStart > -1) {\n var pluralEnd = (statement.slice(pluralStart).indexOf(')') + pluralStart), pluralStatement = statement.substring(pluralStart + 8, pluralEnd), pluralArguments = pluralStatement.split(','), num = Number(getNestedProperty(pluralArguments[0], ctx));\n switch (num) {\n case 0:\n result = pick(pluralArguments[4], pluralArguments[1]);\n break;\n case 1:\n result = pick(pluralArguments[2], pluralArguments[1]);\n break;\n case 2:\n result = pick(pluralArguments[3], pluralArguments[1]);\n break;\n default:\n result = pluralArguments[1];\n }\n return result ? stringTrim(result) : '';\n }\n // Array index\n if (indexStart > -1) {\n var arrayName = statement.substring(0, indexStart), ix = Number(statement.substring(indexStart + 1, indexEnd));\n var val = void 0;\n arr = getNestedProperty(arrayName, ctx);\n if (!isNaN(ix) && arr) {\n if (ix < 0) {\n val = arr[arr.length + ix];\n // Handle negative overshoot\n if (typeof val === 'undefined') {\n val = arr[0];\n }\n }\n else {\n val = arr[ix];\n // Handle positive overshoot\n if (typeof val === 'undefined') {\n val = arr[arr.length - 1];\n }\n }\n }\n return typeof val !== 'undefined' ? val : '';\n }\n // Standard substitution, delegate to format or similar\n return '{' + statement + '}';\n }\n /* eslint-disable max-len */\n /**\n * i18n formatting function. Extends Highcharts.format() functionality by\n * also handling arrays and plural conditionals. Arrays can be indexed as\n * follows:\n *\n * - Format: 'This is the first index: {myArray[0]}. The last: {myArray[-1]}.'\n *\n * - Context: { myArray: [0, 1, 2, 3, 4, 5] }\n *\n * - Result: 'This is the first index: 0. The last: 5.'\n *\n *\n * They can also be iterated using the #each() function. This will repeat\n * the contents of the bracket expression for each element. Example:\n *\n * - Format: 'List contains: {#each(myArray)cm }'\n *\n * - Context: { myArray: [0, 1, 2] }\n *\n * - Result: 'List contains: 0cm 1cm 2cm '\n *\n *\n * The #each() function optionally takes a length parameter. If positive,\n * this parameter specifies the max number of elements to iterate through.\n * If negative, the function will subtract the number from the length of the\n * array. Use this to stop iterating before the array ends. Example:\n *\n * - Format: 'List contains: {#each(myArray, -1) }and {myArray[-1]}.'\n *\n * - Context: { myArray: [0, 1, 2, 3] }\n *\n * - Result: 'List contains: 0, 1, 2, and 3.'\n *\n *\n * Use the #plural() function to pick a string depending on whether or not a\n * context object is 1. Arguments are #plural(obj, plural, singular).\n * Example:\n *\n * - Format: 'Has {numPoints} {#plural(numPoints, points, point}.'\n *\n * - Context: { numPoints: 5 }\n *\n * - Result: 'Has 5 points.'\n *\n *\n * Optionally there are additional parameters for dual and none:\n * #plural(obj, plural, singular, dual, none). Example:\n *\n * - Format: 'Has {#plural(numPoints, many points, one point, two points,\n * none}.'\n *\n * - Context: { numPoints: 2 }\n *\n * - Result: 'Has two points.'\n *\n *\n * The dual or none parameters will take precedence if they are supplied.\n *\n * @requires modules/accessibility\n *\n * @function Highcharts.i18nFormat\n *\n * @param {string} formatString\n * The string to format.\n *\n * @param {Highcharts.Dictionary<*>} context\n * Context to apply to the format string.\n *\n * @param {Highcharts.Chart} chart\n * A `Chart` instance with a time object and numberFormatter, passed on to\n * format().\n *\n * @return {string}\n * The formatted string.\n */\n function i18nFormat(formatString, context, chart) {\n var getFirstBracketStatement = function (sourceStr, offset) {\n var str = sourceStr.slice(offset || 0), startBracket = str.indexOf('{'), endBracket = str.indexOf('}');\n if (startBracket > -1 && endBracket > startBracket) {\n return {\n statement: str.substring(startBracket + 1, endBracket),\n begin: offset + startBracket + 1,\n end: offset + endBracket\n };\n }\n }, tokens = [];\n var bracketRes, constRes, cursor = 0;\n // Tokenize format string into bracket statements and constants\n do {\n bracketRes = getFirstBracketStatement(formatString, cursor);\n constRes = formatString.substring(cursor, bracketRes && bracketRes.begin - 1);\n // If we have constant content before this bracket statement, add it\n if (constRes.length) {\n tokens.push({\n value: constRes,\n type: 'constant'\n });\n }\n // Add the bracket statement\n if (bracketRes) {\n tokens.push({\n value: bracketRes.statement,\n type: 'statement'\n });\n }\n cursor = bracketRes ? bracketRes.end + 1 : cursor + 1;\n } while (bracketRes);\n // Perform the formatting. The formatArrayStatement function returns\n // the statement in brackets if it is not an array statement, which\n // means it gets picked up by format below.\n tokens.forEach(function (token) {\n if (token.type === 'statement') {\n token.value = formatExtendedStatement(token.value, context);\n }\n });\n // Join string back together and pass to format to pick up non-array\n // statements.\n return format(tokens.reduce(function (acc, cur) { return acc + cur.value; }, ''), context, chart);\n }\n A11yI18nComposition.i18nFormat = i18nFormat;\n /* eslint-enable max-len */\n /**\n * Apply context to a format string from lang options of the chart.\n *\n * @requires modules/accessibility\n *\n * @function Highcharts.Chart#langFormat\n *\n * @param {string} langKey\n * Key (using dot notation) into lang option structure.\n *\n * @param {Highcharts.Dictionary<*>} context\n * Context to apply to the format string.\n *\n * @return {string}\n * The formatted string.\n */\n function langFormat(langKey, context) {\n var keys = langKey.split('.');\n var formatString = this.options.lang, i = 0;\n for (; i < keys.length; ++i) {\n formatString = formatString && formatString[keys[i]];\n }\n return typeof formatString === 'string' ?\n i18nFormat(formatString, context, this) : '';\n }\n /**\n * String trim that works for IE6-8 as well.\n *\n * @private\n * @function stringTrim\n *\n * @param {string} str\n * The input string\n *\n * @return {string}\n * The trimmed string\n */\n function stringTrim(str) {\n return str.trim && str.trim() || str.replace(/^\\s+|\\s+$/g, '');\n }\n})(A11yI18nComposition || (A11yI18nComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default A11yI18nComposition;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Utils for dealing with charts.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nvar doc = H.doc;\nimport HU from './HTMLUtilities.js';\nvar stripHTMLTags = HU.stripHTMLTagsFromString;\nimport U from '../../Core/Utilities.js';\nvar defined = U.defined, find = U.find, fireEvent = U.fireEvent;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * Fire an event on an element that is either wrapped by Highcharts,\n * or a DOM element.\n * @private\n */\nfunction fireEventOnWrappedOrUnwrappedElement(el, eventObject) {\n var type = eventObject.type;\n var hcEvents = el.hcEvents;\n if ((doc.createEvent) &&\n (el.dispatchEvent || el.fireEvent)) {\n if (el.dispatchEvent) {\n el.dispatchEvent(eventObject);\n }\n else {\n el.fireEvent(type, eventObject);\n }\n }\n else if (hcEvents && hcEvents[type]) {\n fireEvent(el, type, eventObject);\n }\n else if (el.element) {\n fireEventOnWrappedOrUnwrappedElement(el.element, eventObject);\n }\n}\n/**\n * @private\n */\nfunction getChartTitle(chart) {\n return stripHTMLTags(chart.options.title.text ||\n chart.langFormat('accessibility.defaultChartTitle', { chart: chart }));\n}\n/**\n * Return string with the axis name/title.\n * @private\n */\nfunction getAxisDescription(axis) {\n return axis && (axis.userOptions && axis.userOptions.accessibility &&\n axis.userOptions.accessibility.description ||\n axis.axisTitle && axis.axisTitle.textStr ||\n axis.options.id ||\n axis.categories && 'categories' ||\n axis.dateTime && 'Time' ||\n 'values');\n}\n/**\n * Return string with text description of the axis range.\n * @private\n * @param {Highcharts.Axis} axis\n * The axis to get range desc of.\n * @return {string}\n * A string with the range description for the axis.\n */\nfunction getAxisRangeDescription(axis) {\n var axisOptions = axis.options || {};\n // Handle overridden range description\n if (axisOptions.accessibility &&\n typeof axisOptions.accessibility.rangeDescription !== 'undefined') {\n return axisOptions.accessibility.rangeDescription;\n }\n // Handle category axes\n if (axis.categories) {\n return getCategoryAxisRangeDesc(axis);\n }\n // Use time range, not from-to?\n if (axis.dateTime && (axis.min === 0 || axis.dataMin === 0)) {\n return getAxisTimeLengthDesc(axis);\n }\n // Just use from and to.\n // We have the range and the unit to use, find the desc format\n return getAxisFromToDescription(axis);\n}\n/**\n * Describe the range of a category axis.\n * @private\n */\nfunction getCategoryAxisRangeDesc(axis) {\n var chart = axis.chart;\n if (axis.dataMax && axis.dataMin) {\n return chart.langFormat('accessibility.axis.rangeCategories', {\n chart: chart,\n axis: axis,\n numCategories: axis.dataMax - axis.dataMin + 1\n });\n }\n return '';\n}\n/**\n * Describe the length of the time window shown on an axis.\n * @private\n */\nfunction getAxisTimeLengthDesc(axis) {\n var chart = axis.chart, range = {}, min = axis.dataMin || axis.min || 0, max = axis.dataMax || axis.max || 0;\n var rangeUnit = 'Seconds';\n range.Seconds = (max - min) / 1000;\n range.Minutes = range.Seconds / 60;\n range.Hours = range.Minutes / 60;\n range.Days = range.Hours / 24;\n ['Minutes', 'Hours', 'Days'].forEach(function (unit) {\n if (range[unit] > 2) {\n rangeUnit = unit;\n }\n });\n var rangeValue = range[rangeUnit].toFixed(rangeUnit !== 'Seconds' &&\n rangeUnit !== 'Minutes' ? 1 : 0 // Use decimals for days/hours\n );\n // We have the range and the unit to use, find the desc format\n return chart.langFormat('accessibility.axis.timeRange' + rangeUnit, {\n chart: chart,\n axis: axis,\n range: rangeValue.replace('.0', '')\n });\n}\n/**\n * Describe an axis from-to range.\n * @private\n */\nfunction getAxisFromToDescription(axis) {\n var chart = axis.chart, options = chart.options, dateRangeFormat = (options &&\n options.accessibility &&\n options.accessibility.screenReaderSection.axisRangeDateFormat ||\n ''), extremes = {\n min: axis.dataMin || axis.min || 0,\n max: axis.dataMax || axis.max || 0\n }, format = function (key) {\n return axis.dateTime ?\n chart.time.dateFormat(dateRangeFormat, extremes[key]) :\n extremes[key].toString();\n };\n return chart.langFormat('accessibility.axis.rangeFromTo', {\n chart: chart,\n axis: axis,\n rangeFrom: format('min'),\n rangeTo: format('max')\n });\n}\n/**\n * Get the DOM element for the first point in the series.\n * @private\n * @param {Highcharts.Series} series\n * The series to get element for.\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement|undefined}\n * The DOM element for the point.\n */\nfunction getSeriesFirstPointElement(series) {\n if (series.points && series.points.length) {\n var firstPointWithGraphic = find(series.points, function (p) { return !!p.graphic; });\n return (firstPointWithGraphic &&\n firstPointWithGraphic.graphic &&\n firstPointWithGraphic.graphic.element);\n }\n}\n/**\n * Get the DOM element for the series that we put accessibility info on.\n * @private\n * @param {Highcharts.Series} series\n * The series to get element for.\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement|undefined}\n * The DOM element for the series\n */\nfunction getSeriesA11yElement(series) {\n var firstPointEl = getSeriesFirstPointElement(series);\n return (firstPointEl &&\n firstPointEl.parentNode || series.graph &&\n series.graph.element || series.group &&\n series.group.element); // Could be tracker series depending on series type\n}\n/**\n * Remove aria-hidden from element. Also unhides parents of the element, and\n * hides siblings that are not explicitly unhidden.\n * @private\n */\nfunction unhideChartElementFromAT(chart, element) {\n element.setAttribute('aria-hidden', false);\n if (element === chart.renderTo ||\n !element.parentNode ||\n element.parentNode === doc.body // #16126: Full screen printing\n ) {\n return;\n }\n // Hide siblings unless their hidden state is already explicitly set\n Array.prototype.forEach.call(element.parentNode.childNodes, function (node) {\n if (!node.hasAttribute('aria-hidden')) {\n node.setAttribute('aria-hidden', true);\n }\n });\n // Repeat for parent\n unhideChartElementFromAT(chart, element.parentNode);\n}\n/**\n * Hide series from screen readers.\n * @private\n */\nfunction hideSeriesFromAT(series) {\n var seriesEl = getSeriesA11yElement(series);\n if (seriesEl) {\n seriesEl.setAttribute('aria-hidden', true);\n }\n}\n/**\n * Get series objects by series name.\n * @private\n */\nfunction getSeriesFromName(chart, name) {\n if (!name) {\n return chart.series;\n }\n return (chart.series || []).filter(function (s) {\n return s.name === name;\n });\n}\n/**\n * Get point in a series from x/y values.\n * @private\n */\nfunction getPointFromXY(series, x, y) {\n var i = series.length, res;\n while (i--) {\n res = find(series[i].points || [], function (p) {\n return p.x === x && p.y === y;\n });\n if (res) {\n return res;\n }\n }\n}\n/**\n * Get relative position of point on an x/y axis from 0 to 1.\n * @private\n */\nfunction getRelativePointAxisPosition(axis, point) {\n if (!defined(axis.dataMin) || !defined(axis.dataMax)) {\n return 0;\n }\n var axisStart = axis.toPixels(axis.dataMin), axisEnd = axis.toPixels(axis.dataMax), \n // We have to use pixel position because of axis breaks, log axis etc.\n positionProp = axis.coll === 'xAxis' ? 'x' : 'y', pointPos = axis.toPixels(point[positionProp] || 0);\n return (pointPos - axisStart) / (axisEnd - axisStart);\n}\n/**\n * Get relative position of point on an x/y axis from 0 to 1.\n * @private\n */\nfunction scrollToPoint(point) {\n var xAxis = point.series.xAxis, yAxis = point.series.yAxis, axis = (xAxis && xAxis.scrollbar ? xAxis : yAxis), scrollbar = (axis && axis.scrollbar);\n if (scrollbar && defined(scrollbar.to) && defined(scrollbar.from)) {\n var range = scrollbar.to - scrollbar.from;\n var pos = getRelativePointAxisPosition(axis, point);\n scrollbar.updatePosition(pos - range / 2, pos + range / 2);\n fireEvent(scrollbar, 'changed', {\n from: scrollbar.from,\n to: scrollbar.to,\n trigger: 'scrollbar',\n DOMEvent: null\n });\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nvar ChartUtilities = {\n fireEventOnWrappedOrUnwrappedElement: fireEventOnWrappedOrUnwrappedElement,\n getChartTitle: getChartTitle,\n getAxisDescription: getAxisDescription,\n getAxisRangeDescription: getAxisRangeDescription,\n getPointFromXY: getPointFromXY,\n getSeriesFirstPointElement: getSeriesFirstPointElement,\n getSeriesFromName: getSeriesFromName,\n getSeriesA11yElement: getSeriesA11yElement,\n unhideChartElementFromAT: unhideChartElementFromAT,\n hideSeriesFromAT: hideSeriesFromAT,\n scrollToPoint: scrollToPoint\n};\nexport default ChartUtilities;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Class that can keep track of elements added to DOM and clean them up on\n * destroy.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nvar doc = H.doc;\nimport HU from './HTMLUtilities.js';\nvar removeElement = HU.removeElement;\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n */\nvar DOMElementProvider = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function DOMElementProvider() {\n this.elements = [];\n }\n /**\n * Create an element and keep track of it for later removal.\n * Same args as document.createElement\n * @private\n */\n DOMElementProvider.prototype.createElement = function () {\n var el = doc.createElement.apply(doc, arguments);\n this.elements.push(el);\n return el;\n };\n /**\n * Destroy all created elements, removing them from the DOM.\n * @private\n */\n DOMElementProvider.prototype.destroyCreatedElements = function () {\n this.elements.forEach(function (element) {\n removeElement(element);\n });\n this.elements = [];\n };\n return DOMElementProvider;\n}());\n/* *\n *\n * Default Export\n *\n * */\nexport default DOMElementProvider;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Class that can keep track of events added, and clean them up on destroy.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../../Core/Globals.js';\nimport U from '../../Core/Utilities.js';\nvar addEvent = U.addEvent;\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n */\nvar EventProvider = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function EventProvider() {\n this.eventRemovers = [];\n }\n /**\n * Add an event to an element and keep track of it for later removal.\n * Same args as Highcharts.addEvent.\n * @private\n */\n EventProvider.prototype.addEvent = function () {\n var remover = addEvent.apply(H, arguments);\n this.eventRemovers.push(remover);\n return remover;\n };\n /**\n * Remove all added events.\n * @private\n */\n EventProvider.prototype.removeAddedEvents = function () {\n this.eventRemovers.forEach(function (remover) { return remover(); });\n this.eventRemovers = [];\n };\n return EventProvider;\n}());\n/* *\n *\n * Default Export\n *\n * */\nexport default EventProvider;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component class definition\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport CU from './Utils/ChartUtilities.js';\nvar fireEventOnWrappedOrUnwrappedElement = CU.fireEventOnWrappedOrUnwrappedElement;\nimport DOMElementProvider from './Utils/DOMElementProvider.js';\nimport EventProvider from './Utils/EventProvider.js';\nimport HU from './Utils/HTMLUtilities.js';\nvar getFakeMouseEvent = HU.getFakeMouseEvent;\nimport U from '../Core/Utilities.js';\nvar extend = U.extend;\n/* *\n *\n * Class\n *\n * */\n/**\n * The AccessibilityComponent base class, representing a part of the chart that\n * has accessibility logic connected to it. This class can be inherited from to\n * create a custom accessibility component for a chart.\n *\n * Components should take care to destroy added elements and unregister event\n * handlers on destroy. This is handled automatically if using this.addEvent and\n * this.createElement.\n *\n * @sample highcharts/accessibility/custom-component\n * Custom accessibility component\n *\n * @requires module:modules/accessibility\n * @class\n * @name Highcharts.AccessibilityComponent\n */\nvar AccessibilityComponent = /** @class */ (function () {\n function AccessibilityComponent() {\n /* *\n *\n * Properties\n *\n * */\n this.chart = void 0;\n this.domElementProvider = void 0;\n this.eventProvider = void 0;\n this.keyCodes = void 0;\n this.proxyProvider = void 0;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Initialize the class\n * @private\n * @param {Highcharts.Chart} chart The chart object\n * @param {Highcharts.ProxyProvider} proxyProvider The proxy provider of the accessibility module\n */\n AccessibilityComponent.prototype.initBase = function (chart, proxyProvider) {\n this.chart = chart;\n this.eventProvider = new EventProvider();\n this.domElementProvider = new DOMElementProvider();\n this.proxyProvider = proxyProvider;\n // Key code enum for common keys\n this.keyCodes = {\n left: 37,\n right: 39,\n up: 38,\n down: 40,\n enter: 13,\n space: 32,\n esc: 27,\n tab: 9,\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36\n };\n };\n /**\n * Add an event to an element and keep track of it for later removal.\n * See EventProvider for details.\n * @private\n */\n AccessibilityComponent.prototype.addEvent = function (el, type, fn, options) {\n return this.eventProvider.addEvent(el, type, fn, options);\n };\n /**\n * Create an element and keep track of it for later removal.\n * See DOMElementProvider for details.\n * @private\n */\n AccessibilityComponent.prototype.createElement = function (tagName, options) {\n return this.domElementProvider.createElement(tagName, options);\n };\n /**\n * Fire a fake click event on an element. It is useful to have this on\n * AccessibilityComponent for users of custom components.\n */\n AccessibilityComponent.prototype.fakeClickEvent = function (el) {\n var fakeEvent = getFakeMouseEvent('click');\n fireEventOnWrappedOrUnwrappedElement(el, fakeEvent);\n };\n /**\n * Remove traces of the component.\n * @private\n */\n AccessibilityComponent.prototype.destroyBase = function () {\n this.domElementProvider.destroyCreatedElements();\n this.eventProvider.removeAddedEvents();\n };\n return AccessibilityComponent;\n}());\nextend(AccessibilityComponent.prototype, \n/** @lends Highcharts.AccessibilityComponent */\n{\n /**\n * Called on component initialization.\n */\n init: function () { },\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n getKeyboardNavigation: function () { },\n /**\n * Called on updates to the chart, including options changes.\n * Note that this is also called on first render of chart.\n */\n onChartUpdate: function () { },\n /**\n * Called on every chart render.\n */\n onChartRender: function () { },\n /**\n * Called when accessibility is disabled or chart is destroyed.\n */\n destroy: function () { }\n});\n/* *\n *\n * Default Export\n *\n * */\nexport default AccessibilityComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Keyboard navigation handler base class definition\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport U from '../Core/Utilities.js';\nvar find = U.find;\n/* *\n *\n * Class\n *\n * */\n/**\n * Define a keyboard navigation handler for use with a\n * Highcharts.AccessibilityComponent instance. This functions as an abstraction\n * layer for keyboard navigation, and defines a map of keyCodes to handler\n * functions.\n *\n * @requires module:modules/accessibility\n *\n * @sample highcharts/accessibility/custom-component\n * Custom accessibility component\n *\n * @class\n * @name Highcharts.KeyboardNavigationHandler\n *\n * @param {Highcharts.Chart} chart\n * The chart this module should act on.\n *\n * @param {Highcharts.KeyboardNavigationHandlerOptionsObject} options\n * Options for the keyboard navigation handler.\n */\nvar KeyboardNavigationHandler = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function KeyboardNavigationHandler(chart, options) {\n this.chart = chart;\n this.keyCodeMap = options.keyCodeMap || [];\n this.validate = options.validate;\n this.init = options.init;\n this.terminate = options.terminate;\n // Response enum\n this.response = {\n success: 1,\n prev: 2,\n next: 3,\n noHandler: 4,\n fail: 5 // Handler failed\n };\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Find handler function(s) for key code in the keyCodeMap and run it.\n *\n * @function KeyboardNavigationHandler#run\n * @param {global.KeyboardEvent} e\n * @return {number} Returns a response code indicating whether the run was\n * a success/fail/unhandled, or if we should move to next/prev module.\n */\n KeyboardNavigationHandler.prototype.run = function (e) {\n var keyCode = e.which || e.keyCode;\n var response = this.response.noHandler;\n var handlerCodeSet = find(this.keyCodeMap, function (codeSet) {\n return codeSet[0].indexOf(keyCode) > -1;\n });\n if (handlerCodeSet) {\n response = handlerCodeSet[1].call(this, keyCode, e);\n }\n else if (keyCode === 9) {\n // Default tab handler, move to next/prev module\n response = this.response[e.shiftKey ? 'prev' : 'next'];\n }\n return response;\n };\n return KeyboardNavigationHandler;\n}());\n/* *\n *\n * Default Export\n *\n * */\nexport default KeyboardNavigationHandler;\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Options for the keyboard navigation handler.\n *\n * @interface Highcharts.KeyboardNavigationHandlerOptionsObject\n */ /**\n* An array containing pairs of an array of keycodes, mapped to a handler\n* function. When the keycode is received, the handler is called with the\n* keycode as parameter.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#keyCodeMap\n* @type {Array, Function>>}\n*/ /**\n* Function to run on initialization of module.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#init\n* @type {Function}\n*/ /**\n* Function to run before moving to next/prev module. Receives moving direction\n* as parameter: +1 for next, -1 for previous.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#terminate\n* @type {Function|undefined}\n*/ /**\n* Function to run to validate module. Should return false if module should not\n* run, true otherwise. Receives chart as parameter.\n* @name Highcharts.KeyboardNavigationHandlerOptionsObject#validate\n* @type {Function|undefined}\n*/\n(''); // keeps doclets above in JS file\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for chart container.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport CU from '../Utils/ChartUtilities.js';\nvar unhideChartElementFromAT = CU.unhideChartElementFromAT, getChartTitle = CU.getChartTitle;\nimport H from '../../Core/Globals.js';\nvar doc = H.doc;\nimport HU from '../Utils/HTMLUtilities.js';\nvar stripHTMLTags = HU.stripHTMLTagsFromString;\n/**\n * The ContainerComponent class\n *\n * @private\n * @class\n * @name Highcharts.ContainerComponent\n */\nvar ContainerComponent = /** @class */ (function (_super) {\n __extends(ContainerComponent, _super);\n function ContainerComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Called on first render/updates to the chart, including options changes.\n */\n ContainerComponent.prototype.onChartUpdate = function () {\n this.handleSVGTitleElement();\n this.setSVGContainerLabel();\n this.setGraphicContainerAttrs();\n this.setRenderToAttrs();\n this.makeCreditsAccessible();\n };\n /**\n * @private\n */\n ContainerComponent.prototype.handleSVGTitleElement = function () {\n var chart = this.chart, titleId = 'highcharts-title-' + chart.index, titleContents = stripHTMLTags(chart.langFormat('accessibility.svgContainerTitle', {\n chartTitle: getChartTitle(chart)\n }));\n if (titleContents.length) {\n var titleElement = this.svgTitleElement =\n this.svgTitleElement || doc.createElementNS('http://www.w3.org/2000/svg', 'title');\n titleElement.textContent = titleContents;\n titleElement.id = titleId;\n chart.renderTo.insertBefore(titleElement, chart.renderTo.firstChild);\n }\n };\n /**\n * @private\n */\n ContainerComponent.prototype.setSVGContainerLabel = function () {\n var chart = this.chart, svgContainerLabel = chart.langFormat('accessibility.svgContainerLabel', {\n chartTitle: getChartTitle(chart)\n });\n if (chart.renderer.box && svgContainerLabel.length) {\n chart.renderer.box.setAttribute('aria-label', svgContainerLabel);\n }\n };\n /**\n * @private\n */\n ContainerComponent.prototype.setGraphicContainerAttrs = function () {\n var chart = this.chart, label = chart.langFormat('accessibility.graphicContainerLabel', {\n chartTitle: getChartTitle(chart)\n });\n if (label.length) {\n chart.container.setAttribute('aria-label', label);\n }\n };\n /**\n * Set attributes on the chart container element.\n * @private\n */\n ContainerComponent.prototype.setRenderToAttrs = function () {\n var chart = this.chart, shouldHaveLandmark = chart.options.accessibility\n .landmarkVerbosity !== 'disabled', containerLabel = chart.langFormat('accessibility.chartContainerLabel', {\n title: getChartTitle(chart),\n chart: chart\n });\n if (containerLabel) {\n chart.renderTo.setAttribute('role', shouldHaveLandmark ? 'region' : 'group');\n chart.renderTo.setAttribute('aria-label', containerLabel);\n }\n };\n /**\n * @private\n */\n ContainerComponent.prototype.makeCreditsAccessible = function () {\n var chart = this.chart, credits = chart.credits;\n if (credits) {\n if (credits.textStr) {\n credits.element.setAttribute('aria-label', chart.langFormat('accessibility.credits', { creditsStr: stripHTMLTags(credits.textStr) }));\n }\n unhideChartElementFromAT(chart, credits.element);\n }\n };\n /**\n * Empty handler to just set focus on chart\n * @private\n */\n ContainerComponent.prototype.getKeyboardNavigation = function () {\n var chart = this.chart;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [],\n validate: function () {\n return true;\n },\n init: function () {\n var a11y = chart.accessibility;\n if (a11y) {\n a11y.keyboardNavigation.tabindexContainer.focus();\n }\n }\n });\n };\n /**\n * Accessibility disabled/chart destroyed.\n */\n ContainerComponent.prototype.destroy = function () {\n this.chart.renderTo.setAttribute('aria-hidden', true);\n };\n return ContainerComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Default Export\n *\n * */\nexport default ContainerComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Extend SVG and Chart classes with focus border capabilities.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport SVGLabel from '../Core/Renderer/SVG/SVGLabel.js';\nimport U from '../Core/Utilities.js';\nvar addEvent = U.addEvent, pick = U.pick;\n/* *\n *\n * Composition\n *\n * */\nvar FocusBorderComposition;\n(function (FocusBorderComposition) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n // Attributes that trigger a focus border update\n var svgElementBorderUpdateTriggers = [\n 'x', 'y', 'transform', 'width', 'height', 'r', 'd', 'stroke-width'\n ];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n function compose(ChartClass, SVGElementClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.renderFocusBorder = chartRenderFocusBorder;\n chartProto.setFocusToElement = chartSetFocusToElement;\n }\n if (composedClasses.indexOf(SVGElementClass) === -1) {\n composedClasses.push(SVGElementClass);\n var svgElementProto = SVGElementClass.prototype;\n svgElementProto.addFocusBorder = svgElementAddFocusBorder;\n svgElementProto.removeFocusBorder = svgElementRemoveFocusBorder;\n }\n }\n FocusBorderComposition.compose = compose;\n /**\n * Redraws the focus border on the currently focused element.\n *\n * @private\n * @function Highcharts.Chart#renderFocusBorder\n */\n function chartRenderFocusBorder() {\n var focusElement = this.focusElement, focusBorderOptions = this.options.accessibility.keyboardNavigation.focusBorder;\n if (focusElement) {\n focusElement.removeFocusBorder();\n if (focusBorderOptions.enabled) {\n focusElement.addFocusBorder(focusBorderOptions.margin, {\n stroke: focusBorderOptions.style.color,\n strokeWidth: focusBorderOptions.style.lineWidth,\n r: focusBorderOptions.style.borderRadius\n });\n }\n }\n }\n /**\n * Set chart's focus to an SVGElement. Calls focus() on it, and draws the\n * focus border. This is used by multiple components.\n *\n * @private\n * @function Highcharts.Chart#setFocusToElement\n *\n * @param {Highcharts.SVGElement} svgElement\n * Element to draw the border around.\n *\n * @param {SVGDOMElement|HTMLDOMElement} [focusElement]\n * If supplied, it draws the border around svgElement and sets the focus to\n * focusElement.\n */\n function chartSetFocusToElement(svgElement, focusElement) {\n var focusBorderOptions = this.options.accessibility.keyboardNavigation.focusBorder, browserFocusElement = focusElement || svgElement.element;\n // Set browser focus if possible\n if (browserFocusElement &&\n browserFocusElement.focus) {\n // If there is no focusin-listener, add one to work around Edge\n // where Narrator is not reading out points despite calling focus().\n if (!(browserFocusElement.hcEvents &&\n browserFocusElement.hcEvents.focusin)) {\n addEvent(browserFocusElement, 'focusin', function () { });\n }\n browserFocusElement.focus();\n // Hide default focus ring\n if (focusBorderOptions.hideBrowserFocusOutline) {\n browserFocusElement.style.outline = 'none';\n }\n }\n if (this.focusElement) {\n this.focusElement.removeFocusBorder();\n }\n this.focusElement = svgElement;\n this.renderFocusBorder();\n }\n /**\n * Add hook to destroy focus border if SVG element is destroyed, unless\n * hook already exists.\n * @private\n * @param el Element to add destroy hook to\n */\n function svgElementAddDestroyFocusBorderHook(el) {\n if (el.focusBorderDestroyHook) {\n return;\n }\n var origDestroy = el.destroy;\n el.destroy = function () {\n if (el.focusBorder && el.focusBorder.destroy) {\n el.focusBorder.destroy();\n }\n return origDestroy.apply(el, arguments);\n };\n el.focusBorderDestroyHook = origDestroy;\n }\n /**\n * Add focus border functionality to SVGElements. Draws a new rect on top of\n * element around its bounding box. This is used by multiple components.\n *\n * @private\n * @function Highcharts.SVGElement#addFocusBorder\n *\n * @param {number} margin\n *\n * @param {SVGAttributes} attribs\n */\n function svgElementAddFocusBorder(margin, attribs) {\n // Allow updating by just adding new border\n if (this.focusBorder) {\n this.removeFocusBorder();\n }\n // Add the border rect\n var bb = this.getBBox(), pad = pick(margin, 3), parent = this.parentGroup, scaleX = this.scaleX || parent && parent.scaleX, scaleY = this.scaleY || parent && parent.scaleY, oneDefined = scaleX ? !scaleY : scaleY, scaleBoth = oneDefined ? Math.abs(scaleX || scaleY || 1) :\n (Math.abs(scaleX || 1) + Math.abs(scaleY || 1)) / 2;\n bb.x += this.translateX ? this.translateX : 0;\n bb.y += this.translateY ? this.translateY : 0;\n var borderPosX = bb.x - pad, borderPosY = bb.y - pad, borderWidth = bb.width + 2 * pad, borderHeight = bb.height + 2 * pad;\n /**\n * For text elements, apply x and y offset, #11397.\n * @private\n */\n function getTextAnchorCorrection(text) {\n var posXCorrection = 0, posYCorrection = 0;\n if (text.attr('text-anchor') === 'middle') {\n posXCorrection = posYCorrection = 0.5;\n }\n else if (!text.rotation) {\n posYCorrection = 0.75;\n }\n else {\n posXCorrection = 0.25;\n }\n return {\n x: posXCorrection,\n y: posYCorrection\n };\n }\n var isLabel = this instanceof SVGLabel;\n if (this.element.nodeName === 'text' || isLabel) {\n var isRotated = !!this.rotation;\n var correction = !isLabel ? getTextAnchorCorrection(this) :\n {\n x: isRotated ? 1 : 0,\n y: 0\n };\n var attrX = +this.attr('x');\n var attrY = +this.attr('y');\n if (!isNaN(attrX)) {\n borderPosX = attrX - (bb.width * correction.x) - pad;\n }\n if (!isNaN(attrY)) {\n borderPosY = attrY - (bb.height * correction.y) - pad;\n }\n if (isLabel && isRotated) {\n var temp = borderWidth;\n borderWidth = borderHeight;\n borderHeight = temp;\n if (!isNaN(attrX)) {\n borderPosX = attrX - (bb.height * correction.x) - pad;\n }\n if (!isNaN(attrY)) {\n borderPosY = attrY - (bb.width * correction.y) - pad;\n }\n }\n }\n this.focusBorder = this.renderer.rect(borderPosX, borderPosY, borderWidth, borderHeight, parseInt((attribs && attribs.r || 0).toString(), 10) / scaleBoth)\n .addClass('highcharts-focus-border')\n .attr({\n zIndex: 99\n })\n .add(parent);\n if (!this.renderer.styledMode) {\n this.focusBorder.attr({\n stroke: attribs && attribs.stroke,\n 'stroke-width': (attribs && attribs.strokeWidth || 0) / scaleBoth\n });\n }\n avgElementAddUpdateFocusBorderHooks(this, margin, attribs);\n svgElementAddDestroyFocusBorderHook(this);\n }\n /**\n * Add hooks to update the focus border of an element when the element\n * size/position is updated, unless already added.\n * @private\n * @param el Element to add update hooks to\n * @param updateParams Parameters to pass through to addFocusBorder when updating.\n */\n function avgElementAddUpdateFocusBorderHooks(el) {\n var updateParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n updateParams[_i - 1] = arguments[_i];\n }\n if (el.focusBorderUpdateHooks) {\n return;\n }\n el.focusBorderUpdateHooks = {};\n svgElementBorderUpdateTriggers.forEach(function (trigger) {\n var setterKey = trigger + 'Setter';\n var origSetter = el[setterKey] || el._defaultSetter;\n el.focusBorderUpdateHooks[setterKey] = origSetter;\n el[setterKey] = function () {\n var ret = origSetter.apply(el, arguments);\n el.addFocusBorder.apply(el, updateParams);\n return ret;\n };\n });\n }\n /**\n * Remove hook from SVG element added by addDestroyFocusBorderHook, if\n * existing.\n * @private\n * @param el Element to remove destroy hook from\n */\n function svgElementRemoveDestroyFocusBorderHook(el) {\n if (!el.focusBorderDestroyHook) {\n return;\n }\n el.destroy = el.focusBorderDestroyHook;\n delete el.focusBorderDestroyHook;\n }\n /**\n * Add focus border functionality to SVGElements. Draws a new rect on top of\n * element around its bounding box. This is used by multiple components.\n * @private\n * @function Highcharts.SVGElement#removeFocusBorder\n */\n function svgElementRemoveFocusBorder() {\n svgElementRemoveUpdateFocusBorderHooks(this);\n svgElementRemoveDestroyFocusBorderHook(this);\n if (this.focusBorder) {\n this.focusBorder.destroy();\n delete this.focusBorder;\n }\n }\n /**\n * Remove hooks from SVG element added by addUpdateFocusBorderHooks, if\n * existing.\n * @private\n * @param el Element to remove update hooks from\n */\n function svgElementRemoveUpdateFocusBorderHooks(el) {\n if (!el.focusBorderUpdateHooks) {\n return;\n }\n Object.keys(el.focusBorderUpdateHooks).forEach(function (setterKey) {\n var origSetter = el.focusBorderUpdateHooks[setterKey];\n if (origSetter === el._defaultSetter) {\n delete el[setterKey];\n }\n else {\n el[setterKey] = origSetter;\n }\n });\n delete el.focusBorderUpdateHooks;\n }\n})(FocusBorderComposition || (FocusBorderComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default FocusBorderComposition;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Create announcer to speak messages to screen readers and other AT.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport AST from '../../Core/Renderer/HTML/AST.js';\nimport DOMElementProvider from './DOMElementProvider.js';\nimport H from '../../Core/Globals.js';\nvar doc = H.doc;\nimport HU from './HTMLUtilities.js';\nvar addClass = HU.addClass, visuallyHideElement = HU.visuallyHideElement;\nimport U from '../../Core/Utilities.js';\nvar attr = U.attr;\n/* *\n *\n * Class\n *\n * */\nvar Announcer = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function Announcer(chart, type) {\n this.chart = chart;\n this.domElementProvider = new DOMElementProvider();\n this.announceRegion = this.addAnnounceRegion(type);\n }\n /* *\n *\n * Functions\n *\n * */\n Announcer.prototype.destroy = function () {\n this.domElementProvider.destroyCreatedElements();\n };\n Announcer.prototype.announce = function (message) {\n var _this = this;\n AST.setElementHTML(this.announceRegion, message);\n // Delete contents after a little while to avoid user finding the live\n // region in the DOM.\n if (this.clearAnnouncementRegionTimer) {\n clearTimeout(this.clearAnnouncementRegionTimer);\n }\n this.clearAnnouncementRegionTimer = setTimeout(function () {\n _this.announceRegion.innerHTML = AST.emptyHTML;\n delete _this.clearAnnouncementRegionTimer;\n }, 1000);\n };\n Announcer.prototype.addAnnounceRegion = function (type) {\n var chartContainer = (this.chart.announcerContainer || this.createAnnouncerContainer()), div = this.domElementProvider.createElement('div');\n attr(div, {\n 'aria-hidden': false,\n 'aria-live': type\n });\n if (this.chart.styledMode) {\n addClass(div, 'highcharts-visually-hidden');\n }\n else {\n visuallyHideElement(div);\n }\n chartContainer.appendChild(div);\n return div;\n };\n Announcer.prototype.createAnnouncerContainer = function () {\n var chart = this.chart, container = doc.createElement('div');\n attr(container, {\n 'aria-hidden': false,\n 'class': 'highcharts-announcer-container'\n });\n container.style.position = 'relative';\n chart.renderTo.insertBefore(container, chart.renderTo.firstChild);\n chart.announcerContainer = container;\n return container;\n };\n return Announcer;\n}());\n/* *\n *\n * Default Export\n *\n * */\nexport default Announcer;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Annotations accessibility code.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport HTMLUtilities from '../Utils/HTMLUtilities.js';\nvar escapeStringForHTML = HTMLUtilities.escapeStringForHTML, stripHTMLTagsFromString = HTMLUtilities.stripHTMLTagsFromString;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Get list of all annotation labels in the chart.\n *\n * @private\n * @param {Highcharts.Chart} chart The chart to get annotation info on.\n * @return {Array} The labels, or empty array if none.\n */\nfunction getChartAnnotationLabels(chart) {\n var annotations = chart.annotations || [];\n return annotations.reduce(function (acc, cur) {\n if (cur.options &&\n cur.options.visible !== false) {\n acc = acc.concat(cur.labels);\n }\n return acc;\n }, []);\n}\n/**\n * Get the text of an annotation label.\n *\n * @private\n * @param {Object} label The annotation label object\n * @return {string} The text in the label.\n */\nfunction getLabelText(label) {\n return ((label.options &&\n label.options.accessibility &&\n label.options.accessibility.description) ||\n (label.graphic &&\n label.graphic.text &&\n label.graphic.text.textStr) ||\n '');\n}\n/**\n * Describe an annotation label.\n *\n * @private\n * @param {Object} label The annotation label object to describe\n * @return {string} The description for the label.\n */\nfunction getAnnotationLabelDescription(label) {\n var a11yDesc = (label.options &&\n label.options.accessibility &&\n label.options.accessibility.description);\n if (a11yDesc) {\n return a11yDesc;\n }\n var chart = label.chart;\n var labelText = getLabelText(label);\n var points = label.points;\n var getAriaLabel = function (point) { return (point.graphic &&\n point.graphic.element &&\n point.graphic.element.getAttribute('aria-label') ||\n ''); };\n var getValueDesc = function (point) {\n var valDesc = (point.accessibility &&\n point.accessibility.valueDescription ||\n getAriaLabel(point));\n var seriesName = (point &&\n point.series.name ||\n '');\n return (seriesName ? seriesName + ', ' : '') + 'data point ' + valDesc;\n };\n var pointValueDescriptions = points\n .filter(function (p) { return !!p.graphic; }) // Filter out mock points\n .map(getValueDesc)\n // Filter out points we can't describe\n .filter(function (desc) { return !!desc; });\n var numPoints = pointValueDescriptions.length;\n var pointsSelector = numPoints > 1 ?\n 'MultiplePoints' : numPoints ?\n 'SinglePoint' : 'NoPoints';\n var langFormatStr = ('accessibility.screenReaderSection.annotations.description' +\n pointsSelector);\n var context = {\n annotationText: labelText,\n annotation: label,\n numPoints: numPoints,\n annotationPoint: pointValueDescriptions[0],\n additionalAnnotationPoints: pointValueDescriptions.slice(1)\n };\n return chart.langFormat(langFormatStr, context);\n}\n/**\n * Return array of HTML strings for each annotation label in the chart.\n *\n * @private\n * @param {Highcharts.Chart} chart The chart to get annotation info on.\n * @return {Array} Array of strings with HTML content for each annotation label.\n */\nfunction getAnnotationListItems(chart) {\n var labels = getChartAnnotationLabels(chart);\n return labels.map(function (label) {\n var desc = escapeStringForHTML(stripHTMLTagsFromString(getAnnotationLabelDescription(label)));\n return desc ? \"
  • \".concat(desc, \"
  • \") : '';\n });\n}\n/**\n * Return the annotation info for a chart as string.\n *\n * @private\n * @param {Highcharts.Chart} chart The chart to get annotation info on.\n * @return {string} String with HTML content or empty string if no annotations.\n */\nfunction getAnnotationsInfoHTML(chart) {\n var annotations = chart.annotations;\n if (!(annotations && annotations.length)) {\n return '';\n }\n var annotationItems = getAnnotationListItems(chart);\n return \"
      \".concat(annotationItems.join(' '), \"
    \");\n}\n/**\n * Return the texts for the annotation(s) connected to a point, or empty array\n * if none.\n *\n * @private\n * @param {Highcharts.Point} point The data point to get the annotation info from.\n * @return {Array} Annotation texts\n */\nfunction getPointAnnotationTexts(point) {\n var labels = getChartAnnotationLabels(point.series.chart);\n var pointLabels = labels\n .filter(function (label) { return label.points.indexOf(point) > -1; });\n if (!pointLabels.length) {\n return [];\n }\n return pointLabels.map(function (label) { return \"\".concat(getLabelText(label)); });\n}\n/* *\n *\n * Default Export\n *\n * */\nvar AnnotationsA11y = {\n getAnnotationsInfoHTML: getAnnotationsInfoHTML,\n getAnnotationLabelDescription: getAnnotationLabelDescription,\n getAnnotationListItems: getAnnotationListItems,\n getPointAnnotationTexts: getPointAnnotationTexts\n};\nexport default AnnotationsA11y;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for chart info region and table.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport A11yI18n from '../A11yI18n.js';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport Announcer from '../Utils/Announcer.js';\nimport AnnotationsA11y from './AnnotationsA11y.js';\nvar getAnnotationsInfoHTML = AnnotationsA11y.getAnnotationsInfoHTML;\nimport AST from '../../Core/Renderer/HTML/AST.js';\nimport CU from '../Utils/ChartUtilities.js';\nvar getAxisDescription = CU.getAxisDescription, getAxisRangeDescription = CU.getAxisRangeDescription, getChartTitle = CU.getChartTitle, unhideChartElementFromAT = CU.unhideChartElementFromAT;\nimport F from '../../Core/FormatUtilities.js';\nvar format = F.format;\nimport H from '../../Core/Globals.js';\nvar doc = H.doc;\nimport HU from '../Utils/HTMLUtilities.js';\nvar addClass = HU.addClass, getElement = HU.getElement, getHeadingTagNameForElement = HU.getHeadingTagNameForElement, stripHTMLTagsFromString = HU.stripHTMLTagsFromString, visuallyHideElement = HU.visuallyHideElement;\nimport U from '../../Core/Utilities.js';\nvar attr = U.attr, pick = U.pick;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * @private\n */\nfunction getTableSummary(chart) {\n return chart.langFormat('accessibility.table.tableSummary', { chart: chart });\n}\n/**\n * @private\n */\nfunction getTypeDescForMapChart(chart, formatContext) {\n return formatContext.mapTitle ?\n chart.langFormat('accessibility.chartTypes.mapTypeDescription', formatContext) :\n chart.langFormat('accessibility.chartTypes.unknownMap', formatContext);\n}\n/**\n * @private\n */\nfunction getTypeDescForCombinationChart(chart, formatContext) {\n return chart.langFormat('accessibility.chartTypes.combinationChart', formatContext);\n}\n/**\n * @private\n */\nfunction getTypeDescForEmptyChart(chart, formatContext) {\n return chart.langFormat('accessibility.chartTypes.emptyChart', formatContext);\n}\n/**\n * @private\n */\nfunction buildTypeDescriptionFromSeries(chart, types, context) {\n var firstType = types[0], typeExplaination = chart.langFormat('accessibility.seriesTypeDescriptions.' + firstType, context), multi = chart.series && chart.series.length < 2 ? 'Single' : 'Multiple';\n return (chart.langFormat('accessibility.chartTypes.' + firstType + multi, context) ||\n chart.langFormat('accessibility.chartTypes.default' + multi, context)) + (typeExplaination ? ' ' + typeExplaination : '');\n}\n/**\n * Return simplified explaination of chart type. Some types will not be\n * familiar to most users, but in those cases we try to add an explaination\n * of the type.\n *\n * @private\n * @function Highcharts.Chart#getTypeDescription\n * @param {Array} types The series types in this chart.\n * @return {string} The text description of the chart type.\n */\nfunction getTypeDescription(chart, types) {\n var firstType = types[0], firstSeries = chart.series && chart.series[0] || {}, mapTitle = chart.mapView && chart.mapView.geoMap &&\n chart.mapView.geoMap.title, formatContext = {\n numSeries: chart.series.length,\n numPoints: firstSeries.points && firstSeries.points.length,\n chart: chart,\n mapTitle: mapTitle\n };\n if (!firstType) {\n return getTypeDescForEmptyChart(chart, formatContext);\n }\n if (firstType === 'map') {\n return getTypeDescForMapChart(chart, formatContext);\n }\n if (chart.types.length > 1) {\n return getTypeDescForCombinationChart(chart, formatContext);\n }\n return buildTypeDescriptionFromSeries(chart, types, formatContext);\n}\n/**\n * @private\n */\nfunction stripEmptyHTMLTags(str) {\n return str.replace(/<(\\w+)[^>]*?>\\s*<\\/\\1>/g, '');\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The InfoRegionsComponent class\n *\n * @private\n * @class\n * @name Highcharts.InfoRegionsComponent\n */\nvar InfoRegionsComponent = /** @class */ (function (_super) {\n __extends(InfoRegionsComponent, _super);\n function InfoRegionsComponent() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.announcer = void 0;\n _this.screenReaderSections = {};\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Init the component\n * @private\n */\n InfoRegionsComponent.prototype.init = function () {\n var chart = this.chart;\n var component = this;\n this.initRegionsDefinitions();\n this.addEvent(chart, 'aftergetTableAST', function (e) {\n component.onDataTableCreated(e);\n });\n this.addEvent(chart, 'afterViewData', function (e) {\n if (e.wasHidden) {\n component.dataTableDiv = e.element;\n // Use a small delay to give browsers & AT time to\n // register the new table.\n setTimeout(function () {\n component.focusDataTable();\n }, 300);\n }\n });\n this.announcer = new Announcer(chart, 'assertive');\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.initRegionsDefinitions = function () {\n var component = this;\n this.screenReaderSections = {\n before: {\n element: null,\n buildContent: function (chart) {\n var formatter = chart.options.accessibility\n .screenReaderSection.beforeChartFormatter;\n return formatter ? formatter(chart) :\n component.defaultBeforeChartFormatter(chart);\n },\n insertIntoDOM: function (el, chart) {\n chart.renderTo.insertBefore(el, chart.renderTo.firstChild);\n },\n afterInserted: function () {\n if (typeof component.sonifyButtonId !== 'undefined') {\n component.initSonifyButton(component.sonifyButtonId);\n }\n if (typeof component.dataTableButtonId !== 'undefined') {\n component.initDataTableButton(component.dataTableButtonId);\n }\n }\n },\n after: {\n element: null,\n buildContent: function (chart) {\n var formatter = chart.options.accessibility\n .screenReaderSection\n .afterChartFormatter;\n return formatter ? formatter(chart) :\n component.defaultAfterChartFormatter();\n },\n insertIntoDOM: function (el, chart) {\n chart.renderTo.insertBefore(el, chart.container.nextSibling);\n },\n afterInserted: function () {\n if (component.chart.accessibility) {\n component.chart.accessibility\n .keyboardNavigation.updateExitAnchor(); // #15986\n }\n }\n }\n };\n };\n /**\n * Called on chart render. Have to update the sections on render, in order\n * to get a11y info from series.\n */\n InfoRegionsComponent.prototype.onChartRender = function () {\n var component = this;\n this.linkedDescriptionElement = this.getLinkedDescriptionElement();\n this.setLinkedDescriptionAttrs();\n Object.keys(this.screenReaderSections).forEach(function (regionKey) {\n component.updateScreenReaderSection(regionKey);\n });\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getLinkedDescriptionElement = function () {\n var chartOptions = this.chart.options, linkedDescOption = chartOptions.accessibility.linkedDescription;\n if (!linkedDescOption) {\n return;\n }\n if (typeof linkedDescOption !== 'string') {\n return linkedDescOption;\n }\n var query = format(linkedDescOption, this.chart), queryMatch = doc.querySelectorAll(query);\n if (queryMatch.length === 1) {\n return queryMatch[0];\n }\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.setLinkedDescriptionAttrs = function () {\n var el = this.linkedDescriptionElement;\n if (el) {\n el.setAttribute('aria-hidden', 'true');\n addClass(el, 'highcharts-linked-description');\n }\n };\n /**\n * @private\n * @param {string} regionKey\n * The name/key of the region to update\n */\n InfoRegionsComponent.prototype.updateScreenReaderSection = function (regionKey) {\n var chart = this.chart;\n var region = this.screenReaderSections[regionKey];\n var content = region.buildContent(chart);\n var sectionDiv = region.element = (region.element || this.createElement('div'));\n var hiddenDiv = (sectionDiv.firstChild || this.createElement('div'));\n if (content) {\n this.setScreenReaderSectionAttribs(sectionDiv, regionKey);\n AST.setElementHTML(hiddenDiv, content);\n sectionDiv.appendChild(hiddenDiv);\n region.insertIntoDOM(sectionDiv, chart);\n if (chart.styledMode) {\n addClass(hiddenDiv, 'highcharts-visually-hidden');\n }\n else {\n visuallyHideElement(hiddenDiv);\n }\n unhideChartElementFromAT(chart, hiddenDiv);\n if (region.afterInserted) {\n region.afterInserted();\n }\n }\n else {\n if (sectionDiv.parentNode) {\n sectionDiv.parentNode.removeChild(sectionDiv);\n }\n region.element = null;\n }\n };\n /**\n * Apply a11y attributes to a screen reader info section\n * @private\n * @param {Highcharts.HTMLDOMElement} sectionDiv The section element\n * @param {string} regionKey Name/key of the region we are setting attrs for\n */\n InfoRegionsComponent.prototype.setScreenReaderSectionAttribs = function (sectionDiv, regionKey) {\n var chart = this.chart, labelText = chart.langFormat('accessibility.screenReaderSection.' + regionKey +\n 'RegionLabel', { chart: chart, chartTitle: getChartTitle(chart) }), sectionId = \"highcharts-screen-reader-region-\".concat(regionKey, \"-\").concat(chart.index);\n attr(sectionDiv, {\n id: sectionId,\n 'aria-label': labelText || void 0\n });\n // Sections are wrapped to be positioned relatively to chart in case\n // elements inside are tabbed to.\n sectionDiv.style.position = 'relative';\n if (labelText) {\n sectionDiv.setAttribute('role', chart.options.accessibility.landmarkVerbosity === 'all' ?\n 'region' : 'group');\n }\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.defaultBeforeChartFormatter = function () {\n var chart = this.chart, format = chart.options.accessibility.screenReaderSection\n .beforeChartFormat;\n if (!format) {\n return '';\n }\n var axesDesc = this.getAxesDescription(), shouldHaveSonifyBtn = (chart.sonify &&\n chart.options.sonification &&\n chart.options.sonification.enabled), sonifyButtonId = 'highcharts-a11y-sonify-data-btn-' +\n chart.index, dataTableButtonId = 'hc-linkto-highcharts-data-table-' +\n chart.index, annotationsList = getAnnotationsInfoHTML(chart), annotationsTitleStr = chart.langFormat('accessibility.screenReaderSection.annotations.heading', { chart: chart }), context = {\n headingTagName: getHeadingTagNameForElement(chart.renderTo),\n chartTitle: getChartTitle(chart),\n typeDescription: this.getTypeDescriptionText(),\n chartSubtitle: this.getSubtitleText(),\n chartLongdesc: this.getLongdescText(),\n xAxisDescription: axesDesc.xAxis,\n yAxisDescription: axesDesc.yAxis,\n playAsSoundButton: shouldHaveSonifyBtn ?\n this.getSonifyButtonText(sonifyButtonId) : '',\n viewTableButton: chart.getCSV ?\n this.getDataTableButtonText(dataTableButtonId) : '',\n annotationsTitle: annotationsList ? annotationsTitleStr : '',\n annotationsList: annotationsList\n }, formattedString = A11yI18n.i18nFormat(format, context, chart);\n this.dataTableButtonId = dataTableButtonId;\n this.sonifyButtonId = sonifyButtonId;\n return stripEmptyHTMLTags(formattedString);\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.defaultAfterChartFormatter = function () {\n var chart = this.chart;\n var format = chart.options.accessibility.screenReaderSection\n .afterChartFormat;\n if (!format) {\n return '';\n }\n var context = { endOfChartMarker: this.getEndOfChartMarkerText() };\n var formattedString = A11yI18n.i18nFormat(format, context, chart);\n return stripEmptyHTMLTags(formattedString);\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getLinkedDescription = function () {\n var el = this.linkedDescriptionElement, content = el && el.innerHTML || '';\n return stripHTMLTagsFromString(content);\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getLongdescText = function () {\n var chartOptions = this.chart.options, captionOptions = chartOptions.caption, captionText = captionOptions && captionOptions.text, linkedDescription = this.getLinkedDescription();\n return (chartOptions.accessibility.description ||\n linkedDescription ||\n captionText ||\n '');\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getTypeDescriptionText = function () {\n var chart = this.chart;\n return chart.types ?\n chart.options.accessibility.typeDescription ||\n getTypeDescription(chart, chart.types) : '';\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getDataTableButtonText = function (buttonId) {\n var chart = this.chart, buttonText = chart.langFormat('accessibility.table.viewAsDataTableButtonText', { chart: chart, chartTitle: getChartTitle(chart) });\n return '';\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getSonifyButtonText = function (buttonId) {\n var chart = this.chart;\n if (chart.options.sonification &&\n chart.options.sonification.enabled === false) {\n return '';\n }\n var buttonText = chart.langFormat('accessibility.sonification.playAsSoundButtonText', { chart: chart, chartTitle: getChartTitle(chart) });\n return '';\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getSubtitleText = function () {\n var subtitle = (this.chart.options.subtitle);\n return stripHTMLTagsFromString(subtitle && subtitle.text || '');\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getEndOfChartMarkerText = function () {\n var chart = this.chart, markerText = chart.langFormat('accessibility.screenReaderSection.endOfChartMarker', { chart: chart }), id = 'highcharts-end-of-chart-marker-' + chart.index;\n return '
    ' + markerText + '
    ';\n };\n /**\n * @private\n * @param {Highcharts.Dictionary} e\n */\n InfoRegionsComponent.prototype.onDataTableCreated = function (e) {\n var chart = this.chart;\n if (chart.options.accessibility.enabled) {\n if (this.viewDataTableButton) {\n this.viewDataTableButton.setAttribute('aria-expanded', 'true');\n }\n var attributes = e.tree.attributes || {};\n attributes.tabindex = -1;\n attributes.summary = getTableSummary(chart);\n e.tree.attributes = attributes;\n }\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.focusDataTable = function () {\n var tableDiv = this.dataTableDiv, table = tableDiv && tableDiv.getElementsByTagName('table')[0];\n if (table && table.focus) {\n table.focus();\n }\n };\n /**\n * @private\n * @param {string} sonifyButtonId\n */\n InfoRegionsComponent.prototype.initSonifyButton = function (sonifyButtonId) {\n var _this = this;\n var el = this.sonifyButton = getElement(sonifyButtonId);\n var chart = this.chart;\n var defaultHandler = function (e) {\n if (el) {\n el.setAttribute('aria-hidden', 'true');\n el.setAttribute('aria-label', '');\n }\n e.preventDefault();\n e.stopPropagation();\n var announceMsg = chart.langFormat('accessibility.sonification.playAsSoundClickAnnouncement', { chart: chart });\n _this.announcer.announce(announceMsg);\n setTimeout(function () {\n if (el) {\n el.removeAttribute('aria-hidden');\n el.removeAttribute('aria-label');\n }\n if (chart.sonify) {\n chart.sonify();\n }\n }, 1000); // Delay to let screen reader speak the button press\n };\n if (el && chart) {\n el.setAttribute('tabindex', -1);\n el.onclick = function (e) {\n var onPlayAsSoundClick = (chart.options.accessibility &&\n chart.options.accessibility.screenReaderSection\n .onPlayAsSoundClick);\n (onPlayAsSoundClick || defaultHandler).call(this, e, chart);\n };\n }\n };\n /**\n * Set attribs and handlers for default viewAsDataTable button if exists.\n * @private\n * @param {string} tableButtonId\n */\n InfoRegionsComponent.prototype.initDataTableButton = function (tableButtonId) {\n var el = this.viewDataTableButton = getElement(tableButtonId), chart = this.chart, tableId = tableButtonId.replace('hc-linkto-', '');\n if (el) {\n attr(el, {\n tabindex: -1,\n 'aria-expanded': !!getElement(tableId)\n });\n el.onclick = chart.options.accessibility\n .screenReaderSection.onViewDataTableClick ||\n function () {\n chart.viewData();\n };\n }\n };\n /**\n * Return object with text description of each of the chart's axes.\n * @private\n */\n InfoRegionsComponent.prototype.getAxesDescription = function () {\n var chart = this.chart, shouldDescribeColl = function (collectionKey, defaultCondition) {\n var axes = chart[collectionKey];\n return axes.length > 1 || axes[0] &&\n pick(axes[0].options.accessibility &&\n axes[0].options.accessibility.enabled, defaultCondition);\n }, hasNoMap = !!chart.types &&\n chart.types.indexOf('map') < 0 &&\n chart.types.indexOf('treemap') < 0 &&\n chart.types.indexOf('tilemap') < 0, hasCartesian = !!chart.hasCartesianSeries, showXAxes = shouldDescribeColl('xAxis', !chart.angular && hasCartesian && hasNoMap), showYAxes = shouldDescribeColl('yAxis', hasCartesian && hasNoMap), desc = {};\n if (showXAxes) {\n desc.xAxis = this.getAxisDescriptionText('xAxis');\n }\n if (showYAxes) {\n desc.yAxis = this.getAxisDescriptionText('yAxis');\n }\n return desc;\n };\n /**\n * @private\n */\n InfoRegionsComponent.prototype.getAxisDescriptionText = function (collectionKey) {\n var chart = this.chart;\n var axes = chart[collectionKey];\n return chart.langFormat('accessibility.axis.' + collectionKey + 'Description' + (axes.length > 1 ? 'Plural' : 'Singular'), {\n chart: chart,\n names: axes.map(function (axis) {\n return getAxisDescription(axis);\n }),\n ranges: axes.map(function (axis) {\n return getAxisRangeDescription(axis);\n }),\n numAxes: axes.length\n });\n };\n /**\n * Remove component traces\n */\n InfoRegionsComponent.prototype.destroy = function () {\n if (this.announcer) {\n this.announcer.destroy();\n }\n };\n return InfoRegionsComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Default Export\n *\n * */\nexport default InfoRegionsComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for exporting menu.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Chart from '../../Core/Chart/Chart.js';\nimport U from '../../Core/Utilities.js';\nvar attr = U.attr;\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport ChartUtilities from '../Utils/ChartUtilities.js';\nvar getChartTitle = ChartUtilities.getChartTitle, unhideChartElementFromAT = ChartUtilities.unhideChartElementFromAT;\nimport HTMLUtilities from '../Utils/HTMLUtilities.js';\nvar getFakeMouseEvent = HTMLUtilities.getFakeMouseEvent;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * Get the wrapped export button element of a chart.\n * @private\n */\nfunction getExportMenuButtonElement(chart) {\n return chart.exportSVGElements && chart.exportSVGElements[0];\n}\n/**\n * @private\n */\nfunction exportingShouldHaveA11y(chart) {\n var exportingOpts = chart.options.exporting, exportButton = getExportMenuButtonElement(chart);\n return !!(exportingOpts &&\n exportingOpts.enabled !== false &&\n exportingOpts.accessibility &&\n exportingOpts.accessibility.enabled &&\n exportButton &&\n exportButton.element);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The MenuComponent class\n *\n * @private\n * @class\n * @name Highcharts.MenuComponent\n */\nvar MenuComponent = /** @class */ (function (_super) {\n __extends(MenuComponent, _super);\n function MenuComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Init the component\n */\n MenuComponent.prototype.init = function () {\n var chart = this.chart, component = this;\n this.addEvent(chart, 'exportMenuShown', function () {\n component.onMenuShown();\n });\n this.addEvent(chart, 'exportMenuHidden', function () {\n component.onMenuHidden();\n });\n this.createProxyGroup();\n };\n /**\n * @private\n */\n MenuComponent.prototype.onMenuHidden = function () {\n var menu = this.chart.exportContextMenu;\n if (menu) {\n menu.setAttribute('aria-hidden', 'true');\n }\n this.setExportButtonExpandedState('false');\n };\n /**\n * @private\n */\n MenuComponent.prototype.onMenuShown = function () {\n var chart = this.chart, menu = chart.exportContextMenu;\n if (menu) {\n this.addAccessibleContextMenuAttribs();\n unhideChartElementFromAT(chart, menu);\n }\n this.setExportButtonExpandedState('true');\n };\n /**\n * @private\n * @param {string} stateStr\n */\n MenuComponent.prototype.setExportButtonExpandedState = function (stateStr) {\n if (this.exportButtonProxy) {\n this.exportButtonProxy.buttonElement.setAttribute('aria-expanded', stateStr);\n }\n };\n /**\n * Called on each render of the chart. We need to update positioning of the\n * proxy overlay.\n */\n MenuComponent.prototype.onChartRender = function () {\n var chart = this.chart, focusEl = chart.focusElement, a11y = chart.accessibility;\n this.proxyProvider.clearGroup('chartMenu');\n this.proxyMenuButton();\n if (this.exportButtonProxy &&\n focusEl &&\n focusEl === chart.exportingGroup) {\n if (focusEl.focusBorder) {\n chart.setFocusToElement(focusEl, this.exportButtonProxy.buttonElement);\n }\n else if (a11y) {\n a11y.keyboardNavigation.tabindexContainer.focus();\n }\n }\n };\n /**\n * @private\n */\n MenuComponent.prototype.proxyMenuButton = function () {\n var chart = this.chart;\n var proxyProvider = this.proxyProvider;\n var buttonEl = getExportMenuButtonElement(chart);\n if (exportingShouldHaveA11y(chart) && buttonEl) {\n this.exportButtonProxy = proxyProvider.addProxyElement('chartMenu', { click: buttonEl }, {\n 'aria-label': chart.langFormat('accessibility.exporting.menuButtonLabel', {\n chart: chart,\n chartTitle: getChartTitle(chart)\n }),\n 'aria-expanded': false,\n title: chart.options.lang.contextButtonTitle || null\n });\n }\n };\n /**\n * @private\n */\n MenuComponent.prototype.createProxyGroup = function () {\n var chart = this.chart;\n if (chart && this.proxyProvider) {\n this.proxyProvider.addGroup('chartMenu', 'div');\n }\n };\n /**\n * @private\n */\n MenuComponent.prototype.addAccessibleContextMenuAttribs = function () {\n var chart = this.chart, exportList = chart.exportDivElements;\n if (exportList && exportList.length) {\n // Set tabindex on the menu items to allow focusing by script\n // Set role to give screen readers a chance to pick up the contents\n exportList.forEach(function (item) {\n if (item) {\n if (item.tagName === 'LI' &&\n !(item.children && item.children.length)) {\n item.setAttribute('tabindex', -1);\n }\n else {\n item.setAttribute('aria-hidden', 'true');\n }\n }\n });\n // Set accessibility properties on parent div\n var parentDiv = (exportList[0] && exportList[0].parentNode);\n if (parentDiv) {\n attr(parentDiv, {\n 'aria-hidden': void 0,\n 'aria-label': chart.langFormat('accessibility.exporting.chartMenuLabel', { chart: chart }),\n role: 'list' // Needed for webkit/VO\n });\n }\n }\n };\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n MenuComponent.prototype.getKeyboardNavigation = function () {\n var keys = this.keyCodes, chart = this.chart, component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n // Arrow prev handler\n [\n [keys.left, keys.up],\n function () {\n return component.onKbdPrevious(this);\n }\n ],\n // Arrow next handler\n [\n [keys.right, keys.down],\n function () {\n return component.onKbdNext(this);\n }\n ],\n // Click handler\n [\n [keys.enter, keys.space],\n function () {\n return component.onKbdClick(this);\n }\n ]\n ],\n // Only run exporting navigation if exporting support exists and is\n // enabled on chart\n validate: function () {\n return !!chart.exporting &&\n chart.options.exporting.enabled !== false &&\n chart.options.exporting.accessibility.enabled !==\n false;\n },\n // Focus export menu button\n init: function () {\n var proxy = component.exportButtonProxy;\n var svgEl = component.chart.exportingGroup;\n if (proxy && svgEl) {\n chart.setFocusToElement(svgEl, proxy.buttonElement);\n }\n },\n // Hide the menu\n terminate: function () {\n chart.hideExportMenu();\n }\n });\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n MenuComponent.prototype.onKbdPrevious = function (keyboardNavigationHandler) {\n var chart = this.chart;\n var a11yOptions = chart.options.accessibility;\n var response = keyboardNavigationHandler.response;\n // Try to highlight prev item in list. Highlighting e.g.\n // separators will fail.\n var i = chart.highlightedExportItemIx || 0;\n while (i--) {\n if (chart.highlightExportItem(i)) {\n return response.success;\n }\n }\n // We failed, so wrap around or move to prev module\n if (a11yOptions.keyboardNavigation.wrapAround) {\n chart.highlightLastExportItem();\n return response.success;\n }\n return response.prev;\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n MenuComponent.prototype.onKbdNext = function (keyboardNavigationHandler) {\n var chart = this.chart;\n var a11yOptions = chart.options.accessibility;\n var response = keyboardNavigationHandler.response;\n // Try to highlight next item in list. Highlighting e.g.\n // separators will fail.\n for (var i = (chart.highlightedExportItemIx || 0) + 1; i < chart.exportDivElements.length; ++i) {\n if (chart.highlightExportItem(i)) {\n return response.success;\n }\n }\n // We failed, so wrap around or move to next module\n if (a11yOptions.keyboardNavigation.wrapAround) {\n chart.highlightExportItem(0);\n return response.success;\n }\n return response.next;\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n MenuComponent.prototype.onKbdClick = function (keyboardNavigationHandler) {\n var chart = this.chart;\n var curHighlightedItem = chart.exportDivElements[chart.highlightedExportItemIx];\n var exportButtonElement = getExportMenuButtonElement(chart).element;\n if (chart.openMenu) {\n this.fakeClickEvent(curHighlightedItem);\n }\n else {\n this.fakeClickEvent(exportButtonElement);\n chart.highlightExportItem(0);\n }\n return keyboardNavigationHandler.response.success;\n };\n return MenuComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Class Namespace\n *\n * */\n(function (MenuComponent) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n function compose(ChartClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = Chart.prototype;\n chartProto.hideExportMenu = chartHideExportMenu;\n chartProto.highlightExportItem = chartHighlightExportItem;\n chartProto.highlightLastExportItem = chartHighlightLastExportItem;\n chartProto.showExportMenu = chartShowExportMenu;\n }\n }\n MenuComponent.compose = compose;\n /**\n * Show the export menu and focus the first item (if exists).\n *\n * @private\n * @function Highcharts.Chart#showExportMenu\n */\n function chartShowExportMenu() {\n var exportButton = getExportMenuButtonElement(this);\n if (exportButton) {\n var el = exportButton.element;\n if (el.onclick) {\n el.onclick(getFakeMouseEvent('click'));\n }\n }\n }\n /**\n * @private\n * @function Highcharts.Chart#hideExportMenu\n */\n function chartHideExportMenu() {\n var chart = this, exportList = chart.exportDivElements;\n if (exportList && chart.exportContextMenu && chart.openMenu) {\n // Reset hover states etc.\n exportList.forEach(function (el) {\n if (el &&\n el.className === 'highcharts-menu-item' &&\n el.onmouseout) {\n el.onmouseout(getFakeMouseEvent('mouseout'));\n }\n });\n chart.highlightedExportItemIx = 0;\n // Hide the menu div\n chart.exportContextMenu.hideMenu();\n // Make sure the chart has focus and can capture keyboard events\n chart.container.focus();\n }\n }\n /**\n * Highlight export menu item by index.\n *\n * @private\n * @function Highcharts.Chart#highlightExportItem\n */\n function chartHighlightExportItem(ix) {\n var listItem = this.exportDivElements && this.exportDivElements[ix];\n var curHighlighted = this.exportDivElements &&\n this.exportDivElements[this.highlightedExportItemIx];\n if (listItem &&\n listItem.tagName === 'LI' &&\n !(listItem.children && listItem.children.length)) {\n // Test if we have focus support for SVG elements\n var hasSVGFocusSupport = !!(this.renderTo.getElementsByTagName('g')[0] || {}).focus;\n // Only focus if we can set focus back to the elements after\n // destroying the menu (#7422)\n if (listItem.focus && hasSVGFocusSupport) {\n listItem.focus();\n }\n if (curHighlighted && curHighlighted.onmouseout) {\n curHighlighted.onmouseout(getFakeMouseEvent('mouseout'));\n }\n if (listItem.onmouseover) {\n listItem.onmouseover(getFakeMouseEvent('mouseover'));\n }\n this.highlightedExportItemIx = ix;\n return true;\n }\n return false;\n }\n /**\n * Try to highlight the last valid export menu item.\n *\n * @private\n * @function Highcharts.Chart#highlightLastExportItem\n */\n function chartHighlightLastExportItem() {\n var chart = this;\n if (chart.exportDivElements) {\n var i = chart.exportDivElements.length;\n while (i--) {\n if (chart.highlightExportItem(i)) {\n return true;\n }\n }\n }\n return false;\n }\n})(MenuComponent || (MenuComponent = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default MenuComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Main keyboard navigation handling.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nvar doc = H.doc, win = H.win;\nimport MenuComponent from './Components/MenuComponent.js';\nimport U from '../Core/Utilities.js';\nvar addEvent = U.addEvent, fireEvent = U.fireEvent;\nimport EventProvider from './Utils/EventProvider.js';\nimport HTMLUtilities from './Utils/HTMLUtilities.js';\nvar getElement = HTMLUtilities.getElement, simulatedEventTarget = HTMLUtilities.simulatedEventTarget;\n/* *\n *\n * Class\n *\n * */\n/**\n * The KeyboardNavigation class, containing the overall keyboard navigation\n * logic for the chart.\n *\n * @requires module:modules/accessibility\n *\n * @private\n * @class\n * @param {Highcharts.Chart} chart\n * Chart object\n * @param {Object} components\n * Map of component names to AccessibilityComponent objects.\n * @name Highcharts.KeyboardNavigation\n */\nvar KeyboardNavigation = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function KeyboardNavigation(chart, components) {\n /* *\n *\n * Properties\n *\n * */\n this.chart = void 0;\n this.components = void 0;\n this.currentModuleIx = NaN;\n this.eventProvider = void 0;\n this.exitAnchor = void 0;\n this.modules = [];\n this.tabindexContainer = void 0;\n this.init(chart, components);\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Initialize the class\n * @private\n * @param {Highcharts.Chart} chart\n * Chart object\n * @param {Object} components\n * Map of component names to AccessibilityComponent objects.\n */\n KeyboardNavigation.prototype.init = function (chart, components) {\n var _this = this;\n var ep = this.eventProvider = new EventProvider();\n this.chart = chart;\n this.components = components;\n this.modules = [];\n this.currentModuleIx = 0;\n this.update();\n ep.addEvent(this.tabindexContainer, 'keydown', function (e) { return _this.onKeydown(e); });\n ep.addEvent(this.tabindexContainer, 'focus', function (e) { return _this.onFocus(e); });\n ['mouseup', 'touchend'].forEach(function (eventName) {\n return ep.addEvent(doc, eventName, function (e) { return _this.onMouseUp(e); });\n });\n ['mousedown', 'touchstart'].forEach(function (eventName) {\n return ep.addEvent(chart.renderTo, eventName, function () {\n _this.isClickingChart = true;\n });\n });\n ep.addEvent(chart.renderTo, 'mouseover', function () {\n _this.pointerIsOverChart = true;\n });\n ep.addEvent(chart.renderTo, 'mouseout', function () {\n _this.pointerIsOverChart = false;\n });\n };\n /**\n * Update the modules for the keyboard navigation.\n * @param {Array} [order]\n * Array specifying the tab order of the components.\n */\n KeyboardNavigation.prototype.update = function (order) {\n var a11yOptions = this.chart.options.accessibility, keyboardOptions = a11yOptions && a11yOptions.keyboardNavigation, components = this.components;\n this.updateContainerTabindex();\n if (keyboardOptions &&\n keyboardOptions.enabled &&\n order &&\n order.length) {\n // We (still) have keyboard navigation. Update module list\n this.modules = order.reduce(function (modules, componentName) {\n var navModules = components[componentName]\n .getKeyboardNavigation();\n return modules.concat(navModules);\n }, []);\n this.updateExitAnchor();\n }\n else {\n this.modules = [];\n this.currentModuleIx = 0;\n this.removeExitAnchor();\n }\n };\n /**\n * We use an exit anchor to move focus out of chart whenever we want, by\n * setting focus to this div and not preventing the default tab action. We\n * also use this when users come back into the chart by tabbing back, in\n * order to navigate from the end of the chart.\n * @private\n */\n KeyboardNavigation.prototype.updateExitAnchor = function () {\n var endMarkerId = \"highcharts-end-of-chart-marker-\".concat(this.chart.index), endMarker = getElement(endMarkerId);\n this.removeExitAnchor();\n if (endMarker) {\n this.makeElementAnExitAnchor(endMarker);\n this.exitAnchor = endMarker;\n }\n else {\n this.createExitAnchor();\n }\n };\n /**\n * Move to prev/next module.\n * @private\n * @param {number} direction\n * Direction to move. +1 for next, -1 for prev.\n * @return {boolean}\n * True if there was a valid module in direction.\n */\n KeyboardNavigation.prototype.move = function (direction) {\n var curModule = this.modules && this.modules[this.currentModuleIx];\n if (curModule && curModule.terminate) {\n curModule.terminate(direction);\n }\n // Remove existing focus border if any\n if (this.chart.focusElement) {\n this.chart.focusElement.removeFocusBorder();\n }\n this.currentModuleIx += direction;\n var newModule = this.modules && this.modules[this.currentModuleIx];\n if (newModule) {\n if (newModule.validate && !newModule.validate()) {\n return this.move(direction); // Invalid module, recurse\n }\n if (newModule.init) {\n newModule.init(direction); // Valid module, init it\n return true;\n }\n }\n // No module\n this.currentModuleIx = 0; // Reset counter\n // Set focus to chart or exit anchor depending on direction\n this.exiting = true;\n if (direction > 0) {\n this.exitAnchor && this.exitAnchor.focus();\n }\n else {\n this.tabindexContainer.focus();\n }\n return false;\n };\n /**\n * Function to run on container focus\n * @private\n * @param {global.FocusEvent} e Browser focus event.\n */\n KeyboardNavigation.prototype.onFocus = function (e) {\n var chart = this.chart;\n var focusComesFromChart = (e.relatedTarget &&\n chart.container.contains(e.relatedTarget));\n // Init keyboard nav if tabbing into chart\n if (!this.exiting &&\n !this.tabbingInBackwards &&\n !this.isClickingChart &&\n !focusComesFromChart) {\n var ix = this.getFirstValidModuleIx();\n if (ix !== null) {\n this.currentModuleIx = ix;\n this.modules[ix].init(1);\n }\n }\n this.exiting = false;\n };\n /**\n * Reset chart navigation state if we mouse click and it's not already\n * reset. Reset fully if outside the chart, otherwise just hide focus\n * indicator.\n * @private\n */\n KeyboardNavigation.prototype.onMouseUp = function (e) {\n delete this.isClickingChart;\n if (!this.keyboardReset &&\n e.relatedTarget !== simulatedEventTarget) {\n var chart = this.chart;\n if (!this.pointerIsOverChart) {\n var curMod = this.modules &&\n this.modules[this.currentModuleIx || 0];\n if (curMod && curMod.terminate) {\n curMod.terminate();\n }\n this.currentModuleIx = 0;\n }\n if (chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n delete chart.focusElement;\n }\n this.keyboardReset = true;\n }\n };\n /**\n * Function to run on keydown\n * @private\n * @param {global.KeyboardEvent} ev Browser keydown event.\n */\n KeyboardNavigation.prototype.onKeydown = function (ev) {\n var e = ev || win.event, curNavModule = (this.modules &&\n this.modules.length &&\n this.modules[this.currentModuleIx]);\n var preventDefault;\n // Used for resetting nav state when clicking outside chart\n this.keyboardReset = false;\n // Used for sending focus out of the chart by the modules.\n this.exiting = false;\n // If there is a nav module for the current index, run it.\n // Otherwise, we are outside of the chart in some direction.\n if (curNavModule) {\n var response = curNavModule.run(e);\n if (response === curNavModule.response.success) {\n preventDefault = true;\n }\n else if (response === curNavModule.response.prev) {\n preventDefault = this.move(-1);\n }\n else if (response === curNavModule.response.next) {\n preventDefault = this.move(1);\n }\n if (preventDefault) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n };\n /**\n * Chart container should have tabindex if navigation is enabled.\n * @private\n */\n KeyboardNavigation.prototype.updateContainerTabindex = function () {\n var a11yOptions = this.chart.options.accessibility, keyboardOptions = a11yOptions && a11yOptions.keyboardNavigation, shouldHaveTabindex = !(keyboardOptions && keyboardOptions.enabled === false), chart = this.chart, container = chart.container;\n var tabindexContainer;\n if (chart.renderTo.hasAttribute('tabindex')) {\n container.removeAttribute('tabindex');\n tabindexContainer = chart.renderTo;\n }\n else {\n tabindexContainer = container;\n }\n this.tabindexContainer = tabindexContainer;\n var curTabindex = tabindexContainer.getAttribute('tabindex');\n if (shouldHaveTabindex && !curTabindex) {\n tabindexContainer.setAttribute('tabindex', '0');\n }\n else if (!shouldHaveTabindex) {\n chart.container.removeAttribute('tabindex');\n }\n };\n /**\n * Add new exit anchor to the chart.\n * @private\n */\n KeyboardNavigation.prototype.createExitAnchor = function () {\n var chart = this.chart, exitAnchor = this.exitAnchor = doc.createElement('div');\n chart.renderTo.appendChild(exitAnchor);\n this.makeElementAnExitAnchor(exitAnchor);\n };\n /**\n * Add attributes and events to an element to make it function as an\n * exit anchor.\n * @private\n */\n KeyboardNavigation.prototype.makeElementAnExitAnchor = function (el) {\n var chartTabindex = this.tabindexContainer.getAttribute('tabindex') || 0;\n el.setAttribute('class', 'highcharts-exit-anchor');\n el.setAttribute('tabindex', chartTabindex);\n el.setAttribute('aria-hidden', false);\n // Handle focus\n this.addExitAnchorEventsToEl(el);\n };\n /**\n * Destroy the exit anchor and remove from DOM.\n * @private\n */\n KeyboardNavigation.prototype.removeExitAnchor = function () {\n if (this.exitAnchor && this.exitAnchor.parentNode) {\n this.exitAnchor.parentNode.removeChild(this.exitAnchor);\n delete this.exitAnchor;\n }\n };\n /**\n * Add focus handler to exit anchor element.\n * @private\n */\n KeyboardNavigation.prototype.addExitAnchorEventsToEl = function (element) {\n var chart = this.chart, keyboardNavigation = this;\n this.eventProvider.addEvent(element, 'focus', function (ev) {\n var e = ev || win.event, focusComesFromChart = (e.relatedTarget &&\n chart.container.contains(e.relatedTarget)), comingInBackwards = !(focusComesFromChart || keyboardNavigation.exiting);\n if (chart.focusElement) {\n delete chart.focusElement;\n }\n if (comingInBackwards) {\n // Focus the container instead\n keyboardNavigation.tabbingInBackwards = true;\n keyboardNavigation.tabindexContainer.focus();\n delete keyboardNavigation.tabbingInBackwards;\n e.preventDefault();\n // Move to last valid keyboard nav module\n // Note the we don't run it, just set the index\n if (keyboardNavigation.modules &&\n keyboardNavigation.modules.length) {\n keyboardNavigation.currentModuleIx =\n keyboardNavigation.modules.length - 1;\n var curModule = keyboardNavigation.modules[keyboardNavigation.currentModuleIx];\n // Validate the module\n if (curModule &&\n curModule.validate && !curModule.validate()) {\n // Invalid. Try moving backwards to find next valid.\n keyboardNavigation.move(-1);\n }\n else if (curModule) {\n // We have a valid module, init it\n curModule.init(-1);\n }\n }\n }\n else {\n // Don't skip the next focus, we only skip once.\n keyboardNavigation.exiting = false;\n }\n });\n };\n /**\n * Get the ix of the first module that either does not require validation or\n * validates positively.\n * @private\n */\n KeyboardNavigation.prototype.getFirstValidModuleIx = function () {\n var len = this.modules.length;\n for (var i = 0; i < len; ++i) {\n var mod = this.modules[i];\n if (!mod.validate || mod.validate()) {\n return i;\n }\n }\n return null;\n };\n /**\n * Remove all traces of keyboard navigation.\n * @private\n */\n KeyboardNavigation.prototype.destroy = function () {\n this.removeExitAnchor();\n this.eventProvider.removeAddedEvents();\n this.chart.container.removeAttribute('tabindex');\n };\n return KeyboardNavigation;\n}());\n/* *\n *\n * Class Namespace\n *\n * */\n(function (KeyboardNavigation) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Construction\n *\n * */\n var composedItems = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Composition function.\n * @private\n */\n function compose(ChartClass) {\n MenuComponent.compose(ChartClass);\n if (composedItems.indexOf(ChartClass) === -1) {\n composedItems.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.dismissPopupContent = chartDismissPopupContent;\n }\n if (composedItems.indexOf(doc) === -1) {\n composedItems.push(doc);\n addEvent(doc, 'keydown', documentOnKeydown);\n }\n return ChartClass;\n }\n KeyboardNavigation.compose = compose;\n /**\n * Dismiss popup content in chart, including export menu and tooltip.\n * @private\n */\n function chartDismissPopupContent() {\n var chart = this;\n fireEvent(this, 'dismissPopupContent', {}, function () {\n if (chart.tooltip) {\n chart.tooltip.hide(0);\n }\n chart.hideExportMenu();\n });\n }\n /**\n * Add event listener to document to detect ESC key press and dismiss\n * hover/popup content.\n * @private\n */\n function documentOnKeydown(e) {\n var keycode = e.which || e.keyCode;\n var esc = 27;\n if (keycode === esc && H.charts) {\n H.charts.forEach(function (chart) {\n if (chart && chart.dismissPopupContent) {\n chart.dismissPopupContent();\n }\n });\n }\n }\n})(KeyboardNavigation || (KeyboardNavigation = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default KeyboardNavigation;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for chart legend.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport A from '../../Core/Animation/AnimationUtilities.js';\nvar animObject = A.animObject;\nimport H from '../../Core/Globals.js';\nvar doc = H.doc;\nimport Legend from '../../Core/Legend/Legend.js';\nimport U from '../../Core/Utilities.js';\nvar addEvent = U.addEvent, fireEvent = U.fireEvent, isNumber = U.isNumber, pick = U.pick, syncTimeout = U.syncTimeout;\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport CU from '../Utils/ChartUtilities.js';\nvar getChartTitle = CU.getChartTitle;\nimport HU from '../Utils/HTMLUtilities.js';\nvar stripHTMLTags = HU.stripHTMLTagsFromString, addClass = HU.addClass, removeClass = HU.removeClass;\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction scrollLegendToItem(legend, itemIx) {\n var itemPage = (legend.allItems[itemIx].legendItem || {}).pageIx, curPage = legend.currentPage;\n if (typeof itemPage !== 'undefined' && itemPage + 1 !== curPage) {\n legend.scroll(1 + itemPage - curPage);\n }\n}\n/**\n * @private\n */\nfunction shouldDoLegendA11y(chart) {\n var items = chart.legend && chart.legend.allItems, legendA11yOptions = (chart.options.legend.accessibility || {}), unsupportedColorAxis = chart.colorAxis && chart.colorAxis.some(function (c) { return !c.dataClasses || !c.dataClasses.length; });\n return !!(items && items.length &&\n !unsupportedColorAxis &&\n legendA11yOptions.enabled !== false);\n}\n/**\n * @private\n */\nfunction setLegendItemHoverState(hoverActive, item) {\n var legendItem = item.legendItem || {};\n item.setState(hoverActive ? 'hover' : '', true);\n for (var _i = 0, _a = ['group', 'label', 'symbol']; _i < _a.length; _i++) {\n var key = _a[_i];\n var svgElement = legendItem[key];\n var element = svgElement && svgElement.element || svgElement;\n if (element) {\n fireEvent(element, hoverActive ? 'mouseover' : 'mouseout');\n }\n }\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The LegendComponent class\n *\n * @private\n * @class\n * @name Highcharts.LegendComponent\n */\nvar LegendComponent = /** @class */ (function (_super) {\n __extends(LegendComponent, _super);\n function LegendComponent() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.highlightedLegendItemIx = NaN;\n _this.proxyGroup = null;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component\n * @private\n */\n LegendComponent.prototype.init = function () {\n var component = this;\n this.recreateProxies();\n // Note: Chart could create legend dynamically, so events cannot be\n // tied to the component's chart's current legend.\n // @todo 1. attach component to created legends\n // @todo 2. move listeners to composition and access `this.component`\n this.addEvent(Legend, 'afterScroll', function () {\n if (this.chart === component.chart) {\n component.proxyProvider.updateGroupProxyElementPositions('legend');\n component.updateLegendItemProxyVisibility();\n if (component.highlightedLegendItemIx > -1) {\n this.chart.highlightLegendItem(component.highlightedLegendItemIx);\n }\n }\n });\n this.addEvent(Legend, 'afterPositionItem', function (e) {\n if (this.chart === component.chart && this.chart.renderer) {\n component.updateProxyPositionForItem(e.item);\n }\n });\n this.addEvent(Legend, 'afterRender', function () {\n if (this.chart === component.chart &&\n this.chart.renderer &&\n component.recreateProxies()) {\n syncTimeout(function () { return component.proxyProvider\n .updateGroupProxyElementPositions('legend'); }, animObject(pick(this.chart.renderer.globalAnimation, true)).duration);\n }\n });\n };\n /**\n * Update visibility of legend items when using paged legend\n * @private\n */\n LegendComponent.prototype.updateLegendItemProxyVisibility = function () {\n var chart = this.chart;\n var legend = chart.legend;\n var items = legend.allItems || [];\n var curPage = legend.currentPage || 1;\n var clipHeight = legend.clipHeight || 0;\n var legendItem;\n items.forEach(function (item) {\n if (item.a11yProxyElement) {\n var hasPages = legend.pages && legend.pages.length;\n var proxyEl = item.a11yProxyElement.element;\n var hide = false;\n legendItem = item.legendItem || {};\n if (hasPages) {\n var itemPage = legendItem.pageIx || 0;\n var y = legendItem.y || 0;\n var h = legendItem.label ?\n Math.round(legendItem.label.getBBox().height) :\n 0;\n hide = y + h - legend.pages[itemPage] > clipHeight ||\n itemPage !== curPage - 1;\n }\n if (hide) {\n if (chart.styledMode) {\n addClass(proxyEl, 'highcharts-a11y-invisible');\n }\n else {\n proxyEl.style.visibility = 'hidden';\n }\n }\n else {\n removeClass(proxyEl, 'highcharts-a11y-invisible');\n proxyEl.style.visibility = '';\n }\n }\n });\n };\n /**\n * @private\n */\n LegendComponent.prototype.onChartRender = function () {\n if (!shouldDoLegendA11y(this.chart)) {\n this.removeProxies();\n }\n };\n /**\n * @private\n */\n LegendComponent.prototype.highlightAdjacentLegendPage = function (direction) {\n var chart = this.chart;\n var legend = chart.legend;\n var curPageIx = legend.currentPage || 1;\n var newPageIx = curPageIx + direction;\n var pages = legend.pages || [];\n if (newPageIx > 0 && newPageIx <= pages.length) {\n var i = 0, res = void 0;\n for (var _i = 0, _a = legend.allItems; _i < _a.length; _i++) {\n var item = _a[_i];\n if (((item.legendItem || {}).pageIx || 0) + 1 === newPageIx) {\n res = chart.highlightLegendItem(i);\n if (res) {\n this.highlightedLegendItemIx = i;\n }\n }\n ++i;\n }\n }\n };\n /**\n * @private\n */\n LegendComponent.prototype.updateProxyPositionForItem = function (item) {\n if (item.a11yProxyElement) {\n item.a11yProxyElement.refreshPosition();\n }\n };\n /**\n * Returns false if legend a11y is disabled and proxies were not created,\n * true otherwise.\n * @private\n */\n LegendComponent.prototype.recreateProxies = function () {\n var focusedElement = doc.activeElement;\n var proxyGroup = this.proxyGroup;\n var shouldRestoreFocus = focusedElement && proxyGroup &&\n proxyGroup.contains(focusedElement);\n this.removeProxies();\n if (shouldDoLegendA11y(this.chart)) {\n this.addLegendProxyGroup();\n this.proxyLegendItems();\n this.updateLegendItemProxyVisibility();\n this.updateLegendTitle();\n if (shouldRestoreFocus) {\n this.chart.highlightLegendItem(this.highlightedLegendItemIx);\n }\n return true;\n }\n return false;\n };\n /**\n * @private\n */\n LegendComponent.prototype.removeProxies = function () {\n this.proxyProvider.removeGroup('legend');\n };\n /**\n * @private\n */\n LegendComponent.prototype.updateLegendTitle = function () {\n var chart = this.chart;\n var legendTitle = stripHTMLTags((chart.legend &&\n chart.legend.options.title &&\n chart.legend.options.title.text ||\n '').replace(/
    /g, ' '));\n var legendLabel = chart.langFormat('accessibility.legend.legendLabel' + (legendTitle ? '' : 'NoTitle'), {\n chart: chart,\n legendTitle: legendTitle,\n chartTitle: getChartTitle(chart)\n });\n this.proxyProvider.updateGroupAttrs('legend', {\n 'aria-label': legendLabel\n });\n };\n /**\n * @private\n */\n LegendComponent.prototype.addLegendProxyGroup = function () {\n var a11yOptions = this.chart.options.accessibility;\n var groupRole = a11yOptions.landmarkVerbosity === 'all' ?\n 'region' : null;\n this.proxyGroup = this.proxyProvider.addGroup('legend', 'ul', {\n // Filled by updateLegendTitle, to keep up to date without\n // recreating group\n 'aria-label': '_placeholder_',\n role: groupRole\n });\n };\n /**\n * @private\n */\n LegendComponent.prototype.proxyLegendItems = function () {\n var component = this, items = (this.chart.legend || {}).allItems || [];\n var legendItem;\n items.forEach(function (item) {\n legendItem = item.legendItem || {};\n if (legendItem.label && legendItem.label.element) {\n component.proxyLegendItem(item);\n }\n });\n };\n /**\n * @private\n * @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item\n */\n LegendComponent.prototype.proxyLegendItem = function (item) {\n var legendItem = item.legendItem || {};\n if (!legendItem.label || !legendItem.group) {\n return;\n }\n var itemLabel = this.chart.langFormat('accessibility.legend.legendItem', {\n chart: this.chart,\n itemName: stripHTMLTags(item.name),\n item: item\n });\n var attribs = {\n tabindex: -1,\n 'aria-pressed': item.visible,\n 'aria-label': itemLabel\n };\n // Considers useHTML\n var proxyPositioningElement = legendItem.group.div ?\n legendItem.label :\n legendItem.group;\n item.a11yProxyElement = this.proxyProvider.addProxyElement('legend', {\n click: legendItem.label,\n visual: proxyPositioningElement.element\n }, attribs);\n };\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n LegendComponent.prototype.getKeyboardNavigation = function () {\n var keys = this.keyCodes, component = this, chart = this.chart;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.left, keys.right, keys.up, keys.down],\n function (keyCode) {\n return component.onKbdArrowKey(this, keyCode);\n }\n ],\n [\n [keys.enter, keys.space],\n function () {\n return component.onKbdClick(this);\n }\n ],\n [\n [keys.pageDown, keys.pageUp],\n function (keyCode) {\n var direction = keyCode === keys.pageDown ? 1 : -1;\n component.highlightAdjacentLegendPage(direction);\n return this.response.success;\n }\n ]\n ],\n validate: function () {\n return component.shouldHaveLegendNavigation();\n },\n init: function () {\n chart.highlightLegendItem(0);\n component.highlightedLegendItemIx = 0;\n },\n terminate: function () {\n component.highlightedLegendItemIx = -1;\n chart.legend.allItems.forEach(function (item) { return setLegendItemHoverState(false, item); });\n }\n });\n };\n /**\n * Arrow key navigation\n * @private\n */\n LegendComponent.prototype.onKbdArrowKey = function (keyboardNavigationHandler, keyCode) {\n var keys = this.keyCodes, response = keyboardNavigationHandler.response, chart = this.chart, a11yOptions = chart.options.accessibility, numItems = chart.legend.allItems.length, direction = (keyCode === keys.left || keyCode === keys.up) ? -1 : 1;\n var res = chart.highlightLegendItem(this.highlightedLegendItemIx + direction);\n if (res) {\n this.highlightedLegendItemIx += direction;\n return response.success;\n }\n if (numItems > 1 &&\n a11yOptions.keyboardNavigation.wrapAround) {\n keyboardNavigationHandler.init(direction);\n return response.success;\n }\n return response.success;\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @return {number} Response code\n */\n LegendComponent.prototype.onKbdClick = function (keyboardNavigationHandler) {\n var legendItem = this.chart.legend.allItems[this.highlightedLegendItemIx];\n if (legendItem && legendItem.a11yProxyElement) {\n legendItem.a11yProxyElement.click();\n }\n return keyboardNavigationHandler.response.success;\n };\n /**\n * @private\n */\n LegendComponent.prototype.shouldHaveLegendNavigation = function () {\n if (!shouldDoLegendA11y(this.chart)) {\n return false;\n }\n var chart = this.chart, legendOptions = chart.options.legend || {}, legendA11yOptions = (legendOptions.accessibility || {});\n return !!(chart.legend.display &&\n legendA11yOptions.keyboardNavigation &&\n legendA11yOptions.keyboardNavigation.enabled);\n };\n return LegendComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Class Namespace\n *\n * */\n(function (LegendComponent) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Highlight legend item by index.\n * @private\n */\n function chartHighlightLegendItem(ix) {\n var items = this.legend.allItems;\n var oldIx = this.accessibility &&\n this.accessibility.components.legend.highlightedLegendItemIx;\n var itemToHighlight = items[ix], legendItem = itemToHighlight.legendItem || {};\n if (itemToHighlight) {\n if (isNumber(oldIx) && items[oldIx]) {\n setLegendItemHoverState(false, items[oldIx]);\n }\n scrollLegendToItem(this.legend, ix);\n var legendItemProp = legendItem.label;\n var proxyBtn = itemToHighlight.a11yProxyElement &&\n itemToHighlight.a11yProxyElement.buttonElement;\n if (legendItemProp && legendItemProp.element && proxyBtn) {\n this.setFocusToElement(legendItemProp, proxyBtn);\n }\n setLegendItemHoverState(true, itemToHighlight);\n return true;\n }\n return false;\n }\n /**\n * @private\n */\n function compose(ChartClass, LegendClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.highlightLegendItem = chartHighlightLegendItem;\n }\n if (composedClasses.indexOf(LegendClass) === -1) {\n composedClasses.push(LegendClass);\n addEvent(LegendClass, 'afterColorizeItem', legendOnAfterColorizeItem);\n }\n }\n LegendComponent.compose = compose;\n /**\n * Keep track of pressed state for legend items.\n * @private\n */\n function legendOnAfterColorizeItem(e) {\n var chart = this.chart, a11yOptions = chart.options.accessibility, legendItem = e.item;\n if (a11yOptions.enabled && legendItem && legendItem.a11yProxyElement) {\n legendItem.a11yProxyElement.buttonElement.setAttribute('aria-pressed', e.visible ? 'true' : 'false');\n }\n }\n})(LegendComponent || (LegendComponent = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default LegendComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Place desriptions on a series and its points.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport AnnotationsA11y from '../AnnotationsA11y.js';\nvar getPointAnnotationTexts = AnnotationsA11y.getPointAnnotationTexts;\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nvar getAxisDescription = ChartUtilities.getAxisDescription, getSeriesFirstPointElement = ChartUtilities.getSeriesFirstPointElement, getSeriesA11yElement = ChartUtilities.getSeriesA11yElement, unhideChartElementFromAT = ChartUtilities.unhideChartElementFromAT;\nimport F from '../../../Core/FormatUtilities.js';\nvar format = F.format, numberFormat = F.numberFormat;\nimport HTMLUtilities from '../../Utils/HTMLUtilities.js';\nvar reverseChildNodes = HTMLUtilities.reverseChildNodes, stripHTMLTags = HTMLUtilities.stripHTMLTagsFromString;\nimport U from '../../../Core/Utilities.js';\nvar find = U.find, isNumber = U.isNumber, pick = U.pick, defined = U.defined;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * @private\n */\nfunction findFirstPointWithGraphic(point) {\n var sourcePointIndex = point.index;\n if (!point.series || !point.series.data || !defined(sourcePointIndex)) {\n return null;\n }\n return find(point.series.data, function (p) {\n return !!(p &&\n typeof p.index !== 'undefined' &&\n p.index > sourcePointIndex &&\n p.graphic &&\n p.graphic.element);\n }) || null;\n}\n/**\n * Whether or not we should add a mock point element in\n * order to describe a point that has no graphic.\n * @private\n */\nfunction shouldAddMockPoint(point) {\n // Note: Sunburst series use isNull for hidden points on drilldown.\n // Ignore these.\n var series = point.series, chart = series && series.chart, isSunburst = series && series.is('sunburst'), isNull = point.isNull, shouldDescribeNull = chart &&\n chart\n .options.accessibility.point.describeNull;\n return isNull && !isSunburst && shouldDescribeNull;\n}\n/**\n * @private\n */\nfunction makeMockElement(point, pos) {\n var renderer = point.series.chart.renderer, mock = renderer.rect(pos.x, pos.y, 1, 1);\n mock.attr({\n 'class': 'highcharts-a11y-mock-point',\n fill: 'none',\n opacity: 0,\n 'fill-opacity': 0,\n 'stroke-opacity': 0\n });\n return mock;\n}\n/**\n * @private\n */\nfunction addMockPointElement(point) {\n var series = point.series, firstPointWithGraphic = findFirstPointWithGraphic(point), firstGraphic = firstPointWithGraphic && firstPointWithGraphic.graphic, parentGroup = firstGraphic ?\n firstGraphic.parentGroup :\n series.graph || series.group, mockPos = firstPointWithGraphic ? {\n x: pick(point.plotX, firstPointWithGraphic.plotX, 0),\n y: pick(point.plotY, firstPointWithGraphic.plotY, 0)\n } : {\n x: pick(point.plotX, 0),\n y: pick(point.plotY, 0)\n }, mockElement = makeMockElement(point, mockPos);\n if (parentGroup && parentGroup.element) {\n point.graphic = mockElement;\n point.hasMockGraphic = true;\n mockElement.add(parentGroup);\n // Move to correct pos in DOM\n parentGroup.element.insertBefore(mockElement.element, firstGraphic ? firstGraphic.element : null);\n return mockElement.element;\n }\n}\n/**\n * @private\n */\nfunction hasMorePointsThanDescriptionThreshold(series) {\n var chartA11yOptions = series.chart.options.accessibility, threshold = (chartA11yOptions.series.pointDescriptionEnabledThreshold);\n return !!(threshold !== false &&\n series.points &&\n series.points.length >= threshold);\n}\n/**\n * @private\n */\nfunction shouldSetScreenReaderPropsOnPoints(series) {\n var seriesA11yOptions = series.options.accessibility || {};\n return !hasMorePointsThanDescriptionThreshold(series) &&\n !seriesA11yOptions.exposeAsGroupOnly;\n}\n/**\n * @private\n */\nfunction shouldSetKeyboardNavPropsOnPoints(series) {\n var chartA11yOptions = series.chart.options.accessibility, seriesNavOptions = chartA11yOptions.keyboardNavigation.seriesNavigation;\n return !!(series.points && (series.points.length <\n seriesNavOptions.pointNavigationEnabledThreshold ||\n seriesNavOptions.pointNavigationEnabledThreshold === false));\n}\n/**\n * @private\n */\nfunction shouldDescribeSeriesElement(series) {\n var chart = series.chart, chartOptions = chart.options.chart, chartHas3d = chartOptions.options3d && chartOptions.options3d.enabled, hasMultipleSeries = chart.series.length > 1, describeSingleSeriesOption = chart.options.accessibility.series.describeSingleSeries, exposeAsGroupOnlyOption = (series.options.accessibility || {}).exposeAsGroupOnly, noDescribe3D = chartHas3d && hasMultipleSeries;\n return !noDescribe3D && (hasMultipleSeries || describeSingleSeriesOption ||\n exposeAsGroupOnlyOption || hasMorePointsThanDescriptionThreshold(series));\n}\n/**\n * @private\n */\nfunction pointNumberToString(point, value) {\n var series = point.series, chart = series.chart, a11yPointOptions = chart.options.accessibility.point || {}, seriesA11yPointOptions = series.options.accessibility &&\n series.options.accessibility.point || {}, tooltipOptions = series.tooltipOptions || {}, lang = chart.options.lang;\n if (isNumber(value)) {\n return numberFormat(value, seriesA11yPointOptions.valueDecimals ||\n a11yPointOptions.valueDecimals ||\n tooltipOptions.valueDecimals ||\n -1, lang.decimalPoint, lang.accessibility.thousandsSep || lang.thousandsSep);\n }\n return value;\n}\n/**\n * @private\n */\nfunction getSeriesDescriptionText(series) {\n var seriesA11yOptions = series.options.accessibility || {}, descOpt = seriesA11yOptions.description;\n return descOpt && series.chart.langFormat('accessibility.series.description', {\n description: descOpt,\n series: series\n }) || '';\n}\n/**\n * @private\n */\nfunction getSeriesAxisDescriptionText(series, axisCollection) {\n var axis = series[axisCollection];\n return series.chart.langFormat('accessibility.series.' + axisCollection + 'Description', {\n name: getAxisDescription(axis),\n series: series\n });\n}\n/**\n * Get accessible time description for a point on a datetime axis.\n *\n * @private\n */\nfunction getPointA11yTimeDescription(point) {\n var series = point.series, chart = series.chart, seriesA11yOptions = series.options.accessibility &&\n series.options.accessibility.point || {}, a11yOptions = chart.options.accessibility.point || {}, dateXAxis = series.xAxis && series.xAxis.dateTime;\n if (dateXAxis) {\n var tooltipDateFormat = dateXAxis.getXDateFormat(point.x || 0, chart.options.tooltip.dateTimeLabelFormats), dateFormat = seriesA11yOptions.dateFormatter &&\n seriesA11yOptions.dateFormatter(point) ||\n a11yOptions.dateFormatter && a11yOptions.dateFormatter(point) ||\n seriesA11yOptions.dateFormat ||\n a11yOptions.dateFormat ||\n tooltipDateFormat;\n return chart.time.dateFormat(dateFormat, point.x || 0, void 0);\n }\n}\n/**\n * @private\n */\nfunction getPointXDescription(point) {\n var timeDesc = getPointA11yTimeDescription(point), xAxis = point.series.xAxis || {}, pointCategory = xAxis.categories && defined(point.category) &&\n ('' + point.category).replace('
    ', ' '), canUseId = defined(point.id) &&\n ('' + point.id).indexOf('highcharts-') < 0, fallback = 'x, ' + point.x;\n return point.name || timeDesc || pointCategory ||\n (canUseId ? point.id : fallback);\n}\n/**\n * @private\n */\nfunction getPointArrayMapValueDescription(point, prefix, suffix) {\n var pre = prefix || '', suf = suffix || '', keyToValStr = function (key) {\n var num = pointNumberToString(point, pick(point[key], point.options[key]));\n return key + ': ' + pre + num + suf;\n }, pointArrayMap = point.series.pointArrayMap;\n return pointArrayMap.reduce(function (desc, key) {\n return desc + (desc.length ? ', ' : '') + keyToValStr(key);\n }, '');\n}\n/**\n * @private\n */\nfunction getPointValue(point) {\n var series = point.series, a11yPointOpts = series.chart.options.accessibility.point || {}, seriesA11yPointOpts = series.chart.options.accessibility &&\n series.chart.options.accessibility.point || {}, tooltipOptions = series.tooltipOptions || {}, valuePrefix = seriesA11yPointOpts.valuePrefix ||\n a11yPointOpts.valuePrefix ||\n tooltipOptions.valuePrefix ||\n '', valueSuffix = seriesA11yPointOpts.valueSuffix ||\n a11yPointOpts.valueSuffix ||\n tooltipOptions.valueSuffix ||\n '', fallbackKey = (typeof point.value !==\n 'undefined' ?\n 'value' : 'y'), fallbackDesc = pointNumberToString(point, point[fallbackKey]);\n if (point.isNull) {\n return series.chart.langFormat('accessibility.series.nullPointValue', {\n point: point\n });\n }\n if (series.pointArrayMap) {\n return getPointArrayMapValueDescription(point, valuePrefix, valueSuffix);\n }\n return valuePrefix + fallbackDesc + valueSuffix;\n}\n/**\n * Return the description for the annotation(s) connected to a point, or\n * empty string if none.\n *\n * @private\n * @param {Highcharts.Point} point\n * The data point to get the annotation info from.\n * @return {string}\n * Annotation description\n */\nfunction getPointAnnotationDescription(point) {\n var chart = point.series.chart;\n var langKey = 'accessibility.series.pointAnnotationsDescription';\n var annotations = getPointAnnotationTexts(point);\n var context = { point: point, annotations: annotations };\n return annotations.length ? chart.langFormat(langKey, context) : '';\n}\n/**\n * Return string with information about point.\n * @private\n */\nfunction getPointValueDescription(point) {\n var series = point.series, chart = series.chart, seriesA11yOptions = series.options.accessibility, seriesValueDescFormat = seriesA11yOptions && seriesA11yOptions.point &&\n seriesA11yOptions.point.valueDescriptionFormat, pointValueDescriptionFormat = seriesValueDescFormat ||\n chart.options.accessibility.point.valueDescriptionFormat, showXDescription = pick(series.xAxis &&\n series.xAxis.options.accessibility &&\n series.xAxis.options.accessibility.enabled, !chart.angular), xDesc = showXDescription ? getPointXDescription(point) : '', context = {\n point: point,\n index: defined(point.index) ? (point.index + 1) : '',\n xDescription: xDesc,\n value: getPointValue(point),\n separator: showXDescription ? ', ' : ''\n };\n return format(pointValueDescriptionFormat, context, chart);\n}\n/**\n * Return string with information about point.\n * @private\n */\nfunction defaultPointDescriptionFormatter(point) {\n var series = point.series, shouldExposeSeriesName = series.chart.series.length > 1 ||\n series.options.name, valText = getPointValueDescription(point), description = point.options && point.options.accessibility &&\n point.options.accessibility.description, userDescText = description ? ' ' + description : '', seriesNameText = shouldExposeSeriesName ? ' ' + series.name + '.' : '', annotationsDesc = getPointAnnotationDescription(point), pointAnnotationsText = annotationsDesc ? ' ' + annotationsDesc : '';\n point.accessibility = point.accessibility || {};\n point.accessibility.valueDescription = valText;\n return valText + userDescText + seriesNameText + pointAnnotationsText;\n}\n/**\n * Set a11y props on a point element\n * @private\n * @param {Highcharts.Point} point\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} pointElement\n */\nfunction setPointScreenReaderAttribs(point, pointElement) {\n var series = point.series, a11yPointOptions = series.chart.options.accessibility.point || {}, seriesPointA11yOptions = series.options.accessibility &&\n series.options.accessibility.point || {}, label = stripHTMLTags(seriesPointA11yOptions.descriptionFormatter &&\n seriesPointA11yOptions.descriptionFormatter(point) ||\n a11yPointOptions.descriptionFormatter &&\n a11yPointOptions.descriptionFormatter(point) ||\n defaultPointDescriptionFormatter(point));\n pointElement.setAttribute('role', 'img');\n pointElement.setAttribute('aria-label', label);\n}\n/**\n * Add accessible info to individual point elements of a series\n * @private\n * @param {Highcharts.Series} series\n */\nfunction describePointsInSeries(series) {\n var setScreenReaderProps = shouldSetScreenReaderPropsOnPoints(series), setKeyboardProps = shouldSetKeyboardNavPropsOnPoints(series), shouldDescribeNullPoints = series.chart.options.accessibility\n .point.describeNull;\n if (setScreenReaderProps || setKeyboardProps) {\n series.points.forEach(function (point) {\n var pointEl = point.graphic && point.graphic.element ||\n shouldAddMockPoint(point) && addMockPointElement(point), pointA11yDisabled = (point.options &&\n point.options.accessibility &&\n point.options.accessibility.enabled === false);\n if (pointEl) {\n if (point.isNull && !shouldDescribeNullPoints) {\n pointEl.setAttribute('aria-hidden', true);\n return;\n }\n // We always set tabindex, as long as we are setting props.\n // When setting tabindex, also remove default outline to\n // avoid ugly border on click.\n pointEl.setAttribute('tabindex', '-1');\n if (!series.chart.styledMode) {\n pointEl.style.outline = 'none';\n }\n if (setScreenReaderProps && !pointA11yDisabled) {\n setPointScreenReaderAttribs(point, pointEl);\n }\n else {\n pointEl.setAttribute('aria-hidden', true);\n }\n }\n });\n }\n}\n/**\n * Return string with information about series.\n * @private\n */\nfunction defaultSeriesDescriptionFormatter(series) {\n var chart = series.chart, chartTypes = chart.types || [], description = getSeriesDescriptionText(series), shouldDescribeAxis = function (coll) {\n return chart[coll] && chart[coll].length > 1 && series[coll];\n }, seriesNumber = series.index + 1, xAxisInfo = getSeriesAxisDescriptionText(series, 'xAxis'), yAxisInfo = getSeriesAxisDescriptionText(series, 'yAxis'), summaryContext = {\n seriesNumber: seriesNumber,\n series: series,\n chart: chart\n }, combinationSuffix = chartTypes.length > 1 ? 'Combination' : '', summary = chart.langFormat('accessibility.series.summary.' + series.type + combinationSuffix, summaryContext) || chart.langFormat('accessibility.series.summary.default' + combinationSuffix, summaryContext), axisDescription = (shouldDescribeAxis('yAxis') ? ' ' + yAxisInfo + '.' : '') + (shouldDescribeAxis('xAxis') ? ' ' + xAxisInfo + '.' : ''), formatStr = chart.options.accessibility.series.descriptionFormat || '';\n return format(formatStr, {\n seriesDescription: summary,\n authorDescription: (description ? ' ' + description : ''),\n axisDescription: axisDescription,\n series: series,\n chart: chart,\n seriesNumber: seriesNumber\n }, void 0);\n}\n/**\n * Set a11y props on a series element\n * @private\n * @param {Highcharts.Series} series\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} seriesElement\n */\nfunction describeSeriesElement(series, seriesElement) {\n var seriesA11yOptions = series.options.accessibility || {}, a11yOptions = series.chart.options.accessibility, landmarkVerbosity = a11yOptions.landmarkVerbosity;\n // Handle role attribute\n if (seriesA11yOptions.exposeAsGroupOnly) {\n seriesElement.setAttribute('role', 'img');\n }\n else if (landmarkVerbosity === 'all') {\n seriesElement.setAttribute('role', 'region');\n }\n else {\n seriesElement.setAttribute('role', 'group');\n }\n seriesElement.setAttribute('tabindex', '-1');\n if (!series.chart.styledMode) {\n // Don't show browser outline on click, despite tabindex\n seriesElement.style.outline = 'none';\n }\n seriesElement.setAttribute('aria-label', stripHTMLTags(a11yOptions.series.descriptionFormatter &&\n a11yOptions.series.descriptionFormatter(series) ||\n defaultSeriesDescriptionFormatter(series)));\n}\n/**\n * Put accessible info on series and points of a series.\n * @param {Highcharts.Series} series The series to add info on.\n */\nfunction describeSeries(series) {\n var chart = series.chart, firstPointEl = getSeriesFirstPointElement(series), seriesEl = getSeriesA11yElement(series), is3d = chart.is3d && chart.is3d();\n if (seriesEl) {\n // For some series types the order of elements do not match the\n // order of points in series. In that case we have to reverse them\n // in order for AT to read them out in an understandable order.\n // Due to z-index issues we cannot do this for 3D charts.\n if (seriesEl.lastChild === firstPointEl && !is3d) {\n reverseChildNodes(seriesEl);\n }\n describePointsInSeries(series);\n unhideChartElementFromAT(chart, seriesEl);\n if (shouldDescribeSeriesElement(series)) {\n describeSeriesElement(series, seriesEl);\n }\n else {\n seriesEl.removeAttribute('aria-label');\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nvar SeriesDescriber = {\n defaultPointDescriptionFormatter: defaultPointDescriptionFormatter,\n defaultSeriesDescriptionFormatter: defaultSeriesDescriptionFormatter,\n describeSeries: describeSeries\n};\nexport default SeriesDescriber;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Handle announcing new data for a chart.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../../../Core/Globals.js';\nimport U from '../../../Core/Utilities.js';\nvar addEvent = U.addEvent, defined = U.defined;\nimport Announcer from '../../Utils/Announcer.js';\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nvar getChartTitle = ChartUtilities.getChartTitle;\nimport EventProvider from '../../Utils/EventProvider.js';\nimport SeriesDescriber from './SeriesDescriber.js';\nvar defaultPointDescriptionFormatter = SeriesDescriber.defaultPointDescriptionFormatter, defaultSeriesDescriptionFormatter = SeriesDescriber.defaultSeriesDescriptionFormatter;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * @private\n */\nfunction chartHasAnnounceEnabled(chart) {\n return !!chart.options.accessibility.announceNewData.enabled;\n}\n/**\n * @private\n */\nfunction findPointInDataArray(point) {\n var candidates = point.series.data.filter(function (candidate) { return (point.x === candidate.x && point.y === candidate.y); });\n return candidates.length === 1 ? candidates[0] : point;\n}\n/**\n * Get array of unique series from two arrays\n * @private\n */\nfunction getUniqueSeries(arrayA, arrayB) {\n var uniqueSeries = (arrayA || []).concat(arrayB || []).reduce(function (acc, cur) {\n acc[cur.name + cur.index] = cur;\n return acc;\n }, {});\n return Object\n .keys(uniqueSeries)\n .map(function (ix) { return uniqueSeries[ix]; });\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n * @class\n */\nvar NewDataAnnouncer = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function NewDataAnnouncer(chart) {\n /* *\n *\n * Public\n *\n * */\n this.announcer = void 0;\n this.dirty = {\n allSeries: {}\n };\n this.eventProvider = void 0;\n this.lastAnnouncementTime = 0;\n this.chart = chart;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Initialize the new data announcer.\n * @private\n */\n NewDataAnnouncer.prototype.init = function () {\n var chart = this.chart;\n var announceOptions = (chart.options.accessibility.announceNewData);\n var announceType = announceOptions.interruptUser ?\n 'assertive' : 'polite';\n this.lastAnnouncementTime = 0;\n this.dirty = {\n allSeries: {}\n };\n this.eventProvider = new EventProvider();\n this.announcer = new Announcer(chart, announceType);\n this.addEventListeners();\n };\n /**\n * Remove traces of announcer.\n * @private\n */\n NewDataAnnouncer.prototype.destroy = function () {\n this.eventProvider.removeAddedEvents();\n this.announcer.destroy();\n };\n /**\n * Add event listeners for the announcer\n * @private\n */\n NewDataAnnouncer.prototype.addEventListeners = function () {\n var announcer = this, chart = this.chart, e = this.eventProvider;\n e.addEvent(chart, 'afterApplyDrilldown', function () {\n announcer.lastAnnouncementTime = 0;\n });\n e.addEvent(chart, 'afterAddSeries', function (e) {\n announcer.onSeriesAdded(e.series);\n });\n e.addEvent(chart, 'redraw', function () {\n announcer.announceDirtyData();\n });\n };\n /**\n * On new data series added, update dirty list.\n * @private\n * @param {Highcharts.Series} series\n */\n NewDataAnnouncer.prototype.onSeriesAdded = function (series) {\n if (chartHasAnnounceEnabled(this.chart)) {\n this.dirty.hasDirty = true;\n this.dirty.allSeries[series.name + series.index] = series;\n // Add it to newSeries storage unless we already have one\n this.dirty.newSeries = defined(this.dirty.newSeries) ?\n void 0 : series;\n }\n };\n /**\n * Gather what we know and announce the data to user.\n * @private\n */\n NewDataAnnouncer.prototype.announceDirtyData = function () {\n var chart = this.chart, announcer = this;\n if (chart.options.accessibility.announceNewData &&\n this.dirty.hasDirty) {\n var newPoint = this.dirty.newPoint;\n // If we have a single new point, see if we can find it in the\n // data array. Otherwise we can only pass through options to\n // the description builder, and it is a bit sparse in info.\n if (newPoint) {\n newPoint = findPointInDataArray(newPoint);\n }\n this.queueAnnouncement(Object\n .keys(this.dirty.allSeries)\n .map(function (ix) {\n return announcer.dirty.allSeries[ix];\n }), this.dirty.newSeries, newPoint);\n // Reset\n this.dirty = {\n allSeries: {}\n };\n }\n };\n /**\n * Announce to user that there is new data.\n * @private\n * @param {Array} dirtySeries\n * Array of series with new data.\n * @param {Highcharts.Series} [newSeries]\n * If a single new series was added, a reference to this series.\n * @param {Highcharts.Point} [newPoint]\n * If a single point was added, a reference to this point.\n */\n NewDataAnnouncer.prototype.queueAnnouncement = function (dirtySeries, newSeries, newPoint) {\n var _this = this;\n var chart = this.chart;\n var annOptions = chart.options.accessibility.announceNewData;\n if (annOptions.enabled) {\n var now = +new Date();\n var dTime = now - this.lastAnnouncementTime;\n var time = Math.max(0, annOptions.minAnnounceInterval - dTime);\n // Add series from previously queued announcement.\n var allSeries = getUniqueSeries(this.queuedAnnouncement && this.queuedAnnouncement.series, dirtySeries);\n // Build message and announce\n var message = this.buildAnnouncementMessage(allSeries, newSeries, newPoint);\n if (message) {\n // Is there already one queued?\n if (this.queuedAnnouncement) {\n clearTimeout(this.queuedAnnouncementTimer);\n }\n // Build the announcement\n this.queuedAnnouncement = {\n time: now,\n message: message,\n series: allSeries\n };\n // Queue the announcement\n this.queuedAnnouncementTimer = setTimeout(function () {\n if (_this && _this.announcer) {\n _this.lastAnnouncementTime = +new Date();\n _this.announcer.announce(_this.queuedAnnouncement.message);\n delete _this.queuedAnnouncement;\n delete _this.queuedAnnouncementTimer;\n }\n }, time);\n }\n }\n };\n /**\n * Get announcement message for new data.\n * @private\n * @param {Array} dirtySeries\n * Array of series with new data.\n * @param {Highcharts.Series} [newSeries]\n * If a single new series was added, a reference to this series.\n * @param {Highcharts.Point} [newPoint]\n * If a single point was added, a reference to this point.\n *\n * @return {string|null}\n * The announcement message to give to user.\n */\n NewDataAnnouncer.prototype.buildAnnouncementMessage = function (dirtySeries, newSeries, newPoint) {\n var chart = this.chart, annOptions = chart.options.accessibility.announceNewData;\n // User supplied formatter?\n if (annOptions.announcementFormatter) {\n var formatterRes = annOptions.announcementFormatter(dirtySeries, newSeries, newPoint);\n if (formatterRes !== false) {\n return formatterRes.length ? formatterRes : null;\n }\n }\n // Default formatter - use lang options\n var multiple = H.charts && H.charts.length > 1 ?\n 'Multiple' : 'Single', langKey = newSeries ? 'newSeriesAnnounce' + multiple :\n newPoint ? 'newPointAnnounce' + multiple : 'newDataAnnounce', chartTitle = getChartTitle(chart);\n return chart.langFormat('accessibility.announceNewData.' + langKey, {\n chartTitle: chartTitle,\n seriesDesc: newSeries ?\n defaultSeriesDescriptionFormatter(newSeries) :\n null,\n pointDesc: newPoint ?\n defaultPointDescriptionFormatter(newPoint) :\n null,\n point: newPoint,\n series: newSeries\n });\n };\n return NewDataAnnouncer;\n}());\n/* *\n *\n * Class Namespace\n *\n * */\n(function (NewDataAnnouncer) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Static Properties\n *\n * */\n NewDataAnnouncer.composedClasses = [];\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * @private\n */\n function compose(SeriesClass) {\n if (NewDataAnnouncer.composedClasses.indexOf(SeriesClass) === -1) {\n NewDataAnnouncer.composedClasses.push(SeriesClass);\n addEvent(SeriesClass, 'addPoint', seriesOnAddPoint);\n addEvent(SeriesClass, 'updatedData', seriesOnUpdatedData);\n }\n }\n NewDataAnnouncer.compose = compose;\n /**\n * On new point added, update dirty list.\n * @private\n * @param {Highcharts.Point} point\n */\n function seriesOnAddPoint(e) {\n var chart = this.chart, newDataAnnouncer = this.newDataAnnouncer;\n if (newDataAnnouncer &&\n newDataAnnouncer.chart === chart &&\n chartHasAnnounceEnabled(chart)) {\n // Add it to newPoint storage unless we already have one\n newDataAnnouncer.dirty.newPoint = (defined(newDataAnnouncer.dirty.newPoint) ?\n void 0 :\n e.point);\n }\n }\n /**\n * On new data in the series, make sure we add it to the dirty list.\n * @private\n * @param {Highcharts.Series} series\n */\n function seriesOnUpdatedData() {\n var chart = this.chart, newDataAnnouncer = this.newDataAnnouncer;\n if (newDataAnnouncer &&\n newDataAnnouncer.chart === chart &&\n chartHasAnnounceEnabled(chart)) {\n newDataAnnouncer.dirty.hasDirty = true;\n newDataAnnouncer.dirty.allSeries[this.name + this.index] = this;\n }\n }\n})(NewDataAnnouncer || (NewDataAnnouncer = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default NewDataAnnouncer;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Proxy elements are used to shadow SVG elements in HTML for assistive\n * technology, such as screen readers or voice input software.\n *\n * The ProxyElement class represents such an element, and deals with\n * overlay positioning and mirroring events for the target.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nvar doc = H.doc;\nimport U from '../Core/Utilities.js';\nvar attr = U.attr, css = U.css, merge = U.merge;\nimport EventProvider from './Utils/EventProvider.js';\nimport ChartUtilities from './Utils/ChartUtilities.js';\nvar fireEventOnWrappedOrUnwrappedElement = ChartUtilities.fireEventOnWrappedOrUnwrappedElement;\nimport HTMLUtilities from './Utils/HTMLUtilities.js';\nvar cloneMouseEvent = HTMLUtilities.cloneMouseEvent, cloneTouchEvent = HTMLUtilities.cloneTouchEvent, getFakeMouseEvent = HTMLUtilities.getFakeMouseEvent, removeElement = HTMLUtilities.removeElement;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a proxy element that overlays a target and relays events\n * to its target.\n *\n * @private\n * @class\n */\nvar ProxyElement = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function ProxyElement(chart, target, groupType, attributes) {\n this.chart = chart;\n this.target = target;\n this.groupType = groupType;\n var isListItem = groupType === 'ul';\n this.eventProvider = new EventProvider();\n var wrapperEl = isListItem ? doc.createElement('li') : null;\n var btnEl = this.buttonElement = doc.createElement('button');\n if (!chart.styledMode) {\n this.hideButtonVisually(btnEl);\n }\n if (wrapperEl) {\n if (isListItem && !chart.styledMode) {\n wrapperEl.style.listStyle = 'none';\n }\n wrapperEl.appendChild(btnEl);\n this.element = wrapperEl;\n }\n else {\n this.element = btnEl;\n }\n this.updateTarget(target, attributes);\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Fake a click event on the target.\n */\n ProxyElement.prototype.click = function () {\n var pos = this.getTargetPosition();\n pos.x += pos.width / 2;\n pos.y += pos.height / 2;\n var fakeEventObject = getFakeMouseEvent('click', pos);\n fireEventOnWrappedOrUnwrappedElement(this.target.click, fakeEventObject);\n };\n /**\n * Update the target to be proxied. The position and events are updated to\n * match the new target.\n * @param target The new target definition\n * @param attributes New HTML attributes to apply to the button. Set an\n * attribute to null to remove.\n */\n ProxyElement.prototype.updateTarget = function (target, attributes) {\n this.target = target;\n this.updateCSSClassName();\n var attrs = attributes || {};\n Object.keys(attrs).forEach(function (a) {\n if (attrs[a] === null) {\n delete attrs[a];\n }\n });\n attr(this.buttonElement, merge({\n 'aria-label': this.getTargetAttr(target.click, 'aria-label')\n }, attrs));\n this.eventProvider.removeAddedEvents();\n this.addProxyEventsToButton(this.buttonElement, target.click);\n this.refreshPosition();\n };\n /**\n * Refresh the position of the proxy element to match the current target\n */\n ProxyElement.prototype.refreshPosition = function () {\n var bBox = this.getTargetPosition();\n css(this.buttonElement, {\n width: (bBox.width || 1) + 'px',\n height: (bBox.height || 1) + 'px',\n left: (Math.round(bBox.x) || 0) + 'px',\n top: (Math.round(bBox.y) || 0) + 'px'\n });\n };\n /**\n * Remove button from DOM, and clear events.\n */\n ProxyElement.prototype.remove = function () {\n this.eventProvider.removeAddedEvents();\n removeElement(this.element);\n };\n // -------------------------- private ------------------------------------\n /**\n * Update the CSS class name to match target\n */\n ProxyElement.prototype.updateCSSClassName = function () {\n var stringHasNoTooltip = function (s) { return (s.indexOf('highcharts-no-tooltip') > -1); };\n var legend = this.chart.legend;\n var groupDiv = legend.group && legend.group.div;\n var noTooltipOnGroup = stringHasNoTooltip(groupDiv && groupDiv.className || '');\n var targetClassName = this.getTargetAttr(this.target.click, 'class') || '';\n var noTooltipOnTarget = stringHasNoTooltip(targetClassName);\n this.buttonElement.className = noTooltipOnGroup || noTooltipOnTarget ?\n 'highcharts-a11y-proxy-button highcharts-no-tooltip' :\n 'highcharts-a11y-proxy-button';\n };\n /**\n * Mirror events for a proxy button to a target\n */\n ProxyElement.prototype.addProxyEventsToButton = function (button, target) {\n var _this = this;\n [\n 'click', 'touchstart', 'touchend', 'touchcancel', 'touchmove',\n 'mouseover', 'mouseenter', 'mouseleave', 'mouseout'\n ].forEach(function (evtType) {\n var isTouchEvent = evtType.indexOf('touch') === 0;\n _this.eventProvider.addEvent(button, evtType, function (e) {\n var clonedEvent = isTouchEvent ?\n cloneTouchEvent(e) :\n cloneMouseEvent(e);\n if (target) {\n fireEventOnWrappedOrUnwrappedElement(target, clonedEvent);\n }\n e.stopPropagation();\n // #9682, #15318: Touch scrolling didnt work when touching\n // proxy\n if (!isTouchEvent) {\n e.preventDefault();\n }\n }, { passive: false });\n });\n };\n /**\n * Set visually hidden style on a proxy button\n */\n ProxyElement.prototype.hideButtonVisually = function (button) {\n css(button, {\n borderWidth: 0,\n backgroundColor: 'transparent',\n cursor: 'pointer',\n outline: 'none',\n opacity: 0.001,\n filter: 'alpha(opacity=1)',\n zIndex: 999,\n overflow: 'hidden',\n padding: 0,\n margin: 0,\n display: 'block',\n position: 'absolute',\n '-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha(Opacity=1)'\n });\n };\n /**\n * Get the position relative to chart container for the target\n */\n ProxyElement.prototype.getTargetPosition = function () {\n var clickTarget = this.target.click;\n // We accept both DOM elements and wrapped elements as click targets.\n var clickTargetElement = clickTarget.element ?\n clickTarget.element :\n clickTarget;\n var posElement = this.target.visual || clickTargetElement;\n var chartDiv = this.chart.renderTo;\n if (chartDiv && posElement && posElement.getBoundingClientRect) {\n var rectEl = posElement.getBoundingClientRect(), chartPos = this.chart.pointer.getChartPosition();\n return {\n x: (rectEl.left - chartPos.left) / chartPos.scaleX,\n y: (rectEl.top - chartPos.top) / chartPos.scaleY,\n width: rectEl.right / chartPos.scaleX -\n rectEl.left / chartPos.scaleX,\n height: rectEl.bottom / chartPos.scaleY -\n rectEl.top / chartPos.scaleY\n };\n }\n return { x: 0, y: 0, width: 1, height: 1 };\n };\n /**\n * Get an attribute value of a target\n */\n ProxyElement.prototype.getTargetAttr = function (target, key) {\n if (target.element) {\n return target.element.getAttribute(key);\n }\n return target.getAttribute(key);\n };\n return ProxyElement;\n}());\n/* *\n *\n * Default Export\n *\n * */\nexport default ProxyElement;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Proxy elements are used to shadow SVG elements in HTML for assistive\n * technology, such as screen readers or voice input software.\n *\n * The ProxyProvider keeps track of all proxy elements of the a11y module,\n * and updating their order and positioning.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nvar doc = H.doc;\nimport U from '../Core/Utilities.js';\nvar attr = U.attr, css = U.css;\nimport CU from './Utils/ChartUtilities.js';\nvar unhideChartElementFromAT = CU.unhideChartElementFromAT;\nimport DOMElementProvider from './Utils/DOMElementProvider.js';\nimport HU from './Utils/HTMLUtilities.js';\nvar removeElement = HU.removeElement, removeChildNodes = HU.removeChildNodes;\nimport ProxyElement from './ProxyElement.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * Keeps track of all proxy elements and proxy groups.\n *\n * @private\n * @class\n */\nvar ProxyProvider = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function ProxyProvider(chart) {\n this.chart = chart;\n this.domElementProvider = new DOMElementProvider();\n this.groups = {};\n this.groupOrder = [];\n this.beforeChartProxyPosContainer = this.createProxyPosContainer('before');\n this.afterChartProxyPosContainer = this.createProxyPosContainer('after');\n this.update();\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable */\n /**\n * Add a new proxy element to a group, proxying a target control.\n */\n ProxyProvider.prototype.addProxyElement = function (groupKey, target, attributes) {\n var group = this.groups[groupKey];\n if (!group) {\n throw new Error('ProxyProvider.addProxyElement: Invalid group key ' + groupKey);\n }\n var proxy = new ProxyElement(this.chart, target, group.type, attributes);\n group.proxyContainerElement.appendChild(proxy.element);\n group.proxyElements.push(proxy);\n return proxy;\n };\n /**\n * Create a group that will contain proxy elements. The group order is\n * automatically updated according to the last group order keys.\n *\n * Returns the added group.\n */\n ProxyProvider.prototype.addGroup = function (groupKey, groupType, attributes) {\n var existingGroup = this.groups[groupKey];\n if (existingGroup) {\n return existingGroup.groupElement;\n }\n var proxyContainer = this.domElementProvider.createElement(groupType);\n // If we want to add a role to the group, and still use e.g.\n // a list group, we need a wrapper div.\n var groupElement;\n if (attributes && attributes.role && groupType !== 'div') {\n groupElement = this.domElementProvider.createElement('div');\n groupElement.appendChild(proxyContainer);\n }\n else {\n groupElement = proxyContainer;\n }\n groupElement.className = 'highcharts-a11y-proxy-group highcharts-a11y-proxy-group-' +\n groupKey.replace(/\\W/g, '-');\n this.groups[groupKey] = {\n proxyContainerElement: proxyContainer,\n groupElement: groupElement,\n type: groupType,\n proxyElements: []\n };\n attr(groupElement, attributes || {});\n if (groupType === 'ul') {\n proxyContainer.setAttribute('role', 'list'); // Needed for webkit\n }\n // Add the group to the end by default, and perhaps then we\n // won't have to reorder the whole set of groups.\n this.afterChartProxyPosContainer.appendChild(groupElement);\n this.updateGroupOrder(this.groupOrder);\n return groupElement;\n };\n /**\n * Update HTML attributes of a group.\n */\n ProxyProvider.prototype.updateGroupAttrs = function (groupKey, attributes) {\n var group = this.groups[groupKey];\n if (!group) {\n throw new Error('ProxyProvider.updateGroupAttrs: Invalid group key ' + groupKey);\n }\n attr(group.groupElement, attributes);\n };\n /**\n * Reorder the proxy groups.\n *\n * The group key \"series\" refers to the chart's data points / element.\n * This is so that the keyboardNavigation.order option can be used to\n * determine the proxy group order.\n */\n ProxyProvider.prototype.updateGroupOrder = function (groupKeys) {\n var _this = this;\n // Store so that we can update order when a new group is created\n this.groupOrder = groupKeys.slice();\n // Don't unnecessarily reorder, because keyboard focus is lost\n if (this.isDOMOrderGroupOrder()) {\n return;\n }\n var seriesIx = groupKeys.indexOf('series');\n var beforeKeys = seriesIx > -1 ? groupKeys.slice(0, seriesIx) : groupKeys;\n var afterKeys = seriesIx > -1 ? groupKeys.slice(seriesIx + 1) : [];\n // Store focused element since it will be lost when reordering\n var activeElement = doc.activeElement;\n // Add groups to correct container\n ['before', 'after'].forEach(function (pos) {\n var posContainer = _this[pos === 'before' ?\n 'beforeChartProxyPosContainer' :\n 'afterChartProxyPosContainer'];\n var keys = pos === 'before' ? beforeKeys : afterKeys;\n removeChildNodes(posContainer);\n keys.forEach(function (groupKey) {\n var group = _this.groups[groupKey];\n if (group) {\n posContainer.appendChild(group.groupElement);\n }\n });\n });\n // Attempt to restore focus after reordering, but note that this may\n // cause screen readers re-announcing the button.\n if ((this.beforeChartProxyPosContainer.contains(activeElement) ||\n this.afterChartProxyPosContainer.contains(activeElement)) &&\n activeElement && activeElement.focus) {\n activeElement.focus();\n }\n };\n /**\n * Remove all proxy elements in a group\n */\n ProxyProvider.prototype.clearGroup = function (groupKey) {\n var group = this.groups[groupKey];\n if (!group) {\n throw new Error('ProxyProvider.clearGroup: Invalid group key ' + groupKey);\n }\n removeChildNodes(group.proxyContainerElement);\n };\n /**\n * Remove a group from the DOM and from the proxy provider's group list.\n * All child elements are removed.\n * If the group does not exist, nothing happens.\n */\n ProxyProvider.prototype.removeGroup = function (groupKey) {\n var group = this.groups[groupKey];\n if (group) {\n removeElement(group.groupElement);\n delete this.groups[groupKey];\n }\n };\n /**\n * Update the position and order of all proxy groups and elements\n */\n ProxyProvider.prototype.update = function () {\n this.updatePosContainerPositions();\n this.updateGroupOrder(this.groupOrder);\n this.updateProxyElementPositions();\n };\n /**\n * Update all proxy element positions\n */\n ProxyProvider.prototype.updateProxyElementPositions = function () {\n Object.keys(this.groups).forEach(this.updateGroupProxyElementPositions.bind(this));\n };\n /**\n * Update a group's proxy elements' positions.\n * If the group does not exist, nothing happens.\n */\n ProxyProvider.prototype.updateGroupProxyElementPositions = function (groupKey) {\n var group = this.groups[groupKey];\n if (group) {\n group.proxyElements.forEach(function (el) { return el.refreshPosition(); });\n }\n };\n /**\n * Remove all added elements\n */\n ProxyProvider.prototype.destroy = function () {\n this.domElementProvider.destroyCreatedElements();\n };\n // -------------------------- private ------------------------------------\n /**\n * Create and return a pos container element (the overall containers for\n * the proxy groups).\n */\n ProxyProvider.prototype.createProxyPosContainer = function (classNamePostfix) {\n var el = this.domElementProvider.createElement('div');\n el.setAttribute('aria-hidden', 'false');\n el.className = 'highcharts-a11y-proxy-container' + (classNamePostfix ? '-' + classNamePostfix : '');\n css(el, {\n top: '0',\n left: '0'\n });\n if (!this.chart.styledMode) {\n el.style.whiteSpace = 'nowrap';\n el.style.position = 'absolute';\n }\n return el;\n };\n /**\n * Get an array of group keys that corresponds to the current group order\n * in the DOM.\n */\n ProxyProvider.prototype.getCurrentGroupOrderInDOM = function () {\n var _this = this;\n var getGroupKeyFromElement = function (el) {\n var allGroups = Object.keys(_this.groups);\n var i = allGroups.length;\n while (i--) {\n var groupKey = allGroups[i];\n var group = _this.groups[groupKey];\n if (group && el === group.groupElement) {\n return groupKey;\n }\n }\n };\n var getChildrenGroupOrder = function (el) {\n var childrenOrder = [];\n var children = el.children;\n for (var i = 0; i < children.length; ++i) {\n var groupKey = getGroupKeyFromElement(children[i]);\n if (groupKey) {\n childrenOrder.push(groupKey);\n }\n }\n return childrenOrder;\n };\n var before = getChildrenGroupOrder(this.beforeChartProxyPosContainer);\n var after = getChildrenGroupOrder(this.afterChartProxyPosContainer);\n before.push('series');\n return before.concat(after);\n };\n /**\n * Check if the current DOM order matches the current group order, so that\n * a reordering/update is unnecessary.\n */\n ProxyProvider.prototype.isDOMOrderGroupOrder = function () {\n var _this = this;\n var domOrder = this.getCurrentGroupOrderInDOM();\n var groupOrderWithGroups = this.groupOrder.filter(function (x) { return x === 'series' || !!_this.groups[x]; });\n var i = domOrder.length;\n if (i !== groupOrderWithGroups.length) {\n return false;\n }\n while (i--) {\n if (domOrder[i] !== groupOrderWithGroups[i]) {\n return false;\n }\n }\n return true;\n };\n /**\n * Update the DOM positions of the before/after proxy\n * positioning containers for the groups.\n */\n ProxyProvider.prototype.updatePosContainerPositions = function () {\n var chart = this.chart;\n // If exporting, don't add these containers to the DOM.\n if (chart.renderer.forExport) {\n return;\n }\n var rendererSVGEl = chart.renderer.box;\n chart.container.insertBefore(this.afterChartProxyPosContainer, rendererSVGEl.nextSibling);\n chart.container.insertBefore(this.beforeChartProxyPosContainer, rendererSVGEl);\n unhideChartElementFromAT(this.chart, this.afterChartProxyPosContainer);\n unhideChartElementFromAT(this.chart, this.beforeChartProxyPosContainer);\n };\n return ProxyProvider;\n}());\n/* *\n *\n * Export Default\n *\n * */\nexport default ProxyProvider;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\n/* *\n *\n * Declarations\n *\n * */\n/**\n * Language object. The language object is global and it can't be set\n * on each chart initialization. Instead, use `Highcharts.setOptions` to\n * set it before any chart is initialized.\n *\n * ```js\n * Highcharts.setOptions({\n * lang: {\n * months: [\n * 'Janvier', 'Février', 'Mars', 'Avril',\n * 'Mai', 'Juin', 'Juillet', 'Août',\n * 'Septembre', 'Octobre', 'Novembre', 'Décembre'\n * ],\n * weekdays: [\n * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',\n * 'Jeudi', 'Vendredi', 'Samedi'\n * ]\n * }\n * });\n * ```\n *\n * @optionparent lang\n */\nvar lang = {\n /**\n * The text for the label for the range selector buttons.\n *\n * @product highstock gantt\n */\n rangeSelectorZoom: 'Zoom',\n /**\n * The text for the label for the \"from\" input box in the range\n * selector. Since v9.0, this string is empty as the label is not\n * rendered by default.\n *\n * @product highstock gantt\n */\n rangeSelectorFrom: '',\n /**\n * The text for the label for the \"to\" input box in the range selector.\n *\n * @product highstock gantt\n */\n rangeSelectorTo: '→'\n};\n/**\n * The range selector is a tool for selecting ranges to display within\n * the chart. It provides buttons to select preconfigured ranges in\n * the chart, like 1 day, 1 week, 1 month etc. It also provides input\n * boxes where min and max dates can be manually input.\n *\n * @product highstock gantt\n * @optionparent rangeSelector\n */\nvar rangeSelector = {\n /**\n * Whether to enable all buttons from the start. By default buttons are\n * only enabled if the corresponding time range exists on the X axis,\n * but enabling all buttons allows for dynamically loading different\n * time ranges.\n *\n * @sample {highstock} stock/rangeselector/allbuttonsenabled-true/\n * All buttons enabled\n *\n * @since 2.0.3\n */\n allButtonsEnabled: false,\n /**\n * An array of configuration objects for the buttons.\n *\n * Defaults to:\n * ```js\n * buttons: [{\n * type: 'month',\n * count: 1,\n * text: '1m',\n * title: 'View 1 month'\n * }, {\n * type: 'month',\n * count: 3,\n * text: '3m',\n * title: 'View 3 months'\n * }, {\n * type: 'month',\n * count: 6,\n * text: '6m',\n * title: 'View 6 months'\n * }, {\n * type: 'ytd',\n * text: 'YTD',\n * title: 'View year to date'\n * }, {\n * type: 'year',\n * count: 1,\n * text: '1y',\n * title: 'View 1 year'\n * }, {\n * type: 'all',\n * text: 'All',\n * title: 'View all'\n * }]\n * ```\n *\n * @sample {highstock} stock/rangeselector/datagrouping/\n * Data grouping by buttons\n *\n * @type {Array<*>}\n */\n buttons: void 0,\n /**\n * How many units of the defined type the button should span. If `type`\n * is \"month\" and `count` is 3, the button spans three months.\n *\n * @type {number}\n * @default 1\n * @apioption rangeSelector.buttons.count\n */\n /**\n * Fires when clicking on the rangeSelector button. One parameter,\n * event, is passed to the function, containing common event\n * information.\n *\n * ```js\n * click: function(e) {\n * console.log(this);\n * }\n * ```\n *\n * Return false to stop default button's click action.\n *\n * @sample {highstock} stock/rangeselector/button-click/\n * Click event on the button\n *\n * @type {Highcharts.RangeSelectorClickCallbackFunction}\n * @apioption rangeSelector.buttons.events.click\n */\n /**\n * Additional range (in milliseconds) added to the end of the calculated\n * time span.\n *\n * @sample {highstock} stock/rangeselector/min-max-offsets/\n * Button offsets\n *\n * @type {number}\n * @default 0\n * @since 6.0.0\n * @apioption rangeSelector.buttons.offsetMax\n */\n /**\n * Additional range (in milliseconds) added to the start of the\n * calculated time span.\n *\n * @sample {highstock} stock/rangeselector/min-max-offsets/\n * Button offsets\n *\n * @type {number}\n * @default 0\n * @since 6.0.0\n * @apioption rangeSelector.buttons.offsetMin\n */\n /**\n * When buttons apply dataGrouping on a series, by default zooming\n * in/out will deselect buttons and unset dataGrouping. Enable this\n * option to keep buttons selected when extremes change.\n *\n * @sample {highstock} stock/rangeselector/preserve-datagrouping/\n * Different preserveDataGrouping settings\n *\n * @type {boolean}\n * @default false\n * @since 6.1.2\n * @apioption rangeSelector.buttons.preserveDataGrouping\n */\n /**\n * A custom data grouping object for each button.\n *\n * @see [series.dataGrouping](#plotOptions.series.dataGrouping)\n *\n * @sample {highstock} stock/rangeselector/datagrouping/\n * Data grouping by range selector buttons\n *\n * @type {*}\n * @extends plotOptions.series.dataGrouping\n * @apioption rangeSelector.buttons.dataGrouping\n */\n /**\n * The text for the button itself.\n *\n * @type {string}\n * @apioption rangeSelector.buttons.text\n */\n /**\n * Explanation for the button, shown as a tooltip on hover, and used by\n * assistive technology.\n *\n * @type {string}\n * @apioption rangeSelector.buttons.title\n */\n /**\n * Defined the time span for the button. Can be one of `millisecond`,\n * `second`, `minute`, `hour`, `day`, `week`, `month`, `year`, `ytd`,\n * and `all`.\n *\n * @type {Highcharts.RangeSelectorButtonTypeValue}\n * @apioption rangeSelector.buttons.type\n */\n /**\n * The space in pixels between the buttons in the range selector.\n */\n buttonSpacing: 5,\n /**\n * Whether to collapse the range selector buttons into a dropdown when\n * there is not enough room to show everything in a single row, instead\n * of dividing the range selector into multiple rows.\n * Can be one of the following:\n * - `always`: Always collapse\n * - `responsive`: Only collapse when there is not enough room\n * - `never`: Never collapse\n *\n * @sample {highstock} stock/rangeselector/dropdown/\n * Dropdown option\n *\n * @validvalue [\"always\", \"responsive\", \"never\"]\n * @since 9.0.0\n */\n dropdown: 'responsive',\n /**\n * Enable or disable the range selector. Default to `true` for stock\n * charts, using the `stockChart` factory.\n *\n * @sample {highstock} stock/rangeselector/enabled/\n * Disable the range selector\n *\n * @type {boolean|undefined}\n * @default {highstock} true\n */\n enabled: void 0,\n /**\n * The vertical alignment of the rangeselector box. Allowed properties\n * are `top`, `middle`, `bottom`.\n *\n * @sample {highstock} stock/rangeselector/vertical-align-middle/\n * Middle\n * @sample {highstock} stock/rangeselector/vertical-align-bottom/\n * Bottom\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 6.0.0\n */\n verticalAlign: 'top',\n /**\n * A collection of attributes for the buttons. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width`, as well as `style`,\n * a collection of CSS properties for the text.\n *\n * The object can also be extended with states, so you can set\n * presentational options for `hover`, `select` or `disabled` button\n * states.\n *\n * CSS styles for the text label.\n *\n * In styled mode, the buttons are styled by the\n * `.highcharts-range-selector-buttons .highcharts-button` rule with its\n * different states.\n *\n * @sample {highstock} stock/rangeselector/styling/\n * Styling the buttons and inputs\n *\n * @type {Highcharts.SVGAttributes}\n */\n buttonTheme: {\n /** @ignore */\n width: 28,\n /** @ignore */\n height: 18,\n /** @ignore */\n padding: 2,\n /** @ignore */\n zIndex: 7 // #484, #852\n },\n /**\n * When the rangeselector is floating, the plot area does not reserve\n * space for it. This opens for positioning anywhere on the chart.\n *\n * @sample {highstock} stock/rangeselector/floating/\n * Placing the range selector between the plot area and the\n * navigator\n *\n * @since 6.0.0\n */\n floating: false,\n /**\n * The x offset of the range selector relative to its horizontal\n * alignment within `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @since 6.0.0\n */\n x: 0,\n /**\n * The y offset of the range selector relative to its horizontal\n * alignment within `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @since 6.0.0\n */\n y: 0,\n /**\n * Deprecated. The height of the range selector. Currently it is\n * calculated dynamically.\n *\n * @deprecated\n * @type {number|undefined}\n * @since 2.1.9\n */\n height: void 0,\n /**\n * The border color of the date input boxes.\n *\n * @sample {highstock} stock/rangeselector/styling/\n * Styling the buttons and inputs\n *\n * @type {Highcharts.ColorString}\n * @since 1.3.7\n */\n inputBoxBorderColor: 'none',\n /**\n * The pixel height of the date input boxes.\n *\n * @sample {highstock} stock/rangeselector/styling/\n * Styling the buttons and inputs\n *\n * @since 1.3.7\n */\n inputBoxHeight: 17,\n /**\n * The pixel width of the date input boxes. When `undefined`, the width\n * is fitted to the rendered content.\n *\n * @sample {highstock} stock/rangeselector/styling/\n * Styling the buttons and inputs\n *\n * @type {number|undefined}\n * @since 1.3.7\n */\n inputBoxWidth: void 0,\n /**\n * The date format in the input boxes when not selected for editing.\n * Defaults to `%b %e, %Y`.\n *\n * This is used to determine which type of input to show,\n * `datetime-local`, `date` or `time` and falling back to `text` when\n * the browser does not support the input type or the format contains\n * milliseconds.\n *\n * @sample {highstock} stock/rangeselector/input-type/\n * Input types\n * @sample {highstock} stock/rangeselector/input-format/\n * Milliseconds in the range selector\n *\n */\n inputDateFormat: '%b %e, %Y',\n /**\n * A custom callback function to parse values entered in the input boxes\n * and return a valid JavaScript time as milliseconds since 1970.\n * The first argument passed is a value to parse,\n * second is a boolean indicating use of the UTC time.\n *\n * This will only get called for inputs of type `text`. Since v8.2.3,\n * the input type is dynamically determined based on the granularity\n * of the `inputDateFormat` and the browser support.\n *\n * @sample {highstock} stock/rangeselector/input-format/\n * Milliseconds in the range selector\n *\n * @type {Highcharts.RangeSelectorParseCallbackFunction}\n * @since 1.3.3\n */\n inputDateParser: void 0,\n /**\n * The date format in the input boxes when they are selected for\n * editing. This must be a format that is recognized by JavaScript\n * Date.parse.\n *\n * This will only be used for inputs of type `text`. Since v8.2.3,\n * the input type is dynamically determined based on the granularity\n * of the `inputDateFormat` and the browser support.\n *\n * @sample {highstock} stock/rangeselector/input-format/\n * Milliseconds in the range selector\n *\n */\n inputEditDateFormat: '%Y-%m-%d',\n /**\n * Enable or disable the date input boxes.\n */\n inputEnabled: true,\n /**\n * Positioning for the input boxes. Allowed properties are `align`,\n * `x` and `y`.\n *\n * @since 1.2.4\n */\n inputPosition: {\n /**\n * The alignment of the input box. Allowed properties are `left`,\n * `center`, `right`.\n *\n * @sample {highstock} stock/rangeselector/input-button-position/\n * Alignment\n *\n * @type {Highcharts.AlignValue}\n * @since 6.0.0\n */\n align: 'right',\n /**\n * X offset of the input row.\n */\n x: 0,\n /**\n * Y offset of the input row.\n */\n y: 0\n },\n /**\n * The space in pixels between the labels and the date input boxes in\n * the range selector.\n *\n * @since 9.0.0\n */\n inputSpacing: 5,\n /**\n * The index of the button to appear pre-selected.\n *\n * @type {number}\n */\n selected: void 0,\n /**\n * Positioning for the button row.\n *\n * @since 1.2.4\n */\n buttonPosition: {\n /**\n * The alignment of the input box. Allowed properties are `left`,\n * `center`, `right`.\n *\n * @sample {highstock} stock/rangeselector/input-button-position/\n * Alignment\n *\n * @type {Highcharts.AlignValue}\n * @since 6.0.0\n */\n align: 'left',\n /**\n * X offset of the button row.\n */\n x: 0,\n /**\n * Y offset of the button row.\n */\n y: 0\n },\n /**\n * CSS for the HTML inputs in the range selector.\n *\n * In styled mode, the inputs are styled by the\n * `.highcharts-range-input text` rule in SVG mode, and\n * `input.highcharts-range-selector` when active.\n *\n * @sample {highstock} stock/rangeselector/styling/\n * Styling the buttons and inputs\n *\n * @type {Highcharts.CSSObject}\n * @apioption rangeSelector.inputStyle\n */\n inputStyle: {\n /** @ignore */\n color: \"#335cad\" /* Palette.highlightColor80 */,\n /** @ignore */\n cursor: 'pointer'\n },\n /**\n * CSS styles for the labels - the Zoom, From and To texts.\n *\n * In styled mode, the labels are styled by the\n * `.highcharts-range-label` class.\n *\n * @sample {highstock} stock/rangeselector/styling/\n * Styling the buttons and inputs\n *\n * @type {Highcharts.CSSObject}\n */\n labelStyle: {\n /** @ignore */\n color: \"#666666\" /* Palette.neutralColor60 */\n }\n};\n/* *\n *\n * Default Export\n *\n * */\nvar RangeSelectorDefaults = {\n lang: lang,\n rangeSelector: rangeSelector\n};\nexport default RangeSelectorDefaults;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport D from '../../Core/Defaults.js';\nvar defaultOptions = D.defaultOptions, setOptions = D.setOptions;\nimport RangeSelectorDefaults from './RangeSelectorDefaults.js';\nimport U from '../../Core/Utilities.js';\nvar addEvent = U.addEvent, defined = U.defined, extend = U.extend, find = U.find, isNumber = U.isNumber, merge = U.merge, pick = U.pick;\n/* *\n *\n * Constants\n *\n * */\nvar chartDestroyEvents = [];\nvar composedMembers = [];\n/* *\n *\n * Variables\n *\n * */\nvar RangeSelectorConstructor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Get the axis min value based on the range option and the current max. For\n * stock charts this is extended via the {@link RangeSelector} so that if the\n * selected range is a multiple of months or years, it is compensated for\n * various month lengths.\n *\n * @private\n * @function Highcharts.Axis#minFromRange\n * @return {number|undefined}\n * The new minimum value.\n */\nfunction axisMinFromRange() {\n var rangeOptions = this.range, type = rangeOptions.type, max = this.max, time = this.chart.time, \n // Get the true range from a start date\n getTrueRange = function (base, count) {\n var timeName = type === 'year' ?\n 'FullYear' : 'Month';\n var date = new time.Date(base);\n var basePeriod = time.get(timeName, date);\n time.set(timeName, date, basePeriod + count);\n if (basePeriod === time.get(timeName, date)) {\n time.set('Date', date, 0); // #6537\n }\n return date.getTime() - base;\n };\n var min, range;\n if (isNumber(rangeOptions)) {\n min = max - rangeOptions;\n range = rangeOptions;\n }\n else if (rangeOptions) {\n min = max + getTrueRange(max, -(rangeOptions.count || 1));\n // Let the fixedRange reflect initial settings (#5930)\n if (this.chart) {\n this.chart.fixedRange = max - min;\n }\n }\n var dataMin = pick(this.dataMin, Number.MIN_VALUE);\n if (!isNumber(min)) {\n min = dataMin;\n }\n if (min <= dataMin) {\n min = dataMin;\n if (typeof range === 'undefined') { // #4501\n range = getTrueRange(min, rangeOptions.count);\n }\n this.newMax = Math.min(min + range, pick(this.dataMax, Number.MAX_VALUE));\n }\n if (!isNumber(max)) {\n min = void 0;\n }\n else if (!isNumber(rangeOptions) &&\n rangeOptions &&\n rangeOptions._offsetMin) {\n min += rangeOptions._offsetMin;\n }\n return min;\n}\n/**\n * @private\n */\nfunction compose(AxisClass, ChartClass, RangeSelectorClass) {\n RangeSelectorConstructor = RangeSelectorClass;\n if (composedMembers.indexOf(AxisClass) === -1) {\n composedMembers.push(AxisClass);\n AxisClass.prototype.minFromRange = axisMinFromRange;\n }\n if (composedMembers.indexOf(ChartClass) === -1) {\n composedMembers.push(ChartClass);\n addEvent(ChartClass, 'afterGetContainer', onChartAfterGetContainer);\n addEvent(ChartClass, 'beforeRender', onChartBeforeRender);\n addEvent(ChartClass, 'destroy', onChartDestroy);\n addEvent(ChartClass, 'getMargins', onChartGetMargins);\n addEvent(ChartClass, 'render', onChartRender);\n addEvent(ChartClass, 'update', onChartUpdate);\n var chartProto = ChartClass.prototype;\n chartProto.callbacks.push(onChartCallback);\n }\n if (composedMembers.indexOf(setOptions) === -1) {\n extend(defaultOptions, { rangeSelector: RangeSelectorDefaults.rangeSelector });\n extend(defaultOptions.lang, RangeSelectorDefaults.lang);\n }\n}\n/**\n * Initialize rangeselector for stock charts\n * @private\n */\nfunction onChartAfterGetContainer() {\n if (this.options.rangeSelector &&\n this.options.rangeSelector.enabled) {\n this.rangeSelector = new RangeSelectorConstructor(this);\n }\n}\n/**\n * @private\n */\nfunction onChartBeforeRender() {\n var chart = this, axes = chart.axes, rangeSelector = chart.rangeSelector;\n if (rangeSelector) {\n if (isNumber(rangeSelector.deferredYTDClick)) {\n rangeSelector.clickButton(rangeSelector.deferredYTDClick);\n delete rangeSelector.deferredYTDClick;\n }\n axes.forEach(function (axis) {\n axis.updateNames();\n axis.setScale();\n });\n chart.getAxisMargins();\n rangeSelector.render();\n var verticalAlign = rangeSelector.options.verticalAlign;\n if (!rangeSelector.options.floating) {\n if (verticalAlign === 'bottom') {\n this.extraBottomMargin = true;\n }\n else if (verticalAlign !== 'middle') {\n this.extraTopMargin = true;\n }\n }\n }\n}\n/**\n * @private\n */\nfunction onChartCallback(chart) {\n var extremes, legend, alignTo, verticalAlign;\n var rangeSelector = chart.rangeSelector, redraw = function () {\n if (rangeSelector) {\n extremes = chart.xAxis[0].getExtremes();\n legend = chart.legend;\n verticalAlign = (rangeSelector &&\n rangeSelector.options.verticalAlign);\n if (isNumber(extremes.min)) {\n rangeSelector.render(extremes.min, extremes.max);\n }\n // Re-align the legend so that it's below the rangeselector\n if (legend.display &&\n verticalAlign === 'top' &&\n verticalAlign === legend.options.verticalAlign) {\n // Create a new alignment box for the legend.\n alignTo = merge(chart.spacingBox);\n if (legend.options.layout === 'vertical') {\n alignTo.y = chart.plotTop;\n }\n else {\n alignTo.y += rangeSelector.getHeight();\n }\n legend.group.placed = false; // Don't animate the alignment.\n legend.align(alignTo);\n }\n }\n };\n if (rangeSelector) {\n var events = find(chartDestroyEvents, function (e) { return e[0] === chart; });\n if (!events) {\n chartDestroyEvents.push([chart, [\n // redraw the scroller on setExtremes\n addEvent(chart.xAxis[0], 'afterSetExtremes', function (e) {\n if (rangeSelector) {\n rangeSelector.render(e.min, e.max);\n }\n }),\n // redraw the scroller chart resize\n addEvent(chart, 'redraw', redraw)\n ]]);\n }\n // do it now\n redraw();\n }\n}\n/**\n * Remove resize/afterSetExtremes at chart destroy.\n * @private\n */\nfunction onChartDestroy() {\n for (var i = 0, iEnd = chartDestroyEvents.length; i < iEnd; ++i) {\n var events = chartDestroyEvents[i];\n if (events[0] === this) {\n events[1].forEach(function (unbind) { return unbind(); });\n chartDestroyEvents.splice(i, 1);\n return;\n }\n }\n}\nfunction onChartGetMargins() {\n var rangeSelector = this.rangeSelector;\n if (rangeSelector) {\n var rangeSelectorHeight = rangeSelector.getHeight();\n if (this.extraTopMargin) {\n this.plotTop += rangeSelectorHeight;\n }\n if (this.extraBottomMargin) {\n this.marginBottom += rangeSelectorHeight;\n }\n }\n}\n/**\n * @private\n */\nfunction onChartRender() {\n var chart = this, rangeSelector = chart.rangeSelector;\n if (rangeSelector && !rangeSelector.options.floating) {\n rangeSelector.render();\n var verticalAlign = rangeSelector.options.verticalAlign;\n if (verticalAlign === 'bottom') {\n this.extraBottomMargin = true;\n }\n else if (verticalAlign !== 'middle') {\n this.extraTopMargin = true;\n }\n }\n}\n/**\n * @private\n */\nfunction onChartUpdate(e) {\n var chart = this, options = e.options, optionsRangeSelector = options.rangeSelector, extraBottomMarginWas = this.extraBottomMargin, extraTopMarginWas = this.extraTopMargin;\n var rangeSelector = chart.rangeSelector;\n if (optionsRangeSelector &&\n optionsRangeSelector.enabled &&\n !defined(rangeSelector) &&\n this.options.rangeSelector) {\n this.options.rangeSelector.enabled = true;\n this.rangeSelector = rangeSelector = new RangeSelectorConstructor(this);\n }\n this.extraBottomMargin = false;\n this.extraTopMargin = false;\n if (rangeSelector) {\n onChartCallback(this);\n var verticalAlign = (optionsRangeSelector &&\n optionsRangeSelector.verticalAlign) || (rangeSelector.options && rangeSelector.options.verticalAlign);\n if (!rangeSelector.options.floating) {\n if (verticalAlign === 'bottom') {\n this.extraBottomMargin = true;\n }\n else if (verticalAlign !== 'middle') {\n this.extraTopMargin = true;\n }\n }\n if (this.extraBottomMargin !== extraBottomMarginWas ||\n this.extraTopMargin !== extraTopMarginWas) {\n this.isDirtyBox = true;\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nvar RangeSelectorComposition = {\n compose: compose\n};\nexport default RangeSelectorComposition;\n","/* *\n *\n * (c) 2010-2021 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport Axis from '../../Core/Axis/Axis.js';\nimport D from '../../Core/Defaults.js';\nvar defaultOptions = D.defaultOptions;\nimport H from '../../Core/Globals.js';\nimport RangeSelectorComposition from './RangeSelectorComposition.js';\nimport SVGElement from '../../Core/Renderer/SVG/SVGElement.js';\nimport U from '../../Core/Utilities.js';\nvar addEvent = U.addEvent, createElement = U.createElement, css = U.css, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, discardElement = U.discardElement, extend = U.extend, fireEvent = U.fireEvent, isNumber = U.isNumber, merge = U.merge, objectEach = U.objectEach, pad = U.pad, pick = U.pick, pInt = U.pInt, splat = U.splat;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Get the preferred input type based on a date format string.\n *\n * @private\n * @function preferredInputType\n */\nfunction preferredInputType(format) {\n var ms = format.indexOf('%L') !== -1;\n if (ms) {\n return 'text';\n }\n var date = ['a', 'A', 'd', 'e', 'w', 'b', 'B', 'm', 'o', 'y', 'Y']\n .some(function (char) { return format.indexOf('%' + char) !== -1; });\n var time = ['H', 'k', 'I', 'l', 'M', 'S']\n .some(function (char) { return format.indexOf('%' + char) !== -1; });\n if (date && time) {\n return 'datetime-local';\n }\n if (date) {\n return 'date';\n }\n if (time) {\n return 'time';\n }\n return 'text';\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The range selector.\n *\n * @private\n * @class\n * @name Highcharts.RangeSelector\n * @param {Highcharts.Chart} chart\n */\nvar RangeSelector = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function RangeSelector(chart) {\n /* *\n *\n * Properties\n *\n * */\n this.buttons = void 0;\n this.buttonOptions = RangeSelector.prototype.defaultButtons;\n this.initialButtonGroupWidth = 0;\n this.options = void 0;\n this.chart = chart;\n this.init(chart);\n }\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * @private\n */\n RangeSelector.compose = function (AxisClass, ChartClass) {\n RangeSelectorComposition.compose(AxisClass, ChartClass, RangeSelector);\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * The method to run when one of the buttons in the range selectors is\n * clicked\n *\n * @private\n * @function Highcharts.RangeSelector#clickButton\n * @param {number} i\n * The index of the button\n * @param {boolean} [redraw]\n */\n RangeSelector.prototype.clickButton = function (i, redraw) {\n var rangeSelector = this, chart = rangeSelector.chart, rangeOptions = rangeSelector.buttonOptions[i], baseAxis = chart.xAxis[0], unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || baseAxis || {}, type = rangeOptions.type, dataGrouping = rangeOptions.dataGrouping;\n var dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, newMin, newMax = baseAxis && Math.round(Math.min(baseAxis.max, pick(dataMax, baseAxis.max))), // #1568\n baseXAxisOptions, range = rangeOptions._range, rangeMin, minSetting, rangeSetting, ctx, ytdExtremes, addOffsetMin = true;\n // chart has no data, base series is removed\n if (dataMin === null || dataMax === null) {\n return;\n }\n // Set the fixed range before range is altered\n chart.fixedRange = range;\n rangeSelector.setSelected(i);\n // Apply dataGrouping associated to button\n if (dataGrouping) {\n this.forcedDataGrouping = true;\n Axis.prototype.setDataGrouping.call(baseAxis || { chart: this.chart }, dataGrouping, false);\n this.frozenStates = rangeOptions.preserveDataGrouping;\n }\n // Apply range\n if (type === 'month' || type === 'year') {\n if (!baseAxis) {\n // This is set to the user options and picked up later when the\n // axis is instantiated so that we know the min and max.\n range = rangeOptions;\n }\n else {\n ctx = {\n range: rangeOptions,\n max: newMax,\n chart: chart,\n dataMin: dataMin,\n dataMax: dataMax\n };\n newMin = baseAxis.minFromRange.call(ctx);\n if (isNumber(ctx.newMax)) {\n newMax = ctx.newMax;\n }\n // #15799: offsetMin is added in minFromRange so that it works\n // with pre-selected buttons as well\n addOffsetMin = false;\n }\n // Fixed times like minutes, hours, days\n }\n else if (range) {\n newMin = Math.max(newMax - range, dataMin);\n newMax = Math.min(newMin + range, dataMax);\n addOffsetMin = false;\n }\n else if (type === 'ytd') {\n // On user clicks on the buttons, or a delayed action running from\n // the beforeRender event (below), the baseAxis is defined.\n if (baseAxis) {\n // When \"ytd\" is the pre-selected button for the initial view,\n // its calculation is delayed and rerun in the beforeRender\n // event (below). When the series are initialized, but before\n // the chart is rendered, we have access to the xData array\n // (#942).\n if (typeof dataMax === 'undefined' ||\n typeof dataMin === 'undefined') {\n dataMin = Number.MAX_VALUE;\n dataMax = Number.MIN_VALUE;\n chart.series.forEach(function (series) {\n // reassign it to the last item\n var xData = series.xData;\n if (xData) {\n dataMin = Math.min(xData[0], dataMin);\n dataMax = Math.max(xData[xData.length - 1], dataMax);\n }\n });\n redraw = false;\n }\n ytdExtremes = rangeSelector.getYTDExtremes(dataMax, dataMin, chart.time.useUTC);\n newMin = rangeMin = ytdExtremes.min;\n newMax = ytdExtremes.max;\n // \"ytd\" is pre-selected. We don't yet have access to processed\n // point and extremes data (things like pointStart and pointInterval\n // are missing), so we delay the process (#942)\n }\n else {\n rangeSelector.deferredYTDClick = i;\n return;\n }\n }\n else if (type === 'all' && baseAxis) {\n // If the navigator exist and the axis range is declared reset that\n // range and from now on only use the range set by a user, #14742.\n if (chart.navigator && chart.navigator.baseSeries[0]) {\n chart.navigator.baseSeries[0].xAxis.options.range = void 0;\n }\n newMin = dataMin;\n newMax = dataMax;\n }\n if (addOffsetMin && rangeOptions._offsetMin && defined(newMin)) {\n newMin += rangeOptions._offsetMin;\n }\n if (rangeOptions._offsetMax && defined(newMax)) {\n newMax += rangeOptions._offsetMax;\n }\n if (this.dropdown) {\n this.dropdown.selectedIndex = i + 1;\n }\n // Update the chart\n if (!baseAxis) {\n // Axis not yet instanciated. Temporarily set min and range\n // options and remove them on chart load (#4317).\n baseXAxisOptions = splat(chart.options.xAxis)[0];\n rangeSetting = baseXAxisOptions.range;\n baseXAxisOptions.range = range;\n minSetting = baseXAxisOptions.min;\n baseXAxisOptions.min = rangeMin;\n addEvent(chart, 'load', function resetMinAndRange() {\n baseXAxisOptions.range = rangeSetting;\n baseXAxisOptions.min = minSetting;\n });\n }\n else {\n // Existing axis object. Set extremes after render time.\n baseAxis.setExtremes(newMin, newMax, pick(redraw, true), void 0, // auto animation\n {\n trigger: 'rangeSelectorButton',\n rangeSelectorButton: rangeOptions\n });\n }\n fireEvent(this, 'afterBtnClick');\n };\n /**\n * Set the selected option. This method only sets the internal flag, it\n * doesn't update the buttons or the actual zoomed range.\n *\n * @private\n * @function Highcharts.RangeSelector#setSelected\n * @param {number} [selected]\n */\n RangeSelector.prototype.setSelected = function (selected) {\n this.selected = this.options.selected = selected;\n };\n /**\n * Initialize the range selector\n *\n * @private\n * @function Highcharts.RangeSelector#init\n * @param {Highcharts.Chart} chart\n */\n RangeSelector.prototype.init = function (chart) {\n var rangeSelector = this, options = chart.options.rangeSelector, buttonOptions = (options.buttons || rangeSelector.defaultButtons.slice()), selectedOption = options.selected, blurInputs = function () {\n var minInput = rangeSelector.minInput, maxInput = rangeSelector.maxInput;\n // #3274 in some case blur is not defined\n if (minInput && (minInput.blur)) {\n fireEvent(minInput, 'blur');\n }\n if (maxInput && (maxInput.blur)) {\n fireEvent(maxInput, 'blur');\n }\n };\n rangeSelector.chart = chart;\n rangeSelector.options = options;\n rangeSelector.buttons = [];\n rangeSelector.buttonOptions = buttonOptions;\n this.eventsToUnbind = [];\n this.eventsToUnbind.push(addEvent(chart.container, 'mousedown', blurInputs));\n this.eventsToUnbind.push(addEvent(chart, 'resize', blurInputs));\n // Extend the buttonOptions with actual range\n buttonOptions.forEach(rangeSelector.computeButtonRange);\n // zoomed range based on a pre-selected button index\n if (typeof selectedOption !== 'undefined' &&\n buttonOptions[selectedOption]) {\n this.clickButton(selectedOption, false);\n }\n this.eventsToUnbind.push(addEvent(chart, 'load', function () {\n // If a data grouping is applied to the current button, release it\n // when extremes change\n if (chart.xAxis && chart.xAxis[0]) {\n addEvent(chart.xAxis[0], 'setExtremes', function (e) {\n if (this.max - this.min !==\n chart.fixedRange &&\n e.trigger !== 'rangeSelectorButton' &&\n e.trigger !== 'updatedData' &&\n rangeSelector.forcedDataGrouping &&\n !rangeSelector.frozenStates) {\n this.setDataGrouping(false, false);\n }\n });\n }\n }));\n };\n /**\n * Dynamically update the range selector buttons after a new range has been\n * set\n *\n * @private\n * @function Highcharts.RangeSelector#updateButtonStates\n */\n RangeSelector.prototype.updateButtonStates = function () {\n var rangeSelector = this, chart = this.chart, dropdown = this.dropdown, baseAxis = chart.xAxis[0], actualRange = Math.round(baseAxis.max - baseAxis.min), hasNoData = !baseAxis.hasVisibleSeries, day = 24 * 36e5, // A single day in milliseconds\n unionExtremes = (chart.scroller &&\n chart.scroller.getUnionExtremes()) || baseAxis, dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, ytdExtremes = rangeSelector.getYTDExtremes(dataMax, dataMin, chart.time.useUTC), ytdMin = ytdExtremes.min, ytdMax = ytdExtremes.max, selected = rangeSelector.selected, allButtonsEnabled = rangeSelector.options.allButtonsEnabled, buttons = rangeSelector.buttons;\n var selectedExists = isNumber(selected);\n rangeSelector.buttonOptions.forEach(function (rangeOptions, i) {\n var range = rangeOptions._range, type = rangeOptions.type, count = rangeOptions.count || 1, button = buttons[i], offsetRange = rangeOptions._offsetMax -\n rangeOptions._offsetMin, isSelected = i === selected, \n // Disable buttons where the range exceeds what is allowed in\n // the current view\n isTooGreatRange = range >\n dataMax - dataMin, \n // Disable buttons where the range is smaller than the minimum\n // range\n isTooSmallRange = range < baseAxis.minRange;\n var state = 0, \n // Do not select the YTD button if not explicitly told so\n isYTDButNotSelected = false, \n // Disable the All button if we're already showing all\n isAllButAlreadyShowingAll = false, isSameRange = range === actualRange;\n // Months and years have a variable range so we check the extremes\n if ((type === 'month' || type === 'year') &&\n (actualRange + 36e5 >=\n { month: 28, year: 365 }[type] * day * count - offsetRange) &&\n (actualRange - 36e5 <=\n { month: 31, year: 366 }[type] * day * count + offsetRange)) {\n isSameRange = true;\n }\n else if (type === 'ytd') {\n isSameRange = (ytdMax - ytdMin + offsetRange) === actualRange;\n isYTDButNotSelected = !isSelected;\n }\n else if (type === 'all') {\n isSameRange = (baseAxis.max - baseAxis.min >=\n dataMax - dataMin);\n isAllButAlreadyShowingAll = (!isSelected &&\n selectedExists &&\n isSameRange);\n }\n // The new zoom area happens to match the range for a button - mark\n // it selected. This happens when scrolling across an ordinal gap.\n // It can be seen in the intraday demos when selecting 1h and scroll\n // across the night gap.\n var disable = (!allButtonsEnabled &&\n (isTooGreatRange ||\n isTooSmallRange ||\n isAllButAlreadyShowingAll ||\n hasNoData));\n var select = ((isSelected && isSameRange) ||\n (isSameRange && !selectedExists && !isYTDButNotSelected) ||\n (isSelected && rangeSelector.frozenStates));\n if (disable) {\n state = 3;\n }\n else if (select) {\n selectedExists = true; // Only one button can be selected\n state = 2;\n }\n // If state has changed, update the button\n if (button.state !== state) {\n button.setState(state);\n if (dropdown) {\n dropdown.options[i + 1].disabled = disable;\n if (state === 2) {\n dropdown.selectedIndex = i + 1;\n }\n }\n // Reset (#9209)\n if (state === 0 && selected === i) {\n rangeSelector.setSelected();\n }\n }\n });\n };\n /**\n * Compute and cache the range for an individual button\n *\n * @private\n * @function Highcharts.RangeSelector#computeButtonRange\n * @param {Highcharts.RangeSelectorButtonsOptions} rangeOptions\n */\n RangeSelector.prototype.computeButtonRange = function (rangeOptions) {\n var type = rangeOptions.type, count = rangeOptions.count || 1, \n // these time intervals have a fixed number of milliseconds, as\n // opposed to month, ytd and year\n fixedTimes = {\n millisecond: 1,\n second: 1000,\n minute: 60 * 1000,\n hour: 3600 * 1000,\n day: 24 * 3600 * 1000,\n week: 7 * 24 * 3600 * 1000\n };\n // Store the range on the button object\n if (fixedTimes[type]) {\n rangeOptions._range = fixedTimes[type] * count;\n }\n else if (type === 'month' || type === 'year') {\n rangeOptions._range = {\n month: 30,\n year: 365\n }[type] * 24 * 36e5 * count;\n }\n rangeOptions._offsetMin = pick(rangeOptions.offsetMin, 0);\n rangeOptions._offsetMax = pick(rangeOptions.offsetMax, 0);\n rangeOptions._range +=\n rangeOptions._offsetMax - rangeOptions._offsetMin;\n };\n /**\n * Get the unix timestamp of a HTML input for the dates\n *\n * @private\n * @function Highcharts.RangeSelector#getInputValue\n */\n RangeSelector.prototype.getInputValue = function (name) {\n var input = name === 'min' ? this.minInput : this.maxInput;\n var options = this.chart.options\n .rangeSelector;\n var time = this.chart.time;\n if (input) {\n return ((input.type === 'text' && options.inputDateParser) ||\n this.defaultInputDateParser)(input.value, time.useUTC, time);\n }\n return 0;\n };\n /**\n * Set the internal and displayed value of a HTML input for the dates\n *\n * @private\n * @function Highcharts.RangeSelector#setInputValue\n */\n RangeSelector.prototype.setInputValue = function (name, inputTime) {\n var options = this.options, time = this.chart.time, input = name === 'min' ? this.minInput : this.maxInput, dateBox = name === 'min' ? this.minDateBox : this.maxDateBox;\n if (input) {\n var hcTimeAttr = input.getAttribute('data-hc-time');\n var updatedTime = defined(hcTimeAttr) ? Number(hcTimeAttr) : void 0;\n if (defined(inputTime)) {\n var previousTime = updatedTime;\n if (defined(previousTime)) {\n input.setAttribute('data-hc-time-previous', previousTime);\n }\n input.setAttribute('data-hc-time', inputTime);\n updatedTime = inputTime;\n }\n input.value = time.dateFormat((this.inputTypeFormats[input.type] ||\n options.inputEditDateFormat), updatedTime);\n if (dateBox) {\n dateBox.attr({\n text: time.dateFormat(options.inputDateFormat, updatedTime)\n });\n }\n }\n };\n /**\n * Set the min and max value of a HTML input for the dates\n *\n * @private\n * @function Highcharts.RangeSelector#setInputExtremes\n */\n RangeSelector.prototype.setInputExtremes = function (name, min, max) {\n var input = name === 'min' ? this.minInput : this.maxInput;\n if (input) {\n var format = this.inputTypeFormats[input.type];\n var time = this.chart.time;\n if (format) {\n var newMin = time.dateFormat(format, min);\n if (input.min !== newMin) {\n input.min = newMin;\n }\n var newMax = time.dateFormat(format, max);\n if (input.max !== newMax) {\n input.max = newMax;\n }\n }\n }\n };\n /**\n * @private\n * @function Highcharts.RangeSelector#showInput\n * @param {string} name\n */\n RangeSelector.prototype.showInput = function (name) {\n var dateBox = name === 'min' ? this.minDateBox : this.maxDateBox;\n var input = name === 'min' ? this.minInput : this.maxInput;\n if (input && dateBox && this.inputGroup) {\n var isTextInput = input.type === 'text';\n var _a = this.inputGroup, translateX = _a.translateX, translateY = _a.translateY;\n var inputBoxWidth = this.options.inputBoxWidth;\n css(input, {\n width: isTextInput ?\n ((dateBox.width + (inputBoxWidth ? -2 : 20)) + 'px') :\n 'auto',\n height: isTextInput ? ((dateBox.height - 2) + 'px') : 'auto',\n border: '2px solid silver'\n });\n if (isTextInput && inputBoxWidth) {\n css(input, {\n left: (translateX + dateBox.x) + 'px',\n top: translateY + 'px'\n });\n // Inputs of types date, time or datetime-local should be centered\n // on top of the dateBox\n }\n else {\n css(input, {\n left: Math.min(Math.round(dateBox.x +\n translateX -\n (input.offsetWidth - dateBox.width) / 2), this.chart.chartWidth - input.offsetWidth) + 'px',\n top: (translateY - (input.offsetHeight - dateBox.height) / 2) + 'px'\n });\n }\n }\n };\n /**\n * @private\n * @function Highcharts.RangeSelector#hideInput\n * @param {string} name\n */\n RangeSelector.prototype.hideInput = function (name) {\n var input = name === 'min' ? this.minInput : this.maxInput;\n if (input) {\n css(input, {\n top: '-9999em',\n border: 0,\n width: '1px',\n height: '1px'\n });\n }\n };\n /**\n * @private\n * @function Highcharts.RangeSelector#defaultInputDateParser\n */\n RangeSelector.prototype.defaultInputDateParser = function (inputDate, useUTC, time) {\n var hasTimezone = function (str) {\n return str.length > 6 &&\n (str.lastIndexOf('-') === str.length - 6 ||\n str.lastIndexOf('+') === str.length - 6);\n };\n var input = inputDate.split('/').join('-').split(' ').join('T');\n if (input.indexOf('T') === -1) {\n input += 'T00:00';\n }\n if (useUTC) {\n input += 'Z';\n }\n else if (H.isSafari && !hasTimezone(input)) {\n var offset = new Date(input).getTimezoneOffset() / 60;\n input += offset <= 0 ? \"+\".concat(pad(-offset), \":00\") : \"-\".concat(pad(offset), \":00\");\n }\n var date = Date.parse(input);\n // If the value isn't parsed directly to a value by the\n // browser's Date.parse method, like YYYY-MM-DD in IE8, try\n // parsing it a different way\n if (!isNumber(date)) {\n var parts = inputDate.split('-');\n date = Date.UTC(pInt(parts[0]), pInt(parts[1]) - 1, pInt(parts[2]));\n }\n if (time && useUTC && isNumber(date)) {\n date += time.getTimezoneOffset(date);\n }\n return date;\n };\n /**\n * Draw either the 'from' or the 'to' HTML input box of the range selector\n *\n * @private\n * @function Highcharts.RangeSelector#drawInput\n */\n RangeSelector.prototype.drawInput = function (name) {\n var _a = this, chart = _a.chart, div = _a.div, inputGroup = _a.inputGroup;\n var rangeSelector = this, chartStyle = chart.renderer.style || {}, renderer = chart.renderer, options = chart.options.rangeSelector, lang = defaultOptions.lang, isMin = name === 'min';\n /**\n * @private\n */\n function updateExtremes() {\n var maxInput = rangeSelector.maxInput, minInput = rangeSelector.minInput, chartAxis = chart.xAxis[0], dataAxis = chart.scroller && chart.scroller.xAxis ?\n chart.scroller.xAxis :\n chartAxis, dataMin = dataAxis.dataMin, dataMax = dataAxis.dataMax;\n var value = rangeSelector.getInputValue(name);\n if (value !== Number(input.getAttribute('data-hc-time-previous')) &&\n isNumber(value)) {\n input.setAttribute('data-hc-time-previous', value);\n // Validate the extremes. If it goes beyound the data min or\n // max, use the actual data extreme (#2438).\n if (isMin && maxInput && isNumber(dataMin)) {\n if (value > Number(maxInput.getAttribute('data-hc-time'))) {\n value = void 0;\n }\n else if (value < dataMin) {\n value = dataMin;\n }\n }\n else if (minInput && isNumber(dataMax)) {\n if (value < Number(minInput.getAttribute('data-hc-time'))) {\n value = void 0;\n }\n else if (value > dataMax) {\n value = dataMax;\n }\n }\n // Set the extremes\n if (typeof value !== 'undefined') { // @todo typof undefined\n chartAxis.setExtremes(isMin ? value : chartAxis.min, isMin ? chartAxis.max : value, void 0, void 0, { trigger: 'rangeSelectorInput' });\n }\n }\n }\n // Create the text label\n var text = lang[isMin ? 'rangeSelectorFrom' : 'rangeSelectorTo'] || '';\n var label = renderer\n .label(text, 0)\n .addClass('highcharts-range-label')\n .attr({\n padding: text ? 2 : 0,\n height: text ? options.inputBoxHeight : 0\n })\n .add(inputGroup);\n // Create an SVG label that shows updated date ranges and and records\n // click events that bring in the HTML input.\n var dateBox = renderer\n .label('', 0)\n .addClass('highcharts-range-input')\n .attr({\n padding: 2,\n width: options.inputBoxWidth,\n height: options.inputBoxHeight,\n 'text-align': 'center'\n })\n .on('click', function () {\n // If it is already focused, the onfocus event doesn't fire\n // (#3713)\n rangeSelector.showInput(name);\n rangeSelector[name + 'Input'].focus();\n });\n if (!chart.styledMode) {\n dateBox.attr({\n stroke: options.inputBoxBorderColor,\n 'stroke-width': 1\n });\n }\n dateBox.add(inputGroup);\n // Create the HTML input element. This is rendered as 1x1 pixel then set\n // to the right size when focused.\n var input = createElement('input', {\n name: name,\n className: 'highcharts-range-selector'\n }, void 0, div);\n // #14788: Setting input.type to an unsupported type throws in IE, so\n // we need to use setAttribute instead\n input.setAttribute('type', preferredInputType(options.inputDateFormat || '%b %e, %Y'));\n if (!chart.styledMode) {\n // Styles\n label.css(merge(chartStyle, options.labelStyle));\n dateBox.css(merge({\n color: \"#333333\" /* Palette.neutralColor80 */\n }, chartStyle, options.inputStyle));\n css(input, extend({\n position: 'absolute',\n border: 0,\n boxShadow: '0 0 15px rgba(0,0,0,0.3)',\n width: '1px',\n height: '1px',\n padding: 0,\n textAlign: 'center',\n fontSize: chartStyle.fontSize,\n fontFamily: chartStyle.fontFamily,\n top: '-9999em' // #4798\n }, options.inputStyle));\n }\n // Blow up the input box\n input.onfocus = function () {\n rangeSelector.showInput(name);\n };\n // Hide away the input box\n input.onblur = function () {\n // update extermes only when inputs are active\n if (input === H.doc.activeElement) { // Only when focused\n // Update also when no `change` event is triggered, like when\n // clicking inside the SVG (#4710)\n updateExtremes();\n }\n // #10404 - move hide and blur outside focus\n rangeSelector.hideInput(name);\n rangeSelector.setInputValue(name);\n input.blur(); // #4606\n };\n var keyDown = false;\n // handle changes in the input boxes\n input.onchange = function () {\n // Update extremes and blur input when clicking date input calendar\n if (!keyDown) {\n updateExtremes();\n rangeSelector.hideInput(name);\n input.blur();\n }\n };\n input.onkeypress = function (event) {\n // IE does not fire onchange on enter\n if (event.keyCode === 13) {\n updateExtremes();\n }\n };\n input.onkeydown = function (event) {\n keyDown = true;\n // Arrow keys\n if (event.keyCode === 38 || event.keyCode === 40) {\n updateExtremes();\n }\n };\n input.onkeyup = function () {\n keyDown = false;\n };\n return { dateBox: dateBox, input: input, label: label };\n };\n /**\n * Get the position of the range selector buttons and inputs. This can be\n * overridden from outside for custom positioning.\n *\n * @private\n * @function Highcharts.RangeSelector#getPosition\n */\n RangeSelector.prototype.getPosition = function () {\n var chart = this.chart, options = chart.options.rangeSelector, top = options.verticalAlign === 'top' ?\n chart.plotTop - chart.axisOffset[0] :\n 0; // set offset only for varticalAlign top\n return {\n buttonTop: top + options.buttonPosition.y,\n inputTop: top + options.inputPosition.y - 10\n };\n };\n /**\n * Get the extremes of YTD. Will choose dataMax if its value is lower than\n * the current timestamp. Will choose dataMin if its value is higher than\n * the timestamp for the start of current year.\n *\n * @private\n * @function Highcharts.RangeSelector#getYTDExtremes\n * @return {*}\n * Returns min and max for the YTD\n */\n RangeSelector.prototype.getYTDExtremes = function (dataMax, dataMin, useUTC) {\n var time = this.chart.time, now = new time.Date(dataMax), year = time.get('FullYear', now), startOfYear = useUTC ?\n time.Date.UTC(year, 0, 1) : // eslint-disable-line new-cap\n +new time.Date(year, 0, 1), min = Math.max(dataMin, startOfYear), ts = now.getTime();\n return {\n max: Math.min(dataMax || ts, ts),\n min: min\n };\n };\n /**\n * Render the range selector including the buttons and the inputs. The first\n * time render is called, the elements are created and positioned. On\n * subsequent calls, they are moved and updated.\n *\n * @private\n * @function Highcharts.RangeSelector#render\n * @param {number} [min]\n * X axis minimum\n * @param {number} [max]\n * X axis maximum\n */\n RangeSelector.prototype.render = function (min, max) {\n var chart = this.chart, renderer = chart.renderer, container = chart.container, chartOptions = chart.options, options = chartOptions.rangeSelector, \n // Place inputs above the container\n inputsZIndex = pick(chartOptions.chart.style &&\n chartOptions.chart.style.zIndex, 0) + 1, inputEnabled = options.inputEnabled, rendered = this.rendered;\n if (options.enabled === false) {\n return;\n }\n // create the elements\n if (!rendered) {\n this.group = renderer.g('range-selector-group')\n .attr({\n zIndex: 7\n })\n .add();\n this.div = createElement('div', void 0, {\n position: 'relative',\n height: 0,\n zIndex: inputsZIndex\n });\n if (this.buttonOptions.length) {\n this.renderButtons();\n }\n // First create a wrapper outside the container in order to make\n // the inputs work and make export correct\n if (container.parentNode) {\n container.parentNode.insertBefore(this.div, container);\n }\n if (inputEnabled) {\n // Create the group to keep the inputs\n this.inputGroup = renderer.g('input-group').add(this.group);\n var minElems = this.drawInput('min');\n this.minDateBox = minElems.dateBox;\n this.minLabel = minElems.label;\n this.minInput = minElems.input;\n var maxElems = this.drawInput('max');\n this.maxDateBox = maxElems.dateBox;\n this.maxLabel = maxElems.label;\n this.maxInput = maxElems.input;\n }\n }\n if (inputEnabled) {\n // Set or reset the input values\n this.setInputValue('min', min);\n this.setInputValue('max', max);\n var unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || chart.xAxis[0] || {};\n if (defined(unionExtremes.dataMin) &&\n defined(unionExtremes.dataMax)) {\n var minRange = chart.xAxis[0].minRange || 0;\n this.setInputExtremes('min', unionExtremes.dataMin, Math.min(unionExtremes.dataMax, this.getInputValue('max')) - minRange);\n this.setInputExtremes('max', Math.max(unionExtremes.dataMin, this.getInputValue('min')) + minRange, unionExtremes.dataMax);\n }\n // Reflow\n if (this.inputGroup) {\n var x_1 = 0;\n [\n this.minLabel,\n this.minDateBox,\n this.maxLabel,\n this.maxDateBox\n ].forEach(function (label) {\n if (label) {\n var width = label.getBBox().width;\n if (width) {\n label.attr({ x: x_1 });\n x_1 += width + options.inputSpacing;\n }\n }\n });\n }\n }\n this.alignElements();\n this.rendered = true;\n };\n /**\n * Render the range buttons. This only runs the first time, later the\n * positioning is laid out in alignElements.\n *\n * @private\n * @function Highcharts.RangeSelector#renderButtons\n */\n RangeSelector.prototype.renderButtons = function () {\n var _this = this;\n var _a = this, buttons = _a.buttons, chart = _a.chart, options = _a.options;\n var lang = defaultOptions.lang;\n var renderer = chart.renderer;\n var buttonTheme = merge(options.buttonTheme);\n var states = buttonTheme && buttonTheme.states;\n // Prevent the button from resetting the width when the button state\n // changes since we need more control over the width when collapsing\n // the buttons\n var width = buttonTheme.width || 28;\n delete buttonTheme.width;\n delete buttonTheme.states;\n this.buttonGroup = renderer.g('range-selector-buttons').add(this.group);\n var dropdown = this.dropdown = createElement('select', void 0, {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n border: 0,\n top: '-9999em',\n cursor: 'pointer',\n opacity: 0.0001\n }, this.div);\n // Prevent page zoom on iPhone\n addEvent(dropdown, 'touchstart', function () {\n dropdown.style.fontSize = '16px';\n });\n // Forward events from select to button\n [\n [H.isMS ? 'mouseover' : 'mouseenter'],\n [H.isMS ? 'mouseout' : 'mouseleave'],\n ['change', 'click']\n ].forEach(function (_a) {\n var from = _a[0], to = _a[1];\n addEvent(dropdown, from, function () {\n var button = buttons[_this.currentButtonIndex()];\n if (button) {\n fireEvent(button.element, to || from);\n }\n });\n });\n this.zoomText = renderer\n .label((lang && lang.rangeSelectorZoom) || '', 0)\n .attr({\n padding: options.buttonTheme.padding,\n height: options.buttonTheme.height,\n paddingLeft: 0,\n paddingRight: 0\n })\n .add(this.buttonGroup);\n if (!this.chart.styledMode) {\n this.zoomText.css(options.labelStyle);\n buttonTheme['stroke-width'] = pick(buttonTheme['stroke-width'], 0);\n }\n createElement('option', {\n textContent: this.zoomText.textStr,\n disabled: true\n }, void 0, dropdown);\n this.buttonOptions.forEach(function (rangeOptions, i) {\n createElement('option', {\n textContent: rangeOptions.title || rangeOptions.text\n }, void 0, dropdown);\n buttons[i] = renderer\n .button(rangeOptions.text, 0, 0, function (e) {\n // extract events from button object and call\n var buttonEvents = (rangeOptions.events && rangeOptions.events.click);\n var callDefaultEvent;\n if (buttonEvents) {\n callDefaultEvent =\n buttonEvents.call(rangeOptions, e);\n }\n if (callDefaultEvent !== false) {\n _this.clickButton(i);\n }\n _this.isActive = true;\n }, buttonTheme, states && states.hover, states && states.select, states && states.disabled)\n .attr({\n 'text-align': 'center',\n width: width\n })\n .add(_this.buttonGroup);\n if (rangeOptions.title) {\n buttons[i].attr('title', rangeOptions.title);\n }\n });\n };\n /**\n * Align the elements horizontally and vertically.\n *\n * @private\n * @function Highcharts.RangeSelector#alignElements\n */\n RangeSelector.prototype.alignElements = function () {\n var _this = this;\n var _a = this, buttonGroup = _a.buttonGroup, buttons = _a.buttons, chart = _a.chart, group = _a.group, inputGroup = _a.inputGroup, options = _a.options, zoomText = _a.zoomText;\n var chartOptions = chart.options;\n var navButtonOptions = (chartOptions.exporting &&\n chartOptions.exporting.enabled !== false &&\n chartOptions.navigation &&\n chartOptions.navigation.buttonOptions);\n var buttonPosition = options.buttonPosition, inputPosition = options.inputPosition, verticalAlign = options.verticalAlign;\n // Get the X offset required to avoid overlapping with the exporting\n // button. This is is used both by the buttonGroup and the inputGroup.\n var getXOffsetForExportButton = function (group, position) {\n if (navButtonOptions &&\n _this.titleCollision(chart) &&\n verticalAlign === 'top' &&\n position.align === 'right' && ((position.y -\n group.getBBox().height - 12) <\n ((navButtonOptions.y || 0) +\n (navButtonOptions.height || 0) +\n chart.spacing[0]))) {\n return -40;\n }\n return 0;\n };\n var plotLeft = chart.plotLeft;\n if (group && buttonPosition && inputPosition) {\n var translateX = buttonPosition.x - chart.spacing[3];\n if (buttonGroup) {\n this.positionButtons();\n if (!this.initialButtonGroupWidth) {\n var width_1 = 0;\n if (zoomText) {\n width_1 += zoomText.getBBox().width + 5;\n }\n buttons.forEach(function (button, i) {\n width_1 += button.width;\n if (i !== buttons.length - 1) {\n width_1 += options.buttonSpacing;\n }\n });\n this.initialButtonGroupWidth = width_1;\n }\n plotLeft -= chart.spacing[3];\n this.updateButtonStates();\n // Detect collision between button group and exporting\n var xOffsetForExportButton_1 = getXOffsetForExportButton(buttonGroup, buttonPosition);\n this.alignButtonGroup(xOffsetForExportButton_1);\n // Skip animation\n group.placed = buttonGroup.placed = chart.hasLoaded;\n }\n var xOffsetForExportButton = 0;\n if (inputGroup) {\n // Detect collision between the input group and exporting button\n xOffsetForExportButton = getXOffsetForExportButton(inputGroup, inputPosition);\n if (inputPosition.align === 'left') {\n translateX = plotLeft;\n }\n else if (inputPosition.align === 'right') {\n translateX = -Math.max(chart.axisOffset[1], -xOffsetForExportButton);\n }\n // Update the alignment to the updated spacing box\n inputGroup.align({\n y: inputPosition.y,\n width: inputGroup.getBBox().width,\n align: inputPosition.align,\n // fix wrong getBBox() value on right align\n x: inputPosition.x + translateX - 2\n }, true, chart.spacingBox);\n // Skip animation\n inputGroup.placed = chart.hasLoaded;\n }\n this.handleCollision(xOffsetForExportButton);\n // Vertical align\n group.align({\n verticalAlign: verticalAlign\n }, true, chart.spacingBox);\n var alignTranslateY = group.alignAttr.translateY;\n // Set position\n var groupHeight = group.getBBox().height + 20; // # 20 padding\n var translateY = 0;\n // Calculate bottom position\n if (verticalAlign === 'bottom') {\n var legendOptions = chart.legend && chart.legend.options;\n var legendHeight = (legendOptions &&\n legendOptions.verticalAlign === 'bottom' &&\n legendOptions.enabled &&\n !legendOptions.floating ?\n (chart.legend.legendHeight +\n pick(legendOptions.margin, 10)) :\n 0);\n groupHeight = groupHeight + legendHeight - 20;\n translateY = (alignTranslateY -\n groupHeight -\n (options.floating ? 0 : options.y) -\n (chart.titleOffset ? chart.titleOffset[2] : 0) -\n 10 // 10 spacing\n );\n }\n if (verticalAlign === 'top') {\n if (options.floating) {\n translateY = 0;\n }\n if (chart.titleOffset && chart.titleOffset[0]) {\n translateY = chart.titleOffset[0];\n }\n translateY += ((chart.margin[0] - chart.spacing[0]) || 0);\n }\n else if (verticalAlign === 'middle') {\n if (inputPosition.y === buttonPosition.y) {\n translateY = alignTranslateY;\n }\n else if (inputPosition.y || buttonPosition.y) {\n if (inputPosition.y < 0 ||\n buttonPosition.y < 0) {\n translateY -= Math.min(inputPosition.y, buttonPosition.y);\n }\n else {\n translateY = alignTranslateY - groupHeight;\n }\n }\n }\n group.translate(options.x, options.y + Math.floor(translateY));\n // Translate HTML inputs\n var _b = this, minInput = _b.minInput, maxInput = _b.maxInput, dropdown = _b.dropdown;\n if (options.inputEnabled && minInput && maxInput) {\n minInput.style.marginTop = group.translateY + 'px';\n maxInput.style.marginTop = group.translateY + 'px';\n }\n if (dropdown) {\n dropdown.style.marginTop = group.translateY + 'px';\n }\n }\n };\n /**\n * Align the button group horizontally and vertically.\n *\n * @private\n * @function Highcharts.RangeSelector#alignButtonGroup\n * @param {number} xOffsetForExportButton\n * @param {number} [width]\n */\n RangeSelector.prototype.alignButtonGroup = function (xOffsetForExportButton, width) {\n var _a = this, chart = _a.chart, options = _a.options, buttonGroup = _a.buttonGroup, buttons = _a.buttons;\n var buttonPosition = options.buttonPosition;\n var plotLeft = chart.plotLeft - chart.spacing[3];\n var translateX = buttonPosition.x - chart.spacing[3];\n if (buttonPosition.align === 'right') {\n translateX += xOffsetForExportButton - plotLeft; // #13014\n }\n else if (buttonPosition.align === 'center') {\n translateX -= plotLeft / 2;\n }\n if (buttonGroup) {\n // Align button group\n buttonGroup.align({\n y: buttonPosition.y,\n width: pick(width, this.initialButtonGroupWidth),\n align: buttonPosition.align,\n x: translateX\n }, true, chart.spacingBox);\n }\n };\n /**\n * @private\n * @function Highcharts.RangeSelector#positionButtons\n */\n RangeSelector.prototype.positionButtons = function () {\n var _a = this, buttons = _a.buttons, chart = _a.chart, options = _a.options, zoomText = _a.zoomText;\n var verb = chart.hasLoaded ? 'animate' : 'attr';\n var buttonPosition = options.buttonPosition;\n var plotLeft = chart.plotLeft;\n var buttonLeft = plotLeft;\n if (zoomText && zoomText.visibility !== 'hidden') {\n // #8769, allow dynamically updating margins\n zoomText[verb]({\n x: pick(plotLeft + buttonPosition.x, plotLeft)\n });\n // Button start position\n buttonLeft += buttonPosition.x +\n zoomText.getBBox().width + 5;\n }\n for (var i = 0, iEnd = this.buttonOptions.length; i < iEnd; ++i) {\n if (buttons[i].visibility !== 'hidden') {\n buttons[i][verb]({ x: buttonLeft });\n // increase button position for the next button\n buttonLeft += buttons[i].width + options.buttonSpacing;\n }\n else {\n buttons[i][verb]({ x: plotLeft });\n }\n }\n };\n /**\n * Handle collision between the button group and the input group\n *\n * @private\n * @function Highcharts.RangeSelector#handleCollision\n *\n * @param {number} xOffsetForExportButton\n * The X offset of the group required to make room for the\n * exporting button\n */\n RangeSelector.prototype.handleCollision = function (xOffsetForExportButton) {\n var _this = this;\n var _a = this, chart = _a.chart, buttonGroup = _a.buttonGroup, inputGroup = _a.inputGroup;\n var _b = this.options, buttonPosition = _b.buttonPosition, dropdown = _b.dropdown, inputPosition = _b.inputPosition;\n var maxButtonWidth = function () {\n var buttonWidth = 0;\n _this.buttons.forEach(function (button) {\n var bBox = button.getBBox();\n if (bBox.width > buttonWidth) {\n buttonWidth = bBox.width;\n }\n });\n return buttonWidth;\n };\n var groupsOverlap = function (buttonGroupWidth) {\n if (inputGroup && buttonGroup) {\n var inputGroupX = (inputGroup.alignAttr.translateX +\n inputGroup.alignOptions.x -\n xOffsetForExportButton +\n // getBBox for detecing left margin\n inputGroup.getBBox().x +\n // 2px padding to not overlap input and label\n 2);\n var inputGroupWidth = inputGroup.alignOptions.width;\n var buttonGroupX = buttonGroup.alignAttr.translateX +\n buttonGroup.getBBox().x;\n return (buttonGroupX + buttonGroupWidth > inputGroupX) &&\n (inputGroupX + inputGroupWidth > buttonGroupX) &&\n (buttonPosition.y <\n (inputPosition.y +\n inputGroup.getBBox().height));\n }\n return false;\n };\n var moveInputsDown = function () {\n if (inputGroup && buttonGroup) {\n inputGroup.attr({\n translateX: inputGroup.alignAttr.translateX + (chart.axisOffset[1] >= -xOffsetForExportButton ?\n 0 :\n -xOffsetForExportButton),\n translateY: inputGroup.alignAttr.translateY +\n buttonGroup.getBBox().height + 10\n });\n }\n };\n if (buttonGroup) {\n if (dropdown === 'always') {\n this.collapseButtons(xOffsetForExportButton);\n if (groupsOverlap(maxButtonWidth())) {\n // Move the inputs down if there is still a collision\n // after collapsing the buttons\n moveInputsDown();\n }\n return;\n }\n if (dropdown === 'never') {\n this.expandButtons();\n }\n }\n // Detect collision\n if (inputGroup && buttonGroup) {\n if ((inputPosition.align === buttonPosition.align) ||\n // 20 is minimal spacing between elements\n groupsOverlap(this.initialButtonGroupWidth + 20)) {\n if (dropdown === 'responsive') {\n this.collapseButtons(xOffsetForExportButton);\n if (groupsOverlap(maxButtonWidth())) {\n moveInputsDown();\n }\n }\n else {\n moveInputsDown();\n }\n }\n else if (dropdown === 'responsive') {\n this.expandButtons();\n }\n }\n else if (buttonGroup && dropdown === 'responsive') {\n if (this.initialButtonGroupWidth > chart.plotWidth) {\n this.collapseButtons(xOffsetForExportButton);\n }\n else {\n this.expandButtons();\n }\n }\n };\n /**\n * Collapse the buttons and put the select element on top.\n *\n * @private\n * @function Highcharts.RangeSelector#collapseButtons\n * @param {number} xOffsetForExportButton\n */\n RangeSelector.prototype.collapseButtons = function (xOffsetForExportButton) {\n var _a = this, buttons = _a.buttons, buttonOptions = _a.buttonOptions, chart = _a.chart, dropdown = _a.dropdown, options = _a.options, zoomText = _a.zoomText;\n var userButtonTheme = (chart.userOptions.rangeSelector &&\n chart.userOptions.rangeSelector.buttonTheme) || {};\n var getAttribs = function (text) { return ({\n text: text ? \"\".concat(text, \" \\u25BE\") : '▾',\n width: 'auto',\n paddingLeft: pick(options.buttonTheme.paddingLeft, userButtonTheme.padding, 8),\n paddingRight: pick(options.buttonTheme.paddingRight, userButtonTheme.padding, 8)\n }); };\n if (zoomText) {\n zoomText.hide();\n }\n var hasActiveButton = false;\n buttonOptions.forEach(function (rangeOptions, i) {\n var button = buttons[i];\n if (button.state !== 2) {\n button.hide();\n }\n else {\n button.show();\n button.attr(getAttribs(rangeOptions.text));\n hasActiveButton = true;\n }\n });\n if (!hasActiveButton) {\n if (dropdown) {\n dropdown.selectedIndex = 0;\n }\n buttons[0].show();\n buttons[0].attr(getAttribs(this.zoomText && this.zoomText.textStr));\n }\n var align = options.buttonPosition.align;\n this.positionButtons();\n if (align === 'right' || align === 'center') {\n this.alignButtonGroup(xOffsetForExportButton, buttons[this.currentButtonIndex()].getBBox().width);\n }\n this.showDropdown();\n };\n /**\n * Show all the buttons and hide the select element.\n *\n * @private\n * @function Highcharts.RangeSelector#expandButtons\n */\n RangeSelector.prototype.expandButtons = function () {\n var _a = this, buttons = _a.buttons, buttonOptions = _a.buttonOptions, options = _a.options, zoomText = _a.zoomText;\n this.hideDropdown();\n if (zoomText) {\n zoomText.show();\n }\n buttonOptions.forEach(function (rangeOptions, i) {\n var button = buttons[i];\n button.show();\n button.attr({\n text: rangeOptions.text,\n width: options.buttonTheme.width || 28,\n paddingLeft: pick(options.buttonTheme.paddingLeft, 'unset'),\n paddingRight: pick(options.buttonTheme.paddingRight, 'unset')\n });\n if (button.state < 2) {\n button.setState(0);\n }\n });\n this.positionButtons();\n };\n /**\n * Get the index of the visible button when the buttons are collapsed.\n *\n * @private\n * @function Highcharts.RangeSelector#currentButtonIndex\n */\n RangeSelector.prototype.currentButtonIndex = function () {\n var dropdown = this.dropdown;\n if (dropdown && dropdown.selectedIndex > 0) {\n return dropdown.selectedIndex - 1;\n }\n return 0;\n };\n /**\n * Position the select element on top of the button.\n *\n * @private\n * @function Highcharts.RangeSelector#showDropdown\n */\n RangeSelector.prototype.showDropdown = function () {\n var _a = this, buttonGroup = _a.buttonGroup, buttons = _a.buttons, chart = _a.chart, dropdown = _a.dropdown;\n if (buttonGroup && dropdown) {\n var translateX = buttonGroup.translateX, translateY = buttonGroup.translateY;\n var bBox = buttons[this.currentButtonIndex()].getBBox();\n css(dropdown, {\n left: (chart.plotLeft + translateX) + 'px',\n top: (translateY + 0.5) + 'px',\n width: bBox.width + 'px',\n height: bBox.height + 'px'\n });\n this.hasVisibleDropdown = true;\n }\n };\n /**\n * @private\n * @function Highcharts.RangeSelector#hideDropdown\n */\n RangeSelector.prototype.hideDropdown = function () {\n var dropdown = this.dropdown;\n if (dropdown) {\n css(dropdown, {\n top: '-9999em',\n width: '1px',\n height: '1px'\n });\n this.hasVisibleDropdown = false;\n }\n };\n /**\n * Extracts height of range selector\n *\n * @private\n * @function Highcharts.RangeSelector#getHeight\n * @return {number}\n * Returns rangeSelector height\n */\n RangeSelector.prototype.getHeight = function () {\n var rangeSelector = this, options = rangeSelector.options, rangeSelectorGroup = rangeSelector.group, inputPosition = options.inputPosition, buttonPosition = options.buttonPosition, yPosition = options.y, buttonPositionY = buttonPosition.y, inputPositionY = inputPosition.y;\n var rangeSelectorHeight = 0;\n if (options.height) {\n return options.height;\n }\n // Align the elements before we read the height in case we're switching\n // between wrapped and non-wrapped layout\n this.alignElements();\n rangeSelectorHeight = rangeSelectorGroup ?\n // 13px to keep back compatibility\n (rangeSelectorGroup.getBBox(true).height) + 13 +\n yPosition :\n 0;\n var minPosition = Math.min(inputPositionY, buttonPositionY);\n if ((inputPositionY < 0 && buttonPositionY < 0) ||\n (inputPositionY > 0 && buttonPositionY > 0)) {\n rangeSelectorHeight += Math.abs(minPosition);\n }\n return rangeSelectorHeight;\n };\n /**\n * Detect collision with title or subtitle\n *\n * @private\n * @function Highcharts.RangeSelector#titleCollision\n * @return {boolean}\n * Returns collision status\n */\n RangeSelector.prototype.titleCollision = function (chart) {\n return !(chart.options.title.text ||\n chart.options.subtitle.text);\n };\n /**\n * Update the range selector with new options\n *\n * @private\n * @function Highcharts.RangeSelector#update\n * @param {Highcharts.RangeSelectorOptions} options\n */\n RangeSelector.prototype.update = function (options) {\n var chart = this.chart;\n merge(true, chart.options.rangeSelector, options);\n this.destroy();\n this.init(chart);\n this.render();\n };\n /**\n * Destroys allocated elements.\n *\n * @private\n * @function Highcharts.RangeSelector#destroy\n */\n RangeSelector.prototype.destroy = function () {\n var rSelector = this, minInput = rSelector.minInput, maxInput = rSelector.maxInput;\n if (rSelector.eventsToUnbind) {\n rSelector.eventsToUnbind.forEach(function (unbind) { return unbind(); });\n rSelector.eventsToUnbind = void 0;\n }\n // Destroy elements in collections\n destroyObjectProperties(rSelector.buttons);\n // Clear input element events\n if (minInput) {\n minInput.onfocus = minInput.onblur = minInput.onchange = null;\n }\n if (maxInput) {\n maxInput.onfocus = maxInput.onblur = maxInput.onchange = null;\n }\n // Destroy HTML and SVG elements\n objectEach(rSelector, function (val, key) {\n if (val && key !== 'chart') {\n if (val instanceof SVGElement) {\n // SVGElement\n val.destroy();\n }\n else if (val instanceof window.HTMLElement) {\n // HTML element\n discardElement(val);\n }\n }\n if (val !== RangeSelector.prototype[key]) {\n rSelector[key] = null;\n }\n }, this);\n };\n return RangeSelector;\n}());\nextend(RangeSelector.prototype, {\n /**\n * The default buttons for pre-selecting time frames.\n * @private\n */\n defaultButtons: [{\n type: 'month',\n count: 1,\n text: '1m',\n title: 'View 1 month'\n }, {\n type: 'month',\n count: 3,\n text: '3m',\n title: 'View 3 months'\n }, {\n type: 'month',\n count: 6,\n text: '6m',\n title: 'View 6 months'\n }, {\n type: 'ytd',\n text: 'YTD',\n title: 'View year to date'\n }, {\n type: 'year',\n count: 1,\n text: '1y',\n title: 'View 1 year'\n }, {\n type: 'all',\n text: 'All',\n title: 'View all'\n }],\n /**\n * The date formats to use when setting min, max and value on date inputs.\n * @private\n */\n inputTypeFormats: {\n 'datetime-local': '%Y-%m-%dT%H:%M:%S',\n 'date': '%Y-%m-%d',\n 'time': '%H:%M:%S'\n }\n});\n/* *\n *\n * Default Export\n *\n * */\nexport default RangeSelector;\n/* *\n *\n * API Options\n *\n * */\n/**\n * Define the time span for the button\n *\n * @typedef {\"all\"|\"day\"|\"hour\"|\"millisecond\"|\"minute\"|\"month\"|\"second\"|\"week\"|\"year\"|\"ytd\"} Highcharts.RangeSelectorButtonTypeValue\n */\n/**\n * Callback function to react on button clicks.\n *\n * @callback Highcharts.RangeSelectorClickCallbackFunction\n *\n * @param {global.Event} e\n * Event arguments.\n *\n * @param {boolean|undefined}\n * Return false to cancel the default button event.\n */\n/**\n * Callback function to parse values entered in the input boxes and return a\n * valid JavaScript time as milliseconds since 1970.\n *\n * @callback Highcharts.RangeSelectorParseCallbackFunction\n *\n * @param {string} value\n * Input value to parse.\n *\n * @return {number}\n * Parsed JavaScript time value.\n */\n(''); // keeps doclets above in JS file\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for the range selector.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport RangeSelector from '../../Stock/RangeSelector/RangeSelector.js';\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport ChartUtilities from '../Utils/ChartUtilities.js';\nvar unhideChartElementFromAT = ChartUtilities.unhideChartElementFromAT, getAxisRangeDescription = ChartUtilities.getAxisRangeDescription;\nimport Announcer from '../Utils/Announcer.js';\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport U from '../../Core/Utilities.js';\nvar addEvent = U.addEvent, attr = U.attr;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * @private\n */\nfunction shouldRunInputNavigation(chart) {\n return Boolean(chart.rangeSelector &&\n chart.rangeSelector.inputGroup &&\n chart.rangeSelector.inputGroup.element.style.visibility !== 'hidden' &&\n chart.options.rangeSelector.inputEnabled !== false &&\n chart.rangeSelector.minInput &&\n chart.rangeSelector.maxInput);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The RangeSelectorComponent class\n *\n * @private\n * @class\n * @name Highcharts.RangeSelectorComponent\n */\nvar RangeSelectorComponent = /** @class */ (function (_super) {\n __extends(RangeSelectorComponent, _super);\n function RangeSelectorComponent() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.announcer = void 0;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Init the component\n * @private\n */\n RangeSelectorComponent.prototype.init = function () {\n var chart = this.chart;\n this.announcer = new Announcer(chart, 'polite');\n };\n /**\n * Called on first render/updates to the chart, including options changes.\n */\n RangeSelectorComponent.prototype.onChartUpdate = function () {\n var chart = this.chart, component = this, rangeSelector = chart.rangeSelector;\n if (!rangeSelector) {\n return;\n }\n this.updateSelectorVisibility();\n this.setDropdownAttrs();\n if (rangeSelector.buttons &&\n rangeSelector.buttons.length) {\n rangeSelector.buttons.forEach(function (button) {\n component.setRangeButtonAttrs(button);\n });\n }\n // Make sure input boxes are accessible and focusable\n if (rangeSelector.maxInput && rangeSelector.minInput) {\n ['minInput', 'maxInput'].forEach(function (key, i) {\n var input = rangeSelector[key];\n if (input) {\n unhideChartElementFromAT(chart, input);\n component.setRangeInputAttrs(input, 'accessibility.rangeSelector.' + (i ? 'max' : 'min') +\n 'InputLabel');\n }\n });\n }\n };\n /**\n * Hide buttons from AT when showing dropdown, and vice versa.\n * @private\n */\n RangeSelectorComponent.prototype.updateSelectorVisibility = function () {\n var chart = this.chart;\n var rangeSelector = chart.rangeSelector;\n var dropdown = (rangeSelector &&\n rangeSelector.dropdown);\n var buttons = (rangeSelector &&\n rangeSelector.buttons ||\n []);\n var hideFromAT = function (el) { return el.setAttribute('aria-hidden', true); };\n if (rangeSelector &&\n rangeSelector.hasVisibleDropdown &&\n dropdown) {\n unhideChartElementFromAT(chart, dropdown);\n buttons.forEach(function (btn) { return hideFromAT(btn.element); });\n }\n else {\n if (dropdown) {\n hideFromAT(dropdown);\n }\n buttons.forEach(function (btn) { return unhideChartElementFromAT(chart, btn.element); });\n }\n };\n /**\n * Set accessibility related attributes on dropdown element.\n * @private\n */\n RangeSelectorComponent.prototype.setDropdownAttrs = function () {\n var chart = this.chart;\n var dropdown = (chart.rangeSelector &&\n chart.rangeSelector.dropdown);\n if (dropdown) {\n var label = chart.langFormat('accessibility.rangeSelector.dropdownLabel', { rangeTitle: chart.options.lang.rangeSelectorZoom });\n dropdown.setAttribute('aria-label', label);\n dropdown.setAttribute('tabindex', -1);\n }\n };\n /**\n * @private\n * @param {Highcharts.SVGElement} button\n */\n RangeSelectorComponent.prototype.setRangeButtonAttrs = function (button) {\n attr(button.element, {\n tabindex: -1,\n role: 'button'\n });\n };\n /**\n * @private\n */\n RangeSelectorComponent.prototype.setRangeInputAttrs = function (input, langKey) {\n var chart = this.chart;\n attr(input, {\n tabindex: -1,\n 'aria-label': chart.langFormat(langKey, { chart: chart })\n });\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @param {number} keyCode\n * @return {number} Response code\n */\n RangeSelectorComponent.prototype.onButtonNavKbdArrowKey = function (keyboardNavigationHandler, keyCode) {\n var response = keyboardNavigationHandler.response, keys = this.keyCodes, chart = this.chart, wrapAround = chart.options.accessibility\n .keyboardNavigation.wrapAround, direction = (keyCode === keys.left || keyCode === keys.up) ? -1 : 1, didHighlight = chart.highlightRangeSelectorButton(chart.highlightedRangeSelectorItemIx + direction);\n if (!didHighlight) {\n if (wrapAround) {\n keyboardNavigationHandler.init(direction);\n return response.success;\n }\n return response[direction > 0 ? 'next' : 'prev'];\n }\n return response.success;\n };\n /**\n * @private\n */\n RangeSelectorComponent.prototype.onButtonNavKbdClick = function (keyboardNavigationHandler) {\n var response = keyboardNavigationHandler.response, chart = this.chart, wasDisabled = chart.oldRangeSelectorItemState === 3;\n if (!wasDisabled) {\n this.fakeClickEvent(chart.rangeSelector.buttons[chart.highlightedRangeSelectorItemIx].element);\n }\n return response.success;\n };\n /**\n * Called whenever a range selector button has been clicked, either by\n * mouse, touch, or kbd/voice/other.\n * @private\n */\n RangeSelectorComponent.prototype.onAfterBtnClick = function () {\n var chart = this.chart;\n var axisRangeDescription = getAxisRangeDescription(chart.xAxis[0]);\n var announcement = chart.langFormat('accessibility.rangeSelector.clickButtonAnnouncement', { chart: chart, axisRangeDescription: axisRangeDescription });\n if (announcement) {\n this.announcer.announce(announcement);\n }\n };\n /**\n * @private\n */\n RangeSelectorComponent.prototype.onInputKbdMove = function (direction) {\n var chart = this.chart;\n var rangeSel = chart.rangeSelector;\n var newIx = chart.highlightedInputRangeIx = (chart.highlightedInputRangeIx || 0) + direction;\n var newIxOutOfRange = newIx > 1 || newIx < 0;\n if (newIxOutOfRange) {\n if (chart.accessibility) {\n chart.accessibility.keyboardNavigation.tabindexContainer\n .focus();\n chart.accessibility.keyboardNavigation.move(direction);\n }\n }\n else if (rangeSel) {\n var svgEl = rangeSel[newIx ? 'maxDateBox' : 'minDateBox'];\n var inputEl = rangeSel[newIx ? 'maxInput' : 'minInput'];\n if (svgEl && inputEl) {\n chart.setFocusToElement(svgEl, inputEl);\n }\n }\n };\n /**\n * @private\n * @param {number} direction\n */\n RangeSelectorComponent.prototype.onInputNavInit = function (direction) {\n var _this = this;\n var component = this;\n var chart = this.chart;\n var buttonIxToHighlight = direction > 0 ? 0 : 1;\n var rangeSel = chart.rangeSelector;\n var svgEl = (rangeSel &&\n rangeSel[buttonIxToHighlight ? 'maxDateBox' : 'minDateBox']);\n var minInput = (rangeSel && rangeSel.minInput);\n var maxInput = (rangeSel && rangeSel.maxInput);\n var inputEl = buttonIxToHighlight ? maxInput : minInput;\n chart.highlightedInputRangeIx = buttonIxToHighlight;\n if (svgEl && minInput && maxInput) {\n chart.setFocusToElement(svgEl, inputEl);\n // Tab-press with the input focused does not propagate to chart\n // automatically, so we manually catch and handle it when relevant.\n if (this.removeInputKeydownHandler) {\n this.removeInputKeydownHandler();\n }\n var keydownHandler = function (e) {\n var isTab = (e.which || e.keyCode) === _this.keyCodes.tab;\n if (isTab) {\n e.preventDefault();\n e.stopPropagation();\n component.onInputKbdMove(e.shiftKey ? -1 : 1);\n }\n };\n var minRemover_1 = addEvent(minInput, 'keydown', keydownHandler);\n var maxRemover_1 = addEvent(maxInput, 'keydown', keydownHandler);\n this.removeInputKeydownHandler = function () {\n minRemover_1();\n maxRemover_1();\n };\n }\n };\n /**\n * @private\n */\n RangeSelectorComponent.prototype.onInputNavTerminate = function () {\n var rangeSel = (this.chart.rangeSelector || {});\n if (rangeSel.maxInput) {\n rangeSel.hideInput('max');\n }\n if (rangeSel.minInput) {\n rangeSel.hideInput('min');\n }\n if (this.removeInputKeydownHandler) {\n this.removeInputKeydownHandler();\n delete this.removeInputKeydownHandler;\n }\n };\n /**\n * @private\n */\n RangeSelectorComponent.prototype.initDropdownNav = function () {\n var _this = this;\n var chart = this.chart;\n var rangeSelector = chart.rangeSelector;\n var dropdown = (rangeSelector && rangeSelector.dropdown);\n if (rangeSelector && dropdown) {\n chart.setFocusToElement(rangeSelector.buttonGroup, dropdown);\n if (this.removeDropdownKeydownHandler) {\n this.removeDropdownKeydownHandler();\n }\n // Tab-press with dropdown focused does not propagate to chart\n // automatically, so we manually catch and handle it when relevant.\n this.removeDropdownKeydownHandler = addEvent(dropdown, 'keydown', function (e) {\n var isTab = (e.which || e.keyCode) === _this.keyCodes.tab, a11y = chart.accessibility;\n if (isTab) {\n e.preventDefault();\n e.stopPropagation();\n if (a11y) {\n a11y.keyboardNavigation.tabindexContainer.focus();\n a11y.keyboardNavigation.move(e.shiftKey ? -1 : 1);\n }\n }\n });\n }\n };\n /**\n * Get navigation for the range selector buttons.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler} The module object.\n */\n RangeSelectorComponent.prototype.getRangeSelectorButtonNavigation = function () {\n var chart = this.chart;\n var keys = this.keyCodes;\n var component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.left, keys.right, keys.up, keys.down],\n function (keyCode) {\n return component.onButtonNavKbdArrowKey(this, keyCode);\n }\n ],\n [\n [keys.enter, keys.space],\n function () {\n return component.onButtonNavKbdClick(this);\n }\n ]\n ],\n validate: function () {\n return !!(chart.rangeSelector &&\n chart.rangeSelector.buttons &&\n chart.rangeSelector.buttons.length);\n },\n init: function (direction) {\n var rangeSelector = chart.rangeSelector;\n if (rangeSelector && rangeSelector.hasVisibleDropdown) {\n component.initDropdownNav();\n }\n else if (rangeSelector) {\n var lastButtonIx = rangeSelector.buttons.length - 1;\n chart.highlightRangeSelectorButton(direction > 0 ? 0 : lastButtonIx);\n }\n },\n terminate: function () {\n if (component.removeDropdownKeydownHandler) {\n component.removeDropdownKeydownHandler();\n delete component.removeDropdownKeydownHandler;\n }\n }\n });\n };\n /**\n * Get navigation for the range selector input boxes.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler}\n * The module object.\n */\n RangeSelectorComponent.prototype.getRangeSelectorInputNavigation = function () {\n var chart = this.chart;\n var component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [],\n validate: function () {\n return shouldRunInputNavigation(chart);\n },\n init: function (direction) {\n component.onInputNavInit(direction);\n },\n terminate: function () {\n component.onInputNavTerminate();\n }\n });\n };\n /**\n * Get keyboard navigation handlers for this component.\n * @return {Array}\n * List of module objects.\n */\n RangeSelectorComponent.prototype.getKeyboardNavigation = function () {\n return [\n this.getRangeSelectorButtonNavigation(),\n this.getRangeSelectorInputNavigation()\n ];\n };\n /**\n * Remove component traces\n */\n RangeSelectorComponent.prototype.destroy = function () {\n if (this.removeDropdownKeydownHandler) {\n this.removeDropdownKeydownHandler();\n }\n if (this.removeInputKeydownHandler) {\n this.removeInputKeydownHandler();\n }\n if (this.announcer) {\n this.announcer.destroy();\n }\n };\n return RangeSelectorComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Class Namespace\n *\n * */\n(function (RangeSelectorComponent) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Highlight range selector button by index.\n *\n * @private\n * @function Highcharts.Chart#highlightRangeSelectorButton\n */\n function chartHighlightRangeSelectorButton(ix) {\n var buttons = (this.rangeSelector &&\n this.rangeSelector.buttons ||\n []);\n var curHighlightedIx = this.highlightedRangeSelectorItemIx;\n var curSelectedIx = (this.rangeSelector &&\n this.rangeSelector.selected);\n // Deselect old\n if (typeof curHighlightedIx !== 'undefined' &&\n buttons[curHighlightedIx] &&\n curHighlightedIx !== curSelectedIx) {\n buttons[curHighlightedIx].setState(this.oldRangeSelectorItemState || 0);\n }\n // Select new\n this.highlightedRangeSelectorItemIx = ix;\n if (buttons[ix]) {\n this.setFocusToElement(buttons[ix].box, buttons[ix].element);\n if (ix !== curSelectedIx) {\n this.oldRangeSelectorItemState = buttons[ix].state;\n buttons[ix].setState(1);\n }\n return true;\n }\n return false;\n }\n /**\n * @private\n */\n function compose(ChartClass, RangeSelectorClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.highlightRangeSelectorButton = (chartHighlightRangeSelectorButton);\n }\n if (composedClasses.indexOf(RangeSelectorClass) === -1) {\n composedClasses.push(RangeSelectorClass);\n addEvent(RangeSelector, 'afterBtnClick', rangeSelectorAfterBtnClick);\n }\n }\n RangeSelectorComponent.compose = compose;\n /**\n * Range selector does not have destroy-setup for class instance events - so\n * we set it on the class and call the component from here.\n * @private\n */\n function rangeSelectorAfterBtnClick() {\n var a11y = this.chart.accessibility;\n if (a11y && a11y.components.rangeSelector) {\n return a11y.components.rangeSelector.onAfterBtnClick();\n }\n }\n})(RangeSelectorComponent || (RangeSelectorComponent = {}));\n/* *\n *\n * Export Default\n *\n * */\nexport default RangeSelectorComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Handle forcing series markers.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport U from '../../../Core/Utilities.js';\nvar addEvent = U.addEvent, merge = U.merge;\n/* *\n *\n * Composition\n *\n * */\nvar ForcedMarkersComposition;\n(function (ForcedMarkersComposition) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Compositions\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n function compose(SeriesClass) {\n if (composedClasses.indexOf(SeriesClass) === -1) {\n composedClasses.push(SeriesClass);\n addEvent(SeriesClass, 'afterSetOptions', seriesOnAfterSetOptions);\n addEvent(SeriesClass, 'render', seriesOnRender);\n addEvent(SeriesClass, 'afterRender', seriesOnAfterRender);\n }\n }\n ForcedMarkersComposition.compose = compose;\n /**\n * @private\n */\n function forceZeroOpacityMarkerOptions(options) {\n merge(true, options, {\n marker: {\n enabled: true,\n states: {\n normal: {\n opacity: 0\n }\n }\n }\n });\n }\n /**\n * @private\n */\n function getPointMarkerOpacity(pointOptions) {\n return pointOptions.marker.states &&\n pointOptions.marker.states.normal &&\n pointOptions.marker.states.normal.opacity;\n }\n /**\n * @private\n */\n function handleForcePointMarkers(series) {\n var i = series.points.length;\n while (i--) {\n var point = series.points[i];\n var pointOptions = point.options;\n var hadForcedMarker = point.hasForcedA11yMarker;\n delete point.hasForcedA11yMarker;\n if (pointOptions.marker) {\n var isStillForcedMarker = hadForcedMarker &&\n getPointMarkerOpacity(pointOptions) === 0;\n if (pointOptions.marker.enabled && !isStillForcedMarker) {\n unforcePointMarkerOptions(pointOptions);\n point.hasForcedA11yMarker = false;\n }\n else if (pointOptions.marker.enabled === false) {\n forceZeroOpacityMarkerOptions(pointOptions);\n point.hasForcedA11yMarker = true;\n }\n }\n }\n }\n /**\n * @private\n */\n function hasIndividualPointMarkerOptions(series) {\n return !!(series._hasPointMarkers &&\n series.points &&\n series.points.length);\n }\n /**\n * @private\n */\n function isWithinDescriptionThreshold(series) {\n var a11yOptions = series.chart.options.accessibility;\n return series.points.length <\n a11yOptions.series.pointDescriptionEnabledThreshold ||\n a11yOptions.series\n .pointDescriptionEnabledThreshold === false;\n }\n /**\n * Process marker graphics after render\n * @private\n */\n function seriesOnAfterRender() {\n var series = this;\n // For styled mode the rendered graphic does not reflect the style\n // options, and we need to add/remove classes to achieve the same.\n if (series.chart.styledMode) {\n if (series.markerGroup) {\n series.markerGroup[series.a11yMarkersForced ? 'addClass' : 'removeClass']('highcharts-a11y-markers-hidden');\n }\n // Do we need to handle individual points?\n if (hasIndividualPointMarkerOptions(series)) {\n series.points.forEach(function (point) {\n if (point.graphic) {\n point.graphic[point.hasForcedA11yMarker ?\n 'addClass' : 'removeClass']('highcharts-a11y-marker-hidden');\n point.graphic[point.hasForcedA11yMarker === false ?\n 'addClass' :\n 'removeClass']('highcharts-a11y-marker-visible');\n }\n });\n }\n }\n }\n /**\n * Keep track of options to reset markers to if no longer forced.\n * @private\n */\n function seriesOnAfterSetOptions(e) {\n this.resetA11yMarkerOptions = merge(e.options.marker || {}, this.userOptions.marker || {});\n }\n /**\n * Keep track of forcing markers.\n * @private\n */\n function seriesOnRender() {\n var series = this, options = series.options;\n if (shouldForceMarkers(series)) {\n if (options.marker && options.marker.enabled === false) {\n series.a11yMarkersForced = true;\n forceZeroOpacityMarkerOptions(series.options);\n }\n if (hasIndividualPointMarkerOptions(series)) {\n handleForcePointMarkers(series);\n }\n }\n else if (series.a11yMarkersForced) {\n delete series.a11yMarkersForced;\n unforceSeriesMarkerOptions(series);\n delete series.resetA11yMarkerOptions;\n }\n }\n /**\n * @private\n */\n function shouldForceMarkers(series) {\n var chart = series.chart, chartA11yEnabled = chart.options.accessibility.enabled, seriesA11yEnabled = (series.options.accessibility &&\n series.options.accessibility.enabled) !== false;\n return (chartA11yEnabled &&\n seriesA11yEnabled &&\n isWithinDescriptionThreshold(series));\n }\n /**\n * @private\n */\n function unforcePointMarkerOptions(pointOptions) {\n merge(true, pointOptions.marker, {\n states: {\n normal: {\n opacity: getPointMarkerOpacity(pointOptions) || 1\n }\n }\n });\n }\n /**\n * Reset markers to normal\n * @private\n */\n function unforceSeriesMarkerOptions(series) {\n var resetMarkerOptions = series.resetA11yMarkerOptions;\n if (resetMarkerOptions) {\n var originalOpactiy = resetMarkerOptions.states &&\n resetMarkerOptions.states.normal &&\n resetMarkerOptions.states.normal.opacity;\n series.update({\n marker: {\n enabled: resetMarkerOptions.enabled,\n states: {\n normal: { opacity: originalOpactiy }\n }\n }\n });\n }\n }\n})(ForcedMarkersComposition || (ForcedMarkersComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default ForcedMarkersComposition;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Handle keyboard navigation for series.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport Point from '../../../Core/Series/Point.js';\nimport Series from '../../../Core/Series/Series.js';\nimport SeriesRegistry from '../../../Core/Series/SeriesRegistry.js';\nvar seriesTypes = SeriesRegistry.seriesTypes;\nimport H from '../../../Core/Globals.js';\nvar doc = H.doc;\nimport U from '../../../Core/Utilities.js';\nvar defined = U.defined, fireEvent = U.fireEvent;\nimport KeyboardNavigationHandler from '../../KeyboardNavigationHandler.js';\nimport EventProvider from '../../Utils/EventProvider.js';\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nvar getPointFromXY = ChartUtilities.getPointFromXY, getSeriesFromName = ChartUtilities.getSeriesFromName, scrollToPoint = ChartUtilities.scrollToPoint;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * Get the index of a point in a series. This is needed when using e.g. data\n * grouping.\n *\n * @private\n * @function getPointIndex\n * @param {Highcharts.AccessibilityPoint} point\n * The point to find index of.\n * @return {number|undefined}\n * The index in the series.points array of the point.\n */\nfunction getPointIndex(point) {\n var index = point.index, points = point.series.points;\n var i = points.length;\n if (points[index] !== point) {\n while (i--) {\n if (points[i] === point) {\n return i;\n }\n }\n }\n else {\n return index;\n }\n}\n/**\n * Determine if series navigation should be skipped\n * @private\n */\nfunction isSkipSeries(series) {\n var a11yOptions = series.chart.options.accessibility, seriesNavOptions = a11yOptions.keyboardNavigation.seriesNavigation, seriesA11yOptions = series.options.accessibility || {}, seriesKbdNavOptions = seriesA11yOptions.keyboardNavigation;\n return seriesKbdNavOptions && seriesKbdNavOptions.enabled === false ||\n seriesA11yOptions.enabled === false ||\n series.options.enableMouseTracking === false || // #8440\n !series.visible ||\n // Skip all points in a series where pointNavigationEnabledThreshold is\n // reached\n (seriesNavOptions.pointNavigationEnabledThreshold &&\n seriesNavOptions.pointNavigationEnabledThreshold <=\n series.points.length);\n}\n/**\n * Determine if navigation for a point should be skipped\n * @private\n */\nfunction isSkipPoint(point) {\n var a11yOptions = point.series.chart.options.accessibility;\n var pointA11yDisabled = (point.options.accessibility &&\n point.options.accessibility.enabled === false);\n return point.isNull &&\n a11yOptions.keyboardNavigation.seriesNavigation.skipNullPoints ||\n point.visible === false ||\n point.isInside === false ||\n pointA11yDisabled ||\n isSkipSeries(point.series);\n}\n/**\n * Get the first point that is not a skip point in this series.\n * @private\n */\nfunction getFirstValidPointInSeries(series) {\n var points = series.points || [], len = points.length;\n for (var i = 0; i < len; ++i) {\n if (!isSkipPoint(points[i])) {\n return points[i];\n }\n }\n return null;\n}\n/**\n * Get the first point that is not a skip point in this chart.\n * @private\n */\nfunction getFirstValidPointInChart(chart) {\n var series = chart.series || [], len = series.length;\n for (var i = 0; i < len; ++i) {\n if (!isSkipSeries(series[i])) {\n var point = getFirstValidPointInSeries(series[i]);\n if (point) {\n return point;\n }\n }\n }\n return null;\n}\n/**\n * @private\n */\nfunction highlightLastValidPointInChart(chart) {\n var numSeries = chart.series.length;\n var i = numSeries, res = false;\n while (i--) {\n chart.highlightedPoint = chart.series[i].points[chart.series[i].points.length - 1];\n // Highlight first valid point in the series will also\n // look backwards. It always starts from currently\n // highlighted point.\n res = chart.series[i].highlightNextValidPoint();\n if (res) {\n break;\n }\n }\n return res;\n}\n/**\n * After drilling down/up, we need to set focus to the first point for\n * screen readers and keyboard nav.\n * @private\n */\nfunction updateChartFocusAfterDrilling(chart) {\n var point = getFirstValidPointInChart(chart);\n if (point) {\n point.highlight(false); // Do not visually highlight\n }\n}\n/**\n * Highlight the first point in chart that is not a skip point\n * @private\n */\nfunction highlightFirstValidPointInChart(chart) {\n delete chart.highlightedPoint;\n var point = getFirstValidPointInChart(chart);\n return point ? point.highlight() : false;\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n * @class\n * @name Highcharts.SeriesKeyboardNavigation\n */\nvar SeriesKeyboardNavigation = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function SeriesKeyboardNavigation(chart, keyCodes) {\n this.keyCodes = keyCodes;\n this.chart = chart;\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Init the keyboard navigation\n */\n SeriesKeyboardNavigation.prototype.init = function () {\n var keyboardNavigation = this, chart = this.chart, e = this.eventProvider = new EventProvider();\n e.addEvent(Series, 'destroy', function () {\n return keyboardNavigation.onSeriesDestroy(this);\n });\n e.addEvent(chart, 'afterApplyDrilldown', function () {\n updateChartFocusAfterDrilling(this);\n });\n e.addEvent(chart, 'drilldown', function (e) {\n var point = e.point, series = point.series;\n keyboardNavigation.lastDrilledDownPoint = {\n x: point.x,\n y: point.y,\n seriesName: series ? series.name : ''\n };\n });\n e.addEvent(chart, 'drillupall', function () {\n setTimeout(function () {\n keyboardNavigation.onDrillupAll();\n }, 10);\n });\n // Heatmaps et al. alter z-index in setState, causing elements\n // to lose focus\n e.addEvent(Point, 'afterSetState', function () {\n var point = this;\n var pointEl = point.graphic && point.graphic.element;\n var focusedElement = doc.activeElement;\n // VO brings focus with it to container, causing series nav to run.\n // If then navigating with virtual cursor, it is possible to leave\n // keyboard nav module state on the data points and still activate\n // proxy buttons.\n var focusedElClassName = (focusedElement && focusedElement.getAttribute('class'));\n var isProxyFocused = focusedElClassName &&\n focusedElClassName.indexOf('highcharts-a11y-proxy-button') > -1;\n if (chart.highlightedPoint === point &&\n focusedElement !== pointEl &&\n !isProxyFocused &&\n pointEl &&\n pointEl.focus) {\n pointEl.focus();\n }\n });\n };\n /**\n * After drillup we want to find the point that was drilled down to and\n * highlight it.\n * @private\n */\n SeriesKeyboardNavigation.prototype.onDrillupAll = function () {\n var last = this.lastDrilledDownPoint, chart = this.chart, series = last && getSeriesFromName(chart, last.seriesName);\n var point;\n if (last && series && defined(last.x) && defined(last.y)) {\n point = getPointFromXY(series, last.x, last.y);\n }\n point = point || getFirstValidPointInChart(chart);\n // Container focus can be lost on drillup due to deleted elements.\n if (chart.container) {\n chart.container.focus();\n }\n if (point && point.highlight) {\n point.highlight(false); // Do not visually highlight\n }\n };\n /**\n * @private\n */\n SeriesKeyboardNavigation.prototype.getKeyboardNavigationHandler = function () {\n var keyboardNavigation = this, keys = this.keyCodes, chart = this.chart, inverted = chart.inverted;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [inverted ? [keys.up, keys.down] : [keys.left, keys.right],\n function (keyCode) {\n return keyboardNavigation.onKbdSideways(this, keyCode);\n }],\n [inverted ? [keys.left, keys.right] : [keys.up, keys.down],\n function (keyCode) {\n return keyboardNavigation.onKbdVertical(this, keyCode);\n }],\n [[keys.enter, keys.space],\n function (keyCode, event) {\n var point = chart.highlightedPoint;\n if (point) {\n event.point = point;\n fireEvent(point.series, 'click', event);\n point.firePointEvent('click');\n }\n return this.response.success;\n }],\n [[keys.home],\n function () {\n highlightFirstValidPointInChart(chart);\n return this.response.success;\n }],\n [[keys.end],\n function () {\n highlightLastValidPointInChart(chart);\n return this.response.success;\n }],\n [[keys.pageDown, keys.pageUp],\n function (keyCode) {\n chart.highlightAdjacentSeries(keyCode === keys.pageDown);\n return this.response.success;\n }]\n ],\n init: function () {\n return keyboardNavigation.onHandlerInit(this);\n },\n validate: function () {\n return !!getFirstValidPointInChart(chart);\n },\n terminate: function () {\n return keyboardNavigation.onHandlerTerminate();\n }\n });\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} handler\n * @param {number} keyCode\n * @return {number}\n * response\n */\n SeriesKeyboardNavigation.prototype.onKbdSideways = function (handler, keyCode) {\n var keys = this.keyCodes, isNext = keyCode === keys.right || keyCode === keys.down;\n return this.attemptHighlightAdjacentPoint(handler, isNext);\n };\n /**\n * When keyboard navigation inits.\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} handler The handler object\n * @return {number}\n * response\n */\n SeriesKeyboardNavigation.prototype.onHandlerInit = function (handler) {\n var chart = this.chart, kbdNavOptions = chart.options.accessibility.keyboardNavigation;\n if (kbdNavOptions.seriesNavigation.rememberPointFocus &&\n chart.highlightedPoint) {\n chart.highlightedPoint.highlight();\n }\n else {\n highlightFirstValidPointInChart(chart);\n }\n return handler.response.success;\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} handler\n * @param {number} keyCode\n * @return {number}\n * response\n */\n SeriesKeyboardNavigation.prototype.onKbdVertical = function (handler, keyCode) {\n var chart = this.chart, keys = this.keyCodes, isNext = keyCode === keys.down || keyCode === keys.right, navOptions = chart.options.accessibility.keyboardNavigation\n .seriesNavigation;\n // Handle serialized mode, act like left/right\n if (navOptions.mode && navOptions.mode === 'serialize') {\n return this.attemptHighlightAdjacentPoint(handler, isNext);\n }\n // Normal mode, move between series\n var highlightMethod = (chart.highlightedPoint &&\n chart.highlightedPoint.series.keyboardMoveVertical) ?\n 'highlightAdjacentPointVertical' :\n 'highlightAdjacentSeries';\n chart[highlightMethod](isNext);\n return handler.response.success;\n };\n /**\n * @private\n */\n SeriesKeyboardNavigation.prototype.onHandlerTerminate = function () {\n var chart = this.chart, kbdNavOptions = chart.options.accessibility.keyboardNavigation;\n if (chart.tooltip) {\n chart.tooltip.hide(0);\n }\n var hoverSeries = (chart.highlightedPoint && chart.highlightedPoint.series);\n if (hoverSeries && hoverSeries.onMouseOut) {\n hoverSeries.onMouseOut();\n }\n if (chart.highlightedPoint && chart.highlightedPoint.onMouseOut) {\n chart.highlightedPoint.onMouseOut();\n }\n if (!kbdNavOptions.seriesNavigation.rememberPointFocus) {\n delete chart.highlightedPoint;\n }\n };\n /**\n * Function that attempts to highlight next/prev point. Handles wrap around.\n * @private\n */\n SeriesKeyboardNavigation.prototype.attemptHighlightAdjacentPoint = function (handler, directionIsNext) {\n var chart = this.chart, wrapAround = chart.options.accessibility.keyboardNavigation\n .wrapAround, highlightSuccessful = chart.highlightAdjacentPoint(directionIsNext);\n if (!highlightSuccessful) {\n if (wrapAround && (directionIsNext ?\n highlightFirstValidPointInChart(chart) :\n highlightLastValidPointInChart(chart))) {\n return handler.response.success;\n }\n return handler.response[directionIsNext ? 'next' : 'prev'];\n }\n return handler.response.success;\n };\n /**\n * @private\n */\n SeriesKeyboardNavigation.prototype.onSeriesDestroy = function (series) {\n var chart = this.chart, currentHighlightedPointDestroyed = chart.highlightedPoint &&\n chart.highlightedPoint.series === series;\n if (currentHighlightedPointDestroyed) {\n delete chart.highlightedPoint;\n if (chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n }\n }\n };\n /**\n * @private\n */\n SeriesKeyboardNavigation.prototype.destroy = function () {\n this.eventProvider.removeAddedEvents();\n };\n return SeriesKeyboardNavigation;\n}());\n/* *\n *\n * Class Namespace\n *\n * */\n(function (SeriesKeyboardNavigation) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n /* *\n *\n * Functions\n *\n * */\n /**\n * Function to highlight next/previous point in chart.\n *\n * @private\n * @function Highcharts.Chart#highlightAdjacentPoint\n *\n * @param {boolean} next\n * Flag for the direction.\n *\n * @return {Highcharts.Point|boolean}\n * Returns highlighted point on success, false on failure (no adjacent point\n * to highlight in chosen direction).\n */\n function chartHighlightAdjacentPoint(next) {\n var chart = this, series = chart.series, curPoint = chart.highlightedPoint, curPointIndex = curPoint && getPointIndex(curPoint) || 0, curPoints = curPoint && curPoint.series.points || [], lastSeries = chart.series && chart.series[chart.series.length - 1], lastPoint = lastSeries &&\n lastSeries.points &&\n lastSeries.points[lastSeries.points.length - 1];\n var newSeries, newPoint;\n // If no points, return false\n if (!series[0] || !series[0].points) {\n return false;\n }\n if (!curPoint) {\n // No point is highlighted yet. Try first/last point depending on\n // move direction\n newPoint = next ? series[0].points[0] : lastPoint;\n }\n else {\n // We have a highlighted point. Grab next/prev point & series.\n newSeries = series[curPoint.series.index + (next ? 1 : -1)];\n newPoint = curPoints[curPointIndex + (next ? 1 : -1)];\n if (!newPoint && newSeries) {\n // Done with this series, try next one\n newPoint = newSeries.points[next ? 0 : newSeries.points.length - 1];\n }\n // If there is no adjacent point, we return false\n if (!newPoint) {\n return false;\n }\n }\n // Recursively skip points\n if (isSkipPoint(newPoint)) {\n // If we skip this whole series, move to the end of the series\n // before we recurse, just to optimize\n newSeries = newPoint.series;\n if (isSkipSeries(newSeries)) {\n chart.highlightedPoint = next ?\n newSeries.points[newSeries.points.length - 1] :\n newSeries.points[0];\n }\n else {\n // Otherwise, just move one point\n chart.highlightedPoint = newPoint;\n }\n // Retry\n return chart.highlightAdjacentPoint(next);\n }\n // There is an adjacent point, highlight it\n return newPoint.highlight();\n }\n /**\n * Highlight the closest point vertically.\n * @private\n */\n function chartHighlightAdjacentPointVertical(down) {\n var curPoint = this.highlightedPoint;\n var minDistance = Infinity, bestPoint;\n if (!defined(curPoint.plotX) || !defined(curPoint.plotY)) {\n return false;\n }\n this.series.forEach(function (series) {\n if (isSkipSeries(series)) {\n return;\n }\n series.points.forEach(function (point) {\n if (!defined(point.plotY) || !defined(point.plotX) ||\n point === curPoint) {\n return;\n }\n var yDistance = point.plotY - curPoint.plotY;\n var width = Math.abs(point.plotX - curPoint.plotX), distance = Math.abs(yDistance) * Math.abs(yDistance) +\n width * width * 4; // Weigh horizontal distance highly\n // Reverse distance number if axis is reversed\n if (series.yAxis && series.yAxis.reversed) {\n yDistance *= -1;\n }\n if (yDistance <= 0 && down || yDistance >= 0 && !down ||\n distance < 5 || // Points in same spot => infinite loop\n isSkipPoint(point)) {\n return;\n }\n if (distance < minDistance) {\n minDistance = distance;\n bestPoint = point;\n }\n });\n });\n return bestPoint ? bestPoint.highlight() : false;\n }\n /**\n * Highlight next/previous series in chart. Returns false if no adjacent\n * series in the direction, otherwise returns new highlighted point.\n * @private\n */\n function chartHighlightAdjacentSeries(down) {\n var chart = this, curPoint = chart.highlightedPoint, lastSeries = chart.series && chart.series[chart.series.length - 1], lastPoint = lastSeries && lastSeries.points &&\n lastSeries.points[lastSeries.points.length - 1];\n var newSeries, newPoint, adjacentNewPoint;\n // If no point is highlighted, highlight the first/last point\n if (!chart.highlightedPoint) {\n newSeries = down ? (chart.series && chart.series[0]) : lastSeries;\n newPoint = down ?\n (newSeries && newSeries.points && newSeries.points[0]) :\n lastPoint;\n return newPoint ? newPoint.highlight() : false;\n }\n newSeries = (chart.series[curPoint.series.index + (down ? -1 : 1)]);\n if (!newSeries) {\n return false;\n }\n // We have a new series in this direction, find the right point\n // Weigh xDistance as counting much higher than Y distance\n newPoint = getClosestPoint(curPoint, newSeries, 4);\n if (!newPoint) {\n return false;\n }\n // New series and point exists, but we might want to skip it\n if (isSkipSeries(newSeries)) {\n // Skip the series\n newPoint.highlight();\n // Try recurse\n adjacentNewPoint = chart.highlightAdjacentSeries(down);\n if (!adjacentNewPoint) {\n // Recurse failed\n curPoint.highlight();\n return false;\n }\n // Recurse succeeded\n return adjacentNewPoint;\n }\n // Highlight the new point or any first valid point back or forwards\n // from it\n newPoint.highlight();\n return newPoint.series.highlightNextValidPoint();\n }\n /**\n * @private\n */\n function compose(ChartClass, PointClass, SeriesClass) {\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.highlightAdjacentPoint = chartHighlightAdjacentPoint;\n chartProto.highlightAdjacentPointVertical = (chartHighlightAdjacentPointVertical);\n chartProto.highlightAdjacentSeries = chartHighlightAdjacentSeries;\n }\n if (composedClasses.indexOf(PointClass) === -1) {\n composedClasses.push(PointClass);\n var pointProto = PointClass.prototype;\n pointProto.highlight = pointHighlight;\n }\n if (composedClasses.indexOf(SeriesClass) === -1) {\n composedClasses.push(SeriesClass);\n var seriesProto = SeriesClass.prototype;\n /**\n * Set for which series types it makes sense to move to the closest\n * point with up/down arrows, and which series types should just\n * move to next series.\n * @private\n */\n seriesProto.keyboardMoveVertical = true;\n [\n 'column',\n 'gantt',\n 'pie'\n ].forEach(function (type) {\n if (seriesTypes[type]) {\n seriesTypes[type].prototype.keyboardMoveVertical = false;\n }\n });\n seriesProto.highlightNextValidPoint = (seriesHighlightNextValidPoint);\n }\n }\n SeriesKeyboardNavigation.compose = compose;\n /**\n * Get the point in a series that is closest (in pixel distance) to a\n * reference point. Optionally supply weight factors for x and y directions.\n * @private\n */\n function getClosestPoint(point, series, xWeight, yWeight) {\n var minDistance = Infinity, dPoint, minIx, distance, i = series.points.length;\n var hasUndefinedPosition = function (point) { return (!(defined(point.plotX) && defined(point.plotY))); };\n if (hasUndefinedPosition(point)) {\n return;\n }\n while (i--) {\n dPoint = series.points[i];\n if (hasUndefinedPosition(dPoint)) {\n continue;\n }\n distance = (point.plotX - dPoint.plotX) *\n (point.plotX - dPoint.plotX) *\n (xWeight || 1) +\n (point.plotY - dPoint.plotY) *\n (point.plotY - dPoint.plotY) *\n (yWeight || 1);\n if (distance < minDistance) {\n minDistance = distance;\n minIx = i;\n }\n }\n return defined(minIx) ? series.points[minIx] : void 0;\n }\n /**\n * Highlights a point (show tooltip, display hover state, focus element).\n *\n * @private\n * @function Highcharts.Point#highlight\n *\n * @return {Highcharts.Point}\n * This highlighted point.\n */\n function pointHighlight(highlightVisually) {\n if (highlightVisually === void 0) { highlightVisually = true; }\n var chart = this.series.chart;\n if (!this.isNull && highlightVisually) {\n this.onMouseOver(); // Show the hover marker and tooltip\n }\n else {\n if (chart.tooltip) {\n chart.tooltip.hide(0);\n }\n // Do not call blur on the element, as it messes up the focus of the\n // div element of the chart\n }\n scrollToPoint(this);\n // We focus only after calling onMouseOver because the state change can\n // change z-index and mess up the element.\n if (this.graphic) {\n chart.setFocusToElement(this.graphic);\n if (!highlightVisually && chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n }\n }\n chart.highlightedPoint = this;\n return this;\n }\n /**\n * Highlight first valid point in a series. Returns the point if\n * successfully highlighted, otherwise false. If there is a highlighted\n * point in the series, use that as starting point.\n *\n * @private\n * @function Highcharts.Series#highlightNextValidPoint\n */\n function seriesHighlightNextValidPoint() {\n var curPoint = this.chart.highlightedPoint, start = (curPoint && curPoint.series) === this ?\n getPointIndex(curPoint) :\n 0, points = this.points, len = points.length;\n if (points && len) {\n for (var i = start; i < len; ++i) {\n if (!isSkipPoint(points[i])) {\n return points[i].highlight();\n }\n }\n for (var j = start; j >= 0; --j) {\n if (!isSkipPoint(points[j])) {\n return points[j].highlight();\n }\n }\n }\n return false;\n }\n})(SeriesKeyboardNavigation || (SeriesKeyboardNavigation = {}));\n/* *\n *\n * Default Export\n *\n * */\nexport default SeriesKeyboardNavigation;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for series and points.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport AccessibilityComponent from '../../AccessibilityComponent.js';\nimport ChartUtilities from '../../Utils/ChartUtilities.js';\nvar hideSeriesFromAT = ChartUtilities.hideSeriesFromAT;\nimport ForcedMarkers from './ForcedMarkers.js';\nimport NewDataAnnouncer from './NewDataAnnouncer.js';\nimport SeriesDescriber from './SeriesDescriber.js';\nvar describeSeries = SeriesDescriber.describeSeries;\nimport SeriesKeyboardNavigation from './SeriesKeyboardNavigation.js';\nimport Tooltip from '../../../Core/Tooltip.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The SeriesComponent class\n *\n * @private\n * @class\n * @name Highcharts.SeriesComponent\n */\nvar SeriesComponent = /** @class */ (function (_super) {\n __extends(SeriesComponent, _super);\n function SeriesComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /* *\n *\n * Static Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * @private\n */\n SeriesComponent.compose = function (ChartClass, PointClass, SeriesClass) {\n NewDataAnnouncer.compose(SeriesClass);\n ForcedMarkers.compose(SeriesClass);\n SeriesKeyboardNavigation.compose(ChartClass, PointClass, SeriesClass);\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Init the component.\n */\n SeriesComponent.prototype.init = function () {\n this.newDataAnnouncer = new NewDataAnnouncer(this.chart);\n this.newDataAnnouncer.init();\n this.keyboardNavigation = new SeriesKeyboardNavigation(this.chart, this.keyCodes);\n this.keyboardNavigation.init();\n this.hideTooltipFromATWhenShown();\n this.hideSeriesLabelsFromATWhenShown();\n };\n /**\n * @private\n */\n SeriesComponent.prototype.hideTooltipFromATWhenShown = function () {\n var component = this;\n this.addEvent(Tooltip, 'refresh', function () {\n if (this.chart === component.chart &&\n this.label &&\n this.label.element) {\n this.label.element.setAttribute('aria-hidden', true);\n }\n });\n };\n /**\n * @private\n */\n SeriesComponent.prototype.hideSeriesLabelsFromATWhenShown = function () {\n this.addEvent(this.chart, 'afterDrawSeriesLabels', function () {\n this.series.forEach(function (series) {\n if (series.labelBySeries) {\n series.labelBySeries.attr('aria-hidden', true);\n }\n });\n });\n };\n /**\n * Called on chart render. It is necessary to do this for render in case\n * markers change on zoom/pixel density.\n */\n SeriesComponent.prototype.onChartRender = function () {\n var chart = this.chart;\n chart.series.forEach(function (series) {\n var shouldDescribeSeries = (series.options.accessibility &&\n series.options.accessibility.enabled) !== false &&\n series.visible;\n if (shouldDescribeSeries) {\n describeSeries(series);\n }\n else {\n hideSeriesFromAT(series);\n }\n });\n };\n /**\n * Get keyboard navigation handler for this component.\n * @private\n */\n SeriesComponent.prototype.getKeyboardNavigation = function () {\n return this.keyboardNavigation.getKeyboardNavigationHandler();\n };\n /**\n * Remove traces\n * @private\n */\n SeriesComponent.prototype.destroy = function () {\n this.newDataAnnouncer.destroy();\n this.keyboardNavigation.destroy();\n };\n return SeriesComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Default Export\n *\n * */\nexport default SeriesComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility component for chart zoom.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport AccessibilityComponent from '../AccessibilityComponent.js';\nimport CU from '../Utils/ChartUtilities.js';\nvar unhideChartElementFromAT = CU.unhideChartElementFromAT;\nimport HU from '../Utils/HTMLUtilities.js';\nvar getFakeMouseEvent = HU.getFakeMouseEvent;\nimport KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';\nimport U from '../../Core/Utilities.js';\nvar attr = U.attr, pick = U.pick;\n/* *\n *\n * Functions\n *\n * */\n/**\n * @private\n */\nfunction chartHasMapZoom(chart) {\n return !!((chart.mapView) &&\n chart.mapNavigation &&\n chart.mapNavigation.navButtons.length);\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * The ZoomComponent class\n *\n * @private\n * @class\n * @name Highcharts.ZoomComponent\n */\nvar ZoomComponent = /** @class */ (function (_super) {\n __extends(ZoomComponent, _super);\n function ZoomComponent() {\n /* *\n *\n * Properties\n *\n * */\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.focusedMapNavButtonIx = -1;\n return _this;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initialize the component\n */\n ZoomComponent.prototype.init = function () {\n var component = this, chart = this.chart;\n this.proxyProvider.addGroup('zoom', 'div');\n [\n 'afterShowResetZoom', 'afterApplyDrilldown', 'drillupall'\n ].forEach(function (eventType) {\n component.addEvent(chart, eventType, function () {\n component.updateProxyOverlays();\n });\n });\n };\n /**\n * Called when chart is updated\n */\n ZoomComponent.prototype.onChartUpdate = function () {\n var chart = this.chart, component = this;\n // Make map zoom buttons accessible\n if (chart.mapNavigation) {\n chart.mapNavigation.navButtons.forEach(function (button, i) {\n unhideChartElementFromAT(chart, button.element);\n component.setMapNavButtonAttrs(button.element, 'accessibility.zoom.mapZoom' + (i ? 'Out' : 'In'));\n });\n }\n };\n /**\n * @private\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} button\n * @param {string} labelFormatKey\n */\n ZoomComponent.prototype.setMapNavButtonAttrs = function (button, labelFormatKey) {\n var chart = this.chart, label = chart.langFormat(labelFormatKey, { chart: chart });\n attr(button, {\n tabindex: -1,\n role: 'button',\n 'aria-label': label\n });\n };\n /**\n * Update the proxy overlays on every new render to ensure positions are\n * correct.\n */\n ZoomComponent.prototype.onChartRender = function () {\n this.updateProxyOverlays();\n };\n /**\n * Update proxy overlays, recreating the buttons.\n */\n ZoomComponent.prototype.updateProxyOverlays = function () {\n var chart = this.chart;\n // Always start with a clean slate\n this.proxyProvider.clearGroup('zoom');\n if (chart.resetZoomButton) {\n this.createZoomProxyButton(chart.resetZoomButton, 'resetZoomProxyButton', chart.langFormat('accessibility.zoom.resetZoomButton', { chart: chart }));\n }\n if (chart.drillUpButton &&\n chart.breadcrumbs &&\n chart.breadcrumbs.list) {\n var lastBreadcrumb = chart.breadcrumbs.list[chart.breadcrumbs.list.length - 1];\n this.createZoomProxyButton(chart.drillUpButton, 'drillUpProxyButton', chart.langFormat('accessibility.drillUpButton', {\n chart: chart,\n buttonText: chart.breadcrumbs.getButtonText(lastBreadcrumb)\n }));\n }\n };\n /**\n * @private\n * @param {Highcharts.SVGElement} buttonEl\n * @param {string} buttonProp\n * @param {string} label\n */\n ZoomComponent.prototype.createZoomProxyButton = function (buttonEl, buttonProp, label) {\n this[buttonProp] = this.proxyProvider.addProxyElement('zoom', {\n click: buttonEl\n }, {\n 'aria-label': label,\n tabindex: -1\n });\n };\n /**\n * Get keyboard navigation handler for map zoom.\n * @private\n * @return {Highcharts.KeyboardNavigationHandler} The module object\n */\n ZoomComponent.prototype.getMapZoomNavigation = function () {\n var keys = this.keyCodes, chart = this.chart, component = this;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.up, keys.down, keys.left, keys.right],\n function (keyCode) {\n return component.onMapKbdArrow(this, keyCode);\n }\n ],\n [\n [keys.tab],\n function (_keyCode, e) {\n return component.onMapKbdTab(this, e);\n }\n ],\n [\n [keys.space, keys.enter],\n function () {\n return component.onMapKbdClick(this);\n }\n ]\n ],\n validate: function () {\n return chartHasMapZoom(chart);\n },\n init: function (direction) {\n return component.onMapNavInit(direction);\n }\n });\n };\n /**\n * Arrow key panning for maps.\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler The handler context.\n * @param {number} keyCode Key pressed.\n * @return {number} Response code\n */\n ZoomComponent.prototype.onMapKbdArrow = function (keyboardNavigationHandler, keyCode) {\n var chart = this.chart, keys = this.keyCodes, target = chart.container, isY = keyCode === keys.up || keyCode === keys.down, stepDirection = (keyCode === keys.left || keyCode === keys.up) ?\n 1 : -1, granularity = 10, diff = (isY ? chart.plotHeight : chart.plotWidth) /\n granularity * stepDirection, \n // Randomize since same mousedown coords twice is ignored in MapView\n r = Math.random() * 10, startPos = {\n x: target.offsetLeft + chart.plotLeft + chart.plotWidth / 2 + r,\n y: target.offsetTop + chart.plotTop + chart.plotHeight / 2 + r\n }, endPos = isY ? { x: startPos.x, y: startPos.y + diff } :\n { x: startPos.x + diff, y: startPos.y };\n [\n getFakeMouseEvent('mousedown', startPos),\n getFakeMouseEvent('mousemove', endPos),\n getFakeMouseEvent('mouseup', endPos)\n ].forEach(function (e) { return target.dispatchEvent(e); });\n return keyboardNavigationHandler.response.success;\n };\n /**\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler\n * @param {global.KeyboardEvent} event\n * @return {number} Response code\n */\n ZoomComponent.prototype.onMapKbdTab = function (keyboardNavigationHandler, event) {\n var chart = this.chart;\n var response = keyboardNavigationHandler.response;\n var isBackwards = event.shiftKey;\n var isMoveOutOfRange = isBackwards && !this.focusedMapNavButtonIx ||\n !isBackwards && this.focusedMapNavButtonIx;\n // Deselect old\n chart.mapNavigation.navButtons[this.focusedMapNavButtonIx].setState(0);\n if (isMoveOutOfRange) {\n if (chart.mapView) {\n chart.mapView.zoomBy(); // Reset zoom\n }\n return response[isBackwards ? 'prev' : 'next'];\n }\n // Select other button\n this.focusedMapNavButtonIx += isBackwards ? -1 : 1;\n var button = chart.mapNavigation.navButtons[this.focusedMapNavButtonIx];\n chart.setFocusToElement(button.box, button.element);\n button.setState(2);\n return response.success;\n };\n /**\n * Called on map button click.\n * @private\n * @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler The handler context object\n * @return {number} Response code\n */\n ZoomComponent.prototype.onMapKbdClick = function (keyboardNavigationHandler) {\n var el = this.chart.mapNavigation.navButtons[this.focusedMapNavButtonIx].element;\n this.fakeClickEvent(el);\n return keyboardNavigationHandler.response.success;\n };\n /**\n * @private\n * @param {number} direction\n */\n ZoomComponent.prototype.onMapNavInit = function (direction) {\n var chart = this.chart, zoomIn = chart.mapNavigation.navButtons[0], zoomOut = chart.mapNavigation.navButtons[1], initialButton = direction > 0 ? zoomIn : zoomOut;\n chart.setFocusToElement(initialButton.box, initialButton.element);\n initialButton.setState(2);\n this.focusedMapNavButtonIx = direction > 0 ? 0 : 1;\n };\n /**\n * Get keyboard navigation handler for a simple chart button. Provide the\n * button reference for the chart, and a function to call on click.\n *\n * @private\n * @param {string} buttonProp The property on chart referencing the button.\n * @return {Highcharts.KeyboardNavigationHandler} The module object\n */\n ZoomComponent.prototype.simpleButtonNavigation = function (buttonProp, proxyProp, onClick) {\n var keys = this.keyCodes, component = this, chart = this.chart;\n return new KeyboardNavigationHandler(chart, {\n keyCodeMap: [\n [\n [keys.tab, keys.up, keys.down, keys.left, keys.right],\n function (keyCode, e) {\n var isBackwards = (keyCode === keys.tab && e.shiftKey ||\n keyCode === keys.left ||\n keyCode === keys.up);\n // Arrow/tab => just move\n return this.response[isBackwards ? 'prev' : 'next'];\n }\n ],\n [\n [keys.space, keys.enter],\n function () {\n var res = onClick(this, chart);\n return pick(res, this.response.success);\n }\n ]\n ],\n validate: function () {\n var hasButton = (chart[buttonProp] &&\n chart[buttonProp].box &&\n component[proxyProp].buttonElement);\n return hasButton;\n },\n init: function () {\n chart.setFocusToElement(chart[buttonProp].box, component[proxyProp].buttonElement);\n }\n });\n };\n /**\n * Get keyboard navigation handlers for this component.\n * @return {Array}\n * List of module objects\n */\n ZoomComponent.prototype.getKeyboardNavigation = function () {\n return [\n this.simpleButtonNavigation('resetZoomButton', 'resetZoomProxyButton', function (_handler, chart) {\n chart.zoomOut();\n }),\n this.simpleButtonNavigation('drillUpButton', 'drillUpProxyButton', function (handler, chart) {\n chart.drillUp();\n return handler.response.prev;\n }),\n this.getMapZoomNavigation()\n ];\n };\n return ZoomComponent;\n}(AccessibilityComponent));\n/* *\n *\n * Default Export\n *\n * */\nexport default ZoomComponent;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Handling for Windows High Contrast Mode.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport H from '../Core/Globals.js';\nvar doc = H.doc, isMS = H.isMS, win = H.win;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Detect WHCM in the browser.\n *\n * @function Highcharts#isHighContrastModeActive\n * @private\n * @return {boolean} Returns true if the browser is in High Contrast mode.\n */\nfunction isHighContrastModeActive() {\n // Use media query on Edge, but not on IE\n var isEdge = /(Edg)/.test(win.navigator.userAgent);\n if (win.matchMedia && isEdge) {\n return win.matchMedia('(-ms-high-contrast: active)').matches;\n }\n // Test BG image for IE\n if (isMS && win.getComputedStyle) {\n var testDiv = doc.createElement('div');\n var imageSrc = 'data:image/gif;base64,' +\n 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n testDiv.style.backgroundImage = \"url(\".concat(imageSrc, \")\"); // #13071\n doc.body.appendChild(testDiv);\n var bi = (testDiv.currentStyle ||\n win.getComputedStyle(testDiv)).backgroundImage;\n doc.body.removeChild(testDiv);\n return bi === 'none';\n }\n // Other browsers use the forced-colors standard\n return win.matchMedia && win.matchMedia('(forced-colors: active)').matches;\n}\n/**\n * Force high contrast theme for the chart. The default theme is defined in\n * a separate file.\n *\n * @function Highcharts#setHighContrastTheme\n * @private\n * @param {Highcharts.AccessibilityChart} chart The chart to set the theme of.\n * @return {void}\n */\nfunction setHighContrastTheme(chart) {\n // We might want to add additional functionality here in the future for\n // storing the old state so that we can reset the theme if HC mode is\n // disabled. For now, the user will have to reload the page.\n chart.highContrastModeActive = true;\n // Apply theme to chart\n var theme = (chart.options.accessibility.highContrastTheme);\n chart.update(theme, false);\n // Force series colors (plotOptions is not enough)\n chart.series.forEach(function (s) {\n var plotOpts = theme.plotOptions[s.type] || {};\n s.update({\n color: plotOpts.color || 'windowText',\n colors: [plotOpts.color || 'windowText'],\n borderColor: plotOpts.borderColor || 'window'\n });\n // Force point colors if existing\n s.points.forEach(function (p) {\n if (p.options && p.options.color) {\n p.update({\n color: plotOpts.color || 'windowText',\n borderColor: plotOpts.borderColor || 'window'\n }, false);\n }\n });\n });\n // The redraw for each series and after is required for 3D pie\n // (workaround)\n chart.redraw();\n}\n/* *\n *\n * Default Export\n *\n * */\nvar whcm = {\n isHighContrastModeActive: isHighContrastModeActive,\n setHighContrastTheme: setHighContrastTheme\n};\nexport default whcm;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Default options for accessibility.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n/* eslint-disable max-len */\n/*\n * List of deprecated options:\n *\n * chart.description -> accessibility.description\n * chart.typeDescription -> accessibility.typeDescription\n * series.description -> series.accessibility.description\n * series.exposeElementToA11y -> series.accessibility.exposeAsGroupOnly\n * series.pointDescriptionFormatter ->\n * series.accessibility.pointDescriptionFormatter\n * series.accessibility.pointDescriptionFormatter ->\n * series.accessibility.point.descriptionFormatter\n * series.skipKeyboardNavigation ->\n * series.accessibility.keyboardNavigation.enabled\n * point.description -> point.accessibility.description !!!! WARNING: No longer deprecated and handled, removed for HC8.\n * axis.description -> axis.accessibility.description\n *\n * accessibility.pointDateFormat -> accessibility.point.dateFormat\n * accessibility.addTableShortcut -> Handled by screenReaderSection.beforeChartFormat\n * accessibility.pointDateFormatter -> accessibility.point.dateFormatter\n * accessibility.pointDescriptionFormatter -> accessibility.point.descriptionFormatter\n * accessibility.pointDescriptionThreshold -> accessibility.series.pointDescriptionEnabledThreshold\n * accessibility.pointNavigationThreshold -> accessibility.keyboardNavigation.seriesNavigation.pointNavigationEnabledThreshold\n * accessibility.pointValueDecimals -> accessibility.point.valueDecimals\n * accessibility.pointValuePrefix -> accessibility.point.valuePrefix\n * accessibility.pointValueSuffix -> accessibility.point.valueSuffix\n * accessibility.screenReaderSectionFormatter -> accessibility.screenReaderSection.beforeChartFormatter\n * accessibility.describeSingleSeries -> accessibility.series.describeSingleSeries\n * accessibility.seriesDescriptionFormatter -> accessibility.series.descriptionFormatter\n * accessibility.onTableAnchorClick -> accessibility.screenReaderSection.onViewDataTableClick\n * accessibility.axisRangeDateFormat -> accessibility.screenReaderSection.axisRangeDateFormat\n * accessibility.keyboardNavigation.skipNullPoints -> accessibility.keyboardNavigation.seriesNavigation.skipNullPoints\n * accessibility.keyboardNavigation.mode -> accessibility.keyboardNavigation.seriesNavigation.mode\n *\n * lang.accessibility.chartHeading -> no longer used, remove\n * lang.accessibility.legendItem -> lang.accessibility.legend.legendItem\n * lang.accessibility.legendLabel -> lang.accessibility.legend.legendLabel\n * lang.accessibility.mapZoomIn -> lang.accessibility.zoom.mapZoomIn\n * lang.accessibility.mapZoomOut -> lang.accessibility.zoom.mapZoomOut\n * lang.accessibility.resetZoomButton -> lang.accessibility.zoom.resetZoomButton\n * lang.accessibility.screenReaderRegionLabel -> lang.accessibility.screenReaderSection.beforeRegionLabel\n * lang.accessibility.rangeSelectorButton -> lang.accessibility.rangeSelector.buttonText\n * lang.accessibility.rangeSelectorMaxInput -> lang.accessibility.rangeSelector.maxInputLabel\n * lang.accessibility.rangeSelectorMinInput -> lang.accessibility.rangeSelector.minInputLabel\n * lang.accessibility.svgContainerEnd -> lang.accessibility.screenReaderSection.endOfChartMarker\n * lang.accessibility.viewAsDataTable -> lang.accessibility.table.viewAsDataTableButtonText\n * lang.accessibility.tableSummary -> lang.accessibility.table.tableSummary\n *\n */\n/* eslint-enable max-len */\n'use strict';\nimport U from '../../Core/Utilities.js';\nvar error = U.error, pick = U.pick;\n/* *\n *\n * Functions\n *\n * */\n/* eslint-disable valid-jsdoc */\n/**\n * Set a new option on a root prop, where the option is defined as an array of\n * suboptions.\n * @private\n * @param root\n * @param {Array} optionAsArray\n * @param {*} val\n * @return {void}\n */\nfunction traverseSetOption(root, optionAsArray, val) {\n var opt = root, prop, i = 0;\n for (; i < optionAsArray.length - 1; ++i) {\n prop = optionAsArray[i];\n opt = opt[prop] = pick(opt[prop], {});\n }\n opt[optionAsArray[optionAsArray.length - 1]] = val;\n}\n/**\n * If we have a clear root option node for old and new options and a mapping\n * between, we can use this generic function for the copy and warn logic.\n */\nfunction deprecateFromOptionsMap(chart, rootOldAsArray, rootNewAsArray, mapToNewOptions) {\n /**\n * @private\n */\n function getChildProp(root, propAsArray) {\n return propAsArray.reduce(function (acc, cur) {\n return acc[cur];\n }, root);\n }\n var rootOld = getChildProp(chart.options, rootOldAsArray), rootNew = getChildProp(chart.options, rootNewAsArray);\n Object.keys(mapToNewOptions).forEach(function (oldOptionKey) {\n var _a;\n var val = rootOld[oldOptionKey];\n if (typeof val !== 'undefined') {\n traverseSetOption(rootNew, mapToNewOptions[oldOptionKey], val);\n error(32, false, chart, (_a = {},\n _a[rootOldAsArray.join('.') + '.' + oldOptionKey] = (rootNewAsArray.join('.') + '.' +\n mapToNewOptions[oldOptionKey].join('.')),\n _a));\n }\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedChartOptions(chart) {\n var chartOptions = chart.options.chart, a11yOptions = chart.options.accessibility || {};\n ['description', 'typeDescription'].forEach(function (prop) {\n var _a;\n if (chartOptions[prop]) {\n a11yOptions[prop] = chartOptions[prop];\n error(32, false, chart, (_a = {}, _a[\"chart.\".concat(prop)] = \"use accessibility.\".concat(prop), _a));\n }\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedAxisOptions(chart) {\n chart.axes.forEach(function (axis) {\n var opts = axis.options;\n if (opts && opts.description) {\n opts.accessibility = opts.accessibility || {};\n opts.accessibility.description = opts.description;\n error(32, false, chart, {\n 'axis.description': 'use axis.accessibility.description'\n });\n }\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedSeriesOptions(chart) {\n // Map of deprecated series options. New options are defined as\n // arrays of paths under series.options.\n var oldToNewSeriesOptions = {\n description: ['accessibility', 'description'],\n exposeElementToA11y: ['accessibility', 'exposeAsGroupOnly'],\n pointDescriptionFormatter: [\n 'accessibility', 'point', 'descriptionFormatter'\n ],\n skipKeyboardNavigation: [\n 'accessibility', 'keyboardNavigation', 'enabled'\n ],\n 'accessibility.pointDescriptionFormatter': [\n 'accessibility', 'point', 'descriptionFormatter'\n ]\n };\n chart.series.forEach(function (series) {\n // Handle series wide options\n Object.keys(oldToNewSeriesOptions).forEach(function (oldOption) {\n var _a;\n var optionVal = series.options[oldOption];\n // Special case\n if (oldOption === 'accessibility.pointDescriptionFormatter') {\n optionVal = (series.options.accessibility &&\n series.options.accessibility\n .pointDescriptionFormatter);\n }\n if (typeof optionVal !== 'undefined') {\n // Set the new option\n traverseSetOption(series.options, oldToNewSeriesOptions[oldOption], \n // Note that skipKeyboardNavigation has inverted option\n // value, since we set enabled rather than disabled\n oldOption === 'skipKeyboardNavigation' ?\n !optionVal : optionVal);\n error(32, false, chart, (_a = {},\n _a[\"series.\".concat(oldOption)] = ('series.' +\n oldToNewSeriesOptions[oldOption].join('.')),\n _a));\n }\n });\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedTopLevelAccessibilityOptions(chart) {\n deprecateFromOptionsMap(chart, ['accessibility'], ['accessibility'], {\n pointDateFormat: ['point', 'dateFormat'],\n pointDateFormatter: ['point', 'dateFormatter'],\n pointDescriptionFormatter: ['point', 'descriptionFormatter'],\n pointDescriptionThreshold: ['series',\n 'pointDescriptionEnabledThreshold'],\n pointNavigationThreshold: ['keyboardNavigation', 'seriesNavigation',\n 'pointNavigationEnabledThreshold'],\n pointValueDecimals: ['point', 'valueDecimals'],\n pointValuePrefix: ['point', 'valuePrefix'],\n pointValueSuffix: ['point', 'valueSuffix'],\n screenReaderSectionFormatter: ['screenReaderSection',\n 'beforeChartFormatter'],\n describeSingleSeries: ['series', 'describeSingleSeries'],\n seriesDescriptionFormatter: ['series', 'descriptionFormatter'],\n onTableAnchorClick: ['screenReaderSection', 'onViewDataTableClick'],\n axisRangeDateFormat: ['screenReaderSection', 'axisRangeDateFormat']\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedKeyboardNavigationOptions(chart) {\n deprecateFromOptionsMap(chart, ['accessibility', 'keyboardNavigation'], ['accessibility', 'keyboardNavigation', 'seriesNavigation'], {\n skipNullPoints: ['skipNullPoints'],\n mode: ['mode']\n });\n}\n/**\n * @private\n */\nfunction copyDeprecatedLangOptions(chart) {\n deprecateFromOptionsMap(chart, ['lang', 'accessibility'], ['lang', 'accessibility'], {\n legendItem: ['legend', 'legendItem'],\n legendLabel: ['legend', 'legendLabel'],\n mapZoomIn: ['zoom', 'mapZoomIn'],\n mapZoomOut: ['zoom', 'mapZoomOut'],\n resetZoomButton: ['zoom', 'resetZoomButton'],\n screenReaderRegionLabel: ['screenReaderSection',\n 'beforeRegionLabel'],\n rangeSelectorButton: ['rangeSelector', 'buttonText'],\n rangeSelectorMaxInput: ['rangeSelector', 'maxInputLabel'],\n rangeSelectorMinInput: ['rangeSelector', 'minInputLabel'],\n svgContainerEnd: ['screenReaderSection', 'endOfChartMarker'],\n viewAsDataTable: ['table', 'viewAsDataTableButtonText'],\n tableSummary: ['table', 'tableSummary']\n });\n}\n/**\n * Copy options that are deprecated over to new options. Logs warnings to\n * console if deprecated options are used.\n *\n * @private\n */\nfunction copyDeprecatedOptions(chart) {\n copyDeprecatedChartOptions(chart);\n copyDeprecatedAxisOptions(chart);\n if (chart.series) {\n copyDeprecatedSeriesOptions(chart);\n }\n copyDeprecatedTopLevelAccessibilityOptions(chart);\n copyDeprecatedKeyboardNavigationOptions(chart);\n copyDeprecatedLangOptions(chart);\n}\n/* *\n *\n * Default Export\n *\n * */\nexport default copyDeprecatedOptions;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Accessibility module for Highcharts\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\nimport D from '../Core/Defaults.js';\nvar defaultOptions = D.defaultOptions;\nimport H from '../Core/Globals.js';\nvar doc = H.doc;\nimport U from '../Core/Utilities.js';\nvar addEvent = U.addEvent, extend = U.extend, fireEvent = U.fireEvent, merge = U.merge;\nimport HU from './Utils/HTMLUtilities.js';\nvar removeElement = HU.removeElement;\nimport A11yI18n from './A11yI18n.js';\nimport ContainerComponent from './Components/ContainerComponent.js';\nimport FocusBorder from './FocusBorder.js';\nimport InfoRegionsComponent from './Components/InfoRegionsComponent.js';\nimport KeyboardNavigation from './KeyboardNavigation.js';\nimport LegendComponent from './Components/LegendComponent.js';\nimport MenuComponent from './Components/MenuComponent.js';\nimport NewDataAnnouncer from './Components/SeriesComponent/NewDataAnnouncer.js';\nimport ProxyProvider from './ProxyProvider.js';\nimport RangeSelectorComponent from './Components/RangeSelectorComponent.js';\nimport SeriesComponent from './Components/SeriesComponent/SeriesComponent.js';\nimport ZoomComponent from './Components/ZoomComponent.js';\nimport whcm from './HighContrastMode.js';\nimport highContrastTheme from './HighContrastTheme.js';\nimport defaultOptionsA11Y from './Options/A11yDefaults.js';\nimport defaultLangOptions from './Options/LangDefaults.js';\nimport copyDeprecatedOptions from './Options/DeprecatedOptions.js';\n/* *\n *\n * Class\n *\n * */\n/**\n * The Accessibility class\n *\n * @private\n * @requires module:modules/accessibility\n *\n * @class\n * @name Highcharts.Accessibility\n *\n * @param {Highcharts.Chart} chart\n * Chart object\n */\nvar Accessibility = /** @class */ (function () {\n /* *\n *\n * Constructor\n *\n * */\n function Accessibility(chart) {\n /* *\n *\n * Properties\n *\n * */\n this.chart = void 0;\n this.components = void 0;\n this.keyboardNavigation = void 0;\n this.proxyProvider = void 0;\n this.init(chart);\n }\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Initialize the accessibility class\n * @private\n * @param {Highcharts.Chart} chart\n * Chart object\n */\n Accessibility.prototype.init = function (chart) {\n this.chart = chart;\n // Abort on old browsers\n if (!doc.addEventListener || !chart.renderer.isSVG) {\n this.zombie = true;\n this.components = {};\n chart.renderTo.setAttribute('aria-hidden', true);\n return;\n }\n // Copy over any deprecated options that are used. We could do this on\n // every update, but it is probably not needed.\n copyDeprecatedOptions(chart);\n this.proxyProvider = new ProxyProvider(this.chart);\n this.initComponents();\n this.keyboardNavigation = new KeyboardNavigation(chart, this.components);\n };\n /**\n * @private\n */\n Accessibility.prototype.initComponents = function () {\n var chart = this.chart;\n var proxyProvider = this.proxyProvider;\n var a11yOptions = chart.options.accessibility;\n this.components = {\n container: new ContainerComponent(),\n infoRegions: new InfoRegionsComponent(),\n legend: new LegendComponent(),\n chartMenu: new MenuComponent(),\n rangeSelector: new RangeSelectorComponent(),\n series: new SeriesComponent(),\n zoom: new ZoomComponent()\n };\n if (a11yOptions.customComponents) {\n extend(this.components, a11yOptions.customComponents);\n }\n var components = this.components;\n this.getComponentOrder().forEach(function (componentName) {\n components[componentName].initBase(chart, proxyProvider);\n components[componentName].init();\n });\n };\n /**\n * Get order to update components in.\n * @private\n */\n Accessibility.prototype.getComponentOrder = function () {\n if (!this.components) {\n return []; // For zombie accessibility object on old browsers\n }\n if (!this.components.series) {\n return Object.keys(this.components);\n }\n var componentsExceptSeries = Object.keys(this.components)\n .filter(function (c) { return c !== 'series'; });\n // Update series first, so that other components can read accessibility\n // info on points.\n return ['series'].concat(componentsExceptSeries);\n };\n /**\n * Update all components.\n */\n Accessibility.prototype.update = function () {\n var components = this.components, chart = this.chart, a11yOptions = chart.options.accessibility;\n fireEvent(chart, 'beforeA11yUpdate');\n // Update the chart type list as this is used by multiple modules\n chart.types = this.getChartTypes();\n // Update proxies. We don't update proxy positions since most likely we\n // need to recreate the proxies on update.\n var kbdNavOrder = a11yOptions.keyboardNavigation.order;\n this.proxyProvider.updateGroupOrder(kbdNavOrder);\n // Update markup\n this.getComponentOrder().forEach(function (componentName) {\n components[componentName].onChartUpdate();\n fireEvent(chart, 'afterA11yComponentUpdate', {\n name: componentName,\n component: components[componentName]\n });\n });\n // Update keyboard navigation\n this.keyboardNavigation.update(kbdNavOrder);\n // Handle high contrast mode\n if (!chart.highContrastModeActive && // Only do this once\n whcm.isHighContrastModeActive()) {\n whcm.setHighContrastTheme(chart);\n }\n fireEvent(chart, 'afterA11yUpdate', {\n accessibility: this\n });\n };\n /**\n * Destroy all elements.\n */\n Accessibility.prototype.destroy = function () {\n var chart = this.chart || {};\n // Destroy components\n var components = this.components;\n Object.keys(components).forEach(function (componentName) {\n components[componentName].destroy();\n components[componentName].destroyBase();\n });\n // Destroy proxy provider\n if (this.proxyProvider) {\n this.proxyProvider.destroy();\n }\n // Remove announcer container\n if (chart.announcerContainer) {\n removeElement(chart.announcerContainer);\n }\n // Kill keyboard nav\n if (this.keyboardNavigation) {\n this.keyboardNavigation.destroy();\n }\n // Hide container from screen readers if it exists\n if (chart.renderTo) {\n chart.renderTo.setAttribute('aria-hidden', true);\n }\n // Remove focus border if it exists\n if (chart.focusElement) {\n chart.focusElement.removeFocusBorder();\n }\n };\n /**\n * Return a list of the types of series we have in the chart.\n * @private\n */\n Accessibility.prototype.getChartTypes = function () {\n var types = {};\n this.chart.series.forEach(function (series) {\n types[series.type] = 1;\n });\n return Object.keys(types);\n };\n return Accessibility;\n}());\n/* *\n *\n * Class Namespace\n *\n * */\n(function (Accessibility) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n var composedClasses = [];\n Accessibility.i18nFormat = A11yI18n.i18nFormat;\n /* *\n *\n * Functions\n *\n * */\n /* eslint-disable valid-jsdoc */\n /**\n * Destroy with chart.\n * @private\n */\n function chartOnDestroy() {\n if (this.accessibility) {\n this.accessibility.destroy();\n }\n }\n /**\n * Handle updates to the module and send render updates to components.\n * @private\n */\n function chartOnRender() {\n // Update/destroy\n if (this.a11yDirty && this.renderTo) {\n delete this.a11yDirty;\n this.updateA11yEnabled();\n }\n var a11y = this.accessibility;\n if (a11y && !a11y.zombie) {\n a11y.proxyProvider.updateProxyElementPositions();\n a11y.getComponentOrder().forEach(function (componentName) {\n a11y.components[componentName].onChartRender();\n });\n }\n }\n /**\n * Update with chart/series/point updates.\n * @private\n */\n function chartOnUpdate(e) {\n // Merge new options\n var newOptions = e.options.accessibility;\n if (newOptions) {\n // Handle custom component updating specifically\n if (newOptions.customComponents) {\n this.options.accessibility.customComponents =\n newOptions.customComponents;\n delete newOptions.customComponents;\n }\n merge(true, this.options.accessibility, newOptions);\n // Recreate from scratch\n if (this.accessibility && this.accessibility.destroy) {\n this.accessibility.destroy();\n delete this.accessibility;\n }\n }\n // Mark dirty for update\n this.a11yDirty = true;\n }\n /**\n * @private\n */\n function chartUpdateA11yEnabled() {\n var a11y = this.accessibility;\n var accessibilityOptions = this.options.accessibility;\n if (accessibilityOptions && accessibilityOptions.enabled) {\n if (a11y && !a11y.zombie) {\n a11y.update();\n }\n else {\n this.accessibility = a11y = new Accessibility(this);\n if (a11y && !a11y.zombie) {\n a11y.update();\n }\n }\n }\n else if (a11y) {\n // Destroy if after update we have a11y and it is disabled\n if (a11y.destroy) {\n a11y.destroy();\n }\n delete this.accessibility;\n }\n else {\n // Just hide container\n this.renderTo.setAttribute('aria-hidden', true);\n }\n }\n /**\n * @private\n */\n function compose(ChartClass, LegendClass, PointClass, SeriesClass, SVGElementClass, RangeSelectorClass) {\n // ordered:\n KeyboardNavigation.compose(ChartClass);\n NewDataAnnouncer.compose(SeriesClass);\n LegendComponent.compose(ChartClass, LegendClass);\n MenuComponent.compose(ChartClass);\n SeriesComponent.compose(ChartClass, PointClass, SeriesClass);\n // RangeSelector\n A11yI18n.compose(ChartClass);\n FocusBorder.compose(ChartClass, SVGElementClass);\n if (RangeSelectorClass) {\n RangeSelectorComponent.compose(ChartClass, RangeSelectorClass);\n }\n if (composedClasses.indexOf(ChartClass) === -1) {\n composedClasses.push(ChartClass);\n var chartProto = ChartClass.prototype;\n chartProto.updateA11yEnabled = chartUpdateA11yEnabled;\n addEvent(ChartClass, 'destroy', chartOnDestroy);\n addEvent(ChartClass, 'render', chartOnRender);\n addEvent(ChartClass, 'update', chartOnUpdate);\n // Mark dirty for update\n ['addSeries', 'init'].forEach(function (event) {\n addEvent(ChartClass, event, function () {\n this.a11yDirty = true;\n });\n });\n // Direct updates (events happen after render)\n ['afterApplyDrilldown', 'drillupall'].forEach(function (event) {\n addEvent(ChartClass, event, function chartOnAfterDrilldown() {\n var a11y = this.accessibility;\n if (a11y && !a11y.zombie) {\n a11y.update();\n }\n });\n });\n }\n if (composedClasses.indexOf(PointClass) === -1) {\n composedClasses.push(PointClass);\n addEvent(PointClass, 'update', pointOnUpdate);\n }\n if (composedClasses.indexOf(SeriesClass) === -1) {\n composedClasses.push(SeriesClass);\n // Mark dirty for update\n ['update', 'updatedData', 'remove'].forEach(function (event) {\n addEvent(SeriesClass, event, function () {\n if (this.chart.accessibility) {\n this.chart.a11yDirty = true;\n }\n });\n });\n }\n }\n Accessibility.compose = compose;\n /**\n * Mark dirty for update.\n * @private\n */\n function pointOnUpdate() {\n if (this.series.chart.accessibility) {\n this.series.chart.a11yDirty = true;\n }\n }\n})(Accessibility || (Accessibility = {}));\n/* *\n *\n * Registry\n *\n * */\n// Add default options\nmerge(true, defaultOptions, defaultOptionsA11Y, {\n accessibility: {\n highContrastTheme: highContrastTheme\n },\n lang: defaultLangOptions\n});\n/* *\n *\n * Default Export\n *\n * */\nexport default Accessibility;\n","/* *\n *\n * (c) 2009-2021 Øystein Moseng\n *\n * Default options for accessibility.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n'use strict';\n/* *\n *\n * API Options\n *\n * */\n/**\n * Formatter callback for the accessibility announcement.\n *\n * @callback Highcharts.AccessibilityAnnouncementFormatter\n *\n * @param {Array} updatedSeries\n * Array of all series that received updates. If an announcement is already\n * queued, the series that received updates for that announcement are also\n * included in this array.\n *\n * @param {Highcharts.Series} [addedSeries]\n * This is provided if {@link Highcharts.Chart#addSeries} was called, and there\n * is a new series. In that case, this argument is a reference to the new\n * series.\n *\n * @param {Highcharts.Point} [addedPoint]\n * This is provided if {@link Highcharts.Series#addPoint} was called, and there\n * is a new point. In that case, this argument is a reference to the new point.\n *\n * @return {false|string}\n * The function should return a string with the text to announce to the user.\n * Return empty string to not announce anything. Return `false` to use the\n * default announcement format.\n */\n/**\n * @interface Highcharts.PointAccessibilityOptionsObject\n */ /**\n* Provide a description of the data point, announced to screen readers.\n* @name Highcharts.PointAccessibilityOptionsObject#description\n* @type {string|undefined}\n* @requires modules/accessibility\n* @since 7.1.0\n*/ /**\n* Enable or disable exposing the point to assistive technology\n* @name Highcharts.PointAccessibilityOptionsObject#enabled\n* @type {boolean|undefined}\n* @requires modules/accessibility\n* @since 9.0.1\n*/\n/* *\n * @interface Highcharts.PointOptionsObject in parts/Point.ts\n */ /**\n* @name Highcharts.PointOptionsObject#accessibility\n* @type {Highcharts.PointAccessibilityOptionsObject|undefined}\n* @requires modules/accessibility\n* @since 7.1.0\n*/\n/**\n * @callback Highcharts.ScreenReaderClickCallbackFunction\n *\n * @param {global.MouseEvent} evt\n * Mouse click event\n *\n * @return {void}\n */\n/**\n * Creates a formatted string for the screen reader module.\n *\n * @callback Highcharts.ScreenReaderFormatterCallbackFunction\n *\n * @param {T} context\n * Context to format\n *\n * @return {string}\n * Formatted string for the screen reader module.\n */\nvar Options = {\n /**\n * Options for configuring accessibility for the chart. Requires the\n * [accessibility module](https://code.highcharts.com/modules/accessibility.js)\n * to be loaded. For a description of the module and information\n * on its features, see\n * [Highcharts Accessibility](https://www.highcharts.com/docs/accessibility/accessibility-module).\n *\n * @since 5.0.0\n * @requires modules/accessibility\n * @optionparent accessibility\n */\n accessibility: {\n /**\n * Enable accessibility functionality for the chart. For more\n * information on how to include these features, and why this is\n * recommended, see [Highcharts Accessibility](https://www.highcharts.com/docs/accessibility/accessibility-module).\n *\n * Highcharts will by default emit a warning to the console if\n * the [accessibility module](https://code.highcharts.com/modules/accessibility.js)\n * is not loaded. Setting this option to `false` will override\n * and silence the warning.\n *\n * Once the module is loaded, setting this option to `false`\n * will disable the module for this chart.\n *\n * @since 5.0.0\n */\n enabled: true,\n /**\n * Accessibility options for the screen reader information sections\n * added before and after the chart.\n *\n * @since 8.0.0\n */\n screenReaderSection: {\n /**\n * Function to run upon clicking the \"View as Data Table\" link in\n * the screen reader region.\n *\n * By default Highcharts will insert and set focus to a data table\n * representation of the chart.\n *\n * @type {Highcharts.ScreenReaderClickCallbackFunction}\n * @since 8.0.0\n * @apioption accessibility.screenReaderSection.onViewDataTableClick\n */\n /**\n * Function to run upon clicking the \"Play as sound\" button in\n * the screen reader region.\n *\n * By default Highcharts will call the `chart.sonify` function.\n *\n * @type {Highcharts.ScreenReaderClickCallbackFunction}\n * @since 8.0.1\n * @apioption accessibility.screenReaderSection.onPlayAsSoundClick\n */\n /**\n * A formatter function to create the HTML contents of the hidden\n * screen reader information region before the chart. Receives one\n * argument, `chart`, referring to the chart object. Should return a\n * string with the HTML content of the region. By default this\n * returns an automatic description of the chart based on\n * [beforeChartFormat](#accessibility.screenReaderSection.beforeChartFormat).\n *\n * @type {Highcharts.ScreenReaderFormatterCallbackFunction}\n * @since 8.0.0\n * @apioption accessibility.screenReaderSection.beforeChartFormatter\n */\n /**\n * Format for the screen reader information region before the chart.\n * Supported HTML tags are ``, `

    `, `

    `, ``, `