import{r as u}from"./index-8ee6c85d.js";const c={};function n(t,r){const e=u.useRef(c);return e.current===c&&(e.current=t(r)),e}const i=[];function o(t){u.useEffect(t,i)}class s{constructor(){this.currentId=0,this.clear=()=>{this.currentId!==0&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new s}start(r,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,e()},r)}}function a(){const t=n(s.create).current;return o(t.disposeEffect),t}export{s as T,a as u};
