import"./jwt-decode.esm-CuqABuF0.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="504231f5-62fb-48f8-bb8d-dd1f27cc76f8",n._sentryDebugIdIdentifier="sentry-dbid-504231f5-62fb-48f8-bb8d-dd1f27cc76f8")}catch{}})();const o=1e3,c=n=>{let e=null,i=null;const t=async()=>{try{(!document.hidden||n.keepPollingOnOutOfFocus)&&await n.task()}finally{e=setTimeout(t,n.interval??o)}},l=()=>{document.hidden||(e&&clearTimeout(e),t())};return{startPolling:()=>{e&&clearTimeout(e),i&&document.removeEventListener("visibilitychange",i),i=l,document.addEventListener("visibilitychange",i),t()},endPolling:()=>{e&&clearTimeout(e),e=null,i&&(document.removeEventListener("visibilitychange",i),i=null)}}};export{c as u};
//# sourceMappingURL=polling-Dbvvni7o.js.map
