class ScrollActions{constructor(){this.body=document.querySelector("body"),this.navbar=document.querySelector(".navbar"),this.menu=document.querySelector(".menu"),this.menuIcon=document.querySelector(".menu-icon"),this.search_button=document.querySelector(".search-button"),this.searchPanel=document.querySelector(".search-panel"),this.menuPanel=document.querySelector(".menu-panel"),this.scrolled=!1,this.top=this.initScrollCheck(0),this.bottom=this.initScrollCheck(window.innerHeight+100),this.enableTrigger(this.top,this.reset),this.enableTrigger(this.bottom,this.setScrolled)}initScrollCheck(level){let div=document.createElement("div");return div.style.width=1,div.style.height=1,div.style.zIndex=-1,div.style.opacity=0,div.style.position="absolute",div.style.display="block",div.style.top=level+"px",document.body.style.position="relative",document.body.insertAdjacentElement("afterbegin",div),div}setScrolled(){this.scrolled||(this.body.classList.add("scrolled"),this.navbar.classList.add("scrolled"),this.searchPanel.classList.add("scrolled"),this.menuPanel.classList.add("scrolled"),this.menu.classList.add("visible"),this.menu_drawer&&this.menu_drawer.classList.remove("open"),this.scrolled=!0)}reset(){this.scrolled&&(this.body.classList.remove("scrolled"),this.navbar.classList.remove("scrolled"),this.searchPanel.classList.remove("scrolled"),this.menuPanel.classList.remove("scrolled"),this.menu.classList.remove("visible"),this.menuIcon.classList.remove("isOpen"),this.scrolled=!1)}enableTrigger(trigger,callback){trigger.callback=callback.bind(this),this.observer=new IntersectionObserver(((entries,observer)=>{entries.forEach((entry=>{entry.isIntersecting&&entry.target.callback(entry.target.dataset)}))})),this.observer.observe(trigger)}}new ScrollActions;var scrollToH2=document.querySelector(".scrollToH2");if(scrollToH2){function scrollToH2section(){var scrollTo=new SmoothScroll,anchor=document.querySelectorAll("h2[id]")[1];scrollTo.animateScroll(anchor,null,{offset:80})}scrollToH2.addEventListener("click",scrollToH2section)}