import{au as c}from"./index.8d733f79.js";const m=100,E=600,s="_RepeatClick",p={beforeMount(t,n){const e=n.value,{interval:d=m,delay:l=E}=c(e)?{}:e;let o,r;const u=()=>c(e)?e():e.handler(),a=()=>{r&&(clearTimeout(r),r=void 0),o&&(clearInterval(o),o=void 0)},i=v=>{v.button===0&&(a(),u(),document.addEventListener("mouseup",a,{once:!0}),r=setTimeout(()=>{o=setInterval(()=>{u()},d)},l))};t[s]={start:i,clear:a},t.addEventListener("mousedown",i)},unmounted(t){if(!t[s])return;const{start:n,clear:e}=t[s];n&&t.removeEventListener("mousedown",n),e&&(e(),document.removeEventListener("mouseup",e)),t[s]=null}};export{p as v};
