2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
|
|
(function(o,u){"use strict";function H(e,t){var n;const r=u.shallowRef();return u.watchEffect(()=>{r.value=e()},{...t,flush:(n=t?.flush)!=null?n:"sync"}),u.readonly(r)}function G(e,t){let n,r,i;const c=u.ref(!0),l=()=>{c.value=!0,i()};u.watch(e,l,{flush:"sync"});const a=typeof t=="function"?t:t.get,f=typeof t=="function"?void 0:t.set,y=u.customRef((h,m)=>(r=h,i=m,{get(){return c.value&&(n=a(n),c.value=!1),r(),n},set(d){f?.(d)}}));return Object.isExtensible(y)&&(y.trigger=l),y}function A(e){return u.getCurrentScope()?(u.onScopeDispose(e),!0):!1}function de(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const c=()=>t(i);return A(c),{off:c}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(c=>c(...i)))}}function me(e){let t=!1,n;const r=u.effectScope(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}const T=new WeakMap,z=(...e)=>{var t;const n=e[0],r=(t=u.getCurrentInstance())==null?void 0:t.proxy;if(r==null)throw new Error("injectLocal must be called in setup");return T.has(r)&&n in T.get(r)?T.get(r)[n]:u.inject(...e)},q=(e,t)=>{var n;const r=(n=u.getCurrentInstance())==null?void 0:n.proxy;if(r==null)throw new Error("provideLocal must be called in setup");T.has(r)||T.set(r,Object.create(null));const i=T.get(r);i[e]=t,u.provide(e,t)};function he(e,t){const n=t?.injectionKey||Symbol(e.name||"InjectionState"),r=t?.defaultValue;return[(...l)=>{const a=e(...l);return q(n,a),a},()=>z(n,r)]}function ye(e){let t=0,n,r;const i=()=>{t-=1,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...c)=>(t+=1,r||(r=u.effectScope(!0),n=r.run(()=>e(...c))),A(i),n)}function Z(e,t,{enumerable:n=!1,unwrap:r=!0}={}){for(const[i,c]of Object.entries(t))i!=="value"&&(u.isRef(c)&&r?Object.defineProperty(e,i,{get(){return c.value},set(l){c.value=l},enumerable:n}):Object.defineProperty(e,i,{value:c,enumerable:n}));return e}function ge(e,t){return t==null?u.unref(e):u.unref(e)[t]}function we(e){return u.unref(e)!=null}function be(e,t){if(typeof Symbol<"u"){const n={...e};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:t[r++],done:r>t.length})}}}),n}else return Object.assign([...t],e)}function s(e){return typeof e=="function"?e():u.unref(e)}const pe=s;function E(e,t){const n=t?.computedGetter===!1?u.unref:s;return function(...r){return u.computed(()=>e.apply(this,r.map(i=>n(i))))}}function ve(e,t={}){let n=[],r;if(Array.isArray(t))n=t;else{r=t;const{includeOwnProperties:i=!0}=t;n.push(...Object.keys(e)),i&&n.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(n.map(i=>{const c=e[i];return[i,typeof c=="function"?E(c.bind(e),r):c]}))}function J(e){if(!u.isRef(e))return u.reactive(e);const t=new Proxy({},{get(n,r,i){return u.unref(Reflect.get(e.value,r,i))},set(n,r,i){return u.isRef(e.value[r])&&!u.isRef(i)?e.value[r].value=i:e.value[r]=i,!0},deleteProperty(n,r){return Reflect.deleteProperty(e.value,r)},has(n,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return u.reactive(t)}function _(e){return J(u.computed(e))}function Ae(e,...t){const n=t.flat(),r=n[0];return _(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(e)).filter(([i,c])=>!r(s(c),i)):Object.entries(u.toRefs(e)).filter(i=>!n.includes(i[0]))))}const F=typeof window<"u"&&typeof document<"u",Oe=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Se=e=>typeof e<"u",Te=e=>e!=null,De=(e,...t)=>{e||console.warn(...t)},Fe=Object.prototype.toString,X=e=>Fe.call(e)==="[object Object]",Me=()=>Date.now(),K=()=>+Date.now(),Pe=(e,t,n)=>Math.min(n,Math.max(t,e)),O=()=>{},Re=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),Ie=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ce=ke();function ke(){var e,t;return F&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function M(e,t){function n(...r){return new Promise((i,c)
|