PageSourceSearch

https://ridge.co.uk/wp-content/themes/ridge/dist/header-Do8I5lPu.js

js ridge.co.uk collected 2026-10-02 10:41:45 UTC 1,317 bytes, 2 lines download raw bytes

1import{s as B,i as O,g as h,h as w}from"./script-BuvVbpvA.js";let l=null;function L(){l!==null&&(cancelAnimationFrame(l),l=null);const s=document.querySelector(".header");if(!s)return;let i="ABOVE",o=B.lenisInstance?.scroll??window.scrollY,d=0,e=0,n=0,g=o,a=!1,r=null;const A=()=>s.offsetHeight||w||0,f=()=>O.h,y=t=>{s.style.setProperty("--fake-abs-y",`${-t}px`)},u=()=>{s.style.setProperty("--fake-abs-y","0px")},p=()=>{const t=n+(e-n)*.22;n=Math.abs(e-t)<.5?e:t,s.style.setProperty("--hide-y",`${n}px`),s.classList.toggle("header--hide",n<-.5)},m=()=>{r?.kill(),r=null,a=!1,h.set(s,{opacity:1})},E=t=>{g=t,!a&&(a=!0,u(),e=0,p(),r=h.to(s,{opacity:0,duration:.2,ease:"none",overwrite:"auto",onComplete:()=>{i="ABOVE",y(g),e=0,n=0,s.classList.remove("header--hide"),s.style.setProperty("--hide-y","0px"),h.set(s,{opacity:1}),a=!1,r=null}}))};o<f()?(i="ABOVE",y(o),e=0,n=0):(i="BELOW",u(),e=0,n=0),s.style.opacity="1",p();const b=()=>{const t=B.lenisInstance?.scroll??window.scrollY,v=t-o,c=v>.5?1:v<-.5?-1:0;if(c!==0&&(d=c),i==="BELOW"&&d===-1&&t<f())E(t);else if(t<f())m(),i="ABOVE",y(t),e=0;else{m();const H=i!=="BELOW";i="BELOW",u(),H?d===-1?e=0:(e=-A(),n=e):c===-1?e=0:c===1&&(e=-A())}p(),o=t,l=requestAnimationFrame(b)};l=requestAnimationFrame(b)}export{L as default};
2//# sourceMappingURL=header-Do8I5lPu.js.map

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.