!function(){var e,a,n;Drupal,a=document.querySelectorAll(".js-mega-menu-source"),n=document.querySelector(".navigation--mega-menu"),Drupal.behaviors.megaMenu={attach:function(t,s){var i=s.breakpoints;if(null!==n&&null!==i){var o=function(){return window.matchMedia(i.xs).matches||window.matchMedia(i.sm).matches||window.matchMedia(i.md).matches},r=o();a.forEach((function(a){e=a.querySelectorAll(".menu__item.is-expanded > .menu__link"),!1===r&&e.forEach((function(e){e.addEventListener("click",Drupal.behaviors.megaMenu.toggle,!1)}))})),void 0!==window.ResizeObserver&&new ResizeObserver((function(){i&&e&&(!1===r&&o()&&(r=!0,e.forEach((function(e){e.removeEventListener("click",Drupal.behaviors.megaMenu.toggle,!1)}))),!0!==r||o()||(r=!1,e.forEach((function(e){e.addEventListener("click",Drupal.behaviors.megaMenu.toggle,!1)}))))})).observe(document.querySelector(".site-wrapper__row"))}},toggle:function(a){var t=a.target.dataset.drupalLinkSystemPath;a.preventDefault(),e.forEach((function(e){e.dataset.drupalLinkSystemPath===t?e.classList.contains("has-opened-mega-menu")?(e.classList.remove("has-opened-mega-menu"),n.classList.remove("is-active")):(e.classList.add("has-opened-mega-menu"),n.classList.add("is-active")):e.classList.remove("has-opened-mega-menu")})),document.querySelectorAll(".menu__link.is-open").forEach((function(e){e.classList.remove("is-open")})),n.querySelector('.menu__link[data-drupal-link-system-path="'.concat(t,'"]')).classList.add("is-open")}}}();