1"use strict";(globalThis.webpackChunkhyperscience=globalThis.webpackChunkhyperscience||[]).push([[793],{738:(e,t,o)=>{o.d(t,{os:()=>c});var r=o(8607),n=o(2650),c=r.os.registerPlugin(n.H0)||r.os;c.core.Tween},793:(e,t,o)=>{o.r(t);var r=o(738),n=o(9638);const c=document.querySelector(".blog-container").querySelectorAll("h1, h2, h3, h4, h5, h6");let i=document.querySelectorAll(".post-anchors-container .post-anchors"),s=document.querySelector(".post-anchors-container.sticky-container .post-anchors");const l=[],a=new Set,d=(e,t)=>{let o=window.getComputedStyle(e).getPropertyValue(t);return parseInt(o.replace("px",""))},p=[...c].filter(e=>!(!e.textContent.trim()||e.matches(".page-title, .tax-heading")||e.closest(".c-accordions")||e.closest(".wp-block-hyperscience-accordions")));for(const e of p){const t=e.textContent.trim();let o;if(e.id){o=e.id;let t=1,r=o;for(;a.has(o);)t++,o=`${r}-${t}`;o!==r&&e.setAttribute("id",o)}else{let r=t.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-");/^\d/.test(r)&&(r=`h-${r}`),o=r;let n=1;for(;a.has(o);)n++,o=`${r}-${n}`;e.setAttribute("id",o)}a.add(o),l.push({id:o,title:t})}for(const e of i){const t=document.createDocumentFragment();for(const e of l){const o=document.createElement("a");o.href=`#${e.id}`,o.className="post-anchor",o.textContent=e.title,o.style.opacity="0",t.appendChild(o)}e.appendChild(t)}let u=document.querySelectorAll("a.post-anchor");if(u){r.os.to(u,{opacity:1,stagger:.15,delay:.25});for(let e of u)e.addEventListener("click",t=>{t.preventDefault();let o=window.innerWidth<900,r=e.getAttribute("href"),n=document.querySelector(r),c=window.scrollY+n.getBoundingClientRect().top,i=-1;c<window.scrollY&&(i+=d(document.body,"--header-height")),o&&(i+=s.offsetHeight),c-=i,window.scrollTo({top:c,left:0})})}let h=[...p].reverse();window.addEventListener("scroll",(0,n.n)(()=>{(()=>{let e=window.innerWidth<900,t=d(document.body,"--header-height");e&&(t+=s.offsetHeight);for(let o of h)if(o.getBoundingClientRect().top<=t){let t=o.getAttribute("id"),r=document.querySelector(`.sidebar-container .post-anchor[href="#${t}"`);e&&(r=document.querySelector(`.post-anchors-container.sticky-container .post-anchor[href="#${t}"`));for(let e of u)e.classList.contains("active")&&r!==e&&e.classList.remove("active");return r&&r.classList.add("active"),!1}for(let e of u)e.classList.contains("active")&&e.classList.remove("active")})()},100)),window.addEventListener("scroll",(0,n.s)(()=>{(()=>{let e=s.querySelector(".post-anchor.active");e?s.scrollTo({top:0,left:e.offsetLeft-d(s,"padding-left")}):s.scrollTo({top:0,left:0})})()},50))},9638:(e,t,o)=>{function r(e,t,o,r){var n;return function(){void 0===r&&(r=this),t=t&&"object"==typeof t?Array.prototype.slice.call(t):void 0!==t?[t]:arguments,(o<0||"number"!=typeof o)&&(o=250),n&&clearTimeout(n),n=setTimeout(function(){e.apply(r,t),n=null},o)}}function n(e,t,o,r){var n,c;return(o<0||"number"!=typeof o)&&(o=250),function(){void 0===r&&(r=this),t=t&&"object"==typeof t?Array.prototype.slice.call(t):void 0!==t?[t]:arguments;var i=+new Date;if(!(n&&i<n+o))return n=i,e.apply(r,t);c&&clearTimeout(c),c=setTimeout(function(){n=i,e.apply(r,t)},o)}}o.d(t,{n:()=>n,s:()=>r})}}]);
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.