Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vueuse/shared

Package Overview
Dependencies
Maintainers
3
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/shared - npm Package Compare versions

Comparing version 9.9.0 to 9.10.0

96

index.d.ts

@@ -19,7 +19,7 @@ import * as vue_demi from 'vue-demi';

declare type EventHookOn<T = any> = (fn: (param: T) => void) => {
type EventHookOn<T = any> = (fn: (param: T) => void) => {
off: () => void;
};
declare type EventHookOff<T = any> = (fn: (param: T) => void) => void;
declare type EventHookTrigger<T = any> = (param: T) => void;
type EventHookOff<T = any> = (fn: (param: T) => void) => void;
type EventHookTrigger<T = any> = (param: T) => void;
interface EventHook<T = any> {

@@ -37,3 +37,3 @@ on: EventHookOn<T>;

declare type CreateGlobalStateReturn<T> = () => T;
type CreateGlobalStateReturn<T> = () => T;
/**

@@ -103,9 +103,13 @@ * Keep states in the global scope to be reusable across Vue instances.

/**
* Void function
*/
type Fn = () => void;
/**
* Any function
*/
declare type Fn = () => void;
type AnyFn = (...args: any[]) => any;
/**
* A ref that allow to set null or undefined
*/
declare type RemovableRef<T> = Omit<Ref<T>, 'value'> & {
type RemovableRef<T> = Omit<Ref<T>, 'value'> & {
get value(): T;

@@ -117,3 +121,3 @@ set value(value: T | null | undefined);

*/
declare type RemoveableRef<T> = RemovableRef<T>;
type RemoveableRef<T> = RemovableRef<T>;
/**

@@ -126,3 +130,3 @@ * Maybe it's a ref, or a plain value

*/
declare type MaybeRef<T> = T | Ref<T>;
type MaybeRef<T> = T | Ref<T>;
/**

@@ -135,3 +139,3 @@ * Maybe it's a ref, or a plain value, or a getter function

*/
declare type MaybeComputedRef<T> = MaybeReadonlyRef<T> | MaybeRef<T>;
type MaybeComputedRef<T> = MaybeReadonlyRef<T> | MaybeRef<T>;
/**

@@ -144,3 +148,3 @@ * Maybe it's a computed ref, or a getter function

*/
declare type MaybeReadonlyRef<T> = (() => T) | ComputedRef<T>;
type MaybeReadonlyRef<T> = (() => T) | ComputedRef<T>;
/**

@@ -155,13 +159,14 @@ * Make all the nested attributes of an object or array to MaybeRef<T>

*/
declare type DeepMaybeRef<T> = T extends Ref<infer V> ? MaybeRef<V> : T extends Array<any> | object ? {
type DeepMaybeRef<T> = T extends Ref<infer V> ? MaybeRef<V> : T extends Array<any> | object ? {
[K in keyof T]: DeepMaybeRef<T[K]>;
} : MaybeRef<T>;
declare type Arrayable<T> = T[] | T;
type Arrayable<T> = T[] | T;
/**
* Infers the element type of an array
*/
declare type ElementOf<T> = T extends (infer E)[] ? E : never;
declare type ShallowUnwrapRef<T> = T extends Ref<infer P> ? P : T;
declare type Awaitable<T> = Promise<T> | T;
declare type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never;
type ElementOf<T> = T extends (infer E)[] ? E : never;
type ShallowUnwrapRef<T> = T extends Ref<infer P> ? P : T;
type Awaitable<T> = Promise<T> | T;
type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never;
type PromisifyFn<T extends AnyFn> = (...args: ArgumentsType<T>) => Promise<ReturnType<T>>;
interface Pausable {

@@ -198,3 +203,3 @@ /**

*/
declare type Stopable = Stoppable;
type Stopable = Stoppable;
interface ConfigurableFlush {

@@ -217,10 +222,10 @@ /**

}
declare type MapSources<T> = {
type MapSources<T> = {
[K in keyof T]: T[K] extends WatchSource<infer V> ? V : never;
};
declare type MapOldSources<T, Immediate> = {
type MapOldSources<T, Immediate> = {
[K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : never;
};
declare type FunctionArgs<Args extends any[] = any[], Return = void> = (...args: Args) => Return;
type FunctionArgs<Args extends any[] = any[], Return = void> = (...args: Args) => Return;
interface FunctionWrapperOptions<Args extends any[] = any[], This = any> {

@@ -231,3 +236,3 @@ fn: FunctionArgs<Args, This>;

}
declare type EventFilter<Args extends any[] = any[], This = any> = (invoke: Fn, options: FunctionWrapperOptions<Args, This>) => void;
type EventFilter<Args extends any[] = any[], This = any, Invoke extends AnyFn = AnyFn> = (invoke: Invoke, options: FunctionWrapperOptions<Args, This>) => ReturnType<Invoke> | Promise<ReturnType<Invoke>>;
interface ConfigurableEventFilter {

@@ -247,2 +252,8 @@ /**

maxWait?: MaybeComputedRef<number>;
/**
* Whether to reject the last call if it's been cancel.
*
* @default false
*/
rejectOnCancel?: boolean;
}

@@ -252,3 +263,3 @@ /**

*/
declare function createFilterWrapper<T extends FunctionArgs>(filter: EventFilter, fn: T): T;
declare function createFilterWrapper<T extends AnyFn>(filter: EventFilter, fn: T): (this: any, ...args: ArgumentsType<T>) => Promise<ReturnType<T>>;
declare const bypassFilter: EventFilter;

@@ -261,3 +272,3 @@ /**

*/
declare function debounceFilter(ms: MaybeComputedRef<number>, options?: DebounceFilterOptions): EventFilter<any[], any>;
declare function debounceFilter(ms: MaybeComputedRef<number>, options?: DebounceFilterOptions): EventFilter<any[], any, AnyFn>;
/**

@@ -269,4 +280,5 @@ * Create an EventFilter that throttle the events

* @param [leading=true]
* @param [rejectOnCancel=false]
*/
declare function throttleFilter(ms: MaybeComputedRef<number>, trailing?: boolean, leading?: boolean): EventFilter<any[], any>;
declare function throttleFilter(ms: MaybeComputedRef<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): EventFilter<any[], any, AnyFn>;
/**

@@ -329,3 +341,3 @@ * EventFilter that gives extra controls to pause and resume the filter

*/
declare function objectPick<O, T extends keyof O>(obj: O, keys: T[], omitUndefined?: boolean): Pick<O, T>;
declare function objectPick<O extends object, T extends keyof O>(obj: O, keys: T[], omitUndefined?: boolean): Pick<O, T>;

@@ -344,3 +356,3 @@ /**

declare type Reactified<T, Computed extends boolean> = T extends (...args: infer A) => infer R ? (...args: {
type Reactified<T, Computed extends boolean> = T extends (...args: infer A) => infer R ? (...args: {
[K in keyof A]: Computed extends true ? MaybeComputedRef<A[K]> : MaybeRef<A[K]>;

@@ -365,3 +377,3 @@ }) => ComputedRef<R> : never;

declare type ReactifyNested<T, Keys extends keyof T = keyof T, S extends boolean = true> = {
type ReactifyNested<T, Keys extends keyof T = keyof T, S extends boolean = true> = {
[K in Keys]: T[K] extends (...args: any[]) => any ? Reactified<T[K], S> : T[K];

@@ -630,3 +642,3 @@ };

}
declare type Falsy = false | void | null | undefined | 0 | 0n | '';
type Falsy = false | void | null | undefined | 0 | 0n | '';
interface UntilValueInstance<T, Not extends boolean = false> extends UntilBaseInstance<T, Not> {

@@ -726,3 +738,3 @@ readonly not: UntilValueInstance<T, Not extends true ? false : true>;

declare type UseArrayReducer<PV, CV, R> = (previousValue: PV, currentValue: CV, currentIndex: number) => R;
type UseArrayReducer<PV, CV, R> = (previousValue: PV, currentValue: CV, currentIndex: number) => R;
/**

@@ -761,2 +773,10 @@ * Reactive `Array.reduce`

/**
* reactive unique array
* @see https://vueuse.org/useArrayUnique
* @param {Array} list - the array was called upon.
* @returns {Array} A computed ref that returns a unique array of items.
*/
declare function useArrayUnique<T>(list: MaybeComputedRef<MaybeComputedRef<T>[]>): ComputedRef<T[]>;
interface UseCounterOptions {

@@ -782,3 +802,3 @@ min?: number;

declare type DateLike = Date | number | string | undefined;
type DateLike = Date | number | string | undefined;
interface UseDateFormatOptions {

@@ -808,3 +828,3 @@ /**

declare function useDateFormat(date: MaybeComputedRef<DateLike>, formatStr?: MaybeComputedRef<string>, options?: UseDateFormatOptions): vue_demi.ComputedRef<string>;
declare type UseDateFormatReturn = ReturnType<typeof useDateFormat>;
type UseDateFormatReturn = ReturnType<typeof useDateFormat>;

@@ -821,3 +841,3 @@ /**

*/
declare function useDebounceFn<T extends FunctionArgs>(fn: T, ms?: MaybeComputedRef<number>, options?: DebounceFilterOptions): T;
declare function useDebounceFn<T extends FunctionArgs>(fn: T, ms?: MaybeComputedRef<number>, options?: DebounceFilterOptions): PromisifyFn<T>;

@@ -901,5 +921,7 @@ interface UseIntervalOptions<Controls extends boolean> {

*
* @param [rejectOnCancel=false] if true, reject the last call if it's been cancel
*
* @return A new, throttled, function.
*/
declare function useThrottleFn<T extends FunctionArgs>(fn: T, ms?: MaybeComputedRef<number>, trailing?: boolean, leading?: boolean): T;
declare function useThrottleFn<T extends FunctionArgs>(fn: T, ms?: MaybeComputedRef<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): PromisifyFn<T>;

@@ -1016,3 +1038,3 @@ interface UseTimeoutFnOptions {

declare type IgnoredUpdater = (updater: () => void) => void;
type IgnoredUpdater = (updater: () => void) => void;
interface WatchIgnorableReturn {

@@ -1050,4 +1072,4 @@ ignoreUpdates: IgnoredUpdater;

}
declare type OnCleanup = (cleanupFn: () => void) => void;
declare type WatchTriggerableCallback<V = any, OV = any, R = void> = (value: V, oldValue: OV, onCleanup: OnCleanup) => R;
type OnCleanup = (cleanupFn: () => void) => void;
type WatchTriggerableCallback<V = any, OV = any, R = void> = (value: V, oldValue: OV, onCleanup: OnCleanup) => R;
declare function watchTriggerable<T extends Readonly<WatchSource<unknown>[]>, FnReturnT>(sources: [...T], cb: WatchTriggerableCallback<MapSources<T>, MapOldSources<T, true>, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;

@@ -1064,2 +1086,2 @@ declare function watchTriggerable<T, FnReturnT>(source: WatchSource<T>, cb: WatchTriggerableCallback<T, T | undefined, FnReturnT>, options?: WatchWithFilterOptions<boolean>): WatchTriggerableReturn<FnReturnT>;

export { ArgumentsType, Arrayable, Awaitable, ComputedRefWithControl, ComputedWithControlRefExtra, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, CreateGlobalStateReturn, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, MapOldSources, MapSources, MaybeComputedRef, MaybeReadonlyRef, MaybeRef, Pausable, Reactified, ReactifyNested, ReactifyObjectOptions, ReactifyOptions, RemovableRef, RemoveableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stopable, Stoppable, SyncRefOptions, SyncRefsOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseArrayReducer, UseCounterOptions, UseDateFormatOptions, UseDateFormatReturn, UseIntervalFnOptions, UseIntervalOptions, UseLastChangedOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseToNumberOptions, UseToggleOptions, WatchArrayCallback, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchTriggerableCallback, WatchTriggerableReturn, WatchWithFilterOptions, WritableComputedRefWithControl, __onlyVue27Plus, __onlyVue3, 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, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, 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, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
export { AnyFn, ArgumentsType, Arrayable, Awaitable, ComputedRefWithControl, ComputedWithControlRefExtra, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, CreateGlobalStateReturn, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, MapOldSources, MapSources, MaybeComputedRef, MaybeReadonlyRef, MaybeRef, Pausable, PromisifyFn, Reactified, ReactifyNested, ReactifyObjectOptions, ReactifyOptions, RemovableRef, RemoveableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stopable, Stoppable, SyncRefOptions, SyncRefsOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseArrayReducer, UseCounterOptions, UseDateFormatOptions, UseDateFormatReturn, UseIntervalFnOptions, UseIntervalOptions, UseLastChangedOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseToNumberOptions, UseToggleOptions, WatchArrayCallback, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchTriggerableCallback, WatchTriggerableReturn, WatchWithFilterOptions, WritableComputedRefWithControl, __onlyVue27Plus, __onlyVue3, 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, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, 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, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, 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, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };

@@ -181,3 +181,5 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {

function wrapper(...args) {
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
return new Promise((resolve, reject) => {
Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
});
}

@@ -192,2 +194,8 @@ return wrapper;

let maxTimer;
let lastRejector = noop;
const _clearTimeout = (timer2) => {
clearTimeout(timer2);
lastRejector();
lastRejector = noop;
};
const filter = (invoke) => {

@@ -197,31 +205,36 @@ const duration = resolveUnref(ms);

if (timer)
clearTimeout(timer);
_clearTimeout(timer);
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
if (maxTimer) {
clearTimeout(maxTimer);
_clearTimeout(maxTimer);
maxTimer = null;
}
return invoke();
return Promise.resolve(invoke());
}
if (maxDuration && !maxTimer) {
maxTimer = setTimeout(() => {
if (timer)
clearTimeout(timer);
return new Promise((resolve, reject) => {
lastRejector = options.rejectOnCancel ? reject : resolve;
if (maxDuration && !maxTimer) {
maxTimer = setTimeout(() => {
if (timer)
_clearTimeout(timer);
maxTimer = null;
resolve(invoke());
}, maxDuration);
}
timer = setTimeout(() => {
if (maxTimer)
_clearTimeout(maxTimer);
maxTimer = null;
invoke();
}, maxDuration);
}
timer = setTimeout(() => {
if (maxTimer)
clearTimeout(maxTimer);
maxTimer = null;
invoke();
}, duration);
resolve(invoke());
}, duration);
});
};
return filter;
}
function throttleFilter(ms, trailing = true, leading = true) {
function throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {
let lastExec = 0;
let timer;
let isLeading = true;
let lastRejector = noop;
let lastValue;
const clear = () => {

@@ -231,7 +244,12 @@ if (timer) {

timer = void 0;
lastRejector();
lastRejector = noop;
}
};
const filter = (invoke) => {
const filter = (_invoke) => {
const duration = resolveUnref(ms);
const elapsed = Date.now() - lastExec;
const invoke = () => {
return lastValue = _invoke();
};
clear();

@@ -246,8 +264,11 @@ if (duration <= 0) {

} else if (trailing) {
timer = setTimeout(() => {
lastExec = Date.now();
isLeading = true;
clear();
invoke();
}, duration - elapsed);
return new Promise((resolve, reject) => {
lastRejector = rejectOnCancel ? reject : resolve;
timer = setTimeout(() => {
lastExec = Date.now();
isLeading = true;
resolve(invoke());
clear();
}, duration - elapsed);
});
}

@@ -257,2 +278,3 @@ if (!leading && !timer)

isLeading = false;
return lastValue;
};

@@ -652,4 +674,4 @@ return filter;

function useThrottleFn(fn, ms = 200, trailing = false, leading = true) {
return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
}

@@ -986,2 +1008,6 @@

function useArrayUnique(list) {
return vueDemi.computed(() => [...new Set(resolveUnref(list).map((element) => resolveUnref(element)))]);
}
function useCounter(initialValue = 0, options = {}) {

@@ -1732,2 +1758,3 @@ const count = vueDemi.ref(initialValue);

exports.useArraySome = useArraySome;
exports.useArrayUnique = useArrayUnique;
exports.useCounter = useCounter;

@@ -1734,0 +1761,0 @@ exports.useDateFormat = useDateFormat;

@@ -1,1 +0,1 @@

var VueDemi=function(o,i,F){if(o.install)return o;if(!i)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),o;if(i.version.slice(0,4)==="2.7."){let O=function(w,A){var g,C={},N={config:i.config,use:i.use.bind(i),mixin:i.mixin.bind(i),component:i.component.bind(i),provide:function(b,$){return C[b]=$,this},directive:function(b,$){return $?(i.directive(b,$),N):i.directive(b)},mount:function(b,$){return g||(g=new i(Object.assign({propsData:A},w,{provide:Object.assign(C,w.provide)})),g.$mount(b,$),g)},unmount:function(){g&&(g.$destroy(),g=void 0)}};return N};var zt=O;for(var P in i)o[P]=i[P];o.isVue2=!0,o.isVue3=!1,o.install=function(){},o.Vue=i,o.Vue2=i,o.version=i.version,o.warn=i.util.warn,o.createApp=O}else if(i.version.slice(0,2)==="2.")if(F){for(var P in F)o[P]=F[P];o.isVue2=!0,o.isVue3=!1,o.install=function(){},o.Vue=i,o.Vue2=i,o.version=i.version}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 P in i)o[P]=i[P];o.isVue2=!1,o.isVue3=!0,o.install=function(){},o.Vue=i,o.Vue2=void 0,o.version=i.version,o.set=function(O,w,A){return Array.isArray(O)?(O.length=Math.max(O.length,w),O.splice(w,1,A),A):(O[w]=A,A)},o.del=function(O,w){if(Array.isArray(O)){O.splice(w,1);return}delete O[w]}}else console.error("[vue-demi] Vue version "+i.version+" is unsupported.");return o}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(o,i){"use strict";var F=Object.defineProperty,P=Object.defineProperties,zt=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,g=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,C=(t,e)=>{for(var r in e||(e={}))w.call(e,r)&&g(t,r,e[r]);if(O)for(var r of O(e))A.call(e,r)&&g(t,r,e[r]);return t},N=(t,e)=>P(t,zt(e));function b(t,e){var r;const n=i.shallowRef();return i.watchEffect(()=>{n.value=t()},N(C({},e),{flush:(r=e==null?void 0:e.flush)!=null?r:"sync"})),i.readonly(n)}var $;const E=typeof window!="undefined",Zt=t=>typeof t!="undefined",Jt=(t,...e)=>{t||console.warn(...e)},D=Object.prototype.toString,Xt=t=>typeof t=="boolean",W=t=>typeof t=="function",qt=t=>typeof t=="number",Kt=t=>typeof t=="string",Qt=t=>D.call(t)==="[object Object]",Vt=t=>typeof window!="undefined"&&D.call(t)==="[object Window]",Dt=()=>Date.now(),x=()=>+Date.now(),xt=(t,e,r)=>Math.min(r,Math.max(e,t)),tt=()=>{},te=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),ee=E&&(($=window==null?void 0:window.navigator)==null?void 0:$.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent),re=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function y(t){return typeof t=="function"?t():i.unref(t)}function M(t,e){function r(...n){t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})}return r}const U=t=>t();function G(t,e={}){let r,n;return l=>{const c=y(t),u=y(e.maxWait);if(r&&clearTimeout(r),c<=0||u!==void 0&&u<=0)return n&&(clearTimeout(n),n=null),l();u&&!n&&(n=setTimeout(()=>{r&&clearTimeout(r),n=null,l()},u)),r=setTimeout(()=>{n&&clearTimeout(n),n=null,l()},c)}}function z(t,e=!0,r=!0){let n=0,a,l=!0;const c=()=>{a&&(clearTimeout(a),a=void 0)};return d=>{const _=y(t),s=Date.now()-n;if(c(),_<=0)return n=Date.now(),d();s>_&&(r||!l)?(n=Date.now(),d()):e&&(a=setTimeout(()=>{n=Date.now(),l=!0,c(),d()},_-s)),!r&&!a&&(a=setTimeout(()=>l=!0,_)),l=!1}}function et(t=U){const e=i.ref(!0);function r(){e.value=!1}function n(){e.value=!0}return{isActive:e,pause:r,resume:n,eventFilter:(...l)=>{e.value&&t(...l)}}}function ne(t="this function"){if(!i.isVue3)throw new Error(`[VueUse] ${t} is only works on Vue 3.`)}function rt(t="this function"){if(!(i.isVue3||i.version.startsWith("2.7.")))throw new Error(`[VueUse] ${t} is only works on Vue 2.7 or above.`)}const oe={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function Z(t,e=!1,r="Timeout"){return new Promise((n,a)=>{setTimeout(e?()=>a(r):n,t)})}function ae(t){return t}function ie(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 le(t){return t()}function ce(t,...e){return e.some(r=>r in t)}function ue(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])||"",a=t.slice(n.length),l=parseFloat(n)+e;return Number.isNaN(l)?t:l+a}function se(t,e,r=!1){return e.reduce((n,a)=>(a in t&&(!r||t[a]!==void 0)&&(n[a]=t[a]),n),{})}function nt(t,e){let r,n,a;const l=i.ref(!0),c=()=>{l.value=!0,a()};i.watch(t,c,{flush:"sync"});const u=W(e)?e:e.get,d=W(e)?void 0:e.set,_=i.customRef((s,f)=>(n=s,a=f,{get(){return l.value&&(r=u(),l.value=!1),n(),r},set(p){d==null||d(p)}}));return Object.isExtensible(_)&&(_.trigger=c),_}function j(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}function fe(){const t=[],e=a=>{const l=t.indexOf(a);l!==-1&&t.splice(l,1)};return{on:a=>{t.push(a);const l=()=>e(a);return j(l),{off:l}},off:e,trigger:a=>{t.forEach(l=>l(a))}}}function de(t){let e=!1,r;const n=i.effectScope(!0);return()=>(e||(r=n.run(t),e=!0),r)}function pe(t){const e=Symbol("InjectionState");return[(...a)=>{i.provide(e,t(...a))},()=>i.inject(e)]}function ye(t){let e=0,r,n;const a=()=>{e-=1,n&&e<=0&&(n.stop(),r=void 0,n=void 0)};return(...l)=>(e+=1,r||(n=i.effectScope(!0),r=n.run(()=>t(...l))),j(a),r)}function ot(t,e,{enumerable:r=!1,unwrap:n=!0}={}){rt();for(const[a,l]of Object.entries(e))a!=="value"&&(i.isRef(l)&&n?Object.defineProperty(t,a,{get(){return l.value},set(c){l.value=c},enumerable:r}):Object.defineProperty(t,a,{value:l,enumerable:r}));return t}function _e(t,e){return e==null?i.unref(t):i.unref(t)[e]}function ve(t){return i.unref(t)!=null}var he=Object.defineProperty,at=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,it=(t,e,r)=>e in t?he(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ge=(t,e)=>{for(var r in e||(e={}))Oe.call(e,r)&&it(t,r,e[r]);if(at)for(var r of at(e))we.call(e,r)&&it(t,r,e[r]);return t};function Pe(t,e){if(typeof Symbol!="undefined"){const r=ge({},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 J(t,e){const r=(e==null?void 0:e.computedGetter)===!1?i.unref:y;return function(...n){return i.computed(()=>t.apply(this,n.map(a=>r(a))))}}function me(t,e={}){let r=[],n;if(Array.isArray(e))r=e;else{n=e;const{includeOwnProperties:a=!0}=e;r.push(...Object.keys(t)),a&&r.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(r.map(a=>{const l=t[a];return[a,typeof l=="function"?J(l.bind(t),n):l]}))}function lt(t){if(!i.isRef(t))return i.reactive(t);const e=new Proxy({},{get(r,n,a){return i.unref(Reflect.get(t.value,n,a))},set(r,n,a){return i.isRef(t.value[n])&&!i.isRef(a)?t.value[n].value=a:t.value[n]=a,!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 ct(t){return lt(i.computed(t))}function be(t,...e){const r=e.flat();return ct(()=>Object.fromEntries(Object.entries(i.toRefs(t)).filter(n=>!r.includes(n[0]))))}function $e(t,...e){const r=e.flat();return i.reactive(Object.fromEntries(r.map(n=>[n,i.toRef(t,n)])))}function ut(t,e=1e4){return i.customRef((r,n)=>{let a=t,l;const c=()=>setTimeout(()=>{a=t,n()},y(e));return j(()=>{clearTimeout(l)}),{get(){return r(),a},set(u){a=u,n(),clearTimeout(l),l=c()}}})}function st(t,e=200,r={}){return M(G(e,r),t)}function X(t,e=200,r={}){const n=i.ref(t.value),a=st(()=>{n.value=t.value},e,r);return i.watch(t,()=>a()),n}function Se(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){return M(z(e,r,n),t)}function q(t,e=200,r=!0,n=!0){if(e<=0)return t;const a=i.ref(t.value),l=ft(()=>{a.value=t.value},e,r,n);return i.watch(t,()=>l()),a}function dt(t,e={}){let r=t,n,a;const l=i.customRef((p,h)=>(n=p,a=h,{get(){return c()},set(v){u(v)}}));function c(p=!0){return p&&n(),r}function u(p,h=!0){var v,S;if(p===r)return;const m=r;((v=e.onBeforeChange)==null?void 0:v.call(e,p,m))!==!1&&(r=p,(S=e.onChanged)==null||S.call(e,p,m),h&&a())}return ot(l,{get:c,set:u,untrackedGet:()=>c(!1),silentSet:p=>u(p,!1),peek:()=>c(!1),lay:p=>u(p,!1)},{enumerable:!0})}const Ae=dt;function je(t){return typeof t=="function"?i.computed(t):i.ref(t)}function Ie(...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 Te(t,e,r={}){var n,a;const{flush:l="sync",deep:c=!1,immediate:u=!0,direction:d="both",transform:_={}}=r;let s,f;const p=(n=_.ltr)!=null?n:v=>v,h=(a=_.rtl)!=null?a:v=>v;return(d==="both"||d==="ltr")&&(s=i.watch(t,v=>e.value=p(v),{flush:l,deep:c,immediate:u})),(d==="both"||d==="rtl")&&(f=i.watch(e,v=>t.value=h(v),{flush:l,deep:c,immediate:u})),()=>{s==null||s(),f==null||f()}}function Fe(t,e,r={}){const{flush:n="sync",deep:a=!1,immediate:l=!0}=r;return Array.isArray(e)||(e=[e]),i.watch(t,c=>e.forEach(u=>u.value=c),{flush:n,deep:a,immediate:l})}var Ee=Object.defineProperty,Me=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,yt=(t,e,r)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,We=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&yt(t,r,e[r]);if(pt)for(var r of pt(e))Ne.call(e,r)&&yt(t,r,e[r]);return t},Ue=(t,e)=>Me(t,Re(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 a=[...t.value];a[r]=n,t.value=a}else{const a=Ue(We({},t.value),{[r]:n});Object.setPrototypeOf(a,t.value),t.value=a}}}));return e}function Le(t,e=!0){i.getCurrentInstance()?i.onBeforeMount(t):e?t():i.nextTick(t)}function He(t){i.getCurrentInstance()&&i.onBeforeUnmount(t)}function Ye(t,e=!0){i.getCurrentInstance()?i.onMounted(t):e?t():i.nextTick(t)}function ke(t){i.getCurrentInstance()&&i.onUnmounted(t)}function K(t,e=!1){function r(f,{flush:p="sync",deep:h=!1,timeout:v,throwOnTimeout:S}={}){let m=null;const V=[new Promise(k=>{m=i.watch(t,T=>{f(T)!==e&&(m==null||m(),k(T))},{flush:p,deep:h,immediate:!0})})];return v!=null&&V.push(Z(v,S).then(()=>y(t)).finally(()=>m==null?void 0:m())),Promise.race(V)}function n(f,p){if(!i.isRef(f))return r(T=>T===f,p);const{flush:h="sync",deep:v=!1,timeout:S,throwOnTimeout:m}=p??{};let I=null;const k=[new Promise(T=>{I=i.watch([t,f],([Gt,cn])=>{e!==(Gt===cn)&&(I==null||I(),T(Gt))},{flush:h,deep:v,immediate:!0})})];return S!=null&&k.push(Z(S,m).then(()=>y(t)).finally(()=>(I==null||I(),y(t)))),Promise.race(k)}function a(f){return r(p=>Boolean(p),f)}function l(f){return n(null,f)}function c(f){return n(void 0,f)}function u(f){return r(Number.isNaN,f)}function d(f,p){return r(h=>{const v=Array.from(h);return v.includes(f)||v.includes(y(f))},p)}function _(f){return s(1,f)}function s(f=1,p){let h=-1;return r(()=>(h+=1,h>=f),p)}return Array.isArray(y(t))?{toMatch:r,toContains:d,changed:_,changedTimes:s,get not(){return K(t,!e)}}:{toMatch:r,toBe:n,toBeTruthy:a,toBeNull:l,toBeNaN:u,toBeUndefined:c,changed:_,changedTimes:s,get not(){return K(t,!e)}}}function Ge(t){return K(t)}function ze(t,e){return i.computed(()=>y(t).every((r,n,a)=>e(y(r),n,a)))}function Ze(t,e){return i.computed(()=>y(t).map(r=>y(r)).filter(e))}function Je(t,e){return i.computed(()=>y(y(t).find((r,n,a)=>e(y(r),n,a))))}function Xe(t,e){return i.computed(()=>y(t).findIndex((r,n,a)=>e(y(r),n,a)))}function qe(t,e){return i.computed(()=>y(t).map(r=>y(r)).join(y(e)))}function Ke(t,e){return i.computed(()=>y(t).map(r=>y(r)).map(e))}function Qe(t,e,...r){const n=(a,l,c)=>e(y(a),y(l),c);return i.computed(()=>{const a=y(t);return r.length?a.reduce(n,y(r[0])):a.reduce(n)})}function Ve(t,e){return i.computed(()=>y(t).some((r,n,a)=>e(y(r),n,a)))}function De(t=0,e={}){const r=i.ref(t),{max:n=1/0,min:a=-1/0}=e,l=(s=1)=>r.value=Math.min(n,r.value+s),c=(s=1)=>r.value=Math.max(a,r.value-s),u=()=>r.value,d=s=>r.value=Math.max(a,Math.min(n,s));return{count:r,inc:l,dec:c,get:u,set:d,reset:(s=t)=>(t=s,d(s))}}const xe=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,tr=/\[([^\]]+)]|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,er=(t,e,r,n)=>{let a=t<12?"AM":"PM";return n&&(a=a.split("").reduce((l,c)=>l+=`${c}.`,"")),r?a.toLowerCase():a},_t=(t,e,r={})=>{var n;const a=t.getFullYear(),l=t.getMonth(),c=t.getDate(),u=t.getHours(),d=t.getMinutes(),_=t.getSeconds(),s=t.getMilliseconds(),f=t.getDay(),p=(n=r.customMeridiem)!=null?n:er,h={YY:()=>String(a).slice(-2),YYYY:()=>a,M:()=>l+1,MM:()=>`${l+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(c),DD:()=>`${c}`.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(d),mm:()=>`${d}`.padStart(2,"0"),s:()=>String(_),ss:()=>`${_}`.padStart(2,"0"),SSS:()=>`${s}`.padStart(3,"0"),d:()=>f,dd:()=>t.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>p(u,d),AA:()=>p(u,d,!1,!0),a:()=>p(u,d,!0),aa:()=>p(u,d,!0,!0)};return e.replace(tr,(v,S)=>S||h[v]())},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(xe);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 rr(t,e="HH:mm:ss",r={}){return i.computed(()=>_t(vt(y(t)),y(e),r))}function ht(t,e=1e3,r={}){const{immediate:n=!0,immediateCallback:a=!1}=r;let l=null;const c=i.ref(!1);function u(){l&&(clearInterval(l),l=null)}function d(){c.value=!1,u()}function _(){i.unref(e)<=0||(c.value=!0,a&&t(),u(),l=setInterval(t,y(e)))}if(n&&E&&_(),i.isRef(e)||W(e)){const s=i.watch(e,()=>{c.value&&E&&_()});j(s)}return j(d),{isActive:c,pause:d,resume:_}}var nr=Object.defineProperty,Ot=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,wt=(t,e,r)=>e in t?nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e)=>{for(var r in e||(e={}))or.call(e,r)&&wt(t,r,e[r]);if(Ot)for(var r of Ot(e))ar.call(e,r)&&wt(t,r,e[r]);return t};function lr(t=1e3,e={}){const{controls:r=!1,immediate:n=!0,callback:a}=e,l=i.ref(0),c=()=>l.value+=1,u=ht(a?()=>{c(),a(l.value)}:c,t,{immediate:n});return r?ir({counter:l},u):l}function cr(t,e={}){var r;const n=i.ref((r=e.initialValue)!=null?r:null);return i.watch(t,()=>n.value=x(),e),n}function gt(t,e,r={}){const{immediate:n=!0}=r,a=i.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function u(){a.value=!1,c()}function d(..._){c(),a.value=!0,l=setTimeout(()=>{a.value=!1,l=null,t(..._)},y(e))}return n&&(a.value=!0,E&&d()),j(u),{isPending:a,start:d,stop:u}}var ur=Object.defineProperty,Pt=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,mt=(t,e,r)=>e in t?ur(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dr=(t,e)=>{for(var r in e||(e={}))sr.call(e,r)&&mt(t,r,e[r]);if(Pt)for(var r of Pt(e))fr.call(e,r)&&mt(t,r,e[r]);return t};function pr(t=1e3,e={}){const{controls:r=!1,callback:n}=e,a=gt(n??tt,t,e),l=i.computed(()=>!a.isPending.value);return r?dr({ready:l},a):l}function yr(t,e={}){const{method:r="parseFloat",radix:n,nanToZero:a}=e;return i.computed(()=>{let l=y(t);return typeof l=="string"&&(l=Number[r](l,n)),a&&isNaN(l)&&(l=0),l})}function _r(t){return i.computed(()=>`${y(t)}`)}function vr(t=!1,e={}){const{truthyValue:r=!0,falsyValue:n=!1}=e,a=i.isRef(t),l=i.ref(t);function c(u){if(arguments.length)return l.value=u,l.value;{const d=y(r);return l.value=l.value===d?y(n):d,l.value}}return a?c:[l,c]}function hr(t,e,r){let n=(r==null?void 0:r.immediate)?[]:[...t instanceof Function?t():Array.isArray(t)?t:i.unref(t)];return i.watch(t,(a,l,c)=>{const u=new Array(n.length),d=[];for(const s of a){let f=!1;for(let p=0;p<n.length;p++)if(!u[p]&&s===n[p]){u[p]=!0,f=!0;break}f||d.push(s)}const _=n.filter((s,f)=>!u[f]);e(a,n,d,_,c),n=[...a]},r)}var bt=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,gr=(t,e)=>{var r={};for(var n in t)Or.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&&wr.call(t,n)&&(r[n]=t[n]);return r};function R(t,e,r={}){const n=r,{eventFilter:a=U}=n,l=gr(n,["eventFilter"]);return i.watch(t,M(a,e),l)}var $t=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable,br=(t,e)=>{var r={};for(var n in t)Pr.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&&mr.call(t,n)&&(r[n]=t[n]);return r};function $r(t,e,r){const n=r,{count:a}=n,l=br(n,["count"]),c=i.ref(0),u=R(t,(...d)=>{c.value+=1,c.value>=y(a)&&i.nextTick(()=>u()),e(...d)},l);return{count:c,stop:u}}var Sr=Object.defineProperty,Ar=Object.defineProperties,jr=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,jt=(t,e,r)=>e in t?Sr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ir=(t,e)=>{for(var r in e||(e={}))St.call(e,r)&&jt(t,r,e[r]);if(B)for(var r of B(e))At.call(e,r)&&jt(t,r,e[r]);return t},Tr=(t,e)=>Ar(t,jr(e)),Fr=(t,e)=>{var r={};for(var n in t)St.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&&At.call(t,n)&&(r[n]=t[n]);return r};function It(t,e,r={}){const n=r,{debounce:a=0,maxWait:l=void 0}=n,c=Fr(n,["debounce","maxWait"]);return R(t,e,Tr(Ir({},c),{eventFilter:G(a,{maxWait:l})}))}var Er=Object.defineProperty,Mr=Object.defineProperties,Rr=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,Et=(t,e,r)=>e in t?Er(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cr=(t,e)=>{for(var r in e||(e={}))Tt.call(e,r)&&Et(t,r,e[r]);if(L)for(var r of L(e))Ft.call(e,r)&&Et(t,r,e[r]);return t},Nr=(t,e)=>Mr(t,Rr(e)),Wr=(t,e)=>{var r={};for(var n in t)Tt.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&&Ft.call(t,n)&&(r[n]=t[n]);return r};function Q(t,e,r={}){const n=r,{eventFilter:a=U}=n,l=Wr(n,["eventFilter"]),c=M(a,e);let u,d,_;if(l.flush==="sync"){const s=i.ref(!1);d=()=>{},u=f=>{s.value=!0,f(),s.value=!1},_=i.watch(t,(...f)=>{s.value||c(...f)},l)}else{const s=[],f=i.ref(0),p=i.ref(0);d=()=>{f.value=p.value},s.push(i.watch(t,()=>{p.value++},Nr(Cr({},l),{flush:"sync"}))),u=h=>{const v=p.value;h(),f.value+=p.value-v},s.push(i.watch(t,(...h)=>{const v=f.value>0&&f.value===p.value;f.value=0,p.value=0,!v&&c(...h)},l)),_=()=>{s.forEach(h=>h())}}return{stop:_,ignoreUpdates:u,ignorePrevAsyncUpdates:d}}function Ur(t,e,r){const n=i.watch(t,(...a)=>(i.nextTick(()=>n()),e(...a)),r)}var Br=Object.defineProperty,Lr=Object.defineProperties,Hr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Ct=(t,e,r)=>e in t?Br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Yr=(t,e)=>{for(var r in e||(e={}))Mt.call(e,r)&&Ct(t,r,e[r]);if(H)for(var r of H(e))Rt.call(e,r)&&Ct(t,r,e[r]);return t},kr=(t,e)=>Lr(t,Hr(e)),Gr=(t,e)=>{var r={};for(var n in t)Mt.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&&Rt.call(t,n)&&(r[n]=t[n]);return r};function Nt(t,e,r={}){const n=r,{eventFilter:a}=n,l=Gr(n,["eventFilter"]),{eventFilter:c,pause:u,resume:d,isActive:_}=et(a);return{stop:R(t,e,kr(Yr({},l),{eventFilter:c})),pause:u,resume:d,isActive:_}}var zr=Object.defineProperty,Zr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Wt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Bt=(t,e,r)=>e in t?zr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xr=(t,e)=>{for(var r in e||(e={}))Wt.call(e,r)&&Bt(t,r,e[r]);if(Y)for(var r of Y(e))Ut.call(e,r)&&Bt(t,r,e[r]);return t},qr=(t,e)=>Zr(t,Jr(e)),Kr=(t,e)=>{var r={};for(var n in t)Wt.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&&Ut.call(t,n)&&(r[n]=t[n]);return r};function Lt(t,e,r={}){const n=r,{throttle:a=0,trailing:l=!0,leading:c=!0}=n,u=Kr(n,["throttle","trailing","leading"]);return R(t,e,qr(Xr({},u),{eventFilter:z(a,l,c)}))}var Qr=Object.defineProperty,Vr=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,Yt=(t,e,r)=>e in t?Qr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,en=(t,e)=>{for(var r in e||(e={}))xr.call(e,r)&&Yt(t,r,e[r]);if(Ht)for(var r of Ht(e))tn.call(e,r)&&Yt(t,r,e[r]);return t},rn=(t,e)=>Vr(t,Dr(e));function nn(t,e,r={}){let n;function a(){if(!n)return;const s=n;n=void 0,s()}function l(s){n=s}const c=(s,f)=>(a(),e(s,f,l)),u=Q(t,c,r),{ignoreUpdates:d}=u,_=()=>{let s;return d(()=>{s=c(on(t),an(t))}),s};return rn(en({},u),{trigger:_})}function on(t){return i.isReactive(t)?t:Array.isArray(t)?t.map(e=>kt(e)):kt(t)}function kt(t){return typeof t=="function"?t():i.unref(t)}function an(t){return Array.isArray(t)?t.map(()=>{}):void 0}function ln(t,e,r){return i.watch(t,(n,a,l)=>{n&&e(n,a,l)},r)}o.__onlyVue27Plus=rt,o.__onlyVue3=ne,o.assert=Jt,o.autoResetRef=ut,o.bypassFilter=U,o.clamp=xt,o.computedEager=b,o.computedWithControl=nt,o.containsProp=ce,o.controlledComputed=nt,o.controlledRef=Ae,o.createEventHook=fe,o.createFilterWrapper=M,o.createGlobalState=de,o.createInjectionState=pe,o.createReactiveFn=J,o.createSharedComposable=ye,o.createSingletonPromise=ie,o.debounceFilter=G,o.debouncedRef=X,o.debouncedWatch=It,o.directiveHooks=oe,o.eagerComputed=b,o.extendRef=ot,o.formatDate=_t,o.get=_e,o.hasOwn=re,o.identity=ae,o.ignorableWatch=Q,o.increaseWithUnit=ue,o.invoke=le,o.isBoolean=Xt,o.isClient=E,o.isDef=Zt,o.isDefined=ve,o.isFunction=W,o.isIOS=ee,o.isNumber=qt,o.isObject=Qt,o.isString=Kt,o.isWindow=Vt,o.makeDestructurable=Pe,o.noop=tt,o.normalizeDate=vt,o.now=Dt,o.objectPick=se,o.pausableFilter=et,o.pausableWatch=Nt,o.promiseTimeout=Z,o.rand=te,o.reactify=J,o.reactifyObject=me,o.reactiveComputed=ct,o.reactiveOmit=be,o.reactivePick=$e,o.refAutoReset=ut,o.refDebounced=X,o.refDefault=Se,o.refThrottled=q,o.refWithControl=dt,o.resolveRef=je,o.resolveUnref=y,o.set=Ie,o.syncRef=Te,o.syncRefs=Fe,o.throttleFilter=z,o.throttledRef=q,o.throttledWatch=Lt,o.timestamp=x,o.toReactive=lt,o.toRefs=Be,o.tryOnBeforeMount=Le,o.tryOnBeforeUnmount=He,o.tryOnMounted=Ye,o.tryOnScopeDispose=j,o.tryOnUnmounted=ke,o.until=Ge,o.useArrayEvery=ze,o.useArrayFilter=Ze,o.useArrayFind=Je,o.useArrayFindIndex=Xe,o.useArrayJoin=qe,o.useArrayMap=Ke,o.useArrayReduce=Qe,o.useArraySome=Ve,o.useCounter=De,o.useDateFormat=rr,o.useDebounce=X,o.useDebounceFn=st,o.useInterval=lr,o.useIntervalFn=ht,o.useLastChanged=cr,o.useThrottle=q,o.useThrottleFn=ft,o.useTimeout=pr,o.useTimeoutFn=gt,o.useToNumber=yr,o.useToString=_r,o.useToggle=vr,o.watchArray=hr,o.watchAtMost=$r,o.watchDebounced=It,o.watchIgnorable=Q,o.watchOnce=Ur,o.watchPausable=Nt,o.watchThrottled=Lt,o.watchTriggerable=nn,o.watchWithFilter=R,o.whenever=ln})(this.VueUse=this.VueUse||{},VueDemi);
var VueDemi=function(a,i,E){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 O=function(P,A){var m,N={},W={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),W):i.directive($)},mount:function($,S){return m||(m=new i(Object.assign({propsData:A},P,{provide:Object.assign(N,P.provide)})),m.$mount($,S),m)},unmount:function(){m&&(m.$destroy(),m=void 0)}};return W};var zt=O;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.createApp=O}else if(i.version.slice(0,2)==="2.")if(E){for(var b in E)a[b]=E[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version}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(O,P,A){return Array.isArray(O)?(O.length=Math.max(O.length,P),O.splice(P,1,A),A):(O[P]=A,A)},a.del=function(O,P){if(Array.isArray(O)){O.splice(P,1);return}delete O[P]}}else console.error("[vue-demi] Vue version "+i.version+" is unsupported.");return a}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(a,i){"use strict";var E=Object.defineProperty,b=Object.defineProperties,zt=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?E(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)&&m(t,r,e[r]);if(O)for(var r of O(e))A.call(e,r)&&m(t,r,e[r]);return t},W=(t,e)=>b(t,zt(e));function $(t,e){var r;const n=i.shallowRef();return i.watchEffect(()=>{n.value=t()},W(N({},e),{flush:(r=e==null?void 0:e.flush)!=null?r:"sync"})),i.readonly(n)}var S;const M=typeof window!="undefined",Zt=t=>typeof t!="undefined",qt=(t,...e)=>{t||console.warn(...e)},x=Object.prototype.toString,Jt=t=>typeof t=="boolean",U=t=>typeof t=="function",Xt=t=>typeof t=="number",Kt=t=>typeof t=="string",Qt=t=>x.call(t)==="[object Object]",Vt=t=>typeof window!="undefined"&&x.call(t)==="[object Window]",Dt=()=>Date.now(),tt=()=>+Date.now(),xt=(t,e,r)=>Math.min(r,Math.max(e,t)),I=()=>{},te=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),ee=M&&((S=window==null?void 0:window.navigator)==null?void 0:S.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent),re=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function y(t){return typeof t=="function"?t():i.unref(t)}function R(t,e){function r(...n){return new Promise((o,l)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(o).catch(l)})}return r}const B=t=>t();function z(t,e={}){let r,n,o=I;const l=c=>{clearTimeout(c),o(),o=I};return c=>{const p=y(t),_=y(e.maxWait);return r&&l(r),p<=0||_!==void 0&&_<=0?(n&&(l(n),n=null),Promise.resolve(c())):new Promise((d,s)=>{o=e.rejectOnCancel?s:d,_&&!n&&(n=setTimeout(()=>{r&&l(r),n=null,d(c())},_)),r=setTimeout(()=>{n&&l(n),n=null,d(c())},p)})}}function Z(t,e=!0,r=!0,n=!1){let o=0,l,u=!0,c=I,p;const _=()=>{l&&(clearTimeout(l),l=void 0,c(),c=I)};return s=>{const f=y(t),h=Date.now()-o,v=()=>p=s();if(_(),f<=0)return o=Date.now(),v();if(h>f&&(r||!u))o=Date.now(),v();else if(e)return new Promise((w,g)=>{c=n?g:w,l=setTimeout(()=>{o=Date.now(),u=!0,w(v()),_()},f-h)});return!r&&!l&&(l=setTimeout(()=>u=!0,f)),u=!1,p}}function et(t=B){const e=i.ref(!0);function r(){e.value=!1}function n(){e.value=!0}return{isActive:e,pause:r,resume:n,eventFilter:(...l)=>{e.value&&t(...l)}}}function ne(t="this function"){if(!i.isVue3)throw new Error(`[VueUse] ${t} is only works on Vue 3.`)}function rt(t="this function"){if(!(i.isVue3||i.version.startsWith("2.7.")))throw new Error(`[VueUse] ${t} is only works on Vue 2.7 or above.`)}const oe={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function q(t,e=!1,r="Timeout"){return new Promise((n,o)=>{setTimeout(e?()=>o(r):n,t)})}function ae(t){return t}function ie(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 le(t){return t()}function ue(t,...e){return e.some(r=>r in t)}function ce(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),l=parseFloat(n)+e;return Number.isNaN(l)?t:l+o}function se(t,e,r=!1){return e.reduce((n,o)=>(o in t&&(!r||t[o]!==void 0)&&(n[o]=t[o]),n),{})}function nt(t,e){let r,n,o;const l=i.ref(!0),u=()=>{l.value=!0,o()};i.watch(t,u,{flush:"sync"});const c=U(e)?e:e.get,p=U(e)?void 0:e.set,_=i.customRef((d,s)=>(n=d,o=s,{get(){return l.value&&(r=c(),l.value=!1),n(),r},set(f){p==null||p(f)}}));return Object.isExtensible(_)&&(_.trigger=u),_}function j(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}function fe(){const t=[],e=o=>{const l=t.indexOf(o);l!==-1&&t.splice(l,1)};return{on:o=>{t.push(o);const l=()=>e(o);return j(l),{off:l}},off:e,trigger:o=>{t.forEach(l=>l(o))}}}function de(t){let e=!1,r;const n=i.effectScope(!0);return()=>(e||(r=n.run(t),e=!0),r)}function pe(t){const e=Symbol("InjectionState");return[(...o)=>{i.provide(e,t(...o))},()=>i.inject(e)]}function ye(t){let e=0,r,n;const o=()=>{e-=1,n&&e<=0&&(n.stop(),r=void 0,n=void 0)};return(...l)=>(e+=1,r||(n=i.effectScope(!0),r=n.run(()=>t(...l))),j(o),r)}function ot(t,e,{enumerable:r=!1,unwrap:n=!0}={}){rt();for(const[o,l]of Object.entries(e))o!=="value"&&(i.isRef(l)&&n?Object.defineProperty(t,o,{get(){return l.value},set(u){l.value=u},enumerable:r}):Object.defineProperty(t,o,{value:l,enumerable:r}));return t}function _e(t,e){return e==null?i.unref(t):i.unref(t)[e]}function ve(t){return i.unref(t)!=null}var he=Object.defineProperty,at=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,it=(t,e,r)=>e in t?he(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ge=(t,e)=>{for(var r in e||(e={}))Oe.call(e,r)&&it(t,r,e[r]);if(at)for(var r of at(e))we.call(e,r)&&it(t,r,e[r]);return t};function Pe(t,e){if(typeof Symbol!="undefined"){const r=ge({},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 J(t,e){const r=(e==null?void 0:e.computedGetter)===!1?i.unref:y;return function(...n){return i.computed(()=>t.apply(this,n.map(o=>r(o))))}}function me(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 l=t[o];return[o,typeof l=="function"?J(l.bind(t),n):l]}))}function lt(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 ut(t){return lt(i.computed(t))}function be(t,...e){const r=e.flat();return ut(()=>Object.fromEntries(Object.entries(i.toRefs(t)).filter(n=>!r.includes(n[0]))))}function $e(t,...e){const r=e.flat();return i.reactive(Object.fromEntries(r.map(n=>[n,i.toRef(t,n)])))}function ct(t,e=1e4){return i.customRef((r,n)=>{let o=t,l;const u=()=>setTimeout(()=>{o=t,n()},y(e));return j(()=>{clearTimeout(l)}),{get(){return r(),o},set(c){o=c,n(),clearTimeout(l),l=u()}}})}function st(t,e=200,r={}){return R(z(e,r),t)}function X(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 Se(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 R(Z(e,r,n,o),t)}function K(t,e=200,r=!0,n=!0){if(e<=0)return t;const o=i.ref(t.value),l=ft(()=>{o.value=t.value},e,r,n);return i.watch(t,()=>l()),o}function dt(t,e={}){let r=t,n,o;const l=i.customRef((f,h)=>(n=f,o=h,{get(){return u()},set(v){c(v)}}));function u(f=!0){return f&&n(),r}function c(f,h=!0){var v,w;if(f===r)return;const g=r;((v=e.onBeforeChange)==null?void 0:v.call(e,f,g))!==!1&&(r=f,(w=e.onChanged)==null||w.call(e,f,g),h&&o())}return ot(l,{get:u,set:c,untrackedGet:()=>u(!1),silentSet:f=>c(f,!1),peek:()=>u(!1),lay:f=>c(f,!1)},{enumerable:!0})}const Ae=dt;function je(t){return typeof t=="function"?i.computed(t):i.ref(t)}function Ie(...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:l="sync",deep:u=!1,immediate:c=!0,direction:p="both",transform:_={}}=r;let d,s;const f=(n=_.ltr)!=null?n:v=>v,h=(o=_.rtl)!=null?o:v=>v;return(p==="both"||p==="ltr")&&(d=i.watch(t,v=>e.value=f(v),{flush:l,deep:u,immediate:c})),(p==="both"||p==="rtl")&&(s=i.watch(e,v=>t.value=h(v),{flush:l,deep:u,immediate:c})),()=>{d==null||d(),s==null||s()}}function Te(t,e,r={}){const{flush:n="sync",deep:o=!1,immediate:l=!0}=r;return Array.isArray(e)||(e=[e]),i.watch(t,u=>e.forEach(c=>c.value=u),{flush:n,deep:o,immediate:l})}var Ee=Object.defineProperty,Me=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,yt=(t,e,r)=>e in t?Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,We=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&yt(t,r,e[r]);if(pt)for(var r of pt(e))Ne.call(e,r)&&yt(t,r,e[r]);return t},Ue=(t,e)=>Me(t,Re(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=Ue(We({},t.value),{[r]:n});Object.setPrototypeOf(o,t.value),t.value=o}}}));return e}function Le(t,e=!0){i.getCurrentInstance()?i.onBeforeMount(t):e?t():i.nextTick(t)}function He(t){i.getCurrentInstance()&&i.onBeforeUnmount(t)}function ke(t,e=!0){i.getCurrentInstance()?i.onMounted(t):e?t():i.nextTick(t)}function Ye(t){i.getCurrentInstance()&&i.onUnmounted(t)}function Q(t,e=!1){function r(s,{flush:f="sync",deep:h=!1,timeout:v,throwOnTimeout:w}={}){let g=null;const D=[new Promise(G=>{g=i.watch(t,T=>{s(T)!==e&&(g==null||g(),G(T))},{flush:f,deep:h,immediate:!0})})];return v!=null&&D.push(q(v,w).then(()=>y(t)).finally(()=>g==null?void 0:g())),Promise.race(D)}function n(s,f){if(!i.isRef(s))return r(T=>T===s,f);const{flush:h="sync",deep:v=!1,timeout:w,throwOnTimeout:g}=f??{};let F=null;const G=[new Promise(T=>{F=i.watch([t,s],([Gt,cn])=>{e!==(Gt===cn)&&(F==null||F(),T(Gt))},{flush:h,deep:v,immediate:!0})})];return w!=null&&G.push(q(w,g).then(()=>y(t)).finally(()=>(F==null||F(),y(t)))),Promise.race(G)}function o(s){return r(f=>Boolean(f),s)}function l(s){return n(null,s)}function u(s){return n(void 0,s)}function c(s){return r(Number.isNaN,s)}function p(s,f){return r(h=>{const v=Array.from(h);return v.includes(s)||v.includes(y(s))},f)}function _(s){return d(1,s)}function d(s=1,f){let h=-1;return r(()=>(h+=1,h>=s),f)}return Array.isArray(y(t))?{toMatch:r,toContains:p,changed:_,changedTimes:d,get not(){return Q(t,!e)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:l,toBeNaN:c,toBeUndefined:u,changed:_,changedTimes:d,get not(){return Q(t,!e)}}}function Ge(t){return Q(t)}function ze(t,e){return i.computed(()=>y(t).every((r,n,o)=>e(y(r),n,o)))}function Ze(t,e){return i.computed(()=>y(t).map(r=>y(r)).filter(e))}function qe(t,e){return i.computed(()=>y(y(t).find((r,n,o)=>e(y(r),n,o))))}function Je(t,e){return i.computed(()=>y(t).findIndex((r,n,o)=>e(y(r),n,o)))}function Xe(t,e){return i.computed(()=>y(t).map(r=>y(r)).join(y(e)))}function Ke(t,e){return i.computed(()=>y(t).map(r=>y(r)).map(e))}function Qe(t,e,...r){const n=(o,l,u)=>e(y(o),y(l),u);return i.computed(()=>{const o=y(t);return r.length?o.reduce(n,y(r[0])):o.reduce(n)})}function Ve(t,e){return i.computed(()=>y(t).some((r,n,o)=>e(y(r),n,o)))}function De(t){return i.computed(()=>[...new Set(y(t).map(e=>y(e)))])}function xe(t=0,e={}){const r=i.ref(t),{max:n=1/0,min:o=-1/0}=e,l=(d=1)=>r.value=Math.min(n,r.value+d),u=(d=1)=>r.value=Math.max(o,r.value-d),c=()=>r.value,p=d=>r.value=Math.max(o,Math.min(n,d));return{count:r,inc:l,dec:u,get:c,set:p,reset:(d=t)=>(t=d,p(d))}}const tr=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,er=/\[([^\]]+)]|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,rr=(t,e,r,n)=>{let o=t<12?"AM":"PM";return n&&(o=o.split("").reduce((l,u)=>l+=`${u}.`,"")),r?o.toLowerCase():o},_t=(t,e,r={})=>{var n;const o=t.getFullYear(),l=t.getMonth(),u=t.getDate(),c=t.getHours(),p=t.getMinutes(),_=t.getSeconds(),d=t.getMilliseconds(),s=t.getDay(),f=(n=r.customMeridiem)!=null?n:rr,h={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>l+1,MM:()=>`${l+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(u),DD:()=>`${u}`.padStart(2,"0"),H:()=>String(c),HH:()=>`${c}`.padStart(2,"0"),h:()=>`${c%12||12}`.padStart(1,"0"),hh:()=>`${c%12||12}`.padStart(2,"0"),m:()=>String(p),mm:()=>`${p}`.padStart(2,"0"),s:()=>String(_),ss:()=>`${_}`.padStart(2,"0"),SSS:()=>`${d}`.padStart(3,"0"),d:()=>s,dd:()=>t.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>f(c,p),AA:()=>f(c,p,!1,!0),a:()=>f(c,p,!0),aa:()=>f(c,p,!0,!0)};return e.replace(er,(v,w)=>w||h[v]())},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(tr);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 nr(t,e="HH:mm:ss",r={}){return i.computed(()=>_t(vt(y(t)),y(e),r))}function ht(t,e=1e3,r={}){const{immediate:n=!0,immediateCallback:o=!1}=r;let l=null;const u=i.ref(!1);function c(){l&&(clearInterval(l),l=null)}function p(){u.value=!1,c()}function _(){i.unref(e)<=0||(u.value=!0,o&&t(),c(),l=setInterval(t,y(e)))}if(n&&M&&_(),i.isRef(e)||U(e)){const d=i.watch(e,()=>{u.value&&M&&_()});j(d)}return j(p),{isActive:u,pause:p,resume:_}}var or=Object.defineProperty,Ot=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,wt=(t,e,r)=>e in t?or(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,lr=(t,e)=>{for(var r in e||(e={}))ar.call(e,r)&&wt(t,r,e[r]);if(Ot)for(var r of Ot(e))ir.call(e,r)&&wt(t,r,e[r]);return t};function ur(t=1e3,e={}){const{controls:r=!1,immediate:n=!0,callback:o}=e,l=i.ref(0),u=()=>l.value+=1,c=ht(o?()=>{u(),o(l.value)}:u,t,{immediate:n});return r?lr({counter:l},c):l}function cr(t,e={}){var r;const n=i.ref((r=e.initialValue)!=null?r:null);return i.watch(t,()=>n.value=tt(),e),n}function gt(t,e,r={}){const{immediate:n=!0}=r,o=i.ref(!1);let l=null;function u(){l&&(clearTimeout(l),l=null)}function c(){o.value=!1,u()}function p(..._){u(),o.value=!0,l=setTimeout(()=>{o.value=!1,l=null,t(..._)},y(e))}return n&&(o.value=!0,M&&p()),j(c),{isPending:o,start:p,stop:c}}var sr=Object.defineProperty,Pt=Object.getOwnPropertySymbols,fr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,mt=(t,e,r)=>e in t?sr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pr=(t,e)=>{for(var r in e||(e={}))fr.call(e,r)&&mt(t,r,e[r]);if(Pt)for(var r of Pt(e))dr.call(e,r)&&mt(t,r,e[r]);return t};function yr(t=1e3,e={}){const{controls:r=!1,callback:n}=e,o=gt(n??I,t,e),l=i.computed(()=>!o.isPending.value);return r?pr({ready:l},o):l}function _r(t,e={}){const{method:r="parseFloat",radix:n,nanToZero:o}=e;return i.computed(()=>{let l=y(t);return typeof l=="string"&&(l=Number[r](l,n)),o&&isNaN(l)&&(l=0),l})}function vr(t){return i.computed(()=>`${y(t)}`)}function hr(t=!1,e={}){const{truthyValue:r=!0,falsyValue:n=!1}=e,o=i.isRef(t),l=i.ref(t);function u(c){if(arguments.length)return l.value=c,l.value;{const p=y(r);return l.value=l.value===p?y(n):p,l.value}}return o?u:[l,u]}function Or(t,e,r){let n=(r==null?void 0:r.immediate)?[]:[...t instanceof Function?t():Array.isArray(t)?t:i.unref(t)];return i.watch(t,(o,l,u)=>{const c=new Array(n.length),p=[];for(const d of o){let s=!1;for(let f=0;f<n.length;f++)if(!c[f]&&d===n[f]){c[f]=!0,s=!0;break}s||p.push(d)}const _=n.filter((d,s)=>!c[s]);e(o,n,p,_,u),n=[...o]},r)}var bt=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,Pr=(t,e)=>{var r={};for(var n in t)wr.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&&gr.call(t,n)&&(r[n]=t[n]);return r};function C(t,e,r={}){const n=r,{eventFilter:o=B}=n,l=Pr(n,["eventFilter"]);return i.watch(t,R(o,e),l)}var $t=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,$r=(t,e)=>{var r={};for(var n in t)mr.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&&br.call(t,n)&&(r[n]=t[n]);return r};function Sr(t,e,r){const n=r,{count:o}=n,l=$r(n,["count"]),u=i.ref(0),c=C(t,(...p)=>{u.value+=1,u.value>=y(o)&&i.nextTick(()=>c()),e(...p)},l);return{count:u,stop:c}}var Ar=Object.defineProperty,jr=Object.defineProperties,Ir=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,jt=(t,e,r)=>e in t?Ar(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Fr=(t,e)=>{for(var r in e||(e={}))St.call(e,r)&&jt(t,r,e[r]);if(L)for(var r of L(e))At.call(e,r)&&jt(t,r,e[r]);return t},Tr=(t,e)=>jr(t,Ir(e)),Er=(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&&At.call(t,n)&&(r[n]=t[n]);return r};function It(t,e,r={}){const n=r,{debounce:o=0,maxWait:l=void 0}=n,u=Er(n,["debounce","maxWait"]);return C(t,e,Tr(Fr({},u),{eventFilter:z(o,{maxWait:l})}))}var Mr=Object.defineProperty,Rr=Object.defineProperties,Cr=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,Et=(t,e,r)=>e in t?Mr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Nr=(t,e)=>{for(var r in e||(e={}))Ft.call(e,r)&&Et(t,r,e[r]);if(H)for(var r of H(e))Tt.call(e,r)&&Et(t,r,e[r]);return t},Wr=(t,e)=>Rr(t,Cr(e)),Ur=(t,e)=>{var r={};for(var n in t)Ft.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&&Tt.call(t,n)&&(r[n]=t[n]);return r};function V(t,e,r={}){const n=r,{eventFilter:o=B}=n,l=Ur(n,["eventFilter"]),u=R(o,e);let c,p,_;if(l.flush==="sync"){const d=i.ref(!1);p=()=>{},c=s=>{d.value=!0,s(),d.value=!1},_=i.watch(t,(...s)=>{d.value||u(...s)},l)}else{const d=[],s=i.ref(0),f=i.ref(0);p=()=>{s.value=f.value},d.push(i.watch(t,()=>{f.value++},Wr(Nr({},l),{flush:"sync"}))),c=h=>{const v=f.value;h(),s.value+=f.value-v},d.push(i.watch(t,(...h)=>{const v=s.value>0&&s.value===f.value;s.value=0,f.value=0,!v&&u(...h)},l)),_=()=>{d.forEach(h=>h())}}return{stop:_,ignoreUpdates:c,ignorePrevAsyncUpdates:p}}function Br(t,e,r){const n=i.watch(t,(...o)=>(i.nextTick(()=>n()),e(...o)),r)}var Lr=Object.defineProperty,Hr=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Ct=(t,e,r)=>e in t?Lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Yr=(t,e)=>{for(var r in e||(e={}))Mt.call(e,r)&&Ct(t,r,e[r]);if(k)for(var r of k(e))Rt.call(e,r)&&Ct(t,r,e[r]);return t},Gr=(t,e)=>Hr(t,kr(e)),zr=(t,e)=>{var r={};for(var n in t)Mt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&k)for(var n of k(t))e.indexOf(n)<0&&Rt.call(t,n)&&(r[n]=t[n]);return r};function Nt(t,e,r={}){const n=r,{eventFilter:o}=n,l=zr(n,["eventFilter"]),{eventFilter:u,pause:c,resume:p,isActive:_}=et(o);return{stop:C(t,e,Gr(Yr({},l),{eventFilter:u})),pause:c,resume:p,isActive:_}}var Zr=Object.defineProperty,qr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Wt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Bt=(t,e,r)=>e in t?Zr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xr=(t,e)=>{for(var r in e||(e={}))Wt.call(e,r)&&Bt(t,r,e[r]);if(Y)for(var r of Y(e))Ut.call(e,r)&&Bt(t,r,e[r]);return t},Kr=(t,e)=>qr(t,Jr(e)),Qr=(t,e)=>{var r={};for(var n in t)Wt.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&&Ut.call(t,n)&&(r[n]=t[n]);return r};function Lt(t,e,r={}){const n=r,{throttle:o=0,trailing:l=!0,leading:u=!0}=n,c=Qr(n,["throttle","trailing","leading"]);return C(t,e,Kr(Xr({},c),{eventFilter:Z(o,l,u)}))}var Vr=Object.defineProperty,Dr=Object.defineProperties,xr=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,kt=(t,e,r)=>e in t?Vr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,rn=(t,e)=>{for(var r in e||(e={}))tn.call(e,r)&&kt(t,r,e[r]);if(Ht)for(var r of Ht(e))en.call(e,r)&&kt(t,r,e[r]);return t},nn=(t,e)=>Dr(t,xr(e));function on(t,e,r={}){let n;function o(){if(!n)return;const d=n;n=void 0,d()}function l(d){n=d}const u=(d,s)=>(o(),e(d,s,l)),c=V(t,u,r),{ignoreUpdates:p}=c,_=()=>{let d;return p(()=>{d=u(an(t),ln(t))}),d};return nn(rn({},c),{trigger:_})}function an(t){return i.isReactive(t)?t:Array.isArray(t)?t.map(e=>Yt(e)):Yt(t)}function Yt(t){return typeof t=="function"?t():i.unref(t)}function ln(t){return Array.isArray(t)?t.map(()=>{}):void 0}function un(t,e,r){return i.watch(t,(n,o,l)=>{n&&e(n,o,l)},r)}a.__onlyVue27Plus=rt,a.__onlyVue3=ne,a.assert=qt,a.autoResetRef=ct,a.bypassFilter=B,a.clamp=xt,a.computedEager=$,a.computedWithControl=nt,a.containsProp=ue,a.controlledComputed=nt,a.controlledRef=Ae,a.createEventHook=fe,a.createFilterWrapper=R,a.createGlobalState=de,a.createInjectionState=pe,a.createReactiveFn=J,a.createSharedComposable=ye,a.createSingletonPromise=ie,a.debounceFilter=z,a.debouncedRef=X,a.debouncedWatch=It,a.directiveHooks=oe,a.eagerComputed=$,a.extendRef=ot,a.formatDate=_t,a.get=_e,a.hasOwn=re,a.identity=ae,a.ignorableWatch=V,a.increaseWithUnit=ce,a.invoke=le,a.isBoolean=Jt,a.isClient=M,a.isDef=Zt,a.isDefined=ve,a.isFunction=U,a.isIOS=ee,a.isNumber=Xt,a.isObject=Qt,a.isString=Kt,a.isWindow=Vt,a.makeDestructurable=Pe,a.noop=I,a.normalizeDate=vt,a.now=Dt,a.objectPick=se,a.pausableFilter=et,a.pausableWatch=Nt,a.promiseTimeout=q,a.rand=te,a.reactify=J,a.reactifyObject=me,a.reactiveComputed=ut,a.reactiveOmit=be,a.reactivePick=$e,a.refAutoReset=ct,a.refDebounced=X,a.refDefault=Se,a.refThrottled=K,a.refWithControl=dt,a.resolveRef=je,a.resolveUnref=y,a.set=Ie,a.syncRef=Fe,a.syncRefs=Te,a.throttleFilter=Z,a.throttledRef=K,a.throttledWatch=Lt,a.timestamp=tt,a.toReactive=lt,a.toRefs=Be,a.tryOnBeforeMount=Le,a.tryOnBeforeUnmount=He,a.tryOnMounted=ke,a.tryOnScopeDispose=j,a.tryOnUnmounted=Ye,a.until=Ge,a.useArrayEvery=ze,a.useArrayFilter=Ze,a.useArrayFind=qe,a.useArrayFindIndex=Je,a.useArrayJoin=Xe,a.useArrayMap=Ke,a.useArrayReduce=Qe,a.useArraySome=Ve,a.useArrayUnique=De,a.useCounter=xe,a.useDateFormat=nr,a.useDebounce=X,a.useDebounceFn=st,a.useInterval=ur,a.useIntervalFn=ht,a.useLastChanged=cr,a.useThrottle=K,a.useThrottleFn=ft,a.useTimeout=yr,a.useTimeoutFn=gt,a.useToNumber=_r,a.useToString=vr,a.useToggle=hr,a.watchArray=Or,a.watchAtMost=Sr,a.watchDebounced=It,a.watchIgnorable=V,a.watchOnce=Br,a.watchPausable=Nt,a.watchThrottled=Lt,a.watchTriggerable=on,a.watchWithFilter=C,a.whenever=un})(this.VueUse=this.VueUse||{},VueDemi);
{
"name": "@vueuse/shared",
"version": "9.9.0",
"version": "9.10.0",
"author": "Anthony Fu <https://github.com/antfu>",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc