1import{r as c}from"./mod-1bc04b52-B13Jk2YU.js";import{i as u,a as l}from"./mod-7150b8be-DCi3gwYs.js";import"./mod-04ce686a-D36Dt90E.js";const v={lastDispatchedAt:0};function g({throttleMs:e,enabled:i=!0}){const a=u(),n=l(),o=c.useRef({revalidator:a,navigationState:n.state});o.current={revalidator:a,navigationState:n.state},c.useEffect(()=>{if(!i)return;const t=()=>{const{revalidator:s,navigationState:d}=o.current;if(document.visibilityState!=="visible"||s.state!=="idle"||d!=="idle")return;const r=Date.now();r-v.lastDispatchedAt<e||(v.lastDispatchedAt=r,s.revalidate())};return document.addEventListener("visibilitychange",t),window.addEventListener("focus",t),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}},[e,i])}export{g as u};
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.