import{C as e,Ct as t,G as n,H as r,N as i,St as a,U as o,V as s,_t as c,ct as l,gt as u,ht as d,it as f,lt as p,pt as m,rt as h,ut as g,vt as _,wt as v}from"./dist-B4ulKgpj.js";function y(e,t){let n=_();return f(()=>{n.value=e()},{...t,flush:t?.flush??`sync`}),d(n)}function b(e,t){return g()?(m(e,t),!0):!1}function x(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return b(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}function S(e){let t=!1,n,r=p(!0);return((...i)=>(t||=(n=r.run(()=>e(...i)),!0),n))}var C=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var w=e=>e!==void 0,T=Object.prototype.toString,E=e=>T.call(e)===`[object Object]`,D=O();function O(){var e,t;return C&&!!(!((e=window)==null||(e=e.navigator)==null)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function k(e){return Array.isArray(e)?e:[e]}function A(e){return e||i()}function j(e){if(!C)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=p(!0),n=r.run(()=>e(...a))),b(i),n))}function M(e,t=1e4){return l((n,r)=>{let i=a(e),o,s=()=>setTimeout(()=>{i=a(e),r()},a(t));return b(()=>{clearTimeout(o)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(o),o=s()}}})}function N(e,t){A(t)&&r(e,t)}function P(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,o=_(!1),s;function l(){s&&=(clearTimeout(s),void 0)}function u(){o.value=!1,l()}function d(...n){i&&e(),l(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=void 0,e(...n)},a(t))}return r&&(o.value=!0,C&&d()),b(u),{isPending:c(o),start:d,stop:u}}function F(e,t,n){return h(e,t,{...n,immediate:!0})}var I=C?window:void 0;C&&window.document,C&&window.navigator,C&&window.location;function L(e){let t=a(e);return t?.$el??t}function R(...t){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=e(()=>{let e=k(a(t[0])).filter(e=>e!=null);return e.every(e=>typeof e!=`string`)?e:void 0});return F(()=>[r.value?.map(e=>L(e))??[I].filter(e=>e!=null),k(a(r.value?t[1]:t[0])),k(v(r.value?t[2]:t[1])),a(r.value?t[3]:t[2])],([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=E(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function z(){let e=_(!1),t=i();return t&&o(()=>{e.value=!0},t),e}function B(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function V(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=I,eventName:o=`keydown`,passive:s=!1,dedupe:c=!1}=r,l=B(t);return R(i,o,e=>{e.repeat&&a(c)||l(e)&&n(e)},s)}function H(e){return JSON.parse(JSON.stringify(e))}function U(t,n,r,a={}){var o,c;let{clone:l=!1,passive:d=!1,eventName:f,deep:p=!1,defaultValue:m,shouldEmit:g}=a,_=i(),v=r||_?.emit||(_==null||(o=_.$emit)==null?void 0:o.bind(_))||(_==null||(c=_.proxy)==null||(c=c.$emit)==null?void 0:c.bind(_?.proxy)),y=f;n||=`modelValue`,y||=`update:${n.toString()}`;let b=e=>l?typeof l==`function`?l(e):H(e):e,x=()=>w(t[n])?b(t[n]):m,S=e=>{g?g(e)&&v(y,e):v(y,e)};if(d){let e=u(x()),r=!1;return h(()=>t[n],t=>{r||(r=!0,e.value=b(t),s(()=>r=!1))}),h(e,e=>{!r&&(e!==t[n]||p)&&S(e)},{deep:p}),e}else return e({get(){return x()},set(e){S(e)}})}function W(){let r=i(),a=u(),o=e(()=>s());n(()=>{o.value!==s()&&t(a)});function s(){return a.value&&`$el`in a.value&&[`#text`,`#comment`].includes(a.value.$el.nodeName)?a.value.$el.nextElementSibling:L(a)}let c=Object.assign({},r.exposed),l={};for(let e in r.props)Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>r.props[e]});if(Object.keys(c).length>0)for(let e in c)Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:()=>c[e]});Object.defineProperty(l,`$el`,{enumerable:!0,configurable:!0,get:()=>r.vnode.el}),r.exposed=l;function d(e){if(a.value=e,e&&(Object.defineProperty(l,`$el`,{enumerable:!0,configurable:!0,get:()=>e instanceof Element?e:e.$el}),!(e instanceof Element)&&!Object.prototype.hasOwnProperty.call(e,`$el`))){let t=e.$.exposed,n=Object.assign({},l);for(let e in t)Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:()=>t[e]});r.exposed=n}}return{forwardRef:d,currentRef:a,currentElement:o}}export{P as _,R as a,y as c,j as d,C as f,b as g,N as h,L as i,x as l,M as m,I as n,z as o,D as p,V as r,U as s,W as t,S as u};