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B,EAAoBtC,SAASM,cAAc,2BAC9CgC,GACAA,EAAkBT,UAAUY,IAAI,eAClC,G","sources":["webpack://capgemini2020/./assets/js/header-lang-accessibility.js","webpack://capgemini2020/./assets/js/logoChanger.js","webpack://capgemini2020/./assets/js/header.js","webpack://capgemini2020/./assets/js/DOMObservers.js"],"sourcesContent":["/*\r\n$(document).ready(function() {\r\n$('.header-lang-inner .header-lang-top button, .header-lang-middle input, .lang-list ul a').each(function() {\r\n$(this).attr(\"tabindex\", \"-1\");\r\n});\r\n});\r\n\r\n$(\".header_lang_menu .header-lang-inner\").focus(function() {\r\n$('.header-lang-inner .header-lang-top button, .header-lang-middle input, .lang-list ul a').each(function() {\r\n$(this).attr(\"tabindex\", \"0\");\r\n});\r\n});\r\n*/\r\n\r\nexport const navigableElements = document.querySelectorAll('.header-lang-inner .header-lang-top button, .header-lang-middle input, .lang-list ul a');\r\n\r\nexport const headerLangMutationObserver = () => {\r\n\r\n /**\r\n * Get the header-lang element\r\n * @type {HTMLElement}\r\n */\r\n const headerLangMenu = document.querySelector('.header-lang');\r\n\r\n // Options for the observer (which mutations to observe)\r\n const classMutationConfig = { attributes: true, attributesFilter: ['class'] };\r\n\r\n const classMutationCallback = (mutationsList, observer) => {\r\n\r\n for(const mutation of mutationsList) {\r\n if (mutation.type === 'attributes') {\r\n const observingClassNames = ['active']\r\n if(observingClassNames.some(className => mutation.target.classList.contains(className))){\r\n // Tab Navigation enabled when active class is found\r\n navigableElements.forEach((element) => {\r\n element.setAttribute(\"tabindex\", \"0\");\r\n });\r\n }\r\n else {\r\n navigableElements.forEach((element) => {\r\n element.setAttribute(\"tabindex\", \"-1\");\r\n });\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Class mutation observer\r\n * @type {MutationObserver}\r\n */\r\n const observer = new MutationObserver(classMutationCallback);\r\n\r\n //Observe for class mutations\r\n observer.observe(headerLangMenu, classMutationConfig);\r\n\r\n}\r\n","/**\r\n * Change the logo color to blue or white by swaping the img src\r\n * @param logoColor\r\n */\r\nexport const changeCgLogoDesktop = (logoColor) => {\r\n\r\n /**\r\n * Initialize null logoImgEle\r\n * @type {HTMLElement}\r\n */\r\n let logoImgEle = null;\r\n\r\n /**\r\n * Get the headerBottom element\r\n * @type {HTMLElement}\r\n */\r\n const headerBottom = document.querySelector('.header-bottom');\r\n if(headerBottom) {\r\n /**\r\n * Get the logoImgEle\r\n * @type {HTMLImageElement}\r\n */\r\n logoImgEle = headerBottom.querySelector('.logo img');\r\n }\r\n\r\n if(logoImgEle && logoImgEle.dataset && logoImgEle.dataset.whiteLogoSrc && logoImgEle.dataset.blueLogoSrc) {\r\n\r\n switch (logoColor) {\r\n case 'white':\r\n logoImgEle.src = logoImgEle.dataset.whiteLogoSrc;\r\n return;\r\n case 'blue':\r\n logoImgEle.src = logoImgEle.dataset.blueLogoSrc;\r\n return;\r\n default:\r\n logoImgEle.src = logoImgEle.dataset.blueLogoSrc;\r\n }\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Change logo color for mobile\r\n * @param logoColor\r\n */\r\nexport const changeCgLogoMobile = (logoColor) => {\r\n\r\n /**\r\n * Initialize null logoImgEle\r\n * @type {HTMLElement}\r\n */\r\n let logoImgEle = null;\r\n\r\n /**\r\n * Get the headerBottom element\r\n * @type {HTMLElement}\r\n */\r\n const headerMobile = document.querySelector('.header-mobile');\r\n if(headerMobile) {\r\n /**\r\n * Get the logoImgEle\r\n * @type {HTMLImageElement}\r\n */\r\n logoImgEle = headerMobile.querySelector('.logo img');\r\n }\r\n\r\n if(logoImgEle && logoImgEle.dataset && logoImgEle.dataset.whiteLogoSrc && logoImgEle.dataset.blueLogoSrc) {\r\n\r\n switch (logoColor) {\r\n case 'white':\r\n logoImgEle.src = logoImgEle.dataset.whiteLogoSrc;\r\n return;\r\n case 'blue':\r\n logoImgEle.src = logoImgEle.dataset.blueLogoSrc;\r\n return;\r\n default:\r\n logoImgEle.src = logoImgEle.dataset.blueLogoSrc;\r\n }\r\n }\r\n};\r\n\r\nexport const changeCgGlobalLangIcon = (logoColor) => {\r\n\r\n /**\r\n * Get the headerBottom element\r\n * @type {HTMLElement}\r\n */\r\n const langIconEle = document.querySelector('.language-icon');\r\n\r\n if(langIconEle && langIconEle.dataset && langIconEle.dataset.whiteGlobalIconSrc && langIconEle.dataset.blackGlobalIconSrc) {\r\n\r\n switch (logoColor) {\r\n case 'white':\r\n langIconEle.src = langIconEle.dataset.whiteGlobalIconSrc;\r\n return;\r\n case 'black':\r\n langIconEle.src = langIconEle.dataset.blackGlobalIconSrc;\r\n return;\r\n default:\r\n langIconEle.src = langIconEle.dataset.blackGlobalIconSrc;\r\n }\r\n }\r\n};\r\n","import {navigableElements, headerLangMutationObserver} from './header-lang-accessibility';\r\n\r\nimport {headerMobileMutationObserver, headerMutationObserver, menuOpenMutationObserver} from \"./DOMObservers\";\r\n// import {reAlignCookieConsentBasedOnGeoRibbon} from \"./geoRedirectCookieConsent\";\r\n\r\n$( document ).ready( function () {\r\n\r\n\t/**\r\n\t * Run the header mutation observer and run it always.\r\n\t */\r\n\theaderMutationObserver();\r\n\theaderMobileMutationObserver();\r\n\tmenuOpenMutationObserver();\r\n\t// reAlignCookieConsentBasedOnGeoRibbon();\r\n\r\n // Accessiblity Issue fix for Country Site dropdown - bug #783819\r\n headerLangMutationObserver();\r\n\r\n\tconst appHeight = () => document.documentElement.style.setProperty( '--app-height', `${window.innerHeight}px` )\r\n\tconst headerMobileHeight = () => {\r\n\t\tconst headerMobileEle = document.querySelector('.header-mobile');\r\n\t\tif(headerMobileEle){\r\n\t\t\tdocument.documentElement.style.setProperty( '--header-mobile-height', `${headerMobileEle.offsetHeight}px` )\r\n\t\t}\r\n\t}\r\n\tconst headerDesktopHeight = () => {\r\n\t\tconst headerTopbarEle = document.querySelector('.header-topbar');\r\n\t\tif(headerTopbarEle){\r\n\t\t\tdocument.documentElement.style.setProperty( '--header-topbar-height', `${headerTopbarEle.offsetHeight}px` )\r\n\t\t}\r\n\t}\r\n\r\n\tconst adminBarHeight = () => {\r\n\t\tconst adminBarEle = document.querySelector('#wpadminbar');\r\n\t\tif(adminBarEle) {\r\n\t\t\tdocument.documentElement.style.setProperty( '--admin-bar-height', `${adminBarEle.offsetHeight}px` );\r\n\t\t} else {\r\n\t\t\tdocument.documentElement.style.setProperty( '--admin-bar-height', `0px` )\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the height of the breadcrumb\r\n\t */\r\n\tconst subNavWrapperHeight = () => {\r\n\t\tconst subNavEle = document.querySelector('.sub-navigation-wrapper');\r\n\t\tif(subNavEle) {\r\n\t\t\tdocument.documentElement.style.setProperty( '--sub-navigation-wrapper-height', `${subNavEle.offsetHeight}px` );\r\n\t\t} else {\r\n\t\t\tdocument.documentElement.style.setProperty( '--sub-navigation-wrapper-height', `0px` )\r\n\t\t}\r\n\t}\r\n\r\n\twindow.addEventListener( 'resize', () => {\r\n\t\tappHeight();\r\n\t\tsubNavWrapperHeight();\r\n\t\theaderDesktopHeight();\r\n\t\tadminBarHeight();\r\n\t\theaderMobileHeight();\r\n\t})\r\n\tappHeight();\r\n\tsubNavWrapperHeight();\r\n\theaderMobileHeight();\r\n\theaderDesktopHeight();\r\n\tadminBarHeight();\r\n\r\n\r\n\t$('.header-topbar').hover(function(){\r\n\t\t$('.header-topbar').addClass('hover')\r\n\t\t$('.dark-gradient').addClass('hover')\r\n\t\t$('.light-gradient').addClass('hover')\r\n\t}, function(){\r\n\t\t$('.header-topbar').removeClass('hover')\r\n\t\t$('.dark-gradient').removeClass('hover')\r\n\t\t$('.light-gradient').removeClass('hover')\r\n\t})\r\n\r\n\t$('.light-gradient').hover(function(){\r\n\t\t$('.header-topbar').addClass('hover')\r\n\t}, function(){\r\n\t\t$('.header-topbar').removeClass('hover')\r\n\t})\r\n\r\n\t$('.dark-gradient').hover(function(){\r\n\t\t$('.header-topbar').addClass('hover')\r\n\t\t}, function(){\r\n\t\t$('.header-topbar').removeClass('hover')\r\n\t })\r\n\r\n\r\n\tlet cgTopMenuItems = $( '.header-topbar ul.menu > li' );\r\n\tlet cgSubNavigation = $( '.sub-navigation' );\r\n\tlet cgBreadcumbShadow = cgSubNavigation.css( 'box-shadow' );\r\n\r\n\tcgTopMenuItems.hover( function () {\r\n\r\n\t\tcgSubNavigation.css( 'box-shadow', 'none' );\r\n\t} );\r\n\r\n\tcgTopMenuItems.mouseleave( function () {\r\n\r\n\t\tcgSubNavigation.css( 'box-shadow', cgBreadcumbShadow );\r\n\r\n\t} );\r\n\r\n\t// --- Mega-menu (desktop) ---\r\n\t$('.header-topbar-wrapper').hover(function(){\r\n\t\t$('.header-topbar').addClass('hover')\r\n\t\t// setTimeout(function(){\r\n\t\t// if ($('.header-nav li:hover').length > 0) {\r\n\t\t// $('.body-overlay').fadeIn(100)\r\n\t\t// }\r\n\t\t// }, 200)\r\n\t}, function(){\r\n\t\t$('.header-topbar').removeClass('hover');\r\n\t\tconst menuSubmenu = $('.header-bottom .header-nav li .menu-submenu')\r\n\t\tif(menuSubmenu) {\r\n\t\t\tmenuSubmenu.removeClass('menu-open');\r\n\t\t\tmenuSubmenu.attr('aria-expanded',false);\r\n\t\t}\r\n\t\t$(\".header-bottom .header-nav li .menu-arrow-down\").attr(\"aria-expanded\", \"false\");\r\n\t\t// setTimeout(function(){\r\n\t\t// if ($('.header-nav li:hover').length <= 0) {\r\n\t\t// $('.body-overlay').fadeOut(100, function(){\r\n\t\t// $('.header-topbar').removeClass('hover')\r\n\t\t// })\r\n\t\t// }\r\n\t\t// }, 200)\r\n\t});\r\n\r\n\t/**\r\n\t *\r\n\t * @param {Event} e\r\n\t * @param {Boolean} hide\r\n\t */\r\n\tconst toggleSubMenu = (e,hide = false) => {\r\n\t\t/**\r\n\t\t * Get the clicked target\r\n\t\t * @type {HTMLButtonElement}\r\n\t\t */\r\n\t\tconst clickedButton = e.target;\r\n\r\n\t\t/**\r\n\t\t *\r\n\t\t * @type {HTMLElement}\r\n\t\t */\r\n\t\tconst parentLi = clickedButton.parentElement;\r\n\r\n\t\t/**\r\n\t\t * Get the submenu\r\n\t\t * @type {HTMLElement}\r\n\t\t */\r\n\t\tconst subMenu = parentLi ? parentLi.querySelector('.menu-submenu') : null;\r\n\r\n\t\tif(subMenu && subMenu.classList.contains('menu-open')){\r\n\t\t\tsubMenu.classList.remove('menu-open');\r\n\t\t\tsubMenu.ariaExpanded = false;\r\n\t\t\tclickedButton.ariaExpanded = false;\r\n\t\t} else {\r\n\t\t\tsubMenu.classList.add('menu-open');\r\n\t\t\tsubMenu.ariaExpanded = true;\r\n\t\t\tclickedButton.ariaExpanded = true;\r\n\t\t}\r\n\t}\r\n\r\n\tconst headerTopbarNode = document.querySelector('.header-topbar');\r\n\r\n\tconst menuArrowDownNode = headerTopbarNode ? headerTopbarNode.querySelectorAll('.menu-arrow-down') : [];\r\n\tmenuArrowDownNode.forEach((menuArrowDownItem) => {\r\n\t\tmenuArrowDownItem.addEventListener('click', toggleSubMenu )\r\n\t})\r\n\r\n\tconst menuNavLiNodes = headerTopbarNode.querySelectorAll('.header-bottom .header-nav li');\r\n\r\n\tmenuNavLiNodes.forEach((menuLiEle) => {\r\n\t\tmenuLiEle.addEventListener('mouseenter', (e) => {\r\n\t\t\tconst subMenu = e.currentTarget.querySelector('.menu-submenu');\r\n\t\t\tif(subMenu) {\r\n\t\t\t\tsubMenu.classList.add('menu-open');\r\n\t\t\t\tsubMenu.ariaExpanded = true;\r\n\t\t\t}\r\n\t\t})\r\n\t\tmenuLiEle.addEventListener('mouseleave', (e) => {\r\n\t\t\tconst subMenu = e.currentTarget.querySelector('.menu-submenu');\r\n\t\t\tif(subMenu) {\r\n\t\t\t\tsubMenu.classList.remove('menu-open');\r\n\t\t\t\tsubMenu.ariaExpanded = false;\r\n\t\t\t}\r\n\t\t})\r\n\t})\r\n\r\n\r\n\r\n\t$(\".menu>li>a\").addClass(\"menu-acc\");\r\n\t$(\".menu-acc\").focus(function(e) {\r\n\t\tif($( \".menu-submenu\" ).hasClass( \"menu-open\" )){\r\n\t\t\t$('.menu-submenu').removeClass(\"menu-open\");\r\n\t\t\t$(\".menu-arrow-down\").attr(\"aria-expanded\", \"false\");\r\n\t\t}\r\n\t});\r\n\r\n\tconst closeOpenItems = () => {\r\n\t\tconst subMenus = headerTopbarNode ? headerTopbarNode.querySelectorAll('.menu-submenu'): [];\r\n\t\tsubMenus.forEach((el) => {\r\n\t\t\tif(el.classList.contains('menu-open')){\r\n\t\t\t\tel.classList.remove('menu-open');\r\n\t\t\t\tel.ariaExpanded = false;\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\tdocument.addEventListener('keydown', (e) => {\r\n\t\t//e.keyCode is deprecated so use with e.code\r\n\t\tif(e.code === 'Escape' || e.keyCode === 27) {\r\n\t\t\tcloseOpenItems();\r\n\t\t}\r\n\t})\r\n\r\n\r\n //const navigableElements = document.querySelectorAll('.header-lang-inner .header-lang-top button, .header-lang-middle input, .lang-list ul a');\r\n navigableElements.forEach((element) => {\r\n element.setAttribute(\"tabindex\", \"-1\");\r\n });\r\n\r\n\r\n\r\n} );\r\n\r\n// --- Mobile menu (mobile) ---\r\n\r\n// Open/Close navigation - Mobile Menu will not closed until user clicks on close icon.\r\n\r\n$( '.mobile-nav-button' ).click( function () {\r\n\r\n\tvar _this = $( this );\r\n\r\n\t// Sub navigation has the same z-index - it should be changed before sliding down\r\n\tif ( ! _this.hasClass( 'opened' ) ) {\r\n\t\t$( '.header-mobile, .header-mobile-bar' ).css( 'z-index', 105 );\r\n\t} else {\r\n\t\t$( '.header-mobile, .header-mobile-bar' ).css( 'z-index', 103 );\r\n\t}\r\n\t// If header search is opened - close it\r\n\tif ( $( '.header-search' ).hasClass( 'active' ) ) {\r\n\t\t$( '.mobile-search-button' ).click();\r\n\t}\r\n\r\n\t_this.toggleClass( 'opened' );\r\n\r\n\tconst headerMobileBar = $('.header-mobile-bar');\r\n\r\n\theaderMobileBar.addClass( 'opened' );\r\n\r\n\t$( '.mobile-nav' ).slideToggle(\r\n\t\t// After sliding up, change the z-index so the sub navigation shadow is visible\r\n\t\tfunction () {\r\n\t\t\tif ( ! _this.hasClass( 'opened' ) && ! $('.header-search').hasClass('active') ) {\r\n\t\t\t\t$( '.header-mobile' ).css( 'z-index', 103 );\r\n\t\t\t\theaderMobileBar.removeClass('opened');\r\n\t\t\t}\r\n\t\t}\r\n\t)\r\n\r\n\t$( 'body' ).toggleClass( 'nooverflow' );\r\n\r\n\t$( '.body-overlay' ).fadeToggle();\r\n} );\r\n\r\n// Show submenu (slide to the right)\r\n\r\n$( '.mobile-menu .menu-parent > a' ).click( function ( e ) {\r\n\te.preventDefault()\r\n\tvar mySubmenu = $( this ).parent().find( '> .menu-submenu' )\r\n\tmySubmenu.show()\r\n\tvar newLeft = parseInt( $( '.mobile-menu' ).css( 'left' ) ) - mySubmenu.position().left\r\n\t$( '.mobile-menu' ).css( 'left', newLeft )\r\n} )\r\n\r\n// Hide submenu (slide to the left)\r\n\r\n$( 'button.menu-submenu-back, li.menu-submenu-back a' ).click( function ( e ) {\r\n\te.preventDefault()\r\n\tvar mySubmenu = $( this ).parents( '.menu-submenu' ).first(),\r\n\t\tnewSubmenu\r\n\tif ( $( this ).parent().hasClass( 'menu-submenu-title-wrapper' ) ) {\r\n\t\tnewSubmenu = $( this ).parents( '.menu-l0' )\r\n\t} else {\r\n\t\tnewSubmenu = $( this ).parents( '.menu-l1' )\r\n\t}\r\n\tvar newLeft = parseInt( $( '.mobile-menu' ).css( 'left' ) ) + newSubmenu.width()\r\n\t$( '.mobile-menu' ).css( 'left', newLeft )\r\n\tsetTimeout( function () {\r\n\t\tmySubmenu.hide()\r\n\t}, 500 )\r\n} )\r\n\r\n// Sub-navigation mobile button\r\n\r\n$( '.subnav-mobile-button' ).click( function ( e ) {\r\n\te.preventDefault()\r\n\t$( this ).toggleClass( 'opened' )\r\n\t$( this ).parent().find( '> ul' ).slideToggle()\r\n} )\r\n\r\n// --- Resizing function for menus ---\r\n\r\nvar myScreenSize = getScreenSize()\r\n\r\nfunction getScreenSize() {\r\n\tif ( $( window ).width() > 767 ) {\r\n\t\treturn 'M'\r\n\t} else {\r\n\t\treturn 'S'\r\n\t}\r\n}\r\n\r\n// Remove all classes and styles to hide menus when we change screen type\r\n\r\n$( window ).resize( lodash.debounce(\r\n\tfunction () {\r\n\t\tvar newSize = getScreenSize()\r\n\r\n\t\tif ( newSize != myScreenSize ) {\r\n\t\t\t$( '.body-overlay, .mobile-nav, .mobile-menu, .menu-submenu, .menu-submenu2, .sub-navigation > ul, .sub-navigation .menu-parent nav' ).attr( 'style', '' )\r\n\t\t\t$( 'body' ).removeClass( 'nooverflow' )\r\n\t\t\t$( '.header-topbar-wrapper .header-nav a, .header-mobile-bar, .mobile-nav-button, .sub-navigation .menu-parent, .subnav-mobile-button' ).removeClass( 'opened' )\r\n\t\t\t$( '.menu-parent' ).removeClass( 'active' )\r\n\t\t}\r\n\r\n\t\tmyScreenSize = getScreenSize()\r\n\t}, 100\r\n) )\r\n\r\n// --- Search menu ---\r\n\r\n// Open search menu\r\n\r\n$( '.header-search-open' ).click( function () {\r\n\tif ( $( '.mobile-nav' ).is( ':visible' ) ) {\r\n\t\t$( '.mobile-nav-button' ).click()\r\n\t}\r\n\t$( '.header-search, .mobile-search-button' ).addClass( 'active' );\r\n\t$( '.header-mobile-bar' ).addClass( 'opened' )\r\n\t$( '.header-mobile, .header-mobile-bar' ).css( 'z-index', 104 )\r\n\t$( 'body' ).addClass( 'nooverflow' )\r\n\t$( '.body-overlay2' ).fadeIn()\r\n\r\n\tconst searchFormInput = document.querySelector('#searchform #keyword');\r\n\tif(searchFormInput){\r\n\t\tsearchFormInput.focus()\r\n\t}\r\n\r\n\r\n\t//var focusableElements = $('.header-search.active').find('input, button, a');\r\n\r\n\tvar focusableElements = $('.header-search.active').find('input, button, a').filter(':visible');\r\n\tvar firstFocusableElement = focusableElements.first();\r\n\tvar lastFocusableElement = focusableElements.last();\r\n\t// Function to trap focus within the header search div\r\n\tfunction trapFocus(e) {\r\n\r\n\t\tif ($('.header-search').hasClass('active')) {\r\n\r\n\t\t\tvar key = e.which || e.keyCode;\r\n\r\n\t\t\tif (key === 9) { // Tab key\r\n\r\n\t\t\t\tif ($('.header-search-results').css('display') === 'block') {\r\n\r\n\t\t\t\t\tvar analyticsCardTitle = $('.header-search-results-bottom .analytics-card-title:visible');\r\n\r\n\t\t\t\t\tif (analyticsCardTitle.length > 0) {\r\n\r\n\t\t\t\t\t\tlastFocusableElement = analyticsCardTitle;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (e.shiftKey) { // Shift + Tab\r\n\r\n\t\t\t\t\tif ($(document.activeElement).is(firstFocusableElement)) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tlastFocusableElement.focus();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else { // Tab\r\n\r\n\t\t\t\t\tif ($(document.activeElement).is(lastFocusableElement)) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tfirstFocusableElement.focus();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Attach the keydown event listener to the document to trap focus within the header search div\r\n\t$(document).on('keydown', trapFocus);\r\n\r\n} )\r\n\r\n\r\n\r\n// Close Search on Esp key\r\n\r\n$( document ).keyup( function ( e ) {\r\n\tif ( e.which == 27 ) {\r\n\t\t$( \".header-search\" ).removeClass( 'active' );\r\n\t\t$( 'body' ).removeClass( 'nooverflow' );\r\n\t\t$( '.body-overlay2' ).fadeOut();\r\n\t}\r\n} );\r\n\r\n// Close search menu\r\n\r\n$( '.header-search-close, .body-overlay2' ).click( function ( e ) {\r\n\te.preventDefault()\r\n\t$( '.header-search, .mobile-search-button' ).removeClass( 'active' );\r\n\t$( '.header-mobile-bar' ).removeClass( 'opened' )\r\n\t$( '.header-mobile, .header-mobile-bar' ).css( 'z-index', 103 )\r\n\t$( '.body-overlay2' ).fadeOut()\r\n\t$( \"div.demo\" ).scrollTop( 300 );\r\n\tif ( !$( '.mobile-nav' ).is( ':visible' ) ) {\r\n\t\t$( 'body' ).removeClass( 'nooverflow' )\r\n\t}\r\n} )\r\n\r\n// Show results\r\n\r\nfunction showSearchResults() {\r\n\t$( '.header-search-bottom' ).hide()\r\n\t$( '.header-search-results' ).show()\r\n}\r\n\r\n$( '.header-search .form--oneliner input' ).on( 'keyup', function () {\r\n\tshowSearchResults()\r\n} )\r\n\r\n\r\n// Click search button\r\n\r\n$( '.header-search input[type=\"submit\"]' ).click( function ( e ) {\r\n\te.preventDefault()\r\n\tshowSearchResults()\r\n} )\r\n\r\n// --- Lang menu ---\r\n\r\n// Open lang menu\r\n\r\n$( '.header-lang-open' ).click( function () {\r\n\t$( '.header-lang' ).addClass( 'active' )\r\n\t$( 'body' ).addClass( 'nooverflow' )\r\n\t$( '.body-overlay-on-lang' ).fadeIn()\r\n\tlet cgSubNavigationWrapper = $( '.sub-navigation-wrapper' );\r\n\r\n\tif ( cgSubNavigationWrapper.length > 0 ) {\r\n\t\tcgSubNavigationWrapper.addClass('below-header')\r\n\t}\r\n\r\n\t// for focus trapping\r\n\tconst searchFormInput = ($('.mobile-nav').css('display') == 'none') ? document.querySelector('.header_lang_menu #search-location-input') : document.querySelector('#search-location-input_mobile');\r\n\tif (searchFormInput) {\r\n\t\tsearchFormInput.focus();\r\n\t}\r\n\tvar langMenu = ($('.mobile-nav').css('display') == 'none') ? $('.header_lang_menu') : $('.header_lang_menu_mobile');\r\n\tvar focusableElements = langMenu.find('a, button, input');\r\n\tvar firstFocusableElement = focusableElements.first();\t\r\n\tvar lastFocusableElement = focusableElements.last();\r\n\tfunction trapFocus2(e) {\r\n\r\n\t\tif ($('.header_lang_menu').hasClass('active')) {\r\n\r\n\t\t\tvar key = e.which || e.keyCode;\r\n\r\n\t\t\tif (key === 9) { // Tab key\r\n\r\n\t\t\t\tif (e.shiftKey) { // Shift + Tab\r\n\r\n\t\t\t\t\tif ($(document.activeElement).is(firstFocusableElement)) {\r\n\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tlastFocusableElement.focus();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else { // Tab\r\n\r\n\t\t\t\t\tif ($(document.activeElement).is(lastFocusableElement)) {\r\n\r\n\t\t\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\t\t\tfirstFocusableElement.focus();\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t}\r\n\t}\r\n\t$(document).on('keydown', trapFocus2);\r\n\t// focus trapping\r\n\r\n} )\r\n\r\n// Close lang menu\r\n\r\n$( '.header-lang-close, .body-overlay-on-lang' ).click( function () {\r\n\t$( '.header-lang' ).removeClass( 'active' )\r\n\t$( '.header-topbar' ).removeClass( 'hover' )\r\n\t$( '.body-overlay-on-lang' ).fadeOut()\r\n\tif ( !$( '.mobile-nav' ).is( ':visible' ) ) {\r\n\t\t$( 'body' ).removeClass( 'nooverflow' )\r\n\t}\r\n\tlet cgSubNavigationWrapper = $( '.sub-navigation-wrapper' );\r\n\r\n\tif ( cgSubNavigationWrapper.length > 0 ) {\r\n\t\tcgSubNavigationWrapper.removeClass('below-header')\r\n\t}\r\n\r\n\tif ($('.logo').eq(1).is(':visible')) {\r\n\r\n\t\t$('.logo').eq(1).focus();\r\n\t} else {\r\n\t\t$('.logo').eq(0).focus();\r\n\t}\r\n\t$('.header-topbar-homepage').addClass('hover');\r\n\r\n} )\r\n\r\n// Choose language\r\n\r\n$( '.lang-list li button' ).click( function () {\r\n\t$( '.lang-list li' ).removeClass( 'active' )\r\n\t$( this ).parent().addClass( 'active' )\r\n\t$( '.lang-current' ).empty().text( $( this ).text() )\r\n\t$( '.header-lang-close' ).click()\r\n} )\r\n\r\n// Get width for lang list (must keep grid columns)\r\n\r\n// function langMenuResizer() {\r\n// \tif ( $( window ).width() > 767 ) {\r\n// \t\t$( '.header-lang-middle, .lang-list ul' ).width( $( '.container' ).width() / 3 )\r\n// \t} else {\r\n// \t\t$( '.header-lang-middle, .lang-list ul' ).width( '100%' )\r\n// \t}\r\n// }\r\n\r\n// $( window ).resize( lodash.debounce(\r\n// \tfunction () {\r\n// \t\tlangMenuResizer()\r\n// \t}, 100 ) )\r\n//\r\n// langMenuResizer()\r\n\r\nfunction MenuWidthCalc() {\r\n\tif ( Math.round( window.devicePixelRatio * 100 ) == 150 ) {\r\n\t\t$( \".advertImageWrapper\" ).addClass( 'advertImageWrapper150 ' );\r\n\t}\r\n\tif ( $( window ).width() > 767 ) {\r\n\t\t$( \".header-topbar-wrapper .menu-l2\" ).each( function () {\r\n\t\t\t// Test if the div element is empty\r\n\r\n\t\t\tlet childElementCount = this.children.length;\r\n\t\t\tif ( childElementCount > 9 ) {\r\n\t\t\t\t$( this ).addClass( 'menu-l2-large ' + childElementCount );\r\n\t\t\t} else {\r\n\t\t\t\tlet largeTxtArray = [];\r\n\t\t\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\r\n\t\t\t\t\tif ( (\r\n\t\t\t\t\t\tMath.round( window.devicePixelRatio * 100 ) == 100\r\n\t\t\t\t\t) ) {\r\n\t\t\t\t\t\tif ( this.children[i].innerText.length > 39 ) {\r\n\t\t\t\t\t\t\tlargeTxtArray.push( this.children[i] )\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ( Math.round( window.devicePixelRatio * 100 ) == 110 ) {\r\n\t\t\t\t\t\tif ( this.children[i].innerText.length > 34 ) {\r\n\t\t\t\t\t\t\tlargeTxtArray.push( this.children[i] )\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ( (\r\n\t\t\t\t\t\t Math.round( window.devicePixelRatio * 100 ) == 125\r\n\t\t\t\t\t ) || Math.round( window.devicePixelRatio * 100 ) == 150 ) {\r\n\t\t\t\t\t\tif ( this.children[i].innerText.length > 27 ) {\r\n\t\t\t\t\t\t\tlargeTxtArray.push( this.children[i] )\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif ( this.children.length === 9 && largeTxtArray.length >= 1 ) {\r\n\t\t\t\t\t$( this ).addClass( 'menu-l2-large ' + childElementCount );\r\n\t\t\t\t\tlargeTxtArray = [];\r\n\t\t\t\t} else if ( this.children.length === 8 && largeTxtArray.length > 2 ) {\r\n\t\t\t\t\t$( this ).addClass( 'menu-l2-large ' + childElementCount );\r\n\t\t\t\t\tlargeTxtArray = [];\r\n\t\t\t\t} else if ( this.children.length === 7 && largeTxtArray.length > 4 ) {\r\n\t\t\t\t\t$( this ).addClass( 'menu-l2-large ' + childElementCount );\r\n\t\t\t\t\tlargeTxtArray = [];\r\n\t\t\t\t} else if ( this.children.length === 6 && largeTxtArray.length > 5 ) {\r\n\t\t\t\t\t$( this ).addClass( 'menu-l2-large ' + childElementCount );\r\n\t\t\t\t\tlargeTxtArray = [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$( this ).addClass( 'menu-l2-normal ' + childElementCount );\r\n\t\t\t\t\tlargeTxtArray = [];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\t}\r\n}\r\n\r\nMenuWidthCalc()\r\n\r\n// --- Subpage topbar ---\r\n\r\n\r\n\r\n// --- Fixed topbar (on scroll down) ---\r\nfunction fixedTopbar() {\r\n\r\n\tlet subNav = $( '.sub-navigation' );\r\n\r\n\tif ( subNav.length <= 0 ) {\r\n\r\n\t\tlet headerTop = $( '.header-topbar' );\r\n\r\n\t\tif ( $( window ).scrollTop() > 1 ) {\r\n\r\n\t\t\theaderTop.addClass( 'fixed' );\r\n\r\n\t\t} else {\r\n\r\n\t\t\theaderTop.removeClass( 'fixed' );\r\n\r\n\t\t}\r\n\t} else {\r\n\r\n\t\tif ( $( window ).width() > 768 ) {\r\n\r\n\t\t\tlet subNavTop = $( '.sub-navigation-wrapper' ).offset().top;\r\n\r\n\t\t\tlet cgAdminBar = $( '#wpadminbar' );\r\n\r\n\t\t\tlet adminBarHeight = 0;\r\n\r\n\t\t\tif ( cgAdminBar.length > 0 ) {\r\n\r\n\t\t\t\tadminBarHeight = cgAdminBar.outerHeight();\r\n\t\t\t}\r\n\r\n\t\t\tsubNavTop -= adminBarHeight;\r\n\r\n\t\t\tif ( $( window ).scrollTop() > subNavTop ) {\r\n\r\n\t\t\t\tsubNav.addClass( 'fixed' );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tsubNav.removeClass( 'fixed' );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n $(window).resize(lodash.debounce(\r\n \tfunction(){\r\n fixedTopbar();\r\n }, 100 ) );\r\n\r\n $(window).scroll(function() {\r\n fixedTopbar()\r\n })\r\n fixedTopbar()\r\n\r\n\r\n\r\n// --- Mobile menu (mobile) ---\r\n// Open/Close navigation - Mobile Menu will not closed until user clicks on close icon.\r\n\r\n// Keep topbar-wrapper size when topbar is fixed\r\n\r\nfunction topbarResizer() {\r\n\r\n\t// Do not affect main page at all\r\n\tif ( ! $( 'body' ).hasClass( 'body--home' ) ) {\r\n\t\tvar wasFixed = 0,\r\n\t\t\ttime = 0\r\n\r\n\t\tif ( $( '.header-topbar' ).hasClass( 'fixed' ) ) {\r\n\t\t\twasFixed = 1;\r\n\t\t\t$( '.header-topbar' ).removeClass( 'fixed' );\r\n\t\t\ttime = 300;\r\n\t\t}\r\n\r\n\t\t// let cgSubNavigationWrapper = $( '.sub-navigation-wrapper' );\r\n\r\n\t\t// if ( cgSubNavigationWrapper.length > 0 ) {\r\n\t\t//\r\n\t\t// \tlet topSpacing = cgSubNavigationWrapper.innerHeight() / 2;\r\n\t\t//\r\n\t\t// \tlet headerTopBarHeight = $( '.header-topbar' ).outerHeight();\r\n\t\t//\r\n\t\t// \tlet cgAdminBar = $( '#wpadminbar' );\r\n\t\t//\r\n\t\t// \tlet adminBarHeight = 0;\r\n\t\t//\r\n\t\t// \tif ( cgAdminBar.length > 0 ) {\r\n\t\t//\r\n\t\t// \t\tadminBarHeight = cgAdminBar.outerHeight();\r\n\t\t// \t}\r\n\t\t//\r\n\t\t// \tsetTimeout( function () {\r\n\t\t//\r\n\t\t// \t\t// Main pages other than home: breadcrumbs are affected.\r\n\t\t// \t\tif ( $( 'body' ).hasClass( 'body--main' ) ) {\r\n\t\t//\r\n\t\t// \t\t\tlet windowWidth = $( window ).width();\r\n\t\t//\r\n\t\t// \t\t\tif ( windowWidth > 1200 ) {\r\n\t\t//\r\n\t\t// \t\t\t\tcgSubNavigationWrapper.css( 'top', headerTopBarHeight + adminBarHeight );\r\n\t\t//\r\n\t\t// \t\t\t} else {\r\n\t\t//\r\n\t\t// \t\t\t\tlet headerMobile = $( '.header-mobile-bar' );\r\n\t\t//\r\n\t\t// \t\t\t\tif ( headerMobile.length > 0 ) {\r\n\t\t//\r\n\t\t// \t\t\t\t\tcgSubNavigationWrapper.css( 'top', ( headerMobile.innerHeight() - topSpacing ) + adminBarHeight );\r\n\t\t// \t\t\t\t}\r\n\t\t// \t\t\t}\r\n\t\t// \t\t} else {\r\n\t\t//\r\n\t\t// \t\t\t$( '.header-topbar-wrapper' ).height( $( '.header-topbar' ).outerHeight() + adminBarHeight );\r\n\t\t// \t\t}\r\n\t\t//\r\n\t\t// \t\tif ( wasFixed ) {\r\n\t\t// \t\t\t$( '.header-topbar' ).addClass( 'fixed' );\r\n\t\t// \t\t}\r\n\t\t// \t}, time );\r\n\t\t// }\r\n\t}\r\n}\r\n\r\n$( document ).ready( function () {\r\n\t$(window).resize( lodash.debounce(function () {\r\n\t\ttopbarResizer();\r\n\t}, 100));\r\n\ttopbarResizer();\r\n} );\r\n\r\n//Breadcrum will hide on click\r\n\r\nconst headerTopBarNode = document.querySelector('.header-topbar');\r\nheaderTopBarNode.addEventListener('click', () => {\r\n const subNavigationNode = document.querySelector('.sub-navigation-wrapper');\r\n if(subNavigationNode){\r\n subNavigationNode.classList.add('below-header');\r\n }\r\n})","/**\r\n * Mutation observers to find changes to element classes or other attributes,\r\n * and make changes to other DOM elements based on it.\r\n * @author Amal Ajith\r\n */\r\n\r\nimport {changeCgGlobalLangIcon, changeCgLogoDesktop, changeCgLogoMobile} from \"./logoChanger\";\r\n\r\n/**\r\n * Observer for mutation events in headerTopBar element\r\n */\r\nexport const headerMutationObserver = () => {\r\n\r\n /**\r\n * Get the headerTopBarNode element\r\n * @type {HTMLElement}\r\n */\r\n const headerTopBarNode = document.querySelector('.header-topbar');\r\n const headerTopBarWrapperNode = document.querySelector('.header-topbar-wrapper');\r\n\r\n // Options for the observer (which mutations to observe)\r\n const classMutationConfig = { attributes: true, attributesFilter: ['class'] };\r\n\r\n\r\n /**\r\n * Callback function when a mutation happens.\r\n * We are looking for 2 mutations, fixed class, hover class and background-color changing to white.\r\n * @param mutationsList\r\n * @param observer\r\n * @type {MutationCallback}\r\n */\r\n const classMutationCallback = (mutationsList, observer) => {\r\n\r\n for(const mutation of mutationsList) {\r\n if (mutation.type === 'attributes') {\r\n const observingClassNames = ['fixed', 'hover']\r\n if(observingClassNames.some(className => mutation.target.classList.contains(className))){\r\n //Always blue logo when headerTop background is white\r\n changeCgLogoDesktop('blue');\r\n changeCgGlobalLangIcon('black');\r\n } else {\r\n if(headerTopBarWrapperNode.classList.contains('dark-gradient')){\r\n changeCgLogoDesktop('white');\r\n changeCgGlobalLangIcon('white');\r\n } else {\r\n changeCgLogoDesktop('blue');\r\n changeCgGlobalLangIcon('black');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Class mutation observer\r\n * @type {MutationObserver}\r\n */\r\n const observer = new MutationObserver(classMutationCallback);\r\n\r\n //Observe for class mutations\r\n observer.observe(headerTopBarNode, classMutationConfig);\r\n\r\n // If page loads with .fixed class\r\n if(headerTopBarNode.classList.contains('fixed')){\r\n changeCgLogoDesktop('blue');\r\n }\r\n\r\n}\r\n\r\nexport const headerMobileMutationObserver = () => {\r\n\r\n /**\r\n * Get the headerMobileBar element\r\n * @type {HTMLElement}\r\n */\r\n const headerMobileBarNode = document.querySelector('.header-mobile-bar');\r\n\r\n /**\r\n * Get the headerMobile element\r\n * @type {HTMLElement}\r\n */\r\n const headerMobileNode = document.querySelector('.header-mobile');\r\n\r\n // Options for the observer (which mutations to observe)\r\n const classMutationConfig = { attributes: true, attributesFilter: ['class'] };\r\n\r\n const classMutationCallback = (mutationsList, observer) => {\r\n\r\n for(const mutation of mutationsList) {\r\n if (mutation.type === 'attributes') {\r\n const observingClassNames = ['opened']\r\n if(observingClassNames.some(className => mutation.target.classList.contains(className))){\r\n //Always blue logo when headerTop background is white\r\n changeCgLogoMobile('blue');\r\n changeCgGlobalLangIcon('black');\r\n } else {\r\n if(headerMobileNode.classList.contains('dark-gradient')){\r\n changeCgLogoMobile('white');\r\n changeCgGlobalLangIcon('white');\r\n } else {\r\n changeCgLogoMobile('blue');\r\n changeCgGlobalLangIcon('black');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Class mutation observer\r\n * @type {MutationObserver}\r\n */\r\n const observer = new MutationObserver(classMutationCallback);\r\n\r\n //Observe for class mutations\r\n observer.observe(headerMobileBarNode, classMutationConfig);\r\n\r\n}\r\n\r\n\r\nexport const menuOpenMutationObserver = () => {\r\n const headerTopBarNode = document.querySelector('.header-topbar');\r\n\r\n const subNavigationNode = document.querySelector('.sub-navigation-wrapper');\r\n\r\n // Options for the observer (which mutations to observe)\r\n const classMutationConfig = { attributes: true, attributesFilter: ['class'] };\r\n\r\n const classMutationCallback = (mutationsList, observer) => {\r\n\r\n for(const mutation of mutationsList) {\r\n if (mutation.type === 'attributes') {\r\n const observingClassName = 'menu-open';\r\n if(mutation.target.classList.contains(observingClassName)) {\r\n if(subNavigationNode){\r\n subNavigationNode.classList.add('below-header');\r\n }\r\n if(headerTopBarNode) {\r\n headerTopBarNode.classList.add('hover');\r\n }\r\n } else {\r\n if(subNavigationNode) {\r\n if(!$( '.header-lang' ).hasClass( 'active' )){\r\n subNavigationNode.classList.remove('below-header');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Class mutation observer\r\n * @type {MutationObserver}\r\n */\r\n const observer = new MutationObserver(classMutationCallback);\r\n\r\n const subNavNodes = headerTopBarNode.querySelectorAll('.menu-submenu');\r\n\r\n subNavNodes.forEach((el) => {\r\n observer.observe(el, classMutationConfig);\r\n })\r\n\r\n\r\n}\r\n\r\n"],"names":["navigableElements","document","querySelectorAll","changeCgLogoDesktop","logoColor","logoImgEle","headerBottom","querySelector","dataset","whiteLogoSrc","blueLogoSrc","src","changeCgLogoMobile","headerMobile","changeCgGlobalLangIcon","langIconEle","whiteGlobalIconSrc","blackGlobalIconSrc","$","ready","headerTopBarNode","headerTopBarWrapperNode","MutationObserver","mutationsList","observer","mutation","type","some","className","target","classList","contains","observe","attributes","attributesFilter","headerMutationObserver","headerMobileBarNode","headerMobileNode","headerMobileMutationObserver","subNavigationNode","classMutationConfig","observingClassName","add","hasClass","remove","forEach","el","menuOpenMutationObserver","headerLangMenu","element","setAttribute","headerLangMutationObserver","appHeight","documentElement","style","setProperty","window","innerHeight","headerMobileHeight","headerMobileEle","offsetHeight","headerDesktopHeight","headerTopbarEle","adminBarHeight","adminBarEle","subNavWrapperHeight","subNavEle","addEventListener","hover","addClass","removeClass","cgTopMenuItems","cgSubNavigation","cgBreadcumbShadow","css","mouseleave","menuSubmenu","attr","toggleSubMenu","e","hide","clickedButton","parentLi","parentElement","subMenu","ariaExpanded","headerTopbarNode","menuArrowDownItem","menuLiEle","currentTarget","focus","code","keyCode","click","_this","this","toggleClass","headerMobileBar","slideToggle","fadeToggle","preventDefault","mySubmenu","parent","find","show","newLeft","parseInt","position","left","newSubmenu","parents","first","width","setTimeout","myScreenSize","getScreenSize","showSearchResults","fixedTopbar","subNav","length","headerTop","scrollTop","subNavTop","offset","top","cgAdminBar","outerHeight","topbarResizer","resize","lodash","debounce","is","fadeIn","searchFormInput","focusableElements","filter","firstFocusableElement","lastFocusableElement","last","on","which","analyticsCardTitle","shiftKey","activeElement","keyup","fadeOut","cgSubNavigationWrapper","eq","empty","text","Math","round","devicePixelRatio","each","childElementCount","children","largeTxtArray","i","innerText","push","scroll"],"sourceRoot":""}