"use strict";let gstoplist=document.getElementsByClassName("gs-scrollto");for(let e=0;e<gstoplist.length;e++){gstoplist[e].addEventListener("click",function(e){e.preventDefault();let t=e.currentTarget.href.split("#")[1],s=document.getElementById(t);if(s){const e=s.getBoundingClientRect().top+window.scrollY-50;window.scroll({top:e,behavior:"smooth"})}},!1)}if(null!=document.querySelector(".gs-toc-mobile")){document.querySelector(".gs-toc-mobile").addEventListener("click",function(e){e.preventDefault(),e.currentTarget.classList.toggle("open"),document.querySelector(".gs-section-sticky-nav").classList.toggle("open")});const e=document.querySelectorAll(".gs-section-sticky-nav ul li a");let t=[];e.forEach(s=>{t.push(document.querySelector(s.hash)),s.addEventListener("click",function(t){t.preventDefault();let s=t.currentTarget;e.forEach(e=>{e.classList.remove("current")}),s.classList.add("current")},!1)});let s=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){let s=t.target.getAttribute("id");e.forEach(e=>{e.classList.remove("current")});let r=document.querySelector('.gs-section-sticky-nav ul li a[href="#'+s+'"]');r&&r.classList.add("current")}})},{threshold:1});for(let e of t)s.observe(e)}