{"version":3,"file":"header-CpDxAV9S.js","sources":["../../src/scripts/modules/header.ts"],"sourcesContent":["import { Component } from '@verndale/core';\nimport { gsap } from 'gsap';\nimport { isDesktop, isTabletLandscape, prefersReducedMotion } from '../helpers';\nimport Accordion from './accordion';\n\nclass Header extends Component {\n mainAccordion: Accordion | undefined;\n clickMegaMenuTimeline: gsap.core.Timeline | null = null;\n\n constructor(el: HTMLElement) {\n super(el);\n\n if (!isDesktop()) {\n this.mainAccordion = new Accordion(this.dom.resourcesAccordion as HTMLElement, 'grid');\n }\n }\n\n setupDefaults() {\n this.dom = {\n el: this.el,\n resourcesTriggerBtn: this.el.querySelector('.header__resources-btn'),\n mobileResourcesTriggerBtn: this.el.querySelector(\n '.mega-menu__resources-btn-container'\n ),\n resourcesMenu: this.el.querySelector('.resources-menu'),\n resourcesCloseBtn: this.el.querySelector('.resources-menu__close'),\n resourcesMenuItems: this.el.querySelectorAll('.btn-resources-menu-trigger'),\n resourcesMenuPanels: this.el.querySelectorAll('.resources-menu__item-panel'),\n resourcesAccordion: this.el.querySelector('.resources-menu__item-container'),\n megaMenu: this.el.querySelector('.mega-menu'),\n megaMenuTriggerBtn: this.el.querySelector('.header__mega-menu-btn'),\n megaMenuCloseBtn: this.el.querySelector('.mega-menu__close'),\n megamenuItems: this.el.querySelectorAll('.btn-mega-menu-trigger'),\n megamenuPanels: this.el.querySelectorAll('.mega-menu__item-panel'),\n megamenuBackTo: this.el.querySelectorAll('.mega-menu__back-to-btn'),\n searchTriggerBtn: this.el.querySelector('.header__search-btn'),\n searchMenu: this.el.querySelector('.search-menu'),\n searchMenuBtn: this.el.querySelector('.search-menu__search-btn'),\n searchMenuCloseBtn: this.el.querySelector('.search-menu__close'),\n searchInput: this.el.querySelector('.search-menu__search-input'),\n megaMenuSearchInput: this.el.querySelector('.mega-menu__search-input'),\n megaMenuSearchBtn: this.el.querySelector('.mega-menu__search-btn'),\n megaMenuSearchForm: this.el.querySelector('.mega-menu__search-container form'),\n searchMenuForm: this.el.querySelector('.search-menu__search-container form'),\n megamenuContent: this.el.querySelector('.mega-menu__content'),\n resourcesMenuContent: this.el.querySelector('.resources-menu__content'),\n megamenuDecorator: this.el.querySelector('.mega-menu__item-indicator-decorator'),\n resourcesMenuDecorator: this.el.querySelector(\n '.resources-menu__item-indicator-decorator'\n ),\n resourcesRightPanel: this.el.querySelector('.resources-menu__news-container'),\n megaMenuRightPanel: this.el.querySelector('.mega-menu__about-container')\n };\n\n if (this.dom.searchMenuBtn) {\n (this.dom.searchMenuBtn as HTMLButtonElement).disabled = true;\n }\n }\n\n addListeners() {\n if (this.dom.resourcesTriggerBtn) {\n (this.dom.resourcesTriggerBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleResources.bind(this)\n );\n }\n\n if (this.dom.mobileResourcesTriggerBtn) {\n (this.dom.mobileResourcesTriggerBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleResources.bind(this)\n );\n }\n\n if (this.dom.resourcesCloseBtn) {\n (this.dom.resourcesCloseBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleResources.bind(this)\n );\n }\n\n if (this.dom.megaMenuTriggerBtn) {\n (this.dom.megaMenuTriggerBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleMegaMenu.bind(this)\n );\n }\n\n if (this.dom.megaMenuCloseBtn) {\n (this.dom.megaMenuCloseBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleMegaMenu.bind(this)\n );\n }\n (this.dom.megamenuBackTo as NodeList).forEach(item => {\n item.addEventListener('click', this.backToSection.bind(this));\n });\n\n (this.dom.megamenuItems as NodeList).forEach(item => {\n item.addEventListener('click', this.openItemSection.bind(this));\n });\n\n if (this.dom.searchTriggerBtn) {\n (this.dom.searchTriggerBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleSearch.bind(this)\n );\n }\n\n if (this.dom.searchMenuCloseBtn) {\n (this.dom.searchMenuCloseBtn as HTMLElement).addEventListener(\n 'click',\n this.toggleSearch.bind(this)\n );\n }\n\n if (this.dom.searchMenuBtn) {\n (this.dom.searchMenuBtn as HTMLElement).addEventListener('click', () => {\n (this.dom.searchMenuForm as HTMLFormElement).submit();\n });\n }\n\n if (this.dom.searchMenuForm) {\n (this.dom.searchMenuForm as HTMLFormElement).addEventListener('submit', e => {\n e.preventDefault();\n if ((this.dom.searchMenuBtn as HTMLButtonElement).disabled === true) return;\n const searchInput = (this.dom.searchInput as HTMLInputElement).value;\n const formAction = (this.dom.searchMenuForm as HTMLFormElement).action;\n window.location.href = `${formAction}?searchTerm=\"${searchInput}\"&_from=\"_Search\"`;\n });\n }\n\n const handleSearch = (e: Event) => {\n const searchBtn = this.dom.megaMenuSearchBtn as HTMLButtonElement;\n const searchInput = this.dom.megaMenuSearchInput as HTMLInputElement;\n const searchForm = this.dom.megaMenuSearchForm as HTMLFormElement;\n\n e.preventDefault();\n if (searchBtn.disabled) return;\n const searchValue = searchInput.value;\n const formAction = searchForm.action;\n window.location.href = `${formAction}?searchTerm=\"${searchValue}\"&_from=\"_Search\"`;\n };\n\n if (this.dom.megaMenuSearchForm) {\n const searchForm = this.dom.megaMenuSearchForm as HTMLFormElement;\n\n searchForm.addEventListener('submit', handleSearch);\n }\n\n if (this.dom.searchInput) {\n const updateButtonState = () => {\n const inputValue = (this.dom.searchInput as HTMLInputElement).value;\n (this.dom.searchMenuBtn as HTMLButtonElement).disabled = inputValue.length === 0;\n };\n\n (this.dom.searchInput as HTMLInputElement).addEventListener('input', updateButtonState);\n\n (this.dom.searchInput as HTMLInputElement).addEventListener('keydown', e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (!(this.dom.searchMenuBtn as HTMLButtonElement).disabled) {\n (this.dom.searchMenuForm as HTMLFormElement).submit();\n }\n }\n });\n }\n\n if (this.dom.megaMenuSearchInput) {\n const megaMenuUpdateButtonState = () => {\n const inputValue = (this.dom.megaMenuSearchInput as HTMLInputElement).value;\n (this.dom.megaMenuSearchBtn as HTMLButtonElement).disabled = inputValue.length === 0;\n };\n (this.dom.megaMenuSearchInput as HTMLInputElement).addEventListener(\n 'input',\n megaMenuUpdateButtonState\n );\n (this.dom.megaMenuSearchInput as HTMLInputElement).addEventListener('keydown', e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n if (!(this.dom.megaMenuSearchBtn as HTMLButtonElement).disabled) {\n handleSearch(e);\n }\n }\n });\n megaMenuUpdateButtonState();\n }\n\n if (isTabletLandscape() || isDesktop()) {\n (this.dom.resourcesMenuItems as NodeList).forEach(item => {\n item.addEventListener('click', this.openItemSection.bind(this));\n });\n document.addEventListener('keydown', this.handleKeyDown.bind(this));\n }\n }\n\n backToSection(e: Event) {\n const target = e.currentTarget as HTMLElement;\n target.parentElement?.classList.remove('is-active');\n }\n\n openItemSection(e: Event) {\n const target = e.currentTarget as HTMLElement;\n const targetPanel = target.getAttribute('aria-controls');\n\n (this.dom.resourcesMenuPanels as NodeList).forEach(panel => {\n if ((panel as HTMLElement).id === targetPanel) {\n gsap.set(panel, { x: window.innerWidth / 2 });\n gsap\n .timeline({\n onStart: () => {\n (panel as HTMLElement).classList.add('is-active');\n }\n })\n .fromTo(\n panel,\n {\n x: window.innerWidth / 2,\n opacity: 0\n },\n {\n x: 0,\n opacity: 1,\n duration: prefersReducedMotion() ? 0 : 0.8,\n ease: 'power1.inOut'\n }\n );\n gsap\n .timeline()\n .fromTo(\n this.dom.resourcesRightPanel,\n {\n opacity: 1,\n x: 0\n },\n {\n x: window.innerWidth / 2,\n opacity: 0,\n duration: prefersReducedMotion() ? 0 : 0.8,\n ease: 'power1.inOut'\n }\n )\n .set(this.dom.resourcesRightPanel, { display: 'none' });\n if (this.dom.resourcesMenuDecorator) {\n (this.dom.resourcesMenuDecorator as HTMLElement).style.opacity = '1';\n (this.dom.resourcesMenuDecorator as HTMLElement).style.setProperty(\n '--inset-block-start',\n `${target.offsetTop}px`\n );\n }\n } else {\n gsap\n .timeline({\n onComplete: () => {\n (panel as HTMLElement).classList.remove('is-active');\n }\n })\n .fromTo(\n panel,\n {\n x: 0,\n opacity: 1\n },\n {\n x: window.innerWidth / 2,\n opacity: 0,\n duration: prefersReducedMotion() ? 0 : 0.8,\n ease: 'power1.inOut'\n }\n );\n }\n });\n\n (this.dom.megamenuPanels as NodeList).forEach(panel => {\n if ((panel as HTMLElement).id === targetPanel) {\n // if panel has a class of 'is-active' then we dont need to animate it\n if ((panel as HTMLElement).classList.contains('is-active')) {\n return;\n }\n\n gsap.set(panel, { x: window.innerWidth / 2 });\n gsap\n .timeline({\n onStart: () => {\n (panel as HTMLElement).classList.add('is-active');\n }\n })\n .fromTo(\n panel,\n {\n x: window.innerWidth / 2,\n opacity: 0\n },\n {\n x: 0,\n opacity: 1,\n duration: prefersReducedMotion() ? 0 : 0.7,\n ease: 'power1.inOut'\n }\n );\n gsap\n .timeline()\n .fromTo(\n this.dom.megaMenuRightPanel,\n {\n opacity: 1,\n x: 0\n },\n {\n x: window.innerWidth / 2,\n opacity: 0,\n duration: prefersReducedMotion() ? 0 : 0.7,\n ease: 'power1.inOut'\n }\n )\n .set(this.dom.megaMenuRightPanel, { display: 'none' });\n if (this.dom.megamenuDecorator) {\n (this.dom.megamenuDecorator as HTMLElement).style.opacity = '1';\n (this.dom.megamenuDecorator as HTMLElement).style.setProperty(\n '--inset-block-start',\n `${target.offsetTop}px`\n );\n }\n } else {\n gsap\n .timeline({\n onComplete: () => {\n (panel as HTMLElement).classList.remove('is-active');\n }\n })\n .fromTo(\n panel,\n {\n x: 0,\n opacity: 1\n },\n {\n x: window.innerWidth / 2,\n opacity: 0,\n duration: prefersReducedMotion() ? 0 : 0.7,\n ease: 'power1.inOut'\n }\n );\n }\n });\n }\n\n toggleResources() {\n gsap.set(this.dom.resourcesMenu, { y: window.innerHeight * -1 });\n\n const isOpen = (this.dom.resourcesMenu as HTMLElement).classList.toggle('open');\n if (isTabletLandscape()) {\n document.body.classList.toggle('no-scroll', isOpen);\n }\n if (isOpen) {\n (this.dom.resourcesMenuPanels as NodeList).forEach(panel => {\n (panel as HTMLElement).classList.remove('is-active');\n });\n (this.dom.resourcesMenu as HTMLElement).style.display = 'block';\n }\n requestAnimationFrame(() => {\n this.setupClickResourcesTimeline(isOpen);\n });\n (this.dom.resourcesTriggerBtn as HTMLElement).setAttribute('aria-expanded', String(isOpen));\n this.manageFocus(this.dom.resourcesMenu as HTMLElement, isOpen);\n }\n\n manageFocus(menu: HTMLElement, isOpen: boolean) {\n if (isOpen) {\n const firstFocusableElement = menu.querySelector(\n 'button, a, [tabindex]:not([tabindex=\"-1\"])'\n );\n firstFocusableElement?.focus();\n } else {\n const triggerButton = (this.dom.el as HTMLElement).querySelector(\n `[aria-controls=\"${menu.id}\"]`\n );\n triggerButton?.focus();\n }\n }\n\n handleKeyDown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n if ((this.dom.megaMenu as HTMLElement).classList.contains('open')) {\n this.toggleMegaMenu();\n }\n if ((this.dom.resourcesMenu as HTMLElement).classList.contains('open')) {\n this.toggleResources();\n }\n if ((this.dom.searchMenu as HTMLElement).classList.contains('open')) {\n this.toggleSearch();\n }\n }\n e.stopPropagation();\n }\n\n toggleMegaMenu() {\n gsap.set(this.dom.megaMenu, { y: window.innerHeight * -1 });\n const isOpen = (this.dom.megaMenu as HTMLElement).classList.toggle('open');\n\n document.body.classList.toggle('no-scroll', isOpen);\n if (isOpen) {\n (this.dom.megamenuPanels as NodeList).forEach(panel => {\n (panel as HTMLElement).classList.remove('is-active');\n });\n (this.dom.megaMenu as HTMLElement).style.display = 'block';\n }\n requestAnimationFrame(() => {\n this.setupClickMegaMenuTimeline(isOpen);\n });\n (this.dom.megaMenuTriggerBtn as HTMLElement).setAttribute('aria-expanded', String(isOpen));\n this.manageFocus(this.dom.megaMenu as HTMLElement, isOpen);\n }\n\n toggleSearch() {\n const isOpen = (this.dom.searchMenu as HTMLElement).classList.toggle('open');\n (this.dom.searchTriggerBtn as HTMLElement).setAttribute('aria-expanded', String(isOpen));\n this.dom.searchMenuForm = this.el.querySelector(\n '.search-menu__search-container form'\n );\n\n this.manageFocus(this.dom.searchMenu as HTMLElement, isOpen);\n }\n\n setupClickResourcesTimeline(isOpen: boolean) {\n const resourcesTimeline = gsap.timeline();\n\n if (isOpen) {\n resourcesTimeline\n .fromTo(\n this.dom.resourcesMenu,\n { y: isTabletLandscape() ? window.innerHeight * -1 : window.innerHeight },\n { y: 0, duration: prefersReducedMotion() ? 0 : 0.7, ease: 'power1.inOut' }\n )\n .fromTo(\n this.dom.resourcesMenuContent,\n { opacity: 0 },\n { opacity: 1, duration: prefersReducedMotion() ? 0 : 0.4, ease: 'power1.inOut' },\n '-=0.3'\n );\n } else {\n resourcesTimeline\n .fromTo(\n this.dom.resourcesMenu,\n { y: 0 },\n {\n y: isTabletLandscape() ? window.innerHeight * -1 : window.innerHeight,\n duration: prefersReducedMotion() ? 0 : 0.7,\n ease: 'power1.inOut',\n onComplete: () => {\n (this.dom.resourcesMenu as HTMLElement).style.display = 'none';\n }\n }\n )\n .fromTo(\n this.dom.resourcesMenuContent,\n { opacity: 1 },\n { opacity: 0, duration: prefersReducedMotion() ? 0 : 0.4, ease: 'power1.inOut' },\n '-=0.4'\n );\n }\n }\n\n setupClickMegaMenuTimeline(isOpen: boolean) {\n const megaMenuTimeline = gsap.timeline({\n onComplete: () => {\n if (!isOpen) {\n (this.dom.megamenuDecorator as HTMLElement)?.removeAttribute('style');\n (this.dom.megaMenuRightPanel as HTMLElement)?.removeAttribute('style');\n }\n }\n });\n\n if (isOpen) {\n megaMenuTimeline\n .fromTo(\n this.dom.megaMenu,\n { y: window.innerHeight * -1 },\n { y: 0, duration: prefersReducedMotion() ? 0 : 0.7, ease: 'power1.inOut' }\n )\n .fromTo(\n this.dom.megamenuContent,\n { opacity: 0 },\n { opacity: 1, duration: prefersReducedMotion() ? 0 : 0.4, ease: 'power1.inOut' },\n '-=0.3'\n );\n } else {\n megaMenuTimeline\n .fromTo(\n this.dom.megamenuContent,\n { opacity: 1 },\n { opacity: 0, duration: prefersReducedMotion() ? 0 : 0.4, ease: 'power1.inOut' }\n )\n .fromTo(\n this.dom.megaMenu,\n { y: 0 },\n {\n y: window.innerHeight * -1,\n duration: prefersReducedMotion() ? 0 : 0.7,\n ease: 'power1.inOut',\n onComplete: () => {\n (this.dom.megaMenu as HTMLElement).style.display = 'none';\n }\n },\n '-=0.4'\n );\n }\n }\n}\n\nexport default Header;\n"],"names":["Header","Component","el","__publicField","isDesktop","Accordion","item","e","searchInput","formAction","handleSearch","searchBtn","searchForm","searchValue","updateButtonState","inputValue","megaMenuUpdateButtonState","isTabletLandscape","_a","target","targetPanel","panel","gsap","prefersReducedMotion","isOpen","menu","firstFocusableElement","triggerButton","resourcesTimeline","megaMenuTimeline","_b"],"mappings":"+WAKA,MAAMA,UAAeC,CAAU,CAI7B,YAAYC,EAAiB,CAC3B,MAAMA,CAAE,EAJVC,EAAA,sBACAA,EAAA,6BAAmD,MAK5CC,MACH,KAAK,cAAgB,IAAIC,EAAU,KAAK,IAAI,mBAAmC,MAAM,EAEzF,CAEA,eAAgB,CACd,KAAK,IAAM,CACT,GAAI,KAAK,GACT,oBAAqB,KAAK,GAAG,cAA2B,wBAAwB,EAChF,0BAA2B,KAAK,GAAG,cACjC,qCACF,EACA,cAAe,KAAK,GAAG,cAA2B,iBAAiB,EACnE,kBAAmB,KAAK,GAAG,cAA2B,wBAAwB,EAC9E,mBAAoB,KAAK,GAAG,iBAA8B,6BAA6B,EACvF,oBAAqB,KAAK,GAAG,iBAA8B,6BAA6B,EACxF,mBAAoB,KAAK,GAAG,cAA2B,iCAAiC,EACxF,SAAU,KAAK,GAAG,cAA2B,YAAY,EACzD,mBAAoB,KAAK,GAAG,cAA2B,wBAAwB,EAC/E,iBAAkB,KAAK,GAAG,cAA2B,mBAAmB,EACxE,cAAe,KAAK,GAAG,iBAA8B,wBAAwB,EAC7E,eAAgB,KAAK,GAAG,iBAA8B,wBAAwB,EAC9E,eAAgB,KAAK,GAAG,iBAA8B,yBAAyB,EAC/E,iBAAkB,KAAK,GAAG,cAA2B,qBAAq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