1import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./react-6C37rxNK.js";import{t as n}from"./index.module-J9bNQTgl.js";var r=e(t(),1);function i(e,t,n){let i=(0,r.useRef)(t);(0,r.useEffect)(()=>{i.current=t},[t]),(0,r.useEffect)(()=>{function t(e){i.current(e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)},[e,n])}var a=500;function o(e,t,o=`bottom`){let s=(0,r.useRef)(null);i(`scroll`,n(()=>{if(!t.current)return;let n=t.current,r=n.scrollHeight,i=window.scrollY,a=n.getBoundingClientRect().top+i,c=i+window.innerHeight,l=o===`top`?i:c,u=l-a<0,d=l-a>r,f;f=u?0:d?r:l-a;let p=Math.round(f/r*100);s.current===null&&(s.current=p),e.forEach(e=>{let t=e.percentageThreshold<=p,n=(s.current??0)<e.percentageThreshold;t&&n&&(s.current=e.percentageThreshold,e.action(e.percentageThreshold))})},a))}export{o as t};
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.