1var module_124203949957=function(){const anchorNavItems=document.querySelectorAll(".anchor-nav .inner a"),anchorHeader=document.querySelector(".anchor-nav-section");let anchorHeaderHeight=document.querySelector(".header-navigation").offsetHeight;anchorHeader.style.top=anchorHeaderHeight-1+"px",window.addEventListener("resize",()=>{anchorHeaderHeight=document.querySelector(".header-navigation").offsetHeight,anchorHeader.style.top=anchorHeaderHeight-1+"px"});const selectNav=document.querySelector(".anchor-nav select");selectNav.addEventListener("change",()=>{let value=selectNav[selectNav.selectedIndex].value;location.href=value});const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){const targetID=entry.target.id;anchorNavItems.forEach(item=>{item.getAttribute("data-id")===targetID?item.classList.add("active"):item.classList.remove("active")})}})},{threshold:0,rootMargin:"-30% 0px -40% 0px"});document.querySelectorAll("section[id]").forEach(section=>{observer.observe(section)}),anchorNavItems.forEach(item=>{item.addEventListener("click",e=>{anchorNavItems.forEach(link=>link.classList.remove("active")),e.target.classList.add("active")})});const bannerStickyAnchorNav=()=>{document.body.classList.contains("hs-web-interactives-top-banner-open")&&setTimeout(()=>{let bannerHeight=document.querySelector("#hs-web-interactives-top-anchor .hs-cta-embed__loaded").offsetHeight;anchorHeaderHeight=document.querySelector(".header-navigation").offsetHeight,anchorHeader.style.top=bannerHeight+anchorHeaderHeight-1+"px"},500)};window.addEventListener("load",()=>{bannerStickyAnchorNav()}),window.addEventListener("resize",()=>{bannerStickyAnchorNav()});let lastScrollTop=0,isScrolling=!1;const handleMobileScroll=()=>{if(window.innerWidth>767)return void anchorHeader.classList.remove("anchor-nav-section--hidden");const scrollTop=window.pageYOffset||document.documentElement.scrollTop;if(scrollTop<(()=>{const stickyTop=parseFloat(anchorHeader.style.top);return Number.isNaN(stickyTop)?0:Math.max(0,(el=>{let top=0;for(;el;)top+=el.offsetTop,el=el.offsetParent;return top})(anchorHeader)-stickyTop)})())return anchorHeader.classList.remove("anchor-nav-section--hidden"),void(lastScrollTop=scrollTop<=0?0:scrollTop);scrollTop>lastScrollTop&&scrollTop>100?anchorHeader.classList.add("anchor-nav-section--hidden"):anchorHeader.classList.remove("anchor-nav-section--hidden"),lastScrollTop=scrollTop<=0?0:scrollTop};window.addEventListener("scroll",()=>{isScrolling||(window.requestAnimationFrame(()=>{handleMobileScroll(),isScrolling=!1}),isScrolling=!0)},{passive:!0})}(); 2//# sourceURL=https://22522971.fs1.hubspotusercontent-na1.net/hubfs/22522971/hub_generated/module_assets/1/124203949957/1775766711576/module_anchor-nav.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.