katalyst-govuk-formbuilder 1.29.1 → 1.30.0
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.
- checksums.yaml +4 -4
- data/app/assets/builds/katalyst/govuk/formbuilder.css +3 -9
- data/app/assets/builds/katalyst/govuk/formbuilder.js +1 -4
- data/app/assets/builds/katalyst/govuk/formbuilder.min.js +1 -1
- data/app/assets/builds/katalyst/govuk/formbuilder.min.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_mixin.scss +1 -5
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_mixin.scss +10 -6
- data/node_modules/govuk-frontend/dist/govuk/components/header/_mixin.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss +8 -7
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_mixin.scss +46 -12
- data/node_modules/govuk-frontend/dist/govuk/components/select/_mixin.scss +0 -7
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +8 -7
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e94cb817b61312ea53be387ddba3788d8a3331b9dd871f64e943e01bc0fa2d4
|
|
4
|
+
data.tar.gz: 6267794de234dd57eccca966687fbe8d323742dcd5d4ac9e925457857aa9c8f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ba0650aba65e9ac3d7839d61577662055649970d0768d4d168afcd10c2cf615aababdb2b1517bb8c797b03cdd2d80be43d2dc66af201533e4dbe9204740ac60
|
|
7
|
+
data.tar.gz: c145d81afcc61446797362aed7cc9baab1fd3ac96d5726ec0b59bbb0285758d86a6154ca1a449aa180e9c870cead7e01d066041a48cd1a2419c8756b84ff00ae
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:root {
|
|
9
|
-
--govuk-frontend-version: "6.
|
|
9
|
+
--govuk-frontend-version: "6.4.0";
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
:root {
|
|
13
13
|
--govuk-brand-colour: #1d70b8;
|
|
14
14
|
--govuk-text-colour: #0b0c0c;
|
|
15
|
+
--govuk-inverse-text-colour: #ffffff;
|
|
15
16
|
--govuk-template-background-colour: #f4f8fb;
|
|
16
17
|
--govuk-body-background-colour: #ffffff;
|
|
17
18
|
--govuk-print-text-colour: #000000;
|
|
@@ -113,7 +114,7 @@
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
.govuk-link--inverse:link, .govuk-link--inverse:visited {
|
|
116
|
-
color: #ffffff;
|
|
117
|
+
color: var(--govuk-inverse-text-colour, #ffffff);
|
|
117
118
|
}
|
|
118
119
|
.govuk-link--inverse:focus {
|
|
119
120
|
color: var(--govuk-focus-text-colour, #0b0c0c);
|
|
@@ -2769,13 +2770,6 @@
|
|
|
2769
2770
|
cursor: not-allowed;
|
|
2770
2771
|
}
|
|
2771
2772
|
|
|
2772
|
-
.govuk-select option:active,
|
|
2773
|
-
.govuk-select option:checked,
|
|
2774
|
-
.govuk-select:focus::-ms-value {
|
|
2775
|
-
color: #ffffff;
|
|
2776
|
-
background-color: #1d70b8;
|
|
2777
|
-
}
|
|
2778
|
-
|
|
2779
2773
|
.govuk-select--error {
|
|
2780
2774
|
border-color: var(--govuk-error-colour, #ca3535);
|
|
2781
2775
|
}
|
|
@@ -809,16 +809,13 @@ ErrorSummary.schema = Object.freeze({
|
|
|
809
809
|
this.id = void 0;
|
|
810
810
|
this.$announcements = void 0;
|
|
811
811
|
this.enteredAnotherElement = void 0;
|
|
812
|
-
const $input = this.$root.querySelector(
|
|
812
|
+
const $input = this.$root.querySelector('input[type="file"]');
|
|
813
813
|
if ($input === null) {
|
|
814
814
|
throw new ElementError({
|
|
815
815
|
component: FileUpload,
|
|
816
816
|
identifier: 'File inputs (`<input type="file">`)'
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
|
-
if ($input.type !== "file") {
|
|
820
|
-
throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
|
|
821
|
-
}
|
|
822
819
|
this.$input = $input;
|
|
823
820
|
if (!this.$input.id) {
|
|
824
821
|
throw new ElementError({
|
|
@@ -41,7 +41,7 @@ class $ extends d{constructor(t,e={}){super(t,e),this.config.disableAutoFocus||f
|
|
|
41
41
|
* @preserve
|
|
42
42
|
* @augments ConfigurableComponent<FileUploadConfig>
|
|
43
43
|
*/
|
|
44
|
-
class y extends d{constructor(t,e={}){super(t,e),this.$input=void 0,this.$button=void 0,this.$status=void 0,this.$label=void 0,this.i18n=void 0,this.id=void 0,this.$announcements=void 0,this.enteredAnotherElement=void 0;const n=this.$root.querySelector(
|
|
44
|
+
class y extends d{constructor(t,e={}){super(t,e),this.$input=void 0,this.$button=void 0,this.$status=void 0,this.$label=void 0,this.i18n=void 0,this.id=void 0,this.$announcements=void 0,this.enteredAnotherElement=void 0;const n=this.$root.querySelector('input[type="file"]');if(null===n)throw new a({component:y,identifier:'File inputs (`<input type="file">`)'});if(this.$input=n,!this.$input.id)throw new a({component:y,identifier:'File input (`<input type="file">`) attribute (`id`)'});this.id=this.$input.id,this.i18n=new g(this.config.i18n,{locale:v(this.$root,"lang")});const i=this.findLabel();i.id||(i.id=`${this.id}-label`),this.$label=i,this.$input.id=`${this.id}-input`,this.$input.setAttribute("hidden","hidden"),this.$status=this.createStatus(),this.$button=this.createButton(),this.$root.insertAdjacentElement("afterbegin",this.$button),this.$input.addEventListener("change",this.onChange.bind(this)),this.updateDisabledState(),this.observeDisabledState(),this.$announcements=document.createElement("span"),this.$announcements.classList.add("govuk-file-upload-announcements"),this.$announcements.classList.add("govuk-visually-hidden"),this.$announcements.setAttribute("aria-live","assertive"),this.$root.insertAdjacentElement("afterend",this.$announcements),this.bindDraggingEvents()}createStatus(){const t=document.createElement("span");return t.className="govuk-body govuk-file-upload-button__status",t.setAttribute("aria-live","polite"),t.innerText=this.i18n.t("noFileChosen"),t}createButton(){const t=document.createElement("button");t.classList.add("govuk-file-upload-button"),t.type="button",t.id=this.id,t.classList.add("govuk-file-upload-button--empty");const e=this.$input.getAttribute("aria-describedby");e&&t.setAttribute("aria-describedby",e),t.appendChild(this.$status);const n=document.createElement("span");n.className="govuk-visually-hidden",n.innerText=", ",n.id=`${this.id}-comma`,t.appendChild(n);const i=document.createElement("span");i.className="govuk-file-upload-button__pseudo-button-container";const s=document.createElement("span");s.className="govuk-button govuk-button--secondary govuk-file-upload-button__pseudo-button",s.innerText=this.i18n.t("chooseFilesButton"),i.appendChild(s),i.insertAdjacentText("beforeend"," ");const o=document.createElement("span");return o.className="govuk-body govuk-file-upload-button__instruction",o.innerText=this.i18n.t("dropInstruction"),i.appendChild(o),t.appendChild(i),t.setAttribute("aria-labelledby",`${this.$label.id} ${n.id} ${t.id}`),t.addEventListener("click",this.onClick.bind(this)),t.addEventListener("dragover",t=>{t.preventDefault()}),t}bindDraggingEvents(){this.$button.addEventListener("drop",this.onDrop.bind(this)),document.addEventListener("dragenter",this.updateDropzoneVisibility.bind(this)),document.addEventListener("dragenter",()=>{this.enteredAnotherElement=!0}),document.addEventListener("dragleave",()=>{this.enteredAnotherElement||this.$button.disabled||(this.hideDraggingState(),this.$announcements.innerText=this.i18n.t("leftDropZone")),this.enteredAnotherElement=!1})}updateDropzoneVisibility(t){this.$button.disabled||t.target instanceof Node&&(this.$root.contains(t.target)?t.dataTransfer&&this.canDrop(t.dataTransfer)&&(this.$button.classList.contains("govuk-file-upload-button--dragging")||(this.showDraggingState(),this.$announcements.innerText=this.i18n.t("enteredDropZone"))):this.$button.classList.contains("govuk-file-upload-button--dragging")&&(this.hideDraggingState(),this.$announcements.innerText=this.i18n.t("leftDropZone")))}showDraggingState(){this.$button.classList.add("govuk-file-upload-button--dragging")}hideDraggingState(){this.$button.classList.remove("govuk-file-upload-button--dragging")}onDrop(t){t.preventDefault(),t.dataTransfer&&this.canFillInput(t.dataTransfer)&&(this.$input.files=t.dataTransfer.files,this.$input.dispatchEvent(new CustomEvent("change")),this.hideDraggingState())}canFillInput(t){return this.matchesInputCapacity(t.files.length)}canDrop(t){return t.items.length?this.matchesInputCapacity(function(t){let e=0;for(let n=0;n<t.length;n++)"file"===t[n].kind&&e++;return e}
|
|
45
45
|
/**
|
|
46
46
|
* Password input component
|
|
47
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formbuilder.min.js","sources":["../../../../../node_modules/govuk-frontend/dist/govuk/common/index.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/errors/index.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/component.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/common/configuration.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/i18n.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","../../../../javascript/katalyst/govuk/controllers/file_field_controller.js","../../../../javascript/katalyst/govuk/controllers/index.js","../../../../javascript/katalyst/govuk/controllers/document_field_controller.js","../../../../javascript/katalyst/govuk/controllers/image_field_controller.js","../../../../javascript/katalyst/govuk/formbuilder.js"],"sourcesContent":["function getBreakpoint(name) {\n const property = `--govuk-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 isScope($scope) {\n return !!$scope && ($scope instanceof Element || $scope instanceof Document);\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\nexport { formatErrorMessage, getBreakpoint, isInitialised, isObject, isScope, isSupported, setFocus };\n//# sourceMappingURL=index.mjs.map\n","import { isObject, 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 (isObject(messageOrOptions)) {\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 if (component) {\n message = formatErrorMessage(component, message);\n }\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, isScope } 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 normaliseOptions(scopeOrOptions) {\n let $scope = document;\n let onError;\n if (isObject(scopeOrOptions)) {\n const options = scopeOrOptions;\n if (isScope(options.scope) || options.scope === null) {\n $scope = options.scope;\n }\n if (typeof options.onError === 'function') {\n onError = options.onError;\n }\n }\n if (isScope(scopeOrOptions)) {\n $scope = scopeOrOptions;\n } else if (scopeOrOptions === null) {\n $scope = null;\n } else if (typeof scopeOrOptions === 'function') {\n onError = scopeOrOptions;\n }\n return {\n scope: $scope,\n onError\n };\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/**\n * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'\n */\n\nexport { ConfigurableComponent, configOverride, extractConfigByNamespace, mergeConfigs, normaliseDataset, normaliseOptions, normaliseString, validateConfig };\n//# sourceMappingURL=configuration.mjs.map\n","import { isObject } from './common/index.mjs';\n\nclass 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' && isObject(translation)) {\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) : 'other';\n if (isObject(translation)) {\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}\n\nexport { I18n };\n//# sourceMappingURL=i18n.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.count = 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', () => {\n if (this.$textarea.value !== this.$textarea.textContent) {\n this.updateCount();\n this.updateCountMessage();\n }\n });\n this.updateCount();\n this.updateCountMessage();\n }\n bindChangeEvents() {\n this.$textarea.addEventListener('input', () => this.handleInput());\n this.$textarea.addEventListener('focus', () => this.handleFocus());\n this.$textarea.addEventListener('blur', () => this.handleBlur());\n }\n handleInput() {\n this.updateCount();\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;\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 updateCount() {\n const text = this.$textarea.value;\n if (this.config.maxwords) {\n var _text$match;\n const tokens = (_text$match = text.match(/\\S+/g)) != null ? _text$match : [];\n this.count = tokens.length;\n return;\n }\n this.count = text.length;\n }\n getCountMessage() {\n const remainingNumber = this.maxLength - this.count;\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;\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 } 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 = $target.hash.replace('#', '');\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 { 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.$label = 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 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.$label = $label;\n this.$input.id = `${this.id}-input`;\n this.$input.setAttribute('hidden', 'hidden');\n this.$status = this.createStatus();\n this.$button = this.createButton();\n this.$root.insertAdjacentElement('afterbegin', this.$button);\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.bindDraggingEvents();\n }\n createStatus() {\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 return $status;\n }\n createButton() {\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 $button.appendChild(this.$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', `${this.$label.id} ${commaSpan.id} ${$button.id}`);\n $button.addEventListener('click', this.onClick.bind(this));\n $button.addEventListener('dragover', event => {\n event.preventDefault();\n });\n return $button;\n }\n bindDraggingEvents() {\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 && this.canDrop(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 && this.canFillInput(event.dataTransfer)) {\n this.$input.files = event.dataTransfer.files;\n this.$input.dispatchEvent(new CustomEvent('change'));\n this.hideDraggingState();\n }\n }\n canFillInput(dataTransfer) {\n return this.matchesInputCapacity(dataTransfer.files.length);\n }\n canDrop(dataTransfer) {\n if (dataTransfer.items.length) {\n return this.matchesInputCapacity(countFileItems(dataTransfer.items));\n }\n if (dataTransfer.types.length) {\n return dataTransfer.types.includes('Files');\n }\n return true;\n }\n matchesInputCapacity(numberOfFiles) {\n if (this.$input.multiple) {\n return numberOfFiles > 0;\n }\n return numberOfFiles === 1;\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-file-upload-wrapper--disabled', this.$button.disabled);\n }\n}\n\n/**\n * Counts the number of `DataTransferItem` whose kind is `file`\n *\n * @param {DataTransferItemList} list - The list\n * @returns {number} - The number of items whose kind is `file` in the list\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 countFileItems(list) {\n let result = 0;\n for (let i = 0; i < list.length; i++) {\n if (list[i].kind === 'file') {\n result++;\n }\n }\n return result;\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 { 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 { Controller } from \"@hotwired/stimulus\";\n\nexport default class FileFieldController extends Controller {\n static targets = [\"preview\", \"destroy\"];\n static values = {\n mimeTypes: Array,\n };\n\n connect() {\n this.counter = 0;\n this.initialPreviewContent = null;\n this.onUploadFlag = false;\n }\n\n onUpload(event) {\n this.onUploadFlag = true;\n\n // Set the file to be destroyed only if it is already persisted\n if (this.hasDestroyTarget) {\n this.destroyTarget.value = false;\n }\n this.previewTarget.removeAttribute(\"hidden\");\n\n // Show preview only if a file has been selected in the file picker popup. If cancelled, show previous file or do\n // not show preview at all\n if (this.hasPreviewTarget) {\n if (event.currentTarget.files.length > 0) {\n this.showPreview(event.currentTarget.files[0]);\n } else {\n this.setPreviewContent(this.initialPreviewContent);\n }\n }\n }\n\n setDestroy(event) {\n event.preventDefault();\n\n // If the data is already persisted and another image has been picked from the file picker popup, but the new image\n // is removed, show the original image\n if (this.initialPreviewContent && this.onUploadFlag) {\n this.onUploadFlag = false;\n this.setPreviewContent(this.initialPreviewContent);\n } else {\n // Set image to be destroyed, hide preview and remove image url\n if (this.hasDestroyTarget) {\n this.destroyTarget.value = true;\n }\n if (this.hasPreviewTarget) {\n this.previewTarget.setAttribute(\"hidden\", \"\");\n this.setPreviewContent(\"\");\n }\n if (this.previousInput) {\n this.previousInput.toggleAttribute(\"disabled\", true);\n }\n }\n\n this.fileInput.value = \"\";\n }\n\n setPreviewContent(content) {\n if (this.filenameTag) {\n this.filenameTag.innerText = text;\n }\n }\n\n drop(event) {\n event.preventDefault();\n\n const file = this.fileForEvent(event, this.mimeTypesValue);\n if (file) {\n const dT = new DataTransfer();\n dT.items.add(file);\n this.fileInput.files = dT.files;\n this.fileInput.dispatchEvent(new Event(\"change\"));\n }\n\n this.counter = 0;\n this.element.classList.remove(\"droppable\");\n }\n\n dragover(event) {\n event.preventDefault();\n }\n\n dragenter(event) {\n event.preventDefault();\n\n if (this.counter === 0) {\n this.element.classList.add(\"droppable\");\n }\n this.counter++;\n }\n\n dragleave(event) {\n event.preventDefault();\n\n this.counter--;\n if (this.counter === 0) {\n this.element.classList.remove(\"droppable\");\n }\n }\n\n get fileInput() {\n return this.element.querySelector(\"input[type='file']\");\n }\n\n get previousInput() {\n return this.element.querySelector(\n `input[type='hidden'][name='${this.fileInput.name}']`,\n );\n }\n\n get filenameTag() {\n if (!this.hasPreviewTarget) return null;\n\n return this.previewTarget.querySelector(\"p.preview-filename\");\n }\n\n showPreview(file) {\n const reader = new FileReader();\n\n reader.onload = (e) => {\n if (this.filenameTag) {\n this.filenameTag.innerText = file.name;\n }\n };\n reader.readAsDataURL(file);\n }\n\n /**\n * Given a drop event, find the first acceptable file.\n * @param event {DropEvent}\n * @param mimeTypes {String[]}\n * @returns {File}\n */\n fileForEvent(event, mimeTypes) {\n const accept = (file) => mimeTypes.indexOf(file.type) > -1;\n\n let file;\n\n if (event.dataTransfer.items) {\n const item = [...event.dataTransfer.items].find(accept);\n if (item) {\n file = item.getAsFile();\n }\n } else {\n file = [...event.dataTransfer.files].find(accept);\n }\n\n return file;\n }\n}\n","import DocumentFieldController from \"./document_field_controller\";\nimport ImageFieldController from \"./image_field_controller\";\n\nconst Definitions = [\n {\n identifier: \"govuk-document-field\",\n controllerConstructor: DocumentFieldController,\n },\n {\n identifier: \"govuk-image-field\",\n controllerConstructor: ImageFieldController,\n },\n];\n\nexport { Definitions as default };\n","import FileFieldController from \"./file_field_controller\";\n\nexport default class DocumentFieldController extends FileFieldController {\n connect() {\n super.connect();\n\n this.initialPreviewContent = this.filenameTag.text;\n }\n\n setPreviewContent(content) {\n this.filenameTag.innerText = content;\n }\n\n showPreview(file) {\n const reader = new FileReader();\n\n reader.onload = (e) => {\n if (this.filenameTag) {\n this.filenameTag.innerText = file.name;\n }\n };\n reader.readAsDataURL(file);\n }\n\n get filenameTag() {\n return this.previewTarget.querySelector(\"p.preview-filename\");\n }\n}\n","import FileFieldController from \"./file_field_controller\";\n\nexport default class ImageFieldController extends FileFieldController {\n connect() {\n super.connect();\n\n this.initialPreviewContent = this.imageTag.getAttribute(\"src\");\n }\n\n setPreviewContent(content) {\n this.imageTag.src = content;\n }\n\n showPreview(file) {\n const reader = new FileReader();\n\n reader.onload = (e) => {\n this.imageTag.src = e.target.result;\n };\n reader.readAsDataURL(file);\n }\n\n get imageTag() {\n return this.previewTarget.querySelector(\"img\");\n }\n}\n","import {\n Button,\n CharacterCount,\n Checkboxes,\n ErrorSummary,\n FileUpload,\n PasswordInput,\n Radios,\n} from \"govuk-frontend/dist/govuk/all.mjs\";\nimport { SupportError } from \"govuk-frontend/dist/govuk/errors/index.mjs\";\nimport { isSupported } from \"govuk-frontend/dist/govuk/common/index.mjs\";\n\nfunction initAll(config) {\n let _config$scope;\n config = typeof config !== \"undefined\" ? config : {};\n if (!isSupported()) {\n console.log(new SupportError());\n return;\n }\n const components = [\n [Button, config.button],\n [CharacterCount, config.characterCount],\n [Checkboxes],\n [ErrorSummary, config.errorSummary],\n [FileUpload, config.fileUpload],\n [Radios],\n [PasswordInput, config.passwordInput],\n ];\n const $scope =\n (_config$scope = config.scope) != null ? _config$scope : document;\n components.forEach(([Component, config]) => {\n const $elements = $scope.querySelectorAll(\n `[data-module=\"${Component.moduleName}\"]`,\n );\n $elements.forEach(($element) => {\n try {\n \"defaults\" in Component\n ? new Component($element, config)\n : new Component($element);\n } catch (error) {\n console.log(error);\n }\n });\n });\n}\n\n// stimulus controllers\nimport controllers from \"./controllers\";\n\nexport {\n controllers as default,\n initAll,\n Button,\n CharacterCount,\n Checkboxes,\n ErrorSummary,\n PasswordInput,\n Radios,\n};\n"],"names":["isSupported","$scope","document","body","classList","contains","isObject","option","Array","isArray","formatErrorMessage","Component","message","moduleName","GOVUKFrontendError","Error","constructor","args","super","this","name","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","$root","_$root","childConstructor","elementType","checkSupport","checkInitialised","setAttribute","HTMLElement","hasAttribute","isInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","dataset","schema","out","entries","Object","properties","entry","namespace","property","field","toString","normaliseString","type","extractConfigByNamespace","normaliseDataset","mergeConfigs","value","trimmedValue","trim","output","outputType","includes","length","isFinite","Number","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","I18n","translations","_config$locale","locale","documentElement","lang","t","lookupKey","options","translation","count","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","undefined","replace","placeholderWithBraces","placeholderKey","hasOwnProperty","call","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","window","PluralRules","preferredForm","select","console","warn","Button","debounceFormSubmitTimer","addEventListener","event","handleKeyDown","debounce","$target","target","getAttribute","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","closestAttributeValue","$element","attributeName","$closestElementWithAttribute","closest","freeze","CharacterCount","configOverrides","maxlength","maxwords","_ref","_this$config$maxwords","$textarea","$visibleCountMessage","$screenReaderCountMessage","lastInputTimestamp","lastInputValue","valueChecker","i18n","maxLength","querySelector","HTMLTextAreaElement","HTMLInputElement","errors","validationErrors","conditions","required","errorMessage","every","push","validateConfig","Infinity","textareaDescriptionId","id","$textareaDescription","getElementById","$errorMessage","textContent","insertAdjacentElement","createElement","className","add","removeAttribute","bindChangeEvents","updateCount","updateCountMessage","handleInput","handleFocus","handleBlur","updateVisibleCountMessage","Date","now","setInterval","updateIfValueChanged","clearInterval","updateScreenReaderCountMessage","isError","toggle","isOverThreshold","getCountMessage","text","_text$match","tokens","remainingNumber","countType","formatCountMessage","translationKeySuffix","Math","abs","threshold","currentLength","charactersUnderLimit","one","other","charactersAtLimit","charactersOverLimit","wordsUnderLimit","wordsAtLimit","wordsOverLimit","textareaDescription","anyOf","Checkboxes","$inputs","querySelectorAll","forEach","$input","targetId","syncAllConditionalReveals","handleClick","syncConditionalRevealWithInputState","inputIsChecked","checked","unCheckAllInputsExcept","$inputWithSameName","form","unCheckExclusiveInputs","$exclusiveInput","$clickedInput","ErrorSummary","disableAutoFocus","_options$onBeforeFocu","isFocusable","onBlur","_options$onBlur","once","onBeforeFocus","focus","setFocus","focusTarget","HTMLAnchorElement","inputId","hash","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","$legends","getElementsByTagName","$candidateLegend","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","FileUpload","$button","$status","$label","$announcements","enteredAnotherElement","findLabel","createStatus","createButton","onChange","bind","updateDisabledState","observeDisabledState","bindDraggingEvents","innerText","ariaDescribedBy","appendChild","commaSpan","containerSpan","buttonSpan","insertAdjacentText","instructionSpan","onClick","onDrop","updateDropzoneVisibility","disabled","hideDraggingState","Node","dataTransfer","canDrop","showDraggingState","remove","canFillInput","files","dispatchEvent","CustomEvent","matchesInputCapacity","items","list","result","i","kind","countFileItems","types","numberOfFiles","multiple","fileCount","MutationObserver","mutationList","mutation","observe","attributes","chooseFilesButton","dropInstruction","noFileChosen","multipleFilesChosen","enteredDropZone","leftDropZone","PasswordInput","$showHideButton","$screenReaderStatusMessage","HTMLButtonElement","hide","persisted","show","setType","isHidden","prefixButton","prefixStatus","showPassword","hidePassword","showPasswordAriaLabel","hidePasswordAriaLabel","passwordShownAnnouncement","passwordHiddenAnnouncement","Radios","$allInputs","$clickedInputForm","$clickedInputName","hasSameFormOwner","FileFieldController","Controller","static","mimeTypes","connect","counter","initialPreviewContent","onUploadFlag","onUpload","hasDestroyTarget","destroyTarget","previewTarget","hasPreviewTarget","currentTarget","showPreview","setPreviewContent","setDestroy","previousInput","toggleAttribute","fileInput","content","filenameTag","drop","file","fileForEvent","mimeTypesValue","dT","DataTransfer","Event","dragover","dragenter","dragleave","reader","FileReader","onload","e","readAsDataURL","accept","indexOf","item","find","getAsFile","Definitions","controllerConstructor","imageTag","src","initAll","_config$scope","log","components","button","characterCount","errorSummary","fileUpload","passwordInput","scope","error"],"mappings":"gDA6CA,SAASA,EAAYC,EAASC,SAASC,MACrC,QAAKF,GAGEA,EAAOG,UAAUC,SAAS,2BACnC,CAIA,SAASC,EAASC,GAChB,QAASA,GAA4B,iBAAXA,IAJ5B,SAAiBA,GACf,OAAOC,MAAMC,QAAQF,EACvB,CAEoDE,CAAQF,EAC5D,CAIA,SAASG,EAAmBC,EAAWC,GACrC,MAAO,GAAGD,EAAUE,eAAeD,GACrC,CC5DA,MAAME,UAA2BC,MAC/B,WAAAC,IAAeC,GACbC,SAASD,GACTE,KAAKC,KAAO,oBACd,EAEF,MAAMC,UAAqBP,EAMzB,WAAAE,CAAYf,EAASC,SAASC,MAC5B,MAAMmB,EAAiB,aAAcC,kBAAkBC,UAAY,iHAAmH,mDACtLN,MAAMjB,EAASqB,EAAiB,gEAChCH,KAAKC,KAAO,cACd,EAEF,MAAMK,UAAoBX,EACxB,WAAAE,IAAeC,GACbC,SAASD,GACTE,KAAKC,KAAO,aACd,EAEF,MAAMM,UAAqBZ,EACzB,WAAAE,CAAYW,GACV,IAAIf,EAAsC,iBAArBe,EAAgCA,EAAmB,GACxE,GAAIrB,EAASqB,GAAmB,CAC9B,MAAMC,UACJA,EAASC,WACTA,EAAUC,QACVA,EAAOC,aACPA,GACEJ,EACJf,EAAUiB,EACVjB,GAA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CAEA,YAAIqB,GACF,OAAOnX,KAAKkV,cAActM,cAAc,MAC1C,KCZF,SAASyO,EAAQvV,GACf,IAAIwV,EAEJ,GADAxV,OAA2B,IAAXA,EAAyBA,EAAS,CAAA,GAC7CjD,IAEH,YADA2H,QAAQ+Q,IAAI,IAAIrX,GAGlB,MAAMsX,EAAa,CACjB,CAAC9Q,EAAQ5E,EAAO2V,QAChB,CAAC3P,EAAgBhG,EAAO4V,gBACxB,CAACjL,GACD,CAACiB,EAAc5L,EAAO6V,cACtB,CAACpI,EAAYzN,EAAO8V,YACpB,CAAC1D,GACD,CAACjB,EAAenR,EAAO+V,gBAEnB/Y,EAC8B,OAAjCwY,EAAgBxV,EAAOgW,OAAiBR,EAAgBvY,SAC3DyY,EAAW5K,QAAQ,EAAEpN,EAAWsC,MACZhD,EAAO6N,iBACvB,iBAAiBnN,EAAUE,gBAEnBkN,QAASnF,IACjB,IACE,aAAcjI,EACV,IAAIA,EAAUiI,EAAU3F,GACxB,IAAItC,EAAUiI,EACpB,CAAE,MAAOsQ,GACPvR,QAAQ+Q,IAAIQ,EACd,KAGN","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12]}
|
|
1
|
+
{"version":3,"file":"formbuilder.min.js","sources":["../../../../../node_modules/govuk-frontend/dist/govuk/common/index.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/errors/index.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/component.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/common/configuration.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/i18n.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs","../../../../../node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","../../../../javascript/katalyst/govuk/controllers/file_field_controller.js","../../../../javascript/katalyst/govuk/controllers/index.js","../../../../javascript/katalyst/govuk/controllers/document_field_controller.js","../../../../javascript/katalyst/govuk/controllers/image_field_controller.js","../../../../javascript/katalyst/govuk/formbuilder.js"],"sourcesContent":["function getBreakpoint(name) {\n const property = `--govuk-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 isScope($scope) {\n return !!$scope && ($scope instanceof Element || $scope instanceof Document);\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\nexport { formatErrorMessage, getBreakpoint, isInitialised, isObject, isScope, isSupported, setFocus };\n//# sourceMappingURL=index.mjs.map\n","import { isObject, 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 (isObject(messageOrOptions)) {\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 if (component) {\n message = formatErrorMessage(component, message);\n }\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, isScope } 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 normaliseOptions(scopeOrOptions) {\n let $scope = document;\n let onError;\n if (isObject(scopeOrOptions)) {\n const options = scopeOrOptions;\n if (isScope(options.scope) || options.scope === null) {\n $scope = options.scope;\n }\n if (typeof options.onError === 'function') {\n onError = options.onError;\n }\n }\n if (isScope(scopeOrOptions)) {\n $scope = scopeOrOptions;\n } else if (scopeOrOptions === null) {\n $scope = null;\n } else if (typeof scopeOrOptions === 'function') {\n onError = scopeOrOptions;\n }\n return {\n scope: $scope,\n onError\n };\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/**\n * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'\n */\n\nexport { ConfigurableComponent, configOverride, extractConfigByNamespace, mergeConfigs, normaliseDataset, normaliseOptions, normaliseString, validateConfig };\n//# sourceMappingURL=configuration.mjs.map\n","import { isObject } from './common/index.mjs';\n\nclass 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' && isObject(translation)) {\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) : 'other';\n if (isObject(translation)) {\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}\n\nexport { I18n };\n//# sourceMappingURL=i18n.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.count = 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', () => {\n if (this.$textarea.value !== this.$textarea.textContent) {\n this.updateCount();\n this.updateCountMessage();\n }\n });\n this.updateCount();\n this.updateCountMessage();\n }\n bindChangeEvents() {\n this.$textarea.addEventListener('input', () => this.handleInput());\n this.$textarea.addEventListener('focus', () => this.handleFocus());\n this.$textarea.addEventListener('blur', () => this.handleBlur());\n }\n handleInput() {\n this.updateCount();\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;\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 updateCount() {\n const text = this.$textarea.value;\n if (this.config.maxwords) {\n var _text$match;\n const tokens = (_text$match = text.match(/\\S+/g)) != null ? _text$match : [];\n this.count = tokens.length;\n return;\n }\n this.count = text.length;\n }\n getCountMessage() {\n const remainingNumber = this.maxLength - this.count;\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;\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 } 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 = $target.hash.replace('#', '');\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 { 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 * 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.$label = 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[type=\"file\"]');\n if ($input === null) {\n throw new ElementError({\n component: FileUpload,\n identifier: 'File inputs (`<input type=\"file\">`)'\n });\n }\n this.$input = $input;\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.$label = $label;\n this.$input.id = `${this.id}-input`;\n this.$input.setAttribute('hidden', 'hidden');\n this.$status = this.createStatus();\n this.$button = this.createButton();\n this.$root.insertAdjacentElement('afterbegin', this.$button);\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.bindDraggingEvents();\n }\n createStatus() {\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 return $status;\n }\n createButton() {\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 $button.appendChild(this.$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', `${this.$label.id} ${commaSpan.id} ${$button.id}`);\n $button.addEventListener('click', this.onClick.bind(this));\n $button.addEventListener('dragover', event => {\n event.preventDefault();\n });\n return $button;\n }\n bindDraggingEvents() {\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 && this.canDrop(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 && this.canFillInput(event.dataTransfer)) {\n this.$input.files = event.dataTransfer.files;\n this.$input.dispatchEvent(new CustomEvent('change'));\n this.hideDraggingState();\n }\n }\n canFillInput(dataTransfer) {\n return this.matchesInputCapacity(dataTransfer.files.length);\n }\n canDrop(dataTransfer) {\n if (dataTransfer.items.length) {\n return this.matchesInputCapacity(countFileItems(dataTransfer.items));\n }\n if (dataTransfer.types.length) {\n return dataTransfer.types.includes('Files');\n }\n return true;\n }\n matchesInputCapacity(numberOfFiles) {\n if (this.$input.multiple) {\n return numberOfFiles > 0;\n }\n return numberOfFiles === 1;\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-file-upload-wrapper--disabled', this.$button.disabled);\n }\n}\n\n/**\n * Counts the number of `DataTransferItem` whose kind is `file`\n *\n * @param {DataTransferItemList} list - The list\n * @returns {number} - The number of items whose kind is `file` in the list\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 countFileItems(list) {\n let result = 0;\n for (let i = 0; i < list.length; i++) {\n if (list[i].kind === 'file') {\n result++;\n }\n }\n return result;\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 { 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 { Controller } from \"@hotwired/stimulus\";\n\nexport default class FileFieldController extends Controller {\n static targets = [\"preview\", \"destroy\"];\n static values = {\n mimeTypes: Array,\n };\n\n connect() {\n this.counter = 0;\n this.initialPreviewContent = null;\n this.onUploadFlag = false;\n }\n\n onUpload(event) {\n this.onUploadFlag = true;\n\n // Set the file to be destroyed only if it is already persisted\n if (this.hasDestroyTarget) {\n this.destroyTarget.value = false;\n }\n this.previewTarget.removeAttribute(\"hidden\");\n\n // Show preview only if a file has been selected in the file picker popup. If cancelled, show previous file or do\n // not show preview at all\n if (this.hasPreviewTarget) {\n if (event.currentTarget.files.length > 0) {\n this.showPreview(event.currentTarget.files[0]);\n } else {\n this.setPreviewContent(this.initialPreviewContent);\n }\n }\n }\n\n setDestroy(event) {\n event.preventDefault();\n\n // If the data is already persisted and another image has been picked from the file picker popup, but the new image\n // is removed, show the original image\n if (this.initialPreviewContent && this.onUploadFlag) {\n this.onUploadFlag = false;\n this.setPreviewContent(this.initialPreviewContent);\n } else {\n // Set image to be destroyed, hide preview and remove image url\n if (this.hasDestroyTarget) {\n this.destroyTarget.value = true;\n }\n if (this.hasPreviewTarget) {\n this.previewTarget.setAttribute(\"hidden\", \"\");\n this.setPreviewContent(\"\");\n }\n if (this.previousInput) {\n this.previousInput.toggleAttribute(\"disabled\", true);\n }\n }\n\n this.fileInput.value = \"\";\n }\n\n setPreviewContent(content) {\n if (this.filenameTag) {\n this.filenameTag.innerText = text;\n }\n }\n\n drop(event) {\n event.preventDefault();\n\n const file = this.fileForEvent(event, this.mimeTypesValue);\n if (file) {\n const dT = new DataTransfer();\n dT.items.add(file);\n this.fileInput.files = dT.files;\n this.fileInput.dispatchEvent(new Event(\"change\"));\n }\n\n this.counter = 0;\n this.element.classList.remove(\"droppable\");\n }\n\n dragover(event) {\n event.preventDefault();\n }\n\n dragenter(event) {\n event.preventDefault();\n\n if (this.counter === 0) {\n this.element.classList.add(\"droppable\");\n }\n this.counter++;\n }\n\n dragleave(event) {\n event.preventDefault();\n\n this.counter--;\n if (this.counter === 0) {\n this.element.classList.remove(\"droppable\");\n }\n }\n\n get fileInput() {\n return this.element.querySelector(\"input[type='file']\");\n }\n\n get previousInput() {\n return this.element.querySelector(\n `input[type='hidden'][name='${this.fileInput.name}']`,\n );\n }\n\n get filenameTag() {\n if (!this.hasPreviewTarget) return null;\n\n return this.previewTarget.querySelector(\"p.preview-filename\");\n }\n\n showPreview(file) {\n const reader = new FileReader();\n\n reader.onload = (e) => {\n if (this.filenameTag) {\n this.filenameTag.innerText = file.name;\n }\n };\n reader.readAsDataURL(file);\n }\n\n /**\n * Given a drop event, find the first acceptable file.\n * @param event {DropEvent}\n * @param mimeTypes {String[]}\n * @returns {File}\n */\n fileForEvent(event, mimeTypes) {\n const accept = (file) => mimeTypes.indexOf(file.type) > -1;\n\n let file;\n\n if (event.dataTransfer.items) {\n const item = [...event.dataTransfer.items].find(accept);\n if (item) {\n file = item.getAsFile();\n }\n } else {\n file = [...event.dataTransfer.files].find(accept);\n }\n\n return file;\n }\n}\n","import DocumentFieldController from \"./document_field_controller\";\nimport ImageFieldController from \"./image_field_controller\";\n\nconst Definitions = [\n {\n identifier: \"govuk-document-field\",\n controllerConstructor: DocumentFieldController,\n },\n {\n identifier: \"govuk-image-field\",\n controllerConstructor: ImageFieldController,\n },\n];\n\nexport { Definitions as default };\n","import FileFieldController from \"./file_field_controller\";\n\nexport default class DocumentFieldController extends FileFieldController {\n connect() {\n super.connect();\n\n this.initialPreviewContent = this.filenameTag.text;\n }\n\n setPreviewContent(content) {\n this.filenameTag.innerText = content;\n }\n\n showPreview(file) {\n const reader = new FileReader();\n\n reader.onload = (e) => {\n if (this.filenameTag) {\n this.filenameTag.innerText = file.name;\n }\n };\n reader.readAsDataURL(file);\n }\n\n get filenameTag() {\n return this.previewTarget.querySelector(\"p.preview-filename\");\n }\n}\n","import FileFieldController from \"./file_field_controller\";\n\nexport default class ImageFieldController extends FileFieldController {\n connect() {\n super.connect();\n\n this.initialPreviewContent = this.imageTag.getAttribute(\"src\");\n }\n\n setPreviewContent(content) {\n this.imageTag.src = content;\n }\n\n showPreview(file) {\n const reader = new FileReader();\n\n reader.onload = (e) => {\n this.imageTag.src = e.target.result;\n };\n reader.readAsDataURL(file);\n }\n\n get imageTag() {\n return this.previewTarget.querySelector(\"img\");\n }\n}\n","import {\n Button,\n CharacterCount,\n Checkboxes,\n ErrorSummary,\n FileUpload,\n PasswordInput,\n Radios,\n} from \"govuk-frontend/dist/govuk/all.mjs\";\nimport { SupportError } from \"govuk-frontend/dist/govuk/errors/index.mjs\";\nimport { isSupported } from \"govuk-frontend/dist/govuk/common/index.mjs\";\n\nfunction initAll(config) {\n let _config$scope;\n config = typeof config !== \"undefined\" ? config : {};\n if (!isSupported()) {\n console.log(new SupportError());\n return;\n }\n const components = [\n [Button, config.button],\n [CharacterCount, config.characterCount],\n [Checkboxes],\n [ErrorSummary, config.errorSummary],\n [FileUpload, config.fileUpload],\n [Radios],\n [PasswordInput, config.passwordInput],\n ];\n const $scope =\n (_config$scope = config.scope) != null ? _config$scope : document;\n components.forEach(([Component, config]) => {\n const $elements = $scope.querySelectorAll(\n `[data-module=\"${Component.moduleName}\"]`,\n );\n $elements.forEach(($element) => {\n try {\n \"defaults\" in Component\n ? new Component($element, config)\n : new Component($element);\n } catch (error) {\n console.log(error);\n }\n });\n });\n}\n\n// stimulus controllers\nimport controllers from \"./controllers\";\n\nexport {\n controllers as default,\n initAll,\n Button,\n CharacterCount,\n Checkboxes,\n ErrorSummary,\n PasswordInput,\n Radios,\n};\n"],"names":["isSupported","$scope","document","body","classList","contains","isObject","option","Array","isArray","formatErrorMessage","Component","message","moduleName","GOVUKFrontendError","Error","constructor","args","super","this","name","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","$root","_$root","childConstructor","elementType","checkSupport","checkInitialised","setAttribute","HTMLElement","hasAttribute","isInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","dataset","schema","out","entries","Object","properties","entry","namespace","property","field","toString","normaliseString","type","extractConfigByNamespace","normaliseDataset","mergeConfigs","value","trimmedValue","trim","output","outputType","includes","length","isFinite","Number","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","I18n","translations","_config$locale","locale","documentElement","lang","t","lookupKey","options","translation","count","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","undefined","replace","placeholderWithBraces","placeholderKey","hasOwnProperty","call","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","window","PluralRules","preferredForm","select","console","warn","Button","debounceFormSubmitTimer","addEventListener","event","handleKeyDown","debounce","$target","target","getAttribute","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","closestAttributeValue","$element","attributeName","$closestElementWithAttribute","closest","freeze","CharacterCount","configOverrides","maxlength","maxwords","_ref","_this$config$maxwords","$textarea","$visibleCountMessage","$screenReaderCountMessage","lastInputTimestamp","lastInputValue","valueChecker","i18n","maxLength","querySelector","HTMLTextAreaElement","HTMLInputElement","errors","validationErrors","conditions","required","errorMessage","every","push","validateConfig","Infinity","textareaDescriptionId","id","$textareaDescription","getElementById","$errorMessage","textContent","insertAdjacentElement","createElement","className","add","removeAttribute","bindChangeEvents","updateCount","updateCountMessage","handleInput","handleFocus","handleBlur","updateVisibleCountMessage","Date","now","setInterval","updateIfValueChanged","clearInterval","updateScreenReaderCountMessage","isError","toggle","isOverThreshold","getCountMessage","text","_text$match","tokens","remainingNumber","countType","formatCountMessage","translationKeySuffix","Math","abs","threshold","currentLength","charactersUnderLimit","one","other","charactersAtLimit","charactersOverLimit","wordsUnderLimit","wordsAtLimit","wordsOverLimit","textareaDescription","anyOf","Checkboxes","$inputs","querySelectorAll","forEach","$input","targetId","syncAllConditionalReveals","handleClick","syncConditionalRevealWithInputState","inputIsChecked","checked","unCheckAllInputsExcept","$inputWithSameName","form","unCheckExclusiveInputs","$exclusiveInput","$clickedInput","ErrorSummary","disableAutoFocus","_options$onBeforeFocu","isFocusable","onBlur","_options$onBlur","once","onBeforeFocus","focus","setFocus","focusTarget","HTMLAnchorElement","inputId","hash","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","$legends","getElementsByTagName","$candidateLegend","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","FileUpload","$button","$status","$label","$announcements","enteredAnotherElement","findLabel","createStatus","createButton","onChange","bind","updateDisabledState","observeDisabledState","bindDraggingEvents","innerText","ariaDescribedBy","appendChild","commaSpan","containerSpan","buttonSpan","insertAdjacentText","instructionSpan","onClick","onDrop","updateDropzoneVisibility","disabled","hideDraggingState","Node","dataTransfer","canDrop","showDraggingState","remove","canFillInput","files","dispatchEvent","CustomEvent","matchesInputCapacity","items","list","result","i","kind","countFileItems","types","numberOfFiles","multiple","fileCount","MutationObserver","mutationList","mutation","observe","attributes","chooseFilesButton","dropInstruction","noFileChosen","multipleFilesChosen","enteredDropZone","leftDropZone","PasswordInput","$showHideButton","$screenReaderStatusMessage","HTMLButtonElement","hide","persisted","show","setType","isHidden","prefixButton","prefixStatus","showPassword","hidePassword","showPasswordAriaLabel","hidePasswordAriaLabel","passwordShownAnnouncement","passwordHiddenAnnouncement","Radios","$allInputs","$clickedInputForm","$clickedInputName","hasSameFormOwner","FileFieldController","Controller","static","mimeTypes","connect","counter","initialPreviewContent","onUploadFlag","onUpload","hasDestroyTarget","destroyTarget","previewTarget","hasPreviewTarget","currentTarget","showPreview","setPreviewContent","setDestroy","previousInput","toggleAttribute","fileInput","content","filenameTag","drop","file","fileForEvent","mimeTypesValue","dT","DataTransfer","Event","dragover","dragenter","dragleave","reader","FileReader","onload","e","readAsDataURL","accept","indexOf","item","find","getAsFile","Definitions","controllerConstructor","imageTag","src","initAll","_config$scope","log","components","button","characterCount","errorSummary","fileUpload","passwordInput","scope","error"],"mappings":"gDA6CA,SAASA,EAAYC,EAASC,SAASC,MACrC,QAAKF,GAGEA,EAAOG,UAAUC,SAAS,2BACnC,CAIA,SAASC,EAASC,GAChB,QAASA,GAA4B,iBAAXA,IAJ5B,SAAiBA,GACf,OAAOC,MAAMC,QAAQF,EACvB,CAEoDE,CAAQF,EAC5D,CAIA,SAASG,EAAmBC,EAAWC,GACrC,MAAO,GAAGD,EAAUE,eAAeD,GACrC,CC5DA,MAAME,UAA2BC,MAC/B,WAAAC,IAAeC,GACbC,SAASD,GACTE,KAAKC,KAAO,oBACd,EAEF,MAAMC,UAAqBP,EAMzB,WAAAE,CAAYf,EAASC,SAASC,MAC5B,MAAMmB,EAAiB,aAAcC,kBAAkBC,UAAY,iHAAmH,mDACtLN,MAAMjB,EAASqB,EAAiB,gEAChCH,KAAKC,KAAO,cACd,EAEF,MAAMK,UAAoBX,EACxB,WAAAE,IAAeC,GACbC,SAASD,GACTE,KAAKC,KAAO,aACd,EAEF,MAAMM,UAAqBZ,EACzB,WAAAE,CAAYW,GACV,IAAIf,EAAsC,iBAArBe,EAAgCA,EAAmB,GACxE,GAAIrB,EAASqB,GAAmB,CAC9B,MAAMC,UACJA,EAASC,WACTA,EAAUC,QACVA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AAKkV,cAActM,cAAc,MAC1C,KCZF,SAASyO,EAAQvV,GACf,IAAIwV,EAEJ,GADAxV,OAA2B,IAAXA,EAAyBA,EAAS,CAAA,GAC7CjD,IAEH,YADA2H,QAAQ+Q,IAAI,IAAIrX,GAGlB,MAAMsX,EAAa,CACjB,CAAC9Q,EAAQ5E,EAAO2V,QAChB,CAAC3P,EAAgBhG,EAAO4V,gBACxB,CAACjL,GACD,CAACiB,EAAc5L,EAAO6V,cACtB,CAACpI,EAAYzN,EAAO8V,YACpB,CAAC1D,GACD,CAACjB,EAAenR,EAAO+V,gBAEnB/Y,EAC8B,OAAjCwY,EAAgBxV,EAAOgW,OAAiBR,EAAgBvY,SAC3DyY,EAAW5K,QAAQ,EAAEpN,EAAWsC,MACZhD,EAAO6N,iBACvB,iBAAiBnN,EAAUE,gBAEnBkN,QAASnF,IACjB,IACE,aAAcjI,EACV,IAAIA,EAAUiI,EAAU3F,GACxB,IAAItC,EAAUiI,EACpB,CAAE,MAAOsQ,GACPvR,QAAQ+Q,IAAIQ,EACd,KAGN","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12]}
|
|
@@ -124,11 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.govuk-breadcrumbs--inverse {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
.govuk-breadcrumbs__link {
|
|
130
|
-
@include base.govuk-link-style-inverse;
|
|
131
|
-
}
|
|
127
|
+
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
|
|
132
128
|
|
|
133
129
|
.govuk-breadcrumbs__list-item::before {
|
|
134
130
|
border-color: currentcolor;
|
|
@@ -69,7 +69,11 @@
|
|
|
69
69
|
right: 0;
|
|
70
70
|
bottom: 0;
|
|
71
71
|
left: 0;
|
|
72
|
-
|
|
72
|
+
// The overlay is imitating a default browser window so we can use
|
|
73
|
+
// system colours ensure it matches the browser's default colours.
|
|
74
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/system-color
|
|
75
|
+
color: CanvasText;
|
|
76
|
+
background-color: Canvas;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
// This class is added to the body when the Exit This Page button is activated
|
|
@@ -13,19 +13,23 @@ $header-forced-colour-border-width: 1px;
|
|
|
13
13
|
|
|
14
14
|
/// Shared block header styles, with automatic background setting
|
|
15
15
|
///
|
|
16
|
-
/// @param {String} $background - background colour of header
|
|
16
|
+
/// @param {String} $background-colour - background colour of the header
|
|
17
|
+
/// @param {String} $text-colour - text colour of the header
|
|
17
18
|
/// @access private
|
|
18
|
-
@mixin block-styles($background: base.govuk-colour("black")) {
|
|
19
|
+
@mixin block-styles($background-colour: base.govuk-colour("black"), $text-colour: base.govuk-colour("white")) {
|
|
19
20
|
@include base.govuk-font($size: 16, $line-height: 1);
|
|
20
21
|
|
|
21
22
|
// Add a transparent bottom border for forced-colour modes
|
|
22
23
|
border-bottom: $header-forced-colour-border-width solid transparent;
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
--govuk-text-colour: #{$text-colour};
|
|
26
|
+
color: base.govuk-functional-colour(text);
|
|
27
|
+
background: $background-colour;
|
|
25
28
|
|
|
26
29
|
@media print {
|
|
27
30
|
border-bottom-width: 0;
|
|
28
|
-
|
|
31
|
+
|
|
32
|
+
--govuk-text-colour: inherit;
|
|
29
33
|
background: transparent;
|
|
30
34
|
}
|
|
31
35
|
}
|
|
@@ -73,7 +77,7 @@ $header-forced-colour-border-width: 1px;
|
|
|
73
77
|
font-size: 30px; // We don't have a mixin that produces 30px font size
|
|
74
78
|
text-decoration: none;
|
|
75
79
|
|
|
76
|
-
@include base.govuk-link-style-
|
|
80
|
+
@include base.govuk-link-style-text;
|
|
77
81
|
|
|
78
82
|
&:link,
|
|
79
83
|
&:visited {
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
$logo-bottom-margin: 2px;
|
|
7
7
|
|
|
8
8
|
.govuk-header {
|
|
9
|
-
@include genericHeader.block-styles(
|
|
9
|
+
@include genericHeader.block-styles(
|
|
10
|
+
$background-colour: base.govuk-functional-colour("brand"),
|
|
11
|
+
$text-colour: base.govuk-functional-colour("inverse-text")
|
|
12
|
+
);
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
.govuk-header__container--full-width {
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
/// @access private
|
|
6
6
|
@mixin styles {
|
|
7
7
|
.govuk-notification-banner {
|
|
8
|
+
--_govuk-notification-banner-colour: #{base.govuk-functional-colour(brand)};
|
|
9
|
+
--_govuk-notification-banner-title-text-colour: #{base.govuk-functional-colour(inverse-text)};
|
|
10
|
+
|
|
8
11
|
@include base.govuk-font($size: 19);
|
|
9
12
|
@include base.govuk-responsive-margin(8, "bottom");
|
|
10
13
|
|
|
11
14
|
border: base.$govuk-border-width solid;
|
|
12
|
-
border-color:
|
|
13
|
-
|
|
14
|
-
background-color: base.govuk-functional-colour(brand);
|
|
15
|
+
border-color: var(--_govuk-notification-banner-colour);
|
|
15
16
|
|
|
16
17
|
&:focus {
|
|
17
18
|
outline: base.$govuk-focus-width solid;
|
|
@@ -26,6 +27,9 @@
|
|
|
26
27
|
// text in high contrast mode
|
|
27
28
|
border-bottom: 1px solid transparent;
|
|
28
29
|
|
|
30
|
+
color: var(--_govuk-notification-banner-title-text-colour);
|
|
31
|
+
background-color: var(--_govuk-notification-banner-colour);
|
|
32
|
+
|
|
29
33
|
@media #{base.govuk-from-breakpoint(tablet)} {
|
|
30
34
|
padding: 2px base.govuk-spacing(4) base.govuk-spacing(1);
|
|
31
35
|
}
|
|
@@ -38,7 +42,6 @@
|
|
|
38
42
|
@include base.govuk-typography-weight-bold;
|
|
39
43
|
margin: 0;
|
|
40
44
|
padding: 0;
|
|
41
|
-
color: base.govuk-colour("white");
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
.govuk-notification-banner__content {
|
|
@@ -87,9 +90,7 @@
|
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
.govuk-notification-banner--success {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
background-color: base.govuk-functional-colour(success);
|
|
93
|
+
--_govuk-notification-banner-colour: #{base.govuk-functional-colour(success)};
|
|
93
94
|
|
|
94
95
|
.govuk-notification-banner__link {
|
|
95
96
|
@include base.govuk-link-style-success;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
padding: base.govuk-spacing(7) - base.$govuk-border-width;
|
|
12
12
|
|
|
13
13
|
border: base.$govuk-border-width solid transparent;
|
|
14
|
+
color: base.govuk-functional-colour(text);
|
|
14
15
|
|
|
15
16
|
text-align: center;
|
|
16
17
|
|
|
@@ -35,17 +36,6 @@
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
.govuk-panel--confirmation {
|
|
39
|
-
color: base.govuk-colour("white");
|
|
40
|
-
background: base.govuk-colour("green");
|
|
41
|
-
|
|
42
|
-
@media print {
|
|
43
|
-
border-color: currentcolor;
|
|
44
|
-
color: base.govuk-functional-colour(text);
|
|
45
|
-
background: none;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
39
|
.govuk-panel__title {
|
|
50
40
|
@include base.govuk-font-size($size: 48);
|
|
51
41
|
@include base.govuk-typography-weight-bold;
|
|
@@ -53,8 +43,52 @@
|
|
|
53
43
|
margin-bottom: base.govuk-spacing(6);
|
|
54
44
|
}
|
|
55
45
|
|
|
56
|
-
|
|
46
|
+
// Remove bottom spacing from anything at the end of the Panel's content
|
|
47
|
+
// to stop the Panel's padding spacing from becoming too large.
|
|
48
|
+
.govuk-panel__title:last-child,
|
|
49
|
+
.govuk-panel__body > :last-child,
|
|
50
|
+
.govuk-panel__actions > :last-child {
|
|
57
51
|
margin-bottom: 0;
|
|
58
52
|
}
|
|
53
|
+
|
|
54
|
+
// On larger screens if the Panel actions have a button group,
|
|
55
|
+
// then we want to adjust the spacing a bit to avoid the button group
|
|
56
|
+
// making the Panel's padding spacing being too large.
|
|
57
|
+
@media #{base.govuk-from-breakpoint(tablet)} {
|
|
58
|
+
.govuk-panel__actions > .govuk-button-group:last-child {
|
|
59
|
+
margin-bottom: -1 * base.govuk-spacing(2);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// When the panel shows some actions, make sure they have some spacing
|
|
64
|
+
// from the panel's content
|
|
65
|
+
.govuk-panel__body:not(:last-child) {
|
|
66
|
+
margin-bottom: base.govuk-spacing(7);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.govuk-panel--confirmation {
|
|
70
|
+
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
|
|
71
|
+
background: base.govuk-functional-colour(success);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.govuk-panel--interruption {
|
|
75
|
+
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
|
|
76
|
+
background: base.govuk-functional-colour(brand);
|
|
77
|
+
text-align: left;
|
|
78
|
+
|
|
79
|
+
// Smaller title to go alongside smaller body text.
|
|
80
|
+
.govuk-panel__title {
|
|
81
|
+
@include base.govuk-font-size($size: 36);
|
|
82
|
+
margin-bottom: base.govuk-spacing(3);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media print {
|
|
87
|
+
.govuk-panel {
|
|
88
|
+
--govuk-text-colour: inherit;
|
|
89
|
+
border-color: currentcolor;
|
|
90
|
+
background: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
59
93
|
}
|
|
60
94
|
|
|
@@ -34,13 +34,6 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.govuk-select option:active,
|
|
38
|
-
.govuk-select option:checked,
|
|
39
|
-
.govuk-select:focus::-ms-value {
|
|
40
|
-
color: base.govuk-colour("white");
|
|
41
|
-
background-color: base.govuk-colour("blue");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
37
|
.govuk-select--error {
|
|
45
38
|
border-color: base.govuk-functional-colour(error);
|
|
46
39
|
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
border-bottom-width: 1px;
|
|
15
15
|
border-bottom-style: solid;
|
|
16
16
|
border-bottom-color: $govuk-service-navigation-border-colour;
|
|
17
|
-
|
|
17
|
+
// Ensure that both raw content and content with typography classes
|
|
18
|
+
// will pick up the correct colour by setting both `--govuk-text-colour`
|
|
19
|
+
// and `color`.
|
|
20
|
+
--govuk-text-colour: #{$govuk-service-navigation-text-colour};
|
|
21
|
+
color: base.govuk-functional-colour(text);
|
|
18
22
|
background-color: $govuk-service-navigation-background;
|
|
19
23
|
}
|
|
20
24
|
|
|
@@ -200,10 +204,7 @@
|
|
|
200
204
|
// Remove bottom border to add width-container ones
|
|
201
205
|
border-bottom: none;
|
|
202
206
|
|
|
203
|
-
|
|
204
|
-
// use it too.
|
|
205
|
-
color: base.govuk-colour("white");
|
|
206
|
-
|
|
207
|
+
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
|
|
207
208
|
background-color: base.govuk-functional-colour(brand);
|
|
208
209
|
|
|
209
210
|
.govuk-width-container {
|
|
@@ -220,12 +221,12 @@
|
|
|
220
221
|
// Override the 'active' border colour
|
|
221
222
|
.govuk-service-navigation__item,
|
|
222
223
|
.govuk-service-navigation__service-name {
|
|
223
|
-
border-color:
|
|
224
|
+
border-color: currentcolor;
|
|
224
225
|
}
|
|
225
226
|
|
|
226
227
|
// Override link styles
|
|
227
228
|
.govuk-service-navigation__link {
|
|
228
|
-
@include base.govuk-link-style-
|
|
229
|
+
@include base.govuk-link-style-text;
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
// Override mobile menu toggle colour when not focused
|
|
@@ -20,6 +20,9 @@ $govuk-default-functional-colours: (
|
|
|
20
20
|
"text": (
|
|
21
21
|
name: "black"
|
|
22
22
|
),
|
|
23
|
+
"inverse-text": (
|
|
24
|
+
name: "white"
|
|
25
|
+
),
|
|
23
26
|
// The background colour of the template. This is intended to be the same
|
|
24
27
|
// as `surface-background` for the purposes of making the Footer and Cookie
|
|
25
28
|
// banner components merge seamlessly with the template.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: katalyst-govuk-formbuilder
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.30.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Katalyst Interactive
|
|
@@ -373,7 +373,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
373
373
|
- !ruby/object:Gem::Version
|
|
374
374
|
version: '0'
|
|
375
375
|
requirements: []
|
|
376
|
-
rubygems_version: 4.0.
|
|
376
|
+
rubygems_version: 4.0.16
|
|
377
377
|
specification_version: 4
|
|
378
378
|
summary: Repackaging of UK.GOV forms for Rails 7 asset pipeline
|
|
379
379
|
test_files: []
|