import{Ln as e,cn as t,jn as n}from"./index-BZbSGIBZ.js";var r=t(`outline`,`reload`,`Reload`,[[`path`,{d:`M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747`}],[`path`,{d:`M20 4v5h-5`}]]);const i=(t,r={})=>{let{enabled:i=()=>!0,staleTime:a=3e4}=r,o=0,s=async()=>{if(!i())return;let e=Date.now();e-o>=a&&(o=e,await t())};n(()=>{i()&&(window.addEventListener(`focus`,s),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&s()}),e(()=>{window.removeEventListener(`focus`,s)}))})};export{r as n,i as t};