@varlet/ui 3.17.0 → 3.17.1

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/lib/varlet.cjs.js CHANGED
@@ -3,33 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  let vue = require("vue");
6
- //#region ../../node_modules/.pnpm/rattail@2.0.7_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._6rwx5eoj5ijtwiwneistv24bcq/node_modules/rattail/dist/chunk-D1SwGrFN.mjs
7
- var __defProp$38 = Object.defineProperty;
8
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
- var __getOwnPropNames = Object.getOwnPropertyNames;
10
- var __hasOwnProp$38 = Object.prototype.hasOwnProperty;
11
- var __exportAll = (all, no_symbols) => {
12
- let target = {};
13
- for (var name in all) __defProp$38(target, name, {
14
- get: all[name],
15
- enumerable: true
16
- });
17
- if (!no_symbols) __defProp$38(target, Symbol.toStringTag, { value: "Module" });
18
- return target;
19
- };
20
- var __copyProps = (to, from, except, desc) => {
21
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
- key = keys[i];
23
- if (!__hasOwnProp$38.call(to, key) && key !== except) __defProp$38(to, key, {
24
- get: ((k) => from[k]).bind(null, key),
25
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
- });
27
- }
28
- return to;
29
- };
30
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
31
- //#endregion
32
- //#region ../../node_modules/.pnpm/rattail@2.0.7_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._6rwx5eoj5ijtwiwneistv24bcq/node_modules/rattail/dist/isString-eoLxw4CX.mjs
6
+ //#region ../../node_modules/.pnpm/rattail@2.0.9_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._egjgxdahrl7ud7sa5k2q2w4gam/node_modules/rattail/dist/isString-eoLxw4CX.mjs
33
7
  function isArray(val) {
34
8
  return Array.isArray(val);
35
9
  }
@@ -37,7 +11,7 @@ function isString(val) {
37
11
  return typeof val === "string";
38
12
  }
39
13
  //#endregion
40
- //#region ../../node_modules/.pnpm/rattail@2.0.7_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._6rwx5eoj5ijtwiwneistv24bcq/node_modules/rattail/dist/callOrReturn-MpTzoGlG.mjs
14
+ //#region ../../node_modules/.pnpm/rattail@2.0.9_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._egjgxdahrl7ud7sa5k2q2w4gam/node_modules/rattail/dist/callOrReturn-MpTzoGlG.mjs
41
15
  function isFunction(val) {
42
16
  return typeof val === "function";
43
17
  }
@@ -46,172 +20,6 @@ function callOrReturn(fnOrValue, ...args) {
46
20
  return fnOrValue;
47
21
  }
48
22
  //#endregion
49
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/regex.js
50
- var regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
51
- //#endregion
52
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/validate.js
53
- function validate(uuid) {
54
- return typeof uuid === "string" && regex_default.test(uuid);
55
- }
56
- //#endregion
57
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/parse.js
58
- function parse(uuid) {
59
- if (!validate(uuid)) throw TypeError("Invalid UUID");
60
- let v;
61
- return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
62
- }
63
- //#endregion
64
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/stringify.js
65
- var byteToHex = [];
66
- for (let i = 0; i < 256; ++i) byteToHex.push((i + 256).toString(16).slice(1));
67
- function unsafeStringify(arr, offset = 0) {
68
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
69
- }
70
- //#endregion
71
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/rng.js
72
- var getRandomValues;
73
- var rnds8 = new Uint8Array(16);
74
- function rng() {
75
- if (!getRandomValues) {
76
- if (typeof crypto === "undefined" || !crypto.getRandomValues) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
77
- getRandomValues = crypto.getRandomValues.bind(crypto);
78
- }
79
- return getRandomValues(rnds8);
80
- }
81
- //#endregion
82
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v1.js
83
- var _state = {};
84
- function v1(options, buf, offset) {
85
- let bytes;
86
- const isV6 = options?._v6 ?? false;
87
- if (options) {
88
- const optionsKeys = Object.keys(options);
89
- if (optionsKeys.length === 1 && optionsKeys[0] === "_v6") options = void 0;
90
- }
91
- if (options) bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);
92
- else {
93
- const now = Date.now();
94
- const rnds = rng();
95
- updateV1State(_state, now, rnds);
96
- bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? void 0 : _state.clockseq, isV6 ? void 0 : _state.node, buf, offset);
97
- }
98
- return buf ?? unsafeStringify(bytes);
99
- }
100
- function updateV1State(state, now, rnds) {
101
- state.msecs ??= -Infinity;
102
- state.nsecs ??= 0;
103
- if (now === state.msecs) {
104
- state.nsecs++;
105
- if (state.nsecs >= 1e4) {
106
- state.node = void 0;
107
- state.nsecs = 0;
108
- }
109
- } else if (now > state.msecs) state.nsecs = 0;
110
- else if (now < state.msecs) state.node = void 0;
111
- if (!state.node) {
112
- state.node = rnds.slice(10, 16);
113
- state.node[0] |= 1;
114
- state.clockseq = (rnds[8] << 8 | rnds[9]) & 16383;
115
- }
116
- state.msecs = now;
117
- return state;
118
- }
119
- function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
120
- if (rnds.length < 16) throw new Error("Random bytes length must be >= 16");
121
- if (!buf) {
122
- buf = new Uint8Array(16);
123
- offset = 0;
124
- } else if (offset < 0 || offset + 16 > buf.length) throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
125
- msecs ??= Date.now();
126
- nsecs ??= 0;
127
- clockseq ??= (rnds[8] << 8 | rnds[9]) & 16383;
128
- node ??= rnds.slice(10, 16);
129
- msecs += 0xb1d069b5400;
130
- const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
131
- buf[offset++] = tl >>> 24 & 255;
132
- buf[offset++] = tl >>> 16 & 255;
133
- buf[offset++] = tl >>> 8 & 255;
134
- buf[offset++] = tl & 255;
135
- const tmh = msecs / 4294967296 * 1e4 & 268435455;
136
- buf[offset++] = tmh >>> 8 & 255;
137
- buf[offset++] = tmh & 255;
138
- buf[offset++] = tmh >>> 24 & 15 | 16;
139
- buf[offset++] = tmh >>> 16 & 255;
140
- buf[offset++] = clockseq >>> 8 | 128;
141
- buf[offset++] = clockseq & 255;
142
- for (let n = 0; n < 6; ++n) buf[offset++] = node[n];
143
- return buf;
144
- }
145
- //#endregion
146
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v1ToV6.js
147
- function v1ToV6(uuid) {
148
- const v6Bytes = _v1ToV6(typeof uuid === "string" ? parse(uuid) : uuid);
149
- return typeof uuid === "string" ? unsafeStringify(v6Bytes) : v6Bytes;
150
- }
151
- function _v1ToV6(v1Bytes) {
152
- return Uint8Array.of((v1Bytes[6] & 15) << 4 | v1Bytes[7] >> 4 & 15, (v1Bytes[7] & 15) << 4 | (v1Bytes[4] & 240) >> 4, (v1Bytes[4] & 15) << 4 | (v1Bytes[5] & 240) >> 4, (v1Bytes[5] & 15) << 4 | (v1Bytes[0] & 240) >> 4, (v1Bytes[0] & 15) << 4 | (v1Bytes[1] & 240) >> 4, (v1Bytes[1] & 15) << 4 | (v1Bytes[2] & 240) >> 4, 96 | v1Bytes[2] & 15, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
153
- }
154
- var native_default = { randomUUID: typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
155
- //#endregion
156
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js
157
- function _v4(options, buf, offset) {
158
- options = options || {};
159
- const rnds = options.random ?? options.rng?.() ?? rng();
160
- if (rnds.length < 16) throw new Error("Random bytes length must be >= 16");
161
- rnds[6] = rnds[6] & 15 | 64;
162
- rnds[8] = rnds[8] & 63 | 128;
163
- if (buf) {
164
- offset = offset || 0;
165
- if (offset < 0 || offset + 16 > buf.length) throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
166
- for (let i = 0; i < 16; ++i) buf[offset + i] = rnds[i];
167
- return buf;
168
- }
169
- return unsafeStringify(rnds);
170
- }
171
- function v4(options, buf, offset) {
172
- if (native_default.randomUUID && !buf && !options) return native_default.randomUUID();
173
- return _v4(options, buf, offset);
174
- }
175
- //#endregion
176
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v6.js
177
- function v6(options, buf, offset) {
178
- options ??= {};
179
- offset ??= 0;
180
- let bytes = v1({
181
- ...options,
182
- _v6: true
183
- }, new Uint8Array(16));
184
- bytes = v1ToV6(bytes);
185
- if (buf) {
186
- for (let i = 0; i < 16; i++) buf[offset + i] = bytes[i];
187
- return buf;
188
- }
189
- return unsafeStringify(bytes);
190
- }
191
- //#endregion
192
- //#region ../../node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.mjs
193
- function mitt_default(n) {
194
- return {
195
- all: n = n || /* @__PURE__ */ new Map(),
196
- on: function(t, e) {
197
- var i = n.get(t);
198
- i ? i.push(e) : n.set(t, [e]);
199
- },
200
- off: function(t, e) {
201
- var i = n.get(t);
202
- i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
203
- },
204
- emit: function(t, e) {
205
- var i = n.get(t);
206
- i && i.slice().map(function(n) {
207
- n(e);
208
- }), (i = n.get("*")) && i.slice().map(function(n) {
209
- n(t, e);
210
- });
211
- }
212
- };
213
- }
214
- //#endregion
215
23
  //#region ../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.mjs
216
24
  /*! js-cookie v3.0.5 | MIT */
217
25
  function assign(target) {
@@ -278,31 +86,15 @@ function init(converter, defaultAttributes) {
278
86
  converter: { value: Object.freeze(converter) }
279
87
  });
280
88
  }
281
- var api = init(defaultConverter, { path: "/" });
89
+ init(defaultConverter, { path: "/" });
282
90
  //#endregion
283
- //#region ../../node_modules/.pnpm/rattail@2.0.7_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._6rwx5eoj5ijtwiwneistv24bcq/node_modules/rattail/dist/index.mjs
284
- function at(arr, index) {
285
- if (!arr.length) return;
286
- if (index < 0) index += arr.length;
287
- return arr[index];
288
- }
91
+ //#region ../../node_modules/.pnpm/rattail@2.0.9_@voidzero-dev+vite-plus-core@0.1.18_@types+node@20.19.39_esbuild@0.27.7_jiti@2._egjgxdahrl7ud7sa5k2q2w4gam/node_modules/rattail/dist/index.mjs
289
92
  function clamp$1(num, min, max) {
290
93
  return Math.min(max, Math.max(min, num));
291
94
  }
292
95
  function clampArrayRange(index, arr) {
293
96
  return clamp$1(index, 0, arr.length - 1);
294
97
  }
295
- function delay(time) {
296
- return new Promise((resolve) => {
297
- setTimeout(resolve, time);
298
- });
299
- }
300
- function randomNumber(min = 0, max = 100) {
301
- return Math.floor(Math.random() * (max - min + 1)) + min;
302
- }
303
- function times(num, fn) {
304
- return Array.from({ length: num }, (_, index) => fn(index));
305
- }
306
98
  function inBrowser() {
307
99
  return typeof window !== "undefined";
308
100
  }
@@ -325,172 +117,33 @@ function toTypeString(value) {
325
117
  function toRawType(value) {
326
118
  return toTypeString(value).slice(8, -1);
327
119
  }
328
- function isArrayBuffer(val) {
329
- return toRawType(val) === "ArrayBuffer";
330
- }
331
120
  function isBoolean(val) {
332
121
  return typeof val === "boolean";
333
122
  }
334
- function isDataView(val) {
335
- return toRawType(val) === "DataView";
336
- }
337
- function isDate(val) {
338
- return toRawType(val) === "Date";
339
- }
340
- function isDOMException(val) {
341
- return toRawType(val) === "DOMException";
342
- }
343
123
  function isEmpty(val) {
344
124
  return val === void 0 || val === null || val === "" || isArray(val) && !val.length;
345
125
  }
346
- function isError(val) {
347
- return toRawType(val) === "Error";
348
- }
349
- function isMap(val) {
350
- return toRawType(val) === "Map";
351
- }
352
126
  function isObject(val) {
353
127
  return typeof val === "object" && val !== null;
354
128
  }
355
129
  function isPlainObject(val) {
356
130
  return toRawType(val) === "Object";
357
131
  }
358
- function isRegExp(val) {
359
- return toRawType(val) === "RegExp";
360
- }
361
- function isSet(val) {
362
- return toRawType(val) === "Set";
363
- }
364
- function isTypedArray(val) {
365
- return [
366
- "Int8Array",
367
- "Uint8Array",
368
- "Uint8ClampedArray",
369
- "Int16Array",
370
- "Uint16Array",
371
- "Int32Array",
372
- "Uint32Array",
373
- "Float32Array",
374
- "Float64Array",
375
- "BigInt64Array",
376
- "BigUint64Array"
377
- ].includes(toRawType(val));
378
- }
379
- function isEqualWith(value, other, fn) {
380
- const valueStack = /* @__PURE__ */ new WeakMap();
381
- const otherStack = /* @__PURE__ */ new WeakMap();
382
- function baseIsEqual(value, other, valueStack, otherStack) {
383
- if (fn(value, other) === true) return true;
384
- if (value === other) return true;
385
- if (value !== value && other !== other) return true;
386
- if (!isObject(value) || !isObject(other)) return value === other;
387
- if (value.constructor !== other.constructor) return false;
388
- if (toRawType(value) === "String" && toRawType(other) === "String" || toRawType(value) === "Number" && toRawType(other) === "Number" || toRawType(value) === "Boolean" && toRawType(other) === "Boolean" || toRawType(value) === "BigInt" && toRawType(other) === "BigInt" || toRawType(value) === "Symbol" && toRawType(other) === "Symbol") return value.valueOf() === other.valueOf();
389
- if (isDate(value) && isDate(other)) return value.getTime() === other.getTime();
390
- if (isRegExp(value) && isRegExp(other)) return value.source === other.source && value.flags === other.flags;
391
- if (isError(value) && isError(other)) return value.name === other.name && value.message === other.message && value.cause === other.cause;
392
- if (isDOMException(value) && isDOMException(other)) return value.name === other.name && value.message === other.message;
393
- if (isTypedArray(value) && isTypedArray(other) || isDataView(value) && isDataView(other)) {
394
- if (value.byteLength !== other.byteLength) return false;
395
- const valueTypedArray = new Uint8Array(value.buffer);
396
- const otherTypedArray = new Uint8Array(other.buffer);
397
- return valueTypedArray.every((v, i) => v === otherTypedArray[i]);
398
- }
399
- if (isArrayBuffer(value) && isArrayBuffer(other)) {
400
- if (value.byteLength !== other.byteLength) return false;
401
- const valueTypedArray = new Uint8Array(value);
402
- const otherTypedArray = new Uint8Array(other);
403
- return valueTypedArray.every((v, i) => v === otherTypedArray[i]);
404
- }
405
- if (valueStack.get(value) === other && otherStack.get(other) === value) return true;
406
- valueStack.set(value, other);
407
- otherStack.set(other, value);
408
- if (isMap(value) && isMap(other) || isSet(value) && isSet(other)) {
409
- if (value.size !== other.size) return false;
410
- const valueArray = [...value];
411
- const otherArray = [...other];
412
- const result = valueArray.every((v, i) => baseIsEqual(v, otherArray[i], valueStack, otherStack));
413
- valueStack.delete(value);
414
- otherStack.delete(other);
415
- return result;
416
- }
417
- if (isArray(value) && isArray(other)) {
418
- if (value.length !== other.length) return false;
419
- const result = value.every((v, i) => baseIsEqual(v, other[i], valueStack, otherStack));
420
- valueStack.delete(value);
421
- otherStack.delete(other);
422
- return result;
423
- }
424
- if (isPlainObject(value) && isPlainObject(other)) {
425
- const valueOwnKeys = [...Object.keys(value), ...Object.getOwnPropertySymbols(value)];
426
- const otherOwnKeys = [...Object.keys(other), ...Object.getOwnPropertySymbols(other)];
427
- if (valueOwnKeys.length !== otherOwnKeys.length) return false;
428
- const result = valueOwnKeys.every((k) => baseIsEqual(value[k], other[k], valueStack, otherStack));
429
- valueStack.delete(value);
430
- otherStack.delete(other);
431
- return result;
432
- }
433
- return false;
434
- }
435
- return baseIsEqual(value, other, valueStack, otherStack);
436
- }
437
- function isEqual(value, other) {
438
- return isEqualWith(value, other, () => void 0);
439
- }
440
- function isNonEmptyArray(val) {
441
- return isArray(val) && !!val.length;
442
- }
443
- function isNullish(val) {
444
- return val == null;
445
- }
446
132
  function isNumber(val) {
447
133
  return typeof val === "number";
448
134
  }
449
135
  function isNumeric(val) {
450
136
  return isNumber(val) || isString(val) && /^[-+]?\d+$/.test(val);
451
137
  }
452
- function isPromise(val) {
453
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
454
- }
455
- function isSymbol(val) {
456
- return typeof val === "symbol";
457
- }
458
- function isTruthy(v) {
459
- return Boolean(v);
460
- }
461
- function isWeakMap(val) {
462
- return toRawType(val) === "WeakMap";
463
- }
464
- function isWeakSet(val) {
465
- return toRawType(val) === "WeakSet";
466
- }
467
138
  function isWindow(val) {
468
139
  return val === window;
469
140
  }
470
141
  function supportTouch() {
471
142
  return inBrowser() && "ontouchstart" in window;
472
143
  }
473
- function isFile(val) {
474
- return toRawType(val) === "File";
475
- }
476
- function isBlob(val) {
477
- return toRawType(val) === "Blob";
478
- }
479
- function isPrimitive(val) {
480
- return val == null || typeof val !== "object" && typeof val !== "function";
481
- }
482
- function isEmptyPlainObject(val) {
483
- return isPlainObject(val) && Object.keys(val).length === 0 && Object.getOwnPropertySymbols(val).length === 0;
484
- }
485
144
  function assert$1(condition, message) {
486
145
  if (!condition) throw new Error(message);
487
146
  }
488
- function hasDuplicates(arr) {
489
- return uniq(arr).length !== arr.length;
490
- }
491
- function hasDuplicatesBy(arr, fn) {
492
- return uniqBy(arr, fn).length !== arr.length;
493
- }
494
147
  function toNumber(val) {
495
148
  if (val == null) return 0;
496
149
  if (isString(val)) {
@@ -501,52 +154,15 @@ function toNumber(val) {
501
154
  if (isBoolean(val)) return Number(val);
502
155
  return val;
503
156
  }
504
- var key$1 = 0;
505
- function genNumberKey() {
506
- return key$1++;
507
- }
508
- function chunk(arr, size = 1) {
509
- size = clamp$1(size, 1, arr.length);
510
- const result = [];
511
- let index = 0;
512
- while (index < arr.length) {
513
- result.push(arr.slice(index, index + size));
514
- index += size;
515
- }
516
- return result;
517
- }
518
157
  function removeItem(arr, item) {
519
158
  if (arr.length) {
520
159
  const index = arr.indexOf(item);
521
160
  if (index > -1) return arr.splice(index, 1);
522
161
  }
523
162
  }
524
- function removeItemBy(arr, fn) {
525
- if (arr.length) {
526
- const index = arr.findIndex((v) => fn(v));
527
- if (index > -1) return arr.splice(index, 1);
528
- }
529
- }
530
- function removeItemsBy(arr, fn) {
531
- let i = 0;
532
- const removedItems = [];
533
- while (i < arr.length) if (fn(arr[i])) removedItems.push(...arr.splice(i, 1));
534
- else i++;
535
- return removedItems;
536
- }
537
- function toggleItem(arr, item) {
538
- arr.includes(item) ? removeItem(arr, item) : arr.push(item);
539
- return arr;
540
- }
541
163
  function uniq(arr) {
542
164
  return [...new Set(arr)];
543
165
  }
544
- function uniqBy(arr, fn) {
545
- return arr.reduce((ret, i) => {
546
- if (ret.findIndex((j) => fn(i, j)) === -1) ret.push(i);
547
- return ret;
548
- }, []);
549
- }
550
166
  function find(arr, fn, from = "start") {
551
167
  let i = from === "start" ? 0 : arr.length - 1;
552
168
  while (arr.length > 0 && i >= 0 && i <= arr.length - 1) {
@@ -555,138 +171,12 @@ function find(arr, fn, from = "start") {
555
171
  }
556
172
  return [null, -1];
557
173
  }
558
- function shuffle(arr) {
559
- for (let i = arr.length - 1; i > 0; i--) {
560
- const j = Math.floor(Math.random() * (i + 1));
561
- [arr[i], arr[j]] = [arr[j], arr[i]];
562
- }
563
- return arr;
564
- }
565
174
  function removeArrayBlank(arr) {
566
175
  return arr.filter((item) => item != null);
567
176
  }
568
- function removeArrayEmpty(arr) {
569
- return arr.filter((item) => item != null && item !== "");
570
- }
571
177
  function normalizeToArray(value) {
572
178
  return isArray(value) ? value : [value];
573
179
  }
574
- function differenceWith(arr, ...values) {
575
- const fn = at(values, -1);
576
- const targets = values.slice(0, -1).reduce((targets, value) => [...targets, ...value], []);
577
- return arr.filter((item) => !targets.some((value) => fn(item, value)));
578
- }
579
- function difference(arr, ...values) {
580
- return differenceWith(arr, ...values, (a, b) => a === b);
581
- }
582
- function intersectionWith(...values) {
583
- const fn = at(values, -1);
584
- const targets = values.slice(0, -1);
585
- if (targets.length === 0) return [];
586
- if (targets.length === 1) return uniqBy(targets[0], fn);
587
- function baseIntersectionWith(arr1, arr2) {
588
- return arr1.filter((item) => arr2.some((value) => fn(item, value)));
589
- }
590
- return uniqBy(targets.reduce((result, target) => baseIntersectionWith(result, target)), fn);
591
- }
592
- function intersection(...values) {
593
- return intersectionWith(...values, (a, b) => a === b);
594
- }
595
- function groupBy(arr, fn) {
596
- return arr.reduce((result, item) => {
597
- const key = fn(item);
598
- (result[key] ??= []).push(item);
599
- return result;
600
- }, {});
601
- }
602
- function xorWith(...values) {
603
- const fn = at(values, -1);
604
- return uniqBy(values.slice(0, -1).reduce((result, target) => {
605
- return [...differenceWith(result, target, fn), ...differenceWith(target, result, fn)];
606
- }), fn);
607
- }
608
- function xor(...values) {
609
- return xorWith(...values, (a, b) => a === b);
610
- }
611
- function pick(object, keys) {
612
- return keys.reduce((result, key) => {
613
- result[key] = object[key];
614
- return result;
615
- }, {});
616
- }
617
- function pickBy(object, fn) {
618
- return [...Object.keys(object), ...Object.getOwnPropertySymbols(object)].reduce((result, key) => {
619
- const value = object[key];
620
- if (fn(value, key)) result[key] = value;
621
- return result;
622
- }, {});
623
- }
624
- function omit(object, keys) {
625
- return [...Object.keys(object), ...Object.getOwnPropertySymbols(object)].reduce((result, key) => {
626
- if (!keys.includes(key)) result[key] = object[key];
627
- return result;
628
- }, {});
629
- }
630
- function omitBy(object, fn) {
631
- return [...Object.keys(object), ...Object.getOwnPropertySymbols(object)].reduce((result, key) => {
632
- const value = object[key];
633
- if (!fn(value, key)) result[key] = value;
634
- return result;
635
- }, {});
636
- }
637
- function rekey(object, mapping) {
638
- return [...Object.keys(object), ...Object.getOwnPropertySymbols(object)].reduce((result, key) => {
639
- const nextKey = hasOwn(mapping, key) ? mapping[key] : key;
640
- result[nextKey] = object[key];
641
- return result;
642
- }, {});
643
- }
644
- function mapObject(object, fn) {
645
- return Object.entries(object).reduce((result, [key, value]) => {
646
- const entry = fn(key, value);
647
- if (isArray(entry)) {
648
- const [newKey, newValue] = entry;
649
- result[newKey] = newValue;
650
- }
651
- return result;
652
- }, {});
653
- }
654
- function promiseWithResolvers() {
655
- let resolve;
656
- let reject;
657
- return {
658
- promise: new Promise((_resolver, _reject) => {
659
- resolve = _resolver;
660
- reject = _reject;
661
- }),
662
- resolve,
663
- reject
664
- };
665
- }
666
- function set(object, path, value) {
667
- if (!isObject(object)) return;
668
- const keys = [...path];
669
- if (keys.length === 0) return;
670
- let target = object;
671
- while (keys.length > 1) {
672
- const key = keys.shift();
673
- const nextKey = keys[0];
674
- if (!isObject(target[key])) target[key] = isNumber(nextKey) ? [] : {};
675
- target = target[key];
676
- }
677
- target[keys[0]] = value;
678
- }
679
- function objectKeys(object) {
680
- return Object.keys(object);
681
- }
682
- function objectEntries(object) {
683
- return Object.entries(object);
684
- }
685
- var integrated_exports = /* @__PURE__ */ __exportAll({
686
- mitt: () => mitt_default,
687
- uuid: () => v4,
688
- uuidV6: () => v6
689
- });
690
180
  function cancelAnimationFrame(handle) {
691
181
  const globalThis = getGlobalThis();
692
182
  globalThis.cancelAnimationFrame ? globalThis.cancelAnimationFrame(handle) : globalThis.clearTimeout(handle);
@@ -700,39 +190,10 @@ function classes$81(...classes) {
700
190
  return className;
701
191
  });
702
192
  }
703
- function copyText(value) {
704
- if (!value) return;
705
- const textArea = document.createElement("textarea");
706
- textArea.value = value;
707
- textArea.style.position = "fixed";
708
- textArea.style.opacity = "0";
709
- document.body.appendChild(textArea);
710
- textArea.select();
711
- document.execCommand("copy");
712
- document.body.removeChild(textArea);
713
- }
714
- function maskString(text, { prefix = 2, suffix = 2, mask = "*", maskLength } = {}) {
715
- if (text.length <= 1) return text;
716
- const effectivePrefix = Math.min(prefix, text.length - 1);
717
- const effectiveSuffix = Math.min(suffix, Math.max(text.length - effectivePrefix - 1, 0));
718
- const count = maskLength ?? text.length - effectivePrefix - effectiveSuffix;
719
- const suffixPart = effectiveSuffix > 0 ? text.slice(-effectiveSuffix) : "";
720
- return text.slice(0, effectivePrefix) + mask.repeat(count) + suffixPart;
721
- }
722
193
  function camelize(s) {
723
194
  s = s.replace(/[-_](\w)/g, (_, p) => p.toUpperCase());
724
195
  return s.replace(s.charAt(0), s.charAt(0).toLowerCase());
725
196
  }
726
- function ensurePrefix(s, prefix) {
727
- return s.startsWith(prefix) ? s : prefix + s;
728
- }
729
- function ensureSuffix(s, suffix) {
730
- return s.endsWith(suffix) ? s : s + suffix;
731
- }
732
- var key = 0;
733
- function genStringKey() {
734
- return `generated-key-${key++}`;
735
- }
736
197
  function kebabCase(s) {
737
198
  return s.replace(/([A-Z])/g, " $1").replace(/[_\s]+/g, "-").trim().replace(/^-/, "").toLowerCase();
738
199
  }
@@ -740,30 +201,6 @@ function pascalCase(s) {
740
201
  const ret = camelize(s);
741
202
  return ret.replace(ret.charAt(0), ret.charAt(0).toUpperCase());
742
203
  }
743
- function lowerFirst(s) {
744
- return s.charAt(0).toLowerCase() + s.slice(1);
745
- }
746
- function upperFirst(s) {
747
- return s.charAt(0).toUpperCase() + s.slice(1);
748
- }
749
- function randomColor() {
750
- const letters = "0123456789abcdef";
751
- let color = "#";
752
- for (let i = 0; i < 6; i++) color += letters[Math.floor(Math.random() * 16)];
753
- return color;
754
- }
755
- function randomString(length = 10) {
756
- let str = baseRandomString();
757
- while (str.length < length) str += baseRandomString();
758
- function baseRandomString() {
759
- return Math.random().toString(36).slice(2);
760
- }
761
- return str.slice(0, length);
762
- }
763
- function slash(path) {
764
- if (path.startsWith("\\\\?\\")) return path;
765
- return path.replace(/\\/g, "/");
766
- }
767
204
  function createNamespaceFn(namespace) {
768
205
  return (name) => {
769
206
  const componentName = `${namespace}-${name}`;
@@ -793,27 +230,6 @@ function doubleRaf() {
793
230
  function getStyle$1(element) {
794
231
  return window.getComputedStyle(element);
795
232
  }
796
- function getParentScroller$1(el) {
797
- let element = el;
798
- while (element) {
799
- if (!element.parentNode) break;
800
- element = element.parentNode;
801
- if (element === document.body || element === document.documentElement) break;
802
- const scrollRE = /(scroll|auto)/;
803
- const { overflowY, overflow } = getStyle$1(element);
804
- if (scrollRE.test(overflowY) || scrollRE.test(overflow)) return element;
805
- }
806
- return window;
807
- }
808
- function getAllParentScroller$1(el) {
809
- const allParentScroller = [];
810
- let element = el;
811
- while (!isWindow(element)) {
812
- element = getParentScroller$1(element);
813
- allParentScroller.push(element);
814
- }
815
- return allParentScroller;
816
- }
817
233
  function getRect(element) {
818
234
  if (isWindow(element)) {
819
235
  const width = element.innerWidth;
@@ -848,9 +264,6 @@ function inViewport(element) {
848
264
  const { width, height } = getRect(window);
849
265
  return left <= width && right >= 0 && top <= height && bottom >= 0;
850
266
  }
851
- function prettyJSONObject(jsonObject) {
852
- return JSON.stringify(jsonObject, null, 2);
853
- }
854
267
  function preventDefault(event) {
855
268
  if (event.cancelable === false) return;
856
269
  event.preventDefault();
@@ -881,89 +294,12 @@ function createStorage(storage) {
881
294
  }
882
295
  };
883
296
  }
884
- function createCookieStorage(options = {}) {
885
- const defaultOptions = options;
886
- return {
887
- set(key, value, options = {}) {
888
- if (value == null) return;
889
- if (!isString(value)) value = JSON.stringify(value);
890
- api.set(key, value, {
891
- ...defaultOptions,
892
- ...options
893
- });
894
- },
895
- get(key) {
896
- const data = api.get(key);
897
- try {
898
- return JSON.parse(data);
899
- } catch (err) {
900
- return data;
901
- }
902
- },
903
- remove(key, options = {}) {
904
- api.remove(key, {
905
- ...defaultOptions,
906
- ...options
907
- });
908
- }
909
- };
910
- }
911
- var sessionStorage = createStorage(getGlobalThis().sessionStorage);
912
- var localStorage = createStorage(getGlobalThis().localStorage);
913
- function tryParseJSON(json) {
914
- try {
915
- return JSON.parse(json);
916
- } catch {
917
- return;
918
- }
919
- }
920
- function download(val, filename = "file") {
921
- const a = document.createElement("a");
922
- a.style.display = "none";
923
- a.href = isString(val) ? val : URL.createObjectURL(val);
924
- a.download = filename;
925
- document.body.appendChild(a);
926
- a.click();
927
- URL.revokeObjectURL(a.href);
928
- document.body.removeChild(a);
929
- }
297
+ createStorage(getGlobalThis().sessionStorage);
298
+ createStorage(getGlobalThis().localStorage);
930
299
  function call(fn, ...args) {
931
300
  if (isArray(fn)) return fn.map((f) => f(...args));
932
301
  if (fn) return fn(...args);
933
302
  }
934
- function tryCall(fn, ...args) {
935
- try {
936
- return [void 0, fn(...args)];
937
- } catch (e) {
938
- return [e, void 0];
939
- }
940
- }
941
- async function tryAsyncCall(fn, ...args) {
942
- try {
943
- return [void 0, await fn(...args)];
944
- } catch (e) {
945
- return [e, void 0];
946
- }
947
- }
948
- function once(fn) {
949
- let called = false;
950
- let result;
951
- return function(...args) {
952
- if (called) return result;
953
- called = true;
954
- result = fn.apply(this, args);
955
- return result;
956
- };
957
- }
958
- function debounce$1(fn, delay = 0) {
959
- let timer;
960
- return function(...args) {
961
- if (timer) clearTimeout(timer);
962
- timer = setTimeout(() => {
963
- fn.apply(this, args);
964
- }, delay);
965
- };
966
- }
967
303
  function throttle(fn, delay = 200) {
968
304
  let timer;
969
305
  let start = 0;
@@ -980,74 +316,6 @@ function throttle(fn, delay = 200) {
980
316
  }, delay - elapsed);
981
317
  };
982
318
  }
983
- function NOOP() {}
984
- function enumOf(config) {
985
- const extractValues = Object.entries(config).reduce((result, [key, value]) => {
986
- result[key] = isPlainObject(value) ? value.value : value;
987
- return result;
988
- }, {});
989
- const configValues = Object.values(config);
990
- function label(v) {
991
- const valueObject = getValueObject(v);
992
- return valueObject?.label ? callOrReturn(valueObject.label) : "";
993
- }
994
- function description(v) {
995
- const valueObject = getValueObject(v);
996
- return valueObject?.description ? callOrReturn(valueObject.description) : "";
997
- }
998
- function values() {
999
- return configValues.map((option) => isPlainObject(option) ? option.value : option);
1000
- }
1001
- function labels() {
1002
- return configValues.map((option) => {
1003
- if (isPlainObject(option)) return option.label ? callOrReturn(option.label) : "";
1004
- return "";
1005
- });
1006
- }
1007
- function descriptions() {
1008
- return configValues.map((option) => {
1009
- if (isPlainObject(option)) return option.description ? callOrReturn(option.description) : "";
1010
- return "";
1011
- });
1012
- }
1013
- function resolveOption(option) {
1014
- const result = {};
1015
- for (const key of Object.keys(option)) result[key] = callOrReturn(option[key]);
1016
- return result;
1017
- }
1018
- function option(v) {
1019
- const valueObject = getValueObject(v);
1020
- if (valueObject) return resolveOption(valueObject);
1021
- return {
1022
- value: v,
1023
- label: "",
1024
- description: ""
1025
- };
1026
- }
1027
- function options() {
1028
- return configValues.map((option) => {
1029
- if (isPlainObject(option)) return resolveOption(option);
1030
- return {
1031
- value: option,
1032
- label: "",
1033
- description: ""
1034
- };
1035
- });
1036
- }
1037
- function getValueObject(v) {
1038
- return configValues.find((option) => isPlainObject(option) && option.value === v);
1039
- }
1040
- return {
1041
- ...extractValues,
1042
- values,
1043
- label,
1044
- description,
1045
- labels,
1046
- descriptions,
1047
- option,
1048
- options
1049
- };
1050
- }
1051
319
  function motion(options) {
1052
320
  const { from, to, duration = 300, frame = () => {}, timingFunction = (value) => value, onStateChange = () => {} } = options;
1053
321
  let state = "pending";
@@ -1114,228 +382,6 @@ function motion(options) {
1114
382
  getState
1115
383
  };
1116
384
  }
1117
- function duration() {
1118
- const ctx = {
1119
- value: 0,
1120
- years,
1121
- months,
1122
- weeks,
1123
- days,
1124
- hours,
1125
- minutes,
1126
- seconds,
1127
- milliseconds,
1128
- valueOf
1129
- };
1130
- function years(value) {
1131
- ctx.value += value * 365 * 24 * 60 * 60 * 1e3;
1132
- return ctx;
1133
- }
1134
- function months(value) {
1135
- ctx.value += value * 30 * 24 * 60 * 60 * 1e3;
1136
- return ctx;
1137
- }
1138
- function weeks(value) {
1139
- ctx.value += value * 7 * 24 * 60 * 60 * 1e3;
1140
- return ctx;
1141
- }
1142
- function days(value) {
1143
- ctx.value += value * 24 * 60 * 60 * 1e3;
1144
- return ctx;
1145
- }
1146
- function hours(value) {
1147
- ctx.value += value * 60 * 60 * 1e3;
1148
- return ctx;
1149
- }
1150
- function minutes(value) {
1151
- ctx.value += value * 60 * 1e3;
1152
- return ctx;
1153
- }
1154
- function seconds(value) {
1155
- ctx.value += value * 1e3;
1156
- return ctx;
1157
- }
1158
- function milliseconds(value) {
1159
- ctx.value += value;
1160
- return ctx;
1161
- }
1162
- function valueOf(options = { milliseconds: true }) {
1163
- return options.milliseconds ? ctx.value : ctx.value / 1e3;
1164
- }
1165
- return ctx;
1166
- }
1167
- function createCacheManager(options = {}) {
1168
- const cacheManager = /* @__PURE__ */ new Map();
1169
- const { ttl: defaultTtl = Infinity } = options;
1170
- function purgeStale() {
1171
- cacheManager.forEach((value, key) => {
1172
- if (performance.now() > value.expiredAt) remove(key);
1173
- });
1174
- }
1175
- function has(key) {
1176
- purgeStale();
1177
- return cacheManager.has(key);
1178
- }
1179
- function get(key) {
1180
- purgeStale();
1181
- return cacheManager.get(key)?.value;
1182
- }
1183
- function set(key, value, options) {
1184
- const ttl = options?.ttl ?? defaultTtl;
1185
- cacheManager.set(key, {
1186
- expiredAt: performance.now() + ttl,
1187
- value
1188
- });
1189
- }
1190
- function remove(key) {
1191
- return cacheManager.delete(key);
1192
- }
1193
- function clear() {
1194
- cacheManager.clear();
1195
- }
1196
- return {
1197
- has,
1198
- get,
1199
- set,
1200
- remove,
1201
- clear
1202
- };
1203
- }
1204
- function buildNavigationUrl(target) {
1205
- if (isString(target)) return target;
1206
- const { to, query, hash } = target;
1207
- const hashIndex = to.indexOf("#");
1208
- const toWithoutHash = hashIndex >= 0 ? to.slice(0, hashIndex) : to;
1209
- const existingHash = hashIndex >= 0 ? `#${to.slice(hashIndex + 1)}` : "";
1210
- const queryIndex = toWithoutHash.indexOf("?");
1211
- const base = queryIndex >= 0 ? toWithoutHash.slice(0, queryIndex) : toWithoutHash;
1212
- const existingQueryString = queryIndex >= 0 ? toWithoutHash.slice(queryIndex + 1) : "";
1213
- const params = new URLSearchParams(existingQueryString);
1214
- if (query) for (const [key, value] of Object.entries(query)) params.append(key, String(value));
1215
- const queryString = params.toString();
1216
- const finalHash = hash ?? existingHash;
1217
- let url = base;
1218
- if (queryString) url += `?${queryString}`;
1219
- if (finalHash) url += finalHash;
1220
- return url;
1221
- }
1222
- var navigation = {
1223
- push(target) {
1224
- window.location.assign(buildNavigationUrl(target));
1225
- },
1226
- replace(target) {
1227
- window.location.replace(buildNavigationUrl(target));
1228
- },
1229
- open(target) {
1230
- const url = buildNavigationUrl(target);
1231
- window.open(url);
1232
- },
1233
- back() {
1234
- window.history.back();
1235
- },
1236
- go(delta) {
1237
- window.history.go(delta);
1238
- }
1239
- };
1240
- function cloneDeepWith(value, fn) {
1241
- const cache = /* @__PURE__ */ new WeakMap();
1242
- function baseCloneDeep(value, cache) {
1243
- const customResult = fn(value);
1244
- if (customResult !== void 0) return customResult;
1245
- if (!isObject(value)) return value;
1246
- if (cache.has(value)) return cache.get(value);
1247
- if (isDate(value)) return new Date(value);
1248
- if (isRegExp(value)) return new RegExp(value);
1249
- if (isMap(value)) {
1250
- const result = /* @__PURE__ */ new Map();
1251
- cache.set(value, result);
1252
- value.forEach((val, key) => {
1253
- result.set(baseCloneDeep(key, cache), baseCloneDeep(val, cache));
1254
- });
1255
- return result;
1256
- }
1257
- if (isSet(value)) {
1258
- const result = /* @__PURE__ */ new Set();
1259
- cache.set(value, result);
1260
- value.forEach((val) => {
1261
- result.add(baseCloneDeep(val, cache));
1262
- });
1263
- return result;
1264
- }
1265
- if (toRawType(value) === "String" || toRawType(value) === "Number" || toRawType(value) === "Boolean") return newConstructor(value, value.valueOf());
1266
- if (isWeakMap(value) || isWeakSet(value) || isError(value) || isDOMException(value)) return {};
1267
- if (isTypedArray(value)) return newConstructor(value, baseCloneArrayBuffer(value.buffer), value.byteOffset, value.length);
1268
- if (isDataView(value)) return newConstructor(value, baseCloneArrayBuffer(value.buffer), value.byteOffset, value.byteLength);
1269
- if (isArrayBuffer(value)) return baseCloneArrayBuffer(value);
1270
- if (isArray(value)) {
1271
- const result = [];
1272
- cache.set(value, result);
1273
- value.forEach((value, index) => {
1274
- result[index] = baseCloneDeep(value, cache);
1275
- });
1276
- return result;
1277
- }
1278
- if (isPlainObject(value)) {
1279
- const result = Object.create(Reflect.getPrototypeOf(value));
1280
- cache.set(value, result);
1281
- [...Object.keys(value), ...Object.getOwnPropertySymbols(value)].forEach((key) => {
1282
- result[key] = baseCloneDeep(value[key], cache);
1283
- });
1284
- return result;
1285
- }
1286
- return value;
1287
- }
1288
- function baseCloneArrayBuffer(value) {
1289
- const result = new ArrayBuffer(value.byteLength);
1290
- new Uint8Array(result).set(new Uint8Array(value));
1291
- return result;
1292
- }
1293
- function newConstructor(value, ...args) {
1294
- return new value.constructor(...args);
1295
- }
1296
- return baseCloneDeep(value, cache);
1297
- }
1298
- function cloneDeep(value) {
1299
- return cloneDeepWith(value, () => void 0);
1300
- }
1301
- function mergeWith(object, ...sources) {
1302
- const fn = at(sources, -1);
1303
- const targets = [object, ...sources.slice(0, -1)];
1304
- let len = targets.length - 1;
1305
- let result = targets[len];
1306
- while (len) {
1307
- result = baseMergeWith(targets[len - 1], result, fn);
1308
- len--;
1309
- }
1310
- function baseMergeWith(object, source, fn) {
1311
- function baseMerge(target, src) {
1312
- for (const key in src) if (hasOwn(src, key)) {
1313
- const srcValue = src[key];
1314
- const targetValue = target[key];
1315
- const customResult = fn(targetValue, srcValue, key, object, source);
1316
- if (customResult !== void 0) target[key] = customResult;
1317
- else if (isObject(srcValue)) if (isObject(targetValue)) target[key] = baseMerge(targetValue, srcValue);
1318
- else target[key] = baseMerge(isArray(srcValue) ? [] : {}, srcValue);
1319
- else target[key] = srcValue;
1320
- }
1321
- return target;
1322
- }
1323
- return baseMerge(object, source);
1324
- }
1325
- return result;
1326
- }
1327
- function merge$1(object, ...sources) {
1328
- return mergeWith(object, ...sources, () => void 0);
1329
- }
1330
- function toArrayBuffer(file) {
1331
- return new Promise((resolve) => {
1332
- const fileReader = new FileReader();
1333
- fileReader.onload = () => {
1334
- resolve(fileReader.result);
1335
- };
1336
- fileReader.readAsArrayBuffer(file);
1337
- });
1338
- }
1339
385
  function toDataURL(file) {
1340
386
  return new Promise((resolve) => {
1341
387
  const fileReader = new FileReader();
@@ -1345,66 +391,6 @@ function toDataURL(file) {
1345
391
  fileReader.readAsDataURL(file);
1346
392
  });
1347
393
  }
1348
- function toText(file) {
1349
- return new Promise((resolve) => {
1350
- const fileReader = new FileReader();
1351
- fileReader.onload = () => {
1352
- resolve(fileReader.result);
1353
- };
1354
- fileReader.readAsText(file);
1355
- });
1356
- }
1357
- function maxBy(arr, fn) {
1358
- return arr.reduce((result, item) => fn(result) > fn(item) ? result : item, arr[0]);
1359
- }
1360
- function minBy(arr, fn) {
1361
- return arr.reduce((result, item) => fn(result) < fn(item) ? result : item, arr[0]);
1362
- }
1363
- function sum$1(arr) {
1364
- return arr.reduce((ret, val) => ret + val, 0);
1365
- }
1366
- function sumBy(arr, fn) {
1367
- return arr.reduce((ret, val) => ret + fn(val), 0);
1368
- }
1369
- function sumHash(value) {
1370
- function sum(hash, value) {
1371
- for (let i = 0; i < value.length; i++) {
1372
- const chr = value.charCodeAt(i);
1373
- hash = (hash << 5) - hash + chr;
1374
- hash |= 0;
1375
- }
1376
- return hash < 0 ? hash * -2 : hash;
1377
- }
1378
- function baseSumHash(hash, value, key, seen) {
1379
- hash = sum(hash, key);
1380
- hash = sum(hash, toTypeString(value));
1381
- hash = sum(hash, typeof value);
1382
- if (value === null) return sum(hash, "null");
1383
- if (value === void 0) return sum(hash, "undefined");
1384
- if (isObject(value) || isFunction(value)) {
1385
- if (seen.includes(value)) return sum(hash, `[Circular]${key}`);
1386
- seen.push(value);
1387
- hash = Object.keys(value).sort().reduce((hash, key) => baseSumHash(hash, value[key], key, seen), hash);
1388
- if (isFunction(value.valueOf)) return sum(hash, String(value.valueOf()));
1389
- return hash;
1390
- }
1391
- return sum(hash, value.toString());
1392
- }
1393
- return baseSumHash(0, value, "", []).toString(16).padStart(8, "0");
1394
- }
1395
- function mean(arr) {
1396
- return sum$1(arr) / arr.length;
1397
- }
1398
- function meanBy(arr, fn) {
1399
- return sumBy(arr, fn) / arr.length;
1400
- }
1401
- function sample(arr) {
1402
- if (!arr.length) return;
1403
- return arr[randomNumber(0, arr.length - 1)];
1404
- }
1405
- function round$2(val, precision = 0) {
1406
- return baseRound(val, precision, Math.round);
1407
- }
1408
394
  function baseRound(val, precision, fn) {
1409
395
  precision = clamp$1(precision ?? 0, -292, 292);
1410
396
  if (!precision) return fn(val);
@@ -1413,161 +399,6 @@ function baseRound(val, precision, fn) {
1413
399
  function floor$1(val, precision = 0) {
1414
400
  return baseRound(val, precision, Math.floor);
1415
401
  }
1416
- function ceil$1(val, precision = 0) {
1417
- return baseRound(val, precision, Math.ceil);
1418
- }
1419
- __reExport(/* @__PURE__ */ __exportAll({
1420
- NOOP: () => NOOP,
1421
- assert: () => assert$1,
1422
- at: () => at,
1423
- baseRound: () => baseRound,
1424
- buildNavigationUrl: () => buildNavigationUrl,
1425
- call: () => call,
1426
- callOrReturn: () => callOrReturn,
1427
- camelize: () => camelize,
1428
- cancelAnimationFrame: () => cancelAnimationFrame,
1429
- ceil: () => ceil$1,
1430
- chunk: () => chunk,
1431
- clamp: () => clamp$1,
1432
- clampArrayRange: () => clampArrayRange,
1433
- classes: () => classes$81,
1434
- cloneDeep: () => cloneDeep,
1435
- cloneDeepWith: () => cloneDeepWith,
1436
- copyText: () => copyText,
1437
- createCacheManager: () => createCacheManager,
1438
- createCookieStorage: () => createCookieStorage,
1439
- createNamespaceFn: () => createNamespaceFn,
1440
- createStorage: () => createStorage,
1441
- debounce: () => debounce$1,
1442
- delay: () => delay,
1443
- difference: () => difference,
1444
- differenceWith: () => differenceWith,
1445
- doubleRaf: () => doubleRaf,
1446
- download: () => download,
1447
- duration: () => duration,
1448
- ensurePrefix: () => ensurePrefix,
1449
- ensureSuffix: () => ensureSuffix,
1450
- enumOf: () => enumOf,
1451
- find: () => find,
1452
- floor: () => floor$1,
1453
- genNumberKey: () => genNumberKey,
1454
- genStringKey: () => genStringKey,
1455
- getAllParentScroller: () => getAllParentScroller$1,
1456
- getGlobalThis: () => getGlobalThis,
1457
- getParentScroller: () => getParentScroller$1,
1458
- getRect: () => getRect,
1459
- getScrollLeft: () => getScrollLeft,
1460
- getScrollTop: () => getScrollTop,
1461
- getStyle: () => getStyle$1,
1462
- groupBy: () => groupBy,
1463
- hasDuplicates: () => hasDuplicates,
1464
- hasDuplicatesBy: () => hasDuplicatesBy,
1465
- hasOwn: () => hasOwn,
1466
- inBrowser: () => inBrowser,
1467
- inMobile: () => inMobile,
1468
- inViewport: () => inViewport,
1469
- intersection: () => intersection,
1470
- intersectionWith: () => intersectionWith,
1471
- isArray: () => isArray,
1472
- isArrayBuffer: () => isArrayBuffer,
1473
- isBlob: () => isBlob,
1474
- isBoolean: () => isBoolean,
1475
- isDOMException: () => isDOMException,
1476
- isDataView: () => isDataView,
1477
- isDate: () => isDate,
1478
- isEmpty: () => isEmpty,
1479
- isEmptyPlainObject: () => isEmptyPlainObject,
1480
- isEqual: () => isEqual,
1481
- isEqualWith: () => isEqualWith,
1482
- isError: () => isError,
1483
- isFile: () => isFile,
1484
- isFunction: () => isFunction,
1485
- isMap: () => isMap,
1486
- isNonEmptyArray: () => isNonEmptyArray,
1487
- isNullish: () => isNullish,
1488
- isNumber: () => isNumber,
1489
- isNumeric: () => isNumeric,
1490
- isObject: () => isObject,
1491
- isPlainObject: () => isPlainObject,
1492
- isPrimitive: () => isPrimitive,
1493
- isPromise: () => isPromise,
1494
- isRegExp: () => isRegExp,
1495
- isSet: () => isSet,
1496
- isString: () => isString,
1497
- isSymbol: () => isSymbol,
1498
- isTruthy: () => isTruthy,
1499
- isTypedArray: () => isTypedArray,
1500
- isWeakMap: () => isWeakMap,
1501
- isWeakSet: () => isWeakSet,
1502
- isWindow: () => isWindow,
1503
- kebabCase: () => kebabCase,
1504
- localStorage: () => localStorage,
1505
- lowerFirst: () => lowerFirst,
1506
- mapObject: () => mapObject,
1507
- maskString: () => maskString,
1508
- maxBy: () => maxBy,
1509
- mean: () => mean,
1510
- meanBy: () => meanBy,
1511
- merge: () => merge$1,
1512
- mergeWith: () => mergeWith,
1513
- minBy: () => minBy,
1514
- mitt: () => mitt_default,
1515
- motion: () => motion,
1516
- navigation: () => navigation,
1517
- normalizeToArray: () => normalizeToArray,
1518
- objectEntries: () => objectEntries,
1519
- objectKeys: () => objectKeys,
1520
- objectToString: () => objectToString,
1521
- omit: () => omit,
1522
- omitBy: () => omitBy,
1523
- once: () => once,
1524
- pascalCase: () => pascalCase,
1525
- pick: () => pick,
1526
- pickBy: () => pickBy,
1527
- prettyJSONObject: () => prettyJSONObject,
1528
- preventDefault: () => preventDefault,
1529
- promiseWithResolvers: () => promiseWithResolvers,
1530
- raf: () => raf,
1531
- randomColor: () => randomColor,
1532
- randomNumber: () => randomNumber,
1533
- randomString: () => randomString,
1534
- rekey: () => rekey,
1535
- removeArrayBlank: () => removeArrayBlank,
1536
- removeArrayEmpty: () => removeArrayEmpty,
1537
- removeItem: () => removeItem,
1538
- removeItemBy: () => removeItemBy,
1539
- removeItemsBy: () => removeItemsBy,
1540
- requestAnimationFrame: () => requestAnimationFrame$1,
1541
- round: () => round$2,
1542
- sample: () => sample,
1543
- sessionStorage: () => sessionStorage,
1544
- set: () => set,
1545
- shuffle: () => shuffle,
1546
- slash: () => slash,
1547
- sum: () => sum$1,
1548
- sumBy: () => sumBy,
1549
- sumHash: () => sumHash,
1550
- supportTouch: () => supportTouch,
1551
- throttle: () => throttle,
1552
- times: () => times,
1553
- toArrayBuffer: () => toArrayBuffer,
1554
- toDataURL: () => toDataURL,
1555
- toNumber: () => toNumber,
1556
- toRawType: () => toRawType,
1557
- toText: () => toText,
1558
- toTypeString: () => toTypeString,
1559
- toggleItem: () => toggleItem,
1560
- tryAsyncCall: () => tryAsyncCall,
1561
- tryCall: () => tryCall,
1562
- tryParseJSON: () => tryParseJSON,
1563
- uniq: () => uniq,
1564
- uniqBy: () => uniqBy,
1565
- upperFirst: () => upperFirst,
1566
- uuid: () => v4,
1567
- uuidV6: () => v6,
1568
- xor: () => xor,
1569
- xorWith: () => xorWith
1570
- }), integrated_exports);
1571
402
  //#endregion
1572
403
  //#region ../varlet-shared/lib/index.js
1573
404
  function assert(condition, source, message) {
@@ -29595,7 +28426,7 @@ var _WatermarkComponent = stdin_default$102;
29595
28426
  var stdin_default$96 = stdin_default$102;
29596
28427
  //#endregion
29597
28428
  //#region es/index.bundle.mjs
29598
- var version = "3.17.0";
28429
+ var version = "3.17.1";
29599
28430
  function install(app) {
29600
28431
  stdin_default.install && app.use(stdin_default);
29601
28432
  stdin_default$1.install && app.use(stdin_default$1);