@moduk/frontend 2.0.23 → 2.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/moduk-frontend.umd.js +1 -1
- package/client/moduk-frontend.umd.js.LICENSE.txt +21 -0
- package/client/moduk-frontend.umd.js.map +1 -1
- package/css/index.css +1 -1
- package/dist/client/moduk-frontend.umd.js +1 -1
- package/dist/client/moduk-frontend.umd.js.LICENSE.txt +21 -0
- package/dist/client/moduk-frontend.umd.js.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/lib/utils.js +4 -5
- package/dist/lib/utils.js.map +1 -1
- package/lib/utils.js +4 -5
- package/lib/utils.js.map +1 -1
- package/package.json +12 -12
- package/react/MODUKBody/MODUKBody.d.ts +1 -1
- package/react/MODUKBody/MODUKBody.d.ts.map +1 -1
- package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -1
- package/react/esm/MODUKBody/MODUKBody.js +2 -2
- package/react/esm/accordion/Accordion.js +2 -2
- package/react/esm/back-link/BackLink.js +2 -2
- package/react/esm/character-count/CharacterCount.js +2 -2
- package/react/esm/details/Details.js +2 -2
- package/react/esm/error-message/ErrorMessage.js +2 -2
- package/react/esm/fieldset/Fieldset.js +2 -2
- package/react/esm/fieldset/FieldsetLegend.js +2 -2
- package/react/esm/footer/Footer.js +2 -2
- package/react/esm/footer/FooterMetaLink.js +2 -2
- package/react/esm/footer/FooterNavigationLink.js +2 -2
- package/react/esm/header/Header.js +2 -2
- package/react/esm/header/HeaderNavigationItem.js +2 -2
- package/react/esm/header/HeaderNavigationLink.js +2 -2
- package/react/esm/hint/Hint.js +2 -2
- package/react/esm/input/Input.js +2 -2
- package/react/esm/inset-text/InsetText.js +2 -2
- package/react/esm/internal/Link/Link.js +2 -2
- package/react/esm/internal/hooks/useMODUKComponent/useMODUKComponent.js +10 -11
- package/react/esm/internal/hooks/usePrevious/usePrevious.js +1 -1
- package/react/esm/label/Label.js +2 -2
- package/react/esm/notification-banner/NotificationBanner.js +2 -2
- package/react/esm/phase-banner/PhaseBanner.js +2 -2
- package/react/esm/phase-banner/PhaseTag.js +2 -2
- package/react/esm/skip-link/SkipLink.js +2 -2
- package/react/esm/summary-list/SummaryList.js +2 -2
- package/react/esm/summary-list/SummaryListActionLink.js +2 -2
- package/react/esm/table/TableBody.js +2 -2
- package/react/esm/table/TableCaption.js +2 -2
- package/react/esm/table/TableCell.js +2 -2
- package/react/esm/table/TableColumnHeader.js +2 -2
- package/react/esm/table/TableHead.js +2 -2
- package/react/esm/table/TableRow.js +2 -2
- package/react/esm/table/TableRowHeader.js +2 -2
- package/react/esm/tag/Tag.js +2 -2
- package/react/esm/textarea/Textarea.js +2 -2
- package/react/esm/warning-text/WarningText.js +2 -2
- package/react/index.js +1 -1
- package/react/index.js.map +1 -1
- package/react/internal/hooks/useMODUKComponent/useMODUKComponent.d.ts +1 -1
- package/react/internal/test-utils/Root.d.ts.map +1 -1
- package/react/summary-list/SummaryCardActions.d.ts.map +1 -1
- package/react/summary-list/SummaryCardTitle.d.ts.map +1 -1
- package/react/summary-list/SummaryListActions.d.ts.map +1 -1
- package/react/summary-list/SummaryListKey.d.ts.map +1 -1
- package/react/summary-list/SummaryListValue.d.ts.map +1 -1
- package/assets/images/govuk-crest-2x.png +0 -0
- package/assets/images/govuk-crest.png +0 -0
- package/dist/assets/images/govuk-crest-2x.png +0 -0
- package/dist/assets/images/govuk-crest.png +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"moduk-frontend.umd.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAe,MAAID,IAEnBD,EAAY,MAAIC,GACjB,CATD,CASGK,MAAM,WACT,+BCTA,IAAIC,EAAsB,CCA1BA,EAAwB,SAASL,EAASM,GACzC,IAAI,IAA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EAAKwB,gBAGVxB,EAAKtZ,aAAa,gBAAiB,QACnCsZ,EAAKwB,cAActa,UAAUsH,IAAI,mCACjCwR,EAAKtZ,aAAa,WAAY,KAChC,CACA,aAAAga,GACE,OAAO5Y,KAAKqE,QAAQiD,cAAc,qDACpC,EC1QF,SAASyS,EAAQ/Y,GACf,IAAIgZ,EAEJ,GADAhZ,OAA2B,IAAXA,EAAyBA,EAAS,CAAC,GAC9C/B,IAEH,YADA2D,QAAQqX,IAAI,IAAIha,GAGlB,MAAMia,EAAa,CAAC,CAAC9V,EAAWpD,EAAOmZ,WAAY,CAAC5O,EAAQvK,EAAOoZ,QAAS,CAAChO,EAAgBpL,EAAOqZ,gBAAiB,CAACnK,GAAa,CAACe,EAAcjQ,EAAOsZ,cAAe,CAAChI,EAActR,EAAOuZ,cAAe,CAACpG,GAAS,CAACa,EAAoBhU,EAAOwZ,oBAAqB,CAACvF,EAAejU,EAAOyZ,eAAgB,CAACtE,GAAS,CAACK,GAAW,CAACS,IAChU/X,EAA2C,OAAjC8a,EAAgBhZ,EAAO0Z,OAAiBV,EAAgBjc,SACxEmc,EAAWhT,SAAQ,EAAErK,EAAWmE,MACZ9B,EAAO+G,iBAAiB,iBAAiBpJ,EAAU8N,gBAC3DzD,SAAQ9I,IAChB,IACE,aAAcvB,EAAY,IAAIA,EAAUuB,EAAU4C,GAAU,IAAInE,EAAUuB,EAC5E,CAAE,MAAOwY,GACPhU,QAAQqX,IAAIrD,EACd,IACA,GAEN,QDyPAK,EAAKtM,WAAa","sources":["webpack://MODUK/webpack/universalModuleDefinition","webpack://MODUK/webpack/bootstrap","webpack://MODUK/webpack/runtime/define property getters","webpack://MODUK/webpack/runtime/hasOwnProperty shorthand","webpack://MODUK/webpack/runtime/make namespace object","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/errors/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/i18n.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/header/header.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MODUK\"] = factory();\n\telse\n\t\troot[\"MODUK\"] = factory();\n})(self, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const version = '5.3.1';\n\nexport { version };\n//# sourceMappingURL=govuk-frontend-version.mjs.map\n","function normaliseString(value, property) {\n const trimmedValue = value ? value.trim() : '';\n let output;\n let outputType = property == null ? void 0 : property.type;\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean';\n }\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number';\n }\n }\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true';\n break;\n case 'number':\n output = Number(trimmedValue);\n break;\n default:\n output = value;\n }\n return output;\n}\n\n/**\n * @typedef {import('./index.mjs').SchemaProperty} SchemaProperty\n */\n\nexport { normaliseString };\n//# sourceMappingURL=normalise-string.mjs.map\n","import { normaliseString } from './normalise-string.mjs';\n\nfunction mergeConfigs(...configObjects) {\n const formattedConfigObject = {};\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key];\n const override = configObject[key];\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override);\n } else {\n formattedConfigObject[key] = override;\n }\n }\n }\n return formattedConfigObject;\n}\nfunction extractConfigByNamespace(Component, dataset, namespace) {\n const property = Component.schema.properties[namespace];\n if ((property == null ? void 0 : property.type) !== 'object') {\n return;\n }\n const newObject = {\n [namespace]: ({})\n };\n for (const [key, value] of Object.entries(dataset)) {\n let current = newObject;\n const keyParts = key.split('.');\n for (const [index, name] of keyParts.entries()) {\n if (typeof current === 'object') {\n if (index < keyParts.length - 1) {\n if (!isObject(current[name])) {\n current[name] = {};\n }\n current = current[name];\n } else if (key !== namespace) {\n current[name] = normaliseString(value);\n }\n }\n }\n }\n return newObject[namespace];\n}\nfunction getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined;\n }\n return url.split('#').pop();\n}\nfunction getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`;\n const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);\n return {\n property,\n value: value || undefined\n };\n}\nfunction setFocus($element, options = {}) {\n var _options$onBeforeFocu;\n const isFocusable = $element.getAttribute('tabindex');\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1');\n }\n function onFocus() {\n $element.addEventListener('blur', onBlur, {\n once: true\n });\n }\n function onBlur() {\n var _options$onBlur;\n (_options$onBlur = options.onBlur) == null || _options$onBlur.call($element);\n if (!isFocusable) {\n $element.removeAttribute('tabindex');\n }\n }\n $element.addEventListener('focus', onFocus, {\n once: true\n });\n (_options$onBeforeFocu = options.onBeforeFocus) == null || _options$onBeforeFocu.call($element);\n $element.focus();\n}\nfunction isSupported($scope = document.body) {\n if (!$scope) {\n return false;\n }\n return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction validateConfig(schema, config) {\n const validationErrors = [];\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = [];\n if (Array.isArray(conditions)) {\n for (const {\n required,\n errorMessage\n } of conditions) {\n if (!required.every(key => !!config[key])) {\n errors.push(errorMessage);\n }\n }\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors);\n }\n }\n }\n return validationErrors;\n}\nfunction isArray(option) {\n return Array.isArray(option);\n}\nfunction isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option);\n}\n\n/**\n * Schema for component config\n *\n * @typedef {object} Schema\n * @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties\n * @property {SchemaCondition[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n\n/**\n * Schema condition for component config\n *\n * @typedef {object} SchemaCondition\n * @property {string[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\nexport { extractConfigByNamespace, getBreakpoint, getFragmentFromUrl, isSupported, mergeConfigs, setFocus, validateConfig };\n//# sourceMappingURL=index.mjs.map\n","import { extractConfigByNamespace } from './index.mjs';\nimport { normaliseString } from './normalise-string.mjs';\n\nfunction normaliseDataset(Component, dataset) {\n const out = {};\n for (const [field, property] of Object.entries(Component.schema.properties)) {\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property);\n }\n if ((property == null ? void 0 : property.type) === 'object') {\n out[field] = extractConfigByNamespace(Component, dataset, field);\n }\n }\n return out;\n}\n\nexport { normaliseDataset };\n//# sourceMappingURL=normalise-dataset.mjs.map\n","class GOVUKFrontendError extends Error {\n constructor(...args) {\n super(...args);\n this.name = 'GOVUKFrontendError';\n }\n}\nclass SupportError extends GOVUKFrontendError {\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';\n super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type=\"module\">`');\n this.name = 'SupportError';\n }\n}\nclass ConfigError extends GOVUKFrontendError {\n constructor(...args) {\n super(...args);\n this.name = 'ConfigError';\n }\n}\nclass ElementError extends GOVUKFrontendError {\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';\n if (typeof messageOrOptions === 'object') {\n const {\n componentName,\n identifier,\n element,\n expectedType\n } = messageOrOptions;\n message = `${componentName}: ${identifier}`;\n message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n }\n super(message);\n this.name = 'ElementError';\n }\n}\n\nexport { ConfigError, ElementError, GOVUKFrontendError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isSupported } from './common/index.mjs';\nimport { SupportError } from './errors/index.mjs';\n\nclass GOVUKFrontendComponent {\n constructor() {\n this.checkSupport();\n }\n checkSupport() {\n if (!isSupported()) {\n throw new SupportError();\n }\n }\n}\n\nexport { GOVUKFrontendComponent };\n//# sourceMappingURL=govuk-frontend-component.mjs.map\n","class I18n {\n constructor(translations = {}, config = {}) {\n var _config$locale;\n this.translations = void 0;\n this.locale = void 0;\n this.translations = translations;\n this.locale = (_config$locale = config.locale) != null ? _config$locale : document.documentElement.lang || 'en';\n }\n t(lookupKey, options) {\n if (!lookupKey) {\n throw new Error('i18n: lookup key missing');\n }\n let translation = this.translations[lookupKey];\n if (typeof (options == null ? void 0 : options.count) === 'number' && typeof translation === 'object') {\n const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];\n if (translationPluralForm) {\n translation = translationPluralForm;\n }\n }\n if (typeof translation === 'string') {\n if (translation.match(/%{(.\\S+)}/)) {\n if (!options) {\n throw new Error('i18n: cannot replace placeholders in string if no option data provided');\n }\n return this.replacePlaceholders(translation, options);\n }\n return translation;\n }\n return lookupKey;\n }\n replacePlaceholders(translationString, options) {\n const formatter = Intl.NumberFormat.supportedLocalesOf(this.locale).length ? new Intl.NumberFormat(this.locale) : undefined;\n return translationString.replace(/%{(.\\S+)}/g, function (placeholderWithBraces, placeholderKey) {\n if (Object.prototype.hasOwnProperty.call(options, placeholderKey)) {\n const placeholderValue = options[placeholderKey];\n if (placeholderValue === false || typeof placeholderValue !== 'number' && typeof placeholderValue !== 'string') {\n return '';\n }\n if (typeof placeholderValue === 'number') {\n return formatter ? formatter.format(placeholderValue) : `${placeholderValue}`;\n }\n return placeholderValue;\n }\n throw new Error(`i18n: no data found to replace ${placeholderWithBraces} placeholder in string`);\n });\n }\n hasIntlPluralRulesSupport() {\n return Boolean('PluralRules' in window.Intl && Intl.PluralRules.supportedLocalesOf(this.locale).length);\n }\n getPluralSuffix(lookupKey, count) {\n count = Number(count);\n if (!isFinite(count)) {\n return 'other';\n }\n const translation = this.translations[lookupKey];\n const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);\n if (typeof translation === 'object') {\n if (preferredForm in translation) {\n return preferredForm;\n } else if ('other' in translation) {\n console.warn(`i18n: Missing plural form \".${preferredForm}\" for \"${this.locale}\" locale. Falling back to \".other\".`);\n return 'other';\n }\n }\n throw new Error(`i18n: Plural form \".other\" is required for \"${this.locale}\" locale`);\n }\n selectPluralFormUsingFallbackRules(count) {\n count = Math.abs(Math.floor(count));\n const ruleset = this.getPluralRulesForLocale();\n if (ruleset) {\n return I18n.pluralRules[ruleset](count);\n }\n return 'other';\n }\n getPluralRulesForLocale() {\n const localeShort = this.locale.split('-')[0];\n for (const pluralRule in I18n.pluralRulesMap) {\n const languages = I18n.pluralRulesMap[pluralRule];\n if (languages.includes(this.locale) || languages.includes(localeShort)) {\n return pluralRule;\n }\n }\n }\n}\nI18n.pluralRulesMap = {\n arabic: ['ar'],\n chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],\n french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],\n german: ['af', 'sq', 'az', 'eu', 'bg', 'ca', 'da', 'nl', 'en', 'et', 'fi', 'ka', 'de', 'el', 'hu', 'lb', 'no', 'so', 'sw', 'sv', 'ta', 'te', 'tr', 'ur'],\n irish: ['ga'],\n russian: ['ru', 'uk'],\n scottish: ['gd'],\n spanish: ['pt-PT', 'it', 'es'],\n welsh: ['cy']\n};\nI18n.pluralRules = {\n arabic(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n % 100 >= 3 && n % 100 <= 10) {\n return 'few';\n }\n if (n % 100 >= 11 && n % 100 <= 99) {\n return 'many';\n }\n return 'other';\n },\n chinese() {\n return 'other';\n },\n french(n) {\n return n === 0 || n === 1 ? 'one' : 'other';\n },\n german(n) {\n return n === 1 ? 'one' : 'other';\n },\n irish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n >= 3 && n <= 6) {\n return 'few';\n }\n if (n >= 7 && n <= 10) {\n return 'many';\n }\n return 'other';\n },\n russian(n) {\n const lastTwo = n % 100;\n const last = lastTwo % 10;\n if (last === 1 && lastTwo !== 11) {\n return 'one';\n }\n if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 'few';\n }\n if (last === 0 || last >= 5 && last <= 9 || lastTwo >= 11 && lastTwo <= 14) {\n return 'many';\n }\n return 'other';\n },\n scottish(n) {\n if (n === 1 || n === 11) {\n return 'one';\n }\n if (n === 2 || n === 12) {\n return 'two';\n }\n if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {\n return 'few';\n }\n return 'other';\n },\n spanish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n % 1000000 === 0 && n !== 0) {\n return 'many';\n }\n return 'other';\n },\n welsh(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n === 3) {\n return 'few';\n }\n if (n === 6) {\n return 'many';\n }\n return 'other';\n }\n};\n\nexport { I18n };\n//# sourceMappingURL=i18n.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Accordion component\n *\n * This allows a collection of sections to be collapsed by default, showing only\n * their headers. Sections can be expanded or collapsed individually by clicking\n * their headers. A \"Show all sections\" button is also added to the top of the\n * accordion, which switches to \"Hide all sections\" when all the sections are\n * expanded.\n *\n * The state of each section is saved to the DOM via the `aria-expanded`\n * attribute, which also provides accessibility.\n *\n * @preserve\n */\nclass Accordion extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for accordion\n * @param {AccordionConfig} [config] - Accordion config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.controlsClass = 'govuk-accordion__controls';\n this.showAllClass = 'govuk-accordion__show-all';\n this.showAllTextClass = 'govuk-accordion__show-all-text';\n this.sectionClass = 'govuk-accordion__section';\n this.sectionExpandedClass = 'govuk-accordion__section--expanded';\n this.sectionButtonClass = 'govuk-accordion__section-button';\n this.sectionHeaderClass = 'govuk-accordion__section-header';\n this.sectionHeadingClass = 'govuk-accordion__section-heading';\n this.sectionHeadingDividerClass = 'govuk-accordion__section-heading-divider';\n this.sectionHeadingTextClass = 'govuk-accordion__section-heading-text';\n this.sectionHeadingTextFocusClass = 'govuk-accordion__section-heading-text-focus';\n this.sectionShowHideToggleClass = 'govuk-accordion__section-toggle';\n this.sectionShowHideToggleFocusClass = 'govuk-accordion__section-toggle-focus';\n this.sectionShowHideTextClass = 'govuk-accordion__section-toggle-text';\n this.upChevronIconClass = 'govuk-accordion-nav__chevron';\n this.downChevronIconClass = 'govuk-accordion-nav__chevron--down';\n this.sectionSummaryClass = 'govuk-accordion__section-summary';\n this.sectionSummaryFocusClass = 'govuk-accordion__section-summary-focus';\n this.sectionContentClass = 'govuk-accordion__section-content';\n this.$sections = void 0;\n this.browserSupportsSessionStorage = false;\n this.$showAllButton = null;\n this.$showAllIcon = null;\n this.$showAllText = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Accordion',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(Accordion.defaults, config, normaliseDataset(Accordion, $module.dataset));\n this.i18n = new I18n(this.config.i18n);\n const $sections = this.$module.querySelectorAll(`.${this.sectionClass}`);\n if (!$sections.length) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Sections (\\`<div class=\"${this.sectionClass}\">\\`)`\n });\n }\n this.$sections = $sections;\n this.browserSupportsSessionStorage = helper.checkForSessionStorage();\n this.initControls();\n this.initSectionHeaders();\n const areAllSectionsOpen = this.checkIfAllSectionsOpen();\n this.updateShowAllButton(areAllSectionsOpen);\n }\n initControls() {\n this.$showAllButton = document.createElement('button');\n this.$showAllButton.setAttribute('type', 'button');\n this.$showAllButton.setAttribute('class', this.showAllClass);\n this.$showAllButton.setAttribute('aria-expanded', 'false');\n this.$showAllIcon = document.createElement('span');\n this.$showAllIcon.classList.add(this.upChevronIconClass);\n this.$showAllButton.appendChild(this.$showAllIcon);\n const $accordionControls = document.createElement('div');\n $accordionControls.setAttribute('class', this.controlsClass);\n $accordionControls.appendChild(this.$showAllButton);\n this.$module.insertBefore($accordionControls, this.$module.firstChild);\n this.$showAllText = document.createElement('span');\n this.$showAllText.classList.add(this.showAllTextClass);\n this.$showAllButton.appendChild(this.$showAllText);\n this.$showAllButton.addEventListener('click', () => this.onShowOrHideAllToggle());\n if ('onbeforematch' in document) {\n document.addEventListener('beforematch', event => this.onBeforeMatch(event));\n }\n }\n initSectionHeaders() {\n this.$sections.forEach(($section, i) => {\n const $header = $section.querySelector(`.${this.sectionHeaderClass}`);\n if (!$header) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section headers (\\`<div class=\"${this.sectionHeaderClass}\">\\`)`\n });\n }\n this.constructHeaderMarkup($header, i);\n this.setExpanded(this.isExpanded($section), $section);\n $header.addEventListener('click', () => this.onSectionToggle($section));\n this.setInitialState($section);\n });\n }\n constructHeaderMarkup($header, index) {\n const $span = $header.querySelector(`.${this.sectionButtonClass}`);\n const $heading = $header.querySelector(`.${this.sectionHeadingClass}`);\n const $summary = $header.querySelector(`.${this.sectionSummaryClass}`);\n if (!$heading) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section heading (\\`.${this.sectionHeadingClass}\\`)`\n });\n }\n if (!$span) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section button placeholder (\\`<span class=\"${this.sectionButtonClass}\">\\`)`\n });\n }\n const $button = document.createElement('button');\n $button.setAttribute('type', 'button');\n $button.setAttribute('aria-controls', `${this.$module.id}-content-${index + 1}`);\n for (const attr of Array.from($span.attributes)) {\n if (attr.nodeName !== 'id') {\n $button.setAttribute(attr.nodeName, `${attr.nodeValue}`);\n }\n }\n const $headingText = document.createElement('span');\n $headingText.classList.add(this.sectionHeadingTextClass);\n $headingText.id = $span.id;\n const $headingTextFocus = document.createElement('span');\n $headingTextFocus.classList.add(this.sectionHeadingTextFocusClass);\n $headingText.appendChild($headingTextFocus);\n $headingTextFocus.innerHTML = $span.innerHTML;\n const $showHideToggle = document.createElement('span');\n $showHideToggle.classList.add(this.sectionShowHideToggleClass);\n $showHideToggle.setAttribute('data-nosnippet', '');\n const $showHideToggleFocus = document.createElement('span');\n $showHideToggleFocus.classList.add(this.sectionShowHideToggleFocusClass);\n $showHideToggle.appendChild($showHideToggleFocus);\n const $showHideText = document.createElement('span');\n const $showHideIcon = document.createElement('span');\n $showHideIcon.classList.add(this.upChevronIconClass);\n $showHideToggleFocus.appendChild($showHideIcon);\n $showHideText.classList.add(this.sectionShowHideTextClass);\n $showHideToggleFocus.appendChild($showHideText);\n $button.appendChild($headingText);\n $button.appendChild(this.getButtonPunctuationEl());\n if ($summary != null && $summary.parentNode) {\n const $summarySpan = document.createElement('span');\n const $summarySpanFocus = document.createElement('span');\n $summarySpanFocus.classList.add(this.sectionSummaryFocusClass);\n $summarySpan.appendChild($summarySpanFocus);\n for (const attr of Array.from($summary.attributes)) {\n $summarySpan.setAttribute(attr.nodeName, `${attr.nodeValue}`);\n }\n $summarySpanFocus.innerHTML = $summary.innerHTML;\n $summary.parentNode.replaceChild($summarySpan, $summary);\n $button.appendChild($summarySpan);\n $button.appendChild(this.getButtonPunctuationEl());\n }\n $button.appendChild($showHideToggle);\n $heading.removeChild($span);\n $heading.appendChild($button);\n }\n onBeforeMatch(event) {\n const $fragment = event.target;\n if (!($fragment instanceof Element)) {\n return;\n }\n const $section = $fragment.closest(`.${this.sectionClass}`);\n if ($section) {\n this.setExpanded(true, $section);\n }\n }\n onSectionToggle($section) {\n const expanded = this.isExpanded($section);\n this.setExpanded(!expanded, $section);\n this.storeState($section);\n }\n onShowOrHideAllToggle() {\n const nowExpanded = !this.checkIfAllSectionsOpen();\n this.$sections.forEach($section => {\n this.setExpanded(nowExpanded, $section);\n this.storeState($section);\n });\n this.updateShowAllButton(nowExpanded);\n }\n setExpanded(expanded, $section) {\n const $showHideIcon = $section.querySelector(`.${this.upChevronIconClass}`);\n const $showHideText = $section.querySelector(`.${this.sectionShowHideTextClass}`);\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n const $content = $section.querySelector(`.${this.sectionContentClass}`);\n if (!$content) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section content (\\`<div class=\"${this.sectionContentClass}\">\\`)`\n });\n }\n if (!$showHideIcon || !$showHideText || !$button) {\n return;\n }\n const newButtonText = expanded ? this.i18n.t('hideSection') : this.i18n.t('showSection');\n $showHideText.textContent = newButtonText;\n $button.setAttribute('aria-expanded', `${expanded}`);\n const ariaLabelParts = [];\n const $headingText = $section.querySelector(`.${this.sectionHeadingTextClass}`);\n if ($headingText) {\n ariaLabelParts.push(`${$headingText.textContent}`.trim());\n }\n const $summary = $section.querySelector(`.${this.sectionSummaryClass}`);\n if ($summary) {\n ariaLabelParts.push(`${$summary.textContent}`.trim());\n }\n const ariaLabelMessage = expanded ? this.i18n.t('hideSectionAriaLabel') : this.i18n.t('showSectionAriaLabel');\n ariaLabelParts.push(ariaLabelMessage);\n $button.setAttribute('aria-label', ariaLabelParts.join(' , '));\n if (expanded) {\n $content.removeAttribute('hidden');\n $section.classList.add(this.sectionExpandedClass);\n $showHideIcon.classList.remove(this.downChevronIconClass);\n } else {\n $content.setAttribute('hidden', 'until-found');\n $section.classList.remove(this.sectionExpandedClass);\n $showHideIcon.classList.add(this.downChevronIconClass);\n }\n const areAllSectionsOpen = this.checkIfAllSectionsOpen();\n this.updateShowAllButton(areAllSectionsOpen);\n }\n isExpanded($section) {\n return $section.classList.contains(this.sectionExpandedClass);\n }\n checkIfAllSectionsOpen() {\n const sectionsCount = this.$sections.length;\n const expandedSectionCount = this.$module.querySelectorAll(`.${this.sectionExpandedClass}`).length;\n const areAllSectionsOpen = sectionsCount === expandedSectionCount;\n return areAllSectionsOpen;\n }\n updateShowAllButton(expanded) {\n if (!this.$showAllButton || !this.$showAllText || !this.$showAllIcon) {\n return;\n }\n this.$showAllButton.setAttribute('aria-expanded', expanded.toString());\n this.$showAllText.textContent = expanded ? this.i18n.t('hideAllSections') : this.i18n.t('showAllSections');\n this.$showAllIcon.classList.toggle(this.downChevronIconClass, !expanded);\n }\n storeState($section) {\n if (this.browserSupportsSessionStorage && this.config.rememberExpanded) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n if ($button) {\n const contentId = $button.getAttribute('aria-controls');\n const contentState = $button.getAttribute('aria-expanded');\n if (contentId && contentState) {\n window.sessionStorage.setItem(contentId, contentState);\n }\n }\n }\n }\n setInitialState($section) {\n if (this.browserSupportsSessionStorage && this.config.rememberExpanded) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n if ($button) {\n const contentId = $button.getAttribute('aria-controls');\n const contentState = contentId ? window.sessionStorage.getItem(contentId) : null;\n if (contentState !== null) {\n this.setExpanded(contentState === 'true', $section);\n }\n }\n }\n }\n getButtonPunctuationEl() {\n const $punctuationEl = document.createElement('span');\n $punctuationEl.classList.add('govuk-visually-hidden', this.sectionHeadingDividerClass);\n $punctuationEl.innerHTML = ', ';\n return $punctuationEl;\n }\n}\nAccordion.moduleName = 'govuk-accordion';\nAccordion.defaults = Object.freeze({\n i18n: {\n hideAllSections: 'Hide all sections',\n hideSection: 'Hide',\n hideSectionAriaLabel: 'Hide this section',\n showAllSections: 'Show all sections',\n showSection: 'Show',\n showSectionAriaLabel: 'Show this section'\n },\n rememberExpanded: true\n});\nAccordion.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n },\n rememberExpanded: {\n type: 'boolean'\n }\n }\n});\nconst helper = {\n /**\n * Check for `window.sessionStorage`, and that it actually works.\n *\n * @returns {boolean} True if session storage is available\n */\n checkForSessionStorage: function () {\n const testString = 'this is the test string';\n let result;\n try {\n window.sessionStorage.setItem(testString, testString);\n result = window.sessionStorage.getItem(testString) === testString.toString();\n window.sessionStorage.removeItem(testString);\n return result;\n } catch (exception) {\n return false;\n }\n }\n};\n\n/**\n * Accordion config\n *\n * @see {@link Accordion.defaults}\n * @typedef {object} AccordionConfig\n * @property {AccordionTranslations} [i18n=Accordion.defaults.i18n] - Accordion translations\n * @property {boolean} [rememberExpanded] - Whether the expanded and collapsed\n * state of each section is remembered and restored when navigating.\n */\n\n/**\n * Accordion translations\n *\n * @see {@link Accordion.defaults.i18n}\n * @typedef {object} AccordionTranslations\n *\n * Messages used by the component for the labels of its buttons. This includes\n * the visible text shown on screen, and text to help assistive technology users\n * for the buttons toggling each section.\n * @property {string} [hideAllSections] - The text content for the 'Hide all\n * sections' button, used when at least one section is expanded.\n * @property {string} [hideSection] - The text content for the 'Hide'\n * button, used when a section is expanded.\n * @property {string} [hideSectionAriaLabel] - The text content appended to the\n * 'Hide' button's accessible name when a section is expanded.\n * @property {string} [showAllSections] - The text content for the 'Show all\n * sections' button, used when all sections are collapsed.\n * @property {string} [showSection] - The text content for the 'Show'\n * button, used when a section is collapsed.\n * @property {string} [showSectionAriaLabel] - The text content appended to the\n * 'Show' button's accessible name when a section is expanded.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\n\nexport { Accordion };\n//# sourceMappingURL=accordion.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\n/**\n * JavaScript enhancements for the Button component\n *\n * @preserve\n */\nclass Button extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for button\n * @param {ButtonConfig} [config] - Button config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.debounceFormSubmitTimer = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Button',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(Button.defaults, config, normaliseDataset(Button, $module.dataset));\n this.$module.addEventListener('keydown', event => this.handleKeyDown(event));\n this.$module.addEventListener('click', event => this.debounce(event));\n }\n handleKeyDown(event) {\n const $target = event.target;\n if (event.key !== ' ') {\n return;\n }\n if ($target instanceof HTMLElement && $target.getAttribute('role') === 'button') {\n event.preventDefault();\n $target.click();\n }\n }\n debounce(event) {\n if (!this.config.preventDoubleClick) {\n return;\n }\n if (this.debounceFormSubmitTimer) {\n event.preventDefault();\n return false;\n }\n this.debounceFormSubmitTimer = window.setTimeout(() => {\n this.debounceFormSubmitTimer = null;\n }, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);\n }\n}\n\n/**\n * Button config\n *\n * @typedef {object} ButtonConfig\n * @property {boolean} [preventDoubleClick=false] - Prevent accidental double\n * clicks on submit buttons from submitting forms multiple times.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nButton.moduleName = 'govuk-button';\nButton.defaults = Object.freeze({\n preventDoubleClick: false\n});\nButton.schema = Object.freeze({\n properties: {\n preventDoubleClick: {\n type: 'boolean'\n }\n }\n});\n\nexport { Button };\n//# sourceMappingURL=button.mjs.map\n","function closestAttributeValue($element, attributeName) {\n const $closestElementWithAttribute = $element.closest(`[${attributeName}]`);\n return $closestElementWithAttribute ? $closestElementWithAttribute.getAttribute(attributeName) : null;\n}\n\nexport { closestAttributeValue };\n//# sourceMappingURL=closest-attribute-value.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { mergeConfigs, validateConfig } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError, ConfigError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Character count component\n *\n * Tracks the number of characters or words in the `.govuk-js-character-count`\n * `<textarea>` inside the element. Displays a message with the remaining number\n * of characters/words available, or the number of characters/words in excess.\n *\n * You can configure the message to only appear after a certain percentage\n * of the available characters/words has been entered.\n *\n * @preserve\n */\nclass CharacterCount extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for character count\n * @param {CharacterCountConfig} [config] - Character count config\n */\n constructor($module, config = {}) {\n var _ref, _this$config$maxwords;\n super();\n this.$module = void 0;\n this.$textarea = void 0;\n this.$visibleCountMessage = void 0;\n this.$screenReaderCountMessage = void 0;\n this.lastInputTimestamp = null;\n this.lastInputValue = '';\n this.valueChecker = null;\n this.config = void 0;\n this.i18n = void 0;\n this.maxLength = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Character count',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $textarea = $module.querySelector('.govuk-js-character-count');\n if (!($textarea instanceof HTMLTextAreaElement || $textarea instanceof HTMLInputElement)) {\n throw new ElementError({\n componentName: 'Character count',\n element: $textarea,\n expectedType: 'HTMLTextareaElement or HTMLInputElement',\n identifier: 'Form field (`.govuk-js-character-count`)'\n });\n }\n const datasetConfig = normaliseDataset(CharacterCount, $module.dataset);\n let configOverrides = {};\n if ('maxwords' in datasetConfig || 'maxlength' in datasetConfig) {\n configOverrides = {\n maxlength: undefined,\n maxwords: undefined\n };\n }\n this.config = mergeConfigs(CharacterCount.defaults, config, configOverrides, datasetConfig);\n const errors = validateConfig(CharacterCount.schema, this.config);\n if (errors[0]) {\n throw new ConfigError(`Character count: ${errors[0]}`);\n }\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue($module, 'lang')\n });\n this.maxLength = (_ref = (_this$config$maxwords = this.config.maxwords) != null ? _this$config$maxwords : this.config.maxlength) != null ? _ref : Infinity;\n this.$module = $module;\n this.$textarea = $textarea;\n const textareaDescriptionId = `${this.$textarea.id}-info`;\n const $textareaDescription = document.getElementById(textareaDescriptionId);\n if (!$textareaDescription) {\n throw new ElementError({\n componentName: 'Character count',\n element: $textareaDescription,\n identifier: `Count message (\\`id=\"${textareaDescriptionId}\"\\`)`\n });\n }\n if (`${$textareaDescription.textContent}`.match(/^\\s*$/)) {\n $textareaDescription.textContent = this.i18n.t('textareaDescription', {\n count: this.maxLength\n });\n }\n this.$textarea.insertAdjacentElement('afterend', $textareaDescription);\n const $screenReaderCountMessage = document.createElement('div');\n $screenReaderCountMessage.className = 'govuk-character-count__sr-status govuk-visually-hidden';\n $screenReaderCountMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderCountMessage = $screenReaderCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $screenReaderCountMessage);\n const $visibleCountMessage = document.createElement('div');\n $visibleCountMessage.className = $textareaDescription.className;\n $visibleCountMessage.classList.add('govuk-character-count__status');\n $visibleCountMessage.setAttribute('aria-hidden', 'true');\n this.$visibleCountMessage = $visibleCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $visibleCountMessage);\n $textareaDescription.classList.add('govuk-visually-hidden');\n this.$textarea.removeAttribute('maxlength');\n this.bindChangeEvents();\n window.addEventListener('pageshow', () => this.updateCountMessage());\n this.updateCountMessage();\n }\n bindChangeEvents() {\n this.$textarea.addEventListener('keyup', () => this.handleKeyUp());\n this.$textarea.addEventListener('focus', () => this.handleFocus());\n this.$textarea.addEventListener('blur', () => this.handleBlur());\n }\n handleKeyUp() {\n this.updateVisibleCountMessage();\n this.lastInputTimestamp = Date.now();\n }\n handleFocus() {\n this.valueChecker = window.setInterval(() => {\n if (!this.lastInputTimestamp || Date.now() - 500 >= this.lastInputTimestamp) {\n this.updateIfValueChanged();\n }\n }, 1000);\n }\n handleBlur() {\n if (this.valueChecker) {\n window.clearInterval(this.valueChecker);\n }\n }\n updateIfValueChanged() {\n if (this.$textarea.value !== this.lastInputValue) {\n this.lastInputValue = this.$textarea.value;\n this.updateCountMessage();\n }\n }\n updateCountMessage() {\n this.updateVisibleCountMessage();\n this.updateScreenReaderCountMessage();\n }\n updateVisibleCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const isError = remainingNumber < 0;\n this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());\n this.$textarea.classList.toggle('govuk-textarea--error', isError);\n this.$visibleCountMessage.classList.toggle('govuk-error-message', isError);\n this.$visibleCountMessage.classList.toggle('govuk-hint', !isError);\n this.$visibleCountMessage.textContent = this.getCountMessage();\n }\n updateScreenReaderCountMessage() {\n if (this.isOverThreshold()) {\n this.$screenReaderCountMessage.removeAttribute('aria-hidden');\n } else {\n this.$screenReaderCountMessage.setAttribute('aria-hidden', 'true');\n }\n this.$screenReaderCountMessage.textContent = this.getCountMessage();\n }\n count(text) {\n if (this.config.maxwords) {\n var _text$match;\n const tokens = (_text$match = text.match(/\\S+/g)) != null ? _text$match : [];\n return tokens.length;\n }\n return text.length;\n }\n getCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const countType = this.config.maxwords ? 'words' : 'characters';\n return this.formatCountMessage(remainingNumber, countType);\n }\n formatCountMessage(remainingNumber, countType) {\n if (remainingNumber === 0) {\n return this.i18n.t(`${countType}AtLimit`);\n }\n const translationKeySuffix = remainingNumber < 0 ? 'OverLimit' : 'UnderLimit';\n return this.i18n.t(`${countType}${translationKeySuffix}`, {\n count: Math.abs(remainingNumber)\n });\n }\n isOverThreshold() {\n if (!this.config.threshold) {\n return true;\n }\n const currentLength = this.count(this.$textarea.value);\n const maxLength = this.maxLength;\n const thresholdValue = maxLength * this.config.threshold / 100;\n return thresholdValue <= currentLength;\n }\n}\n\n/**\n * Character count config\n *\n * @see {@link CharacterCount.defaults}\n * @typedef {object} CharacterCountConfig\n * @property {number} [maxlength] - The maximum number of characters.\n * If maxwords is provided, the maxlength option will be ignored.\n * @property {number} [maxwords] - The maximum number of words. If maxwords is\n * provided, the maxlength option will be ignored.\n * @property {number} [threshold=0] - The percentage value of the limit at\n * which point the count message is displayed. If this attribute is set, the\n * count message will be hidden by default.\n * @property {CharacterCountTranslations} [i18n=CharacterCount.defaults.i18n] - Character count translations\n */\n\n/**\n * Character count translations\n *\n * @see {@link CharacterCount.defaults.i18n}\n * @typedef {object} CharacterCountTranslations\n *\n * Messages shown to users as they type. It provides feedback on how many words\n * or characters they have remaining or if they are over the limit. This also\n * includes a message used as an accessible description for the textarea.\n * @property {TranslationPluralForms} [charactersUnderLimit] - Message displayed\n * when the number of characters is under the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [charactersAtLimit] - Message displayed when the number of\n * characters reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [charactersOverLimit] - Message displayed\n * when the number of characters is over the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [wordsUnderLimit] - Message displayed when\n * the number of words is under the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [wordsAtLimit] - Message displayed when the number of\n * words reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [wordsOverLimit] - Message displayed when\n * the number of words is over the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [textareaDescription] - Message made\n * available to assistive technologies, if none is already present in the\n * HTML, to describe that the component accepts only a limited amount of\n * content. It is visible on the page when JavaScript is unavailable. The\n * component will replace the `%{count}` placeholder with the value of the\n * `maxlength` or `maxwords` parameter.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n * @typedef {import('../../i18n.mjs').TranslationPluralForms} TranslationPluralForms\n */\nCharacterCount.moduleName = 'govuk-character-count';\nCharacterCount.defaults = Object.freeze({\n threshold: 0,\n i18n: {\n charactersUnderLimit: {\n one: 'You have %{count} character remaining',\n other: 'You have %{count} characters remaining'\n },\n charactersAtLimit: 'You have 0 characters remaining',\n charactersOverLimit: {\n one: 'You have %{count} character too many',\n other: 'You have %{count} characters too many'\n },\n wordsUnderLimit: {\n one: 'You have %{count} word remaining',\n other: 'You have %{count} words remaining'\n },\n wordsAtLimit: 'You have 0 words remaining',\n wordsOverLimit: {\n one: 'You have %{count} word too many',\n other: 'You have %{count} words too many'\n },\n textareaDescription: {\n other: ''\n }\n }\n});\nCharacterCount.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n },\n maxwords: {\n type: 'number'\n },\n maxlength: {\n type: 'number'\n },\n threshold: {\n type: 'number'\n }\n },\n anyOf: [{\n required: ['maxwords'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }, {\n required: ['maxlength'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }]\n});\n\nexport { CharacterCount };\n//# sourceMappingURL=character-count.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Checkboxes component\n *\n * @preserve\n */\nclass Checkboxes extends GOVUKFrontendComponent {\n /**\n * Checkboxes can be associated with a 'conditionally revealed' content block\n * – for example, a checkbox for 'Phone' could reveal an additional form field\n * for the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the checkbox state.\n *\n * @param {Element | null} $module - HTML element to use for checkboxes\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$inputs = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Checkboxes',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $inputs = $module.querySelectorAll('input[type=\"checkbox\"]');\n if (!$inputs.length) {\n throw new ElementError({\n componentName: 'Checkboxes',\n identifier: 'Form inputs (`<input type=\"checkbox\">`)'\n });\n }\n this.$module = $module;\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n componentName: 'Checkboxes',\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);\n }\n }\n unCheckAllInputsExcept($input) {\n const allInputsWithSameName = document.querySelectorAll(`input[type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameName.forEach($inputWithSameName => {\n const hasSameFormOwner = $input.form === $inputWithSameName.form;\n if (hasSameFormOwner && $inputWithSameName !== $input) {\n $inputWithSameName.checked = false;\n this.syncConditionalRevealWithInputState($inputWithSameName);\n }\n });\n }\n unCheckExclusiveInputs($input) {\n const allInputsWithSameNameAndExclusiveBehaviour = document.querySelectorAll(`input[data-behaviour=\"exclusive\"][type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameNameAndExclusiveBehaviour.forEach($exclusiveInput => {\n const hasSameFormOwner = $input.form === $exclusiveInput.form;\n if (hasSameFormOwner) {\n $exclusiveInput.checked = false;\n this.syncConditionalRevealWithInputState($exclusiveInput);\n }\n });\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'checkbox') {\n return;\n }\n const hasAriaControls = $clickedInput.getAttribute('aria-controls');\n if (hasAriaControls) {\n this.syncConditionalRevealWithInputState($clickedInput);\n }\n if (!$clickedInput.checked) {\n return;\n }\n const hasBehaviourExclusive = $clickedInput.getAttribute('data-behaviour') === 'exclusive';\n if (hasBehaviourExclusive) {\n this.unCheckAllInputsExcept($clickedInput);\n } else {\n this.unCheckExclusiveInputs($clickedInput);\n }\n }\n}\nCheckboxes.moduleName = 'govuk-checkboxes';\n\nexport { Checkboxes };\n//# sourceMappingURL=checkboxes.mjs.map\n","import { mergeConfigs, setFocus, getFragmentFromUrl } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Error summary component\n *\n * Takes focus on initialisation for accessible announcement, unless disabled in\n * configuration.\n *\n * @preserve\n */\nclass ErrorSummary extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for error summary\n * @param {ErrorSummaryConfig} [config] - Error summary config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Error summary',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(ErrorSummary.defaults, config, normaliseDataset(ErrorSummary, $module.dataset));\n if (!this.config.disableAutoFocus) {\n setFocus(this.$module);\n }\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n handleClick(event) {\n const $target = event.target;\n if ($target && this.focusTarget($target)) {\n event.preventDefault();\n }\n }\n focusTarget($target) {\n if (!($target instanceof HTMLAnchorElement)) {\n return false;\n }\n const inputId = getFragmentFromUrl($target.href);\n if (!inputId) {\n return false;\n }\n const $input = document.getElementById(inputId);\n if (!$input) {\n return false;\n }\n const $legendOrLabel = this.getAssociatedLegendOrLabel($input);\n if (!$legendOrLabel) {\n return false;\n }\n $legendOrLabel.scrollIntoView();\n $input.focus({\n preventScroll: true\n });\n return true;\n }\n getAssociatedLegendOrLabel($input) {\n var _document$querySelect;\n const $fieldset = $input.closest('fieldset');\n if ($fieldset) {\n const $legends = $fieldset.getElementsByTagName('legend');\n if ($legends.length) {\n const $candidateLegend = $legends[0];\n if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {\n return $candidateLegend;\n }\n const legendTop = $candidateLegend.getBoundingClientRect().top;\n const inputRect = $input.getBoundingClientRect();\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return $candidateLegend;\n }\n }\n }\n }\n return (_document$querySelect = document.querySelector(`label[for='${$input.getAttribute('id')}']`)) != null ? _document$querySelect : $input.closest('label');\n }\n}\n\n/**\n * Error summary config\n *\n * @typedef {object} ErrorSummaryConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the error\n * summary will not be focussed when the page loads.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nErrorSummary.moduleName = 'govuk-error-summary';\nErrorSummary.defaults = Object.freeze({\n disableAutoFocus: false\n});\nErrorSummary.schema = Object.freeze({\n properties: {\n disableAutoFocus: {\n type: 'boolean'\n }\n }\n});\n\nexport { ErrorSummary };\n//# sourceMappingURL=error-summary.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Exit this page component\n *\n * @preserve\n */\nclass ExitThisPage extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element that wraps the Exit This Page button\n * @param {ExitThisPageConfig} [config] - Exit This Page config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.$button = void 0;\n this.$skiplinkButton = null;\n this.$updateSpan = null;\n this.$indicatorContainer = null;\n this.$overlay = null;\n this.keypressCounter = 0;\n this.lastKeyWasModified = false;\n this.timeoutTime = 5000;\n this.keypressTimeoutId = null;\n this.timeoutMessageId = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Exit this page',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $button = $module.querySelector('.govuk-exit-this-page__button');\n if (!($button instanceof HTMLAnchorElement)) {\n throw new ElementError({\n componentName: 'Exit this page',\n element: $button,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Button (`.govuk-exit-this-page__button`)'\n });\n }\n this.config = mergeConfigs(ExitThisPage.defaults, config, normaliseDataset(ExitThisPage, $module.dataset));\n this.i18n = new I18n(this.config.i18n);\n this.$module = $module;\n this.$button = $button;\n const $skiplinkButton = document.querySelector('.govuk-js-exit-this-page-skiplink');\n if ($skiplinkButton instanceof HTMLAnchorElement) {\n this.$skiplinkButton = $skiplinkButton;\n }\n this.buildIndicator();\n this.initUpdateSpan();\n this.initButtonClickHandler();\n if (!('govukFrontendExitThisPageKeypress' in document.body.dataset)) {\n document.addEventListener('keyup', this.handleKeypress.bind(this), true);\n document.body.dataset.govukFrontendExitThisPageKeypress = 'true';\n }\n window.addEventListener('pageshow', this.resetPage.bind(this));\n }\n initUpdateSpan() {\n this.$updateSpan = document.createElement('span');\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.className = 'govuk-visually-hidden';\n this.$module.appendChild(this.$updateSpan);\n }\n initButtonClickHandler() {\n this.$button.addEventListener('click', this.handleClick.bind(this));\n if (this.$skiplinkButton) {\n this.$skiplinkButton.addEventListener('click', this.handleClick.bind(this));\n }\n }\n buildIndicator() {\n this.$indicatorContainer = document.createElement('div');\n this.$indicatorContainer.className = 'govuk-exit-this-page__indicator';\n this.$indicatorContainer.setAttribute('aria-hidden', 'true');\n for (let i = 0; i < 3; i++) {\n const $indicator = document.createElement('div');\n $indicator.className = 'govuk-exit-this-page__indicator-light';\n this.$indicatorContainer.appendChild($indicator);\n }\n this.$button.appendChild(this.$indicatorContainer);\n }\n updateIndicator() {\n if (!this.$indicatorContainer) {\n return;\n }\n this.$indicatorContainer.classList.toggle('govuk-exit-this-page__indicator--visible', this.keypressCounter > 0);\n const $indicators = this.$indicatorContainer.querySelectorAll('.govuk-exit-this-page__indicator-light');\n $indicators.forEach(($indicator, index) => {\n $indicator.classList.toggle('govuk-exit-this-page__indicator-light--on', index < this.keypressCounter);\n });\n }\n exitPage() {\n if (!this.$updateSpan) {\n return;\n }\n this.$updateSpan.textContent = '';\n document.body.classList.add('govuk-exit-this-page-hide-content');\n this.$overlay = document.createElement('div');\n this.$overlay.className = 'govuk-exit-this-page-overlay';\n this.$overlay.setAttribute('role', 'alert');\n document.body.appendChild(this.$overlay);\n this.$overlay.textContent = this.i18n.t('activated');\n window.location.href = this.$button.href;\n }\n handleClick(event) {\n event.preventDefault();\n this.exitPage();\n }\n handleKeypress(event) {\n if (!this.$updateSpan) {\n return;\n }\n if (event.key === 'Shift' && !this.lastKeyWasModified) {\n this.keypressCounter += 1;\n this.updateIndicator();\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n this.timeoutMessageId = null;\n }\n if (this.keypressCounter >= 3) {\n this.keypressCounter = 0;\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n this.exitPage();\n } else {\n if (this.keypressCounter === 1) {\n this.$updateSpan.textContent = this.i18n.t('pressTwoMoreTimes');\n } else {\n this.$updateSpan.textContent = this.i18n.t('pressOneMoreTime');\n }\n }\n this.setKeypressTimer();\n } else if (this.keypressTimeoutId) {\n this.resetKeypressTimer();\n }\n this.lastKeyWasModified = event.shiftKey;\n }\n setKeypressTimer() {\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n this.keypressTimeoutId = window.setTimeout(this.resetKeypressTimer.bind(this), this.timeoutTime);\n }\n resetKeypressTimer() {\n if (!this.$updateSpan) {\n return;\n }\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n const $updateSpan = this.$updateSpan;\n this.keypressCounter = 0;\n $updateSpan.textContent = this.i18n.t('timedOut');\n this.timeoutMessageId = window.setTimeout(() => {\n $updateSpan.textContent = '';\n }, this.timeoutTime);\n this.updateIndicator();\n }\n resetPage() {\n document.body.classList.remove('govuk-exit-this-page-hide-content');\n if (this.$overlay) {\n this.$overlay.remove();\n this.$overlay = null;\n }\n if (this.$updateSpan) {\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.textContent = '';\n }\n this.updateIndicator();\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n }\n }\n}\n\n/**\n * Exit this Page config\n *\n * @see {@link ExitThisPage.defaults}\n * @typedef {object} ExitThisPageConfig\n * @property {ExitThisPageTranslations} [i18n=ExitThisPage.defaults.i18n] - Exit this page translations\n */\n\n/**\n * Exit this Page translations\n *\n * @see {@link ExitThisPage.defaults.i18n}\n * @typedef {object} ExitThisPageTranslations\n *\n * Messages used by the component programatically inserted text, including\n * overlay text and screen reader announcements.\n * @property {string} [activated] - Screen reader announcement for when EtP\n * keypress functionality has been successfully activated.\n * @property {string} [timedOut] - Screen reader announcement for when the EtP\n * keypress functionality has timed out.\n * @property {string} [pressTwoMoreTimes] - Screen reader announcement informing\n * the user they must press the activation key two more times.\n * @property {string} [pressOneMoreTime] - Screen reader announcement informing\n * the user they must press the activation key one more time.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nExitThisPage.moduleName = 'govuk-exit-this-page';\nExitThisPage.defaults = Object.freeze({\n i18n: {\n activated: 'Loading.',\n timedOut: 'Exit this page expired.',\n pressTwoMoreTimes: 'Shift, press 2 more times to exit.',\n pressOneMoreTime: 'Shift, press 1 more time to exit.'\n }\n});\nExitThisPage.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\n\nexport { ExitThisPage };\n//# sourceMappingURL=exit-this-page.mjs.map\n","import { getBreakpoint } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Header component\n *\n * @preserve\n */\nclass Header extends GOVUKFrontendComponent {\n /**\n * Apply a matchMedia for desktop which will trigger a state sync if the\n * browser viewport moves between states.\n *\n * @param {Element | null} $module - HTML element to use for header\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$menuButton = void 0;\n this.$menu = void 0;\n this.menuIsOpen = false;\n this.mql = null;\n if (!$module) {\n throw new ElementError({\n componentName: 'Header',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n const $menuButton = $module.querySelector('.govuk-js-header-toggle');\n if (!$menuButton) {\n return this;\n }\n const menuId = $menuButton.getAttribute('aria-controls');\n if (!menuId) {\n throw new ElementError({\n componentName: 'Header',\n identifier: 'Navigation button (`<button class=\"govuk-js-header-toggle\">`) attribute (`aria-controls`)'\n });\n }\n const $menu = document.getElementById(menuId);\n if (!$menu) {\n throw new ElementError({\n componentName: 'Header',\n element: $menu,\n identifier: `Navigation (\\`<ul id=\"${menuId}\">\\`)`\n });\n }\n this.$menu = $menu;\n this.$menuButton = $menuButton;\n this.setupResponsiveChecks();\n this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('desktop');\n if (!breakpoint.value) {\n throw new ElementError({\n componentName: 'Header',\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n if (!this.mql || !this.$menu || !this.$menuButton) {\n return;\n }\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden');\n this.$menuButton.setAttribute('hidden', '');\n } else {\n this.$menuButton.removeAttribute('hidden');\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden');\n } else {\n this.$menu.setAttribute('hidden', '');\n }\n }\n }\n handleMenuButtonClick() {\n this.menuIsOpen = !this.menuIsOpen;\n this.checkMode();\n }\n}\nHeader.moduleName = 'govuk-header';\n\nexport { Header };\n//# sourceMappingURL=header.mjs.map\n","import { mergeConfigs, setFocus } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Notification Banner component\n *\n * @preserve\n */\nclass NotificationBanner extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Notification banner',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(NotificationBanner.defaults, config, normaliseDataset(NotificationBanner, $module.dataset));\n if (this.$module.getAttribute('role') === 'alert' && !this.config.disableAutoFocus) {\n setFocus(this.$module);\n }\n }\n}\n\n/**\n * Notification banner config\n *\n * @typedef {object} NotificationBannerConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the\n * notification banner will not be focussed when the page loads. This only\n * applies if the component has a `role` of `alert` – in other cases the\n * component will not be focused on page load, regardless of this option.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nNotificationBanner.moduleName = 'govuk-notification-banner';\nNotificationBanner.defaults = Object.freeze({\n disableAutoFocus: false\n});\nNotificationBanner.schema = Object.freeze({\n properties: {\n disableAutoFocus: {\n type: 'boolean'\n }\n }\n});\n\nexport { NotificationBanner };\n//# sourceMappingURL=notification-banner.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Password input component\n *\n * @preserve\n */\nclass PasswordInput extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for password input\n * @param {PasswordInputConfig} [config] - Password input config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.$input = void 0;\n this.$showHideButton = void 0;\n this.$screenReaderStatusMessage = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Password input',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $input = $module.querySelector('.govuk-js-password-input-input');\n if (!($input instanceof HTMLInputElement)) {\n throw new ElementError({\n componentName: 'Password input',\n element: $input,\n expectedType: 'HTMLInputElement',\n identifier: 'Form field (`.govuk-js-password-input-input`)'\n });\n }\n if ($input.type !== 'password') {\n throw new ElementError('Password input: Form field (`.govuk-js-password-input-input`) must be of type `password`.');\n }\n const $showHideButton = $module.querySelector('.govuk-js-password-input-toggle');\n if (!($showHideButton instanceof HTMLButtonElement)) {\n throw new ElementError({\n componentName: 'Password input',\n element: $showHideButton,\n expectedType: 'HTMLButtonElement',\n identifier: 'Button (`.govuk-js-password-input-toggle`)'\n });\n }\n if ($showHideButton.type !== 'button') {\n throw new ElementError('Password input: Button (`.govuk-js-password-input-toggle`) must be of type `button`.');\n }\n this.$module = $module;\n this.$input = $input;\n this.$showHideButton = $showHideButton;\n this.config = mergeConfigs(PasswordInput.defaults, config, normaliseDataset(PasswordInput, $module.dataset));\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue($module, 'lang')\n });\n this.$showHideButton.removeAttribute('hidden');\n const $screenReaderStatusMessage = document.createElement('div');\n $screenReaderStatusMessage.className = 'govuk-password-input__sr-status govuk-visually-hidden';\n $screenReaderStatusMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderStatusMessage = $screenReaderStatusMessage;\n this.$input.insertAdjacentElement('afterend', $screenReaderStatusMessage);\n this.$showHideButton.addEventListener('click', this.toggle.bind(this));\n if (this.$input.form) {\n this.$input.form.addEventListener('submit', () => this.hide());\n }\n window.addEventListener('pageshow', event => {\n if (event.persisted && this.$input.type !== 'password') {\n this.hide();\n }\n });\n this.hide();\n }\n toggle(event) {\n event.preventDefault();\n if (this.$input.type === 'password') {\n this.show();\n return;\n }\n this.hide();\n }\n show() {\n this.setType('text');\n }\n hide() {\n this.setType('password');\n }\n setType(type) {\n if (type === this.$input.type) {\n return;\n }\n this.$input.setAttribute('type', type);\n const isHidden = type === 'password';\n const prefixButton = isHidden ? 'show' : 'hide';\n const prefixStatus = isHidden ? 'passwordHidden' : 'passwordShown';\n this.$showHideButton.innerText = this.i18n.t(`${prefixButton}Password`);\n this.$showHideButton.setAttribute('aria-label', this.i18n.t(`${prefixButton}PasswordAriaLabel`));\n this.$screenReaderStatusMessage.innerText = this.i18n.t(`${prefixStatus}Announcement`);\n }\n}\n\n/**\n * Password input config\n *\n * @typedef {object} PasswordInputConfig\n * @property {PasswordInputTranslations} [i18n=PasswordInput.defaults.i18n] - Password input translations\n */\n\n/**\n * Password input translations\n *\n * @see {@link PasswordInput.defaults.i18n}\n * @typedef {object} PasswordInputTranslations\n *\n * Messages displayed to the user indicating the state of the show/hide toggle.\n * @property {string} [showPassword] - Visible text of the button when the\n * password is currently hidden. Plain text only.\n * @property {string} [hidePassword] - Visible text of the button when the\n * password is currently visible. Plain text only.\n * @property {string} [showPasswordAriaLabel] - aria-label of the button when\n * the password is currently hidden. Plain text only.\n * @property {string} [hidePasswordAriaLabel] - aria-label of the button when\n * the password is currently visible. Plain text only.\n * @property {string} [passwordShownAnnouncement] - Screen reader\n * announcement to make when the password has just become visible.\n * Plain text only.\n * @property {string} [passwordHiddenAnnouncement] - Screen reader\n * announcement to make when the password has just been hidden.\n * Plain text only.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n * @typedef {import('../../i18n.mjs').TranslationPluralForms} TranslationPluralForms\n */\nPasswordInput.moduleName = 'govuk-password-input';\nPasswordInput.defaults = Object.freeze({\n i18n: {\n showPassword: 'Show',\n hidePassword: 'Hide',\n showPasswordAriaLabel: 'Show password',\n hidePasswordAriaLabel: 'Hide password',\n passwordShownAnnouncement: 'Your password is visible',\n passwordHiddenAnnouncement: 'Your password is hidden'\n }\n});\nPasswordInput.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\n\nexport { PasswordInput };\n//# sourceMappingURL=password-input.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Radios component\n *\n * @preserve\n */\nclass Radios extends GOVUKFrontendComponent {\n /**\n * Radios can be associated with a 'conditionally revealed' content block –\n * for example, a radio for 'Phone' could reveal an additional form field for\n * the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the radio state.\n *\n * @param {Element | null} $module - HTML element to use for radios\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$inputs = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Radios',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $inputs = $module.querySelectorAll('input[type=\"radio\"]');\n if (!$inputs.length) {\n throw new ElementError({\n componentName: 'Radios',\n identifier: 'Form inputs (`<input type=\"radio\">`)'\n });\n }\n this.$module = $module;\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n componentName: 'Radios',\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-radios__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);\n }\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'radio') {\n return;\n }\n const $allInputs = document.querySelectorAll('input[type=\"radio\"][aria-controls]');\n const $clickedInputForm = $clickedInput.form;\n const $clickedInputName = $clickedInput.name;\n $allInputs.forEach($input => {\n const hasSameFormOwner = $input.form === $clickedInputForm;\n const hasSameName = $input.name === $clickedInputName;\n if (hasSameName && hasSameFormOwner) {\n this.syncConditionalRevealWithInputState($input);\n }\n });\n }\n}\nRadios.moduleName = 'govuk-radios';\n\nexport { Radios };\n//# sourceMappingURL=radios.mjs.map\n","import { getFragmentFromUrl, setFocus } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Skip link component\n *\n * @preserve\n */\nclass SkipLink extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for skip link\n * @throws {ElementError} when $module is not set or the wrong type\n * @throws {ElementError} when $module.hash does not contain a hash\n * @throws {ElementError} when the linked element is missing or the wrong type\n */\n constructor($module) {\n var _this$$module$getAttr;\n super();\n this.$module = void 0;\n if (!($module instanceof HTMLAnchorElement)) {\n throw new ElementError({\n componentName: 'Skip link',\n element: $module,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n const hash = this.$module.hash;\n const href = (_this$$module$getAttr = this.$module.getAttribute('href')) != null ? _this$$module$getAttr : '';\n let url;\n try {\n url = new window.URL(this.$module.href);\n } catch (error) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) is invalid`);\n }\n if (url.origin !== window.location.origin || url.pathname !== window.location.pathname) {\n return;\n }\n const linkedElementId = getFragmentFromUrl(hash);\n if (!linkedElementId) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) has no hash fragment`);\n }\n const $linkedElement = document.getElementById(linkedElementId);\n if (!$linkedElement) {\n throw new ElementError({\n componentName: 'Skip link',\n element: $linkedElement,\n identifier: `Target content (\\`id=\"${linkedElementId}\"\\`)`\n });\n }\n this.$module.addEventListener('click', () => setFocus($linkedElement, {\n onBeforeFocus() {\n $linkedElement.classList.add('govuk-skip-link-focused-element');\n },\n onBlur() {\n $linkedElement.classList.remove('govuk-skip-link-focused-element');\n }\n }));\n }\n}\nSkipLink.moduleName = 'govuk-skip-link';\n\nexport { SkipLink };\n//# sourceMappingURL=skip-link.mjs.map\n","import { getBreakpoint, getFragmentFromUrl } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Tabs component\n *\n * @preserve\n */\nclass Tabs extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for tabs\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$tabs = void 0;\n this.$tabList = void 0;\n this.$tabListItems = void 0;\n this.jsHiddenClass = 'govuk-tabs__panel--hidden';\n this.changingHash = false;\n this.boundTabClick = void 0;\n this.boundTabKeydown = void 0;\n this.boundOnHashChange = void 0;\n this.mql = null;\n if (!$module) {\n throw new ElementError({\n componentName: 'Tabs',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $tabs = $module.querySelectorAll('a.govuk-tabs__tab');\n if (!$tabs.length) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n });\n }\n this.$module = $module;\n this.$tabs = $tabs;\n this.boundTabClick = this.onTabClick.bind(this);\n this.boundTabKeydown = this.onTabKeydown.bind(this);\n this.boundOnHashChange = this.onHashChange.bind(this);\n const $tabList = this.$module.querySelector('.govuk-tabs__list');\n const $tabListItems = this.$module.querySelectorAll('li.govuk-tabs__list-item');\n if (!$tabList) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n });\n }\n if (!$tabListItems.length) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'List items (`<li class=\"govuk-tabs__list-item\">`)'\n });\n }\n this.$tabList = $tabList;\n this.$tabListItems = $tabListItems;\n this.setupResponsiveChecks();\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet');\n if (!breakpoint.value) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n var _this$mql;\n if ((_this$mql = this.mql) != null && _this$mql.matches) {\n this.setup();\n } else {\n this.teardown();\n }\n }\n setup() {\n var _this$getTab;\n this.$tabList.setAttribute('role', 'tablist');\n this.$tabListItems.forEach($item => {\n $item.setAttribute('role', 'presentation');\n });\n this.$tabs.forEach($tab => {\n this.setAttributes($tab);\n $tab.addEventListener('click', this.boundTabClick, true);\n $tab.addEventListener('keydown', this.boundTabKeydown, true);\n this.hideTab($tab);\n });\n const $activeTab = (_this$getTab = this.getTab(window.location.hash)) != null ? _this$getTab : this.$tabs[0];\n this.showTab($activeTab);\n window.addEventListener('hashchange', this.boundOnHashChange, true);\n }\n teardown() {\n this.$tabList.removeAttribute('role');\n this.$tabListItems.forEach($item => {\n $item.removeAttribute('role');\n });\n this.$tabs.forEach($tab => {\n $tab.removeEventListener('click', this.boundTabClick, true);\n $tab.removeEventListener('keydown', this.boundTabKeydown, true);\n this.unsetAttributes($tab);\n });\n window.removeEventListener('hashchange', this.boundOnHashChange, true);\n }\n onHashChange() {\n const hash = window.location.hash;\n const $tabWithHash = this.getTab(hash);\n if (!$tabWithHash) {\n return;\n }\n if (this.changingHash) {\n this.changingHash = false;\n return;\n }\n const $previousTab = this.getCurrentTab();\n if (!$previousTab) {\n return;\n }\n this.hideTab($previousTab);\n this.showTab($tabWithHash);\n $tabWithHash.focus();\n }\n hideTab($tab) {\n this.unhighlightTab($tab);\n this.hidePanel($tab);\n }\n showTab($tab) {\n this.highlightTab($tab);\n this.showPanel($tab);\n }\n getTab(hash) {\n return this.$module.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`);\n }\n setAttributes($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return;\n }\n $tab.setAttribute('id', `tab_${panelId}`);\n $tab.setAttribute('role', 'tab');\n $tab.setAttribute('aria-controls', panelId);\n $tab.setAttribute('aria-selected', 'false');\n $tab.setAttribute('tabindex', '-1');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.setAttribute('role', 'tabpanel');\n $panel.setAttribute('aria-labelledby', $tab.id);\n $panel.classList.add(this.jsHiddenClass);\n }\n unsetAttributes($tab) {\n $tab.removeAttribute('id');\n $tab.removeAttribute('role');\n $tab.removeAttribute('aria-controls');\n $tab.removeAttribute('aria-selected');\n $tab.removeAttribute('tabindex');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.removeAttribute('role');\n $panel.removeAttribute('aria-labelledby');\n $panel.classList.remove(this.jsHiddenClass);\n }\n onTabClick(event) {\n const $currentTab = this.getCurrentTab();\n const $nextTab = event.currentTarget;\n if (!$currentTab || !($nextTab instanceof HTMLAnchorElement)) {\n return;\n }\n event.preventDefault();\n this.hideTab($currentTab);\n this.showTab($nextTab);\n this.createHistoryEntry($nextTab);\n }\n createHistoryEntry($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n const panelId = $panel.id;\n $panel.id = '';\n this.changingHash = true;\n window.location.hash = panelId;\n $panel.id = panelId;\n }\n onTabKeydown(event) {\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n case 'Left':\n case 'Up':\n this.activatePreviousTab();\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n case 'Right':\n case 'Down':\n this.activateNextTab();\n event.preventDefault();\n break;\n }\n }\n activateNextTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $nextTabListItem = $currentTab.parentElement.nextElementSibling;\n if (!$nextTabListItem) {\n return;\n }\n const $nextTab = $nextTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$nextTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($nextTab);\n $nextTab.focus();\n this.createHistoryEntry($nextTab);\n }\n activatePreviousTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $previousTabListItem = $currentTab.parentElement.previousElementSibling;\n if (!$previousTabListItem) {\n return;\n }\n const $previousTab = $previousTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$previousTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($previousTab);\n $previousTab.focus();\n this.createHistoryEntry($previousTab);\n }\n getPanel($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return null;\n }\n return this.$module.querySelector(`#${panelId}`);\n }\n showPanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.remove(this.jsHiddenClass);\n }\n hidePanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.add(this.jsHiddenClass);\n }\n unhighlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'false');\n $tab.parentElement.classList.remove('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '-1');\n }\n highlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'true');\n $tab.parentElement.classList.add('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '0');\n }\n getCurrentTab() {\n return this.$module.querySelector('.govuk-tabs__list-item--selected a.govuk-tabs__tab');\n }\n}\nTabs.moduleName = 'govuk-tabs';\n\nexport { Tabs };\n//# sourceMappingURL=tabs.mjs.map\n","export { version } from './common/govuk-frontend-version.mjs';\nimport { isSupported } from './common/index.mjs';\nimport { Accordion } from './components/accordion/accordion.mjs';\nimport { Button } from './components/button/button.mjs';\nimport { CharacterCount } from './components/character-count/character-count.mjs';\nimport { Checkboxes } from './components/checkboxes/checkboxes.mjs';\nimport { ErrorSummary } from './components/error-summary/error-summary.mjs';\nimport { ExitThisPage } from './components/exit-this-page/exit-this-page.mjs';\nimport { Header } from './components/header/header.mjs';\nimport { NotificationBanner } from './components/notification-banner/notification-banner.mjs';\nimport { PasswordInput } from './components/password-input/password-input.mjs';\nimport { Radios } from './components/radios/radios.mjs';\nimport { SkipLink } from './components/skip-link/skip-link.mjs';\nimport { Tabs } from './components/tabs/tabs.mjs';\nimport { SupportError } from './errors/index.mjs';\n\n/**\n * Initialise all components\n *\n * Use the `data-module` attributes to find, instantiate and init all of the\n * components provided as part of GOV.UK Frontend.\n *\n * @param {Config & { scope?: Element }} [config] - Config for all components (with optional scope)\n */\nfunction initAll(config) {\n var _config$scope;\n config = typeof config !== 'undefined' ? config : {};\n if (!isSupported()) {\n console.log(new SupportError());\n return;\n }\n const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [Header], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [SkipLink], [Tabs]];\n const $scope = (_config$scope = config.scope) != null ? _config$scope : document;\n components.forEach(([Component, config]) => {\n const $elements = $scope.querySelectorAll(`[data-module=\"${Component.moduleName}\"]`);\n $elements.forEach($element => {\n try {\n 'defaults' in Component ? new Component($element, config) : new Component($element);\n } catch (error) {\n console.log(error);\n }\n });\n });\n}\n\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {AccordionConfig} [accordion] - Accordion config\n * @property {ButtonConfig} [button] - Button config\n * @property {CharacterCountConfig} [characterCount] - Character Count config\n * @property {ErrorSummaryConfig} [errorSummary] - Error Summary config\n * @property {ExitThisPageConfig} [exitThisPage] - Exit This Page config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n * @property {PasswordInputConfig} [passwordInput] - Password input config\n */\n\n/**\n * Config for individual components\n *\n * @typedef {import('./components/accordion/accordion.mjs').AccordionConfig} AccordionConfig\n * @typedef {import('./components/accordion/accordion.mjs').AccordionTranslations} AccordionTranslations\n * @typedef {import('./components/button/button.mjs').ButtonConfig} ButtonConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountConfig} CharacterCountConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountTranslations} CharacterCountTranslations\n * @typedef {import('./components/error-summary/error-summary.mjs').ErrorSummaryConfig} ErrorSummaryConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageConfig} ExitThisPageConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageTranslations} ExitThisPageTranslations\n * @typedef {import('./components/notification-banner/notification-banner.mjs').NotificationBannerConfig} NotificationBannerConfig\n * @typedef {import('./components/password-input/password-input.mjs').PasswordInputConfig} PasswordInputConfig\n */\n\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Config} ConfigKey\n */\n\nexport { Accordion, Button, CharacterCount, Checkboxes, ErrorSummary, ExitThisPage, Header, NotificationBanner, PasswordInput, Radios, SkipLink, Tabs, initAll };\n//# sourceMappingURL=all.mjs.map\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","version","normaliseString","property","trimmedValue","trim","output","outputType","type","includes","length","isFinite","Number","mergeConfigs","configObjects","formattedConfigObject","configObject","keys","option","override","isObject","extractConfigByNamespace","Component","dataset","namespace","schema","properties","newObject","entries","current","keyParts","split","index","name","getFragmentFromUrl","url","pop","getBreakpoint","window","getComputedStyle","document","documentElement","getPropertyValue","undefined","setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","onBlur","_options$onBlur","removeAttribute","setAttribute","addEventListener","once","onBeforeFocus","focus","isSupported","$scope","body","classList","contains","Array","isArray","normaliseDataset","out","field","GOVUKFrontendError","Error","constructor","args","super","this","SupportError","supportMessage","HTMLScriptElement","ConfigError","ElementError","messageOrOptions","message","componentName","identifier","element","expectedType","GOVUKFrontendComponent","checkSupport","I18n","translations","config","_config$locale","locale","lang","t","lookupKey","translation","count","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","replace","placeholderWithBraces","placeholderKey","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","PluralRules","preferredForm","select","selectPluralFormUsingFallbackRules","console","warn","Math","abs","floor","ruleset","getPluralRulesForLocale","pluralRules","localeShort","pluralRule","pluralRulesMap","languages","arabic","chinese","french","german","irish","russian","scottish","spanish","welsh","n","lastTwo","last","Accordion","$module","i18n","controlsClass","showAllClass","showAllTextClass","sectionClass","sectionExpandedClass","sectionButtonClass","sectionHeaderClass","sectionHeadingClass","sectionHeadingDividerClass","sectionHeadingTextClass","sectionHeadingTextFocusClass","sectionShowHideToggleClass","sectionShowHideToggleFocusClass","sectionShowHideTextClass","upChevronIconClass","downChevronIconClass","sectionSummaryClass","sectionSummaryFocusClass","sectionContentClass","$sections","browserSupportsSessionStorage","$showAllButton","$showAllIcon","$showAllText","HTMLElement","defaults","querySelectorAll","helper","checkForSessionStorage","initControls","initSectionHeaders","areAllSectionsOpen","checkIfAllSectionsOpen","updateShowAllButton","createElement","add","appendChild","$accordionControls","insertBefore","firstChild","onShowOrHideAllToggle","event","onBeforeMatch","forEach","$section","i","$header","querySelector","constructHeaderMarkup","setExpanded","isExpanded","onSectionToggle","setInitialState","$span","$heading","$summary","$button","id","attr","from","attributes","nodeName","nodeValue","$headingText","$headingTextFocus","innerHTML","$showHideToggle","$showHideToggleFocus","$showHideText","$showHideIcon","getButtonPunctuationEl","parentNode","$summarySpan","$summarySpanFocus","replaceChild","removeChild","$fragment","target","Element","closest","expanded","storeState","nowExpanded","$content","newButtonText","textContent","ariaLabelParts","push","ariaLabelMessage","join","remove","toString","toggle","rememberExpanded","contentId","contentState","sessionStorage","setItem","getItem","$punctuationEl","moduleName","freeze","hideAllSections","hideSection","hideSectionAriaLabel","showAllSections","showSection","showSectionAriaLabel","testString","result","removeItem","exception","Button","debounceFormSubmitTimer","handleKeyDown","debounce","$target","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","closestAttributeValue","attributeName","$closestElementWithAttribute","CharacterCount","_ref","_this$config$maxwords","$textarea","$visibleCountMessage","$screenReaderCountMessage","lastInputTimestamp","lastInputValue","valueChecker","maxLength","HTMLTextAreaElement","HTMLInputElement","datasetConfig","configOverrides","maxlength","maxwords","errors","validationErrors","conditions","required","errorMessage","every","validateConfig","Infinity","textareaDescriptionId","$textareaDescription","getElementById","insertAdjacentElement","className","bindChangeEvents","updateCountMessage","handleKeyUp","handleFocus","handleBlur","updateVisibleCountMessage","Date","now","setInterval","updateIfValueChanged","clearInterval","updateScreenReaderCountMessage","isError","isOverThreshold","getCountMessage","text","_text$match","remainingNumber","countType","formatCountMessage","translationKeySuffix","threshold","currentLength","charactersUnderLimit","one","other","charactersAtLimit","charactersOverLimit","wordsUnderLimit","wordsAtLimit","wordsOverLimit","textareaDescription","anyOf","Checkboxes","$inputs","$input","targetId","syncAllConditionalReveals","handleClick","syncConditionalRevealWithInputState","inputIsChecked","checked","unCheckAllInputsExcept","$inputWithSameName","form","unCheckExclusiveInputs","$exclusiveInput","$clickedInput","ErrorSummary","disableAutoFocus","focusTarget","HTMLAnchorElement","inputId","href","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","$legends","getElementsByTagName","$candidateLegend","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","ExitThisPage","$skiplinkButton","$updateSpan","$indicatorContainer","$overlay","keypressCounter","lastKeyWasModified","timeoutTime","keypressTimeoutId","timeoutMessageId","buildIndicator","initUpdateSpan","initButtonClickHandler","handleKeypress","bind","govukFrontendExitThisPageKeypress","resetPage","$indicator","updateIndicator","exitPage","location","resetKeypressTimer","clearTimeout","setKeypressTimer","shiftKey","activated","timedOut","pressTwoMoreTimes","pressOneMoreTime","Header","$menuButton","$menu","menuIsOpen","mql","menuId","setupResponsiveChecks","handleMenuButtonClick","breakpoint","matchMedia","checkMode","addListener","matches","NotificationBanner","PasswordInput","$showHideButton","$screenReaderStatusMessage","HTMLButtonElement","hide","persisted","show","setType","isHidden","prefixButton","prefixStatus","innerText","showPassword","hidePassword","showPasswordAriaLabel","hidePasswordAriaLabel","passwordShownAnnouncement","passwordHiddenAnnouncement","Radios","$allInputs","$clickedInputForm","$clickedInputName","hasSameFormOwner","SkipLink","_this$$module$getAttr","hash","URL","error","origin","pathname","linkedElementId","$linkedElement","Tabs","$tabs","$tabList","$tabListItems","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","onTabClick","onTabKeydown","onHashChange","_this$mql","setup","teardown","_this$getTab","$item","$tab","setAttributes","hideTab","$activeTab","getTab","showTab","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","$panel","getPanel","$currentTab","$nextTab","currentTarget","createHistoryEntry","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","initAll","_config$scope","log","components","accordion","button","characterCount","errorSummary","exitThisPage","notificationBanner","passwordInput","scope"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"moduk-frontend.umd.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAA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,GAAW,CAACS,IACtXxd,EAAU,CACdmhB,MAAyC,OAAjCZ,EAAgB/c,EAAO2d,OAAiBZ,EAAgB7gB,SAChE8gB,QAAShd,EAAOgd,SAElBE,EAAWpV,SAAQ,EAAEhK,EAAWkC,MAC9B4d,EAAU9f,EAAWkC,EAAQxD,KAEjC,CAiBA,SAASohB,EAAU9f,EAAWkC,EAAQ6d,GACpC,IACIb,EADA3f,EAASnB,SAGX,IAAI4hB,EAD0B,iBAArBD,IAGTxgB,EAA6D,OAAnDygB,EAAwBD,EAAiBF,OAAiBG,EAAwBzgB,EAC5F2f,EAAUa,EAAiBb,SAEG,mBAArBa,IACTb,EAAUa,GAERA,aAA4Bpe,cAC9BpC,EAASwgB,GAEX,MAAME,EAAY1gB,EAAO2J,iBAAiB,iBAAiBlJ,EAAUE,gBACrE,OAAKZ,IAWEO,MAAMmL,KAAKiV,GAAWC,KAAIzhB,IAC/B,IACE,YAAyB,IAAXyD,EAAyB,IAAIlC,EAAUvB,EAAUyD,GAAU,IAAIlC,EAAUvB,EACzF,CAAE,MAAOod,GAUP,OATIqD,EACFA,EAAQrD,EAAO,CACb5a,QAASxC,EACTsC,UAAWf,EACXkC,WAGF+D,QAAQkZ,IAAItD,GAEP,IACT,KACCsE,OAAOva,UAzBJsZ,EACFA,EAAQ,IAAIze,EAAgB,CAC1BM,UAAWf,EACXkC,WAGF+D,QAAQkZ,IAAI,IAAI1e,GAEX,GAkBX,QD6KAyb,EAAKhc,WAAa","sources":["webpack://MODUK/webpack/universalModuleDefinition","webpack://MODUK/webpack/bootstrap","webpack://MODUK/webpack/runtime/define property getters","webpack://MODUK/webpack/runtime/hasOwnProperty shorthand","webpack://MODUK/webpack/runtime/make namespace object","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/errors/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/component.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/configuration.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/i18n.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/header/header.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/init.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MODUK\"] = factory();\n\telse\n\t\troot[\"MODUK\"] = factory();\n})(self, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const version = '5.10.2';\n\nexport { version };\n//# sourceMappingURL=govuk-frontend-version.mjs.map\n","function getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined;\n }\n return url.split('#').pop();\n}\nfunction getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`;\n const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);\n return {\n property,\n value: value || undefined\n };\n}\nfunction setFocus($element, options = {}) {\n var _options$onBeforeFocu;\n const isFocusable = $element.getAttribute('tabindex');\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1');\n }\n function onFocus() {\n $element.addEventListener('blur', onBlur, {\n once: true\n });\n }\n function onBlur() {\n var _options$onBlur;\n (_options$onBlur = options.onBlur) == null || _options$onBlur.call($element);\n if (!isFocusable) {\n $element.removeAttribute('tabindex');\n }\n }\n $element.addEventListener('focus', onFocus, {\n once: true\n });\n (_options$onBeforeFocu = options.onBeforeFocus) == null || _options$onBeforeFocu.call($element);\n $element.focus();\n}\nfunction isInitialised($root, moduleName) {\n return $root instanceof HTMLElement && $root.hasAttribute(`data-${moduleName}-init`);\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nfunction isSupported($scope = document.body) {\n if (!$scope) {\n return false;\n }\n return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction isArray(option) {\n return Array.isArray(option);\n}\nfunction isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option);\n}\nfunction formatErrorMessage(Component, message) {\n return `${Component.moduleName}: ${message}`;\n}\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n/**\n * @import { ObjectNested } from './configuration.mjs'\n */\n\nexport { formatErrorMessage, getBreakpoint, getFragmentFromUrl, isInitialised, isObject, isSupported, setFocus };\n//# sourceMappingURL=index.mjs.map\n","import { formatErrorMessage } from '../common/index.mjs';\n\nclass GOVUKFrontendError extends Error {\n constructor(...args) {\n super(...args);\n this.name = 'GOVUKFrontendError';\n }\n}\nclass SupportError extends GOVUKFrontendError {\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';\n super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type=\"module\">`');\n this.name = 'SupportError';\n }\n}\nclass ConfigError extends GOVUKFrontendError {\n constructor(...args) {\n super(...args);\n this.name = 'ConfigError';\n }\n}\nclass ElementError extends GOVUKFrontendError {\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';\n if (typeof messageOrOptions === 'object') {\n const {\n component,\n identifier,\n element,\n expectedType\n } = messageOrOptions;\n message = identifier;\n message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n message = formatErrorMessage(component, message);\n }\n super(message);\n this.name = 'ElementError';\n }\n}\nclass InitError extends GOVUKFrontendError {\n constructor(componentOrMessage) {\n const message = typeof componentOrMessage === 'string' ? componentOrMessage : formatErrorMessage(componentOrMessage, `Root element (\\`$root\\`) already initialised`);\n super(message);\n this.name = 'InitError';\n }\n}\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n\nexport { ConfigError, ElementError, GOVUKFrontendError, InitError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isInitialised, isSupported } from './common/index.mjs';\nimport { InitError, ElementError, SupportError } from './errors/index.mjs';\n\nclass Component {\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {RootElementType} - the root element of component\n */\n get $root() {\n return this._$root;\n }\n constructor($root) {\n this._$root = void 0;\n const childConstructor = this.constructor;\n if (typeof childConstructor.moduleName !== 'string') {\n throw new InitError(`\\`moduleName\\` not defined in component`);\n }\n if (!($root instanceof childConstructor.elementType)) {\n throw new ElementError({\n element: $root,\n component: childConstructor,\n identifier: 'Root element (`$root`)',\n expectedType: childConstructor.elementType.name\n });\n } else {\n this._$root = $root;\n }\n childConstructor.checkSupport();\n this.checkInitialised();\n const moduleName = childConstructor.moduleName;\n this.$root.setAttribute(`data-${moduleName}-init`, '');\n }\n checkInitialised() {\n const constructor = this.constructor;\n const moduleName = constructor.moduleName;\n if (moduleName && isInitialised(this.$root, moduleName)) {\n throw new InitError(constructor);\n }\n }\n static checkSupport() {\n if (!isSupported()) {\n throw new SupportError();\n }\n }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\nComponent.elementType = HTMLElement;\n\nexport { Component };\n//# sourceMappingURL=component.mjs.map\n","import { Component } from '../component.mjs';\nimport { ConfigError } from '../errors/index.mjs';\nimport { isObject, formatErrorMessage } from './index.mjs';\n\nconst configOverride = Symbol.for('configOverride');\nclass ConfigurableComponent extends Component {\n [configOverride](param) {\n return {};\n }\n\n /**\n * Returns the root element of the component\n *\n * @protected\n * @returns {ConfigurationType} - the root element of component\n */\n get config() {\n return this._config;\n }\n constructor($root, config) {\n super($root);\n this._config = void 0;\n const childConstructor = this.constructor;\n if (!isObject(childConstructor.defaults)) {\n throw new ConfigError(formatErrorMessage(childConstructor, 'Config passed as parameter into constructor but no defaults defined'));\n }\n const datasetConfig = normaliseDataset(childConstructor, this._$root.dataset);\n this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {}, this[configOverride](datasetConfig), datasetConfig);\n }\n}\nfunction normaliseString(value, property) {\n const trimmedValue = value ? value.trim() : '';\n let output;\n let outputType = property == null ? void 0 : property.type;\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean';\n }\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number';\n }\n }\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true';\n break;\n case 'number':\n output = Number(trimmedValue);\n break;\n default:\n output = value;\n }\n return output;\n}\nfunction normaliseDataset(Component, dataset) {\n if (!isObject(Component.schema)) {\n throw new ConfigError(formatErrorMessage(Component, 'Config passed as parameter into constructor but no schema defined'));\n }\n const out = {};\n const entries = Object.entries(Component.schema.properties);\n for (const entry of entries) {\n const [namespace, property] = entry;\n const field = namespace.toString();\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property);\n }\n if ((property == null ? void 0 : property.type) === 'object') {\n out[field] = extractConfigByNamespace(Component.schema, dataset, namespace);\n }\n }\n return out;\n}\nfunction mergeConfigs(...configObjects) {\n const formattedConfigObject = {};\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key];\n const override = configObject[key];\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override);\n } else {\n formattedConfigObject[key] = override;\n }\n }\n }\n return formattedConfigObject;\n}\nfunction validateConfig(schema, config) {\n const validationErrors = [];\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = [];\n if (Array.isArray(conditions)) {\n for (const {\n required,\n errorMessage\n } of conditions) {\n if (!required.every(key => !!config[key])) {\n errors.push(errorMessage);\n }\n }\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors);\n }\n }\n }\n return validationErrors;\n}\nfunction extractConfigByNamespace(schema, dataset, namespace) {\n const property = schema.properties[namespace];\n if ((property == null ? void 0 : property.type) !== 'object') {\n return;\n }\n const newObject = {\n [namespace]: {}\n };\n for (const [key, value] of Object.entries(dataset)) {\n let current = newObject;\n const keyParts = key.split('.');\n for (const [index, name] of keyParts.entries()) {\n if (isObject(current)) {\n if (index < keyParts.length - 1) {\n if (!isObject(current[name])) {\n current[name] = {};\n }\n current = current[name];\n } else if (key !== namespace) {\n current[name] = normaliseString(value);\n }\n }\n }\n }\n return newObject[namespace];\n}\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n\nexport { ConfigurableComponent, configOverride, extractConfigByNamespace, mergeConfigs, normaliseDataset, normaliseString, validateConfig };\n//# sourceMappingURL=configuration.mjs.map\n","class I18n {\n constructor(translations = {}, config = {}) {\n var _config$locale;\n this.translations = void 0;\n this.locale = void 0;\n this.translations = translations;\n this.locale = (_config$locale = config.locale) != null ? _config$locale : document.documentElement.lang || 'en';\n }\n t(lookupKey, options) {\n if (!lookupKey) {\n throw new Error('i18n: lookup key missing');\n }\n let translation = this.translations[lookupKey];\n if (typeof (options == null ? void 0 : options.count) === 'number' && typeof translation === 'object') {\n const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];\n if (translationPluralForm) {\n translation = translationPluralForm;\n }\n }\n if (typeof translation === 'string') {\n if (translation.match(/%{(.\\S+)}/)) {\n if (!options) {\n throw new Error('i18n: cannot replace placeholders in string if no option data provided');\n }\n return this.replacePlaceholders(translation, options);\n }\n return translation;\n }\n return lookupKey;\n }\n replacePlaceholders(translationString, options) {\n const formatter = Intl.NumberFormat.supportedLocalesOf(this.locale).length ? new Intl.NumberFormat(this.locale) : undefined;\n return translationString.replace(/%{(.\\S+)}/g, function (placeholderWithBraces, placeholderKey) {\n if (Object.prototype.hasOwnProperty.call(options, placeholderKey)) {\n const placeholderValue = options[placeholderKey];\n if (placeholderValue === false || typeof placeholderValue !== 'number' && typeof placeholderValue !== 'string') {\n return '';\n }\n if (typeof placeholderValue === 'number') {\n return formatter ? formatter.format(placeholderValue) : `${placeholderValue}`;\n }\n return placeholderValue;\n }\n throw new Error(`i18n: no data found to replace ${placeholderWithBraces} placeholder in string`);\n });\n }\n hasIntlPluralRulesSupport() {\n return Boolean('PluralRules' in window.Intl && Intl.PluralRules.supportedLocalesOf(this.locale).length);\n }\n getPluralSuffix(lookupKey, count) {\n count = Number(count);\n if (!isFinite(count)) {\n return 'other';\n }\n const translation = this.translations[lookupKey];\n const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);\n if (typeof translation === 'object') {\n if (preferredForm in translation) {\n return preferredForm;\n } else if ('other' in translation) {\n console.warn(`i18n: Missing plural form \".${preferredForm}\" for \"${this.locale}\" locale. Falling back to \".other\".`);\n return 'other';\n }\n }\n throw new Error(`i18n: Plural form \".other\" is required for \"${this.locale}\" locale`);\n }\n selectPluralFormUsingFallbackRules(count) {\n count = Math.abs(Math.floor(count));\n const ruleset = this.getPluralRulesForLocale();\n if (ruleset) {\n return I18n.pluralRules[ruleset](count);\n }\n return 'other';\n }\n getPluralRulesForLocale() {\n const localeShort = this.locale.split('-')[0];\n for (const pluralRule in I18n.pluralRulesMap) {\n const languages = I18n.pluralRulesMap[pluralRule];\n if (languages.includes(this.locale) || languages.includes(localeShort)) {\n return pluralRule;\n }\n }\n }\n}\nI18n.pluralRulesMap = {\n arabic: ['ar'],\n chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],\n french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],\n german: ['af', 'sq', 'az', 'eu', 'bg', 'ca', 'da', 'nl', 'en', 'et', 'fi', 'ka', 'de', 'el', 'hu', 'lb', 'no', 'so', 'sw', 'sv', 'ta', 'te', 'tr', 'ur'],\n irish: ['ga'],\n russian: ['ru', 'uk'],\n scottish: ['gd'],\n spanish: ['pt-PT', 'it', 'es'],\n welsh: ['cy']\n};\nI18n.pluralRules = {\n arabic(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n % 100 >= 3 && n % 100 <= 10) {\n return 'few';\n }\n if (n % 100 >= 11 && n % 100 <= 99) {\n return 'many';\n }\n return 'other';\n },\n chinese() {\n return 'other';\n },\n french(n) {\n return n === 0 || n === 1 ? 'one' : 'other';\n },\n german(n) {\n return n === 1 ? 'one' : 'other';\n },\n irish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n >= 3 && n <= 6) {\n return 'few';\n }\n if (n >= 7 && n <= 10) {\n return 'many';\n }\n return 'other';\n },\n russian(n) {\n const lastTwo = n % 100;\n const last = lastTwo % 10;\n if (last === 1 && lastTwo !== 11) {\n return 'one';\n }\n if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 'few';\n }\n if (last === 0 || last >= 5 && last <= 9 || lastTwo >= 11 && lastTwo <= 14) {\n return 'many';\n }\n return 'other';\n },\n scottish(n) {\n if (n === 1 || n === 11) {\n return 'one';\n }\n if (n === 2 || n === 12) {\n return 'two';\n }\n if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {\n return 'few';\n }\n return 'other';\n },\n spanish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n % 1000000 === 0 && n !== 0) {\n return 'many';\n }\n return 'other';\n },\n welsh(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n === 3) {\n return 'few';\n }\n if (n === 6) {\n return 'many';\n }\n return 'other';\n }\n};\n\nexport { I18n };\n//# sourceMappingURL=i18n.mjs.map\n","import { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Accordion component\n *\n * This allows a collection of sections to be collapsed by default, showing only\n * their headers. Sections can be expanded or collapsed individually by clicking\n * their headers. A \"Show all sections\" button is also added to the top of the\n * accordion, which switches to \"Hide all sections\" when all the sections are\n * expanded.\n *\n * The state of each section is saved to the DOM via the `aria-expanded`\n * attribute, which also provides accessibility.\n *\n * @preserve\n * @augments ConfigurableComponent<AccordionConfig>\n */\nclass Accordion extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for accordion\n * @param {AccordionConfig} [config] - Accordion config\n */\n constructor($root, config = {}) {\n super($root, config);\n this.i18n = void 0;\n this.controlsClass = 'govuk-accordion__controls';\n this.showAllClass = 'govuk-accordion__show-all';\n this.showAllTextClass = 'govuk-accordion__show-all-text';\n this.sectionClass = 'govuk-accordion__section';\n this.sectionExpandedClass = 'govuk-accordion__section--expanded';\n this.sectionButtonClass = 'govuk-accordion__section-button';\n this.sectionHeaderClass = 'govuk-accordion__section-header';\n this.sectionHeadingClass = 'govuk-accordion__section-heading';\n this.sectionHeadingDividerClass = 'govuk-accordion__section-heading-divider';\n this.sectionHeadingTextClass = 'govuk-accordion__section-heading-text';\n this.sectionHeadingTextFocusClass = 'govuk-accordion__section-heading-text-focus';\n this.sectionShowHideToggleClass = 'govuk-accordion__section-toggle';\n this.sectionShowHideToggleFocusClass = 'govuk-accordion__section-toggle-focus';\n this.sectionShowHideTextClass = 'govuk-accordion__section-toggle-text';\n this.upChevronIconClass = 'govuk-accordion-nav__chevron';\n this.downChevronIconClass = 'govuk-accordion-nav__chevron--down';\n this.sectionSummaryClass = 'govuk-accordion__section-summary';\n this.sectionSummaryFocusClass = 'govuk-accordion__section-summary-focus';\n this.sectionContentClass = 'govuk-accordion__section-content';\n this.$sections = void 0;\n this.$showAllButton = null;\n this.$showAllIcon = null;\n this.$showAllText = null;\n this.i18n = new I18n(this.config.i18n);\n const $sections = this.$root.querySelectorAll(`.${this.sectionClass}`);\n if (!$sections.length) {\n throw new ElementError({\n component: Accordion,\n identifier: `Sections (\\`<div class=\"${this.sectionClass}\">\\`)`\n });\n }\n this.$sections = $sections;\n this.initControls();\n this.initSectionHeaders();\n this.updateShowAllButton(this.areAllSectionsOpen());\n }\n initControls() {\n this.$showAllButton = document.createElement('button');\n this.$showAllButton.setAttribute('type', 'button');\n this.$showAllButton.setAttribute('class', this.showAllClass);\n this.$showAllButton.setAttribute('aria-expanded', 'false');\n this.$showAllIcon = document.createElement('span');\n this.$showAllIcon.classList.add(this.upChevronIconClass);\n this.$showAllButton.appendChild(this.$showAllIcon);\n const $accordionControls = document.createElement('div');\n $accordionControls.setAttribute('class', this.controlsClass);\n $accordionControls.appendChild(this.$showAllButton);\n this.$root.insertBefore($accordionControls, this.$root.firstChild);\n this.$showAllText = document.createElement('span');\n this.$showAllText.classList.add(this.showAllTextClass);\n this.$showAllButton.appendChild(this.$showAllText);\n this.$showAllButton.addEventListener('click', () => this.onShowOrHideAllToggle());\n if ('onbeforematch' in document) {\n document.addEventListener('beforematch', event => this.onBeforeMatch(event));\n }\n }\n initSectionHeaders() {\n this.$sections.forEach(($section, i) => {\n const $header = $section.querySelector(`.${this.sectionHeaderClass}`);\n if (!$header) {\n throw new ElementError({\n component: Accordion,\n identifier: `Section headers (\\`<div class=\"${this.sectionHeaderClass}\">\\`)`\n });\n }\n this.constructHeaderMarkup($header, i);\n this.setExpanded(this.isExpanded($section), $section);\n $header.addEventListener('click', () => this.onSectionToggle($section));\n this.setInitialState($section);\n });\n }\n constructHeaderMarkup($header, index) {\n const $span = $header.querySelector(`.${this.sectionButtonClass}`);\n const $heading = $header.querySelector(`.${this.sectionHeadingClass}`);\n const $summary = $header.querySelector(`.${this.sectionSummaryClass}`);\n if (!$heading) {\n throw new ElementError({\n component: Accordion,\n identifier: `Section heading (\\`.${this.sectionHeadingClass}\\`)`\n });\n }\n if (!$span) {\n throw new ElementError({\n component: Accordion,\n identifier: `Section button placeholder (\\`<span class=\"${this.sectionButtonClass}\">\\`)`\n });\n }\n const $button = document.createElement('button');\n $button.setAttribute('type', 'button');\n $button.setAttribute('aria-controls', `${this.$root.id}-content-${index + 1}`);\n for (const attr of Array.from($span.attributes)) {\n if (attr.name !== 'id') {\n $button.setAttribute(attr.name, attr.value);\n }\n }\n const $headingText = document.createElement('span');\n $headingText.classList.add(this.sectionHeadingTextClass);\n $headingText.id = $span.id;\n const $headingTextFocus = document.createElement('span');\n $headingTextFocus.classList.add(this.sectionHeadingTextFocusClass);\n $headingText.appendChild($headingTextFocus);\n Array.from($span.childNodes).forEach($child => $headingTextFocus.appendChild($child));\n const $showHideToggle = document.createElement('span');\n $showHideToggle.classList.add(this.sectionShowHideToggleClass);\n $showHideToggle.setAttribute('data-nosnippet', '');\n const $showHideToggleFocus = document.createElement('span');\n $showHideToggleFocus.classList.add(this.sectionShowHideToggleFocusClass);\n $showHideToggle.appendChild($showHideToggleFocus);\n const $showHideText = document.createElement('span');\n const $showHideIcon = document.createElement('span');\n $showHideIcon.classList.add(this.upChevronIconClass);\n $showHideToggleFocus.appendChild($showHideIcon);\n $showHideText.classList.add(this.sectionShowHideTextClass);\n $showHideToggleFocus.appendChild($showHideText);\n $button.appendChild($headingText);\n $button.appendChild(this.getButtonPunctuationEl());\n if ($summary) {\n const $summarySpan = document.createElement('span');\n const $summarySpanFocus = document.createElement('span');\n $summarySpanFocus.classList.add(this.sectionSummaryFocusClass);\n $summarySpan.appendChild($summarySpanFocus);\n for (const attr of Array.from($summary.attributes)) {\n $summarySpan.setAttribute(attr.name, attr.value);\n }\n Array.from($summary.childNodes).forEach($child => $summarySpanFocus.appendChild($child));\n $summary.remove();\n $button.appendChild($summarySpan);\n $button.appendChild(this.getButtonPunctuationEl());\n }\n $button.appendChild($showHideToggle);\n $heading.removeChild($span);\n $heading.appendChild($button);\n }\n onBeforeMatch(event) {\n const $fragment = event.target;\n if (!($fragment instanceof Element)) {\n return;\n }\n const $section = $fragment.closest(`.${this.sectionClass}`);\n if ($section) {\n this.setExpanded(true, $section);\n }\n }\n onSectionToggle($section) {\n const nowExpanded = !this.isExpanded($section);\n this.setExpanded(nowExpanded, $section);\n this.storeState($section, nowExpanded);\n }\n onShowOrHideAllToggle() {\n const nowExpanded = !this.areAllSectionsOpen();\n this.$sections.forEach($section => {\n this.setExpanded(nowExpanded, $section);\n this.storeState($section, nowExpanded);\n });\n this.updateShowAllButton(nowExpanded);\n }\n setExpanded(expanded, $section) {\n const $showHideIcon = $section.querySelector(`.${this.upChevronIconClass}`);\n const $showHideText = $section.querySelector(`.${this.sectionShowHideTextClass}`);\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n const $content = $section.querySelector(`.${this.sectionContentClass}`);\n if (!$content) {\n throw new ElementError({\n component: Accordion,\n identifier: `Section content (\\`<div class=\"${this.sectionContentClass}\">\\`)`\n });\n }\n if (!$showHideIcon || !$showHideText || !$button) {\n return;\n }\n const newButtonText = expanded ? this.i18n.t('hideSection') : this.i18n.t('showSection');\n $showHideText.textContent = newButtonText;\n $button.setAttribute('aria-expanded', `${expanded}`);\n const ariaLabelParts = [];\n const $headingText = $section.querySelector(`.${this.sectionHeadingTextClass}`);\n if ($headingText) {\n ariaLabelParts.push(`${$headingText.textContent}`.trim());\n }\n const $summary = $section.querySelector(`.${this.sectionSummaryClass}`);\n if ($summary) {\n ariaLabelParts.push(`${$summary.textContent}`.trim());\n }\n const ariaLabelMessage = expanded ? this.i18n.t('hideSectionAriaLabel') : this.i18n.t('showSectionAriaLabel');\n ariaLabelParts.push(ariaLabelMessage);\n $button.setAttribute('aria-label', ariaLabelParts.join(' , '));\n if (expanded) {\n $content.removeAttribute('hidden');\n $section.classList.add(this.sectionExpandedClass);\n $showHideIcon.classList.remove(this.downChevronIconClass);\n } else {\n $content.setAttribute('hidden', 'until-found');\n $section.classList.remove(this.sectionExpandedClass);\n $showHideIcon.classList.add(this.downChevronIconClass);\n }\n this.updateShowAllButton(this.areAllSectionsOpen());\n }\n isExpanded($section) {\n return $section.classList.contains(this.sectionExpandedClass);\n }\n areAllSectionsOpen() {\n return Array.from(this.$sections).every($section => this.isExpanded($section));\n }\n updateShowAllButton(expanded) {\n if (!this.$showAllButton || !this.$showAllText || !this.$showAllIcon) {\n return;\n }\n this.$showAllButton.setAttribute('aria-expanded', expanded.toString());\n this.$showAllText.textContent = expanded ? this.i18n.t('hideAllSections') : this.i18n.t('showAllSections');\n this.$showAllIcon.classList.toggle(this.downChevronIconClass, !expanded);\n }\n\n /**\n * Get the identifier for a section\n *\n * We need a unique way of identifying each content in the Accordion.\n * Since an `#id` should be unique and an `id` is required for `aria-`\n * attributes `id` can be safely used.\n *\n * @param {Element} $section - Section element\n * @returns {string | undefined | null} Identifier for section\n */\n getIdentifier($section) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n return $button == null ? void 0 : $button.getAttribute('aria-controls');\n }\n storeState($section, isExpanded) {\n if (!this.config.rememberExpanded) {\n return;\n }\n const id = this.getIdentifier($section);\n if (id) {\n try {\n window.sessionStorage.setItem(id, isExpanded.toString());\n } catch (exception) {}\n }\n }\n setInitialState($section) {\n if (!this.config.rememberExpanded) {\n return;\n }\n const id = this.getIdentifier($section);\n if (id) {\n try {\n const state = window.sessionStorage.getItem(id);\n if (state !== null) {\n this.setExpanded(state === 'true', $section);\n }\n } catch (exception) {}\n }\n }\n getButtonPunctuationEl() {\n const $punctuationEl = document.createElement('span');\n $punctuationEl.classList.add('govuk-visually-hidden', this.sectionHeadingDividerClass);\n $punctuationEl.textContent = ', ';\n return $punctuationEl;\n }\n}\n\n/**\n * Accordion config\n *\n * @see {@link Accordion.defaults}\n * @typedef {object} AccordionConfig\n * @property {AccordionTranslations} [i18n=Accordion.defaults.i18n] - Accordion translations\n * @property {boolean} [rememberExpanded] - Whether the expanded and collapsed\n * state of each section is remembered and restored when navigating.\n */\n\n/**\n * Accordion translations\n *\n * @see {@link Accordion.defaults.i18n}\n * @typedef {object} AccordionTranslations\n *\n * Messages used by the component for the labels of its buttons. This includes\n * the visible text shown on screen, and text to help assistive technology users\n * for the buttons toggling each section.\n * @property {string} [hideAllSections] - The text content for the 'Hide all\n * sections' button, used when at least one section is expanded.\n * @property {string} [hideSection] - The text content for the 'Hide'\n * button, used when a section is expanded.\n * @property {string} [hideSectionAriaLabel] - The text content appended to the\n * 'Hide' button's accessible name when a section is expanded.\n * @property {string} [showAllSections] - The text content for the 'Show all\n * sections' button, used when all sections are collapsed.\n * @property {string} [showSection] - The text content for the 'Show'\n * button, used when a section is collapsed.\n * @property {string} [showSectionAriaLabel] - The text content appended to the\n * 'Show' button's accessible name when a section is expanded.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\nAccordion.moduleName = 'govuk-accordion';\nAccordion.defaults = Object.freeze({\n i18n: {\n hideAllSections: 'Hide all sections',\n hideSection: 'Hide',\n hideSectionAriaLabel: 'Hide this section',\n showAllSections: 'Show all sections',\n showSection: 'Show',\n showSectionAriaLabel: 'Show this section'\n },\n rememberExpanded: true\n});\nAccordion.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n },\n rememberExpanded: {\n type: 'boolean'\n }\n }\n});\n\nexport { Accordion };\n//# sourceMappingURL=accordion.mjs.map\n","import { ConfigurableComponent } from '../../common/configuration.mjs';\n\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\n/**\n * JavaScript enhancements for the Button component\n *\n * @preserve\n * @augments ConfigurableComponent<ButtonConfig>\n */\nclass Button extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for button\n * @param {ButtonConfig} [config] - Button config\n */\n constructor($root, config = {}) {\n super($root, config);\n this.debounceFormSubmitTimer = null;\n this.$root.addEventListener('keydown', event => this.handleKeyDown(event));\n this.$root.addEventListener('click', event => this.debounce(event));\n }\n handleKeyDown(event) {\n const $target = event.target;\n if (event.key !== ' ') {\n return;\n }\n if ($target instanceof HTMLElement && $target.getAttribute('role') === 'button') {\n event.preventDefault();\n $target.click();\n }\n }\n debounce(event) {\n if (!this.config.preventDoubleClick) {\n return;\n }\n if (this.debounceFormSubmitTimer) {\n event.preventDefault();\n return false;\n }\n this.debounceFormSubmitTimer = window.setTimeout(() => {\n this.debounceFormSubmitTimer = null;\n }, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);\n }\n}\n\n/**\n * Button config\n *\n * @typedef {object} ButtonConfig\n * @property {boolean} [preventDoubleClick=false] - Prevent accidental double\n * clicks on submit buttons from submitting forms multiple times.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\nButton.moduleName = 'govuk-button';\nButton.defaults = Object.freeze({\n preventDoubleClick: false\n});\nButton.schema = Object.freeze({\n properties: {\n preventDoubleClick: {\n type: 'boolean'\n }\n }\n});\n\nexport { Button };\n//# sourceMappingURL=button.mjs.map\n","function closestAttributeValue($element, attributeName) {\n const $closestElementWithAttribute = $element.closest(`[${attributeName}]`);\n return $closestElementWithAttribute ? $closestElementWithAttribute.getAttribute(attributeName) : null;\n}\n\nexport { closestAttributeValue };\n//# sourceMappingURL=closest-attribute-value.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { ConfigurableComponent, configOverride, validateConfig } from '../../common/configuration.mjs';\nimport { formatErrorMessage } from '../../common/index.mjs';\nimport { ElementError, ConfigError } from '../../errors/index.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Character count component\n *\n * Tracks the number of characters or words in the `.govuk-js-character-count`\n * `<textarea>` inside the element. Displays a message with the remaining number\n * of characters/words available, or the number of characters/words in excess.\n *\n * You can configure the message to only appear after a certain percentage\n * of the available characters/words has been entered.\n *\n * @preserve\n * @augments ConfigurableComponent<CharacterCountConfig>\n */\nclass CharacterCount extends ConfigurableComponent {\n [configOverride](datasetConfig) {\n let configOverrides = {};\n if ('maxwords' in datasetConfig || 'maxlength' in datasetConfig) {\n configOverrides = {\n maxlength: undefined,\n maxwords: undefined\n };\n }\n return configOverrides;\n }\n\n /**\n * @param {Element | null} $root - HTML element to use for character count\n * @param {CharacterCountConfig} [config] - Character count config\n */\n constructor($root, config = {}) {\n var _ref, _this$config$maxwords;\n super($root, config);\n this.$textarea = void 0;\n this.$visibleCountMessage = void 0;\n this.$screenReaderCountMessage = void 0;\n this.lastInputTimestamp = null;\n this.lastInputValue = '';\n this.valueChecker = null;\n this.i18n = void 0;\n this.maxLength = void 0;\n const $textarea = this.$root.querySelector('.govuk-js-character-count');\n if (!($textarea instanceof HTMLTextAreaElement || $textarea instanceof HTMLInputElement)) {\n throw new ElementError({\n component: CharacterCount,\n element: $textarea,\n expectedType: 'HTMLTextareaElement or HTMLInputElement',\n identifier: 'Form field (`.govuk-js-character-count`)'\n });\n }\n const errors = validateConfig(CharacterCount.schema, this.config);\n if (errors[0]) {\n throw new ConfigError(formatErrorMessage(CharacterCount, errors[0]));\n }\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue(this.$root, 'lang')\n });\n this.maxLength = (_ref = (_this$config$maxwords = this.config.maxwords) != null ? _this$config$maxwords : this.config.maxlength) != null ? _ref : Infinity;\n this.$textarea = $textarea;\n const textareaDescriptionId = `${this.$textarea.id}-info`;\n const $textareaDescription = document.getElementById(textareaDescriptionId);\n if (!$textareaDescription) {\n throw new ElementError({\n component: CharacterCount,\n element: $textareaDescription,\n identifier: `Count message (\\`id=\"${textareaDescriptionId}\"\\`)`\n });\n }\n this.$errorMessage = this.$root.querySelector('.govuk-error-message');\n if (`${$textareaDescription.textContent}`.match(/^\\s*$/)) {\n $textareaDescription.textContent = this.i18n.t('textareaDescription', {\n count: this.maxLength\n });\n }\n this.$textarea.insertAdjacentElement('afterend', $textareaDescription);\n const $screenReaderCountMessage = document.createElement('div');\n $screenReaderCountMessage.className = 'govuk-character-count__sr-status govuk-visually-hidden';\n $screenReaderCountMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderCountMessage = $screenReaderCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $screenReaderCountMessage);\n const $visibleCountMessage = document.createElement('div');\n $visibleCountMessage.className = $textareaDescription.className;\n $visibleCountMessage.classList.add('govuk-character-count__status');\n $visibleCountMessage.setAttribute('aria-hidden', 'true');\n this.$visibleCountMessage = $visibleCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $visibleCountMessage);\n $textareaDescription.classList.add('govuk-visually-hidden');\n this.$textarea.removeAttribute('maxlength');\n this.bindChangeEvents();\n window.addEventListener('pageshow', () => this.updateCountMessage());\n this.updateCountMessage();\n }\n bindChangeEvents() {\n this.$textarea.addEventListener('keyup', () => this.handleKeyUp());\n this.$textarea.addEventListener('focus', () => this.handleFocus());\n this.$textarea.addEventListener('blur', () => this.handleBlur());\n }\n handleKeyUp() {\n this.updateVisibleCountMessage();\n this.lastInputTimestamp = Date.now();\n }\n handleFocus() {\n this.valueChecker = window.setInterval(() => {\n if (!this.lastInputTimestamp || Date.now() - 500 >= this.lastInputTimestamp) {\n this.updateIfValueChanged();\n }\n }, 1000);\n }\n handleBlur() {\n if (this.valueChecker) {\n window.clearInterval(this.valueChecker);\n }\n }\n updateIfValueChanged() {\n if (this.$textarea.value !== this.lastInputValue) {\n this.lastInputValue = this.$textarea.value;\n this.updateCountMessage();\n }\n }\n updateCountMessage() {\n this.updateVisibleCountMessage();\n this.updateScreenReaderCountMessage();\n }\n updateVisibleCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const isError = remainingNumber < 0;\n this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());\n if (!this.$errorMessage) {\n this.$textarea.classList.toggle('govuk-textarea--error', isError);\n }\n this.$visibleCountMessage.classList.toggle('govuk-error-message', isError);\n this.$visibleCountMessage.classList.toggle('govuk-hint', !isError);\n this.$visibleCountMessage.textContent = this.getCountMessage();\n }\n updateScreenReaderCountMessage() {\n if (this.isOverThreshold()) {\n this.$screenReaderCountMessage.removeAttribute('aria-hidden');\n } else {\n this.$screenReaderCountMessage.setAttribute('aria-hidden', 'true');\n }\n this.$screenReaderCountMessage.textContent = this.getCountMessage();\n }\n count(text) {\n if (this.config.maxwords) {\n var _text$match;\n const tokens = (_text$match = text.match(/\\S+/g)) != null ? _text$match : [];\n return tokens.length;\n }\n return text.length;\n }\n getCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const countType = this.config.maxwords ? 'words' : 'characters';\n return this.formatCountMessage(remainingNumber, countType);\n }\n formatCountMessage(remainingNumber, countType) {\n if (remainingNumber === 0) {\n return this.i18n.t(`${countType}AtLimit`);\n }\n const translationKeySuffix = remainingNumber < 0 ? 'OverLimit' : 'UnderLimit';\n return this.i18n.t(`${countType}${translationKeySuffix}`, {\n count: Math.abs(remainingNumber)\n });\n }\n isOverThreshold() {\n if (!this.config.threshold) {\n return true;\n }\n const currentLength = this.count(this.$textarea.value);\n const maxLength = this.maxLength;\n const thresholdValue = maxLength * this.config.threshold / 100;\n return thresholdValue <= currentLength;\n }\n}\n\n/**\n * Character count config\n *\n * @see {@link CharacterCount.defaults}\n * @typedef {object} CharacterCountConfig\n * @property {number} [maxlength] - The maximum number of characters.\n * If maxwords is provided, the maxlength option will be ignored.\n * @property {number} [maxwords] - The maximum number of words. If maxwords is\n * provided, the maxlength option will be ignored.\n * @property {number} [threshold=0] - The percentage value of the limit at\n * which point the count message is displayed. If this attribute is set, the\n * count message will be hidden by default.\n * @property {CharacterCountTranslations} [i18n=CharacterCount.defaults.i18n] - Character count translations\n */\n\n/**\n * Character count translations\n *\n * @see {@link CharacterCount.defaults.i18n}\n * @typedef {object} CharacterCountTranslations\n *\n * Messages shown to users as they type. It provides feedback on how many words\n * or characters they have remaining or if they are over the limit. This also\n * includes a message used as an accessible description for the textarea.\n * @property {TranslationPluralForms} [charactersUnderLimit] - Message displayed\n * when the number of characters is under the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [charactersAtLimit] - Message displayed when the number of\n * characters reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [charactersOverLimit] - Message displayed\n * when the number of characters is over the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [wordsUnderLimit] - Message displayed when\n * the number of words is under the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [wordsAtLimit] - Message displayed when the number of\n * words reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [wordsOverLimit] - Message displayed when\n * the number of words is over the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [textareaDescription] - Message made\n * available to assistive technologies, if none is already present in the\n * HTML, to describe that the component accepts only a limited amount of\n * content. It is visible on the page when JavaScript is unavailable. The\n * component will replace the `%{count}` placeholder with the value of the\n * `maxlength` or `maxwords` parameter.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n * @import { TranslationPluralForms } from '../../i18n.mjs'\n */\nCharacterCount.moduleName = 'govuk-character-count';\nCharacterCount.defaults = Object.freeze({\n threshold: 0,\n i18n: {\n charactersUnderLimit: {\n one: 'You have %{count} character remaining',\n other: 'You have %{count} characters remaining'\n },\n charactersAtLimit: 'You have 0 characters remaining',\n charactersOverLimit: {\n one: 'You have %{count} character too many',\n other: 'You have %{count} characters too many'\n },\n wordsUnderLimit: {\n one: 'You have %{count} word remaining',\n other: 'You have %{count} words remaining'\n },\n wordsAtLimit: 'You have 0 words remaining',\n wordsOverLimit: {\n one: 'You have %{count} word too many',\n other: 'You have %{count} words too many'\n },\n textareaDescription: {\n other: ''\n }\n }\n});\nCharacterCount.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n },\n maxwords: {\n type: 'number'\n },\n maxlength: {\n type: 'number'\n },\n threshold: {\n type: 'number'\n }\n },\n anyOf: [{\n required: ['maxwords'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }, {\n required: ['maxlength'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }]\n});\n\nexport { CharacterCount };\n//# sourceMappingURL=character-count.mjs.map\n","import { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Checkboxes component\n *\n * @preserve\n */\nclass Checkboxes extends Component {\n /**\n * Checkboxes can be associated with a 'conditionally revealed' content block\n * – for example, a checkbox for 'Phone' could reveal an additional form field\n * for the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the checkbox state.\n *\n * @param {Element | null} $root - HTML element to use for checkboxes\n */\n constructor($root) {\n super($root);\n this.$inputs = void 0;\n const $inputs = this.$root.querySelectorAll('input[type=\"checkbox\"]');\n if (!$inputs.length) {\n throw new ElementError({\n component: Checkboxes,\n identifier: 'Form inputs (`<input type=\"checkbox\">`)'\n });\n }\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n component: Checkboxes,\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$root.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);\n }\n }\n unCheckAllInputsExcept($input) {\n const allInputsWithSameName = document.querySelectorAll(`input[type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameName.forEach($inputWithSameName => {\n const hasSameFormOwner = $input.form === $inputWithSameName.form;\n if (hasSameFormOwner && $inputWithSameName !== $input) {\n $inputWithSameName.checked = false;\n this.syncConditionalRevealWithInputState($inputWithSameName);\n }\n });\n }\n unCheckExclusiveInputs($input) {\n const allInputsWithSameNameAndExclusiveBehaviour = document.querySelectorAll(`input[data-behaviour=\"exclusive\"][type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameNameAndExclusiveBehaviour.forEach($exclusiveInput => {\n const hasSameFormOwner = $input.form === $exclusiveInput.form;\n if (hasSameFormOwner) {\n $exclusiveInput.checked = false;\n this.syncConditionalRevealWithInputState($exclusiveInput);\n }\n });\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'checkbox') {\n return;\n }\n const hasAriaControls = $clickedInput.getAttribute('aria-controls');\n if (hasAriaControls) {\n this.syncConditionalRevealWithInputState($clickedInput);\n }\n if (!$clickedInput.checked) {\n return;\n }\n const hasBehaviourExclusive = $clickedInput.getAttribute('data-behaviour') === 'exclusive';\n if (hasBehaviourExclusive) {\n this.unCheckAllInputsExcept($clickedInput);\n } else {\n this.unCheckExclusiveInputs($clickedInput);\n }\n }\n}\nCheckboxes.moduleName = 'govuk-checkboxes';\n\nexport { Checkboxes };\n//# sourceMappingURL=checkboxes.mjs.map\n","import { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { setFocus, getFragmentFromUrl } from '../../common/index.mjs';\n\n/**\n * Error summary component\n *\n * Takes focus on initialisation for accessible announcement, unless disabled in\n * configuration.\n *\n * @preserve\n * @augments ConfigurableComponent<ErrorSummaryConfig>\n */\nclass ErrorSummary extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for error summary\n * @param {ErrorSummaryConfig} [config] - Error summary config\n */\n constructor($root, config = {}) {\n super($root, config);\n if (!this.config.disableAutoFocus) {\n setFocus(this.$root);\n }\n this.$root.addEventListener('click', event => this.handleClick(event));\n }\n handleClick(event) {\n const $target = event.target;\n if ($target && this.focusTarget($target)) {\n event.preventDefault();\n }\n }\n focusTarget($target) {\n if (!($target instanceof HTMLAnchorElement)) {\n return false;\n }\n const inputId = getFragmentFromUrl($target.href);\n if (!inputId) {\n return false;\n }\n const $input = document.getElementById(inputId);\n if (!$input) {\n return false;\n }\n const $legendOrLabel = this.getAssociatedLegendOrLabel($input);\n if (!$legendOrLabel) {\n return false;\n }\n $legendOrLabel.scrollIntoView();\n $input.focus({\n preventScroll: true\n });\n return true;\n }\n getAssociatedLegendOrLabel($input) {\n var _document$querySelect;\n const $fieldset = $input.closest('fieldset');\n if ($fieldset) {\n const $legends = $fieldset.getElementsByTagName('legend');\n if ($legends.length) {\n const $candidateLegend = $legends[0];\n if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {\n return $candidateLegend;\n }\n const legendTop = $candidateLegend.getBoundingClientRect().top;\n const inputRect = $input.getBoundingClientRect();\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return $candidateLegend;\n }\n }\n }\n }\n return (_document$querySelect = document.querySelector(`label[for='${$input.getAttribute('id')}']`)) != null ? _document$querySelect : $input.closest('label');\n }\n}\n\n/**\n * Error summary config\n *\n * @typedef {object} ErrorSummaryConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the error\n * summary will not be focussed when the page loads.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\nErrorSummary.moduleName = 'govuk-error-summary';\nErrorSummary.defaults = Object.freeze({\n disableAutoFocus: false\n});\nErrorSummary.schema = Object.freeze({\n properties: {\n disableAutoFocus: {\n type: 'boolean'\n }\n }\n});\n\nexport { ErrorSummary };\n//# sourceMappingURL=error-summary.mjs.map\n","import { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Exit this page component\n *\n * @preserve\n * @augments ConfigurableComponent<ExitThisPageConfig>\n */\nclass ExitThisPage extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element that wraps the Exit This Page button\n * @param {ExitThisPageConfig} [config] - Exit This Page config\n */\n constructor($root, config = {}) {\n super($root, config);\n this.i18n = void 0;\n this.$button = void 0;\n this.$skiplinkButton = null;\n this.$updateSpan = null;\n this.$indicatorContainer = null;\n this.$overlay = null;\n this.keypressCounter = 0;\n this.lastKeyWasModified = false;\n this.timeoutTime = 5000;\n this.keypressTimeoutId = null;\n this.timeoutMessageId = null;\n const $button = this.$root.querySelector('.govuk-exit-this-page__button');\n if (!($button instanceof HTMLAnchorElement)) {\n throw new ElementError({\n component: ExitThisPage,\n element: $button,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Button (`.govuk-exit-this-page__button`)'\n });\n }\n this.i18n = new I18n(this.config.i18n);\n this.$button = $button;\n const $skiplinkButton = document.querySelector('.govuk-js-exit-this-page-skiplink');\n if ($skiplinkButton instanceof HTMLAnchorElement) {\n this.$skiplinkButton = $skiplinkButton;\n }\n this.buildIndicator();\n this.initUpdateSpan();\n this.initButtonClickHandler();\n if (!('govukFrontendExitThisPageKeypress' in document.body.dataset)) {\n document.addEventListener('keyup', this.handleKeypress.bind(this), true);\n document.body.dataset.govukFrontendExitThisPageKeypress = 'true';\n }\n window.addEventListener('pageshow', this.resetPage.bind(this));\n }\n initUpdateSpan() {\n this.$updateSpan = document.createElement('span');\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.className = 'govuk-visually-hidden';\n this.$root.appendChild(this.$updateSpan);\n }\n initButtonClickHandler() {\n this.$button.addEventListener('click', this.handleClick.bind(this));\n if (this.$skiplinkButton) {\n this.$skiplinkButton.addEventListener('click', this.handleClick.bind(this));\n }\n }\n buildIndicator() {\n this.$indicatorContainer = document.createElement('div');\n this.$indicatorContainer.className = 'govuk-exit-this-page__indicator';\n this.$indicatorContainer.setAttribute('aria-hidden', 'true');\n for (let i = 0; i < 3; i++) {\n const $indicator = document.createElement('div');\n $indicator.className = 'govuk-exit-this-page__indicator-light';\n this.$indicatorContainer.appendChild($indicator);\n }\n this.$button.appendChild(this.$indicatorContainer);\n }\n updateIndicator() {\n if (!this.$indicatorContainer) {\n return;\n }\n this.$indicatorContainer.classList.toggle('govuk-exit-this-page__indicator--visible', this.keypressCounter > 0);\n const $indicators = this.$indicatorContainer.querySelectorAll('.govuk-exit-this-page__indicator-light');\n $indicators.forEach(($indicator, index) => {\n $indicator.classList.toggle('govuk-exit-this-page__indicator-light--on', index < this.keypressCounter);\n });\n }\n exitPage() {\n if (!this.$updateSpan) {\n return;\n }\n this.$updateSpan.textContent = '';\n document.body.classList.add('govuk-exit-this-page-hide-content');\n this.$overlay = document.createElement('div');\n this.$overlay.className = 'govuk-exit-this-page-overlay';\n this.$overlay.setAttribute('role', 'alert');\n document.body.appendChild(this.$overlay);\n this.$overlay.textContent = this.i18n.t('activated');\n window.location.href = this.$button.href;\n }\n handleClick(event) {\n event.preventDefault();\n this.exitPage();\n }\n handleKeypress(event) {\n if (!this.$updateSpan) {\n return;\n }\n if (event.key === 'Shift' && !this.lastKeyWasModified) {\n this.keypressCounter += 1;\n this.updateIndicator();\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n this.timeoutMessageId = null;\n }\n if (this.keypressCounter >= 3) {\n this.keypressCounter = 0;\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n this.exitPage();\n } else {\n if (this.keypressCounter === 1) {\n this.$updateSpan.textContent = this.i18n.t('pressTwoMoreTimes');\n } else {\n this.$updateSpan.textContent = this.i18n.t('pressOneMoreTime');\n }\n }\n this.setKeypressTimer();\n } else if (this.keypressTimeoutId) {\n this.resetKeypressTimer();\n }\n this.lastKeyWasModified = event.shiftKey;\n }\n setKeypressTimer() {\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n this.keypressTimeoutId = window.setTimeout(this.resetKeypressTimer.bind(this), this.timeoutTime);\n }\n resetKeypressTimer() {\n if (!this.$updateSpan) {\n return;\n }\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n const $updateSpan = this.$updateSpan;\n this.keypressCounter = 0;\n $updateSpan.textContent = this.i18n.t('timedOut');\n this.timeoutMessageId = window.setTimeout(() => {\n $updateSpan.textContent = '';\n }, this.timeoutTime);\n this.updateIndicator();\n }\n resetPage() {\n document.body.classList.remove('govuk-exit-this-page-hide-content');\n if (this.$overlay) {\n this.$overlay.remove();\n this.$overlay = null;\n }\n if (this.$updateSpan) {\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.textContent = '';\n }\n this.updateIndicator();\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n }\n }\n}\n\n/**\n * Exit this Page config\n *\n * @see {@link ExitThisPage.defaults}\n * @typedef {object} ExitThisPageConfig\n * @property {ExitThisPageTranslations} [i18n=ExitThisPage.defaults.i18n] - Exit this page translations\n */\n\n/**\n * Exit this Page translations\n *\n * @see {@link ExitThisPage.defaults.i18n}\n * @typedef {object} ExitThisPageTranslations\n *\n * Messages used by the component programatically inserted text, including\n * overlay text and screen reader announcements.\n * @property {string} [activated] - Screen reader announcement for when EtP\n * keypress functionality has been successfully activated.\n * @property {string} [timedOut] - Screen reader announcement for when the EtP\n * keypress functionality has timed out.\n * @property {string} [pressTwoMoreTimes] - Screen reader announcement informing\n * the user they must press the activation key two more times.\n * @property {string} [pressOneMoreTime] - Screen reader announcement informing\n * the user they must press the activation key one more time.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\nExitThisPage.moduleName = 'govuk-exit-this-page';\nExitThisPage.defaults = Object.freeze({\n i18n: {\n activated: 'Loading.',\n timedOut: 'Exit this page expired.',\n pressTwoMoreTimes: 'Shift, press 2 more times to exit.',\n pressOneMoreTime: 'Shift, press 1 more time to exit.'\n }\n});\nExitThisPage.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\n\nexport { ExitThisPage };\n//# sourceMappingURL=exit-this-page.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { formatErrorMessage } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * File upload component\n *\n * @preserve\n * @augments ConfigurableComponent<FileUploadConfig>\n */\nclass FileUpload extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - File input element\n * @param {FileUploadConfig} [config] - File Upload config\n */\n constructor($root, config = {}) {\n super($root, config);\n this.$input = void 0;\n this.$button = void 0;\n this.$status = void 0;\n this.i18n = void 0;\n this.id = void 0;\n this.$announcements = void 0;\n this.enteredAnotherElement = void 0;\n const $input = this.$root.querySelector('input');\n if ($input === null) {\n throw new ElementError({\n component: FileUpload,\n identifier: 'File inputs (`<input type=\"file\">`)'\n });\n }\n if ($input.type !== 'file') {\n throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type=\"file\">`) attribute (`type`) is not `file`'));\n }\n this.$input = $input;\n this.$input.setAttribute('hidden', 'true');\n if (!this.$input.id) {\n throw new ElementError({\n component: FileUpload,\n identifier: 'File input (`<input type=\"file\">`) attribute (`id`)'\n });\n }\n this.id = this.$input.id;\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue(this.$root, 'lang')\n });\n const $label = this.findLabel();\n if (!$label.id) {\n $label.id = `${this.id}-label`;\n }\n this.$input.id = `${this.id}-input`;\n const $button = document.createElement('button');\n $button.classList.add('govuk-file-upload-button');\n $button.type = 'button';\n $button.id = this.id;\n $button.classList.add('govuk-file-upload-button--empty');\n const ariaDescribedBy = this.$input.getAttribute('aria-describedby');\n if (ariaDescribedBy) {\n $button.setAttribute('aria-describedby', ariaDescribedBy);\n }\n const $status = document.createElement('span');\n $status.className = 'govuk-body govuk-file-upload-button__status';\n $status.setAttribute('aria-live', 'polite');\n $status.innerText = this.i18n.t('noFileChosen');\n $button.appendChild($status);\n const commaSpan = document.createElement('span');\n commaSpan.className = 'govuk-visually-hidden';\n commaSpan.innerText = ', ';\n commaSpan.id = `${this.id}-comma`;\n $button.appendChild(commaSpan);\n const containerSpan = document.createElement('span');\n containerSpan.className = 'govuk-file-upload-button__pseudo-button-container';\n const buttonSpan = document.createElement('span');\n buttonSpan.className = 'govuk-button govuk-button--secondary govuk-file-upload-button__pseudo-button';\n buttonSpan.innerText = this.i18n.t('chooseFilesButton');\n containerSpan.appendChild(buttonSpan);\n containerSpan.insertAdjacentText('beforeend', ' ');\n const instructionSpan = document.createElement('span');\n instructionSpan.className = 'govuk-body govuk-file-upload-button__instruction';\n instructionSpan.innerText = this.i18n.t('dropInstruction');\n containerSpan.appendChild(instructionSpan);\n $button.appendChild(containerSpan);\n $button.setAttribute('aria-labelledby', `${$label.id} ${commaSpan.id} ${$button.id}`);\n $button.addEventListener('click', this.onClick.bind(this));\n $button.addEventListener('dragover', event => {\n event.preventDefault();\n });\n this.$root.insertAdjacentElement('afterbegin', $button);\n this.$input.setAttribute('tabindex', '-1');\n this.$input.setAttribute('aria-hidden', 'true');\n this.$button = $button;\n this.$status = $status;\n this.$input.addEventListener('change', this.onChange.bind(this));\n this.updateDisabledState();\n this.observeDisabledState();\n this.$announcements = document.createElement('span');\n this.$announcements.classList.add('govuk-file-upload-announcements');\n this.$announcements.classList.add('govuk-visually-hidden');\n this.$announcements.setAttribute('aria-live', 'assertive');\n this.$root.insertAdjacentElement('afterend', this.$announcements);\n this.$button.addEventListener('drop', this.onDrop.bind(this));\n document.addEventListener('dragenter', this.updateDropzoneVisibility.bind(this));\n document.addEventListener('dragenter', () => {\n this.enteredAnotherElement = true;\n });\n document.addEventListener('dragleave', () => {\n if (!this.enteredAnotherElement && !this.$button.disabled) {\n this.hideDraggingState();\n this.$announcements.innerText = this.i18n.t('leftDropZone');\n }\n this.enteredAnotherElement = false;\n });\n }\n updateDropzoneVisibility(event) {\n if (this.$button.disabled) return;\n if (event.target instanceof Node) {\n if (this.$root.contains(event.target)) {\n if (event.dataTransfer && isContainingFiles(event.dataTransfer)) {\n if (!this.$button.classList.contains('govuk-file-upload-button--dragging')) {\n this.showDraggingState();\n this.$announcements.innerText = this.i18n.t('enteredDropZone');\n }\n }\n } else {\n if (this.$button.classList.contains('govuk-file-upload-button--dragging')) {\n this.hideDraggingState();\n this.$announcements.innerText = this.i18n.t('leftDropZone');\n }\n }\n }\n }\n showDraggingState() {\n this.$button.classList.add('govuk-file-upload-button--dragging');\n }\n hideDraggingState() {\n this.$button.classList.remove('govuk-file-upload-button--dragging');\n }\n onDrop(event) {\n event.preventDefault();\n if (event.dataTransfer && isContainingFiles(event.dataTransfer)) {\n this.$input.files = event.dataTransfer.files;\n this.$input.dispatchEvent(new CustomEvent('change'));\n this.hideDraggingState();\n }\n }\n onChange() {\n const fileCount = this.$input.files.length;\n if (fileCount === 0) {\n this.$status.innerText = this.i18n.t('noFileChosen');\n this.$button.classList.add('govuk-file-upload-button--empty');\n } else {\n if (fileCount === 1) {\n this.$status.innerText = this.$input.files[0].name;\n } else {\n this.$status.innerText = this.i18n.t('multipleFilesChosen', {\n count: fileCount\n });\n }\n this.$button.classList.remove('govuk-file-upload-button--empty');\n }\n }\n findLabel() {\n const $label = document.querySelector(`label[for=\"${this.$input.id}\"]`);\n if (!$label) {\n throw new ElementError({\n component: FileUpload,\n identifier: `Field label (\\`<label for=${this.$input.id}>\\`)`\n });\n }\n return $label;\n }\n onClick() {\n this.$input.click();\n }\n observeDisabledState() {\n const observer = new MutationObserver(mutationList => {\n for (const mutation of mutationList) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'disabled') {\n this.updateDisabledState();\n }\n }\n });\n observer.observe(this.$input, {\n attributes: true\n });\n }\n updateDisabledState() {\n this.$button.disabled = this.$input.disabled;\n this.$root.classList.toggle('govuk-drop-zone--disabled', this.$button.disabled);\n }\n}\nFileUpload.moduleName = 'govuk-file-upload';\nFileUpload.defaults = Object.freeze({\n i18n: {\n chooseFilesButton: 'Choose file',\n dropInstruction: 'or drop file',\n noFileChosen: 'No file chosen',\n multipleFilesChosen: {\n one: '%{count} file chosen',\n other: '%{count} files chosen'\n },\n enteredDropZone: 'Entered drop zone',\n leftDropZone: 'Left drop zone'\n }\n});\nFileUpload.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\nfunction isContainingFiles(dataTransfer) {\n const hasNoTypesInfo = dataTransfer.types.length === 0;\n const isDraggingFiles = dataTransfer.types.some(type => type === 'Files');\n return hasNoTypesInfo || isDraggingFiles;\n}\n\n/**\n * @typedef {HTMLInputElement & {files: FileList}} HTMLFileInputElement\n */\n\n/**\n * File upload config\n *\n * @see {@link FileUpload.defaults}\n * @typedef {object} FileUploadConfig\n * @property {FileUploadTranslations} [i18n=FileUpload.defaults.i18n] - File upload translations\n */\n\n/**\n * File upload translations\n *\n * @see {@link FileUpload.defaults.i18n}\n * @typedef {object} FileUploadTranslations\n *\n * Messages used by the component\n * @property {string} [chooseFile] - The text of the button that opens the file picker\n * @property {string} [dropInstruction] - The text informing users they can drop files\n * @property {TranslationPluralForms} [multipleFilesChosen] - The text displayed when multiple files\n * have been chosen by the user\n * @property {string} [noFileChosen] - The text to displayed when no file has been chosen by the user\n * @property {string} [enteredDropZone] - The text announced by assistive technology\n * when user drags files and enters the drop zone\n * @property {string} [leftDropZone] - The text announced by assistive technology\n * when user drags files and leaves the drop zone without dropping\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n * @import { TranslationPluralForms } from '../../i18n.mjs'\n */\n\nexport { FileUpload };\n//# sourceMappingURL=file-upload.mjs.map\n","import { getBreakpoint } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Header component\n *\n * @preserve\n */\nclass Header extends Component {\n /**\n * Apply a matchMedia for desktop which will trigger a state sync if the\n * browser viewport moves between states.\n *\n * @param {Element | null} $root - HTML element to use for header\n */\n constructor($root) {\n super($root);\n this.$menuButton = void 0;\n this.$menu = void 0;\n this.menuIsOpen = false;\n this.mql = null;\n const $menuButton = this.$root.querySelector('.govuk-js-header-toggle');\n if (!$menuButton) {\n return this;\n }\n this.$root.classList.add('govuk-header--with-js-navigation');\n const menuId = $menuButton.getAttribute('aria-controls');\n if (!menuId) {\n throw new ElementError({\n component: Header,\n identifier: 'Navigation button (`<button class=\"govuk-js-header-toggle\">`) attribute (`aria-controls`)'\n });\n }\n const $menu = document.getElementById(menuId);\n if (!$menu) {\n throw new ElementError({\n component: Header,\n element: $menu,\n identifier: `Navigation (\\`<ul id=\"${menuId}\">\\`)`\n });\n }\n this.$menu = $menu;\n this.$menuButton = $menuButton;\n this.setupResponsiveChecks();\n this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('desktop');\n if (!breakpoint.value) {\n throw new ElementError({\n component: Header,\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n if (!this.mql || !this.$menu || !this.$menuButton) {\n return;\n }\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden');\n this.$menuButton.setAttribute('hidden', '');\n } else {\n this.$menuButton.removeAttribute('hidden');\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden');\n } else {\n this.$menu.setAttribute('hidden', '');\n }\n }\n }\n handleMenuButtonClick() {\n this.menuIsOpen = !this.menuIsOpen;\n this.checkMode();\n }\n}\nHeader.moduleName = 'govuk-header';\n\nexport { Header };\n//# sourceMappingURL=header.mjs.map\n","import { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { setFocus } from '../../common/index.mjs';\n\n/**\n * Notification Banner component\n *\n * @preserve\n * @augments ConfigurableComponent<NotificationBannerConfig>\n */\nclass NotificationBanner extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($root, config = {}) {\n super($root, config);\n if (this.$root.getAttribute('role') === 'alert' && !this.config.disableAutoFocus) {\n setFocus(this.$root);\n }\n }\n}\n\n/**\n * Notification banner config\n *\n * @typedef {object} NotificationBannerConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the\n * notification banner will not be focussed when the page loads. This only\n * applies if the component has a `role` of `alert` – in other cases the\n * component will not be focused on page load, regardless of this option.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\nNotificationBanner.moduleName = 'govuk-notification-banner';\nNotificationBanner.defaults = Object.freeze({\n disableAutoFocus: false\n});\nNotificationBanner.schema = Object.freeze({\n properties: {\n disableAutoFocus: {\n type: 'boolean'\n }\n }\n});\n\nexport { NotificationBanner };\n//# sourceMappingURL=notification-banner.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Password input component\n *\n * @preserve\n * @augments ConfigurableComponent<PasswordInputConfig>\n */\nclass PasswordInput extends ConfigurableComponent {\n /**\n * @param {Element | null} $root - HTML element to use for password input\n * @param {PasswordInputConfig} [config] - Password input config\n */\n constructor($root, config = {}) {\n super($root, config);\n this.i18n = void 0;\n this.$input = void 0;\n this.$showHideButton = void 0;\n this.$screenReaderStatusMessage = void 0;\n const $input = this.$root.querySelector('.govuk-js-password-input-input');\n if (!($input instanceof HTMLInputElement)) {\n throw new ElementError({\n component: PasswordInput,\n element: $input,\n expectedType: 'HTMLInputElement',\n identifier: 'Form field (`.govuk-js-password-input-input`)'\n });\n }\n if ($input.type !== 'password') {\n throw new ElementError('Password input: Form field (`.govuk-js-password-input-input`) must be of type `password`.');\n }\n const $showHideButton = this.$root.querySelector('.govuk-js-password-input-toggle');\n if (!($showHideButton instanceof HTMLButtonElement)) {\n throw new ElementError({\n component: PasswordInput,\n element: $showHideButton,\n expectedType: 'HTMLButtonElement',\n identifier: 'Button (`.govuk-js-password-input-toggle`)'\n });\n }\n if ($showHideButton.type !== 'button') {\n throw new ElementError('Password input: Button (`.govuk-js-password-input-toggle`) must be of type `button`.');\n }\n this.$input = $input;\n this.$showHideButton = $showHideButton;\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue(this.$root, 'lang')\n });\n this.$showHideButton.removeAttribute('hidden');\n const $screenReaderStatusMessage = document.createElement('div');\n $screenReaderStatusMessage.className = 'govuk-password-input__sr-status govuk-visually-hidden';\n $screenReaderStatusMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderStatusMessage = $screenReaderStatusMessage;\n this.$input.insertAdjacentElement('afterend', $screenReaderStatusMessage);\n this.$showHideButton.addEventListener('click', this.toggle.bind(this));\n if (this.$input.form) {\n this.$input.form.addEventListener('submit', () => this.hide());\n }\n window.addEventListener('pageshow', event => {\n if (event.persisted && this.$input.type !== 'password') {\n this.hide();\n }\n });\n this.hide();\n }\n toggle(event) {\n event.preventDefault();\n if (this.$input.type === 'password') {\n this.show();\n return;\n }\n this.hide();\n }\n show() {\n this.setType('text');\n }\n hide() {\n this.setType('password');\n }\n setType(type) {\n if (type === this.$input.type) {\n return;\n }\n this.$input.setAttribute('type', type);\n const isHidden = type === 'password';\n const prefixButton = isHidden ? 'show' : 'hide';\n const prefixStatus = isHidden ? 'passwordHidden' : 'passwordShown';\n this.$showHideButton.innerText = this.i18n.t(`${prefixButton}Password`);\n this.$showHideButton.setAttribute('aria-label', this.i18n.t(`${prefixButton}PasswordAriaLabel`));\n this.$screenReaderStatusMessage.innerText = this.i18n.t(`${prefixStatus}Announcement`);\n }\n}\n\n/**\n * Password input config\n *\n * @typedef {object} PasswordInputConfig\n * @property {PasswordInputTranslations} [i18n=PasswordInput.defaults.i18n] - Password input translations\n */\n\n/**\n * Password input translations\n *\n * @see {@link PasswordInput.defaults.i18n}\n * @typedef {object} PasswordInputTranslations\n *\n * Messages displayed to the user indicating the state of the show/hide toggle.\n * @property {string} [showPassword] - Visible text of the button when the\n * password is currently hidden. Plain text only.\n * @property {string} [hidePassword] - Visible text of the button when the\n * password is currently visible. Plain text only.\n * @property {string} [showPasswordAriaLabel] - aria-label of the button when\n * the password is currently hidden. Plain text only.\n * @property {string} [hidePasswordAriaLabel] - aria-label of the button when\n * the password is currently visible. Plain text only.\n * @property {string} [passwordShownAnnouncement] - Screen reader\n * announcement to make when the password has just become visible.\n * Plain text only.\n * @property {string} [passwordHiddenAnnouncement] - Screen reader\n * announcement to make when the password has just been hidden.\n * Plain text only.\n */\n\n/**\n * @import { Schema } from '../../common/configuration.mjs'\n */\nPasswordInput.moduleName = 'govuk-password-input';\nPasswordInput.defaults = Object.freeze({\n i18n: {\n showPassword: 'Show',\n hidePassword: 'Hide',\n showPasswordAriaLabel: 'Show password',\n hidePasswordAriaLabel: 'Hide password',\n passwordShownAnnouncement: 'Your password is visible',\n passwordHiddenAnnouncement: 'Your password is hidden'\n }\n});\nPasswordInput.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\n\nexport { PasswordInput };\n//# sourceMappingURL=password-input.mjs.map\n","import { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Radios component\n *\n * @preserve\n */\nclass Radios extends Component {\n /**\n * Radios can be associated with a 'conditionally revealed' content block –\n * for example, a radio for 'Phone' could reveal an additional form field for\n * the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the radio state.\n *\n * @param {Element | null} $root - HTML element to use for radios\n */\n constructor($root) {\n super($root);\n this.$inputs = void 0;\n const $inputs = this.$root.querySelectorAll('input[type=\"radio\"]');\n if (!$inputs.length) {\n throw new ElementError({\n component: Radios,\n identifier: 'Form inputs (`<input type=\"radio\">`)'\n });\n }\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n component: Radios,\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$root.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-radios__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);\n }\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'radio') {\n return;\n }\n const $allInputs = document.querySelectorAll('input[type=\"radio\"][aria-controls]');\n const $clickedInputForm = $clickedInput.form;\n const $clickedInputName = $clickedInput.name;\n $allInputs.forEach($input => {\n const hasSameFormOwner = $input.form === $clickedInputForm;\n const hasSameName = $input.name === $clickedInputName;\n if (hasSameName && hasSameFormOwner) {\n this.syncConditionalRevealWithInputState($input);\n }\n });\n }\n}\nRadios.moduleName = 'govuk-radios';\n\nexport { Radios };\n//# sourceMappingURL=radios.mjs.map\n","import { getBreakpoint } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Service Navigation component\n *\n * @preserve\n */\nclass ServiceNavigation extends Component {\n /**\n * @param {Element | null} $root - HTML element to use for header\n */\n constructor($root) {\n super($root);\n this.$menuButton = void 0;\n this.$menu = void 0;\n this.menuIsOpen = false;\n this.mql = null;\n const $menuButton = this.$root.querySelector('.govuk-js-service-navigation-toggle');\n if (!$menuButton) {\n return this;\n }\n const menuId = $menuButton.getAttribute('aria-controls');\n if (!menuId) {\n throw new ElementError({\n component: ServiceNavigation,\n identifier: 'Navigation button (`<button class=\"govuk-js-service-navigation-toggle\">`) attribute (`aria-controls`)'\n });\n }\n const $menu = document.getElementById(menuId);\n if (!$menu) {\n throw new ElementError({\n component: ServiceNavigation,\n element: $menu,\n identifier: `Navigation (\\`<ul id=\"${menuId}\">\\`)`\n });\n }\n this.$menu = $menu;\n this.$menuButton = $menuButton;\n this.setupResponsiveChecks();\n this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet');\n if (!breakpoint.value) {\n throw new ElementError({\n component: ServiceNavigation,\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n if (!this.mql || !this.$menu || !this.$menuButton) {\n return;\n }\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden');\n this.$menuButton.setAttribute('hidden', '');\n } else {\n this.$menuButton.removeAttribute('hidden');\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden');\n } else {\n this.$menu.setAttribute('hidden', '');\n }\n }\n }\n handleMenuButtonClick() {\n this.menuIsOpen = !this.menuIsOpen;\n this.checkMode();\n }\n}\nServiceNavigation.moduleName = 'govuk-service-navigation';\n\nexport { ServiceNavigation };\n//# sourceMappingURL=service-navigation.mjs.map\n","import { getFragmentFromUrl, setFocus } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Skip link component\n *\n * @preserve\n * @augments Component<HTMLAnchorElement>\n */\nclass SkipLink extends Component {\n /**\n * @param {Element | null} $root - HTML element to use for skip link\n * @throws {ElementError} when $root is not set or the wrong type\n * @throws {ElementError} when $root.hash does not contain a hash\n * @throws {ElementError} when the linked element is missing or the wrong type\n */\n constructor($root) {\n var _this$$root$getAttrib;\n super($root);\n const hash = this.$root.hash;\n const href = (_this$$root$getAttrib = this.$root.getAttribute('href')) != null ? _this$$root$getAttrib : '';\n let url;\n try {\n url = new window.URL(this.$root.href);\n } catch (error) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) is invalid`);\n }\n if (url.origin !== window.location.origin || url.pathname !== window.location.pathname) {\n return;\n }\n const linkedElementId = getFragmentFromUrl(hash);\n if (!linkedElementId) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) has no hash fragment`);\n }\n const $linkedElement = document.getElementById(linkedElementId);\n if (!$linkedElement) {\n throw new ElementError({\n component: SkipLink,\n element: $linkedElement,\n identifier: `Target content (\\`id=\"${linkedElementId}\"\\`)`\n });\n }\n this.$root.addEventListener('click', () => setFocus($linkedElement, {\n onBeforeFocus() {\n $linkedElement.classList.add('govuk-skip-link-focused-element');\n },\n onBlur() {\n $linkedElement.classList.remove('govuk-skip-link-focused-element');\n }\n }));\n }\n}\nSkipLink.elementType = HTMLAnchorElement;\nSkipLink.moduleName = 'govuk-skip-link';\n\nexport { SkipLink };\n//# sourceMappingURL=skip-link.mjs.map\n","import { getBreakpoint, getFragmentFromUrl } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Tabs component\n *\n * @preserve\n */\nclass Tabs extends Component {\n /**\n * @param {Element | null} $root - HTML element to use for tabs\n */\n constructor($root) {\n super($root);\n this.$tabs = void 0;\n this.$tabList = void 0;\n this.$tabListItems = void 0;\n this.jsHiddenClass = 'govuk-tabs__panel--hidden';\n this.changingHash = false;\n this.boundTabClick = void 0;\n this.boundTabKeydown = void 0;\n this.boundOnHashChange = void 0;\n this.mql = null;\n const $tabs = this.$root.querySelectorAll('a.govuk-tabs__tab');\n if (!$tabs.length) {\n throw new ElementError({\n component: Tabs,\n identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n });\n }\n this.$tabs = $tabs;\n this.boundTabClick = this.onTabClick.bind(this);\n this.boundTabKeydown = this.onTabKeydown.bind(this);\n this.boundOnHashChange = this.onHashChange.bind(this);\n const $tabList = this.$root.querySelector('.govuk-tabs__list');\n const $tabListItems = this.$root.querySelectorAll('li.govuk-tabs__list-item');\n if (!$tabList) {\n throw new ElementError({\n component: Tabs,\n identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n });\n }\n if (!$tabListItems.length) {\n throw new ElementError({\n component: Tabs,\n identifier: 'List items (`<li class=\"govuk-tabs__list-item\">`)'\n });\n }\n this.$tabList = $tabList;\n this.$tabListItems = $tabListItems;\n this.setupResponsiveChecks();\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet');\n if (!breakpoint.value) {\n throw new ElementError({\n component: Tabs,\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n var _this$mql;\n if ((_this$mql = this.mql) != null && _this$mql.matches) {\n this.setup();\n } else {\n this.teardown();\n }\n }\n setup() {\n var _this$getTab;\n this.$tabList.setAttribute('role', 'tablist');\n this.$tabListItems.forEach($item => {\n $item.setAttribute('role', 'presentation');\n });\n this.$tabs.forEach($tab => {\n this.setAttributes($tab);\n $tab.addEventListener('click', this.boundTabClick, true);\n $tab.addEventListener('keydown', this.boundTabKeydown, true);\n this.hideTab($tab);\n });\n const $activeTab = (_this$getTab = this.getTab(window.location.hash)) != null ? _this$getTab : this.$tabs[0];\n this.showTab($activeTab);\n window.addEventListener('hashchange', this.boundOnHashChange, true);\n }\n teardown() {\n this.$tabList.removeAttribute('role');\n this.$tabListItems.forEach($item => {\n $item.removeAttribute('role');\n });\n this.$tabs.forEach($tab => {\n $tab.removeEventListener('click', this.boundTabClick, true);\n $tab.removeEventListener('keydown', this.boundTabKeydown, true);\n this.unsetAttributes($tab);\n });\n window.removeEventListener('hashchange', this.boundOnHashChange, true);\n }\n onHashChange() {\n const hash = window.location.hash;\n const $tabWithHash = this.getTab(hash);\n if (!$tabWithHash) {\n return;\n }\n if (this.changingHash) {\n this.changingHash = false;\n return;\n }\n const $previousTab = this.getCurrentTab();\n if (!$previousTab) {\n return;\n }\n this.hideTab($previousTab);\n this.showTab($tabWithHash);\n $tabWithHash.focus();\n }\n hideTab($tab) {\n this.unhighlightTab($tab);\n this.hidePanel($tab);\n }\n showTab($tab) {\n this.highlightTab($tab);\n this.showPanel($tab);\n }\n getTab(hash) {\n return this.$root.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`);\n }\n setAttributes($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return;\n }\n $tab.setAttribute('id', `tab_${panelId}`);\n $tab.setAttribute('role', 'tab');\n $tab.setAttribute('aria-controls', panelId);\n $tab.setAttribute('aria-selected', 'false');\n $tab.setAttribute('tabindex', '-1');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.setAttribute('role', 'tabpanel');\n $panel.setAttribute('aria-labelledby', $tab.id);\n $panel.classList.add(this.jsHiddenClass);\n }\n unsetAttributes($tab) {\n $tab.removeAttribute('id');\n $tab.removeAttribute('role');\n $tab.removeAttribute('aria-controls');\n $tab.removeAttribute('aria-selected');\n $tab.removeAttribute('tabindex');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.removeAttribute('role');\n $panel.removeAttribute('aria-labelledby');\n $panel.classList.remove(this.jsHiddenClass);\n }\n onTabClick(event) {\n const $currentTab = this.getCurrentTab();\n const $nextTab = event.currentTarget;\n if (!$currentTab || !($nextTab instanceof HTMLAnchorElement)) {\n return;\n }\n event.preventDefault();\n this.hideTab($currentTab);\n this.showTab($nextTab);\n this.createHistoryEntry($nextTab);\n }\n createHistoryEntry($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n const panelId = $panel.id;\n $panel.id = '';\n this.changingHash = true;\n window.location.hash = panelId;\n $panel.id = panelId;\n }\n onTabKeydown(event) {\n switch (event.key) {\n case 'ArrowLeft':\n case 'Left':\n this.activatePreviousTab();\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'Right':\n this.activateNextTab();\n event.preventDefault();\n break;\n }\n }\n activateNextTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $nextTabListItem = $currentTab.parentElement.nextElementSibling;\n if (!$nextTabListItem) {\n return;\n }\n const $nextTab = $nextTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$nextTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($nextTab);\n $nextTab.focus();\n this.createHistoryEntry($nextTab);\n }\n activatePreviousTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $previousTabListItem = $currentTab.parentElement.previousElementSibling;\n if (!$previousTabListItem) {\n return;\n }\n const $previousTab = $previousTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$previousTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($previousTab);\n $previousTab.focus();\n this.createHistoryEntry($previousTab);\n }\n getPanel($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return null;\n }\n return this.$root.querySelector(`#${panelId}`);\n }\n showPanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.remove(this.jsHiddenClass);\n }\n hidePanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.add(this.jsHiddenClass);\n }\n unhighlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'false');\n $tab.parentElement.classList.remove('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '-1');\n }\n highlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'true');\n $tab.parentElement.classList.add('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '0');\n }\n getCurrentTab() {\n return this.$root.querySelector('.govuk-tabs__list-item--selected a.govuk-tabs__tab');\n }\n}\nTabs.moduleName = 'govuk-tabs';\n\nexport { Tabs };\n//# sourceMappingURL=tabs.mjs.map\n","import { isSupported } from './common/index.mjs';\nimport { Accordion } from './components/accordion/accordion.mjs';\nimport { Button } from './components/button/button.mjs';\nimport { CharacterCount } from './components/character-count/character-count.mjs';\nimport { Checkboxes } from './components/checkboxes/checkboxes.mjs';\nimport { ErrorSummary } from './components/error-summary/error-summary.mjs';\nimport { ExitThisPage } from './components/exit-this-page/exit-this-page.mjs';\nimport { FileUpload } from './components/file-upload/file-upload.mjs';\nimport { Header } from './components/header/header.mjs';\nimport { NotificationBanner } from './components/notification-banner/notification-banner.mjs';\nimport { PasswordInput } from './components/password-input/password-input.mjs';\nimport { Radios } from './components/radios/radios.mjs';\nimport { ServiceNavigation } from './components/service-navigation/service-navigation.mjs';\nimport { SkipLink } from './components/skip-link/skip-link.mjs';\nimport { Tabs } from './components/tabs/tabs.mjs';\nimport { SupportError } from './errors/index.mjs';\n\n/**\n * Initialise all components\n *\n * Use the `data-module` attributes to find, instantiate and init all of the\n * components provided as part of GOV.UK Frontend.\n *\n * @param {Config & { scope?: Element, onError?: OnErrorCallback<CompatibleClass> }} [config] - Config for all components (with optional scope)\n */\nfunction initAll(config) {\n var _config$scope;\n config = typeof config !== 'undefined' ? config : {};\n if (!isSupported()) {\n if (config.onError) {\n config.onError(new SupportError(), {\n config\n });\n } else {\n console.log(new SupportError());\n }\n return;\n }\n const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [FileUpload, config.fileUpload], [Header], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [ServiceNavigation], [SkipLink], [Tabs]];\n const options = {\n scope: (_config$scope = config.scope) != null ? _config$scope : document,\n onError: config.onError\n };\n components.forEach(([Component, config]) => {\n createAll(Component, config, options);\n });\n}\n\n/**\n * Create all instances of a specific component on the page\n *\n * Uses the `data-module` attribute to find all elements matching the specified\n * component on the page, creating instances of the component object for each\n * of them.\n *\n * Any component errors will be caught and logged to the console.\n *\n * @template {CompatibleClass} ComponentClass\n * @param {ComponentClass} Component - class of the component to create\n * @param {ComponentConfig<ComponentClass>} [config] - Config supplied to component\n * @param {OnErrorCallback<ComponentClass> | Element | Document | CreateAllOptions<ComponentClass> } [createAllOptions] - options for createAll including scope of the document to search within and callback function if error throw by component on init\n * @returns {Array<InstanceType<ComponentClass>>} - array of instantiated components\n */\nfunction createAll(Component, config, createAllOptions) {\n let $scope = document;\n let onError;\n if (typeof createAllOptions === 'object') {\n var _createAllOptions$sco;\n createAllOptions = createAllOptions;\n $scope = (_createAllOptions$sco = createAllOptions.scope) != null ? _createAllOptions$sco : $scope;\n onError = createAllOptions.onError;\n }\n if (typeof createAllOptions === 'function') {\n onError = createAllOptions;\n }\n if (createAllOptions instanceof HTMLElement) {\n $scope = createAllOptions;\n }\n const $elements = $scope.querySelectorAll(`[data-module=\"${Component.moduleName}\"]`);\n if (!isSupported()) {\n if (onError) {\n onError(new SupportError(), {\n component: Component,\n config\n });\n } else {\n console.log(new SupportError());\n }\n return [];\n }\n return Array.from($elements).map($element => {\n try {\n return typeof config !== 'undefined' ? new Component($element, config) : new Component($element);\n } catch (error) {\n if (onError) {\n onError(error, {\n element: $element,\n component: Component,\n config\n });\n } else {\n console.log(error);\n }\n return null;\n }\n }).filter(Boolean);\n}\n/**\n * @typedef {{new (...args: any[]): any, moduleName: string}} CompatibleClass\n */\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {AccordionConfig} [accordion] - Accordion config\n * @property {ButtonConfig} [button] - Button config\n * @property {CharacterCountConfig} [characterCount] - Character Count config\n * @property {ErrorSummaryConfig} [errorSummary] - Error Summary config\n * @property {ExitThisPageConfig} [exitThisPage] - Exit This Page config\n * @property {FileUploadConfig} [fileUpload] - File Upload config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n * @property {PasswordInputConfig} [passwordInput] - Password input config\n */\n/**\n * Config for individual components\n *\n * @import { AccordionConfig } from './components/accordion/accordion.mjs'\n * @import { ButtonConfig } from './components/button/button.mjs'\n * @import { CharacterCountConfig } from './components/character-count/character-count.mjs'\n * @import { ErrorSummaryConfig } from './components/error-summary/error-summary.mjs'\n * @import { ExitThisPageConfig } from './components/exit-this-page/exit-this-page.mjs'\n * @import { NotificationBannerConfig } from './components/notification-banner/notification-banner.mjs'\n * @import { PasswordInputConfig } from './components/password-input/password-input.mjs'\n * @import { FileUploadConfig } from './components/file-upload/file-upload.mjs'\n */\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Config} ConfigKey\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @typedef {ConstructorParameters<ComponentClass>[1]} ComponentConfig\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @typedef {object} ErrorContext\n * @property {Element} [element] - Element used for component module initialisation\n * @property {ComponentClass} [component] - Class of component\n * @property {ComponentConfig<ComponentClass>} config - Config supplied to component\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @callback OnErrorCallback\n * @param {unknown} error - Thrown error\n * @param {ErrorContext<ComponentClass>} context - Object containing the element, component class and configuration\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @typedef {object} CreateAllOptions\n * @property {Element | Document} [scope] - scope of the document to search within\n * @property {OnErrorCallback<ComponentClass>} [onError] - callback function if error throw by component on init\n */\n\nexport { createAll, initAll };\n//# sourceMappingURL=init.mjs.map\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","version","getFragmentFromUrl","url","includes","split","pop","getBreakpoint","name","property","window","getComputedStyle","document","documentElement","getPropertyValue","undefined","setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","onBlur","_options$onBlur","removeAttribute","setAttribute","addEventListener","once","onBeforeFocus","focus","isSupported","$scope","body","classList","contains","isObject","option","Array","isArray","formatErrorMessage","Component","message","moduleName","GOVUKFrontendError","Error","constructor","args","super","this","SupportError","supportMessage","HTMLScriptElement","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","$root","_$root","childConstructor","elementType","checkSupport","checkInitialised","HTMLElement","hasAttribute","isInitialised","configOverride","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","dataset","schema","out","entries","properties","entry","namespace","field","toString","normaliseString","type","extractConfigByNamespace","normaliseDataset","mergeConfigs","trimmedValue","trim","output","outputType","length","isFinite","Number","configObjects","formattedConfigObject","configObject","keys","override","newObject","current","keyParts","index","I18n","translations","_config$locale","locale","lang","t","lookupKey","translation","count","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","replace","placeholderWithBraces","placeholderKey","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","PluralRules","preferredForm","select","selectPluralFormUsingFallbackRules","console","warn","Math","abs","floor","ruleset","getPluralRulesForLocale","pluralRules","localeShort","pluralRule","pluralRulesMap","languages","arabic","chinese","french","german","irish","russian","scottish","spanish","welsh","n","lastTwo","last","Accordion","i18n","controlsClass","showAllClass","showAllTextClass","sectionClass","sectionExpandedClass","sectionButtonClass","sectionHeaderClass","sectionHeadingClass","sectionHeadingDividerClass","sectionHeadingTextClass","sectionHeadingTextFocusClass","sectionShowHideToggleClass","sectionShowHideToggleFocusClass","sectionShowHideTextClass","upChevronIconClass","downChevronIconClass","sectionSummaryClass","sectionSummaryFocusClass","sectionContentClass","$sections","$showAllButton","$showAllIcon","$showAllText","querySelectorAll","initControls","initSectionHeaders","updateShowAllButton","areAllSectionsOpen","createElement","add","appendChild","$accordionControls","insertBefore","firstChild","onShowOrHideAllToggle","event","onBeforeMatch","forEach","$section","i","$header","querySelector","constructHeaderMarkup","setExpanded","isExpanded","onSectionToggle","setInitialState","$span","$heading","$summary","$button","id","attr","from","attributes","$headingText","$headingTextFocus","childNodes","$child","$showHideToggle","$showHideToggleFocus","$showHideText","$showHideIcon","getButtonPunctuationEl","$summarySpan","$summarySpanFocus","remove","removeChild","$fragment","target","Element","closest","nowExpanded","storeState","expanded","$content","newButtonText","textContent","ariaLabelParts","push","ariaLabelMessage","join","every","toggle","getIdentifier","rememberExpanded","sessionStorage","setItem","exception","state","getItem","$punctuationEl","freeze","hideAllSections","hideSection","hideSectionAriaLabel","showAllSections","showSection","showSectionAriaLabel","Button","debounceFormSubmitTimer","handleKeyDown","debounce","$target","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","closestAttributeValue","attributeName","$closestElementWithAttribute","CharacterCount","configOverrides","maxlength","maxwords","_ref","_this$config$maxwords","$textarea","$visibleCountMessage","$screenReaderCountMessage","lastInputTimestamp","lastInputValue","valueChecker","maxLength","HTMLTextAreaElement","HTMLInputElement","errors","validationErrors","conditions","required","errorMessage","validateConfig","Infinity","textareaDescriptionId","$textareaDescription","getElementById","$errorMessage","insertAdjacentElement","className","bindChangeEvents","updateCountMessage","handleKeyUp","handleFocus","handleBlur","updateVisibleCountMessage","Date","now","setInterval","updateIfValueChanged","clearInterval","updateScreenReaderCountMessage","isError","isOverThreshold","getCountMessage","text","_text$match","remainingNumber","countType","formatCountMessage","translationKeySuffix","threshold","currentLength","charactersUnderLimit","one","other","charactersAtLimit","charactersOverLimit","wordsUnderLimit","wordsAtLimit","wordsOverLimit","textareaDescription","anyOf","Checkboxes","$inputs","$input","targetId","syncAllConditionalReveals","handleClick","syncConditionalRevealWithInputState","inputIsChecked","checked","unCheckAllInputsExcept","$inputWithSameName","form","unCheckExclusiveInputs","$exclusiveInput","$clickedInput","ErrorSummary","disableAutoFocus","focusTarget","HTMLAnchorElement","inputId","href","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","$legends","getElementsByTagName","$candidateLegend","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","ExitThisPage","$skiplinkButton","$updateSpan","$indicatorContainer","$overlay","keypressCounter","lastKeyWasModified","timeoutTime","keypressTimeoutId","timeoutMessageId","buildIndicator","initUpdateSpan","initButtonClickHandler","handleKeypress","bind","govukFrontendExitThisPageKeypress","resetPage","$indicator","updateIndicator","exitPage","location","resetKeypressTimer","clearTimeout","setKeypressTimer","shiftKey","activated","timedOut","pressTwoMoreTimes","pressOneMoreTime","FileUpload","$status","$announcements","enteredAnotherElement","$label","findLabel","ariaDescribedBy","innerText","commaSpan","containerSpan","buttonSpan","insertAdjacentText","instructionSpan","onClick","onChange","updateDisabledState","observeDisabledState","onDrop","updateDropzoneVisibility","disabled","hideDraggingState","Node","dataTransfer","isContainingFiles","showDraggingState","files","dispatchEvent","CustomEvent","fileCount","MutationObserver","mutationList","mutation","observe","hasNoTypesInfo","types","isDraggingFiles","some","chooseFilesButton","dropInstruction","noFileChosen","multipleFilesChosen","enteredDropZone","leftDropZone","Header","$menuButton","$menu","menuIsOpen","mql","menuId","setupResponsiveChecks","handleMenuButtonClick","breakpoint","matchMedia","checkMode","addListener","matches","NotificationBanner","PasswordInput","$showHideButton","$screenReaderStatusMessage","HTMLButtonElement","hide","persisted","show","setType","isHidden","prefixButton","prefixStatus","showPassword","hidePassword","showPasswordAriaLabel","hidePasswordAriaLabel","passwordShownAnnouncement","passwordHiddenAnnouncement","Radios","$allInputs","$clickedInputForm","$clickedInputName","hasSameFormOwner","ServiceNavigation","SkipLink","_this$$root$getAttrib","hash","URL","error","origin","pathname","linkedElementId","$linkedElement","Tabs","$tabs","$tabList","$tabListItems","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","onTabClick","onTabKeydown","onHashChange","_this$mql","setup","teardown","_this$getTab","$item","$tab","setAttributes","hideTab","$activeTab","getTab","showTab","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","$panel","getPanel","$currentTab","$nextTab","currentTarget","createHistoryEntry","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","initAll","_config$scope","onError","log","components","accordion","button","characterCount","errorSummary","exitThisPage","fileUpload","notificationBanner","passwordInput","scope","createAll","createAllOptions","_createAllOptions$sco","$elements","map","filter"],"sourceRoot":""}
|