1(d=>{const openClassName="open",navId="#main-nav",nav=d.querySelector(navId);if(!nav)return;let scroll=windowScrollTo(0);const trigger=d.querySelector("#sp-drawer-button");function init(){trigger.addEventListener("click",toggleMenu,!1),window.addEventListener("resize",()=>{nav.removeAttribute("style");const openElems=d.querySelectorAll(".open");openElems.length&&openElems.forEach(elem=>elem.classList.remove("open"))},!1),d.querySelectorAll(".p-u-menu__link").forEach(elem=>{elem.addEventListener("click",e=>{if(!trigger.classList.contains("open"))return;const href=getLastPath(e.currentTarget.href),currentPage=getLastPath(location.pathname);href.includes(currentPage)&&close()},!1)})}function toggleMenu(e){const btn=e.currentTarget,headerHeight=getHeaderHeight();nav.style.top=`${headerHeight}px`,nav.style.height=`calc(100vh - ${headerHeight}px)`;const isOpened=btn.classList.contains("open");isOpened?close(btn):open(btn)}function getHeaderHeight(){const header=d.querySelector(".p-header"),rect=header.getBoundingClientRect();return rect.height}function windowScrollTo(posY){return function(){window.scrollTo(0,posY)}}function open(){trigger.classList.add("open"),nav.classList.add("open"),scroll=windowScrollTo(window.scrollY);const styles={width:"100vw",position:"fixed",top:`-${window.scrollY}px`,overflow:"hidden"};for(const prop in styles)d.body.style[prop]=styles[prop]}function close(){trigger.classList.remove("open"),nav.classList.remove("open"),d.body.removeAttribute("style"),scroll()}function getLastPath(path){return path.replace(/^\.?\//,"").replace(/\/$/,"").split("/").pop()}trigger&&init()})(document);
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.