@vueuse/shared
Advanced tools
Comparing version 10.2.1 to 10.3.0
import * as vue_demi from 'vue-demi'; | ||
import { WatchOptionsBase, Ref, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions, WatchOptions, ShallowUnwrapRef as ShallowUnwrapRef$1, UnwrapRef, ToRef, ToRefs, WatchCallback, WatchStopHandle } from 'vue-demi'; | ||
import { WatchOptionsBase, Ref, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions, WatchOptions, ShallowUnwrapRef as ShallowUnwrapRef$1, UnwrapNestedRefs, UnwrapRef, ToRef, ToRefs, MaybeRef as MaybeRef$1, WatchCallback, WatchStopHandle } from 'vue-demi'; | ||
@@ -223,2 +223,5 @@ declare function computedEager<T>(fn: () => T, options?: WatchOptionsBase): Readonly<Ref<T>>; | ||
declare const hyphenate: (str: string) => string; | ||
declare const camelize: (str: string) => string; | ||
declare function promiseTimeout(ms: number, throwOnTimeout?: boolean, reason?: string): Promise<void>; | ||
@@ -366,3 +369,3 @@ declare function identity<T>(arg: T): T; | ||
*/ | ||
declare function reactiveComputed<T extends {}>(fn: () => T): T; | ||
declare function reactiveComputed<T extends object>(fn: () => T): UnwrapNestedRefs<T>; | ||
@@ -515,3 +518,3 @@ type ReactiveOmitPredicate<T> = (value: T[keyof T], key: keyof T) => boolean; | ||
*/ | ||
declare function toReactive<T extends object>(objectRef: MaybeRef<T>): T; | ||
declare function toReactive<T extends object>(objectRef: MaybeRef<T>): UnwrapNestedRefs<T>; | ||
@@ -532,2 +535,10 @@ /** | ||
interface ToRefsOptions { | ||
/** | ||
* Replace the original ref with a copy on property update. | ||
* | ||
* @default true | ||
*/ | ||
replaceRef?: MaybeRefOrGetter<boolean>; | ||
} | ||
/** | ||
@@ -539,3 +550,3 @@ * Extended `toRefs` that also accepts refs of an object. | ||
*/ | ||
declare function toRefs<T extends object>(objectRef: MaybeRef<T>): ToRefs<T>; | ||
declare function toRefs<T extends object>(objectRef: MaybeRef<T>, options?: ToRefsOptions): ToRefs<T>; | ||
@@ -793,3 +804,3 @@ /** | ||
*/ | ||
declare function useCounter(initialValue?: number, options?: UseCounterOptions): { | ||
declare function useCounter(initialValue?: MaybeRef$1<number>, options?: UseCounterOptions): { | ||
count: vue_demi.Ref<number>; | ||
@@ -1091,2 +1102,2 @@ inc: (delta?: number) => number; | ||
export { AnyFn, ArgumentsType, Arrayable, Awaitable, ComputedRefWithControl, ComputedWithControlRefExtra, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, MapOldSources, MapSources, MaybeRef, MaybeRefOrGetter, MultiWatchSources, Mutable, Pausable, PromisifyFn, Reactified, ReactifyNested, ReactifyObjectOptions, ReactifyOptions, ReactiveOmitPredicate, ReactivePickPredicate, ReadonlyRefOrGetter, RemovableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stoppable, SyncRefOptions, SyncRefsOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseArrayIncludesComparatorFn, UseArrayIncludesOptions, UseArrayReducer, UseCounterOptions, UseDateFormatOptions, UseDateFormatReturn, UseIntervalControls, UseIntervalFnOptions, UseIntervalOptions, UseLastChangedOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseToNumberOptions, UseToggleOptions, WatchArrayCallback, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchTriggerableCallback, WatchTriggerableReturn, WatchWithFilterOptions, WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever }; | ||
export { AnyFn, ArgumentsType, Arrayable, Awaitable, ComputedRefWithControl, ComputedWithControlRefExtra, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, MapOldSources, MapSources, MaybeRef, MaybeRefOrGetter, MultiWatchSources, Mutable, Pausable, PromisifyFn, Reactified, ReactifyNested, ReactifyObjectOptions, ReactifyOptions, ReactiveOmitPredicate, ReactivePickPredicate, ReadonlyRefOrGetter, RemovableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stoppable, SyncRefOptions, SyncRefsOptions, ToRefsOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseArrayIncludesComparatorFn, UseArrayIncludesOptions, UseArrayReducer, UseCounterOptions, UseDateFormatOptions, UseDateFormatReturn, UseIntervalControls, UseIntervalFnOptions, UseIntervalOptions, UseLastChangedOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseToNumberOptions, UseToggleOptions, WatchArrayCallback, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchTriggerableCallback, WatchTriggerableReturn, WatchWithFilterOptions, WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever }; |
@@ -560,2 +560,18 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) { | ||
function cacheStringFunction(fn) { | ||
const cache = /* @__PURE__ */ Object.create(null); | ||
return (str) => { | ||
const hit = cache[str]; | ||
return hit || (cache[str] = fn(str)); | ||
}; | ||
} | ||
const hyphenateRE = /\B([A-Z])/g; | ||
const hyphenate = cacheStringFunction( | ||
(str) => str.replace(hyphenateRE, "-$1").toLowerCase() | ||
); | ||
const camelizeRE = /-(\w)/g; | ||
const camelize = cacheStringFunction((str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
}); | ||
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") { | ||
@@ -842,6 +858,6 @@ return new Promise((resolve, reject) => { | ||
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)); | ||
function toRefs(objectRef) { | ||
function toRefs(objectRef, options = {}) { | ||
if (!vueDemi.isRef(objectRef)) | ||
return vueDemi.toRefs(objectRef); | ||
const result = Array.isArray(objectRef.value) ? new Array(objectRef.value.length) : {}; | ||
const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {}; | ||
for (const key in objectRef.value) { | ||
@@ -853,10 +869,16 @@ result[key] = vueDemi.customRef(() => ({ | ||
set(v) { | ||
if (Array.isArray(objectRef.value)) { | ||
const copy = [...objectRef.value]; | ||
copy[key] = v; | ||
objectRef.value = copy; | ||
var _a; | ||
const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true; | ||
if (replaceRef) { | ||
if (Array.isArray(objectRef.value)) { | ||
const copy = [...objectRef.value]; | ||
copy[key] = v; | ||
objectRef.value = copy; | ||
} else { | ||
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v }); | ||
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); | ||
objectRef.value = newObject; | ||
} | ||
} else { | ||
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v }); | ||
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); | ||
objectRef.value = newObject; | ||
objectRef.value[key] = v; | ||
} | ||
@@ -1130,6 +1152,7 @@ } | ||
function useCounter(initialValue = 0, options = {}) { | ||
let _initialValue = vueDemi.unref(initialValue); | ||
const count = vueDemi.ref(initialValue); | ||
const { | ||
max = Infinity, | ||
min = -Infinity | ||
max = Number.POSITIVE_INFINITY, | ||
min = Number.NEGATIVE_INFINITY | ||
} = options; | ||
@@ -1140,4 +1163,4 @@ const inc = (delta = 1) => count.value = Math.min(max, count.value + delta); | ||
const set = (val) => count.value = Math.max(min, Math.min(max, val)); | ||
const reset = (val = initialValue) => { | ||
initialValue = val; | ||
const reset = (val = _initialValue) => { | ||
_initialValue = val; | ||
return set(val); | ||
@@ -1195,4 +1218,4 @@ }; | ||
return formatStr.replace(REGEX_FORMAT, (match, $1) => { | ||
var _a2; | ||
return $1 || ((_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) || match; | ||
var _a2, _b; | ||
return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match; | ||
}); | ||
@@ -1202,3 +1225,3 @@ } | ||
if (date === null) | ||
return /* @__PURE__ */ new Date(NaN); | ||
return new Date(Number.NaN); | ||
if (date === void 0) | ||
@@ -1444,3 +1467,3 @@ return /* @__PURE__ */ new Date(); | ||
return vueDemi.watch(source, (newList, _, onCleanup) => { | ||
const oldListRemains = new Array(oldList.length); | ||
const oldListRemains = Array.from({ length: oldList.length }); | ||
const added = []; | ||
@@ -1918,2 +1941,3 @@ for (const obj of newList) { | ||
exports.bypassFilter = bypassFilter; | ||
exports.camelize = camelize; | ||
exports.clamp = clamp; | ||
@@ -1941,2 +1965,3 @@ exports.computedEager = computedEager; | ||
exports.hasOwn = hasOwn; | ||
exports.hyphenate = hyphenate; | ||
exports.identity = identity; | ||
@@ -1943,0 +1968,0 @@ exports.ignorableWatch = watchIgnorable; |
@@ -1,1 +0,1 @@ | ||
var VueDemi=function(a,i,T){if(a.install)return a;if(!i)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),a;if(i.version.slice(0,4)==="2.7."){let h=function(P,j){var g,N={},U={config:i.config,use:i.use.bind(i),mixin:i.mixin.bind(i),component:i.component.bind(i),provide:function($,S){return N[$]=S,this},directive:function($,S){return S?(i.directive($,S),U):i.directive($)},mount:function($,S){return g||(g=new i(Object.assign({propsData:j},P,{provide:Object.assign(N,P.provide)})),g.$mount($,S),g)},unmount:function(){g&&(g.$destroy(),g=void 0)}};return U};var tt=h;for(var b in i)a[b]=i[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.warn=i.util.warn,a.hasInjectionContext=()=>!!a.getCurrentInstance(),a.createApp=h}else if(i.version.slice(0,2)==="2.")if(T){for(var b in T)a[b]=T[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.hasInjectionContext=()=>!!a.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(i.version.slice(0,2)==="3."){for(var b in i)a[b]=i[b];a.isVue2=!1,a.isVue3=!0,a.install=function(){},a.Vue=i,a.Vue2=void 0,a.version=i.version,a.set=function(h,P,j){return Array.isArray(h)?(h.length=Math.max(h.length,P),h.splice(P,1,j),j):(h[P]=j,j)},a.del=function(h,P){if(Array.isArray(h)){h.splice(P,1);return}delete h[P]}}else console.error("[vue-demi] Vue version "+i.version+" is unsupported.");return a}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(a,i){"use strict";var T=Object.defineProperty,b=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,g=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&g(t,r,e[r]);if(h)for(var r of h(e))j.call(e,r)&&g(t,r,e[r]);return t},U=(t,e)=>b(t,tt(e));function $(t,e){var r;const n=i.shallowRef();return i.watchEffect(()=>{n.value=t()},U(N({},e),{flush:(r=e?.flush)!=null?r:"sync"})),i.readonly(n)}function S(t,e){let r,n,o;const c=i.ref(!0),l=()=>{c.value=!0,o()};i.watch(t,l,{flush:"sync"});const u=typeof e=="function"?e:e.get,f=typeof e=="function"?void 0:e.set,_=i.customRef((d,p)=>(n=d,o=p,{get(){return c.value&&(r=u(),c.value=!1),n(),r},set(y){f?.(y)}}));return Object.isExtensible(_)&&(_.trigger=l),_}function A(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}function Jt(){const t=new Set,e=o=>{t.delete(o)};return{on:o=>{t.add(o);const c=()=>e(o);return A(c),{off:c}},off:e,trigger:o=>Promise.all(Array.from(t).map(c=>c(o)))}}function Xt(t){let e=!1,r;const n=i.effectScope(!0);return(...o)=>(e||(r=n.run(()=>t(...o)),e=!0),r)}function Kt(t){const e=Symbol("InjectionState");return[(...o)=>{const c=t(...o);return i.provide(e,c),c},()=>i.inject(e)]}function Qt(t){let e=0,r,n;const o=()=>{e-=1,n&&e<=0&&(n.stop(),r=void 0,n=void 0)};return(...c)=>(e+=1,r||(n=i.effectScope(!0),r=n.run(()=>t(...c))),A(o),r)}function et(t,e,{enumerable:r=!1,unwrap:n=!0}={}){if(!i.isVue3&&!i.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");return}for(const[o,c]of Object.entries(e))o!=="value"&&(i.isRef(c)&&n?Object.defineProperty(t,o,{get(){return c.value},set(l){c.value=l},enumerable:r}):Object.defineProperty(t,o,{value:c,enumerable:r}));return t}function Vt(t,e){return e==null?i.unref(t):i.unref(t)[e]}function Dt(t){return i.unref(t)!=null}var xt=Object.defineProperty,rt=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,nt=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,re=(t,e)=>{for(var r in e||(e={}))te.call(e,r)&&nt(t,r,e[r]);if(rt)for(var r of rt(e))ee.call(e,r)&&nt(t,r,e[r]);return t};function ne(t,e){if(typeof Symbol<"u"){const r=re({},t);return Object.defineProperty(r,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:e[n++],done:n>e.length})}}}),r}else return Object.assign([...e],t)}function s(t){return typeof t=="function"?t():i.unref(t)}const oe=s;function G(t,e){const r=e?.computedGetter===!1?i.unref:s;return function(...n){return i.computed(()=>t.apply(this,n.map(o=>r(o))))}}function ae(t,e={}){let r=[],n;if(Array.isArray(e))r=e;else{n=e;const{includeOwnProperties:o=!0}=e;r.push(...Object.keys(t)),o&&r.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(r.map(o=>{const c=t[o];return[o,typeof c=="function"?G(c.bind(t),n):c]}))}function ot(t){if(!i.isRef(t))return i.reactive(t);const e=new Proxy({},{get(r,n,o){return i.unref(Reflect.get(t.value,n,o))},set(r,n,o){return i.isRef(t.value[n])&&!i.isRef(o)?t.value[n].value=o:t.value[n]=o,!0},deleteProperty(r,n){return Reflect.deleteProperty(t.value,n)},has(r,n){return Reflect.has(t.value,n)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return i.reactive(e)}function q(t){return ot(i.computed(t))}function ie(t,...e){const r=e.flat(),n=r[0];return q(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(t)).filter(([o,c])=>!n(s(c),o)):Object.entries(i.toRefs(t)).filter(o=>!r.includes(o[0]))))}const R=typeof window<"u",ce=t=>typeof t<"u",le=t=>t!=null,ue=(t,...e)=>{t||console.warn(...e)},se=Object.prototype.toString,at=t=>se.call(t)==="[object Object]",fe=()=>Date.now(),it=()=>+Date.now(),de=(t,e,r)=>Math.min(r,Math.max(e,t)),I=()=>{},pe=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),ye=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),_e=ve();function ve(){var t;return R&&((t=window?.navigator)==null?void 0:t.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function M(t,e){function r(...n){return new Promise((o,c)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(o).catch(c)})}return r}const W=t=>t();function z(t,e={}){let r,n,o=I;const c=u=>{clearTimeout(u),o(),o=I};return u=>{const f=s(t),_=s(e.maxWait);return r&&c(r),f<=0||_!==void 0&&_<=0?(n&&(c(n),n=null),Promise.resolve(u())):new Promise((d,p)=>{o=e.rejectOnCancel?p:d,_&&!n&&(n=setTimeout(()=>{r&&c(r),n=null,d(u())},_)),r=setTimeout(()=>{n&&c(n),n=null,d(u())},f)})}}function Z(t,e=!0,r=!0,n=!1){let o=0,c,l=!0,u=I,f;const _=()=>{c&&(clearTimeout(c),c=void 0,u(),u=I)};return p=>{const y=s(t),O=Date.now()-o,v=()=>f=p();return _(),y<=0?(o=Date.now(),v()):(O>y&&(r||!l)?(o=Date.now(),v()):e&&(f=new Promise((m,w)=>{u=n?w:m,c=setTimeout(()=>{o=Date.now(),l=!0,m(v()),_()},Math.max(0,y-O))})),!r&&!c&&(c=setTimeout(()=>l=!0,y)),l=!1,f)}}function ct(t=W){const e=i.ref(!0);function r(){e.value=!1}function n(){e.value=!0}const o=(...c)=>{e.value&&t(...c)};return{isActive:i.readonly(e),pause:r,resume:n,eventFilter:o}}const Oe={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function J(t,e=!1,r="Timeout"){return new Promise((n,o)=>{setTimeout(e?()=>o(r):n,t)})}function he(t){return t}function we(t){let e;function r(){return e||(e=t()),e}return r.reset=async()=>{const n=e;e=void 0,n&&await n},r}function me(t){return t()}function lt(t,...e){return e.some(r=>r in t)}function Pe(t,e){var r;if(typeof t=="number")return t+e;const n=((r=t.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:r[0])||"",o=t.slice(n.length),c=Number.parseFloat(n)+e;return Number.isNaN(c)?t:c+o}function ge(t,e,r=!1){return e.reduce((n,o)=>(o in t&&(!r||t[o]!==void 0)&&(n[o]=t[o]),n),{})}function be(t,e,r=!1){return Object.fromEntries(Object.entries(t).filter(([n,o])=>(!r||o!==void 0)&&!e.includes(n)))}function $e(t){return Object.entries(t)}function X(...t){if(t.length!==1)return i.toRef(...t);const e=t[0];return typeof e=="function"?i.readonly(i.customRef(()=>({get:e,set:I}))):i.ref(e)}const Se=X;function je(t,...e){const r=e.flat(),n=r[0];return q(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(t)).filter(([o,c])=>n(s(c),o)):r.map(o=>[o,X(t,o)])))}function ut(t,e=1e4){return i.customRef((r,n)=>{let o=t,c;const l=()=>setTimeout(()=>{o=t,n()},s(e));return A(()=>{clearTimeout(c)}),{get(){return r(),o},set(u){o=u,n(),clearTimeout(c),c=l()}}})}function st(t,e=200,r={}){return M(z(e,r),t)}function K(t,e=200,r={}){const n=i.ref(t.value),o=st(()=>{n.value=t.value},e,r);return i.watch(t,()=>o()),n}function Ae(t,e){return i.computed({get(){var r;return(r=t.value)!=null?r:e},set(r){t.value=r}})}function ft(t,e=200,r=!1,n=!0,o=!1){return M(Z(e,r,n,o),t)}function Q(t,e=200,r=!0,n=!0){if(e<=0)return t;const o=i.ref(t.value),c=ft(()=>{o.value=t.value},e,r,n);return i.watch(t,()=>c()),o}function dt(t,e={}){let r=t,n,o;const c=i.customRef((y,O)=>(n=y,o=O,{get(){return l()},set(v){u(v)}}));function l(y=!0){return y&&n(),r}function u(y,O=!0){var v,m;if(y===r)return;const w=r;((v=e.onBeforeChange)==null?void 0:v.call(e,y,w))!==!1&&(r=y,(m=e.onChanged)==null||m.call(e,y,w),O&&o())}return et(c,{get:l,set:u,untrackedGet:()=>l(!1),silentSet:y=>u(y,!1),peek:()=>l(!1),lay:y=>u(y,!1)},{enumerable:!0})}const Ie=dt;function Ee(...t){if(t.length===2){const[e,r]=t;e.value=r}if(t.length===3)if(i.isVue2)i.set(...t);else{const[e,r,n]=t;e[r]=n}}function Fe(t,e,r={}){var n,o;const{flush:c="sync",deep:l=!1,immediate:u=!0,direction:f="both",transform:_={}}=r;let d,p;const y=(n=_.ltr)!=null?n:v=>v,O=(o=_.rtl)!=null?o:v=>v;return(f==="both"||f==="ltr")&&(d=i.watch(t,v=>e.value=y(v),{flush:c,deep:l,immediate:u})),(f==="both"||f==="rtl")&&(p=i.watch(e,v=>t.value=O(v),{flush:c,deep:l,immediate:u})),()=>{d?.(),p?.()}}function Te(t,e,r={}){const{flush:n="sync",deep:o=!1,immediate:c=!0}=r;return Array.isArray(e)||(e=[e]),i.watch(t,l=>e.forEach(u=>u.value=l),{flush:n,deep:o,immediate:c})}var Re=Object.defineProperty,Me=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,yt=(t,e,r)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,We=(t,e)=>{for(var r in e||(e={}))Ne.call(e,r)&&yt(t,r,e[r]);if(pt)for(var r of pt(e))Ue.call(e,r)&&yt(t,r,e[r]);return t},Le=(t,e)=>Me(t,Ce(e));function Be(t){if(!i.isRef(t))return i.toRefs(t);const e=Array.isArray(t.value)?new Array(t.value.length):{};for(const r in t.value)e[r]=i.customRef(()=>({get(){return t.value[r]},set(n){if(Array.isArray(t.value)){const o=[...t.value];o[r]=n,t.value=o}else{const o=Le(We({},t.value),{[r]:n});Object.setPrototypeOf(o,Object.getPrototypeOf(t.value)),t.value=o}}}));return e}function He(t,e=!0){i.getCurrentInstance()?i.onBeforeMount(t):e?t():i.nextTick(t)}function Ye(t){i.getCurrentInstance()&&i.onBeforeUnmount(t)}function ke(t,e=!0){i.getCurrentInstance()?i.onMounted(t):e?t():i.nextTick(t)}function Ge(t){i.getCurrentInstance()&&i.onUnmounted(t)}function V(t,e=!1){function r(p,{flush:y="sync",deep:O=!1,timeout:v,throwOnTimeout:m}={}){let w=null;const x=[new Promise(k=>{w=i.watch(t,F=>{p(F)!==e&&(w?.(),k(F))},{flush:y,deep:O,immediate:!0})})];return v!=null&&x.push(J(v,m).then(()=>s(t)).finally(()=>w?.())),Promise.race(x)}function n(p,y){if(!i.isRef(p))return r(F=>F===p,y);const{flush:O="sync",deep:v=!1,timeout:m,throwOnTimeout:w}=y??{};let E=null;const k=[new Promise(F=>{E=i.watch([t,p],([Zt,Cn])=>{e!==(Zt===Cn)&&(E?.(),F(Zt))},{flush:O,deep:v,immediate:!0})})];return m!=null&&k.push(J(m,w).then(()=>s(t)).finally(()=>(E?.(),s(t)))),Promise.race(k)}function o(p){return r(y=>!!y,p)}function c(p){return n(null,p)}function l(p){return n(void 0,p)}function u(p){return r(Number.isNaN,p)}function f(p,y){return r(O=>{const v=Array.from(O);return v.includes(p)||v.includes(s(p))},y)}function _(p){return d(1,p)}function d(p=1,y){let O=-1;return r(()=>(O+=1,O>=p),y)}return Array.isArray(s(t))?{toMatch:r,toContains:f,changed:_,changedTimes:d,get not(){return V(t,!e)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:c,toBeNaN:u,toBeUndefined:l,changed:_,changedTimes:d,get not(){return V(t,!e)}}}function qe(t){return V(t)}function ze(t,e){return t===e}function Ze(...t){var e;const r=t[0],n=t[1];let o=(e=t[2])!=null?e:ze;if(typeof o=="string"){const c=o;o=(l,u)=>l[c]===u[c]}return i.computed(()=>s(r).filter(c=>s(n).findIndex(l=>o(c,l))===-1))}function Je(t,e){return i.computed(()=>s(t).every((r,n,o)=>e(s(r),n,o)))}function Xe(t,e){return i.computed(()=>s(t).map(r=>s(r)).filter(e))}function Ke(t,e){return i.computed(()=>s(s(t).find((r,n,o)=>e(s(r),n,o))))}function Qe(t,e){return i.computed(()=>s(t).findIndex((r,n,o)=>e(s(r),n,o)))}function Ve(t,e){let r=t.length;for(;r-- >0;)if(e(t[r],r,t))return t[r]}function De(t,e){return i.computed(()=>s(Array.prototype.findLast?s(t).findLast((r,n,o)=>e(s(r),n,o)):Ve(s(t),(r,n,o)=>e(s(r),n,o))))}function xe(t){return at(t)&<(t,"formIndex","comparator")}function tr(...t){var e;const r=t[0],n=t[1];let o=t[2],c=0;if(xe(o)&&(c=(e=o.fromIndex)!=null?e:0,o=o.comparator),typeof o=="string"){const l=o;o=(u,f)=>u[l]===s(f)}return o=o??((l,u)=>l===s(u)),i.computed(()=>s(r).slice(c).some((l,u,f)=>o(s(l),s(n),u,s(f))))}function er(t,e){return i.computed(()=>s(t).map(r=>s(r)).join(s(e)))}function rr(t,e){return i.computed(()=>s(t).map(r=>s(r)).map(e))}function nr(t,e,...r){const n=(o,c,l)=>e(s(o),s(c),l);return i.computed(()=>{const o=s(t);return r.length?o.reduce(n,s(r[0])):o.reduce(n)})}function or(t,e){return i.computed(()=>s(t).some((r,n,o)=>e(s(r),n,o)))}function ar(t){return Array.from(new Set(t))}function ir(t,e){return t.reduce((r,n)=>(r.some(o=>e(n,o,t))||r.push(n),r),[])}function cr(t,e){return i.computed(()=>{const r=s(t).map(n=>s(n));return e?ir(r,e):ar(r)})}function lr(t=0,e={}){const r=i.ref(t),{max:n=1/0,min:o=-1/0}=e,c=(d=1)=>r.value=Math.min(n,r.value+d),l=(d=1)=>r.value=Math.max(o,r.value-d),u=()=>r.value,f=d=>r.value=Math.max(o,Math.min(n,d));return{count:r,inc:c,dec:l,get:u,set:f,reset:(d=t)=>(t=d,f(d))}}const ur=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,sr=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function fr(t,e,r,n){let o=t<12?"AM":"PM";return n&&(o=o.split("").reduce((c,l)=>c+=`${l}.`,"")),r?o.toLowerCase():o}function _t(t,e,r={}){var n;const o=t.getFullYear(),c=t.getMonth(),l=t.getDate(),u=t.getHours(),f=t.getMinutes(),_=t.getSeconds(),d=t.getMilliseconds(),p=t.getDay(),y=(n=r.customMeridiem)!=null?n:fr,O={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>c+1,MM:()=>`${c+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(l),DD:()=>`${l}`.padStart(2,"0"),H:()=>String(u),HH:()=>`${u}`.padStart(2,"0"),h:()=>`${u%12||12}`.padStart(1,"0"),hh:()=>`${u%12||12}`.padStart(2,"0"),m:()=>String(f),mm:()=>`${f}`.padStart(2,"0"),s:()=>String(_),ss:()=>`${_}`.padStart(2,"0"),SSS:()=>`${d}`.padStart(3,"0"),d:()=>p,dd:()=>t.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>y(u,f),AA:()=>y(u,f,!1,!0),a:()=>y(u,f,!0),aa:()=>y(u,f,!0,!0)};return e.replace(sr,(v,m)=>{var w;return m||((w=O[v])==null?void 0:w.call(O))||v})}function vt(t){if(t===null)return new Date(NaN);if(t===void 0)return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){const e=t.match(ur);if(e){const r=e[2]-1||0,n=(e[7]||"0").substring(0,3);return new Date(e[1],r,e[3]||1,e[4]||0,e[5]||0,e[6]||0,n)}}return new Date(t)}function dr(t,e="HH:mm:ss",r={}){return i.computed(()=>_t(vt(s(t)),s(e),r))}function Ot(t,e=1e3,r={}){const{immediate:n=!0,immediateCallback:o=!1}=r;let c=null;const l=i.ref(!1);function u(){c&&(clearInterval(c),c=null)}function f(){l.value=!1,u()}function _(){const d=s(e);d<=0||(l.value=!0,o&&t(),u(),c=setInterval(t,d))}if(n&&R&&_(),i.isRef(e)||typeof e=="function"){const d=i.watch(e,()=>{l.value&&R&&_()});A(d)}return A(f),{isActive:l,pause:f,resume:_}}var pr=Object.defineProperty,ht=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,wt=(t,e,r)=>e in t?pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vr=(t,e)=>{for(var r in e||(e={}))yr.call(e,r)&&wt(t,r,e[r]);if(ht)for(var r of ht(e))_r.call(e,r)&&wt(t,r,e[r]);return t};function Or(t=1e3,e={}){const{controls:r=!1,immediate:n=!0,callback:o}=e,c=i.ref(0),l=()=>c.value+=1,u=()=>{c.value=0},f=Ot(o?()=>{l(),o(c.value)}:l,t,{immediate:n});return r?vr({counter:c,reset:u},f):c}function hr(t,e={}){var r;const n=i.ref((r=e.initialValue)!=null?r:null);return i.watch(t,()=>n.value=it(),e),n}function mt(t,e,r={}){const{immediate:n=!0}=r,o=i.ref(!1);let c=null;function l(){c&&(clearTimeout(c),c=null)}function u(){o.value=!1,l()}function f(..._){l(),o.value=!0,c=setTimeout(()=>{o.value=!1,c=null,t(..._)},s(e))}return n&&(o.value=!0,R&&f()),A(u),{isPending:i.readonly(o),start:f,stop:u}}var wr=Object.defineProperty,Pt=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,gt=(t,e,r)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gr=(t,e)=>{for(var r in e||(e={}))mr.call(e,r)&>(t,r,e[r]);if(Pt)for(var r of Pt(e))Pr.call(e,r)&>(t,r,e[r]);return t};function br(t=1e3,e={}){const{controls:r=!1,callback:n}=e,o=mt(n??I,t,e),c=i.computed(()=>!o.isPending.value);return r?gr({ready:c},o):c}function $r(t,e={}){const{method:r="parseFloat",radix:n,nanToZero:o}=e;return i.computed(()=>{let c=s(t);return typeof c=="string"&&(c=Number[r](c,n)),o&&Number.isNaN(c)&&(c=0),c})}function Sr(t){return i.computed(()=>`${s(t)}`)}function jr(t=!1,e={}){const{truthyValue:r=!0,falsyValue:n=!1}=e,o=i.isRef(t),c=i.ref(t);function l(u){if(arguments.length)return c.value=u,c.value;{const f=s(r);return c.value=c.value===f?s(n):f,c.value}}return o?l:[c,l]}function Ar(t,e,r){let n=r?.immediate?[]:[...t instanceof Function?t():Array.isArray(t)?t:s(t)];return i.watch(t,(o,c,l)=>{const u=new Array(n.length),f=[];for(const d of o){let p=!1;for(let y=0;y<n.length;y++)if(!u[y]&&d===n[y]){u[y]=!0,p=!0;break}p||f.push(d)}const _=n.filter((d,p)=>!u[p]);e(o,n,f,_,l),n=[...o]},r)}var bt=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,Fr=(t,e)=>{var r={};for(var n in t)Ir.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&bt)for(var n of bt(t))e.indexOf(n)<0&&Er.call(t,n)&&(r[n]=t[n]);return r};function C(t,e,r={}){const n=r,{eventFilter:o=W}=n,c=Fr(n,["eventFilter"]);return i.watch(t,M(o,e),c)}var $t=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,Mr=(t,e)=>{var r={};for(var n in t)Tr.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&$t)for(var n of $t(t))e.indexOf(n)<0&&Rr.call(t,n)&&(r[n]=t[n]);return r};function Cr(t,e,r){const n=r,{count:o}=n,c=Mr(n,["count"]),l=i.ref(0),u=C(t,(...f)=>{l.value+=1,l.value>=s(o)&&i.nextTick(()=>u()),e(...f)},c);return{count:l,stop:u}}var Nr=Object.defineProperty,Ur=Object.defineProperties,Wr=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,At=(t,e,r)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Lr=(t,e)=>{for(var r in e||(e={}))St.call(e,r)&&At(t,r,e[r]);if(L)for(var r of L(e))jt.call(e,r)&&At(t,r,e[r]);return t},Br=(t,e)=>Ur(t,Wr(e)),Hr=(t,e)=>{var r={};for(var n in t)St.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&L)for(var n of L(t))e.indexOf(n)<0&&jt.call(t,n)&&(r[n]=t[n]);return r};function It(t,e,r={}){const n=r,{debounce:o=0,maxWait:c=void 0}=n,l=Hr(n,["debounce","maxWait"]);return C(t,e,Br(Lr({},l),{eventFilter:z(o,{maxWait:c})}))}var Yr=Object.defineProperty,kr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Ft=(t,e,r)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Zr=(t,e)=>{for(var r in e||(e={}))qr.call(e,r)&&Ft(t,r,e[r]);if(Et)for(var r of Et(e))zr.call(e,r)&&Ft(t,r,e[r]);return t},Jr=(t,e)=>kr(t,Gr(e));function Xr(t,e,r){return i.watch(t,e,Jr(Zr({},r),{deep:!0}))}var Kr=Object.defineProperty,Qr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Mt=(t,e,r)=>e in t?Kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Dr=(t,e)=>{for(var r in e||(e={}))Tt.call(e,r)&&Mt(t,r,e[r]);if(B)for(var r of B(e))Rt.call(e,r)&&Mt(t,r,e[r]);return t},xr=(t,e)=>Qr(t,Vr(e)),tn=(t,e)=>{var r={};for(var n in t)Tt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&B)for(var n of B(t))e.indexOf(n)<0&&Rt.call(t,n)&&(r[n]=t[n]);return r};function D(t,e,r={}){const n=r,{eventFilter:o=W}=n,c=tn(n,["eventFilter"]),l=M(o,e);let u,f,_;if(c.flush==="sync"){const d=i.ref(!1);f=()=>{},u=p=>{d.value=!0,p(),d.value=!1},_=i.watch(t,(...p)=>{d.value||l(...p)},c)}else{const d=[],p=i.ref(0),y=i.ref(0);f=()=>{p.value=y.value},d.push(i.watch(t,()=>{y.value++},xr(Dr({},c),{flush:"sync"}))),u=O=>{const v=y.value;O(),p.value+=y.value-v},d.push(i.watch(t,(...O)=>{const v=p.value>0&&p.value===y.value;p.value=0,y.value=0,!v&&l(...O)},c)),_=()=>{d.forEach(O=>O())}}return{stop:_,ignoreUpdates:u,ignorePrevAsyncUpdates:f}}var en=Object.defineProperty,rn=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,Nt=(t,e,r)=>e in t?en(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,cn=(t,e)=>{for(var r in e||(e={}))on.call(e,r)&&Nt(t,r,e[r]);if(Ct)for(var r of Ct(e))an.call(e,r)&&Nt(t,r,e[r]);return t},ln=(t,e)=>rn(t,nn(e));function un(t,e,r){return i.watch(t,e,ln(cn({},r),{immediate:!0}))}function sn(t,e,r){const n=i.watch(t,(...o)=>(i.nextTick(()=>n()),e(...o)),r)}var fn=Object.defineProperty,dn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Lt=(t,e,r)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yn=(t,e)=>{for(var r in e||(e={}))Ut.call(e,r)&&Lt(t,r,e[r]);if(H)for(var r of H(e))Wt.call(e,r)&&Lt(t,r,e[r]);return t},_n=(t,e)=>dn(t,pn(e)),vn=(t,e)=>{var r={};for(var n in t)Ut.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&H)for(var n of H(t))e.indexOf(n)<0&&Wt.call(t,n)&&(r[n]=t[n]);return r};function Bt(t,e,r={}){const n=r,{eventFilter:o}=n,c=vn(n,["eventFilter"]),{eventFilter:l,pause:u,resume:f,isActive:_}=ct(o);return{stop:C(t,e,_n(yn({},c),{eventFilter:l})),pause:u,resume:f,isActive:_}}var On=Object.defineProperty,hn=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,kt=(t,e,r)=>e in t?On(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mn=(t,e)=>{for(var r in e||(e={}))Ht.call(e,r)&&kt(t,r,e[r]);if(Y)for(var r of Y(e))Yt.call(e,r)&&kt(t,r,e[r]);return t},Pn=(t,e)=>hn(t,wn(e)),gn=(t,e)=>{var r={};for(var n in t)Ht.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Y)for(var n of Y(t))e.indexOf(n)<0&&Yt.call(t,n)&&(r[n]=t[n]);return r};function Gt(t,e,r={}){const n=r,{throttle:o=0,trailing:c=!0,leading:l=!0}=n,u=gn(n,["throttle","trailing","leading"]);return C(t,e,Pn(mn({},u),{eventFilter:Z(o,c,l)}))}var bn=Object.defineProperty,$n=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,jn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,zt=(t,e,r)=>e in t?bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,In=(t,e)=>{for(var r in e||(e={}))jn.call(e,r)&&zt(t,r,e[r]);if(qt)for(var r of qt(e))An.call(e,r)&&zt(t,r,e[r]);return t},En=(t,e)=>$n(t,Sn(e));function Fn(t,e,r={}){let n;function o(){if(!n)return;const d=n;n=void 0,d()}function c(d){n=d}const l=(d,p)=>(o(),e(d,p,c)),u=D(t,l,r),{ignoreUpdates:f}=u,_=()=>{let d;return f(()=>{d=l(Tn(t),Rn(t))}),d};return En(In({},u),{trigger:_})}function Tn(t){return i.isReactive(t)?t:Array.isArray(t)?t.map(e=>s(e)):s(t)}function Rn(t){return Array.isArray(t)?t.map(()=>{}):void 0}function Mn(t,e,r){return i.watch(t,(n,o,c)=>{n&&e(n,o,c)},r)}a.assert=ue,a.autoResetRef=ut,a.bypassFilter=W,a.clamp=de,a.computedEager=$,a.computedWithControl=S,a.containsProp=lt,a.controlledComputed=S,a.controlledRef=Ie,a.createEventHook=Jt,a.createFilterWrapper=M,a.createGlobalState=Xt,a.createInjectionState=Kt,a.createReactiveFn=G,a.createSharedComposable=Qt,a.createSingletonPromise=we,a.debounceFilter=z,a.debouncedRef=K,a.debouncedWatch=It,a.directiveHooks=Oe,a.eagerComputed=$,a.extendRef=et,a.formatDate=_t,a.get=Vt,a.hasOwn=ye,a.identity=he,a.ignorableWatch=D,a.increaseWithUnit=Pe,a.invoke=me,a.isClient=R,a.isDef=ce,a.isDefined=Dt,a.isIOS=_e,a.isObject=at,a.makeDestructurable=ne,a.noop=I,a.normalizeDate=vt,a.notNullish=le,a.now=fe,a.objectEntries=$e,a.objectOmit=be,a.objectPick=ge,a.pausableFilter=ct,a.pausableWatch=Bt,a.promiseTimeout=J,a.rand=pe,a.reactify=G,a.reactifyObject=ae,a.reactiveComputed=q,a.reactiveOmit=ie,a.reactivePick=je,a.refAutoReset=ut,a.refDebounced=K,a.refDefault=Ae,a.refThrottled=Q,a.refWithControl=dt,a.resolveRef=Se,a.resolveUnref=oe,a.set=Ee,a.syncRef=Fe,a.syncRefs=Te,a.throttleFilter=Z,a.throttledRef=Q,a.throttledWatch=Gt,a.timestamp=it,a.toReactive=ot,a.toRef=X,a.toRefs=Be,a.toValue=s,a.tryOnBeforeMount=He,a.tryOnBeforeUnmount=Ye,a.tryOnMounted=ke,a.tryOnScopeDispose=A,a.tryOnUnmounted=Ge,a.until=qe,a.useArrayDifference=Ze,a.useArrayEvery=Je,a.useArrayFilter=Xe,a.useArrayFind=Ke,a.useArrayFindIndex=Qe,a.useArrayFindLast=De,a.useArrayIncludes=tr,a.useArrayJoin=er,a.useArrayMap=rr,a.useArrayReduce=nr,a.useArraySome=or,a.useArrayUnique=cr,a.useCounter=lr,a.useDateFormat=dr,a.useDebounce=K,a.useDebounceFn=st,a.useInterval=Or,a.useIntervalFn=Ot,a.useLastChanged=hr,a.useThrottle=Q,a.useThrottleFn=ft,a.useTimeout=br,a.useTimeoutFn=mt,a.useToNumber=$r,a.useToString=Sr,a.useToggle=jr,a.watchArray=Ar,a.watchAtMost=Cr,a.watchDebounced=It,a.watchDeep=Xr,a.watchIgnorable=D,a.watchImmediate=un,a.watchOnce=sn,a.watchPausable=Bt,a.watchThrottled=Gt,a.watchTriggerable=Fn,a.watchWithFilter=C,a.whenever=Mn})(this.VueUse=this.VueUse||{},VueDemi); | ||
var VueDemi=function(a,i,F){if(a.install)return a;if(!i)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),a;if(i.version.slice(0,4)==="2.7."){let h=function(P,j){var g,N={},U={config:i.config,use:i.use.bind(i),mixin:i.mixin.bind(i),component:i.component.bind(i),provide:function($,S){return N[$]=S,this},directive:function($,S){return S?(i.directive($,S),U):i.directive($)},mount:function($,S){return g||(g=new i(Object.assign({propsData:j},P,{provide:Object.assign(N,P.provide)})),g.$mount($,S),g)},unmount:function(){g&&(g.$destroy(),g=void 0)}};return U};var ee=h;for(var b in i)a[b]=i[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.warn=i.util.warn,a.hasInjectionContext=()=>!!a.getCurrentInstance(),a.createApp=h}else if(i.version.slice(0,2)==="2.")if(F){for(var b in F)a[b]=F[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.hasInjectionContext=()=>!!a.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(i.version.slice(0,2)==="3."){for(var b in i)a[b]=i[b];a.isVue2=!1,a.isVue3=!0,a.install=function(){},a.Vue=i,a.Vue2=void 0,a.version=i.version,a.set=function(h,P,j){return Array.isArray(h)?(h.length=Math.max(h.length,P),h.splice(P,1,j),j):(h[P]=j,j)},a.del=function(h,P){if(Array.isArray(h)){h.splice(P,1);return}delete h[P]}}else console.error("[vue-demi] Vue version "+i.version+" is unsupported.");return a}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(a,i){"use strict";var F=Object.defineProperty,b=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&g(e,r,t[r]);if(h)for(var r of h(t))j.call(t,r)&&g(e,r,t[r]);return e},U=(e,t)=>b(e,ee(t));function $(e,t){var r;const n=i.shallowRef();return i.watchEffect(()=>{n.value=e()},U(N({},t),{flush:(r=t?.flush)!=null?r:"sync"})),i.readonly(n)}function S(e,t){let r,n,o;const c=i.ref(!0),u=()=>{c.value=!0,o()};i.watch(e,u,{flush:"sync"});const l=typeof t=="function"?t:t.get,d=typeof t=="function"?void 0:t.set,y=i.customRef((_,f)=>(n=_,o=f,{get(){return c.value&&(r=l(),c.value=!1),n(),r},set(p){d?.(p)}}));return Object.isExtensible(y)&&(y.trigger=u),y}function I(e){return i.getCurrentScope()?(i.onScopeDispose(e),!0):!1}function Xe(){const e=new Set,t=o=>{e.delete(o)};return{on:o=>{e.add(o);const c=()=>t(o);return I(c),{off:c}},off:t,trigger:o=>Promise.all(Array.from(e).map(c=>c(o)))}}function Ke(e){let t=!1,r;const n=i.effectScope(!0);return(...o)=>(t||(r=n.run(()=>e(...o)),t=!0),r)}function Qe(e){const t=Symbol("InjectionState");return[(...o)=>{const c=e(...o);return i.provide(t,c),c},()=>i.inject(t)]}function Ve(e){let t=0,r,n;const o=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return(...c)=>(t+=1,r||(n=i.effectScope(!0),r=n.run(()=>e(...c))),I(o),r)}function te(e,t,{enumerable:r=!1,unwrap:n=!0}={}){if(!i.isVue3&&!i.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");return}for(const[o,c]of Object.entries(t))o!=="value"&&(i.isRef(c)&&n?Object.defineProperty(e,o,{get(){return c.value},set(u){c.value=u},enumerable:r}):Object.defineProperty(e,o,{value:c,enumerable:r}));return e}function De(e,t){return t==null?i.unref(e):i.unref(e)[t]}function xe(e){return i.unref(e)!=null}var et=Object.defineProperty,re=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,ne=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nt=(e,t)=>{for(var r in t||(t={}))tt.call(t,r)&&ne(e,r,t[r]);if(re)for(var r of re(t))rt.call(t,r)&&ne(e,r,t[r]);return e};function ot(e,t){if(typeof Symbol<"u"){const r=nt({},e);return Object.defineProperty(r,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:t[n++],done:n>t.length})}}}),r}else return Object.assign([...t],e)}function s(e){return typeof e=="function"?e():i.unref(e)}const at=s;function k(e,t){const r=t?.computedGetter===!1?i.unref:s;return function(...n){return i.computed(()=>e.apply(this,n.map(o=>r(o))))}}function it(e,t={}){let r=[],n;if(Array.isArray(t))r=t;else{n=t;const{includeOwnProperties:o=!0}=t;r.push(...Object.keys(e)),o&&r.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(r.map(o=>{const c=e[o];return[o,typeof c=="function"?k(c.bind(e),n):c]}))}function oe(e){if(!i.isRef(e))return i.reactive(e);const t=new Proxy({},{get(r,n,o){return i.unref(Reflect.get(e.value,n,o))},set(r,n,o){return i.isRef(e.value[n])&&!i.isRef(o)?e.value[n].value=o:e.value[n]=o,!0},deleteProperty(r,n){return Reflect.deleteProperty(e.value,n)},has(r,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return i.reactive(t)}function z(e){return oe(i.computed(e))}function ct(e,...t){const r=t.flat(),n=r[0];return z(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(e)).filter(([o,c])=>!n(s(c),o)):Object.entries(i.toRefs(e)).filter(o=>!r.includes(o[0]))))}const R=typeof window<"u",lt=e=>typeof e<"u",ut=e=>e!=null,st=(e,...t)=>{e||console.warn(...t)},ft=Object.prototype.toString,ae=e=>ft.call(e)==="[object Object]",dt=()=>Date.now(),ie=()=>+Date.now(),pt=(e,t,r)=>Math.min(r,Math.max(t,e)),E=()=>{},_t=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),yt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),vt=Ot();function Ot(){var e;return R&&((e=window?.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function C(e,t){function r(...n){return new Promise((o,c)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(o).catch(c)})}return r}const W=e=>e();function q(e,t={}){let r,n,o=E;const c=l=>{clearTimeout(l),o(),o=E};return l=>{const d=s(e),y=s(t.maxWait);return r&&c(r),d<=0||y!==void 0&&y<=0?(n&&(c(n),n=null),Promise.resolve(l())):new Promise((_,f)=>{o=t.rejectOnCancel?f:_,y&&!n&&(n=setTimeout(()=>{r&&c(r),n=null,_(l())},y)),r=setTimeout(()=>{n&&c(n),n=null,_(l())},d)})}}function Z(e,t=!0,r=!0,n=!1){let o=0,c,u=!0,l=E,d;const y=()=>{c&&(clearTimeout(c),c=void 0,l(),l=E)};return f=>{const p=s(e),O=Date.now()-o,v=()=>d=f();return y(),p<=0?(o=Date.now(),v()):(O>p&&(r||!u)?(o=Date.now(),v()):t&&(d=new Promise((m,w)=>{l=n?w:m,c=setTimeout(()=>{o=Date.now(),u=!0,m(v()),y()},Math.max(0,p-O))})),!r&&!c&&(c=setTimeout(()=>u=!0,p)),u=!1,d)}}function ce(e=W){const t=i.ref(!0);function r(){t.value=!1}function n(){t.value=!0}const o=(...c)=>{t.value&&e(...c)};return{isActive:i.readonly(t),pause:r,resume:n,eventFilter:o}}const ht={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function le(e){const t=Object.create(null);return r=>t[r]||(t[r]=e(r))}const wt=/\B([A-Z])/g,mt=le(e=>e.replace(wt,"-$1").toLowerCase()),Pt=/-(\w)/g,gt=le(e=>e.replace(Pt,(t,r)=>r?r.toUpperCase():""));function J(e,t=!1,r="Timeout"){return new Promise((n,o)=>{setTimeout(t?()=>o(r):n,e)})}function bt(e){return e}function $t(e){let t;function r(){return t||(t=e()),t}return r.reset=async()=>{const n=t;t=void 0,n&&await n},r}function St(e){return e()}function ue(e,...t){return t.some(r=>r in e)}function At(e,t){var r;if(typeof e=="number")return e+t;const n=((r=e.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:r[0])||"",o=e.slice(n.length),c=Number.parseFloat(n)+t;return Number.isNaN(c)?e:c+o}function jt(e,t,r=!1){return t.reduce((n,o)=>(o in e&&(!r||e[o]!==void 0)&&(n[o]=e[o]),n),{})}function It(e,t,r=!1){return Object.fromEntries(Object.entries(e).filter(([n,o])=>(!r||o!==void 0)&&!t.includes(n)))}function Et(e){return Object.entries(e)}function X(...e){if(e.length!==1)return i.toRef(...e);const t=e[0];return typeof t=="function"?i.readonly(i.customRef(()=>({get:t,set:E}))):i.ref(t)}const Tt=X;function Ft(e,...t){const r=t.flat(),n=r[0];return z(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(e)).filter(([o,c])=>n(s(c),o)):r.map(o=>[o,X(e,o)])))}function se(e,t=1e4){return i.customRef((r,n)=>{let o=e,c;const u=()=>setTimeout(()=>{o=e,n()},s(t));return I(()=>{clearTimeout(c)}),{get(){return r(),o},set(l){o=l,n(),clearTimeout(c),c=u()}}})}function fe(e,t=200,r={}){return C(q(t,r),e)}function K(e,t=200,r={}){const n=i.ref(e.value),o=fe(()=>{n.value=e.value},t,r);return i.watch(e,()=>o()),n}function Rt(e,t){return i.computed({get(){var r;return(r=e.value)!=null?r:t},set(r){e.value=r}})}function de(e,t=200,r=!1,n=!0,o=!1){return C(Z(t,r,n,o),e)}function Q(e,t=200,r=!0,n=!0){if(t<=0)return e;const o=i.ref(e.value),c=de(()=>{o.value=e.value},t,r,n);return i.watch(e,()=>c()),o}function pe(e,t={}){let r=e,n,o;const c=i.customRef((p,O)=>(n=p,o=O,{get(){return u()},set(v){l(v)}}));function u(p=!0){return p&&n(),r}function l(p,O=!0){var v,m;if(p===r)return;const w=r;((v=t.onBeforeChange)==null?void 0:v.call(t,p,w))!==!1&&(r=p,(m=t.onChanged)==null||m.call(t,p,w),O&&o())}return te(c,{get:u,set:l,untrackedGet:()=>u(!1),silentSet:p=>l(p,!1),peek:()=>u(!1),lay:p=>l(p,!1)},{enumerable:!0})}const Ct=pe;function Mt(...e){if(e.length===2){const[t,r]=e;t.value=r}if(e.length===3)if(i.isVue2)i.set(...e);else{const[t,r,n]=e;t[r]=n}}function Nt(e,t,r={}){var n,o;const{flush:c="sync",deep:u=!1,immediate:l=!0,direction:d="both",transform:y={}}=r;let _,f;const p=(n=y.ltr)!=null?n:v=>v,O=(o=y.rtl)!=null?o:v=>v;return(d==="both"||d==="ltr")&&(_=i.watch(e,v=>t.value=p(v),{flush:c,deep:u,immediate:l})),(d==="both"||d==="rtl")&&(f=i.watch(t,v=>e.value=O(v),{flush:c,deep:u,immediate:l})),()=>{_?.(),f?.()}}function Ut(e,t,r={}){const{flush:n="sync",deep:o=!1,immediate:c=!0}=r;return Array.isArray(t)||(t=[t]),i.watch(e,u=>t.forEach(l=>l.value=u),{flush:n,deep:o,immediate:c})}var Wt=Object.defineProperty,Lt=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,ye=(e,t,r)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gt=(e,t)=>{for(var r in t||(t={}))Ht.call(t,r)&&ye(e,r,t[r]);if(_e)for(var r of _e(t))Yt.call(t,r)&&ye(e,r,t[r]);return e},kt=(e,t)=>Lt(e,Bt(t));function zt(e,t={}){if(!i.isRef(e))return i.toRefs(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=i.customRef(()=>({get(){return e.value[n]},set(o){var c;if((c=s(t.replaceRef))!=null?c:!0)if(Array.isArray(e.value)){const l=[...e.value];l[n]=o,e.value=l}else{const l=kt(Gt({},e.value),{[n]:o});Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[n]=o}}));return r}function qt(e,t=!0){i.getCurrentInstance()?i.onBeforeMount(e):t?e():i.nextTick(e)}function Zt(e){i.getCurrentInstance()&&i.onBeforeUnmount(e)}function Jt(e,t=!0){i.getCurrentInstance()?i.onMounted(e):t?e():i.nextTick(e)}function Xt(e){i.getCurrentInstance()&&i.onUnmounted(e)}function V(e,t=!1){function r(f,{flush:p="sync",deep:O=!1,timeout:v,throwOnTimeout:m}={}){let w=null;const x=[new Promise(G=>{w=i.watch(e,T=>{f(T)!==t&&(w?.(),G(T))},{flush:p,deep:O,immediate:!0})})];return v!=null&&x.push(J(v,m).then(()=>s(e)).finally(()=>w?.())),Promise.race(x)}function n(f,p){if(!i.isRef(f))return r(T=>T===f,p);const{flush:O="sync",deep:v=!1,timeout:m,throwOnTimeout:w}=p??{};let A=null;const G=[new Promise(T=>{A=i.watch([e,f],([Je,Bn])=>{t!==(Je===Bn)&&(A?.(),T(Je))},{flush:O,deep:v,immediate:!0})})];return m!=null&&G.push(J(m,w).then(()=>s(e)).finally(()=>(A?.(),s(e)))),Promise.race(G)}function o(f){return r(p=>!!p,f)}function c(f){return n(null,f)}function u(f){return n(void 0,f)}function l(f){return r(Number.isNaN,f)}function d(f,p){return r(O=>{const v=Array.from(O);return v.includes(f)||v.includes(s(f))},p)}function y(f){return _(1,f)}function _(f=1,p){let O=-1;return r(()=>(O+=1,O>=f),p)}return Array.isArray(s(e))?{toMatch:r,toContains:d,changed:y,changedTimes:_,get not(){return V(e,!t)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:c,toBeNaN:l,toBeUndefined:u,changed:y,changedTimes:_,get not(){return V(e,!t)}}}function Kt(e){return V(e)}function Qt(e,t){return e===t}function Vt(...e){var t;const r=e[0],n=e[1];let o=(t=e[2])!=null?t:Qt;if(typeof o=="string"){const c=o;o=(u,l)=>u[c]===l[c]}return i.computed(()=>s(r).filter(c=>s(n).findIndex(u=>o(c,u))===-1))}function Dt(e,t){return i.computed(()=>s(e).every((r,n,o)=>t(s(r),n,o)))}function xt(e,t){return i.computed(()=>s(e).map(r=>s(r)).filter(t))}function er(e,t){return i.computed(()=>s(s(e).find((r,n,o)=>t(s(r),n,o))))}function tr(e,t){return i.computed(()=>s(e).findIndex((r,n,o)=>t(s(r),n,o)))}function rr(e,t){let r=e.length;for(;r-- >0;)if(t(e[r],r,e))return e[r]}function nr(e,t){return i.computed(()=>s(Array.prototype.findLast?s(e).findLast((r,n,o)=>t(s(r),n,o)):rr(s(e),(r,n,o)=>t(s(r),n,o))))}function or(e){return ae(e)&&ue(e,"formIndex","comparator")}function ar(...e){var t;const r=e[0],n=e[1];let o=e[2],c=0;if(or(o)&&(c=(t=o.fromIndex)!=null?t:0,o=o.comparator),typeof o=="string"){const u=o;o=(l,d)=>l[u]===s(d)}return o=o??((u,l)=>u===s(l)),i.computed(()=>s(r).slice(c).some((u,l,d)=>o(s(u),s(n),l,s(d))))}function ir(e,t){return i.computed(()=>s(e).map(r=>s(r)).join(s(t)))}function cr(e,t){return i.computed(()=>s(e).map(r=>s(r)).map(t))}function lr(e,t,...r){const n=(o,c,u)=>t(s(o),s(c),u);return i.computed(()=>{const o=s(e);return r.length?o.reduce(n,s(r[0])):o.reduce(n)})}function ur(e,t){return i.computed(()=>s(e).some((r,n,o)=>t(s(r),n,o)))}function sr(e){return Array.from(new Set(e))}function fr(e,t){return e.reduce((r,n)=>(r.some(o=>t(n,o,e))||r.push(n),r),[])}function dr(e,t){return i.computed(()=>{const r=s(e).map(n=>s(n));return t?fr(r,t):sr(r)})}function pr(e=0,t={}){let r=i.unref(e);const n=i.ref(e),{max:o=Number.POSITIVE_INFINITY,min:c=Number.NEGATIVE_INFINITY}=t,u=(f=1)=>n.value=Math.min(o,n.value+f),l=(f=1)=>n.value=Math.max(c,n.value-f),d=()=>n.value,y=f=>n.value=Math.max(c,Math.min(o,f));return{count:n,inc:u,dec:l,get:d,set:y,reset:(f=r)=>(r=f,y(f))}}const _r=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,yr=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function vr(e,t,r,n){let o=e<12?"AM":"PM";return n&&(o=o.split("").reduce((c,u)=>c+=`${u}.`,"")),r?o.toLowerCase():o}function ve(e,t,r={}){var n;const o=e.getFullYear(),c=e.getMonth(),u=e.getDate(),l=e.getHours(),d=e.getMinutes(),y=e.getSeconds(),_=e.getMilliseconds(),f=e.getDay(),p=(n=r.customMeridiem)!=null?n:vr,O={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>c+1,MM:()=>`${c+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(u),DD:()=>`${u}`.padStart(2,"0"),H:()=>String(l),HH:()=>`${l}`.padStart(2,"0"),h:()=>`${l%12||12}`.padStart(1,"0"),hh:()=>`${l%12||12}`.padStart(2,"0"),m:()=>String(d),mm:()=>`${d}`.padStart(2,"0"),s:()=>String(y),ss:()=>`${y}`.padStart(2,"0"),SSS:()=>`${_}`.padStart(3,"0"),d:()=>f,dd:()=>e.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>p(l,d),AA:()=>p(l,d,!1,!0),a:()=>p(l,d,!0),aa:()=>p(l,d,!0,!0)};return t.replace(yr,(v,m)=>{var w,A;return(A=m??((w=O[v])==null?void 0:w.call(O)))!=null?A:v})}function Oe(e){if(e===null)return new Date(Number.NaN);if(e===void 0)return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){const t=e.match(_r);if(t){const r=t[2]-1||0,n=(t[7]||"0").substring(0,3);return new Date(t[1],r,t[3]||1,t[4]||0,t[5]||0,t[6]||0,n)}}return new Date(e)}function Or(e,t="HH:mm:ss",r={}){return i.computed(()=>ve(Oe(s(e)),s(t),r))}function he(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:o=!1}=r;let c=null;const u=i.ref(!1);function l(){c&&(clearInterval(c),c=null)}function d(){u.value=!1,l()}function y(){const _=s(t);_<=0||(u.value=!0,o&&e(),l(),c=setInterval(e,_))}if(n&&R&&y(),i.isRef(t)||typeof t=="function"){const _=i.watch(t,()=>{u.value&&R&&y()});I(_)}return I(d),{isActive:u,pause:d,resume:y}}var hr=Object.defineProperty,we=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable,me=(e,t,r)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pr=(e,t)=>{for(var r in t||(t={}))wr.call(t,r)&&me(e,r,t[r]);if(we)for(var r of we(t))mr.call(t,r)&&me(e,r,t[r]);return e};function gr(e=1e3,t={}){const{controls:r=!1,immediate:n=!0,callback:o}=t,c=i.ref(0),u=()=>c.value+=1,l=()=>{c.value=0},d=he(o?()=>{u(),o(c.value)}:u,e,{immediate:n});return r?Pr({counter:c,reset:l},d):c}function br(e,t={}){var r;const n=i.ref((r=t.initialValue)!=null?r:null);return i.watch(e,()=>n.value=ie(),t),n}function Pe(e,t,r={}){const{immediate:n=!0}=r,o=i.ref(!1);let c=null;function u(){c&&(clearTimeout(c),c=null)}function l(){o.value=!1,u()}function d(...y){u(),o.value=!0,c=setTimeout(()=>{o.value=!1,c=null,e(...y)},s(t))}return n&&(o.value=!0,R&&d()),I(l),{isPending:i.readonly(o),start:d,stop:l}}var $r=Object.defineProperty,ge=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,be=(e,t,r)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jr=(e,t)=>{for(var r in t||(t={}))Sr.call(t,r)&&be(e,r,t[r]);if(ge)for(var r of ge(t))Ar.call(t,r)&&be(e,r,t[r]);return e};function Ir(e=1e3,t={}){const{controls:r=!1,callback:n}=t,o=Pe(n??E,e,t),c=i.computed(()=>!o.isPending.value);return r?jr({ready:c},o):c}function Er(e,t={}){const{method:r="parseFloat",radix:n,nanToZero:o}=t;return i.computed(()=>{let c=s(e);return typeof c=="string"&&(c=Number[r](c,n)),o&&Number.isNaN(c)&&(c=0),c})}function Tr(e){return i.computed(()=>`${s(e)}`)}function Fr(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,o=i.isRef(e),c=i.ref(e);function u(l){if(arguments.length)return c.value=l,c.value;{const d=s(r);return c.value=c.value===d?s(n):d,c.value}}return o?u:[c,u]}function Rr(e,t,r){let n=r?.immediate?[]:[...e instanceof Function?e():Array.isArray(e)?e:s(e)];return i.watch(e,(o,c,u)=>{const l=Array.from({length:n.length}),d=[];for(const _ of o){let f=!1;for(let p=0;p<n.length;p++)if(!l[p]&&_===n[p]){l[p]=!0,f=!0;break}f||d.push(_)}const y=n.filter((_,f)=>!l[f]);t(o,n,d,y,u),n=[...o]},r)}var $e=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,Nr=(e,t)=>{var r={};for(var n in e)Cr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$e)for(var n of $e(e))t.indexOf(n)<0&&Mr.call(e,n)&&(r[n]=e[n]);return r};function M(e,t,r={}){const n=r,{eventFilter:o=W}=n,c=Nr(n,["eventFilter"]);return i.watch(e,C(o,t),c)}var Se=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,Lr=(e,t)=>{var r={};for(var n in e)Ur.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Se)for(var n of Se(e))t.indexOf(n)<0&&Wr.call(e,n)&&(r[n]=e[n]);return r};function Br(e,t,r){const n=r,{count:o}=n,c=Lr(n,["count"]),u=i.ref(0),l=M(e,(...d)=>{u.value+=1,u.value>=s(o)&&i.nextTick(()=>l()),t(...d)},c);return{count:u,stop:l}}var Hr=Object.defineProperty,Yr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Ie=(e,t,r)=>t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kr=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&Ie(e,r,t[r]);if(L)for(var r of L(t))je.call(t,r)&&Ie(e,r,t[r]);return e},zr=(e,t)=>Yr(e,Gr(t)),qr=(e,t)=>{var r={};for(var n in e)Ae.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&L)for(var n of L(e))t.indexOf(n)<0&&je.call(e,n)&&(r[n]=e[n]);return r};function Ee(e,t,r={}){const n=r,{debounce:o=0,maxWait:c=void 0}=n,u=qr(n,["debounce","maxWait"]);return M(e,t,zr(kr({},u),{eventFilter:q(o,{maxWait:c})}))}var Zr=Object.defineProperty,Jr=Object.defineProperties,Xr=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable,Fe=(e,t,r)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vr=(e,t)=>{for(var r in t||(t={}))Kr.call(t,r)&&Fe(e,r,t[r]);if(Te)for(var r of Te(t))Qr.call(t,r)&&Fe(e,r,t[r]);return e},Dr=(e,t)=>Jr(e,Xr(t));function xr(e,t,r){return i.watch(e,t,Dr(Vr({},r),{deep:!0}))}var en=Object.defineProperty,tn=Object.defineProperties,rn=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Me=(e,t,r)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nn=(e,t)=>{for(var r in t||(t={}))Re.call(t,r)&&Me(e,r,t[r]);if(B)for(var r of B(t))Ce.call(t,r)&&Me(e,r,t[r]);return e},on=(e,t)=>tn(e,rn(t)),an=(e,t)=>{var r={};for(var n in e)Re.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&B)for(var n of B(e))t.indexOf(n)<0&&Ce.call(e,n)&&(r[n]=e[n]);return r};function D(e,t,r={}){const n=r,{eventFilter:o=W}=n,c=an(n,["eventFilter"]),u=C(o,t);let l,d,y;if(c.flush==="sync"){const _=i.ref(!1);d=()=>{},l=f=>{_.value=!0,f(),_.value=!1},y=i.watch(e,(...f)=>{_.value||u(...f)},c)}else{const _=[],f=i.ref(0),p=i.ref(0);d=()=>{f.value=p.value},_.push(i.watch(e,()=>{p.value++},on(nn({},c),{flush:"sync"}))),l=O=>{const v=p.value;O(),f.value+=p.value-v},_.push(i.watch(e,(...O)=>{const v=f.value>0&&f.value===p.value;f.value=0,p.value=0,!v&&u(...O)},c)),y=()=>{_.forEach(O=>O())}}return{stop:y,ignoreUpdates:l,ignorePrevAsyncUpdates:d}}var cn=Object.defineProperty,ln=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,Ue=(e,t,r)=>t in e?cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dn=(e,t)=>{for(var r in t||(t={}))sn.call(t,r)&&Ue(e,r,t[r]);if(Ne)for(var r of Ne(t))fn.call(t,r)&&Ue(e,r,t[r]);return e},pn=(e,t)=>ln(e,un(t));function _n(e,t,r){return i.watch(e,t,pn(dn({},r),{immediate:!0}))}function yn(e,t,r){const n=i.watch(e,(...o)=>(i.nextTick(()=>n()),t(...o)),r)}var vn=Object.defineProperty,On=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Be=(e,t,r)=>t in e?vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wn=(e,t)=>{for(var r in t||(t={}))We.call(t,r)&&Be(e,r,t[r]);if(H)for(var r of H(t))Le.call(t,r)&&Be(e,r,t[r]);return e},mn=(e,t)=>On(e,hn(t)),Pn=(e,t)=>{var r={};for(var n in e)We.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&H)for(var n of H(e))t.indexOf(n)<0&&Le.call(e,n)&&(r[n]=e[n]);return r};function He(e,t,r={}){const n=r,{eventFilter:o}=n,c=Pn(n,["eventFilter"]),{eventFilter:u,pause:l,resume:d,isActive:y}=ce(o);return{stop:M(e,t,mn(wn({},c),{eventFilter:u})),pause:l,resume:d,isActive:y}}var gn=Object.defineProperty,bn=Object.defineProperties,$n=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,ke=(e,t,r)=>t in e?gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sn=(e,t)=>{for(var r in t||(t={}))Ye.call(t,r)&&ke(e,r,t[r]);if(Y)for(var r of Y(t))Ge.call(t,r)&&ke(e,r,t[r]);return e},An=(e,t)=>bn(e,$n(t)),jn=(e,t)=>{var r={};for(var n in e)Ye.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Y)for(var n of Y(e))t.indexOf(n)<0&&Ge.call(e,n)&&(r[n]=e[n]);return r};function ze(e,t,r={}){const n=r,{throttle:o=0,trailing:c=!0,leading:u=!0}=n,l=jn(n,["throttle","trailing","leading"]);return M(e,t,An(Sn({},l),{eventFilter:Z(o,c,u)}))}var In=Object.defineProperty,En=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,Ze=(e,t,r)=>t in e?In(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cn=(e,t)=>{for(var r in t||(t={}))Fn.call(t,r)&&Ze(e,r,t[r]);if(qe)for(var r of qe(t))Rn.call(t,r)&&Ze(e,r,t[r]);return e},Mn=(e,t)=>En(e,Tn(t));function Nn(e,t,r={}){let n;function o(){if(!n)return;const _=n;n=void 0,_()}function c(_){n=_}const u=(_,f)=>(o(),t(_,f,c)),l=D(e,u,r),{ignoreUpdates:d}=l,y=()=>{let _;return d(()=>{_=u(Un(e),Wn(e))}),_};return Mn(Cn({},l),{trigger:y})}function Un(e){return i.isReactive(e)?e:Array.isArray(e)?e.map(t=>s(t)):s(e)}function Wn(e){return Array.isArray(e)?e.map(()=>{}):void 0}function Ln(e,t,r){return i.watch(e,(n,o,c)=>{n&&t(n,o,c)},r)}a.assert=st,a.autoResetRef=se,a.bypassFilter=W,a.camelize=gt,a.clamp=pt,a.computedEager=$,a.computedWithControl=S,a.containsProp=ue,a.controlledComputed=S,a.controlledRef=Ct,a.createEventHook=Xe,a.createFilterWrapper=C,a.createGlobalState=Ke,a.createInjectionState=Qe,a.createReactiveFn=k,a.createSharedComposable=Ve,a.createSingletonPromise=$t,a.debounceFilter=q,a.debouncedRef=K,a.debouncedWatch=Ee,a.directiveHooks=ht,a.eagerComputed=$,a.extendRef=te,a.formatDate=ve,a.get=De,a.hasOwn=yt,a.hyphenate=mt,a.identity=bt,a.ignorableWatch=D,a.increaseWithUnit=At,a.invoke=St,a.isClient=R,a.isDef=lt,a.isDefined=xe,a.isIOS=vt,a.isObject=ae,a.makeDestructurable=ot,a.noop=E,a.normalizeDate=Oe,a.notNullish=ut,a.now=dt,a.objectEntries=Et,a.objectOmit=It,a.objectPick=jt,a.pausableFilter=ce,a.pausableWatch=He,a.promiseTimeout=J,a.rand=_t,a.reactify=k,a.reactifyObject=it,a.reactiveComputed=z,a.reactiveOmit=ct,a.reactivePick=Ft,a.refAutoReset=se,a.refDebounced=K,a.refDefault=Rt,a.refThrottled=Q,a.refWithControl=pe,a.resolveRef=Tt,a.resolveUnref=at,a.set=Mt,a.syncRef=Nt,a.syncRefs=Ut,a.throttleFilter=Z,a.throttledRef=Q,a.throttledWatch=ze,a.timestamp=ie,a.toReactive=oe,a.toRef=X,a.toRefs=zt,a.toValue=s,a.tryOnBeforeMount=qt,a.tryOnBeforeUnmount=Zt,a.tryOnMounted=Jt,a.tryOnScopeDispose=I,a.tryOnUnmounted=Xt,a.until=Kt,a.useArrayDifference=Vt,a.useArrayEvery=Dt,a.useArrayFilter=xt,a.useArrayFind=er,a.useArrayFindIndex=tr,a.useArrayFindLast=nr,a.useArrayIncludes=ar,a.useArrayJoin=ir,a.useArrayMap=cr,a.useArrayReduce=lr,a.useArraySome=ur,a.useArrayUnique=dr,a.useCounter=pr,a.useDateFormat=Or,a.useDebounce=K,a.useDebounceFn=fe,a.useInterval=gr,a.useIntervalFn=he,a.useLastChanged=br,a.useThrottle=Q,a.useThrottleFn=de,a.useTimeout=Ir,a.useTimeoutFn=Pe,a.useToNumber=Er,a.useToString=Tr,a.useToggle=Fr,a.watchArray=Rr,a.watchAtMost=Br,a.watchDebounced=Ee,a.watchDeep=xr,a.watchIgnorable=D,a.watchImmediate=_n,a.watchOnce=yn,a.watchPausable=He,a.watchThrottled=ze,a.watchTriggerable=Nn,a.watchWithFilter=M,a.whenever=Ln})(this.VueUse=this.VueUse||{},VueDemi); |
{ | ||
"name": "@vueuse/shared", | ||
"version": "10.2.1", | ||
"version": "10.3.0", | ||
"author": "Anthony Fu <https://github.com/antfu>", | ||
@@ -24,3 +24,2 @@ "license": "MIT", | ||
".": { | ||
"types": "./index.d.ts", | ||
"require": "./index.cjs", | ||
@@ -35,3 +34,3 @@ "import": "./index.mjs" | ||
"jsdelivr": "./index.iife.min.js", | ||
"types": "./index.d.ts", | ||
"types": "./index.d.cts", | ||
"dependencies": { | ||
@@ -38,0 +37,0 @@ "vue-demi": ">=0.14.5" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
345819
9
6703