PageSourceSearch

https://mysleepfitter.com/assets/useAuth-Avra37EG.js

js mysleepfitter.com collected 2026-10-09 23:00:02 UTC 697 bytes, 1 lines download raw bytes

1import{r as u,s}from"./index-CUnD0zRX.js";let n=null,l=null,r=!0;const c=new Set;let o=!1;const d=()=>{c.forEach(a=>a())},i=()=>{if(o)return;o=!0;const{data:{subscription:a}}=s.auth.onAuthStateChange((t,e)=>{l=e,n=(e==null?void 0:e.user)??null,r=!1,d()});s.auth.getSession().then(({data:{session:t}})=>{l=t,n=(t==null?void 0:t.user)??null,r=!1,d()}),typeof window<"u"&&window.addEventListener("beforeunload",()=>{a.unsubscribe(),o=!1})},b=()=>{const[,a]=u.useState({});u.useEffect(()=>{i();const e=()=>a({});return c.add(e),()=>{c.delete(e)}},[]);const t=u.useCallback(async()=>{await s.auth.signOut()},[]);return u.useMemo(()=>({user:n,session:l,loading:r,signOut:t}),[n,l,r,t])};export{b 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.