{"version":3,"sources":["webpack:///./modules/Header.ts","webpack:///./modules/Navigation.ts"],"names":["__webpack_require__","r","__webpack_exports__","_Navigation__WEBPACK_IMPORTED_MODULE_0__","_helpers_helperFunctions__WEBPACK_IMPORTED_MODULE_1__","_helpers_DOMHelpers__WEBPACK_IMPORTED_MODULE_2__","moduleSelector","Header","element","_this","this","header","document","getElementById","sticky","offsetHeight","burgerMenu","querySelector","navRowWrapper","headerContainerHeight","parentElement","setup","window","addEventListener","stickyHeader","event","orientationAngle","screen","orientation","angle","html","innerHeight","Object","openHeaderMenu","innerWidth","openHeaderMenuScroll","setNavigationHeight","selector","Array","from","querySelectorAll","filter","node","dataset","moduleInitialized","forEach","prototype","pageYOffset","calcNavHeight","getAttribute","classList","add","style","height","remove","closeHeaderMenu","navHeight","flyouts","getElementsByClassName","key","undefined","Math","max","currentTarget","toggle","contains","body","prevent","closest","allow","_helpers_DOMHelpers__WEBPACK_IMPORTED_MODULE_0__","Navigation","isMobile","navigation","menuInUse","navRowInUse","globalFlyout","firstLevelList","secondLevelList","navRow","target","preventDefault","openSecondLevelNav","nextElementSibling","image","setAttribute","closeNavigation","flyoutLayers","layer","openThirdLevelNav","e","clientHeight","isActive","openNavigation","resetAllLevels","children","showLevel","levelItm","levelHeight","adjustFlyout","fadeInBody","fadeOutBody","item","maxHeight"],"mappings":"8FAAAA,EAAAC,EAAAC,GAAA,IAAAC,EAAAH,EAAA,IAAAI,EAAAJ,EAAA,IAAAK,EAAAL,EAAA,GAAMM,EAAiB,yBAOvBC,EAAA,WAcI,SAAAA,EAAmBC,GAAnB,IAAAC,EAAAC,KAAmBA,KAAAF,UACfE,KAAKC,OAASC,SAASC,eAAe,UACtCH,KAAKI,OAASJ,KAAKC,OAAOI,aAC1BL,KAAKM,WAA0BJ,SAASK,cAAc,gBACtDP,KAAKQ,cAA6BN,SAASK,cAAc,YACzDP,KAAKS,sBAAqCT,KAAKC,OAAOS,cAEtD,IAAIjB,EAAA,QAAWkB,MAAMf,GAErB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ACtC3E,KAAKoF,eAAepF,KAAKmE,eAAekB,UACnCD,eAAepF,KAAKoE,gBAAgBiB,UACpCI,eACAE,cAEE3F,MAGH6D,EAAAzB,UAAAgD,eAAR,SAAuBQ,GAEnB,OADAtE,OAAAsC,EAAA,EAAAtC,CAAoBsE,EAAM,oCACnB5F,MAGH6D,EAAAzB,UAAAkD,UAAR,SAAkBC,GAEd,OADAjE,OAAAsC,EAAA,EAAAtC,CAASiE,EAAU,oCACZvF,MAGH6D,EAAAzB,UAAAqD,aAAR,SAAqB9C,GAEjB,YAFiB,IAAAA,MAAA,GACjB3C,KAAKkE,aAAaxB,MAAMmD,UAAYlD,EAAS,KACtC3C,MAGH6D,EAAAzB,UAAAsD,WAAR,WAEI,OADApE,OAAAsC,EAAA,EAAAtC,CAASpB,SAASsD,KAAM,gBACjBxD,MAGH6D,EAAAzB,UAAAuD,YAAR,WAEI,OADArE,OAAAsC,EAAA,EAAAtC,CAAYpB,SAASsD,KAAM,gBACpBxD,MAEf6D,EAvKA","file":"./modules/Header.67d546db.js","sourcesContent":["const moduleSelector = '[data-module=\"Header\"]';\r\n\r\nimport Navigation from \"./Navigation\";\r\nimport { isIOS, IOSScroll } from \"../helpers/helperFunctions\";\r\nimport { addClass } from \"../helpers/DOMHelpers\";\r\n\r\n\r\nexport default class Header {\r\n    private header: HTMLElement;\r\n    private sticky: Number;\r\n    private burgerMenu: HTMLElement;\r\n    private navRowWrapper: HTMLElement;\r\n    private headerContainerHeight: HTMLElement;\r\n\r\n    static setup(selector: string = moduleSelector): void {\r\n        Array.from(document.querySelectorAll(selector)).filter((node: HTMLElement) => !node.dataset.moduleInitialized).forEach((element: HTMLElement) => {\r\n            new Header(element);\r\n            element.dataset.moduleInitialized = 'true';\r\n        });\r\n    }\r\n\r\n    constructor(public element: HTMLElement) {\r\n        this.header = document.getElementById(\"header\");\r\n        this.sticky = this.header.offsetHeight;\r\n        this.burgerMenu = <HTMLElement>document.querySelector(\".burger-menu\");\r\n        this.navRowWrapper = <HTMLElement>document.querySelector(\".nav-row\");\r\n        this.headerContainerHeight = <HTMLElement>this.header.parentElement;\r\n\r\n        new Navigation.setup(moduleSelector);\r\n\r\n        window.addEventListener('scroll',\r\n            () => {\r\n                this.stickyHeader();\r\n            });\r\n\r\n\r\n        window.addEventListener('orientationchange', (event) => {\r\n            // console.log(screen.orientation.angle);\r\n            const orientationAngle = screen.orientation.angle,\r\n                html = document.querySelector('html');\r\n\r\n            if (orientationAngle == 90) {\r\n                if (window.innerHeight <= 896) {\r\n                    addClass(html, 'fluid-width');\r\n                }\r\n            }\r\n        })\r\n\r\n        this.burgerMenu.addEventListener('click',\r\n            (event) => {\r\n                this.openHeaderMenu(event);\r\n\r\n                if (window.innerWidth <= 896) {\r\n                    this.openHeaderMenuScroll(event);\r\n                }\r\n            });\r\n        if (isIOS() && window.innerWidth <= 896) {\r\n            this.setNavigationHeight();\r\n        }\r\n    }\r\n\r\n    private stickyHeader(): void {\r\n        // console.log(this.navRowWrapper.getAttribute('data-open'));\r\n        if (window.pageYOffset > this.sticky && window.innerWidth > 896 || window.innerWidth < 896) {\r\n            if (window.innerHeight >= this.calcNavHeight() || this.navRowWrapper.getAttribute('data-open') !== 'true' ) {\r\n                this.header.classList.add(\"sticky\");\r\n                this.headerContainerHeight.style.height = this.sticky + 'px';\r\n            }\r\n        } else {\r\n            this.header.classList.remove(\"sticky\");\r\n            if (window.innerWidth >= 896 && window.innerHeight >= this.calcNavHeight()) {\r\n                this.closeHeaderMenu();\r\n            }\r\n        }\r\n    }\r\n\r\n    private calcNavHeight(): number {\r\n        var navHeight = 0;\r\n        var flyouts = document.getElementsByClassName('cw-flyout-content');\r\n        for (var key in flyouts) {\r\n            if ((<HTMLElement> flyouts[key]).offsetHeight !== undefined) {\r\n                navHeight = Math.max(navHeight, (<HTMLElement> flyouts[key]).offsetHeight);\r\n            }\r\n        }\r\n\r\n        return navHeight + this.header.offsetHeight;\r\n    }\r\n\r\n    private openHeaderMenu(event: Event): void {\r\n        const target: HTMLElement = <HTMLElement>event.currentTarget;\r\n        target.classList.toggle('open');\r\n        if (this.header.classList.contains(\"navigation-open\")) {\r\n            this.closeHeaderMenu();\r\n        } else {\r\n            this.header.classList.add(\"navigation-open\");\r\n            if (isIOS() && this.header.classList.contains(\"sticky\")) {\r\n                document.body.classList.add(\"sticky-active\")\r\n            }\r\n            IOSScroll.prevent();\r\n        }\r\n    }\r\n\r\n    private openHeaderMenuScroll(event: Event): void {\r\n        const target: HTMLElement = <HTMLElement>event.currentTarget;\r\n        target.closest('body').classList.toggle('overflow-hidden');\r\n    }\r\n\r\n    private closeHeaderMenu() {\r\n        this.burgerMenu.classList.remove('open');\r\n        this.header.classList.remove(\"navigation-open\");\r\n        if (document.body.classList.contains(\"sticky-active\")) {\r\n            document.body.classList.remove(\"sticky-active\")\r\n        }\r\n        IOSScroll.allow();\r\n    }\r\n\r\n    setNavigationHeight(): void {\r\n        if (isIOS()) {\r\n            this.navRowWrapper.style.height = (window.screen.height - 270) + 'px';    \r\n        } else {\r\n            this.navRowWrapper.style.height = 'calc(100vh - 150px)';\r\n        }\r\n    }\r\n}\r\n\r\nnew Header.setup();\r\n\r\n// Hot Module Replacement\r\nif (module.hot) {\r\n    let nodesCache: HMRNodes[] = Array.from(document.querySelectorAll(moduleSelector)).map((element: Node) => ({ nodeToReplace: element, nodeOrigin: element.cloneNode(true) }));\r\n\r\n    new Header.setup(moduleSelector);\r\n\r\n    module.hot.accept(() => {\r\n        new Header.setup(moduleSelector);\r\n    });\r\n    module.hot.dispose(() => {\r\n        nodesCache.forEach(({nodeToReplace, nodeOrigin}) => { nodeToReplace = nodeToReplace.parentElement.replaceChild(nodeOrigin.cloneNode(true), nodeToReplace)});\r\n    });\r\n} else {\r\n    new Header.setup(moduleSelector);\r\n}","const moduleSelector = '[data-module=\"Navigation\"]';\r\nimport { removeClassFromList, addClass, removeClass, hasClass } from '../helpers/DOMHelpers';\r\nimport { isTouch, isMobile } from '../helpers/helperFunctions';\r\n\r\nexport default class Navigation {\r\n    private navigation: HTMLElement;\r\n    private globalFlyout: HTMLElement;\r\n    private firstLevelList: HTMLElement;\r\n    private secondLevelList: HTMLElement;\r\n    private navRow: HTMLElement;\r\n    private isMobile = (window.innerWidth < 768);\r\n\r\n    static setup(selector: string = moduleSelector): void {\r\n        Array.from(document.querySelectorAll(selector)).filter((node: HTMLElement) => !node.dataset.moduleInitialized).forEach((element: HTMLElement) => {\r\n            new Navigation(element)\r\n            element.dataset.moduleInitialized = 'true';\r\n        });\r\n    }\r\n\r\n    constructor(public element: HTMLElement) {\r\n        this.navigation = <HTMLElement>this.element.querySelector('.cw-header-nav');\r\n\r\n        if (!this.navigation) return;\r\n\r\n        this.globalFlyout = <HTMLElement>this.navigation.querySelector('.cw-flyout__layer');\r\n        this.firstLevelList = <HTMLElement>this.navigation.querySelector('.cw-nav-first-level');\r\n        this.secondLevelList = <HTMLElement>this.navigation.querySelector('.cw-nav-second-level');\r\n        this.navRow = <HTMLElement>this.element.querySelector('.nav-row');\r\n\r\n        Array.from(document.querySelectorAll('.cw-nav-first-level__item > a')).forEach((element: HTMLSelectElement) => {\r\n            if (isMobile()) {\r\n                element.addEventListener('click', (event) => {\r\n                    const target: HTMLElement = <HTMLElement>event.target;\r\n                    if (hasClass(target, 'cw-nav-first-level__link')) {\r\n                        event.preventDefault();\r\n                        this.openSecondLevelNav(event);\r\n                    }\r\n                });\r\n            }\r\n            else if (isTouch()) {\r\n                element.addEventListener('touchend', (event) => {\r\n                    const target: HTMLElement = <HTMLElement>event.target;\r\n                    if (hasClass(target, 'cw-nav-first-level__link')) {\r\n                        event.preventDefault();\r\n                        this.openSecondLevelNav(event);\r\n                    }\r\n                });\r\n\r\n            } else {\r\n                element.addEventListener('click', (event) => {\r\n                    const target: HTMLElement = <HTMLElement>event.target;\r\n                    if (hasClass(target, 'cw-nav-first-level__link')) {\r\n                        event.preventDefault();\r\n                        this.openSecondLevelNav(event);\r\n                    }\r\n                });\r\n            }\r\n\r\n            //trigger lazy loading to prevent menu sizing problem on opening\r\n            if (element.nextElementSibling) {\r\n                element.nextElementSibling.querySelectorAll('img').forEach((image: HTMLImageElement) => {\r\n                    image.setAttribute('src', image.getAttribute('data-src'));\r\n                });\r\n            }\r\n        });\r\n\r\n        var menuInUse, navRowInUse;\r\n        this.navRow.addEventListener('mouseenter', (event) => { navRowInUse = true; });\r\n        this.navRow.addEventListener('mouseleave', (event) => {\r\n            navRowInUse = false;\r\n            if (!menuInUse) {\r\n                this.closeNavigation()\r\n            }\r\n        });\r\n\r\n        var flyoutLayers = this.navigation.getElementsByClassName('cw-flyout-content');\r\n        for (var key in flyoutLayers) {\r\n            var layer = <HTMLElement>flyoutLayers[key];\r\n            if (layer.offsetHeight !== undefined) {\r\n                layer.addEventListener('mouseenter', (event) => { menuInUse = true; });\r\n                layer.addEventListener('mouseleave', (event) => {\r\n                    menuInUse = false;\r\n                    if (!navRowInUse) {\r\n                        this.closeNavigation()\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        Array.from(document.querySelectorAll('.has-subitems')).forEach((element: HTMLElement) => {\r\n            element.addEventListener('click', (event) => this.openThirdLevelNav(event));\r\n        });\r\n    }\r\n\r\n    public openSecondLevelNav(e) {\r\n        const target = <HTMLElement>event.target,\r\n            height = target.nextElementSibling.clientHeight,\r\n            isActive = hasClass(target.parentElement, 'cw-nav-first-level__item--active'),\r\n            hrefValue = target.getAttribute(\"href\");\r\n\r\n        if (hrefValue === \"#\") {\r\n            e.preventDefault();\r\n        }\r\n\r\n        if (isActive && this.isMobile) {\r\n            this.closeNavigation();\r\n        } else {\r\n            this.openNavigation(target.parentElement, height);\r\n        }\r\n    }\r\n\r\n    public openThirdLevelNav(event) {\r\n        if (this.isMobile) {\r\n            event.preventDefault();\r\n            const currentTarget = <HTMLElement>event.currentTarget;\r\n            const target = <HTMLElement>event.target,\r\n                isActive = hasClass(target.parentElement, 'cw-nav-first-level__item--active');\r\n\r\n            if (isActive) {\r\n                currentTarget.parentElement.classList.remove('cw-nav-first-level__item--active');\r\n            } else {\r\n                this.resetAllLevels(this.secondLevelList.children)\r\n                    .showLevel(target.parentElement);\r\n            }\r\n        }\r\n    }\r\n\r\n    private openNavigation(levelItm: HTMLElement, levelHeight: number) {\r\n        this.navRow.setAttribute('data-open', 'true');\r\n        this.resetAllLevels(this.firstLevelList.children)\r\n            .showLevel(levelItm)\r\n            .adjustFlyout(levelHeight)\r\n            .fadeInBody();\r\n\r\n        return this;\r\n    }\r\n\r\n    private closeNavigation() {\r\n        this.navRow.setAttribute('data-open', 'false');\r\n        this.resetAllLevels(this.firstLevelList.children)\r\n            .resetAllLevels(this.secondLevelList.children)\r\n            .adjustFlyout()\r\n            .fadeOutBody();\r\n\r\n        return this;\r\n    }\r\n\r\n    private resetAllLevels(item) {\r\n        removeClassFromList(item, 'cw-nav-first-level__item--active');\r\n        return this;\r\n    }\r\n\r\n    private showLevel(levelItm: HTMLElement) {\r\n        addClass(levelItm, 'cw-nav-first-level__item--active');\r\n        return this;\r\n    }\r\n\r\n    private adjustFlyout(height: number = 0) {\r\n        this.globalFlyout.style.maxHeight = height + 'px';\r\n        return this;\r\n    }\r\n\r\n    private fadeInBody() {\r\n        addClass(document.body, 'cw-nav--open');\r\n        return this;\r\n    }\r\n\r\n    private fadeOutBody() {\r\n        removeClass(document.body, 'cw-nav--open');\r\n        return this;\r\n    }\r\n}\r\n"],"sourceRoot":""}