@nationalarchives/frontend 0.1.54 → 0.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +7 -0
- package/nationalarchives/components/_index.scss +2 -0
- package/nationalarchives/components/accordion/_index.scss +1 -0
- package/nationalarchives/components/accordion/accordion.css +1 -0
- package/nationalarchives/components/accordion/accordion.css.map +1 -0
- package/nationalarchives/components/accordion/accordion.js +2 -0
- package/nationalarchives/components/accordion/accordion.js.map +1 -0
- package/nationalarchives/components/accordion/accordion.mjs +35 -0
- package/nationalarchives/components/accordion/accordion.scss +105 -0
- package/nationalarchives/components/accordion/accordion.stories.js +410 -0
- package/nationalarchives/components/accordion/fixtures.json +74 -0
- package/nationalarchives/components/accordion/macro-options.json +52 -0
- package/nationalarchives/components/accordion/macro.njk +3 -0
- package/nationalarchives/components/accordion/template.njk +16 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/macro-options.json +2 -2
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.stories.js +3 -0
- package/nationalarchives/components/card/fixtures.json +14 -0
- package/nationalarchives/components/card/macro-options.json +11 -5
- package/nationalarchives/components/card/template.njk +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/macro-options.json +1 -1
- package/nationalarchives/components/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/details/_index.scss +1 -0
- package/nationalarchives/components/details/details.css +1 -0
- package/nationalarchives/components/details/details.css.map +1 -0
- package/nationalarchives/components/details/details.scss +113 -0
- package/nationalarchives/components/details/details.stories.js +33 -0
- package/nationalarchives/components/details/fixtures.json +50 -0
- package/nationalarchives/components/details/macro-options.json +38 -0
- package/nationalarchives/components/details/macro.njk +3 -0
- package/nationalarchives/components/details/template.njk +14 -0
- package/nationalarchives/components/error-summary/error-summary.css +1 -1
- package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.stories.js +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/macro-options.json +6 -0
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.stories.js +24 -12
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +6 -0
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/macro-options.json +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/search-field/search-field.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.css +1 -1
- package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.scss +20 -11
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +81 -8
- package/nationalarchives/stories/utilities/tables/tables.stories.js +1 -1
- package/nationalarchives/templates/fixtures.json +3 -3
- package/nationalarchives/templates/layouts/_prototype-kit.njk +1 -1
- package/nationalarchives/templates/plain.njk +1 -1
- package/nationalarchives/tools/_colour.scss +15 -24
- package/nationalarchives/utilities/_a11y.scss +15 -1
- package/nationalarchives/utilities/_lists.scss +13 -13
- package/nationalarchives/utilities/_tables.scss +3 -7
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"all.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,g2BCPF,IAAMC,EAAWC,GACtB,SAAAD,EAAYE,GAAS,IAAAC,EAAA,KASnB,G,4FATmBC,CAAA,KAAAJ,GACnBK,KAAKH,QAAUA,EACfG,KAAKC,iBACHJ,GAAWA,EAAQK,cAAc,0BACnCF,KAAKG,aACHN,GACAG,KAAKC,kBACLJ,EAAQO,iBAAiB,0BAEtBJ,KAAKH,SAAYG,KAAKC,kBAAqBD,KAAKG,cAKnDH,KAAKG,aAAaE,OAAS,IAC1BL,KAAKH,QAAQS,UAAUC,SAAS,gCACjC,CACA,IAAMC,EAAW,mBAAHC,QAAsBC,EAAAA,EAAAA,MAE9BC,EAAcC,SAASC,cAAc,MAC3CF,EAAYL,UAAUQ,IACpB,wBACA,qCAEFH,EAAYI,MAAMC,QAAU,OAE5B,IAAMC,EAAgBL,SAASC,cAAc,UAC7CI,EAAcX,UAAUQ,IAAI,yBAC5BG,EAAcC,UACZ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CACtCC,GACF,IAAIR,EAAAA,YAAYQ,GAGlB,IAAMkR,EAAgBH,EAAOhR,cAC3B,qCAEEmR,GACF,IAAI3P,EAAAA,aAAa2P,GAGnB,IAAMC,EAAgBJ,EAAOhR,cAC3B,qCAEEoR,GACF,IAAItN,EAAAA,aAAasN,GAAe7D,OAGlC,IAAM8D,EAAUL,EAAOhR,cAAc,8BACjCqR,GACF,IAAI1M,EAAAA,OAAO0M,GAGML,EAAO9Q,iBAAiB,+BAChCyD,SAAQ,SAAC2N,GAClB,IAAIjL,EAAAA,QAAQiL,EACd,IAEA,IAAMC,EAAgBP,EAAOhR,cAC3B,qCAEEuR,GACF,IAAIzK,EAAAA,aAAayK,GAGnB,IAAMC,EAAUR,EAAOhR,cAAc,8BACjCwR,GACF,IAAIxJ,EAAAA,OAAOwJ,GAGKR,EAAO9Q,iBAAiB,+BAChCyD,SAAQ,SAAC8N,GACjB,IAAIxJ,EAAAA,QAAQwJ,EACd,IAEuBT,EAAO9Q,iBAC5B,sCAEayD,SAAQ,SAAC+N,GACtB,IAAIhJ,EAAAA,cAAcgJ,EACpB,IAEyBV,EAAO9Q,iBAC9B,uCAEeyD,SAAQ,SAACgO,GACxB,IAAI1I,EAAAA,eAAe0I,EACrB,IAEmBX,EAAO9Q,iBAAiB,iCAChCyD,SAAQ,SAACiO,GAClB,IAAInI,EAAAA,SAASmI,EACf,IAEcZ,EAAO9Q,iBAAiB,4BAChCyD,SAAQ,SAACkO,GACb,IAAI5H,EAAAA,KAAK4H,EACX,GACF,C","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/cookie-banner/cookie-banner.mjs","webpack://TNAFrontend/./src/nationalarchives/components/error-summary/error-summary.mjs","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs","webpack://TNAFrontend/./src/nationalarchives/components/global-header/global-header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/search-filters/search-filters.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsList =\n $module && $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n\n if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\n return;\n }\n\n if (\n this.$breadcrumbs.length > 2 &&\n !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n ) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n $expandable.style.display = \"none\";\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-!--visually-hidden'>Expand breadcrumbs</span>…\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$module.setAttribute(\"tabindex\", \"0\");\n this.$module.focus();\n this.$module.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n\n this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n }\n }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport { Cookies };\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n const policies = this.$module.getAttribute(\"data-policies\") || \"\";\n const extraPolicies = policies\n .split(\",\")\n .filter((x) => x)\n .map((policy) => policy.trim());\n const domain = this.$module.getAttribute(\"data-domain\") || undefined;\n const path = this.$module.getAttribute(\"data-path\") || undefined;\n const secure = this.$module.getAttribute(\"data-secure\") || undefined;\n const policiesKey =\n this.$module.getAttribute(\"data-policieskey\") || undefined;\n\n this.cookies = new Cookies({\n extraPolicies,\n domain,\n path,\n secure,\n policiesKey,\n newInstance: true,\n });\n\n this.cookiePreferencesSet =\n this.$module.getAttribute(\"data-preferenceskey\") ||\n \"cookie_preferences_set\";\n const cookiePreferencesSet = this.cookies.hasValue(\n this.cookiePreferencesSet,\n \"true\",\n );\n\n if (!cookiePreferencesSet) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.acceptAllPolicies();\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.rejectAllPolicies();\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSet, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", true);\n }\n}\n","export class ErrorSummary {\n constructor($module) {\n this.$module = $module;\n }\n\n init() {\n if (!this.$module) {\n return;\n }\n\n const disableAutoFocus =\n this.$module.getAttribute(\"data-disableautofocus\") === \"true\" ?? false;\n\n if (!disableAutoFocus) {\n this.setFocus(this.$module);\n }\n }\n\n setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute(\"tabindex\");\n\n if (!isFocusable) {\n $element.setAttribute(\"tabindex\", \"-1\");\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener(\"blur\", onBlur, { once: true });\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element);\n\n if (!isFocusable) {\n $element.removeAttribute(\"tabindex\");\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener(\"focus\", onFocus, { once: true });\n\n // Focus element\n options.onBeforeFocus?.call($element);\n $element.focus();\n }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n constructor($module) {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (!this.$module || !this.$themeSelector || !this.$tnaTemplate) {\n return;\n }\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (e) => {\n const $button = e.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.cookies = new Cookies();\n if (this.cookies.isPolicyAccepted(\"settings\")) {\n this.showThemeSelector();\n }\n this.cookies.on(\"changePolicy\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.showThemeSelector();\n } else {\n this.cookies.delete(\"theme\");\n this.hideThemeSelector();\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(\"theme\")) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(\"theme\"),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n }\n\n hideThemeSelector() {\n this.$themeSelector.setAttribute(\"hidden\", true);\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.cookies.set(\"theme\", theme);\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelector(\".tna-gallery__items\");\n this.opened = false;\n\n if (!this.$module || !this.$items) {\n return;\n }\n\n const supportTouchHorizontal = false;\n\n this.items = this.$module.querySelectorAll(\".tna-gallery__item\").length;\n\n if (this.items > 1) {\n const uniqueId = `tna-gallery-${uuidv4()}`;\n\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$items.setAttribute(\"tabindex\", \"-1\");\n\n this.$galleryToggle = document.createElement(\"button\");\n this.$galleryToggle.classList.add(\n \"tna-gallery__toggle\",\n \"tna-button\",\n \"tna-button--accent\",\n );\n this.$galleryToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n\n const onFirstTouch = () => {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n this.$module.classList.add(\"tna-gallery--touchable\");\n };\n\n if (supportTouchHorizontal) {\n this.$module.addEventListener(\"touchstart\", onFirstTouch);\n }\n\n this.$galleryToggle.addEventListener(\"click\", () => {\n if (supportTouchHorizontal) {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n }\n this.handleToggleGallery();\n });\n\n this.$galleryToggleWrapper = document.createElement(\"div\");\n this.$galleryToggleWrapper.classList.add(\n \"tna-column\",\n \"tna-column--full\",\n \"tna-gallery__toggle-wrapper\",\n );\n\n this.$galleryToggleWrapper.appendChild(this.$galleryToggle);\n this.$items.parentElement.appendChild(this.$galleryToggleWrapper);\n\n this.$items.setAttribute(\"id\", uniqueId);\n }\n }\n\n handleToggleGallery() {\n this.opened = !this.opened;\n if (this.opened) {\n this.$module.classList.remove(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", true);\n this.$galleryToggle.innerText = \"Close images\";\n this.$items.setAttribute(\"tabindex\", \"0\");\n this.$items.focus();\n this.$items.setAttribute(\"tabindex\", \"-1\");\n } else {\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n }\n }\n}\n","export class GlobalHeader {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-global-header__navigation-button\");\n this.$navigation =\n $module &&\n $module.querySelector(\".tna-global-header__navigation-wrapper\");\n this.$topNavigation =\n $module &&\n $module.querySelector(\".tna-global-header__top-navigation-wrapper\");\n this.$links =\n $module &&\n ((this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\")) ||\n (this.$topNavigation &&\n this.$topNavigation.querySelectorAll(\"[tabindex='0']\")));\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (\n !this.$module ||\n !this.$toggleButton ||\n (!this.$navigation && !this.$topNavigation)\n ) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$navigation.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n this.$topNavigation.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n hide() {\n if (this.$navigation) {\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = true;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"true\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-global-header__navigation-button--opened\",\n );\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n\n show() {\n if (this.$navigation) {\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = false;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"false\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-global-header__navigation-button--opened\",\n );\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n}\n","export class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-header__navigation-toggle-button\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (!this.$module || !this.$toggleButton || !this.$navigation) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$navigation.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n show() {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n\n hide() {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n\n if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n return;\n }\n\n this.openLabel =\n this.$module.getAttribute(\"data-informationlabelopen\") ||\n \"Open transcript\";\n this.closeLabel =\n this.$module.getAttribute(\"data-informationlabelclose\") ||\n \"Close transcript\";\n\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle = document.createElement(\"button\");\n this.$transcriptToggle.classList.add(\n \"tna-picture__toggle-transcript\",\n \"tna-button\",\n \"tna-button--small\",\n \"tna-button--solid-hover\",\n );\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.handleToggleTranscript(),\n );\n this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", true);\n }\n\n handleToggleTranscript() {\n const transcriptToggleOpenedClass =\n \"tna-picture__toggle-transcript--opened\";\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.classList.add(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = this.closeLabel;\n this.$transcript.removeAttribute(\"hidden\");\n } else {\n this.$transcriptToggle.classList.remove(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcript.setAttribute(\"hidden\", true);\n }\n }\n}\n","export class SearchFilters {\n constructor($module) {\n this.$module = $module;\n\n if (!this.$module) {\n return;\n }\n\n this.$module.classList.add(\"tna-search-filters--js-enabled\");\n\n Array.from(\n this.$module.querySelectorAll(\".tna-search-filters__fieldset\"),\n ).forEach(($fieldset) => {\n // const type = $fieldset.dataset.type;\n const $toggle = $fieldset.querySelector(\n \".tna-search-filters__item-toggle\",\n );\n const $headingInner = $fieldset.querySelector(\n \".tna-search-filters__heading-inner\",\n );\n const $item = $fieldset.querySelector(\".tna-search-filters__item\");\n\n if (!$toggle || !$headingInner || !$item) {\n return;\n }\n\n $toggle.removeAttribute(\"hidden\");\n $headingInner.remove();\n\n this.syncItem($toggle, $item);\n\n $toggle.addEventListener(\"click\", () => {\n this.toggleItem($toggle, $item);\n });\n\n // if (type === \"multiple\") {\n // const $count = $toggle.querySelector(\n // \".tna-search-filters__item-toggle-info\",\n // );\n // if ($count) {\n // $item.addEventListener(\"change\", () => {\n // const selected = Array.from(\n // $item.querySelectorAll('input[type=\"checkbox\"]:checked'),\n // ).length;\n // $count.innerText = selected ? `(${selected} selected)` : \"\";\n // });\n // }\n // }\n });\n }\n\n toggleItem($toggle, $item) {\n $toggle.setAttribute(\n \"aria-expanded\",\n $toggle.getAttribute(\"aria-expanded\") == \"false\",\n );\n this.syncItem($toggle, $item);\n }\n\n syncItem($toggle, $item) {\n if ($toggle.getAttribute(\"aria-expanded\") == \"true\") {\n $item.removeAttribute(\"hidden\");\n } else {\n $item.setAttribute(\"hidden\", true);\n }\n }\n}\n","export class SensitiveImage {\n constructor($module) {\n this.$module = $module;\n this.$imageDetails =\n $module && $module.querySelector(\".tna-sensitive-image__details\");\n this.$image =\n $module && $module.querySelector(\".tna-sensitive-image__image\");\n this.imageIsVisible = false;\n\n if (!this.$module || !this.$imageDetails || !this.$image) {\n return;\n }\n this.$imageDetails.addEventListener(\"toggle\", () =>\n this.handleImageDetailsToggle(),\n );\n }\n\n handleImageDetailsToggle() {\n if (this.$imageDetails.hasAttribute(\"open\")) {\n this.$image.focus({ preventScroll: true, focusVisible: true });\n }\n }\n}\n","export class SkipLink {\n linkedElementListener = false;\n\n constructor($module) {\n this.$module = $module;\n this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n this.$linkedElement =\n $module &&\n this.linkedElementId &&\n document.getElementById(this.linkedElementId);\n\n if (!this.$module || !this.$linkedElement) {\n return;\n }\n this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n }\n\n focusLinkedElement() {\n if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener(\"blur\", () =>\n this.removeFocusProperties(),\n );\n this.linkedElementListener = true;\n }\n }\n\n this.$linkedElement.focus();\n }\n\n removeFocusProperties() {\n this.$linkedElement.removeAttribute(\"tabindex\");\n this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n }\n}\n","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n const doesStartingTargetExist = [...this.$tabItems].some(\n ($tabItem) => $tabItem.getAttribute(\"id\") === startingTarget,\n );\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (doesStartingTargetExist &&\n $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!doesStartingTargetExist && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\")?.replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n","window.TNAFrontendCookies = window.TNAFrontendCookies || null;\nwindow.TNAFrontendCookieEvents = window.TNAFrontendCookieEvents || null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n\n constructor() {\n if (window.TNAFrontendCookieEvents) {\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n for (let i = this.oneTimeEvents[event].length - 1; i >= 0; i--) {\n const eventToTrigger = this.oneTimeEvents[event][i];\n eventToTrigger.call(this, data);\n this.oneTimeEvents[event].splice(i, 1);\n }\n }\n }\n}\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n extraPolicies = [];\n /** @protected */\n domain = \"\";\n /** @protected */\n path = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n\n /**\n * Create a cookie handler.\n * @param {String} [options.extraPolicies=[]] - The extra cookie policies to manage in addition to essential, settings and usage.\n * @param {String} [options.domain=\"\"] - The domain to register the cookie with.\n * @param {String} [options.path=\"\"] - The domain to register the cookie with.\n * @param {String} [options.secure=true] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey=\"cookies_policy\"] - The name of the cookie.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n */\n constructor(options = {}) {\n const {\n extraPolicies = [],\n domain = \"\",\n path = \"/\",\n secure = true,\n policiesKey = \"cookies_policy\",\n newInstance = false,\n } = options;\n if (newInstance) {\n this.destroyInstance();\n } else if (window.TNAFrontendCookies) {\n return window.TNAFrontendCookies;\n }\n this.extraPolicies = extraPolicies;\n this.domain = domain;\n this.path = path;\n this.secure = secure;\n this.policiesKey = policiesKey;\n this.events = new CookieEventHandler();\n this.init();\n window.TNAFrontendCookies = this;\n }\n\n /** @protected */\n init() {\n this.savePolicies({\n ...Object.fromEntries(\n this.extraPolicies.map((k) => [k.toLowerCase(), false]),\n ),\n usage: false,\n settings: false,\n ...this.policies,\n essential: true,\n });\n }\n\n destroyInstance() {\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((x) => x)\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n if (parts[0]) {\n deserialised[parts[0]] = parts[1];\n }\n });\n return deserialised;\n }\n\n /** @protected */\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n } catch (e) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) == value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean}\n */\n get(key) {\n return this.exists(key) ? decodeURIComponent(this.all[key]) : null;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=31536000] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.domain] - The domain to register the cookie with.\n * @param {String} [options.path=this.path] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n */\n set(key, value, options = {}) {\n const {\n maxAge = 60 * 60 * 24 * 365,\n sameSite = \"Lax\",\n domain = this.domain,\n path = this.path,\n secure = this.secure,\n } = options;\n if (!key) {\n return;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${\n domain ? ` domain=${domain}; ` : \"\"\n } samesite=${sameSite}; path=${path}; max-age=${maxAge}${\n secure ? \"; secure\" : \"\"\n }`;\n document.cookie = cookie;\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = null) {\n const options = { maxAge: -1, path, domain: domain || undefined };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = null) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n return;\n }\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.toLowerCase(), true]),\n );\n this.savePolicies(allPolicies);\n this.events.trigger(\"acceptAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Reject all the cookie policies.\n */\n rejectAllPolicies() {\n const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePolicies(allPolicies);\n this.events.trigger(\"rejectAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Commit policy preferences to the browser.\n * @param {object} policies - The policies to commit.\n */\n savePolicies(policies) {\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n return Object.hasOwn(this.policies, policy)\n ? this.policies[policy] === true\n : null;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.events.once(event, callback);\n }\n}\n","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { CookieBanner } from \"./components/cookie-banner/cookie-banner.mjs\";\nimport { ErrorSummary } from \"./components/error-summary/error-summary.mjs\";\nimport { Footer } from \"./components/footer/footer.mjs\";\nimport { Gallery } from \"./components/gallery/gallery.mjs\";\nimport { GlobalHeader } from \"./components/global-header/global-header.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SearchFilters } from \"./components/search-filters/search-filters.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { SkipLink } from \"./components/skip-link/skip-link.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\nimport Cookies from \"./lib/cookies.mjs\";\n\nconst $body = document.documentElement;\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n window.removeEventListener(\"touchstart\", onFirstTouch);\n $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n if (e.key === \"Tab\") {\n $body.classList.add(\"tna-template--tabbed\");\n $body.classList.remove(\"tna-template--clicked\");\n }\n};\n\nconst onMouseDown = () => {\n $body.classList.add(\"tna-template--clicked\");\n $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\nconst initAll = (options) => {\n options = typeof options !== \"undefined\" ? options : {};\n const $scope =\n options.scope instanceof HTMLElement ? options.scope : document;\n\n const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n if ($breadcrumbs) {\n new Breadcrumbs($breadcrumbs);\n }\n\n const $cookieBanner = $scope.querySelector(\n '[data-module=\"tna-cookie-banner\"]',\n );\n if ($cookieBanner) {\n new CookieBanner($cookieBanner);\n }\n\n const $errorSummary = $scope.querySelector(\n '[data-module=\"tna-error-summary\"]',\n );\n if ($errorSummary) {\n new ErrorSummary($errorSummary).init();\n }\n\n const $footer = $scope.querySelector('[data-module=\"tna-footer\"]');\n if ($footer) {\n new Footer($footer);\n }\n\n const $galleries = $scope.querySelectorAll('[data-module=\"tna-gallery\"]');\n $galleries.forEach(($gallery) => {\n new Gallery($gallery);\n });\n\n const $globalHeader = $scope.querySelector(\n '[data-module=\"tna-global-header\"]',\n );\n if ($globalHeader) {\n new GlobalHeader($globalHeader);\n }\n\n const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header);\n }\n\n const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n $pictures.forEach(($picture) => {\n new Picture($picture);\n });\n\n const $searchFilters = $scope.querySelectorAll(\n '[data-module=\"tna-search-filters\"]',\n );\n $searchFilters.forEach(($searchFilter) => {\n new SearchFilters($searchFilter);\n });\n\n const $sensitiveImages = $scope.querySelectorAll(\n '[data-module=\"tna-sensitive-image\"]',\n );\n $sensitiveImages.forEach(($sensitiveImage) => {\n new SensitiveImage($sensitiveImage);\n });\n\n const $skipLinks = $scope.querySelectorAll('[data-module=\"tna-skip-link\"]');\n $skipLinks.forEach(($skipLink) => {\n new SkipLink($skipLink);\n });\n\n const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n $tabs.forEach(($tabModule) => {\n new Tabs($tabModule);\n });\n};\n\nexport {\n initAll,\n Cookies,\n Breadcrumbs,\n CookieBanner,\n ErrorSummary,\n Footer,\n Gallery,\n GlobalHeader,\n Header,\n Picture,\n SearchFilters,\n SensitiveImage,\n SkipLink,\n Tabs,\n};\n"],"names":["root","factory","exports","module","define","amd","self","Breadcrumbs","_createClass","$module","_this","_classCallCheck","this","$breadcrumbsList","querySelector","$breadcrumbs","querySelectorAll","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling","CookieBanner","$acceptButton","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","extraPolicies","getAttribute","split","filter","x","map","policy","trim","domain","undefined","path","secure","policiesKey","cookies","Cookies","newInstance","cookiePreferencesSet","hasValue","removeAttribute","accept","reject","key","value","complete","acceptAllPolicies","rejectAllPolicies","_this2","set","forEach","$closeButton","close","ErrorSummary","_ref","setFocus","$element","_options$onBeforeFocu","options","arguments","isFocusable","onBlur","_options$onBlur","call","once","onBeforeFocus","Footer","$themeSelector","$tnaTemplate","$themeSelectorButtons","Array","from","$themeSelectorButton","e","$button","target","setTheme","selectThemeSelectorButton","isPolicyAccepted","showThemeSelector","on","data","Object","hasOwn","settings","hideThemeSelector","exists","$currentThemeButton","find","get","theme","$selectedButton","Gallery","$items","opened","items","$galleryToggle","innerText","handleToggleGallery","$galleryToggleWrapper","parentElement","GlobalHeader","$toggleButton","$navigation","$topNavigation","$links","menuOpened","mql","window","matchMedia","syncState","handleToggleNavigation","addListener","code","matches","show","hide","hidden","i","Header","Picture","$imageWrapper","$transcript","transcriptOpened","openLabel","closeLabel","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","SearchFilters","$fieldset","$toggle","$headingInner","$item","syncItem","toggleItem","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","hasAttribute","preventScroll","focusVisible","SkipLink","linkedElementId","pop","$linkedElement","getElementById","focusLinkedElement","linkedElementListener","removeFocusProperties","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","startingTarget","location","hash","replace","doesStartingTargetExist","_toConsumableArray","some","$tabItem","$newTabList","index","$tabListItemLink","_$tabListItemLink$get","$replacementButton","replaceWith","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","newIndex","currentIndex","findIndex","targetId","history","replaceState","TNAFrontendCookies","TNAFrontendCookieEvents","CookieEventHandler","_defineProperty","event","callback","events","oneTimeEvents","eventToTrigger","splice","_options$extraPolicie","_options$domain","_options$path","_options$secure","_options$policiesKey","_options$newInstance","destroyInstance","init","savePolicies","_objectSpread","fromEntries","k","toLowerCase","usage","policies","essential","deserialised","cookie","parts","JSON","parse","all","decodeURIComponent","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain2","_options$path2","_options$secure2","encodeURIComponent","trigger","keys","setPolicy","accepted","allPolicies","stringify","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","$scope","scope","HTMLElement","$cookieBanner","$errorSummary","$footer","$gallery","$globalHeader","$header","$picture","$searchFilter","$sensitiveImage","$skipLink","$tabModule"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"all.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,i1BCTF,IAAMC,EAASC,GAGpB,SAAAD,EAAYE,GAAS,I,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAJ,G,EAAA,M,MAAA,uB,mCAFF,K,iDAAA,KAGjBK,KAAKH,QAAUA,EACfG,KAAKC,qBACHJ,GAAWA,EAAQK,cAAc,iCACnCF,KAAKG,iBACHN,GACAG,KAAKC,sBACLG,SAASC,iBAAiB,iCAADC,OACUN,KAAKC,qBAAqBM,aAAa,QAAO,OAE9EP,KAAKH,SAAYG,KAAKG,kBAI3BK,MAAMC,KAAKT,KAAKG,kBAAkBO,SAAQ,SAACC,GACzCA,EAAgBC,iBAAiB,UAAU,SAACC,GAC1C,IAAMC,EAAsBD,EAAEE,OAC1BD,EAAoBE,aAAa,SACnCR,MAAMC,KAAKX,EAAKK,kBACbc,QACC,SAACC,GAAmB,OAClBA,IAAwBJ,GACxBI,EAAoBF,aAAa,OAAO,IAE3CN,SAAQ,SAACQ,GAAmB,OAC3BA,EAAoBC,gBAAgB,OAAO,GAGnD,GACF,GACF,G,w0BC/BK,IAAMC,EAAWxB,GACtB,SAAAwB,EAAYvB,GAAS,IAAAC,EAAA,KASnB,G,4FATmBC,CAAA,KAAAqB,GACnBpB,KAAKH,QAAUA,EACfG,KAAKqB,iBACHxB,GAAWA,EAAQK,cAAc,0BACnCF,KAAKsB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,EACrB,IAEmBZ,EAAOnR,iBAAiB,iCAChCK,SAAQ,SAAC2R,GAClB,IAAIpI,EAAAA,SAASoI,EACf,IAEcb,EAAOnR,iBAAiB,4BAChCK,SAAQ,SAAC4R,GACb,IAAI7H,EAAAA,KAAK6H,EACX,GACF,C","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/accordion/accordion.mjs","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/cookie-banner/cookie-banner.mjs","webpack://TNAFrontend/./src/nationalarchives/components/error-summary/error-summary.mjs","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs","webpack://TNAFrontend/./src/nationalarchives/components/global-header/global-header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/search-filters/search-filters.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","export class Accordion {\n polyfillRequired = null;\n\n constructor($module) {\n this.$module = $module;\n this.$firstDetailsElement =\n $module && $module.querySelector(\".tna-accordion__details[name]\");\n this.$detailsElements =\n $module &&\n this.$firstDetailsElement &&\n document.querySelectorAll(\n `.tna-accordion__details[name=\"${this.$firstDetailsElement.getAttribute(\"name\")}\"]`,\n );\n if (!this.$module || !this.$detailsElements) {\n return;\n }\n\n Array.from(this.$detailsElements).forEach(($detailsElement) => {\n $detailsElement.addEventListener(\"toggle\", (e) => {\n const $thisDetailsElement = e.target;\n if ($thisDetailsElement.hasAttribute(\"open\")) {\n Array.from(this.$detailsElements)\n .filter(\n ($eachDetailsElement) =>\n $eachDetailsElement !== $thisDetailsElement &&\n $eachDetailsElement.hasAttribute(\"open\"),\n )\n .forEach(($eachDetailsElement) =>\n $eachDetailsElement.removeAttribute(\"open\"),\n );\n }\n });\n });\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsList =\n $module && $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n\n if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\n return;\n }\n\n if (\n this.$breadcrumbs.length > 2 &&\n !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n ) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n $expandable.style.display = \"none\";\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-!--visually-hidden'>Expand breadcrumbs</span>…\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$module.setAttribute(\"tabindex\", \"0\");\n this.$module.focus();\n this.$module.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n\n this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n }\n }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport { Cookies };\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n const policies = this.$module.getAttribute(\"data-policies\") || \"\";\n const extraPolicies = policies\n .split(\",\")\n .filter((x) => x)\n .map((policy) => policy.trim());\n const domain = this.$module.getAttribute(\"data-domain\") || undefined;\n const path = this.$module.getAttribute(\"data-path\") || undefined;\n const secure = this.$module.getAttribute(\"data-secure\") || undefined;\n const policiesKey =\n this.$module.getAttribute(\"data-policieskey\") || undefined;\n\n this.cookies = new Cookies({\n extraPolicies,\n domain,\n path,\n secure,\n policiesKey,\n newInstance: true,\n });\n\n this.cookiePreferencesSet =\n this.$module.getAttribute(\"data-preferenceskey\") ||\n \"cookie_preferences_set\";\n const cookiePreferencesSet = this.cookies.hasValue(\n this.cookiePreferencesSet,\n \"true\",\n );\n\n if (!cookiePreferencesSet) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.acceptAllPolicies();\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.rejectAllPolicies();\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSet, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", true);\n }\n}\n","export class ErrorSummary {\n constructor($module) {\n this.$module = $module;\n }\n\n init() {\n if (!this.$module) {\n return;\n }\n\n const disableAutoFocus =\n this.$module.getAttribute(\"data-disableautofocus\") === \"true\" ?? false;\n\n if (!disableAutoFocus) {\n this.setFocus(this.$module);\n }\n }\n\n setFocus($element, options = {}) {\n const isFocusable = $element.getAttribute(\"tabindex\");\n\n if (!isFocusable) {\n $element.setAttribute(\"tabindex\", \"-1\");\n }\n\n /**\n * Handle element focus\n */\n function onFocus() {\n $element.addEventListener(\"blur\", onBlur, { once: true });\n }\n\n /**\n * Handle element blur\n */\n function onBlur() {\n options.onBlur?.call($element);\n\n if (!isFocusable) {\n $element.removeAttribute(\"tabindex\");\n }\n }\n\n // Add listener to reset element on blur, after focus\n $element.addEventListener(\"focus\", onFocus, { once: true });\n\n // Focus element\n options.onBeforeFocus?.call($element);\n $element.focus();\n }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n constructor($module) {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (!this.$module || !this.$themeSelector || !this.$tnaTemplate) {\n return;\n }\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (e) => {\n const $button = e.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.cookies = new Cookies();\n if (this.cookies.isPolicyAccepted(\"settings\")) {\n this.showThemeSelector();\n }\n this.cookies.on(\"changePolicy\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.showThemeSelector();\n } else {\n this.cookies.delete(\"theme\");\n this.hideThemeSelector();\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(\"theme\")) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(\"theme\"),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n }\n\n hideThemeSelector() {\n this.$themeSelector.setAttribute(\"hidden\", true);\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.cookies.set(\"theme\", theme);\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelector(\".tna-gallery__items\");\n this.opened = false;\n\n if (!this.$module || !this.$items) {\n return;\n }\n\n const supportTouchHorizontal = false;\n\n this.items = this.$module.querySelectorAll(\".tna-gallery__item\").length;\n\n if (this.items > 1) {\n const uniqueId = `tna-gallery-${uuidv4()}`;\n\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$items.setAttribute(\"tabindex\", \"-1\");\n\n this.$galleryToggle = document.createElement(\"button\");\n this.$galleryToggle.classList.add(\n \"tna-gallery__toggle\",\n \"tna-button\",\n \"tna-button--accent\",\n );\n this.$galleryToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n\n const onFirstTouch = () => {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n this.$module.classList.add(\"tna-gallery--touchable\");\n };\n\n if (supportTouchHorizontal) {\n this.$module.addEventListener(\"touchstart\", onFirstTouch);\n }\n\n this.$galleryToggle.addEventListener(\"click\", () => {\n if (supportTouchHorizontal) {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n }\n this.handleToggleGallery();\n });\n\n this.$galleryToggleWrapper = document.createElement(\"div\");\n this.$galleryToggleWrapper.classList.add(\n \"tna-column\",\n \"tna-column--full\",\n \"tna-gallery__toggle-wrapper\",\n );\n\n this.$galleryToggleWrapper.appendChild(this.$galleryToggle);\n this.$items.parentElement.appendChild(this.$galleryToggleWrapper);\n\n this.$items.setAttribute(\"id\", uniqueId);\n }\n }\n\n handleToggleGallery() {\n this.opened = !this.opened;\n if (this.opened) {\n this.$module.classList.remove(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", true);\n this.$galleryToggle.innerText = \"Close images\";\n this.$items.setAttribute(\"tabindex\", \"0\");\n this.$items.focus();\n this.$items.setAttribute(\"tabindex\", \"-1\");\n } else {\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n }\n }\n}\n","export class GlobalHeader {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-global-header__navigation-button\");\n this.$navigation =\n $module &&\n $module.querySelector(\".tna-global-header__navigation-wrapper\");\n this.$topNavigation =\n $module &&\n $module.querySelector(\".tna-global-header__top-navigation-wrapper\");\n this.$links =\n $module &&\n ((this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\")) ||\n (this.$topNavigation &&\n this.$topNavigation.querySelectorAll(\"[tabindex='0']\")));\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (\n !this.$module ||\n !this.$toggleButton ||\n (!this.$navigation && !this.$topNavigation)\n ) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$navigation.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n this.$topNavigation.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n hide() {\n if (this.$navigation) {\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = true;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"true\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-global-header__navigation-button--opened\",\n );\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n\n show() {\n if (this.$navigation) {\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = false;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"false\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-global-header__navigation-button--opened\",\n );\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n}\n","export class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-header__navigation-toggle-button\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (!this.$module || !this.$toggleButton || !this.$navigation) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$navigation.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n show() {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n\n hide() {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n\n if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n return;\n }\n\n this.openLabel =\n this.$module.getAttribute(\"data-informationlabelopen\") ||\n \"Open transcript\";\n this.closeLabel =\n this.$module.getAttribute(\"data-informationlabelclose\") ||\n \"Close transcript\";\n\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle = document.createElement(\"button\");\n this.$transcriptToggle.classList.add(\n \"tna-picture__toggle-transcript\",\n \"tna-button\",\n \"tna-button--small\",\n \"tna-button--solid-hover\",\n );\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.handleToggleTranscript(),\n );\n this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", true);\n }\n\n handleToggleTranscript() {\n const transcriptToggleOpenedClass =\n \"tna-picture__toggle-transcript--opened\";\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.classList.add(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = this.closeLabel;\n this.$transcript.removeAttribute(\"hidden\");\n } else {\n this.$transcriptToggle.classList.remove(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = this.openLabel;\n this.$transcript.setAttribute(\"hidden\", true);\n }\n }\n}\n","export class SearchFilters {\n constructor($module) {\n this.$module = $module;\n\n if (!this.$module) {\n return;\n }\n\n this.$module.classList.add(\"tna-search-filters--js-enabled\");\n\n Array.from(\n this.$module.querySelectorAll(\".tna-search-filters__fieldset\"),\n ).forEach(($fieldset) => {\n // const type = $fieldset.dataset.type;\n const $toggle = $fieldset.querySelector(\n \".tna-search-filters__item-toggle\",\n );\n const $headingInner = $fieldset.querySelector(\n \".tna-search-filters__heading-inner\",\n );\n const $item = $fieldset.querySelector(\".tna-search-filters__item\");\n\n if (!$toggle || !$headingInner || !$item) {\n return;\n }\n\n $toggle.removeAttribute(\"hidden\");\n $headingInner.remove();\n\n this.syncItem($toggle, $item);\n\n $toggle.addEventListener(\"click\", () => {\n this.toggleItem($toggle, $item);\n });\n\n // if (type === \"multiple\") {\n // const $count = $toggle.querySelector(\n // \".tna-search-filters__item-toggle-info\",\n // );\n // if ($count) {\n // $item.addEventListener(\"change\", () => {\n // const selected = Array.from(\n // $item.querySelectorAll('input[type=\"checkbox\"]:checked'),\n // ).length;\n // $count.innerText = selected ? `(${selected} selected)` : \"\";\n // });\n // }\n // }\n });\n }\n\n toggleItem($toggle, $item) {\n $toggle.setAttribute(\n \"aria-expanded\",\n $toggle.getAttribute(\"aria-expanded\") == \"false\",\n );\n this.syncItem($toggle, $item);\n }\n\n syncItem($toggle, $item) {\n if ($toggle.getAttribute(\"aria-expanded\") == \"true\") {\n $item.removeAttribute(\"hidden\");\n } else {\n $item.setAttribute(\"hidden\", true);\n }\n }\n}\n","export class SensitiveImage {\n constructor($module) {\n this.$module = $module;\n this.$imageDetails =\n $module && $module.querySelector(\".tna-sensitive-image__details\");\n this.$image =\n $module && $module.querySelector(\".tna-sensitive-image__image\");\n this.imageIsVisible = false;\n\n if (!this.$module || !this.$imageDetails || !this.$image) {\n return;\n }\n this.$imageDetails.addEventListener(\"toggle\", () =>\n this.handleImageDetailsToggle(),\n );\n }\n\n handleImageDetailsToggle() {\n if (this.$imageDetails.hasAttribute(\"open\")) {\n this.$image.focus({ preventScroll: true, focusVisible: true });\n }\n }\n}\n","export class SkipLink {\n linkedElementListener = false;\n\n constructor($module) {\n this.$module = $module;\n this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n this.$linkedElement =\n $module &&\n this.linkedElementId &&\n document.getElementById(this.linkedElementId);\n\n if (!this.$module || !this.$linkedElement) {\n return;\n }\n this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n }\n\n focusLinkedElement() {\n if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener(\"blur\", () =>\n this.removeFocusProperties(),\n );\n this.linkedElementListener = true;\n }\n }\n\n this.$linkedElement.focus();\n }\n\n removeFocusProperties() {\n this.$linkedElement.removeAttribute(\"tabindex\");\n this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n }\n}\n","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n const doesStartingTargetExist = [...this.$tabItems].some(\n ($tabItem) => $tabItem.getAttribute(\"id\") === startingTarget,\n );\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (doesStartingTargetExist &&\n $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!doesStartingTargetExist && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\")?.replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n","window.TNAFrontendCookies = window.TNAFrontendCookies || null;\nwindow.TNAFrontendCookieEvents = window.TNAFrontendCookieEvents || null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n\n constructor() {\n if (window.TNAFrontendCookieEvents) {\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n for (let i = this.oneTimeEvents[event].length - 1; i >= 0; i--) {\n const eventToTrigger = this.oneTimeEvents[event][i];\n eventToTrigger.call(this, data);\n this.oneTimeEvents[event].splice(i, 1);\n }\n }\n }\n}\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n extraPolicies = [];\n /** @protected */\n domain = \"\";\n /** @protected */\n path = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n\n /**\n * Create a cookie handler.\n * @param {String} [options.extraPolicies=[]] - The extra cookie policies to manage in addition to essential, settings and usage.\n * @param {String} [options.domain=\"\"] - The domain to register the cookie with.\n * @param {String} [options.path=\"\"] - The domain to register the cookie with.\n * @param {String} [options.secure=true] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey=\"cookies_policy\"] - The name of the cookie.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n */\n constructor(options = {}) {\n const {\n extraPolicies = [],\n domain = \"\",\n path = \"/\",\n secure = true,\n policiesKey = \"cookies_policy\",\n newInstance = false,\n } = options;\n if (newInstance) {\n this.destroyInstance();\n } else if (window.TNAFrontendCookies) {\n return window.TNAFrontendCookies;\n }\n this.extraPolicies = extraPolicies;\n this.domain = domain;\n this.path = path;\n this.secure = secure;\n this.policiesKey = policiesKey;\n this.events = new CookieEventHandler();\n this.init();\n window.TNAFrontendCookies = this;\n }\n\n /** @protected */\n init() {\n this.savePolicies({\n ...Object.fromEntries(\n this.extraPolicies.map((k) => [k.toLowerCase(), false]),\n ),\n usage: false,\n settings: false,\n ...this.policies,\n essential: true,\n });\n }\n\n destroyInstance() {\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((x) => x)\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n if (parts[0]) {\n deserialised[parts[0]] = parts[1];\n }\n });\n return deserialised;\n }\n\n /** @protected */\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n } catch (e) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) == value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean}\n */\n get(key) {\n return this.exists(key) ? decodeURIComponent(this.all[key]) : null;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=31536000] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.domain] - The domain to register the cookie with.\n * @param {String} [options.path=this.path] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n */\n set(key, value, options = {}) {\n const {\n maxAge = 60 * 60 * 24 * 365,\n sameSite = \"Lax\",\n domain = this.domain,\n path = this.path,\n secure = this.secure,\n } = options;\n if (!key) {\n return;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${\n domain ? ` domain=${domain}; ` : \"\"\n } samesite=${sameSite}; path=${path}; max-age=${maxAge}${\n secure ? \"; secure\" : \"\"\n }`;\n document.cookie = cookie;\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = null) {\n const options = { maxAge: -1, path, domain: domain || undefined };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = null) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n return;\n }\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.toLowerCase(), true]),\n );\n this.savePolicies(allPolicies);\n this.events.trigger(\"acceptAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Reject all the cookie policies.\n */\n rejectAllPolicies() {\n const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePolicies(allPolicies);\n this.events.trigger(\"rejectAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Commit policy preferences to the browser.\n * @param {object} policies - The policies to commit.\n */\n savePolicies(policies) {\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n return Object.hasOwn(this.policies, policy)\n ? this.policies[policy] === true\n : null;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.events.once(event, callback);\n }\n}\n","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Accordion } from \"./components/accordion/accordion.mjs\";\nimport { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { CookieBanner } from \"./components/cookie-banner/cookie-banner.mjs\";\nimport { ErrorSummary } from \"./components/error-summary/error-summary.mjs\";\nimport { Footer } from \"./components/footer/footer.mjs\";\nimport { Gallery } from \"./components/gallery/gallery.mjs\";\nimport { GlobalHeader } from \"./components/global-header/global-header.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SearchFilters } from \"./components/search-filters/search-filters.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { SkipLink } from \"./components/skip-link/skip-link.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\nimport Cookies from \"./lib/cookies.mjs\";\n\nconst $body = document.documentElement;\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n window.removeEventListener(\"touchstart\", onFirstTouch);\n $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n if (e.key === \"Tab\") {\n $body.classList.add(\"tna-template--tabbed\");\n $body.classList.remove(\"tna-template--clicked\");\n }\n};\n\nconst onMouseDown = () => {\n $body.classList.add(\"tna-template--clicked\");\n $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\nconst initAll = (options) => {\n options = typeof options !== \"undefined\" ? options : {};\n const $scope =\n options.scope instanceof HTMLElement ? options.scope : document;\n\n const $accordions = $scope.querySelectorAll('[data-module=\"tna-accordion\"]');\n $accordions.forEach(($accordion) => {\n new Accordion($accordion);\n });\n\n const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n if ($breadcrumbs) {\n new Breadcrumbs($breadcrumbs);\n }\n\n const $cookieBanner = $scope.querySelector(\n '[data-module=\"tna-cookie-banner\"]',\n );\n if ($cookieBanner) {\n new CookieBanner($cookieBanner);\n }\n\n const $errorSummary = $scope.querySelector(\n '[data-module=\"tna-error-summary\"]',\n );\n if ($errorSummary) {\n new ErrorSummary($errorSummary).init();\n }\n\n const $footer = $scope.querySelector('[data-module=\"tna-footer\"]');\n if ($footer) {\n new Footer($footer);\n }\n\n const $galleries = $scope.querySelectorAll('[data-module=\"tna-gallery\"]');\n $galleries.forEach(($gallery) => {\n new Gallery($gallery);\n });\n\n const $globalHeader = $scope.querySelector(\n '[data-module=\"tna-global-header\"]',\n );\n if ($globalHeader) {\n new GlobalHeader($globalHeader);\n }\n\n const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header);\n }\n\n const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n $pictures.forEach(($picture) => {\n new Picture($picture);\n });\n\n const $searchFilters = $scope.querySelectorAll(\n '[data-module=\"tna-search-filters\"]',\n );\n $searchFilters.forEach(($searchFilter) => {\n new SearchFilters($searchFilter);\n });\n\n const $sensitiveImages = $scope.querySelectorAll(\n '[data-module=\"tna-sensitive-image\"]',\n );\n $sensitiveImages.forEach(($sensitiveImage) => {\n new SensitiveImage($sensitiveImage);\n });\n\n const $skipLinks = $scope.querySelectorAll('[data-module=\"tna-skip-link\"]');\n $skipLinks.forEach(($skipLink) => {\n new SkipLink($skipLink);\n });\n\n const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n $tabs.forEach(($tabModule) => {\n new Tabs($tabModule);\n });\n};\n\nexport {\n initAll,\n Cookies,\n Accordion,\n Breadcrumbs,\n CookieBanner,\n ErrorSummary,\n Footer,\n Gallery,\n GlobalHeader,\n Header,\n Picture,\n SearchFilters,\n SensitiveImage,\n SkipLink,\n Tabs,\n};\n"],"names":["root","factory","exports","module","define","amd","self","Accordion","_createClass","$module","_this","_classCallCheck","this","$firstDetailsElement","querySelector","$detailsElements","document","querySelectorAll","concat","getAttribute","Array","from","forEach","$detailsElement","addEventListener","e","$thisDetailsElement","target","hasAttribute","filter","$eachDetailsElement","removeAttribute","Breadcrumbs","$breadcrumbsList","$breadcrumbs","length","classList","contains","uniqueId","uuidv4","$expandable","createElement","add","style","display","$expandButton","innerHTML","setAttribute","remove","focus","appendChild","insertBefore","nextSibling","CookieBanner","$acceptButton","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","extraPolicies","split","x","map","policy","trim","domain","undefined","path","secure","policiesKey","cookies","Cookies","newInstance","cookiePreferencesSet","hasValue","accept","reject","key","value","complete","acceptAllPolicies","rejectAllPolicies","_this2","set","$closeButton","close","ErrorSummary","_ref","setFocus","$element","_options$onBeforeFocu","options","arguments","isFocusable","onBlur","_options$onBlur","call","once","onBeforeFocus","Footer","$themeSelector","$tnaTemplate","$themeSelectorButtons","$themeSelectorButton","$button","setTheme","selectThemeSelectorButton","isPolicyAccepted","showThemeSelector","on","data","Object","hasOwn","settings","hideThemeSelector","exists","$currentThemeButton","find","get","theme","$selectedButton","Gallery","$items","opened","items","$galleryToggle","innerText","handleToggleGallery","$galleryToggleWrapper","parentElement","GlobalHeader","$toggleButton","$navigation","$topNavigation","$links","menuOpened","mql","window","matchMedia","syncState","handleToggleNavigation","addListener","code","matches","show","hide","hidden","i","Header","Picture","$imageWrapper","$transcript","transcriptOpened","openLabel","closeLabel","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","SearchFilters","$fieldset","$toggle","$headingInner","$item","syncItem","toggleItem","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","preventScroll","focusVisible","SkipLink","linkedElementId","pop","$linkedElement","getElementById","focusLinkedElement","linkedElementListener","removeFocusProperties","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","startingTarget","location","hash","replace","doesStartingTargetExist","_toConsumableArray","some","$tabItem","$newTabList","index","$tabListItemLink","_$tabListItemLink$get","$replacementButton","replaceWith","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","newIndex","currentIndex","findIndex","targetId","history","replaceState","TNAFrontendCookies","TNAFrontendCookieEvents","CookieEventHandler","_defineProperty","event","callback","events","oneTimeEvents","eventToTrigger","splice","_options$extraPolicie","_options$domain","_options$path","_options$secure","_options$policiesKey","_options$newInstance","destroyInstance","init","savePolicies","_objectSpread","fromEntries","k","toLowerCase","usage","policies","essential","deserialised","cookie","parts","JSON","parse","all","decodeURIComponent","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain2","_options$path2","_options$secure2","encodeURIComponent","trigger","keys","setPolicy","accepted","allPolicies","stringify","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","$scope","scope","HTMLElement","$accordion","$cookieBanner","$errorSummary","$footer","$gallery","$globalHeader","$header","$picture","$searchFilter","$sensitiveImage","$skipLink","$tabModule"],"sourceRoot":""}
|
package/nationalarchives/all.mjs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Accordion } from "./components/accordion/accordion.mjs";
|
1
2
|
import { Breadcrumbs } from "./components/breadcrumbs/breadcrumbs.mjs";
|
2
3
|
import { CookieBanner } from "./components/cookie-banner/cookie-banner.mjs";
|
3
4
|
import { ErrorSummary } from "./components/error-summary/error-summary.mjs";
|
@@ -41,6 +42,11 @@ const initAll = (options) => {
|
|
41
42
|
const $scope =
|
42
43
|
options.scope instanceof HTMLElement ? options.scope : document;
|
43
44
|
|
45
|
+
const $accordions = $scope.querySelectorAll('[data-module="tna-accordion"]');
|
46
|
+
$accordions.forEach(($accordion) => {
|
47
|
+
new Accordion($accordion);
|
48
|
+
});
|
49
|
+
|
44
50
|
const $breadcrumbs = $scope.querySelector('[data-module="tna-breadcrumbs"]');
|
45
51
|
if ($breadcrumbs) {
|
46
52
|
new Breadcrumbs($breadcrumbs);
|
@@ -115,6 +121,7 @@ const initAll = (options) => {
|
|
115
121
|
export {
|
116
122
|
initAll,
|
117
123
|
Cookies,
|
124
|
+
Accordion,
|
118
125
|
Breadcrumbs,
|
119
126
|
CookieBanner,
|
120
127
|
ErrorSummary,
|
@@ -0,0 +1 @@
|
|
1
|
+
@use "accordion";
|
@@ -0,0 +1 @@
|
|
1
|
+
.tna-accordion{margin-top:32px}.tna-accordion:first-child{margin-top:0}.tna-accordion{border-top:1px var(--keyline, rgb(38 38 42/0.25)) solid}.tna-accordion__details{border-bottom:1px var(--keyline, rgb(38 38 42/0.25)) solid;position:relative;z-index:1}.tna-accordion__details:has(.tna-accordion__summary:focus){z-index:2}.tna-accordion__summary{padding:8px 48px 8px 16px;position:relative;font-weight:700;list-style:none;border-radius:.1px;cursor:pointer}.tna-accordion__summary::-webkit-details-marker{display:none}.tna-accordion__summary::before{content:"";width:0;height:0;position:absolute;top:calc(50% - 0.4330127019rem);right:.75rem;border-width:0.8660254038rem .5rem 0 .5rem;border-color:var(--font-light, rgb(1 1 1/0.58)) rgba(0,0,0,0);border-style:solid}.tna-accordion__summary:hover{text-decoration:underline;text-decoration-thickness:3.5px;background-color:var(--background-tint, rgb(217, 217, 214))}.tna-accordion__summary:hover::before{border-color:var(--font-dark, rgb(1, 1, 1)) rgba(0,0,0,0)}.tna-accordion__content{padding:16px}.tna-accordion__content:has(.tna-table-wrapper):has(.tna-table){padding-right:0;padding-left:0}.tna-accordion__content:has(.tna-table-wrapper):has(.tna-table) .tna-table__caption{padding-top:0;padding-bottom:16px;font-size:inherit;line-height:inherit;text-align:left;caption-side:top}.tna-accordion__content:has(.tna-table-wrapper):has(.tna-table) .tna-table-wrapper{padding-right:0;padding-left:0;left:0}.tna-accordion__content:has(.tna-table-wrapper):has(.tna-table) .tna-table-wrapper .tna-table{width:calc(100% - 32px);margin-right:16px;margin-left:16px}.tna-accordion__details[open] .tna-accordion__summary::before{border-width:0 .5rem 0.8660254038rem .5rem}/*# sourceMappingURL=accordion.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/accordion/accordion.scss","../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss"],"names":[],"mappings":"AAUA,eACE,gBAEA,2BACE,aCTJ,eCiEM,wDD1DJ,wBC0DI,2DDvDF,kBACA,UAGF,2DACE,UAGF,wBACE,0BAGA,kBETF,YCiBsB,IHLpB,gBAEA,mBAEA,eAEA,gDACE,aAGF,gCACE,WAEA,QACA,SAEA,kBACA,gCACA,aAEA,2CACA,8DACA,mBAGF,8BEEF,0BACA,0BC/BsC,MF2BtC,4DDKI,sCACE,0DAKN,wBACE,aAEA,gEACE,gBACA,eAGE,oFACE,cACA,oBAEA,kBACA,oBACA,gBACA,iBAIJ,mFACE,gBACA,eAEA,OAEA,8FACE,wBACA,kBACA,iBAON,8DACE","file":"accordion.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-accordion {\n @include spacing.space-above;\n\n @include colour.colour-border(\"keyline\", 1px, solid, top);\n // @include colour.thick-keyline-dark(top);\n // @include colour.thick-keyline-accent(top);\n\n &__details {\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n\n position: relative;\n z-index: 1;\n }\n\n &__details:has(&__summary:focus) {\n z-index: 2;\n }\n\n &__summary {\n padding: spacing.space(0.5) spacing.space(3) spacing.space(0.5)\n spacing.space(1);\n\n position: relative;\n\n @include typography.main-font-weight-bold;\n list-style: none;\n\n border-radius: 0.1px;\n\n cursor: pointer;\n\n &::-webkit-details-marker {\n display: none;\n }\n\n &::before {\n content: \"\";\n\n width: 0;\n height: 0;\n\n position: absolute;\n top: calc(50% - #{math.div(math.sqrt(3), 4)}rem);\n right: 0.75rem;\n\n border-width: #{math.div(math.sqrt(3), 2)}rem 0.5rem 0 0.5rem;\n border-color: colour.colour-var(\"font-light\") transparent;\n border-style: solid;\n }\n\n &:hover {\n @include typography.interacted-text-decoration;\n @include colour.colour-background(\"background-tint\");\n\n &::before {\n border-color: colour.colour-var(\"font-dark\") transparent;\n }\n }\n }\n\n &__content {\n padding: spacing.space(1);\n\n &:has(.tna-table-wrapper):has(.tna-table) {\n padding-right: 0;\n padding-left: 0;\n\n .tna-table {\n &__caption {\n padding-top: 0;\n padding-bottom: spacing.space(1);\n\n font-size: inherit;\n line-height: inherit;\n text-align: left;\n caption-side: top;\n }\n }\n\n .tna-table-wrapper {\n padding-right: 0;\n padding-left: 0;\n\n left: 0;\n\n .tna-table {\n width: calc(100% - #{spacing.space(2)});\n margin-right: spacing.space(1);\n margin-left: spacing.space(1);\n }\n }\n }\n }\n\n &__details[open] &__summary {\n &::before {\n border-width: 0 0.5rem #{math.div(math.sqrt(3), 2)}rem 0.5rem;\n }\n }\n}\n","@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../tools/media\";\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)} if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction) {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-dark($direction) {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-accent($direction) {\n @include colour-border(\n \"accent-background\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-error($direction) {\n @include colour-border(\n \"form-error\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-brand($direction, $brandColour) {\n border-#{$direction}: borders.$thick-border-width #{brand-colour($brandColour)}\n solid;\n}\n\n// Use light theme colours (except for \"form-error\")\n%light {\n @include colour-css-vars(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n}\n\n@mixin light {\n @extend %light;\n}\n\n// Remove accent and contrast values (except for \"form-error\")\n%plain {\n @include colour-css-vars(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n @include colour-css-vars-dark(\"form-error\");\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n }\n\n .tna-template--dark-theme & {\n @include colour-css-vars-dark(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n }\n\n @include colour-background(\"background\");\n}\n\n@mixin plain {\n @extend %plain;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n }\n\n .tna-template--dark-theme & {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.45)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accent-text: #{colour.brand-colour(\"white\")} !important;\n --button-accent-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.45)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accent-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --button-accent-text: #{colour.brand-colour(\"black\")} !important;\n --button-accent-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %black-accent;\n @extend %accent-lighter-text;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --button-accent-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %pink-accent;\n @extend %accent-lighter-text;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --button-accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %orange-accent;\n @extend %accent-lighter-text;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --button-accent-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %green-accent;\n @extend %accent-lighter-text;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --button-accent-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %blue-accent;\n @extend %accent-lighter-text;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin relative-font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include relative-font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include relative-font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include relative-font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include relative-font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include relative-font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include relative-font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include relative-font-size($font-size-medium);\n }\n }\n }\n}\n","/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactive-text-decoration-thickness: 3.5px !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 30 !default;\n$heading-l-font-size-small: 28 !default;\n$heading-l-font-size-tiny: 25 !default;\n$heading-l-line-height: 1.3 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: 21 !default;\n$heading-m-font-size-small: 20 !default;\n$heading-m-font-size-tiny: 19 !default;\n$heading-m-line-height: 1.6 !default;\n\n$heading-s-font-size-default: 18 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.6 !default;\n"]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TNAFrontend",[],t):"object"==typeof exports?exports.TNAFrontend=t():e.TNAFrontend=t()}(self,(()=>(()=>{"use strict";var e={d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function n(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}e.r(t),e.d(t,{Accordion:()=>l});var l=n((function e(t){var r,o,n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,(o=i(o="polyfillRequired"))in r?Object.defineProperty(r,o,{value:null,enumerable:!0,configurable:!0,writable:!0}):r[o]=null,this.$module=t,this.$firstDetailsElement=t&&t.querySelector(".tna-accordion__details[name]"),this.$detailsElements=t&&this.$firstDetailsElement&&document.querySelectorAll('.tna-accordion__details[name="'.concat(this.$firstDetailsElement.getAttribute("name"),'"]')),this.$module&&this.$detailsElements&&Array.from(this.$detailsElements).forEach((function(e){e.addEventListener("toggle",(function(e){var t=e.target;t.hasAttribute("open")&&Array.from(n.$detailsElements).filter((function(e){return e!==t&&e.hasAttribute("open")})).forEach((function(e){return e.removeAttribute("open")}))}))}))}));return t})()));
|
2
|
+
//# sourceMappingURL=accordion.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"components/accordion/accordion.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,qzBCLvD,IAAMC,EAASC,GAGpB,SAAAD,EAAYE,GAAS,I,IAAAC,EAAA,M,4FAAAC,CAAA,KAAAJ,G,EAAA,M,MAAA,uB,mCAFF,K,iDAAA,KAGjBK,KAAKH,QAAUA,EACfG,KAAKC,qBACHJ,GAAWA,EAAQK,cAAc,iCACnCF,KAAKG,iBACHN,GACAG,KAAKC,sBACLG,SAASC,iBAAiB,iCAADC,OACUN,KAAKC,qBAAqBM,aAAa,QAAO,OAE9EP,KAAKH,SAAYG,KAAKG,kBAI3BK,MAAMC,KAAKT,KAAKG,kBAAkBO,SAAQ,SAACC,GACzCA,EAAgBC,iBAAiB,UAAU,SAACC,GAC1C,IAAMC,EAAsBD,EAAEE,OAC1BD,EAAoBE,aAAa,SACnCR,MAAMC,KAAKX,EAAKK,kBACbc,QACC,SAACC,GAAmB,OAClBA,IAAwBJ,GACxBI,EAAoBF,aAAa,OAAO,IAE3CN,SAAQ,SAACQ,GAAmB,OAC3BA,EAAoBC,gBAAgB,OAAO,GAGnD,GACF,GACF,I","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/accordion/accordion.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Accordion {\n polyfillRequired = null;\n\n constructor($module) {\n this.$module = $module;\n this.$firstDetailsElement =\n $module && $module.querySelector(\".tna-accordion__details[name]\");\n this.$detailsElements =\n $module &&\n this.$firstDetailsElement &&\n document.querySelectorAll(\n `.tna-accordion__details[name=\"${this.$firstDetailsElement.getAttribute(\"name\")}\"]`,\n );\n if (!this.$module || !this.$detailsElements) {\n return;\n }\n\n Array.from(this.$detailsElements).forEach(($detailsElement) => {\n $detailsElement.addEventListener(\"toggle\", (e) => {\n const $thisDetailsElement = e.target;\n if ($thisDetailsElement.hasAttribute(\"open\")) {\n Array.from(this.$detailsElements)\n .filter(\n ($eachDetailsElement) =>\n $eachDetailsElement !== $thisDetailsElement &&\n $eachDetailsElement.hasAttribute(\"open\"),\n )\n .forEach(($eachDetailsElement) =>\n $eachDetailsElement.removeAttribute(\"open\"),\n );\n }\n });\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Accordion","_createClass","$module","_this","_classCallCheck","this","$firstDetailsElement","querySelector","$detailsElements","document","querySelectorAll","concat","getAttribute","Array","from","forEach","$detailsElement","addEventListener","e","$thisDetailsElement","target","hasAttribute","filter","$eachDetailsElement","removeAttribute"],"sourceRoot":""}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export class Accordion {
|
2
|
+
polyfillRequired = null;
|
3
|
+
|
4
|
+
constructor($module) {
|
5
|
+
this.$module = $module;
|
6
|
+
this.$firstDetailsElement =
|
7
|
+
$module && $module.querySelector(".tna-accordion__details[name]");
|
8
|
+
this.$detailsElements =
|
9
|
+
$module &&
|
10
|
+
this.$firstDetailsElement &&
|
11
|
+
document.querySelectorAll(
|
12
|
+
`.tna-accordion__details[name="${this.$firstDetailsElement.getAttribute("name")}"]`,
|
13
|
+
);
|
14
|
+
if (!this.$module || !this.$detailsElements) {
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
|
18
|
+
Array.from(this.$detailsElements).forEach(($detailsElement) => {
|
19
|
+
$detailsElement.addEventListener("toggle", (e) => {
|
20
|
+
const $thisDetailsElement = e.target;
|
21
|
+
if ($thisDetailsElement.hasAttribute("open")) {
|
22
|
+
Array.from(this.$detailsElements)
|
23
|
+
.filter(
|
24
|
+
($eachDetailsElement) =>
|
25
|
+
$eachDetailsElement !== $thisDetailsElement &&
|
26
|
+
$eachDetailsElement.hasAttribute("open"),
|
27
|
+
)
|
28
|
+
.forEach(($eachDetailsElement) =>
|
29
|
+
$eachDetailsElement.removeAttribute("open"),
|
30
|
+
);
|
31
|
+
}
|
32
|
+
});
|
33
|
+
});
|
34
|
+
}
|
35
|
+
}
|