import{t as e}from"./rolldown-runtime.CMAw1HyY.mjs";import{F as t,N as n,w as r}from"./react.D3LpXLeJ.mjs";function i(){if(!a())return;let[e,r]=t(!document.hidden);return n(()=>{let e=()=>r(!document.hidden);return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e)}},[]),e}var a,o=e((()=>{r(),a=()=>typeof document==`object`}));export{i as n,o as t}; //# sourceMappingURL=UsePageVisibility.BXFDyWDM.mjs.map