import{r as a,dK as i}from"./main-crazy-owls-work.js";function f(e,r){var t=a.useRef(!1),c=a.useRef(),u=a.useRef(e),o=a.useCallback(function(){return t.current},[]),n=a.useCallback(function(){t.current=!1,c.current&&clearTimeout(c.current),c.current=setTimeout(function(){t.current=!0,u.current()},r)},[r]),s=a.useCallback(function(){t.current=null,c.current&&clearTimeout(c.current)},[]);return a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){return n(),s},[r]),[o,s,n]}function l(e,r,t){t===void 0&&(t=[]);var c=f(e,r),u=c[0],o=c[1],n=c[2];return a.useEffect(n,t),[u,o]}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,r){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,r),r)}};function y(e,r){return e.open({content:r==="success"?"Saved successfully":"Something went wrong",type:r})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,r){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,r),r)}};function h(e,r){return e.every((t,c)=>{const u=r[c];return Array.isArray(t)&&Array.isArray(u)||typeof t=="object"&&typeof u=="object"?i(t,u):t===u})}function v(e,r,t){const c=a.useRef(t);return l(()=>{h(t,c.current)||(e(),c.current=t)},r,t)}export{y as a,v as u};
