import"./jwt-decode.esm-C7p7KYmD.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]="29421fec-e2df-4ca9-9ca4-8405b4e8e2fd",n._sentryDebugIdIdentifier="sentry-dbid-29421fec-e2df-4ca9-9ca4-8405b4e8e2fd")}catch{}})();const c=1e3,a=n=>{let e=null,t=null;const l=()=>document.hidden&&n.backgroundInterval!==void 0?n.backgroundInterval:n.interval??c,o=()=>!document.hidden||n.keepPollingOnOutOfFocus===!0||n.backgroundInterval!==void 0,i=async()=>{try{o()&&await n.task()}finally{e=setTimeout(i,l())}},d=()=>{e&&clearTimeout(e),document.hidden?e=setTimeout(i,l()):i()};return{startPolling:()=>{e&&clearTimeout(e),t&&document.removeEventListener("visibilitychange",t),t=d,document.addEventListener("visibilitychange",t),i()},endPolling:()=>{e&&clearTimeout(e),e=null,t&&(document.removeEventListener("visibilitychange",t),t=null)}}};export{a as u};
//# sourceMappingURL=polling-CSxJG2et.js.map
