import{Y as e,ab as n,ac as t,a1 as o,aV as r,b5 as i,e as a,s as l,$ as u,bB as s,ah as c,k as d,r as f,J as v,o as p,_ as g}from"./CNYe4-mv.js";function m(e,n){const t=l();return u(()=>{t.value=e()},{...n,flush:null!=void 0?undefined:"sync"}),s(t)}function b(e){return!!n()&&(t(e),!0)}function y(e){let n,t=!1;const o=i(!0);return(...r)=>(t||(n=o.run(()=>e(...r)),t=!0),n)}function w(e){let n,t,o=0;const r=()=>{o-=1,t&&o<=0&&(t.stop(),n=void 0,t=void 0)};return(...a)=>(o+=1,t||(t=i(!0),n=t.run(()=>e(...a))),b(r),n)}const h="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const j=Object.prototype.toString,O=$();function $(){var e,n;return h&&(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null==(n=null==window?void 0:window.navigator)?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(null==window?void 0:window.navigator.userAgent))}function x(e){return Array.isArray(e)?e:[e]}function A(e,n=1e4){return r((t,r)=>{let i,a=o(e);return b(()=>{clearTimeout(i)}),{get:()=>(t(),a),set(t){a=t,r(),clearTimeout(i),i=setTimeout(()=>{a=o(e),r()},o(n))}}})}const k=o;function S(e,n){c()&&a(e,n)}const E=h?window:void 0;function P(e){var n;const t=o(e);return null!=(n=null==t?void 0:t.$el)?n:t}function N(...n){const t=[],r=()=>{t.forEach(e=>e()),t.length=0},i=d(()=>{const e=x(o(n[0])).filter(e=>null!=e);return e.every(e=>"string"!=typeof e)?e:void 0}),a=(l=([e,n,o,i])=>{if(r(),!(null==e?void 0:e.length)||!(null==n?void 0:n.length)||!(null==o?void 0:o.length))return;const a=(l=i,"[object Object]"===j.call(l)?{...i}:i);var l;t.push(...e.flatMap(e=>n.flatMap(n=>o.map(t=>((e,n,t,o)=>(e.addEventListener(n,t,o),()=>e.removeEventListener(n,t,o)))(e,n,t,a)))))},u={flush:"post"},e(()=>{var e,t;return[null!=(t=null==(e=i.value)?void 0:e.map(e=>P(e)))?t:[E].filter(e=>null!=e),x(o(i.value?n[1]:n[0])),x(v(i.value?n[2]:n[1])),o(i.value?n[3]:n[2])]},l,{...u,immediate:!0}));var l,u;return b(r),()=>{a(),r()}}function T(){const e=l(!1),n=c();return n&&p(()=>{e.value=!0},n),e}function R(...e){let n,t,r={};3===e.length?(n=e[0],t=e[1],r=e[2]):2===e.length?"object"==typeof e[1]?(n=!0,t=e[0],r=e[1]):(n=e[0],t=e[1]):(n=!0,t=e[0]);const{target:i=E,eventName:a="keydown",passive:l=!1,dedupe:u=!1}=r,s="function"==typeof(c=n)?c:"string"==typeof c?e=>e.key===c:Array.isArray(c)?e=>c.includes(e.key):()=>!0;var c;return N(i,a,e=>{e.repeat&&o(u)||s(e)&&t(e)},l)}function J(n,t,r={}){const{window:i=E,...a}=r;let l;const u=function(e){const n=T();return d(()=>(n.value,Boolean(e())))}(()=>i&&"ResizeObserver"in i),s=()=>{l&&(l.disconnect(),l=void 0)},c=d(()=>{const e=o(n);return Array.isArray(e)?e.map(e=>P(e)):[P(e)]}),f=e(c,e=>{if(s(),u.value&&i){l=new ResizeObserver(t);for(const n of e)n&&l.observe(n,a)}},{immediate:!0,flush:"post"}),v=()=>{s(),f()};return b(v),{isSupported:u,stop:v}}function M(n,t,o,r={}){var i,a,l;const{clone:u=!1,passive:s=!1,eventName:v,deep:p=!1,defaultValue:m,shouldEmit:b}=r,y=c(),w=o||(null==y?void 0:y.emit)||(null==(i=null==y?void 0:y.$emit)?void 0:i.bind(y))||(null==(l=null==(a=null==y?void 0:y.proxy)?void 0:a.$emit)?void 0:l.bind(null==y?void 0:y.proxy));let h=v;t||(t="modelValue"),h=h||`update:${t.toString()}`;const j=e=>{return u?"function"==typeof u?u(e):(n=e,JSON.parse(JSON.stringify(n))):e;var n},O=()=>void 0!==n[t]?j(n[t]):m,$=e=>{b?b(e)&&w(h,e):w(h,e)};if(s){const o=O(),r=f(o);let i=!1;return e(()=>n[t],e=>{i||(i=!0,r.value=j(e),g(()=>i=!1))}),e(r,e=>{i||e===n[t]&&!p||$(e)},{deep:p}),r}return d({get:()=>O(),set(e){$(e)}})}function V(){const e=c(),n=f(),t=d(()=>["#text","#comment"].includes(n.value?.$el.nodeName)?n.value?.$el.nextElementSibling:P(n)),o=Object.assign({},e.exposed),r={};for(const i in e.props)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>e.props[i]});if(Object.keys(o).length>0)for(const i in o)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>o[i]});return Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r,{forwardRef:function(t){n.value=t,t&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>t instanceof Element?t:t.$el}),e.exposed=r)},currentRef:n,currentElement:t}}export{O as a,k as b,w as c,P as d,V as e,y as f,T as g,M as h,h as i,m as j,J as k,E as l,R as o,A as r,S as t,N as u};
