import{ap as p,h as S,G as k,s as F,E as w,aq as W,ar as _,as as E,ak as y,P as j,u as M,al as P,ao as A,M as I,C as x,R as L}from"./m2W8DxR4.js";function B(e,r,t={}){let n,o,i,s=!0;const l=()=>{s=!0,i()};w(e,l,{flush:"sync",...t});const a=typeof r=="function"?r:r.get,c=typeof r=="function"?void 0:r.set,u=W((f,m)=>(o=f,i=m,{get(){return s&&(n=a(n),s=!1),o(),n},set(d){c==null||c(d)}}));return u.trigger=l,u}function H(e){return _()?(E(e),!0):!1}const v=new WeakMap,J=(...e)=>{var r;const t=e[0],n=(r=P())==null?void 0:r.proxy;if(n==null&&!A())throw new Error("injectLocal must be called in setup");return n&&v.has(n)&&t in v.get(n)?v.get(n)[t]:I(...e)};function Q(e,r){if(typeof Symbol<"u"){const t={...e};return Object.defineProperty(t,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:r[n++],done:n>r.length})}}}),t}else return Object.assign([...r],e)}function G(e){if(!p(e))return j(e);const r=new Proxy({},{get(t,n,o){return M(Reflect.get(e.value,n,o))},set(t,n,o){return p(e.value[n])&&!p(o)?e.value[n].value=o:e.value[n]=o,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return j(r)}function N(e){return G(F(e))}function X(e,...r){const t=r.flat(),n=t[0];return N(()=>Object.fromEntries(typeof n=="function"?Object.entries(x(e)).filter(([o,i])=>!n(y(i),o)):Object.entries(x(e)).filter(o=>!t.includes(o[0]))))}const Y=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Z=e=>typeof e<"u",$=e=>e!=null,R=Object.prototype.toString,ee=e=>R.call(e)==="[object Object]",h=()=>{};function T(e,r){function t(...n){return new Promise((o,i)=>{Promise.resolve(e(()=>r.apply(this,n),{fn:r,thisArg:this,args:n})).then(o).catch(i)})}return t}function U(e,r={}){let t,n,o=h;const i=a=>{clearTimeout(a),o(),o=h};let s;return a=>{const c=y(e),u=y(r.maxWait);return t&&i(t),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=void 0),Promise.resolve(a())):new Promise((f,m)=>{o=r.rejectOnCancel?m:f,s=a,u&&!n&&(n=setTimeout(()=>{t&&i(t),n=void 0,f(s())},u)),t=setTimeout(()=>{n&&i(n),n=void 0,f(a())},c)})}}function V(...e){let r=0,t,n=!0,o=h,i,s,l,a,c;!p(e[0])&&typeof e[0]=="object"?{delay:s,trailing:l=!0,leading:a=!0,rejectOnCancel:c=!1}=e[0]:[s,l=!0,a=!0,c=!1]=e;const u=()=>{t&&(clearTimeout(t),t=void 0,o(),o=h)};return m=>{const d=y(s),O=Date.now()-r,g=()=>i=m();return u(),d<=0?(r=Date.now(),g()):(O>d&&(a||!n)?(r=Date.now(),g()):l&&(i=new Promise((b,D)=>{o=c?D:b,t=setTimeout(()=>{r=Date.now(),n=!0,b(g()),u()},Math.max(0,d-O))})),!a&&!t&&(t=setTimeout(()=>n=!0,d)),n=!1,i)}}function te(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ne(e){return Array.isArray(e)?e:[e]}function z(e){const r=Object.create(null);return t=>r[t]||(r[t]=e(t))}const K=/-(\w)/g,re=z(e=>e.replace(K,(r,t)=>t?t.toUpperCase():""));function C(e){return P()}function oe(e,r=200,t={}){return T(U(r,t),e)}function ie(e,r=200,t=!1,n=!0,o=!1){return T(V(r,t,n,o),e)}function ae(e,r=!0,t){C()?S(e,t):r?e():k(e)}function se(e,r){C()&&L(e,r)}function ue(e,r,t){return w(e,r,{...t,immediate:!0})}function ce(e,r,t){return w(e,r,{...t,once:!0})}export{ne as a,H as b,B as c,$ as d,Z as e,re as f,ee as g,J as h,Y as i,oe as j,se as k,ce as l,Q as m,h as n,te as p,X as r,ae as t,ie as u,ue as w};
