import{m as O,u as f,k as y,p as P,q as b}from"./entry-d195bacb.mjs";function g(t){return P()?(b(t),!0):!1}var p;const m=typeof window!="undefined",q=t=>typeof t=="string",N=()=>{};m&&((p=window==null?void 0:window.navigator)==null?void 0:p.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function h(t,n){function r(...e){t(()=>n.apply(this,e),{fn:n,thisArg:this,args:e})}return r}const $=t=>t();function T(t,n){let r,e;return i=>{const o=f(t),l=f(n.maxWait);if(r&&clearTimeout(r),o<=0||l!==void 0&&l<=0)return e&&(clearTimeout(e),e=null),i();l&&!e&&(e=setTimeout(()=>{r&&clearTimeout(r),e=null,i()},l)),r=setTimeout(()=>{e&&clearTimeout(e),e=null,i()},o)}}function V(t,n,r={}){const{immediate:e=!0}=r,a=y(!1);let i=null;function o(){i&&(clearTimeout(i),i=null)}function l(){a.value=!1,o()}function u(...w){o(),a.value=!0,i=setTimeout(()=>{a.value=!1,i=null,t(...w)},f(n))}return e&&(a.value=!0,m&&u()),g(l),{isPending:a,start:u,stop:l}}var c=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,F=(t,n)=>{var r={};for(var e in t)j.call(t,e)&&n.indexOf(e)<0&&(r[e]=t[e]);if(t!=null&&c)for(var e of c(t))n.indexOf(e)<0&&x.call(t,e)&&(r[e]=t[e]);return r};function S(t,n,r={}){const e=r,{eventFilter:a=$}=e,i=F(e,["eventFilter"]);return O(t,h(a,n),i)}var D=Object.defineProperty,W=Object.defineProperties,E=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,v=(t,n,r)=>n in t?D(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,I=(t,n)=>{for(var r in n||(n={}))_.call(n,r)&&v(t,r,n[r]);if(s)for(var r of s(n))d.call(n,r)&&v(t,r,n[r]);return t},A=(t,n)=>W(t,E(n)),C=(t,n)=>{var r={};for(var e in t)_.call(t,e)&&n.indexOf(e)<0&&(r[e]=t[e]);if(t!=null&&s)for(var e of s(t))n.indexOf(e)<0&&d.call(t,e)&&(r[e]=t[e]);return r};function z(t,n,r){const e=r,{debounce:a=0,maxWait:i=void 0}=e,o=C(e,["debounce","maxWait"]);return S(t,n,A(I({},o),{eventFilter:T(a,{maxWait:i})}))}export{q as a,m as i,N as n,g as t,V as u,z as w};
