@vueuse/shared 10.4.1 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +46 -28
- package/index.d.cts +79 -44
- package/index.d.mts +79 -44
- package/index.d.ts +79 -44
- package/index.iife.js +46 -28
- package/index.iife.min.js +1 -1
- package/index.mjs +46 -30
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue_demi from 'vue-demi';
|
|
2
|
-
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';
|
|
2
|
+
import { WatchOptionsBase, Ref, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions, WatchOptions, InjectionKey, ShallowUnwrapRef as ShallowUnwrapRef$1, inject, provide, UnwrapNestedRefs, UnwrapRef, ToRef, ToRefs, MaybeRef as MaybeRef$1, WatchCallback, WatchStopHandle } from 'vue-demi';
|
|
3
3
|
|
|
4
4
|
declare function computedEager<T>(fn: () => T, options?: WatchOptionsBase): Readonly<Ref<T>>;
|
|
5
5
|
|
|
@@ -101,7 +101,14 @@ type ElementOf<T> = T extends (infer E)[] ? E : never;
|
|
|
101
101
|
type ShallowUnwrapRef<T> = T extends Ref<infer P> ? P : T;
|
|
102
102
|
type Awaitable<T> = Promise<T> | T;
|
|
103
103
|
type ArgumentsType<T> = T extends (...args: infer U) => any ? U : never;
|
|
104
|
-
|
|
104
|
+
/**
|
|
105
|
+
* Compatible with versions below TypeScript 4.5 Awaited
|
|
106
|
+
*/
|
|
107
|
+
type Awaited<T> = T extends null | undefined ? T : T extends object & {
|
|
108
|
+
then(onfulfilled: infer F, ...args: infer _): any;
|
|
109
|
+
} ? F extends ((value: infer V, ...args: infer _) => any) ? Awaited<V> : never : T;
|
|
110
|
+
type Promisify<T> = Promise<Awaited<T>>;
|
|
111
|
+
type PromisifyFn<T extends AnyFn> = (...args: ArgumentsType<T>) => Promisify<ReturnType<T>>;
|
|
105
112
|
interface Pausable {
|
|
106
113
|
/**
|
|
107
114
|
* A ref indicate whether a pausable instance is active
|
|
@@ -164,7 +171,7 @@ interface FunctionWrapperOptions<Args extends any[] = any[], This = any> {
|
|
|
164
171
|
args: Args;
|
|
165
172
|
thisArg: This;
|
|
166
173
|
}
|
|
167
|
-
type EventFilter<Args extends any[] = any[], This = any, Invoke extends AnyFn = AnyFn> = (invoke: Invoke, options: FunctionWrapperOptions<Args, This>) => ReturnType<Invoke> |
|
|
174
|
+
type EventFilter<Args extends any[] = any[], This = any, Invoke extends AnyFn = AnyFn> = (invoke: Invoke, options: FunctionWrapperOptions<Args, This>) => ReturnType<Invoke> | Promisify<ReturnType<Invoke>>;
|
|
168
175
|
interface ConfigurableEventFilter {
|
|
169
176
|
/**
|
|
170
177
|
* Filter for if events should to be received.
|
|
@@ -189,7 +196,7 @@ interface DebounceFilterOptions {
|
|
|
189
196
|
/**
|
|
190
197
|
* @internal
|
|
191
198
|
*/
|
|
192
|
-
declare function createFilterWrapper<T extends AnyFn>(filter: EventFilter, fn: T): (this: any, ...args: ArgumentsType<T>) => Promise<ReturnType<T
|
|
199
|
+
declare function createFilterWrapper<T extends AnyFn>(filter: EventFilter, fn: T): (this: any, ...args: ArgumentsType<T>) => Promise<Awaited<ReturnType<T>>>;
|
|
193
200
|
declare const bypassFilter: EventFilter;
|
|
194
201
|
/**
|
|
195
202
|
* Create an EventFilter that debounce the events
|
|
@@ -199,9 +206,9 @@ declare function debounceFilter(ms: MaybeRefOrGetter<number>, options?: Debounce
|
|
|
199
206
|
* Create an EventFilter that throttle the events
|
|
200
207
|
*
|
|
201
208
|
* @param ms
|
|
202
|
-
* @param [trailing
|
|
203
|
-
* @param [leading
|
|
204
|
-
* @param [rejectOnCancel
|
|
209
|
+
* @param [trailing]
|
|
210
|
+
* @param [leading]
|
|
211
|
+
* @param [rejectOnCancel]
|
|
205
212
|
*/
|
|
206
213
|
declare function throttleFilter(ms: MaybeRefOrGetter<number>, trailing?: boolean, leading?: boolean, rejectOnCancel?: boolean): EventFilter<any[], any, AnyFn>;
|
|
207
214
|
/**
|
|
@@ -275,13 +282,19 @@ declare function objectEntries<T extends object>(obj: T): [keyof T, T[keyof T]][
|
|
|
275
282
|
*/
|
|
276
283
|
declare function createGlobalState<Fn extends AnyFn>(stateFactory: Fn): Fn;
|
|
277
284
|
|
|
285
|
+
interface CreateInjectionStateOptions<Return> {
|
|
286
|
+
/**
|
|
287
|
+
* Custom injectionKey for InjectionState
|
|
288
|
+
*/
|
|
289
|
+
injectionKey?: string | InjectionKey<Return>;
|
|
290
|
+
}
|
|
278
291
|
/**
|
|
279
292
|
* Create global state that can be injected into components.
|
|
280
293
|
*
|
|
281
294
|
* @see https://vueuse.org/createInjectionState
|
|
282
295
|
*
|
|
283
296
|
*/
|
|
284
|
-
declare function createInjectionState<Arguments extends Array<any>, Return>(composable: (...args: Arguments) => Return): readonly [useProvidingState: (...args: Arguments) => Return, useInjectedState: () => Return | undefined];
|
|
297
|
+
declare function createInjectionState<Arguments extends Array<any>, Return>(composable: (...args: Arguments) => Return, options?: CreateInjectionStateOptions<Return>): readonly [useProvidingState: (...args: Arguments) => Return, useInjectedState: () => Return | undefined];
|
|
285
298
|
|
|
286
299
|
/**
|
|
287
300
|
* Make a composable function usable with multiple Vue instances.
|
|
@@ -319,12 +332,34 @@ declare function extendRef<R extends Ref<any>, Extend extends object, Options ex
|
|
|
319
332
|
declare function get<T>(ref: MaybeRef<T>): T;
|
|
320
333
|
declare function get<T, K extends keyof T>(ref: MaybeRef<T>, key: K): T[K];
|
|
321
334
|
|
|
335
|
+
/**
|
|
336
|
+
* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* ```ts
|
|
340
|
+
* injectLocal('MyInjectionKey', 1)
|
|
341
|
+
* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
declare const injectLocal: typeof inject;
|
|
345
|
+
|
|
322
346
|
declare function isDefined<T>(v: Ref<T>): v is Ref<Exclude<T, null | undefined>>;
|
|
323
347
|
declare function isDefined<T>(v: ComputedRef<T>): v is ComputedRef<Exclude<T, null | undefined>>;
|
|
324
348
|
declare function isDefined<T>(v: T): v is Exclude<T, null | undefined>;
|
|
325
349
|
|
|
326
350
|
declare function makeDestructurable<T extends Record<string, unknown>, A extends readonly any[]>(obj: T, arr: A): T & A;
|
|
327
351
|
|
|
352
|
+
/**
|
|
353
|
+
* On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.
|
|
354
|
+
*
|
|
355
|
+
* @example
|
|
356
|
+
* ```ts
|
|
357
|
+
* provideLocal('MyInjectionKey', 1)
|
|
358
|
+
* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
declare const provideLocal: typeof provide;
|
|
362
|
+
|
|
328
363
|
type Reactified<T, Computed extends boolean> = T extends (...args: infer A) => infer R ? (...args: {
|
|
329
364
|
[K in keyof A]: Computed extends true ? MaybeRefOrGetter<A[K]> : MaybeRef<A[K]>;
|
|
330
365
|
}) => ComputedRef<R> : never;
|
|
@@ -397,9 +432,6 @@ declare function refDebounced<T>(value: Ref<T>, ms?: MaybeRefOrGetter<number>, o
|
|
|
397
432
|
|
|
398
433
|
/**
|
|
399
434
|
* Apply default value to a ref.
|
|
400
|
-
*
|
|
401
|
-
* @param source source ref
|
|
402
|
-
* @param targets
|
|
403
435
|
*/
|
|
404
436
|
declare function refDefault<T>(source: Ref<T | undefined | null>, defaultValue: T): Ref<T>;
|
|
405
437
|
|
|
@@ -409,8 +441,8 @@ declare function refDefault<T>(source: Ref<T | undefined | null>, defaultValue:
|
|
|
409
441
|
*
|
|
410
442
|
* @param value Ref value to be watched with throttle effect
|
|
411
443
|
* @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
412
|
-
* @param [trailing
|
|
413
|
-
* @param [leading
|
|
444
|
+
* @param [trailing] if true, update the value again after the delay time is up
|
|
445
|
+
* @param [leading] if true, update the value on the leading edge of the ms timeout
|
|
414
446
|
*/
|
|
415
447
|
declare function refThrottled<T>(value: Ref<T>, delay?: number, trailing?: boolean, leading?: boolean): Ref<T>;
|
|
416
448
|
|
|
@@ -430,9 +462,6 @@ interface ControlledRefOptions<T> {
|
|
|
430
462
|
}
|
|
431
463
|
/**
|
|
432
464
|
* Explicitly define the deps of computed.
|
|
433
|
-
*
|
|
434
|
-
* @param source
|
|
435
|
-
* @param fn
|
|
436
465
|
*/
|
|
437
466
|
declare function refWithControl<T>(initial: T, options?: ControlledRefOptions<T>): vue_demi.ShallowUnwrapRef<{
|
|
438
467
|
get: (tracking?: boolean) => T;
|
|
@@ -660,10 +689,10 @@ declare function useArrayDifference<T>(list: MaybeRefOrGetter<T[]>, values: Mayb
|
|
|
660
689
|
* Reactive `Array.every`
|
|
661
690
|
*
|
|
662
691
|
* @see https://vueuse.org/useArrayEvery
|
|
663
|
-
* @param
|
|
692
|
+
* @param list - the array was called upon.
|
|
664
693
|
* @param fn - a function to test each element.
|
|
665
694
|
*
|
|
666
|
-
* @returns
|
|
695
|
+
* @returns **true** if the `fn` function returns a **truthy** value for every element from the array. Otherwise, **false**.
|
|
667
696
|
*/
|
|
668
697
|
declare function useArrayEvery<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => unknown): ComputedRef<boolean>;
|
|
669
698
|
|
|
@@ -671,10 +700,10 @@ declare function useArrayEvery<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>,
|
|
|
671
700
|
* Reactive `Array.filter`
|
|
672
701
|
*
|
|
673
702
|
* @see https://vueuse.org/useArrayFilter
|
|
674
|
-
* @param
|
|
703
|
+
* @param list - the array was called upon.
|
|
675
704
|
* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.
|
|
676
705
|
*
|
|
677
|
-
* @returns
|
|
706
|
+
* @returns a shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.
|
|
678
707
|
*/
|
|
679
708
|
declare function useArrayFilter<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: T[]) => boolean): ComputedRef<T[]>;
|
|
680
709
|
|
|
@@ -682,7 +711,7 @@ declare function useArrayFilter<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>
|
|
|
682
711
|
* Reactive `Array.find`
|
|
683
712
|
*
|
|
684
713
|
* @see https://vueuse.org/useArrayFind
|
|
685
|
-
* @param
|
|
714
|
+
* @param list - the array was called upon.
|
|
686
715
|
* @param fn - a function to test each element.
|
|
687
716
|
*
|
|
688
717
|
* @returns the first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.
|
|
@@ -693,10 +722,10 @@ declare function useArrayFind<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>,
|
|
|
693
722
|
* Reactive `Array.findIndex`
|
|
694
723
|
*
|
|
695
724
|
* @see https://vueuse.org/useArrayFindIndex
|
|
696
|
-
* @param
|
|
725
|
+
* @param list - the array was called upon.
|
|
697
726
|
* @param fn - a function to test each element.
|
|
698
727
|
*
|
|
699
|
-
* @returns
|
|
728
|
+
* @returns the index of the first element in the array that passes the test. Otherwise, "-1".
|
|
700
729
|
*/
|
|
701
730
|
declare function useArrayFindIndex<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => unknown): ComputedRef<number>;
|
|
702
731
|
|
|
@@ -704,7 +733,7 @@ declare function useArrayFindIndex<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>
|
|
|
704
733
|
* Reactive `Array.findLast`
|
|
705
734
|
*
|
|
706
735
|
* @see https://vueuse.org/useArrayFindLast
|
|
707
|
-
* @param
|
|
736
|
+
* @param list - the array was called upon.
|
|
708
737
|
* @param fn - a function to test each element.
|
|
709
738
|
*
|
|
710
739
|
* @returns the last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.
|
|
@@ -716,6 +745,13 @@ interface UseArrayIncludesOptions<T, V> {
|
|
|
716
745
|
fromIndex?: number;
|
|
717
746
|
comparator?: UseArrayIncludesComparatorFn<T, V> | keyof T;
|
|
718
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* Reactive `Array.includes`
|
|
750
|
+
*
|
|
751
|
+
* @see https://vueuse.org/useArrayIncludes
|
|
752
|
+
*
|
|
753
|
+
* @returns true if the `value` is found in the array. Otherwise, false.
|
|
754
|
+
*/
|
|
719
755
|
declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, value: MaybeRefOrGetter<V>, comparator?: UseArrayIncludesComparatorFn<T, V>): ComputedRef<boolean>;
|
|
720
756
|
declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, value: MaybeRefOrGetter<V>, comparator?: keyof T): ComputedRef<boolean>;
|
|
721
757
|
declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, value: MaybeRefOrGetter<V>, options?: UseArrayIncludesOptions<T, V>): ComputedRef<boolean>;
|
|
@@ -724,10 +760,10 @@ declare function useArrayIncludes<T, V = any>(list: MaybeRefOrGetter<MaybeRefOrG
|
|
|
724
760
|
* Reactive `Array.join`
|
|
725
761
|
*
|
|
726
762
|
* @see https://vueuse.org/useArrayJoin
|
|
727
|
-
* @param
|
|
728
|
-
* @param
|
|
763
|
+
* @param list - the array was called upon.
|
|
764
|
+
* @param separator - a string to separate each pair of adjacent elements of the array. If omitted, the array elements are separated with a comma (",").
|
|
729
765
|
*
|
|
730
|
-
* @returns
|
|
766
|
+
* @returns a string with all array elements joined. If arr.length is 0, the empty string is returned.
|
|
731
767
|
*/
|
|
732
768
|
declare function useArrayJoin(list: MaybeRefOrGetter<MaybeRefOrGetter<any>[]>, separator?: MaybeRefOrGetter<string>): ComputedRef<string>;
|
|
733
769
|
|
|
@@ -735,10 +771,10 @@ declare function useArrayJoin(list: MaybeRefOrGetter<MaybeRefOrGetter<any>[]>, s
|
|
|
735
771
|
* Reactive `Array.map`
|
|
736
772
|
*
|
|
737
773
|
* @see https://vueuse.org/useArrayMap
|
|
738
|
-
* @param
|
|
774
|
+
* @param list - the array was called upon.
|
|
739
775
|
* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.
|
|
740
776
|
*
|
|
741
|
-
* @returns
|
|
777
|
+
* @returns a new array with each element being the result of the callback function.
|
|
742
778
|
*/
|
|
743
779
|
declare function useArrayMap<T, U = T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: T[]) => U): ComputedRef<U[]>;
|
|
744
780
|
|
|
@@ -747,7 +783,7 @@ type UseArrayReducer<PV, CV, R> = (previousValue: PV, currentValue: CV, currentI
|
|
|
747
783
|
* Reactive `Array.reduce`
|
|
748
784
|
*
|
|
749
785
|
* @see https://vueuse.org/useArrayReduce
|
|
750
|
-
* @param
|
|
786
|
+
* @param list - the array was called upon.
|
|
751
787
|
* @param reducer - a "reducer" function.
|
|
752
788
|
*
|
|
753
789
|
* @returns the value that results from running the "reducer" callback function to completion over the entire array.
|
|
@@ -757,7 +793,7 @@ declare function useArrayReduce<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>
|
|
|
757
793
|
* Reactive `Array.reduce`
|
|
758
794
|
*
|
|
759
795
|
* @see https://vueuse.org/useArrayReduce
|
|
760
|
-
* @param
|
|
796
|
+
* @param list - the array was called upon.
|
|
761
797
|
* @param reducer - a "reducer" function.
|
|
762
798
|
* @param initialValue - a value to be initialized the first time when the callback is called.
|
|
763
799
|
*
|
|
@@ -769,19 +805,19 @@ declare function useArrayReduce<T, U>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>
|
|
|
769
805
|
* Reactive `Array.some`
|
|
770
806
|
*
|
|
771
807
|
* @see https://vueuse.org/useArraySome
|
|
772
|
-
* @param
|
|
808
|
+
* @param list - the array was called upon.
|
|
773
809
|
* @param fn - a function to test each element.
|
|
774
810
|
*
|
|
775
|
-
* @returns
|
|
811
|
+
* @returns **true** if the `fn` function returns a **truthy** value for any element from the array. Otherwise, **false**.
|
|
776
812
|
*/
|
|
777
813
|
declare function useArraySome<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => unknown): ComputedRef<boolean>;
|
|
778
814
|
|
|
779
815
|
/**
|
|
780
816
|
* reactive unique array
|
|
781
817
|
* @see https://vueuse.org/useArrayUnique
|
|
782
|
-
* @param
|
|
818
|
+
* @param list - the array was called upon.
|
|
783
819
|
* @param compareFn
|
|
784
|
-
* @returns
|
|
820
|
+
* @returns A computed ref that returns a unique array of items.
|
|
785
821
|
*/
|
|
786
822
|
declare function useArrayUnique<T>(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, compareFn?: (a: T, b: T, array: T[]) => boolean): ComputedRef<T[]>;
|
|
787
823
|
|
|
@@ -793,8 +829,8 @@ interface UseCounterOptions {
|
|
|
793
829
|
* Basic counter with utility functions.
|
|
794
830
|
*
|
|
795
831
|
* @see https://vueuse.org/useCounter
|
|
796
|
-
* @param [initialValue
|
|
797
|
-
* @param
|
|
832
|
+
* @param [initialValue]
|
|
833
|
+
* @param options
|
|
798
834
|
*/
|
|
799
835
|
declare function useCounter(initialValue?: MaybeRef$1<number>, options?: UseCounterOptions): {
|
|
800
836
|
count: vue_demi.Ref<number>;
|
|
@@ -838,7 +874,7 @@ type UseDateFormatReturn = ReturnType<typeof useDateFormat>;
|
|
|
838
874
|
* @see https://vueuse.org/useDebounceFn
|
|
839
875
|
* @param fn A function to be executed after delay milliseconds debounced.
|
|
840
876
|
* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
841
|
-
* @param
|
|
877
|
+
* @param options Options
|
|
842
878
|
*
|
|
843
879
|
* @return A new, debounce, function.
|
|
844
880
|
*/
|
|
@@ -908,8 +944,7 @@ interface UseLastChangedOptions<Immediate extends boolean, InitialValue extends
|
|
|
908
944
|
* @see https://vueuse.org/useLastChanged
|
|
909
945
|
*/
|
|
910
946
|
declare function useLastChanged(source: WatchSource, options?: UseLastChangedOptions<false>): Ref<number | null>;
|
|
911
|
-
declare function useLastChanged(source: WatchSource, options: UseLastChangedOptions<true>): Ref<number>;
|
|
912
|
-
declare function useLastChanged(source: WatchSource, options: UseLastChangedOptions<boolean, number>): Ref<number>;
|
|
947
|
+
declare function useLastChanged(source: WatchSource, options: UseLastChangedOptions<true> | UseLastChangedOptions<boolean, number>): Ref<number>;
|
|
913
948
|
|
|
914
949
|
/**
|
|
915
950
|
* Throttle execution of a function. Especially useful for rate limiting
|
|
@@ -919,11 +954,11 @@ declare function useLastChanged(source: WatchSource, options: UseLastChangedOpti
|
|
|
919
954
|
* to `callback` when the throttled-function is executed.
|
|
920
955
|
* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
921
956
|
*
|
|
922
|
-
* @param [trailing
|
|
957
|
+
* @param [trailing] if true, call fn again after the time is up
|
|
923
958
|
*
|
|
924
|
-
* @param [leading
|
|
959
|
+
* @param [leading] if true, call fn on the leading edge of the ms timeout
|
|
925
960
|
*
|
|
926
|
-
* @param [rejectOnCancel
|
|
961
|
+
* @param [rejectOnCancel] if true, reject the last call if it's been cancel
|
|
927
962
|
*
|
|
928
963
|
* @return A new, throttled, function.
|
|
929
964
|
*/
|
|
@@ -1093,4 +1128,4 @@ declare function watchTriggerable<T extends object, FnReturnT>(source: T, cb: Wa
|
|
|
1093
1128
|
*/
|
|
1094
1129
|
declare function whenever<T>(source: WatchSource<T | false | null | undefined>, cb: WatchCallback<T>, options?: WatchOptions): vue_demi.WatchStopHandle;
|
|
1095
1130
|
|
|
1096
|
-
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IgnoredUpdater, type MapOldSources, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MultiWatchSources, type Mutable, type Pausable, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type 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 };
|
|
1131
|
+
export { type AnyFn, type ArgumentsType, type Arrayable, type Awaitable, type Awaited, type ComputedRefWithControl, type ComputedWithControlRefExtra, type ConfigurableEventFilter, type ConfigurableFlush, type ConfigurableFlushSync, type ControlledRefOptions, type CreateInjectionStateOptions, type DateLike, type DebounceFilterOptions, type DeepMaybeRef, type ElementOf, type EventFilter, type EventHook, type EventHookOff, type EventHookOn, type EventHookTrigger, type ExtendRefOptions, type Fn, type FunctionArgs, type FunctionWrapperOptions, type IgnoredUpdater, type MapOldSources, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MultiWatchSources, type Mutable, type Pausable, type Promisify, type PromisifyFn, type Reactified, type ReactifyNested, type ReactifyObjectOptions, type ReactifyOptions, type ReactiveOmitPredicate, type ReactivePickPredicate, type ReadonlyRefOrGetter, type RemovableRef, type ShallowUnwrapRef, type SingletonPromiseReturn, type Stoppable, type SyncRefOptions, type SyncRefsOptions, type ToRefsOptions, type UntilArrayInstance, type UntilBaseInstance, type UntilToMatchOptions, type UntilValueInstance, type UseArrayIncludesComparatorFn, type UseArrayIncludesOptions, type UseArrayReducer, type UseCounterOptions, type UseDateFormatOptions, type UseDateFormatReturn, type UseIntervalControls, type UseIntervalFnOptions, type UseIntervalOptions, type UseLastChangedOptions, type UseTimeoutFnOptions, type UseTimeoutOptions, type UseToNumberOptions, type UseToggleOptions, type WatchArrayCallback, type WatchAtMostOptions, type WatchAtMostReturn, type WatchDebouncedOptions, type WatchIgnorableReturn, type WatchPausableReturn, type WatchThrottledOptions, type WatchTriggerableCallback, type WatchTriggerableReturn, type WatchWithFilterOptions, type 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, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, 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 };
|
package/index.iife.js
CHANGED
|
@@ -207,14 +207,39 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
211
|
+
|
|
212
|
+
const provideLocal = (key, value) => {
|
|
213
|
+
var _a;
|
|
214
|
+
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
215
|
+
if (instance == null)
|
|
216
|
+
throw new Error("provideLocal must be called in setup");
|
|
217
|
+
if (!localProvidedStateMap.has(instance))
|
|
218
|
+
localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));
|
|
219
|
+
const localProvidedState = localProvidedStateMap.get(instance);
|
|
220
|
+
localProvidedState[key] = value;
|
|
221
|
+
vueDemi.provide(key, value);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const injectLocal = (...args) => {
|
|
225
|
+
var _a;
|
|
226
|
+
const key = args[0];
|
|
227
|
+
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
228
|
+
if (instance == null)
|
|
229
|
+
throw new Error("injectLocal must be called in setup");
|
|
230
|
+
if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))
|
|
231
|
+
return localProvidedStateMap.get(instance)[key];
|
|
232
|
+
return vueDemi.inject(...args);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
function createInjectionState(composable, options) {
|
|
236
|
+
const key = (options == null ? void 0 : options.injectionKey) || Symbol("InjectionState");
|
|
212
237
|
const useProvidingState = (...args) => {
|
|
213
238
|
const state = composable(...args);
|
|
214
|
-
|
|
239
|
+
provideLocal(key, state);
|
|
215
240
|
return state;
|
|
216
241
|
};
|
|
217
|
-
const useInjectedState = () =>
|
|
242
|
+
const useInjectedState = () => injectLocal(key);
|
|
218
243
|
return [useProvidingState, useInjectedState];
|
|
219
244
|
}
|
|
220
245
|
|
|
@@ -373,9 +398,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
373
398
|
function reactiveOmit(obj, ...keys) {
|
|
374
399
|
const flatKeys = keys.flat();
|
|
375
400
|
const predicate = flatKeys[0];
|
|
376
|
-
return reactiveComputed(
|
|
377
|
-
() => typeof predicate === "function" ? Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !flatKeys.includes(e[0])))
|
|
378
|
-
);
|
|
401
|
+
return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !flatKeys.includes(e[0]))));
|
|
379
402
|
}
|
|
380
403
|
|
|
381
404
|
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
@@ -531,9 +554,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
531
554
|
};
|
|
532
555
|
}
|
|
533
556
|
const hyphenateRE = /\B([A-Z])/g;
|
|
534
|
-
const hyphenate = cacheStringFunction(
|
|
535
|
-
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
536
|
-
);
|
|
557
|
+
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
537
558
|
const camelizeRE = /-(\w)/g;
|
|
538
559
|
const camelize = cacheStringFunction((str) => {
|
|
539
560
|
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
@@ -1042,11 +1063,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1042
1063
|
}
|
|
1043
1064
|
|
|
1044
1065
|
function useArrayFind(list, fn) {
|
|
1045
|
-
return vueDemi.computed(
|
|
1046
|
-
() => toValue(
|
|
1047
|
-
|
|
1048
|
-
)
|
|
1049
|
-
);
|
|
1066
|
+
return vueDemi.computed(() => toValue(
|
|
1067
|
+
toValue(list).find((element, index, array) => fn(toValue(element), index, array))
|
|
1068
|
+
));
|
|
1050
1069
|
}
|
|
1051
1070
|
|
|
1052
1071
|
function useArrayFindIndex(list, fn) {
|
|
@@ -1062,11 +1081,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1062
1081
|
return void 0;
|
|
1063
1082
|
}
|
|
1064
1083
|
function useArrayFindLast(list, fn) {
|
|
1065
|
-
return vueDemi.computed(
|
|
1066
|
-
() => toValue(
|
|
1067
|
-
|
|
1068
|
-
)
|
|
1069
|
-
);
|
|
1084
|
+
return vueDemi.computed(() => toValue(
|
|
1085
|
+
!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))
|
|
1086
|
+
));
|
|
1070
1087
|
}
|
|
1071
1088
|
|
|
1072
1089
|
function isArrayIncludesOptions(obj) {
|
|
@@ -1087,11 +1104,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1087
1104
|
comparator = (element, value2) => element[key] === toValue(value2);
|
|
1088
1105
|
}
|
|
1089
1106
|
comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);
|
|
1090
|
-
return vueDemi.computed(
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1107
|
+
return vueDemi.computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(
|
|
1108
|
+
toValue(element),
|
|
1109
|
+
toValue(value),
|
|
1110
|
+
index,
|
|
1111
|
+
toValue(array)
|
|
1112
|
+
)));
|
|
1095
1113
|
}
|
|
1096
1114
|
|
|
1097
1115
|
function useArrayJoin(list, separator) {
|
|
@@ -1409,9 +1427,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1409
1427
|
}
|
|
1410
1428
|
|
|
1411
1429
|
function watchArray(source, cb, options) {
|
|
1412
|
-
let oldList = (options == null ? void 0 : options.immediate) ? [] : [
|
|
1413
|
-
...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)
|
|
1414
|
-
];
|
|
1430
|
+
let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];
|
|
1415
1431
|
return vueDemi.watch(source, (newList, _, onCleanup) => {
|
|
1416
1432
|
const oldListRemains = Array.from({ length: oldList.length });
|
|
1417
1433
|
const added = [];
|
|
@@ -1667,6 +1683,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1667
1683
|
exports.identity = identity;
|
|
1668
1684
|
exports.ignorableWatch = watchIgnorable;
|
|
1669
1685
|
exports.increaseWithUnit = increaseWithUnit;
|
|
1686
|
+
exports.injectLocal = injectLocal;
|
|
1670
1687
|
exports.invoke = invoke;
|
|
1671
1688
|
exports.isClient = isClient;
|
|
1672
1689
|
exports.isDef = isDef;
|
|
@@ -1684,6 +1701,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1684
1701
|
exports.pausableFilter = pausableFilter;
|
|
1685
1702
|
exports.pausableWatch = watchPausable;
|
|
1686
1703
|
exports.promiseTimeout = promiseTimeout;
|
|
1704
|
+
exports.provideLocal = provideLocal;
|
|
1687
1705
|
exports.rand = rand;
|
|
1688
1706
|
exports.reactify = reactify;
|
|
1689
1707
|
exports.reactifyObject = reactifyObject;
|
package/index.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var VueDemi=function(u,c,M){if(u.install)return u;if(!c)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),u;if(c.version.slice(0,4)==="2.7."){let b=function(O,I){var S,_={},U={config:c.config,use:c.use.bind(c),mixin:c.mixin.bind(c),component:c.component.bind(c),provide:function(P,R){return _[P]=R,this},directive:function(P,R){return R?(c.directive(P,R),U):c.directive(P)},mount:function(P,R){return S||(S=new c(Object.assign({propsData:I},O,{provide:Object.assign(_,O.provide)})),S.$mount(P,R),S)},unmount:function(){S&&(S.$destroy(),S=void 0)}};return U};var F=b;for(var A in c)u[A]=c[A];u.isVue2=!0,u.isVue3=!1,u.install=function(){},u.Vue=c,u.Vue2=c,u.version=c.version,u.warn=c.util.warn,u.hasInjectionContext=()=>!!u.getCurrentInstance(),u.createApp=b}else if(c.version.slice(0,2)==="2.")if(M){for(var A in M)u[A]=M[A];u.isVue2=!0,u.isVue3=!1,u.install=function(){},u.Vue=c,u.Vue2=c,u.version=c.version,u.hasInjectionContext=()=>!!u.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(c.version.slice(0,2)==="3."){for(var A in c)u[A]=c[A];u.isVue2=!1,u.isVue3=!0,u.install=function(){},u.Vue=c,u.Vue2=void 0,u.version=c.version,u.set=function(b,O,I){return Array.isArray(b)?(b.length=Math.max(b.length,O),b.splice(O,1,I),I):(b[O]=I,I)},u.del=function(b,O){if(Array.isArray(b)){b.splice(O,1);return}delete b[O]}}else console.error("[vue-demi] Vue version "+c.version+" is unsupported.");return u}(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(u,c){"use strict";function M(t,e){var n;const r=c.shallowRef();return c.watchEffect(()=>{r.value=t()},{...e,flush:(n=e?.flush)!=null?n:"sync"}),c.readonly(r)}function A(t,e){let n,r,o;const a=c.ref(!0),l=()=>{a.value=!0,o()};c.watch(t,l,{flush:"sync"});const i=typeof e=="function"?e:e.get,d=typeof e=="function"?void 0:e.set,g=c.customRef((h,f)=>(r=h,o=f,{get(){return a.value&&(n=i(),a.value=!1),r(),n},set(y){d?.(y)}}));return Object.isExtensible(g)&&(g.trigger=l),g}function F(t){return c.getCurrentScope()?(c.onScopeDispose(t),!0):!1}function b(){const t=new Set,e=o=>{t.delete(o)};return{on:o=>{t.add(o);const a=()=>e(o);return F(a),{off:a}},off:e,trigger:o=>Promise.all(Array.from(t).map(a=>a(o)))}}function O(t){let e=!1,n;const r=c.effectScope(!0);return(...o)=>(e||(n=r.run(()=>t(...o)),e=!0),n)}function I(t){const e=Symbol("InjectionState");return[(...o)=>{const a=t(...o);return c.provide(e,a),a},()=>c.inject(e)]}function S(t){let e=0,n,r;const o=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(e+=1,n||(r=c.effectScope(!0),n=r.run(()=>t(...a))),F(o),n)}function _(t,e,{enumerable:n=!1,unwrap:r=!0}={}){if(!c.isVue3&&!c.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,a]of Object.entries(e))o!=="value"&&(c.isRef(a)&&r?Object.defineProperty(t,o,{get(){return a.value},set(l){a.value=l},enumerable:n}):Object.defineProperty(t,o,{value:a,enumerable:n}));return t}function U(t,e){return e==null?c.unref(t):c.unref(t)[e]}function P(t){return c.unref(t)!=null}function R(t,e){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:e[r++],done:r>e.length})}}}),n}else return Object.assign([...e],t)}function s(t){return typeof t=="function"?t():c.unref(t)}const yt=s;function $(t,e){const n=e?.computedGetter===!1?c.unref:s;return function(...r){return c.computed(()=>t.apply(this,r.map(o=>n(o))))}}function gt(t,e={}){let n=[],r;if(Array.isArray(e))n=e;else{r=e;const{includeOwnProperties:o=!0}=e;n.push(...Object.keys(t)),o&&n.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(n.map(o=>{const a=t[o];return[o,typeof a=="function"?$(a.bind(t),r):a]}))}function V(t){if(!c.isRef(t))return c.reactive(t);const e=new Proxy({},{get(n,r,o){return c.unref(Reflect.get(t.value,r,o))},set(n,r,o){return c.isRef(t.value[r])&&!c.isRef(o)?t.value[r].value=o:t.value[r]=o,!0},deleteProperty(n,r){return Reflect.deleteProperty(t.value,r)},has(n,r){return Reflect.has(t.value,r)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return c.reactive(e)}function H(t){return V(c.computed(t))}function mt(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(c.toRefs(t)).filter(([o,a])=>!r(s(a),o)):Object.entries(c.toRefs(t)).filter(o=>!n.includes(o[0]))))}const k=typeof window<"u"&&typeof document<"u",wt=t=>typeof t<"u",pt=t=>t!=null,vt=(t,...e)=>{t||console.warn(...e)},bt=Object.prototype.toString,x=t=>bt.call(t)==="[object Object]",At=()=>Date.now(),D=()=>+Date.now(),Ot=(t,e,n)=>Math.min(n,Math.max(e,t)),C=()=>{},St=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),Tt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ft=It();function It(){var t;return k&&((t=window?.navigator)==null?void 0:t.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function N(t,e){function n(...r){return new Promise((o,a)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(a)})}return n}const W=t=>t();function Y(t,e={}){let n,r,o=C;const a=i=>{clearTimeout(i),o(),o=C};return i=>{const d=s(t),g=s(e.maxWait);return n&&a(n),d<=0||g!==void 0&&g<=0?(r&&(a(r),r=null),Promise.resolve(i())):new Promise((h,f)=>{o=e.rejectOnCancel?f:h,g&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,h(i())},g)),n=setTimeout(()=>{r&&a(r),r=null,h(i())},d)})}}function G(t,e=!0,n=!0,r=!1){let o=0,a,l=!0,i=C,d;const g=()=>{a&&(clearTimeout(a),a=void 0,i(),i=C)};return f=>{const y=s(t),w=Date.now()-o,m=()=>d=f();return g(),y<=0?(o=Date.now(),m()):(w>y&&(n||!l)?(o=Date.now(),m()):e&&(d=new Promise((p,v)=>{i=r?v:p,a=setTimeout(()=>{o=Date.now(),l=!0,p(m()),g()},Math.max(0,y-w))})),!n&&!a&&(a=setTimeout(()=>l=!0,y)),l=!1,d)}}function tt(t=W){const e=c.ref(!0);function n(){e.value=!1}function r(){e.value=!0}const o=(...a)=>{e.value&&t(...a)};return{isActive:c.readonly(e),pause:n,resume:r,eventFilter:o}}const Pt={mounted:c.isVue3?"mounted":"inserted",updated:c.isVue3?"updated":"componentUpdated",unmounted:c.isVue3?"unmounted":"unbind"};function et(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}const Rt=/\B([A-Z])/g,Ct=et(t=>t.replace(Rt,"-$1").toLowerCase()),Mt=/-(\w)/g,Et=et(t=>t.replace(Mt,(e,n)=>n?n.toUpperCase():""));function z(t,e=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(e?()=>o(n):r,t)})}function _t(t){return t}function kt(t){let e;function n(){return e||(e=t()),e}return n.reset=async()=>{const r=e;e=void 0,r&&await r},n}function Nt(t){return t()}function nt(t,...e){return e.some(n=>n in t)}function jt(t,e){var n;if(typeof t=="number")return t+e;const r=((n=t.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:n[0])||"",o=t.slice(r.length),a=Number.parseFloat(r)+e;return Number.isNaN(a)?t:a+o}function Ut(t,e,n=!1){return e.reduce((r,o)=>(o in t&&(!n||t[o]!==void 0)&&(r[o]=t[o]),r),{})}function Wt(t,e,n=!1){return Object.fromEntries(Object.entries(t).filter(([r,o])=>(!n||o!==void 0)&&!e.includes(r)))}function Lt(t){return Object.entries(t)}function q(...t){if(t.length!==1)return c.toRef(...t);const e=t[0];return typeof e=="function"?c.readonly(c.customRef(()=>({get:e,set:C}))):c.ref(e)}const Bt=q;function $t(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(c.toRefs(t)).filter(([o,a])=>r(s(a),o)):n.map(o=>[o,q(t,o)])))}function rt(t,e=1e4){return c.customRef((n,r)=>{let o=s(t),a;const l=()=>setTimeout(()=>{o=s(t),r()},s(e));return F(()=>{clearTimeout(a)}),{get(){return n(),o},set(i){o=i,r(),clearTimeout(a),a=l()}}})}function ot(t,e=200,n={}){return N(Y(e,n),t)}function Z(t,e=200,n={}){const r=c.ref(t.value),o=ot(()=>{r.value=t.value},e,n);return c.watch(t,()=>o()),r}function Ht(t,e){return c.computed({get(){var n;return(n=t.value)!=null?n:e},set(n){t.value=n}})}function ut(t,e=200,n=!1,r=!0,o=!1){return N(G(e,n,r,o),t)}function J(t,e=200,n=!0,r=!0){if(e<=0)return t;const o=c.ref(t.value),a=ut(()=>{o.value=t.value},e,n,r);return c.watch(t,()=>a()),o}function ct(t,e={}){let n=t,r,o;const a=c.customRef((y,w)=>(r=y,o=w,{get(){return l()},set(m){i(m)}}));function l(y=!0){return y&&r(),n}function i(y,w=!0){var m,p;if(y===n)return;const v=n;((m=e.onBeforeChange)==null?void 0:m.call(e,y,v))!==!1&&(n=y,(p=e.onChanged)==null||p.call(e,y,v),w&&o())}return _(a,{get:l,set:i,untrackedGet:()=>l(!1),silentSet:y=>i(y,!1),peek:()=>l(!1),lay:y=>i(y,!1)},{enumerable:!0})}const Yt=ct;function Gt(...t){if(t.length===2){const[e,n]=t;e.value=n}if(t.length===3)if(c.isVue2)c.set(...t);else{const[e,n,r]=t;e[n]=r}}function j(t,e,n={}){const{eventFilter:r=W,...o}=n;return c.watch(t,N(r,e),o)}function L(t,e,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:l,resume:i,isActive:d}=tt(r);return{stop:j(t,e,{...o,eventFilter:a}),pause:l,resume:i,isActive:d}}function zt(t,e,n={}){var r,o;const{flush:a="sync",deep:l=!1,immediate:i=!0,direction:d="both",transform:g={}}=n,h=[],f=(r=g.ltr)!=null?r:m=>m,y=(o=g.rtl)!=null?o:m=>m;return(d==="both"||d==="ltr")&&h.push(L(t,m=>{h.forEach(p=>p.pause()),e.value=f(m),h.forEach(p=>p.resume())},{flush:a,deep:l,immediate:i})),(d==="both"||d==="rtl")&&h.push(L(e,m=>{h.forEach(p=>p.pause()),t.value=y(m),h.forEach(p=>p.resume())},{flush:a,deep:l,immediate:i})),()=>{h.forEach(m=>m.stop())}}function qt(t,e,n={}){const{flush:r="sync",deep:o=!1,immediate:a=!0}=n;return Array.isArray(e)||(e=[e]),c.watch(t,l=>e.forEach(i=>i.value=l),{flush:r,deep:o,immediate:a})}function Zt(t,e={}){if(!c.isRef(t))return c.toRefs(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=c.customRef(()=>({get(){return t.value[r]},set(o){var a;if((a=s(e.replaceRef))!=null?a:!0)if(Array.isArray(t.value)){const i=[...t.value];i[r]=o,t.value=i}else{const i={...t.value,[r]:o};Object.setPrototypeOf(i,Object.getPrototypeOf(t.value)),t.value=i}else t.value[r]=o}}));return n}function Jt(t,e=!0){c.getCurrentInstance()?c.onBeforeMount(t):e?t():c.nextTick(t)}function Xt(t){c.getCurrentInstance()&&c.onBeforeUnmount(t)}function Kt(t,e=!0){c.getCurrentInstance()?c.onMounted(t):e?t():c.nextTick(t)}function Qt(t){c.getCurrentInstance()&&c.onUnmounted(t)}function X(t,e=!1){function n(f,{flush:y="sync",deep:w=!1,timeout:m,throwOnTimeout:p}={}){let v=null;const Q=[new Promise(B=>{v=c.watch(t,E=>{f(E)!==e&&(v?.(),B(E))},{flush:y,deep:w,immediate:!0})})];return m!=null&&Q.push(z(m,p).then(()=>s(t)).finally(()=>v?.())),Promise.race(Q)}function r(f,y){if(!c.isRef(f))return n(E=>E===f,y);const{flush:w="sync",deep:m=!1,timeout:p,throwOnTimeout:v}=y??{};let T=null;const B=[new Promise(E=>{T=c.watch([t,f],([ht,je])=>{e!==(ht===je)&&(T?.(),E(ht))},{flush:w,deep:m,immediate:!0})})];return p!=null&&B.push(z(p,v).then(()=>s(t)).finally(()=>(T?.(),s(t)))),Promise.race(B)}function o(f){return n(y=>!!y,f)}function a(f){return r(null,f)}function l(f){return r(void 0,f)}function i(f){return n(Number.isNaN,f)}function d(f,y){return n(w=>{const m=Array.from(w);return m.includes(f)||m.includes(s(f))},y)}function g(f){return h(1,f)}function h(f=1,y){let w=-1;return n(()=>(w+=1,w>=f),y)}return Array.isArray(s(t))?{toMatch:n,toContains:d,changed:g,changedTimes:h,get not(){return X(t,!e)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:i,toBeUndefined:l,changed:g,changedTimes:h,get not(){return X(t,!e)}}}function Vt(t){return X(t)}function xt(t,e){return t===e}function Dt(...t){var e;const n=t[0],r=t[1];let o=(e=t[2])!=null?e:xt;if(typeof o=="string"){const a=o;o=(l,i)=>l[a]===i[a]}return c.computed(()=>s(n).filter(a=>s(r).findIndex(l=>o(a,l))===-1))}function te(t,e){return c.computed(()=>s(t).every((n,r,o)=>e(s(n),r,o)))}function ee(t,e){return c.computed(()=>s(t).map(n=>s(n)).filter(e))}function ne(t,e){return c.computed(()=>s(s(t).find((n,r,o)=>e(s(n),r,o))))}function re(t,e){return c.computed(()=>s(t).findIndex((n,r,o)=>e(s(n),r,o)))}function oe(t,e){let n=t.length;for(;n-- >0;)if(e(t[n],n,t))return t[n]}function ue(t,e){return c.computed(()=>s(Array.prototype.findLast?s(t).findLast((n,r,o)=>e(s(n),r,o)):oe(s(t),(n,r,o)=>e(s(n),r,o))))}function ce(t){return x(t)&&nt(t,"formIndex","comparator")}function ae(...t){var e;const n=t[0],r=t[1];let o=t[2],a=0;if(ce(o)&&(a=(e=o.fromIndex)!=null?e:0,o=o.comparator),typeof o=="string"){const l=o;o=(i,d)=>i[l]===s(d)}return o=o??((l,i)=>l===s(i)),c.computed(()=>s(n).slice(a).some((l,i,d)=>o(s(l),s(r),i,s(d))))}function ie(t,e){return c.computed(()=>s(t).map(n=>s(n)).join(s(e)))}function le(t,e){return c.computed(()=>s(t).map(n=>s(n)).map(e))}function se(t,e,...n){const r=(o,a,l)=>e(s(o),s(a),l);return c.computed(()=>{const o=s(t);return n.length?o.reduce(r,s(n[0])):o.reduce(r)})}function fe(t,e){return c.computed(()=>s(t).some((n,r,o)=>e(s(n),r,o)))}function de(t){return Array.from(new Set(t))}function he(t,e){return t.reduce((n,r)=>(n.some(o=>e(r,o,t))||n.push(r),n),[])}function ye(t,e){return c.computed(()=>{const n=s(t).map(r=>s(r));return e?he(n,e):de(n)})}function ge(t=0,e={}){let n=c.unref(t);const r=c.ref(t),{max:o=Number.POSITIVE_INFINITY,min:a=Number.NEGATIVE_INFINITY}=e,l=(f=1)=>r.value=Math.min(o,r.value+f),i=(f=1)=>r.value=Math.max(a,r.value-f),d=()=>r.value,g=f=>r.value=Math.max(a,Math.min(o,f));return{count:r,inc:l,dec:i,get:d,set:g,reset:(f=n)=>(n=f,g(f))}}const me=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,we=/\[([^\]]+)]|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 pe(t,e,n,r){let o=t<12?"AM":"PM";return r&&(o=o.split("").reduce((a,l)=>a+=`${l}.`,"")),n?o.toLowerCase():o}function at(t,e,n={}){var r;const o=t.getFullYear(),a=t.getMonth(),l=t.getDate(),i=t.getHours(),d=t.getMinutes(),g=t.getSeconds(),h=t.getMilliseconds(),f=t.getDay(),y=(r=n.customMeridiem)!=null?r:pe,w={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>a+1,MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(l),DD:()=>`${l}`.padStart(2,"0"),H:()=>String(i),HH:()=>`${i}`.padStart(2,"0"),h:()=>`${i%12||12}`.padStart(1,"0"),hh:()=>`${i%12||12}`.padStart(2,"0"),m:()=>String(d),mm:()=>`${d}`.padStart(2,"0"),s:()=>String(g),ss:()=>`${g}`.padStart(2,"0"),SSS:()=>`${h}`.padStart(3,"0"),d:()=>f,dd:()=>t.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>y(i,d),AA:()=>y(i,d,!1,!0),a:()=>y(i,d,!0),aa:()=>y(i,d,!0,!0)};return e.replace(we,(m,p)=>{var v,T;return(T=p??((v=w[m])==null?void 0:v.call(w)))!=null?T:m})}function it(t){if(t===null)return new Date(Number.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(me);if(e){const n=e[2]-1||0,r=(e[7]||"0").substring(0,3);return new Date(e[1],n,e[3]||1,e[4]||0,e[5]||0,e[6]||0,r)}}return new Date(t)}function ve(t,e="HH:mm:ss",n={}){return c.computed(()=>at(it(s(t)),s(e),n))}function lt(t,e=1e3,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n;let a=null;const l=c.ref(!1);function i(){a&&(clearInterval(a),a=null)}function d(){l.value=!1,i()}function g(){const h=s(e);h<=0||(l.value=!0,o&&t(),i(),a=setInterval(t,h))}if(r&&k&&g(),c.isRef(e)||typeof e=="function"){const h=c.watch(e,()=>{l.value&&k&&g()});F(h)}return F(d),{isActive:l,pause:d,resume:g}}function be(t=1e3,e={}){const{controls:n=!1,immediate:r=!0,callback:o}=e,a=c.ref(0),l=()=>a.value+=1,i=()=>{a.value=0},d=lt(o?()=>{l(),o(a.value)}:l,t,{immediate:r});return n?{counter:a,reset:i,...d}:a}function Ae(t,e={}){var n;const r=c.ref((n=e.initialValue)!=null?n:null);return c.watch(t,()=>r.value=D(),e),r}function st(t,e,n={}){const{immediate:r=!0}=n,o=c.ref(!1);let a=null;function l(){a&&(clearTimeout(a),a=null)}function i(){o.value=!1,l()}function d(...g){l(),o.value=!0,a=setTimeout(()=>{o.value=!1,a=null,t(...g)},s(e))}return r&&(o.value=!0,k&&d()),F(i),{isPending:c.readonly(o),start:d,stop:i}}function Oe(t=1e3,e={}){const{controls:n=!1,callback:r}=e,o=st(r??C,t,e),a=c.computed(()=>!o.isPending.value);return n?{ready:a,...o}:a}function Se(t,e={}){const{method:n="parseFloat",radix:r,nanToZero:o}=e;return c.computed(()=>{let a=s(t);return typeof a=="string"&&(a=Number[n](a,r)),o&&Number.isNaN(a)&&(a=0),a})}function Te(t){return c.computed(()=>`${s(t)}`)}function Fe(t=!1,e={}){const{truthyValue:n=!0,falsyValue:r=!1}=e,o=c.isRef(t),a=c.ref(t);function l(i){if(arguments.length)return a.value=i,a.value;{const d=s(n);return a.value=a.value===d?s(r):d,a.value}}return o?l:[a,l]}function Ie(t,e,n){let r=n?.immediate?[]:[...t instanceof Function?t():Array.isArray(t)?t:s(t)];return c.watch(t,(o,a,l)=>{const i=Array.from({length:r.length}),d=[];for(const h of o){let f=!1;for(let y=0;y<r.length;y++)if(!i[y]&&h===r[y]){i[y]=!0,f=!0;break}f||d.push(h)}const g=r.filter((h,f)=>!i[f]);e(o,r,d,g,l),r=[...o]},n)}function Pe(t,e,n){const{count:r,...o}=n,a=c.ref(0),l=j(t,(...i)=>{a.value+=1,a.value>=s(r)&&c.nextTick(()=>l()),e(...i)},o);return{count:a,stop:l}}function ft(t,e,n={}){const{debounce:r=0,maxWait:o=void 0,...a}=n;return j(t,e,{...a,eventFilter:Y(r,{maxWait:o})})}function Re(t,e,n){return c.watch(t,e,{...n,deep:!0})}function K(t,e,n={}){const{eventFilter:r=W,...o}=n,a=N(r,e);let l,i,d;if(o.flush==="sync"){const g=c.ref(!1);i=()=>{},l=h=>{g.value=!0,h(),g.value=!1},d=c.watch(t,(...h)=>{g.value||a(...h)},o)}else{const g=[],h=c.ref(0),f=c.ref(0);i=()=>{h.value=f.value},g.push(c.watch(t,()=>{f.value++},{...o,flush:"sync"})),l=y=>{const w=f.value;y(),h.value+=f.value-w},g.push(c.watch(t,(...y)=>{const w=h.value>0&&h.value===f.value;h.value=0,f.value=0,!w&&a(...y)},o)),d=()=>{g.forEach(y=>y())}}return{stop:d,ignoreUpdates:l,ignorePrevAsyncUpdates:i}}function Ce(t,e,n){return c.watch(t,e,{...n,immediate:!0})}function Me(t,e,n){const r=c.watch(t,(...o)=>(c.nextTick(()=>r()),e(...o)),n)}function dt(t,e,n={}){const{throttle:r=0,trailing:o=!0,leading:a=!0,...l}=n;return j(t,e,{...l,eventFilter:G(r,o,a)})}function Ee(t,e,n={}){let r;function o(){if(!r)return;const h=r;r=void 0,h()}function a(h){r=h}const l=(h,f)=>(o(),e(h,f,a)),i=K(t,l,n),{ignoreUpdates:d}=i;return{...i,trigger:()=>{let h;return d(()=>{h=l(_e(t),ke(t))}),h}}}function _e(t){return c.isReactive(t)?t:Array.isArray(t)?t.map(e=>s(e)):s(t)}function ke(t){return Array.isArray(t)?t.map(()=>{}):void 0}function Ne(t,e,n){return c.watch(t,(r,o,a)=>{r&&e(r,o,a)},n)}u.assert=vt,u.autoResetRef=rt,u.bypassFilter=W,u.camelize=Et,u.clamp=Ot,u.computedEager=M,u.computedWithControl=A,u.containsProp=nt,u.controlledComputed=A,u.controlledRef=Yt,u.createEventHook=b,u.createFilterWrapper=N,u.createGlobalState=O,u.createInjectionState=I,u.createReactiveFn=$,u.createSharedComposable=S,u.createSingletonPromise=kt,u.debounceFilter=Y,u.debouncedRef=Z,u.debouncedWatch=ft,u.directiveHooks=Pt,u.eagerComputed=M,u.extendRef=_,u.formatDate=at,u.get=U,u.hasOwn=Tt,u.hyphenate=Ct,u.identity=_t,u.ignorableWatch=K,u.increaseWithUnit=jt,u.invoke=Nt,u.isClient=k,u.isDef=wt,u.isDefined=P,u.isIOS=Ft,u.isObject=x,u.makeDestructurable=R,u.noop=C,u.normalizeDate=it,u.notNullish=pt,u.now=At,u.objectEntries=Lt,u.objectOmit=Wt,u.objectPick=Ut,u.pausableFilter=tt,u.pausableWatch=L,u.promiseTimeout=z,u.rand=St,u.reactify=$,u.reactifyObject=gt,u.reactiveComputed=H,u.reactiveOmit=mt,u.reactivePick=$t,u.refAutoReset=rt,u.refDebounced=Z,u.refDefault=Ht,u.refThrottled=J,u.refWithControl=ct,u.resolveRef=Bt,u.resolveUnref=yt,u.set=Gt,u.syncRef=zt,u.syncRefs=qt,u.throttleFilter=G,u.throttledRef=J,u.throttledWatch=dt,u.timestamp=D,u.toReactive=V,u.toRef=q,u.toRefs=Zt,u.toValue=s,u.tryOnBeforeMount=Jt,u.tryOnBeforeUnmount=Xt,u.tryOnMounted=Kt,u.tryOnScopeDispose=F,u.tryOnUnmounted=Qt,u.until=Vt,u.useArrayDifference=Dt,u.useArrayEvery=te,u.useArrayFilter=ee,u.useArrayFind=ne,u.useArrayFindIndex=re,u.useArrayFindLast=ue,u.useArrayIncludes=ae,u.useArrayJoin=ie,u.useArrayMap=le,u.useArrayReduce=se,u.useArraySome=fe,u.useArrayUnique=ye,u.useCounter=ge,u.useDateFormat=ve,u.useDebounce=Z,u.useDebounceFn=ot,u.useInterval=be,u.useIntervalFn=lt,u.useLastChanged=Ae,u.useThrottle=J,u.useThrottleFn=ut,u.useTimeout=Oe,u.useTimeoutFn=st,u.useToNumber=Se,u.useToString=Te,u.useToggle=Fe,u.watchArray=Ie,u.watchAtMost=Pe,u.watchDebounced=ft,u.watchDeep=Re,u.watchIgnorable=K,u.watchImmediate=Ce,u.watchOnce=Me,u.watchPausable=L,u.watchThrottled=dt,u.watchTriggerable=Ee,u.watchWithFilter=j,u.whenever=Ne})(this.VueUse=this.VueUse||{},VueDemi);
|
|
1
|
+
var VueDemi=function(c,u,R){if(c.install)return c;if(!u)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),c;if(u.version.slice(0,4)==="2.7."){let b=function(S,A){var T,_={},L={config:u.config,use:u.use.bind(u),mixin:u.mixin.bind(u),component:u.component.bind(u),provide:function(C,I){return _[C]=I,this},directive:function(C,I){return I?(u.directive(C,I),L):u.directive(C)},mount:function(C,I){return T||(T=new u(Object.assign({propsData:A},S,{provide:Object.assign(_,S.provide)})),T.$mount(C,I),T)},unmount:function(){T&&(T.$destroy(),T=void 0)}};return L};var P=b;for(var O in u)c[O]=u[O];c.isVue2=!0,c.isVue3=!1,c.install=function(){},c.Vue=u,c.Vue2=u,c.version=u.version,c.warn=u.util.warn,c.hasInjectionContext=()=>!!c.getCurrentInstance(),c.createApp=b}else if(u.version.slice(0,2)==="2.")if(R){for(var O in R)c[O]=R[O];c.isVue2=!0,c.isVue3=!1,c.install=function(){},c.Vue=u,c.Vue2=u,c.version=u.version,c.hasInjectionContext=()=>!!c.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(u.version.slice(0,2)==="3."){for(var O in u)c[O]=u[O];c.isVue2=!1,c.isVue3=!0,c.install=function(){},c.Vue=u,c.Vue2=void 0,c.version=u.version,c.set=function(b,S,A){return Array.isArray(b)?(b.length=Math.max(b.length,S),b.splice(S,1,A),A):(b[S]=A,A)},c.del=function(b,S){if(Array.isArray(b)){b.splice(S,1);return}delete b[S]}}else console.error("[vue-demi] Vue version "+u.version+" is unsupported.");return c}(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(c,u){"use strict";function R(t,e){var n;const r=u.shallowRef();return u.watchEffect(()=>{r.value=t()},{...e,flush:(n=e?.flush)!=null?n:"sync"}),u.readonly(r)}function O(t,e){let n,r,o;const a=u.ref(!0),i=()=>{a.value=!0,o()};u.watch(t,i,{flush:"sync"});const l=typeof e=="function"?e:e.get,d=typeof e=="function"?void 0:e.set,g=u.customRef((h,f)=>(r=h,o=f,{get(){return a.value&&(n=l(),a.value=!1),r(),n},set(y){d?.(y)}}));return Object.isExtensible(g)&&(g.trigger=i),g}function P(t){return u.getCurrentScope()?(u.onScopeDispose(t),!0):!1}function b(){const t=new Set,e=o=>{t.delete(o)};return{on:o=>{t.add(o);const a=()=>e(o);return P(a),{off:a}},off:e,trigger:o=>Promise.all(Array.from(t).map(a=>a(o)))}}function S(t){let e=!1,n;const r=u.effectScope(!0);return(...o)=>(e||(n=r.run(()=>t(...o)),e=!0),n)}const A=new WeakMap,T=(t,e)=>{var n;const r=(n=u.getCurrentInstance())==null?void 0:n.proxy;if(r==null)throw new Error("provideLocal must be called in setup");A.has(r)||A.set(r,Object.create(null));const o=A.get(r);o[t]=e,u.provide(t,e)},_=(...t)=>{var e;const n=t[0],r=(e=u.getCurrentInstance())==null?void 0:e.proxy;if(r==null)throw new Error("injectLocal must be called in setup");return A.has(r)&&n in A.get(r)?A.get(r)[n]:u.inject(...t)};function L(t,e){const n=e?.injectionKey||Symbol("InjectionState");return[(...a)=>{const i=t(...a);return T(n,i),i},()=>_(n)]}function C(t){let e=0,n,r;const o=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(e+=1,n||(r=u.effectScope(!0),n=r.run(()=>t(...a))),P(o),n)}function I(t,e,{enumerable:n=!1,unwrap:r=!0}={}){if(!u.isVue3&&!u.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,a]of Object.entries(e))o!=="value"&&(u.isRef(a)&&r?Object.defineProperty(t,o,{get(){return a.value},set(i){a.value=i},enumerable:n}):Object.defineProperty(t,o,{value:a,enumerable:n}));return t}function yt(t,e){return e==null?u.unref(t):u.unref(t)[e]}function gt(t){return u.unref(t)!=null}function mt(t,e){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:e[r++],done:r>e.length})}}}),n}else return Object.assign([...e],t)}function s(t){return typeof t=="function"?t():u.unref(t)}const wt=s;function $(t,e){const n=e?.computedGetter===!1?u.unref:s;return function(...r){return u.computed(()=>t.apply(this,r.map(o=>n(o))))}}function pt(t,e={}){let n=[],r;if(Array.isArray(e))n=e;else{r=e;const{includeOwnProperties:o=!0}=e;n.push(...Object.keys(t)),o&&n.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(n.map(o=>{const a=t[o];return[o,typeof a=="function"?$(a.bind(t),r):a]}))}function V(t){if(!u.isRef(t))return u.reactive(t);const e=new Proxy({},{get(n,r,o){return u.unref(Reflect.get(t.value,r,o))},set(n,r,o){return u.isRef(t.value[r])&&!u.isRef(o)?t.value[r].value=o:t.value[r]=o,!0},deleteProperty(n,r){return Reflect.deleteProperty(t.value,r)},has(n,r){return Reflect.has(t.value,r)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return u.reactive(e)}function H(t){return V(u.computed(t))}function vt(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(t)).filter(([o,a])=>!r(s(a),o)):Object.entries(u.toRefs(t)).filter(o=>!n.includes(o[0]))))}const k=typeof window<"u"&&typeof document<"u",bt=t=>typeof t<"u",At=t=>t!=null,Ot=(t,...e)=>{t||console.warn(...e)},St=Object.prototype.toString,x=t=>St.call(t)==="[object Object]",Tt=()=>Date.now(),D=()=>+Date.now(),It=(t,e,n)=>Math.min(n,Math.max(e,t)),M=()=>{},Ft=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),Pt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ct=Mt();function Mt(){var t;return k&&((t=window?.navigator)==null?void 0:t.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function j(t,e){function n(...r){return new Promise((o,a)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(a)})}return n}const U=t=>t();function Y(t,e={}){let n,r,o=M;const a=l=>{clearTimeout(l),o(),o=M};return l=>{const d=s(t),g=s(e.maxWait);return n&&a(n),d<=0||g!==void 0&&g<=0?(r&&(a(r),r=null),Promise.resolve(l())):new Promise((h,f)=>{o=e.rejectOnCancel?f:h,g&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,h(l())},g)),n=setTimeout(()=>{r&&a(r),r=null,h(l())},d)})}}function G(t,e=!0,n=!0,r=!1){let o=0,a,i=!0,l=M,d;const g=()=>{a&&(clearTimeout(a),a=void 0,l(),l=M)};return f=>{const y=s(t),w=Date.now()-o,m=()=>d=f();return g(),y<=0?(o=Date.now(),m()):(w>y&&(n||!i)?(o=Date.now(),m()):e&&(d=new Promise((p,v)=>{l=r?v:p,a=setTimeout(()=>{o=Date.now(),i=!0,p(m()),g()},Math.max(0,y-w))})),!n&&!a&&(a=setTimeout(()=>i=!0,y)),i=!1,d)}}function tt(t=U){const e=u.ref(!0);function n(){e.value=!1}function r(){e.value=!0}const o=(...a)=>{e.value&&t(...a)};return{isActive:u.readonly(e),pause:n,resume:r,eventFilter:o}}const Rt={mounted:u.isVue3?"mounted":"inserted",updated:u.isVue3?"updated":"componentUpdated",unmounted:u.isVue3?"unmounted":"unbind"};function et(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}const Et=/\B([A-Z])/g,_t=et(t=>t.replace(Et,"-$1").toLowerCase()),kt=/-(\w)/g,jt=et(t=>t.replace(kt,(e,n)=>n?n.toUpperCase():""));function z(t,e=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(e?()=>o(n):r,t)})}function Nt(t){return t}function Lt(t){let e;function n(){return e||(e=t()),e}return n.reset=async()=>{const r=e;e=void 0,r&&await r},n}function Ut(t){return t()}function nt(t,...e){return e.some(n=>n in t)}function Wt(t,e){var n;if(typeof t=="number")return t+e;const r=((n=t.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:n[0])||"",o=t.slice(r.length),a=Number.parseFloat(r)+e;return Number.isNaN(a)?t:a+o}function Bt(t,e,n=!1){return e.reduce((r,o)=>(o in t&&(!n||t[o]!==void 0)&&(r[o]=t[o]),r),{})}function $t(t,e,n=!1){return Object.fromEntries(Object.entries(t).filter(([r,o])=>(!n||o!==void 0)&&!e.includes(r)))}function Ht(t){return Object.entries(t)}function q(...t){if(t.length!==1)return u.toRef(...t);const e=t[0];return typeof e=="function"?u.readonly(u.customRef(()=>({get:e,set:M}))):u.ref(e)}const Yt=q;function Gt(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(t)).filter(([o,a])=>r(s(a),o)):n.map(o=>[o,q(t,o)])))}function rt(t,e=1e4){return u.customRef((n,r)=>{let o=s(t),a;const i=()=>setTimeout(()=>{o=s(t),r()},s(e));return P(()=>{clearTimeout(a)}),{get(){return n(),o},set(l){o=l,r(),clearTimeout(a),a=i()}}})}function ot(t,e=200,n={}){return j(Y(e,n),t)}function Z(t,e=200,n={}){const r=u.ref(t.value),o=ot(()=>{r.value=t.value},e,n);return u.watch(t,()=>o()),r}function zt(t,e){return u.computed({get(){var n;return(n=t.value)!=null?n:e},set(n){t.value=n}})}function ct(t,e=200,n=!1,r=!0,o=!1){return j(G(e,n,r,o),t)}function J(t,e=200,n=!0,r=!0){if(e<=0)return t;const o=u.ref(t.value),a=ct(()=>{o.value=t.value},e,n,r);return u.watch(t,()=>a()),o}function ut(t,e={}){let n=t,r,o;const a=u.customRef((y,w)=>(r=y,o=w,{get(){return i()},set(m){l(m)}}));function i(y=!0){return y&&r(),n}function l(y,w=!0){var m,p;if(y===n)return;const v=n;((m=e.onBeforeChange)==null?void 0:m.call(e,y,v))!==!1&&(n=y,(p=e.onChanged)==null||p.call(e,y,v),w&&o())}return I(a,{get:i,set:l,untrackedGet:()=>i(!1),silentSet:y=>l(y,!1),peek:()=>i(!1),lay:y=>l(y,!1)},{enumerable:!0})}const qt=ut;function Zt(...t){if(t.length===2){const[e,n]=t;e.value=n}if(t.length===3)if(u.isVue2)u.set(...t);else{const[e,n,r]=t;e[n]=r}}function N(t,e,n={}){const{eventFilter:r=U,...o}=n;return u.watch(t,j(r,e),o)}function W(t,e,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:i,resume:l,isActive:d}=tt(r);return{stop:N(t,e,{...o,eventFilter:a}),pause:i,resume:l,isActive:d}}function Jt(t,e,n={}){var r,o;const{flush:a="sync",deep:i=!1,immediate:l=!0,direction:d="both",transform:g={}}=n,h=[],f=(r=g.ltr)!=null?r:m=>m,y=(o=g.rtl)!=null?o:m=>m;return(d==="both"||d==="ltr")&&h.push(W(t,m=>{h.forEach(p=>p.pause()),e.value=f(m),h.forEach(p=>p.resume())},{flush:a,deep:i,immediate:l})),(d==="both"||d==="rtl")&&h.push(W(e,m=>{h.forEach(p=>p.pause()),t.value=y(m),h.forEach(p=>p.resume())},{flush:a,deep:i,immediate:l})),()=>{h.forEach(m=>m.stop())}}function Xt(t,e,n={}){const{flush:r="sync",deep:o=!1,immediate:a=!0}=n;return Array.isArray(e)||(e=[e]),u.watch(t,i=>e.forEach(l=>l.value=i),{flush:r,deep:o,immediate:a})}function Kt(t,e={}){if(!u.isRef(t))return u.toRefs(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=u.customRef(()=>({get(){return t.value[r]},set(o){var a;if((a=s(e.replaceRef))!=null?a:!0)if(Array.isArray(t.value)){const l=[...t.value];l[r]=o,t.value=l}else{const l={...t.value,[r]:o};Object.setPrototypeOf(l,Object.getPrototypeOf(t.value)),t.value=l}else t.value[r]=o}}));return n}function Qt(t,e=!0){u.getCurrentInstance()?u.onBeforeMount(t):e?t():u.nextTick(t)}function Vt(t){u.getCurrentInstance()&&u.onBeforeUnmount(t)}function xt(t,e=!0){u.getCurrentInstance()?u.onMounted(t):e?t():u.nextTick(t)}function Dt(t){u.getCurrentInstance()&&u.onUnmounted(t)}function X(t,e=!1){function n(f,{flush:y="sync",deep:w=!1,timeout:m,throwOnTimeout:p}={}){let v=null;const Q=[new Promise(B=>{v=u.watch(t,E=>{f(E)!==e&&(v?.(),B(E))},{flush:y,deep:w,immediate:!0})})];return m!=null&&Q.push(z(m,p).then(()=>s(t)).finally(()=>v?.())),Promise.race(Q)}function r(f,y){if(!u.isRef(f))return n(E=>E===f,y);const{flush:w="sync",deep:m=!1,timeout:p,throwOnTimeout:v}=y??{};let F=null;const B=[new Promise(E=>{F=u.watch([t,f],([ht,We])=>{e!==(ht===We)&&(F?.(),E(ht))},{flush:w,deep:m,immediate:!0})})];return p!=null&&B.push(z(p,v).then(()=>s(t)).finally(()=>(F?.(),s(t)))),Promise.race(B)}function o(f){return n(y=>!!y,f)}function a(f){return r(null,f)}function i(f){return r(void 0,f)}function l(f){return n(Number.isNaN,f)}function d(f,y){return n(w=>{const m=Array.from(w);return m.includes(f)||m.includes(s(f))},y)}function g(f){return h(1,f)}function h(f=1,y){let w=-1;return n(()=>(w+=1,w>=f),y)}return Array.isArray(s(t))?{toMatch:n,toContains:d,changed:g,changedTimes:h,get not(){return X(t,!e)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:l,toBeUndefined:i,changed:g,changedTimes:h,get not(){return X(t,!e)}}}function te(t){return X(t)}function ee(t,e){return t===e}function ne(...t){var e;const n=t[0],r=t[1];let o=(e=t[2])!=null?e:ee;if(typeof o=="string"){const a=o;o=(i,l)=>i[a]===l[a]}return u.computed(()=>s(n).filter(a=>s(r).findIndex(i=>o(a,i))===-1))}function re(t,e){return u.computed(()=>s(t).every((n,r,o)=>e(s(n),r,o)))}function oe(t,e){return u.computed(()=>s(t).map(n=>s(n)).filter(e))}function ce(t,e){return u.computed(()=>s(s(t).find((n,r,o)=>e(s(n),r,o))))}function ue(t,e){return u.computed(()=>s(t).findIndex((n,r,o)=>e(s(n),r,o)))}function ae(t,e){let n=t.length;for(;n-- >0;)if(e(t[n],n,t))return t[n]}function ie(t,e){return u.computed(()=>s(Array.prototype.findLast?s(t).findLast((n,r,o)=>e(s(n),r,o)):ae(s(t),(n,r,o)=>e(s(n),r,o))))}function le(t){return x(t)&&nt(t,"formIndex","comparator")}function se(...t){var e;const n=t[0],r=t[1];let o=t[2],a=0;if(le(o)&&(a=(e=o.fromIndex)!=null?e:0,o=o.comparator),typeof o=="string"){const i=o;o=(l,d)=>l[i]===s(d)}return o=o??((i,l)=>i===s(l)),u.computed(()=>s(n).slice(a).some((i,l,d)=>o(s(i),s(r),l,s(d))))}function fe(t,e){return u.computed(()=>s(t).map(n=>s(n)).join(s(e)))}function de(t,e){return u.computed(()=>s(t).map(n=>s(n)).map(e))}function he(t,e,...n){const r=(o,a,i)=>e(s(o),s(a),i);return u.computed(()=>{const o=s(t);return n.length?o.reduce(r,s(n[0])):o.reduce(r)})}function ye(t,e){return u.computed(()=>s(t).some((n,r,o)=>e(s(n),r,o)))}function ge(t){return Array.from(new Set(t))}function me(t,e){return t.reduce((n,r)=>(n.some(o=>e(r,o,t))||n.push(r),n),[])}function we(t,e){return u.computed(()=>{const n=s(t).map(r=>s(r));return e?me(n,e):ge(n)})}function pe(t=0,e={}){let n=u.unref(t);const r=u.ref(t),{max:o=Number.POSITIVE_INFINITY,min:a=Number.NEGATIVE_INFINITY}=e,i=(f=1)=>r.value=Math.min(o,r.value+f),l=(f=1)=>r.value=Math.max(a,r.value-f),d=()=>r.value,g=f=>r.value=Math.max(a,Math.min(o,f));return{count:r,inc:i,dec:l,get:d,set:g,reset:(f=n)=>(n=f,g(f))}}const ve=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,be=/\[([^\]]+)]|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 Ae(t,e,n,r){let o=t<12?"AM":"PM";return r&&(o=o.split("").reduce((a,i)=>a+=`${i}.`,"")),n?o.toLowerCase():o}function at(t,e,n={}){var r;const o=t.getFullYear(),a=t.getMonth(),i=t.getDate(),l=t.getHours(),d=t.getMinutes(),g=t.getSeconds(),h=t.getMilliseconds(),f=t.getDay(),y=(r=n.customMeridiem)!=null?r:Ae,w={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>a+1,MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(i),DD:()=>`${i}`.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(g),ss:()=>`${g}`.padStart(2,"0"),SSS:()=>`${h}`.padStart(3,"0"),d:()=>f,dd:()=>t.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>y(l,d),AA:()=>y(l,d,!1,!0),a:()=>y(l,d,!0),aa:()=>y(l,d,!0,!0)};return e.replace(be,(m,p)=>{var v,F;return(F=p??((v=w[m])==null?void 0:v.call(w)))!=null?F:m})}function it(t){if(t===null)return new Date(Number.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(ve);if(e){const n=e[2]-1||0,r=(e[7]||"0").substring(0,3);return new Date(e[1],n,e[3]||1,e[4]||0,e[5]||0,e[6]||0,r)}}return new Date(t)}function Oe(t,e="HH:mm:ss",n={}){return u.computed(()=>at(it(s(t)),s(e),n))}function lt(t,e=1e3,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n;let a=null;const i=u.ref(!1);function l(){a&&(clearInterval(a),a=null)}function d(){i.value=!1,l()}function g(){const h=s(e);h<=0||(i.value=!0,o&&t(),l(),a=setInterval(t,h))}if(r&&k&&g(),u.isRef(e)||typeof e=="function"){const h=u.watch(e,()=>{i.value&&k&&g()});P(h)}return P(d),{isActive:i,pause:d,resume:g}}function Se(t=1e3,e={}){const{controls:n=!1,immediate:r=!0,callback:o}=e,a=u.ref(0),i=()=>a.value+=1,l=()=>{a.value=0},d=lt(o?()=>{i(),o(a.value)}:i,t,{immediate:r});return n?{counter:a,reset:l,...d}:a}function Te(t,e={}){var n;const r=u.ref((n=e.initialValue)!=null?n:null);return u.watch(t,()=>r.value=D(),e),r}function st(t,e,n={}){const{immediate:r=!0}=n,o=u.ref(!1);let a=null;function i(){a&&(clearTimeout(a),a=null)}function l(){o.value=!1,i()}function d(...g){i(),o.value=!0,a=setTimeout(()=>{o.value=!1,a=null,t(...g)},s(e))}return r&&(o.value=!0,k&&d()),P(l),{isPending:u.readonly(o),start:d,stop:l}}function Ie(t=1e3,e={}){const{controls:n=!1,callback:r}=e,o=st(r??M,t,e),a=u.computed(()=>!o.isPending.value);return n?{ready:a,...o}:a}function Fe(t,e={}){const{method:n="parseFloat",radix:r,nanToZero:o}=e;return u.computed(()=>{let a=s(t);return typeof a=="string"&&(a=Number[n](a,r)),o&&Number.isNaN(a)&&(a=0),a})}function Pe(t){return u.computed(()=>`${s(t)}`)}function Ce(t=!1,e={}){const{truthyValue:n=!0,falsyValue:r=!1}=e,o=u.isRef(t),a=u.ref(t);function i(l){if(arguments.length)return a.value=l,a.value;{const d=s(n);return a.value=a.value===d?s(r):d,a.value}}return o?i:[a,i]}function Me(t,e,n){let r=n?.immediate?[]:[...t instanceof Function?t():Array.isArray(t)?t:s(t)];return u.watch(t,(o,a,i)=>{const l=Array.from({length:r.length}),d=[];for(const h of o){let f=!1;for(let y=0;y<r.length;y++)if(!l[y]&&h===r[y]){l[y]=!0,f=!0;break}f||d.push(h)}const g=r.filter((h,f)=>!l[f]);e(o,r,d,g,i),r=[...o]},n)}function Re(t,e,n){const{count:r,...o}=n,a=u.ref(0),i=N(t,(...l)=>{a.value+=1,a.value>=s(r)&&u.nextTick(()=>i()),e(...l)},o);return{count:a,stop:i}}function ft(t,e,n={}){const{debounce:r=0,maxWait:o=void 0,...a}=n;return N(t,e,{...a,eventFilter:Y(r,{maxWait:o})})}function Ee(t,e,n){return u.watch(t,e,{...n,deep:!0})}function K(t,e,n={}){const{eventFilter:r=U,...o}=n,a=j(r,e);let i,l,d;if(o.flush==="sync"){const g=u.ref(!1);l=()=>{},i=h=>{g.value=!0,h(),g.value=!1},d=u.watch(t,(...h)=>{g.value||a(...h)},o)}else{const g=[],h=u.ref(0),f=u.ref(0);l=()=>{h.value=f.value},g.push(u.watch(t,()=>{f.value++},{...o,flush:"sync"})),i=y=>{const w=f.value;y(),h.value+=f.value-w},g.push(u.watch(t,(...y)=>{const w=h.value>0&&h.value===f.value;h.value=0,f.value=0,!w&&a(...y)},o)),d=()=>{g.forEach(y=>y())}}return{stop:d,ignoreUpdates:i,ignorePrevAsyncUpdates:l}}function _e(t,e,n){return u.watch(t,e,{...n,immediate:!0})}function ke(t,e,n){const r=u.watch(t,(...o)=>(u.nextTick(()=>r()),e(...o)),n)}function dt(t,e,n={}){const{throttle:r=0,trailing:o=!0,leading:a=!0,...i}=n;return N(t,e,{...i,eventFilter:G(r,o,a)})}function je(t,e,n={}){let r;function o(){if(!r)return;const h=r;r=void 0,h()}function a(h){r=h}const i=(h,f)=>(o(),e(h,f,a)),l=K(t,i,n),{ignoreUpdates:d}=l;return{...l,trigger:()=>{let h;return d(()=>{h=i(Ne(t),Le(t))}),h}}}function Ne(t){return u.isReactive(t)?t:Array.isArray(t)?t.map(e=>s(e)):s(t)}function Le(t){return Array.isArray(t)?t.map(()=>{}):void 0}function Ue(t,e,n){return u.watch(t,(r,o,a)=>{r&&e(r,o,a)},n)}c.assert=Ot,c.autoResetRef=rt,c.bypassFilter=U,c.camelize=jt,c.clamp=It,c.computedEager=R,c.computedWithControl=O,c.containsProp=nt,c.controlledComputed=O,c.controlledRef=qt,c.createEventHook=b,c.createFilterWrapper=j,c.createGlobalState=S,c.createInjectionState=L,c.createReactiveFn=$,c.createSharedComposable=C,c.createSingletonPromise=Lt,c.debounceFilter=Y,c.debouncedRef=Z,c.debouncedWatch=ft,c.directiveHooks=Rt,c.eagerComputed=R,c.extendRef=I,c.formatDate=at,c.get=yt,c.hasOwn=Pt,c.hyphenate=_t,c.identity=Nt,c.ignorableWatch=K,c.increaseWithUnit=Wt,c.injectLocal=_,c.invoke=Ut,c.isClient=k,c.isDef=bt,c.isDefined=gt,c.isIOS=Ct,c.isObject=x,c.makeDestructurable=mt,c.noop=M,c.normalizeDate=it,c.notNullish=At,c.now=Tt,c.objectEntries=Ht,c.objectOmit=$t,c.objectPick=Bt,c.pausableFilter=tt,c.pausableWatch=W,c.promiseTimeout=z,c.provideLocal=T,c.rand=Ft,c.reactify=$,c.reactifyObject=pt,c.reactiveComputed=H,c.reactiveOmit=vt,c.reactivePick=Gt,c.refAutoReset=rt,c.refDebounced=Z,c.refDefault=zt,c.refThrottled=J,c.refWithControl=ut,c.resolveRef=Yt,c.resolveUnref=wt,c.set=Zt,c.syncRef=Jt,c.syncRefs=Xt,c.throttleFilter=G,c.throttledRef=J,c.throttledWatch=dt,c.timestamp=D,c.toReactive=V,c.toRef=q,c.toRefs=Kt,c.toValue=s,c.tryOnBeforeMount=Qt,c.tryOnBeforeUnmount=Vt,c.tryOnMounted=xt,c.tryOnScopeDispose=P,c.tryOnUnmounted=Dt,c.until=te,c.useArrayDifference=ne,c.useArrayEvery=re,c.useArrayFilter=oe,c.useArrayFind=ce,c.useArrayFindIndex=ue,c.useArrayFindLast=ie,c.useArrayIncludes=se,c.useArrayJoin=fe,c.useArrayMap=de,c.useArrayReduce=he,c.useArraySome=ye,c.useArrayUnique=we,c.useCounter=pe,c.useDateFormat=Oe,c.useDebounce=Z,c.useDebounceFn=ot,c.useInterval=Se,c.useIntervalFn=lt,c.useLastChanged=Te,c.useThrottle=J,c.useThrottleFn=ct,c.useTimeout=Ie,c.useTimeoutFn=st,c.useToNumber=Fe,c.useToString=Pe,c.useToggle=Ce,c.watchArray=Me,c.watchAtMost=Re,c.watchDebounced=ft,c.watchDeep=Ee,c.watchIgnorable=K,c.watchImmediate=_e,c.watchOnce=ke,c.watchPausable=W,c.watchThrottled=dt,c.watchTriggerable=je,c.watchWithFilter=N,c.whenever=Ue})(this.VueUse=this.VueUse||{},VueDemi);
|