1var module_218357788484=(document.addEventListener("DOMContentLoaded",()=>{function updateClass(){const columnRights=document.querySelector(".column-rights");columnRights&&(window.innerWidth<=1024?columnRights.classList.add("neutral_light_background"):columnRights.classList.remove("neutral_light_background"))}updateClass(),window.addEventListener("resize",updateClass);const langSwitcher=document.querySelector(".mobile .lang_switcher_class"),addlang=document.querySelector(".mobile .language_select"),header=document.querySelector("header.Header"),headerParent=document.querySelector(".body-wrapper"),sliderExists=document.querySelector(".page-slider"),homeSliderExists=document.querySelector(".home_slider"),bgBannerExists=document.querySelector(".bg_banner"),btn=header?header.querySelector(".dynamic-btn"):null,toggle=document.querySelector(".column-toogle"),subMenus=document.querySelectorAll(".header_sub_menu"),websiteHeaderSection=document.querySelector(".website-header-section");if(langSwitcher?.addEventListener("click",()=>{addlang.classList.toggle("show_lang")}),!header||!btn)return;const hasSlider=!!sliderExists;hasSlider&&(header.classList.add("has_page_slider"),btn.classList.replace("ghost_dark","ghost_light")),sliderExists||homeSliderExists||bgBannerExists||(header.classList.add("transparent_header"),btn.classList.replace("ghost_dark","ghost_light")),header.classList.add("scrolled"),btn.classList.replace("ghost_dark","ghost_light");let lastScrollY=window.scrollY,headerVisible=!0,scrollDirection=null,directionStartY=window.scrollY;const isBlogPost=headerParent.classList.contains("hs-blog-post");function handleScroll(){const scrollY=window.scrollY,isMobile=window.innerWidth<1024;if(websiteHeaderSection.style.top=isMobile?"0px":scrollY<=34?34-scrollY+"px":"0px",
1isBlogPost){if(scrollY<=20)return headerVisible=!0,header.classList.remove("post_hidden"),header.classList.add("scrolled"),btn.classList.replace("ghost_dark","ghost_light"),scrollDirection=null,directionStartY=scrollY,void(lastScrollY=scrollY);const delta=scrollY-lastScrollY;if(Math.abs(delta)<2)return void(lastScrollY=scrollY);const newDirection=delta>0?"down":"up";return newDirection!==scrollDirection?(scrollDirection=newDirection,directionStartY=scrollY,void(lastScrollY=scrollY)):(Math.abs(scrollY-directionStartY)>=15&&("down"===scrollDirection&&headerVisible&&(headerVisible=!1,header.classList.add("post_hidden")),"up"===scrollDirection&&(headerVisible||(headerVisible=!0,header.classList.remove("post_hidden"),header.classList.add("scrolled"),btn.classList.replace("ghost_dark","ghost_light"))),directionStartY=scrollY),void(lastScrollY=scrollY))}if(scrollY>50)header.classList.add("scrolled"),btn.classList.replace("ghost_dark","ghost_light");else{header.classList.remove("scrolled");const isTransparent=header.classList.contains("transparent_header");hasSlider||isTransparent?btn.classList.replace("ghost_dark","ghost_light"):btn.classList.replace("ghost_light","ghost_dark")}lastScrollY=scrollY}handleScroll(),window.addEventListener("scroll",handleScroll,{passive:!0}),toggle.addEventListener("click",()=>{header.classList.toggle("toogle_active"),document.documentElement.classList.toggle("hidden")}),subMenus.forEach(el=>{el.addEventListener("click",e=>{e.stopPropagation();const parentLi=el.closest("li"),isAlreadyActive=parentLi.classList.contains("active");document.querySelectorAll(".menu li").forEach(li=>{li.classList.remove("active")}),isAlreadyActive||parentLi.classList.add("active")})})}),void document.addEventListener("click",e=>{if(window.innerWidth>1024)return;const title=e.target.closest(".mega_menu_col_title");if(!title)return;const list=title.nextElementSibling;list&&list.classList.contains("mega_menu_col_list")&&(title.closest(".sub-menu").querySelectorAll(".mega_menu_col_title.active").forEach(el=>{el!==title&&(el.classList.remove("active"),el.nextElementSibling?.classList.remove("active"))}),title.classList.toggle("active"),list.classList.toggle("active"))})); 2//# sourceURL=https://4424028.fs1.hubspotusercontent-na1.net/hubfs/4424028/hub_generated/module_assets/1/218357788484/1790314105882/module_website-header-mega.js
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.