@kupola/kupola 1.7.0 → 1.7.2

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.
@@ -1,4 +1,4 @@
1
- class ht {
1
+ class ut {
2
2
  constructor(t = "app") {
3
3
  this.scope = t, this.hooks = /* @__PURE__ */ new Map(), this.state = "created", this.stateHistory = ["created"], this.transitions = /* @__PURE__ */ new Map([
4
4
  ["created", ["bootstrapped", "destroyed"]],
@@ -201,123 +201,123 @@ class ht {
201
201
  console.error(`[KupolaLifecycle] Unhandled error in ${t.phase}:`, t.error);
202
202
  }
203
203
  }
204
- const Ta = new ht("app");
205
- function Aa(i = "app") {
206
- return new ht(i);
204
+ const Ba = new ut("app");
205
+ function qa(i = "app") {
206
+ return new ut(i);
207
207
  }
208
- const Le = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
209
- function Q(i) {
210
- return Le.has(i);
208
+ const Ie = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
209
+ function et(i) {
210
+ return Ie.has(i);
211
211
  }
212
- function De(i) {
212
+ function Te(i) {
213
213
  return i ? i.trim() : "";
214
214
  }
215
- function He(i) {
215
+ function Ae(i) {
216
216
  return i ? i.replace(/^\s+/, "") : "";
217
217
  }
218
- function Me(i) {
218
+ function ze(i) {
219
219
  return i ? i.replace(/\s+$/, "") : "";
220
220
  }
221
- function Ie(i) {
221
+ function Pe(i) {
222
222
  return i ? i.toUpperCase() : "";
223
223
  }
224
- function Te(i) {
224
+ function $e(i) {
225
225
  return i ? i.toLowerCase() : "";
226
226
  }
227
- function Ae(i) {
227
+ function Be(i) {
228
228
  return i ? i.charAt(0).toUpperCase() + i.slice(1) : "";
229
229
  }
230
- function ze(i) {
230
+ function qe(i) {
231
231
  return i ? i.replace(/-(\w)/g, (t, e) => e ? e.toUpperCase() : "") : "";
232
232
  }
233
- function Pe(i) {
233
+ function Oe(i) {
234
234
  return i ? i.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "") : "";
235
235
  }
236
- function $e(i, t, e = " ") {
236
+ function Fe(i, t, e = " ") {
237
237
  return (String(i) || "").padStart(t, e);
238
238
  }
239
- function Be(i, t, e = " ") {
239
+ function Ne(i, t, e = " ") {
240
240
  return (String(i) || "").padEnd(t, e);
241
241
  }
242
- function qe(i, t, e = "...") {
242
+ function Re(i, t, e = "...") {
243
243
  return !i || i.length <= t ? i || "" : i.slice(0, t) + e;
244
244
  }
245
- function Oe(i, t, e) {
245
+ function Ve(i, t, e) {
246
246
  return i ? i.split(t).join(e) : "";
247
247
  }
248
- function Fe(i, t) {
248
+ function Ke(i, t) {
249
249
  return i ? i.replace(/\{\{(\w+)\}\}/g, (e, s) => t[s] !== void 0 ? t[s] : `{{${s}}}`) : "";
250
250
  }
251
- function Ne(i, t) {
251
+ function We(i, t) {
252
252
  return (i || "").startsWith(t);
253
253
  }
254
- function Re(i, t) {
254
+ function Ue(i, t) {
255
255
  return (i || "").endsWith(t);
256
256
  }
257
- function Ve(i, t) {
257
+ function Ye(i, t) {
258
258
  return (i || "").includes(t);
259
259
  }
260
- function Ke(i, t) {
260
+ function Xe(i, t) {
261
261
  return (i || "").repeat(t);
262
262
  }
263
- function We(i) {
263
+ function je(i) {
264
264
  return (i || "").split("").reverse().join("");
265
265
  }
266
- function Ue(i, t) {
266
+ function Je(i, t) {
267
267
  return !i || !t ? 0 : i.split(t).length - 1;
268
268
  }
269
- function Ye(i) {
269
+ function Ze(i) {
270
270
  if (!i) return "";
271
271
  const t = document.createElement("div");
272
272
  return t.textContent = i, t.innerHTML;
273
273
  }
274
- function Xe(i) {
274
+ function Ge(i) {
275
275
  if (!i) return "";
276
276
  const t = document.createElement("div");
277
277
  return t.innerHTML = i, t.textContent;
278
278
  }
279
- function je(i = 8) {
279
+ function Qe(i = 8) {
280
280
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
281
281
  let e = "";
282
282
  for (let s = 0; s < i; s++)
283
283
  e += t.charAt(Math.floor(Math.random() * t.length));
284
284
  return e;
285
285
  }
286
- function Je() {
286
+ function ts() {
287
287
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (i) => {
288
288
  const t = Math.random() * 16 | 0;
289
289
  return (i === "x" ? t : t & 3 | 8).toString(16);
290
290
  });
291
291
  }
292
- const Ze = { trim: De, trimLeft: He, trimRight: Me, toUpperCase: Ie, toLowerCase: Te, capitalize: Ae, camelize: ze, hyphenate: Pe, padStart: $e, padEnd: Be, truncate: qe, replaceAll: Oe, format: Fe, startsWith: Ne, endsWith: Re, includes: Ve, repeat: Ke, reverse: We, countOccurrences: Ue, escapeHtml: Ye, unescapeHtml: Xe, generateRandom: je, generateUUID: Je };
293
- function Ge(i) {
292
+ const es = { trim: Te, trimLeft: Ae, trimRight: ze, toUpperCase: Pe, toLowerCase: $e, capitalize: Be, camelize: qe, hyphenate: Oe, padStart: Fe, padEnd: Ne, truncate: Re, replaceAll: Ve, format: Ke, startsWith: We, endsWith: Ue, includes: Ye, repeat: Xe, reverse: je, countOccurrences: Je, escapeHtml: Ze, unescapeHtml: Ge, generateRandom: Qe, generateUUID: ts };
293
+ function ss(i) {
294
294
  return Array.isArray(i);
295
295
  }
296
- function Qe(i) {
296
+ function is(i) {
297
297
  return !i || i.length === 0;
298
298
  }
299
- function ts(i) {
299
+ function ns(i) {
300
300
  return i ? i.length : 0;
301
301
  }
302
- function es(i, t) {
302
+ function rs(i, t) {
303
303
  return i && i.length > 0 ? i[0] : t;
304
304
  }
305
- function ss(i, t) {
305
+ function as(i, t) {
306
306
  return i && i.length > 0 ? i[i.length - 1] : t;
307
307
  }
308
- function is(i, t, e) {
308
+ function os(i, t, e) {
309
309
  return i && i[t] !== void 0 ? i[t] : e;
310
310
  }
311
- function ns(i, t, e) {
311
+ function ls(i, t, e) {
312
312
  return i ? i.slice(t, e) : [];
313
313
  }
314
- function rs(...i) {
314
+ function cs(...i) {
315
315
  return i.reduce((t, e) => t.concat(e || []), []);
316
316
  }
317
- function as(i, t = ",") {
317
+ function hs(i, t = ",") {
318
318
  return i ? i.join(t) : "";
319
319
  }
320
- function os(i, t, e = 0) {
320
+ function ds(i, t, e = 0) {
321
321
  if (!i) return -1;
322
322
  if (Number.isNaN(t)) {
323
323
  for (let s = e; s < i.length; s++)
@@ -326,7 +326,7 @@ function os(i, t, e = 0) {
326
326
  }
327
327
  return i.indexOf(t, e);
328
328
  }
329
- function ls(i, t, e) {
329
+ function us(i, t, e) {
330
330
  if (!i) return -1;
331
331
  if (Number.isNaN(t)) {
332
332
  const s = e !== void 0 ? e : i.length - 1;
@@ -336,78 +336,78 @@ function ls(i, t, e) {
336
336
  }
337
337
  return i.lastIndexOf(t, e);
338
338
  }
339
- function cs(i, t) {
339
+ function ps(i, t) {
340
340
  return i ? i.includes(t) : !1;
341
341
  }
342
- function hs(i, ...t) {
342
+ function fs(i, ...t) {
343
343
  return i && i.push(...t), i;
344
344
  }
345
- function ds(i) {
345
+ function ms(i) {
346
346
  return i ? i.pop() : void 0;
347
347
  }
348
- function us(i) {
348
+ function gs(i) {
349
349
  return i ? i.shift() : void 0;
350
350
  }
351
- function ps(i, ...t) {
351
+ function _s(i, ...t) {
352
352
  return i && i.unshift(...t), i;
353
353
  }
354
- function fs(i, t) {
354
+ function ys(i, t) {
355
355
  if (!i) return i;
356
356
  const e = Number.isNaN(t) ? i.findIndex((s) => Number.isNaN(s)) : i.indexOf(t);
357
357
  return e > -1 && i.splice(e, 1), i;
358
358
  }
359
- function ms(i, t) {
359
+ function vs(i, t) {
360
360
  return !i || t < 0 || t >= i.length || i.splice(t, 1), i;
361
361
  }
362
- function gs(i, t, e) {
362
+ function bs(i, t, e) {
363
363
  return i && (i.splice(t, 0, e), i);
364
364
  }
365
- function _s(i) {
365
+ function xs(i) {
366
366
  return i ? i.slice().reverse() : [];
367
367
  }
368
- function ys(i, t) {
368
+ function Es(i, t) {
369
369
  return i ? i.slice().sort(t) : [];
370
370
  }
371
- function vs(i, t, e = "asc") {
371
+ function ws(i, t, e = "asc") {
372
372
  return i ? i.slice().sort((s, n) => {
373
373
  const r = typeof s == "object" ? s[t] : s, a = typeof n == "object" ? n[t] : n;
374
374
  return r < a ? e === "asc" ? -1 : 1 : r > a ? e === "asc" ? 1 : -1 : 0;
375
375
  }) : [];
376
376
  }
377
- function bs(i, t) {
377
+ function ks(i, t) {
378
378
  return i ? i.filter(t) : [];
379
379
  }
380
- function xs(i, t) {
380
+ function Cs(i, t) {
381
381
  return i ? i.map(t) : [];
382
382
  }
383
- function Es(i, t, e) {
383
+ function Ss(i, t, e) {
384
384
  return i ? i.reduce(t, e) : e;
385
385
  }
386
- function ws(i, t) {
386
+ function Ls(i, t) {
387
387
  i && i.forEach(t);
388
388
  }
389
- function ks(i, t) {
389
+ function Ds(i, t) {
390
390
  return i ? i.every(t) : !0;
391
391
  }
392
- function Cs(i, t) {
392
+ function Hs(i, t) {
393
393
  return i ? i.some(t) : !1;
394
394
  }
395
- function Ss(i, t) {
395
+ function Ms(i, t) {
396
396
  return i ? i.find(t) : void 0;
397
397
  }
398
- function Ls(i, t) {
398
+ function Is(i, t) {
399
399
  return i ? i.findIndex(t) : -1;
400
400
  }
401
- function Ds(i, t = 1) {
401
+ function Ts(i, t = 1) {
402
402
  return i ? i.flat(t) : [];
403
403
  }
404
- function Lt(i) {
405
- return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(Lt(e)) : t.concat(e), []) : [];
404
+ function It(i) {
405
+ return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(It(e)) : t.concat(e), []) : [];
406
406
  }
407
- function Hs(i) {
407
+ function As(i) {
408
408
  return i ? [...new Set(i)] : [];
409
409
  }
410
- function Ms(i, t) {
410
+ function zs(i, t) {
411
411
  if (!i) return [];
412
412
  const e = /* @__PURE__ */ new Set();
413
413
  return i.filter((s) => {
@@ -415,14 +415,14 @@ function Ms(i, t) {
415
415
  return e.has(n) ? !1 : (e.add(n), !0);
416
416
  });
417
417
  }
418
- function Is(i, t) {
418
+ function Ps(i, t) {
419
419
  if (!i || t <= 0) return [];
420
420
  const e = [];
421
421
  for (let s = 0; s < i.length; s += t)
422
422
  e.push(i.slice(s, s + t));
423
423
  return e;
424
424
  }
425
- function Ts(i) {
425
+ function $s(i) {
426
426
  if (!i) return [];
427
427
  const t = i.slice();
428
428
  for (let e = t.length - 1; e > 0; e--) {
@@ -431,78 +431,78 @@ function Ts(i) {
431
431
  }
432
432
  return t;
433
433
  }
434
- function Dt(i) {
434
+ function Tt(i) {
435
435
  return i ? i.reduce((t, e) => t + (Number(e) || 0), 0) : 0;
436
436
  }
437
- function As(i) {
438
- return !i || i.length === 0 ? 0 : Dt(i) / i.length;
437
+ function Bs(i) {
438
+ return !i || i.length === 0 ? 0 : Tt(i) / i.length;
439
439
  }
440
- function zs(i) {
440
+ function qs(i) {
441
441
  return i && i.length > 0 ? Math.max(...i) : -1 / 0;
442
442
  }
443
- function Ps(i) {
443
+ function Os(i) {
444
444
  return i && i.length > 0 ? Math.min(...i) : 1 / 0;
445
445
  }
446
- function $s(...i) {
446
+ function Fs(...i) {
447
447
  return i.length === 0 ? [] : i.reduce((t, e) => t.filter((s) => e && e.includes(s)));
448
448
  }
449
- function Bs(...i) {
449
+ function Ns(...i) {
450
450
  return [...new Set(i.flat().filter(Boolean))];
451
451
  }
452
- function qs(i, t) {
452
+ function Rs(i, t) {
453
453
  return i ? i.filter((e) => !t || !t.includes(e)) : [];
454
454
  }
455
- function Os(...i) {
455
+ function Vs(...i) {
456
456
  if (i.length === 0) return [];
457
457
  const t = Math.max(...i.map((e) => e ? e.length : 0));
458
458
  return Array.from({ length: t }, (e, s) => i.map((n) => n && n[s]));
459
459
  }
460
- const Fs = { isArray: Ge, isEmpty: Qe, size: ts, first: es, last: ss, get: is, slice: ns, concat: rs, join: as, indexOf: os, lastIndexOf: ls, includes: cs, push: hs, pop: ds, shift: us, unshift: ps, remove: fs, removeAt: ms, insert: gs, reverse: _s, sort: ys, sortBy: vs, filter: bs, map: xs, reduce: Es, forEach: ws, every: ks, some: Cs, find: Ss, findIndex: Ls, flat: Ds, flattenDeep: Lt, unique: Hs, uniqueBy: Ms, chunk: Is, shuffle: Ts, sum: Dt, average: As, max: zs, min: Ps, intersection: $s, union: Bs, difference: qs, zip: Os };
461
- function rt(i) {
460
+ const Ks = { isArray: ss, isEmpty: is, size: ns, first: rs, last: as, get: os, slice: ls, concat: cs, join: hs, indexOf: ds, lastIndexOf: us, includes: ps, push: fs, pop: ms, shift: gs, unshift: _s, remove: ys, removeAt: vs, insert: bs, reverse: xs, sort: Es, sortBy: ws, filter: ks, map: Cs, reduce: Ss, forEach: Ls, every: Ds, some: Hs, find: Ms, findIndex: Is, flat: Ts, flattenDeep: It, unique: As, uniqueBy: zs, chunk: Ps, shuffle: $s, sum: Tt, average: Bs, max: qs, min: Os, intersection: Fs, union: Ns, difference: Rs, zip: Vs };
461
+ function ot(i) {
462
462
  return i !== null && typeof i == "object" && !Array.isArray(i);
463
463
  }
464
- function Ns(i) {
464
+ function Ws(i) {
465
465
  return !i || typeof i != "object" ? !0 : Object.keys(i).length === 0;
466
466
  }
467
- function Rs(i) {
467
+ function Us(i) {
468
468
  return i ? Object.keys(i) : [];
469
469
  }
470
- function Vs(i) {
470
+ function Ys(i) {
471
471
  return i ? Object.values(i) : [];
472
472
  }
473
- function Ks(i) {
473
+ function Xs(i) {
474
474
  return i ? Object.entries(i) : [];
475
475
  }
476
- function Ws(i, t) {
476
+ function js(i, t) {
477
477
  return i ? Object.prototype.hasOwnProperty.call(i, t) : !1;
478
478
  }
479
- function Us(i, t, e) {
479
+ function Js(i, t, e) {
480
480
  if (!i) return e;
481
481
  const s = t.split(".");
482
- return s.some(Q) ? e : s.reduce((n, r) => n && n[r], i) ?? e;
482
+ return s.some(et) ? e : s.reduce((n, r) => n && n[r], i) ?? e;
483
483
  }
484
- function Ys(i, t, e) {
484
+ function Zs(i, t, e) {
485
485
  if (!i || typeof i != "object") return i;
486
486
  const s = t.split(".");
487
- if (s.some(Q)) return i;
487
+ if (s.some(et)) return i;
488
488
  const n = s.pop();
489
489
  let r = i;
490
490
  return s.forEach((a) => {
491
491
  (!r[a] || typeof r[a] != "object") && (r[a] = {}), r = r[a];
492
492
  }), r[n] = e, i;
493
493
  }
494
- function Xs(i, t) {
494
+ function Gs(i, t) {
495
495
  return i ? t.reduce((e, s) => (i[s] !== void 0 && (e[s] = i[s]), e), {}) : {};
496
496
  }
497
- function js(i, t) {
497
+ function Qs(i, t) {
498
498
  return i ? Object.keys(i).reduce((e, s) => (t.includes(s) || (e[s] = i[s]), e), {}) : {};
499
499
  }
500
- function Ht(...i) {
500
+ function At(...i) {
501
501
  return i.reduce((t, e) => (e && typeof e == "object" && Object.keys(e).forEach((s) => {
502
- Q(s) || (rt(e[s]) && rt(t[s]) ? t[s] = Ht(t[s], e[s]) : t[s] = e[s]);
502
+ et(s) || (ot(e[s]) && ot(t[s]) ? t[s] = At(t[s], e[s]) : t[s] = e[s]);
503
503
  }), t), {});
504
504
  }
505
- function Js(i) {
505
+ function ti(i) {
506
506
  return i && JSON.parse(JSON.stringify(i));
507
507
  }
508
508
  function Y(i, t = /* @__PURE__ */ new WeakMap()) {
@@ -524,299 +524,299 @@ function Y(i, t = /* @__PURE__ */ new WeakMap()) {
524
524
  }
525
525
  const e = {};
526
526
  return t.set(i, e), Object.keys(i).forEach((s) => {
527
- Q(s) || (e[s] = Y(i[s], t));
527
+ et(s) || (e[s] = Y(i[s], t));
528
528
  }), e;
529
529
  }
530
- function Zs(i, t) {
530
+ function ei(i, t) {
531
531
  i && Object.keys(i).forEach((e) => t(i[e], e, i));
532
532
  }
533
- function Gs(i, t) {
533
+ function si(i, t) {
534
534
  if (!i) return {};
535
535
  const e = {};
536
536
  return Object.keys(i).forEach((s) => {
537
537
  e[s] = t(i[s], s, i);
538
538
  }), e;
539
539
  }
540
- function Qs(i, t) {
540
+ function ii(i, t) {
541
541
  if (!i) return {};
542
542
  const e = {};
543
543
  return Object.keys(i).forEach((s) => {
544
544
  t(i[s], s, i) && (e[s] = i[s]);
545
545
  }), e;
546
546
  }
547
- function ti(i, t, e) {
547
+ function ni(i, t, e) {
548
548
  return i ? Object.keys(i).reduce((s, n) => t(s, i[n], n, i), e) : e;
549
549
  }
550
- function ei(i) {
550
+ function ri(i) {
551
551
  return i ? Object.keys(i).map((t) => ({ key: t, value: i[t] })) : [];
552
552
  }
553
- function si(i, t, e) {
553
+ function ai(i, t, e) {
554
554
  return i ? i.reduce((s, n) => {
555
555
  const r = typeof n == "object" ? n[t] : n, a = e ? n[e] : n;
556
556
  return r !== void 0 && (s[r] = a), s;
557
557
  }, {}) : {};
558
558
  }
559
- function ii(i) {
559
+ function oi(i) {
560
560
  return i ? Object.keys(i).length : 0;
561
561
  }
562
- function ni(i) {
562
+ function li(i) {
563
563
  if (!i) return {};
564
564
  const t = {};
565
565
  return Object.keys(i).forEach((e) => {
566
566
  t[i[e]] = e;
567
567
  }), t;
568
568
  }
569
- function Mt(i, t) {
569
+ function zt(i, t) {
570
570
  if (i === t) return !0;
571
571
  if (!i || !t || typeof i != "object" || typeof t != "object") return !1;
572
572
  const e = Object.keys(i), s = Object.keys(t);
573
- return e.length !== s.length ? !1 : e.every((n) => Mt(i[n], t[n]));
573
+ return e.length !== s.length ? !1 : e.every((n) => zt(i[n], t[n]));
574
574
  }
575
- function It(i) {
575
+ function Pt(i) {
576
576
  return i && (Object.freeze(i), Object.keys(i).forEach((t) => {
577
- typeof i[t] == "object" && It(i[t]);
577
+ typeof i[t] == "object" && Pt(i[t]);
578
578
  }), i);
579
579
  }
580
- function ri(i) {
580
+ function ci(i) {
581
581
  return i && Object.seal(i);
582
582
  }
583
- const ai = { isObject: rt, isEmpty: Ns, keys: Rs, values: Vs, entries: Ks, has: Ws, get: Us, set: Ys, pick: Xs, omit: js, merge: Ht, clone: Js, deepClone: Y, forEach: Zs, map: Gs, filter: Qs, reduce: ti, toArray: ei, fromArray: si, size: ii, invert: ni, isEqual: Mt, freeze: It, seal: ri };
583
+ const hi = { isObject: ot, isEmpty: Ws, keys: Us, values: Ys, entries: Xs, has: js, get: Js, set: Zs, pick: Gs, omit: Qs, merge: At, clone: ti, deepClone: Y, forEach: ei, map: si, filter: ii, reduce: ni, toArray: ri, fromArray: ai, size: oi, invert: li, isEqual: zt, freeze: Pt, seal: ci };
584
584
  function L(i) {
585
585
  return typeof i == "number" && !isNaN(i);
586
586
  }
587
- function oi(i) {
587
+ function di(i) {
588
588
  return Number.isInteger(i);
589
589
  }
590
- function li(i) {
590
+ function ui(i) {
591
591
  return L(i) && !Number.isInteger(i);
592
592
  }
593
- function ci(i) {
593
+ function pi(i) {
594
594
  return L(i) && i > 0;
595
595
  }
596
- function hi(i) {
596
+ function fi(i) {
597
597
  return L(i) && i < 0;
598
598
  }
599
- function di(i) {
599
+ function mi(i) {
600
600
  return L(i) && i === 0;
601
601
  }
602
- function ui(i, t, e) {
602
+ function gi(i, t, e) {
603
603
  return L(i) ? Math.min(Math.max(i, t), e) : i;
604
604
  }
605
- function pi(i, t = 0) {
605
+ function _i(i, t = 0) {
606
606
  if (!L(i)) return i;
607
607
  const e = Math.pow(10, t);
608
608
  return Math.round(i * e) / e;
609
609
  }
610
- function fi(i) {
610
+ function yi(i) {
611
611
  return L(i) ? Math.floor(i) : i;
612
612
  }
613
- function mi(i) {
613
+ function vi(i) {
614
614
  return L(i) ? Math.ceil(i) : i;
615
615
  }
616
- function gi(i) {
616
+ function bi(i) {
617
617
  return L(i) ? Math.abs(i) : i;
618
618
  }
619
- function _i(...i) {
619
+ function xi(...i) {
620
620
  const t = i.filter(L);
621
621
  return t.length > 0 ? Math.min(...t) : void 0;
622
622
  }
623
- function yi(...i) {
623
+ function Ei(...i) {
624
624
  const t = i.filter(L);
625
625
  return t.length > 0 ? Math.max(...t) : void 0;
626
626
  }
627
- function Tt(...i) {
627
+ function $t(...i) {
628
628
  return i.flat().filter(L).reduce((e, s) => e + s, 0);
629
629
  }
630
- function vi(...i) {
630
+ function wi(...i) {
631
631
  const t = i.flat().filter(L);
632
- return t.length > 0 ? Tt(t) / t.length : 0;
632
+ return t.length > 0 ? $t(t) / t.length : 0;
633
633
  }
634
- function At(i = 0, t = 1) {
634
+ function Bt(i = 0, t = 1) {
635
635
  return Math.random() * (t - i) + i;
636
636
  }
637
- function bi(i, t) {
638
- return Math.floor(At(i, t + 1));
637
+ function ki(i, t) {
638
+ return Math.floor(Bt(i, t + 1));
639
639
  }
640
- function xi(i, t = 2) {
640
+ function Ci(i, t = 2) {
641
641
  return L(i) ? i.toFixed(t) : String(i);
642
642
  }
643
- function Ei(i, t = "CNY", e = 2) {
643
+ function Si(i, t = "CNY", e = 2) {
644
644
  return L(i) ? new Intl.NumberFormat("zh-CN", { style: "currency", currency: t, minimumFractionDigits: e, maximumFractionDigits: e }).format(i) : String(i);
645
645
  }
646
- function wi(i, t = 0) {
646
+ function Li(i, t = 0) {
647
647
  return L(i) ? `${(i * 100).toFixed(t)}%` : String(i);
648
648
  }
649
- function ki(i, t = 0) {
649
+ function Di(i, t = 0) {
650
650
  return L(i) ? i.toFixed(t) : String(i);
651
651
  }
652
- function Ci(i, t = 6) {
652
+ function Hi(i, t = 6) {
653
653
  return L(i) ? i.toPrecision(t) : String(i);
654
654
  }
655
- function Si(i) {
655
+ function Mi(i) {
656
656
  return Number.isNaN(i);
657
657
  }
658
- function Li(i) {
658
+ function Ii(i) {
659
659
  return Number.isFinite(i);
660
660
  }
661
- function Di(i, t = 10) {
661
+ function Ti(i, t = 10) {
662
662
  return Number.parseInt(i, t);
663
663
  }
664
- function Hi(i) {
664
+ function Ai(i) {
665
665
  return Number.parseFloat(i);
666
666
  }
667
- function Mi(i, t = 0) {
667
+ function zi(i, t = 0) {
668
668
  const e = Number(i);
669
669
  return isNaN(e) ? t : e;
670
670
  }
671
- function Ii(i, t, e = 0) {
671
+ function Pi(i, t, e = 0) {
672
672
  return !L(i) || !L(t) || t === 0 ? e : i / t;
673
673
  }
674
- function Ti(...i) {
674
+ function $i(...i) {
675
675
  return i.reduce((t, e) => !L(t) || !L(e) ? 0 : t * e, 1);
676
676
  }
677
- const Ai = { isNumber: L, isInteger: oi, isFloat: li, isPositive: ci, isNegative: hi, isZero: di, clamp: ui, round: pi, floor: fi, ceil: mi, abs: gi, min: _i, max: yi, sum: Tt, average: vi, random: At, randomInt: bi, format: xi, formatCurrency: Ei, formatPercent: wi, toFixed: ki, toPrecision: Ci, isNaN: Si, isFinite: Li, parseInt: Di, parseFloat: Hi, toNumber: Mi, safeDivide: Ii, safeMultiply: Ti };
678
- function tt() {
677
+ const Bi = { isNumber: L, isInteger: di, isFloat: ui, isPositive: pi, isNegative: fi, isZero: mi, clamp: gi, round: _i, floor: yi, ceil: vi, abs: bi, min: xi, max: Ei, sum: $t, average: wi, random: Bt, randomInt: ki, format: Ci, formatCurrency: Si, formatPercent: Li, toFixed: Di, toPrecision: Hi, isNaN: Mi, isFinite: Ii, parseInt: Ti, parseFloat: Ai, toNumber: zi, safeDivide: Pi, safeMultiply: $i };
678
+ function st() {
679
679
  return Date.now();
680
680
  }
681
681
  function K() {
682
682
  const i = /* @__PURE__ */ new Date();
683
683
  return i.setHours(0, 0, 0, 0), i;
684
684
  }
685
- function zi() {
685
+ function qi() {
686
686
  const i = K();
687
687
  return i.setDate(i.getDate() + 1), i;
688
688
  }
689
- function Pi() {
689
+ function Oi() {
690
690
  const i = K();
691
691
  return i.setDate(i.getDate() - 1), i;
692
692
  }
693
693
  function w(i) {
694
694
  return i instanceof Date && !isNaN(i.getTime());
695
695
  }
696
- function zt(i) {
696
+ function qt(i) {
697
697
  return w(i);
698
698
  }
699
- function $i(i) {
699
+ function Fi(i) {
700
700
  const t = new Date(i);
701
- return zt(t) ? t : null;
701
+ return qt(t) ? t : null;
702
702
  }
703
- function Bi(i, t = "YYYY-MM-DD HH:mm:ss") {
703
+ function Ni(i, t = "YYYY-MM-DD HH:mm:ss") {
704
704
  if (!w(i)) return "";
705
705
  const e = i.getFullYear(), s = String(i.getMonth() + 1).padStart(2, "0"), n = String(i.getDate()).padStart(2, "0"), r = String(i.getHours()).padStart(2, "0"), a = String(i.getMinutes()).padStart(2, "0"), o = String(i.getSeconds()).padStart(2, "0"), l = String(i.getMilliseconds()).padStart(3, "0"), h = ["日", "一", "二", "三", "四", "五", "六"][i.getDay()];
706
706
  return t.replace("YYYY", e).replace("MM", s).replace("DD", n).replace("HH", r).replace("mm", a).replace("ss", o).replace("SSS", l).replace("D", i.getDate()).replace("M", i.getMonth() + 1).replace("H", i.getHours()).replace("m", i.getMinutes()).replace("s", i.getSeconds()).replace("W", h);
707
707
  }
708
- function qi(i) {
708
+ function Ri(i) {
709
709
  return w(i) ? i.toISOString() : "";
710
710
  }
711
- function Oi(i) {
711
+ function Vi(i) {
712
712
  return w(i) ? new Date(i.toUTCString()) : null;
713
713
  }
714
- function Fi(i, t) {
714
+ function Ki(i, t) {
715
715
  if (!w(i)) return i;
716
716
  const e = new Date(i);
717
717
  return e.setDate(e.getDate() + t), e;
718
718
  }
719
- function Ni(i, t) {
719
+ function Wi(i, t) {
720
720
  if (!w(i)) return i;
721
721
  const e = new Date(i);
722
722
  return e.setHours(e.getHours() + t), e;
723
723
  }
724
- function Ri(i, t) {
724
+ function Ui(i, t) {
725
725
  if (!w(i)) return i;
726
726
  const e = new Date(i);
727
727
  return e.setMinutes(e.getMinutes() + t), e;
728
728
  }
729
- function Vi(i, t) {
729
+ function Yi(i, t) {
730
730
  if (!w(i)) return i;
731
731
  const e = new Date(i);
732
732
  return e.setSeconds(e.getSeconds() + t), e;
733
733
  }
734
- function et(i, t) {
734
+ function it(i, t) {
735
735
  if (!w(i) || !w(t)) return 0;
736
736
  const e = new Date(i);
737
737
  e.setHours(0, 0, 0, 0);
738
738
  const s = new Date(t);
739
739
  return s.setHours(0, 0, 0, 0), Math.floor((e.getTime() - s.getTime()) / (1e3 * 60 * 60 * 24));
740
740
  }
741
- function Ki(i, t) {
741
+ function Xi(i, t) {
742
742
  return !w(i) || !w(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60 * 60));
743
743
  }
744
- function Wi(i, t) {
744
+ function ji(i, t) {
745
745
  return !w(i) || !w(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60));
746
746
  }
747
- function Ui(i, t) {
747
+ function Ji(i, t) {
748
748
  return !w(i) || !w(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / 1e3);
749
749
  }
750
- function Yi(i) {
751
- return w(i) ? et(i, K()) === 0 : !1;
750
+ function Zi(i) {
751
+ return w(i) ? it(i, K()) === 0 : !1;
752
752
  }
753
- function Xi(i) {
754
- return w(i) ? et(i, K()) === -1 : !1;
753
+ function Gi(i) {
754
+ return w(i) ? it(i, K()) === -1 : !1;
755
755
  }
756
- function ji(i) {
757
- return w(i) ? et(i, K()) === 1 : !1;
756
+ function Qi(i) {
757
+ return w(i) ? it(i, K()) === 1 : !1;
758
758
  }
759
- function Ji(i) {
760
- return w(i) ? i.getTime() > tt() : !1;
759
+ function tn(i) {
760
+ return w(i) ? i.getTime() > st() : !1;
761
761
  }
762
- function Zi(i) {
763
- return w(i) ? i.getTime() < tt() : !1;
762
+ function en(i) {
763
+ return w(i) ? i.getTime() < st() : !1;
764
764
  }
765
- function Gi(i) {
765
+ function sn(i) {
766
766
  if (!w(i)) return !1;
767
767
  const t = i.getFullYear();
768
768
  return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
769
769
  }
770
- function Qi(i) {
770
+ function nn(i) {
771
771
  return w(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0).getDate() : 0;
772
772
  }
773
- function tn(i) {
773
+ function rn(i) {
774
774
  if (!w(i)) return 0;
775
775
  const t = new Date(i.getFullYear(), 0, 1), e = i.getTime() - t.getTime();
776
776
  return Math.ceil(e / (1e3 * 60 * 60 * 24 * 7));
777
777
  }
778
- function en(i) {
778
+ function an(i) {
779
779
  return w(i) ? Math.ceil((i.getMonth() + 1) / 3) : 0;
780
780
  }
781
- function sn(i) {
781
+ function on(i) {
782
782
  if (!w(i)) return i;
783
783
  const t = new Date(i);
784
784
  return t.setHours(0, 0, 0, 0), t;
785
785
  }
786
- function nn(i) {
786
+ function ln(i) {
787
787
  if (!w(i)) return i;
788
788
  const t = new Date(i);
789
789
  return t.setHours(23, 59, 59, 999), t;
790
790
  }
791
- function rn(i) {
791
+ function cn(i) {
792
792
  return w(i) ? new Date(i.getFullYear(), i.getMonth(), 1) : i;
793
793
  }
794
- function an(i) {
794
+ function hn(i) {
795
795
  return w(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0, 23, 59, 59, 999) : i;
796
796
  }
797
- function Pt(i, t = 1) {
797
+ function Ot(i, t = 1) {
798
798
  if (!w(i)) return i;
799
799
  const e = new Date(i), s = e.getDay(), n = s >= t ? s - t : s + (7 - t);
800
800
  return e.setDate(e.getDate() - n), e.setHours(0, 0, 0, 0), e;
801
801
  }
802
- function on(i, t = 1) {
802
+ function dn(i, t = 1) {
803
803
  if (!w(i)) return i;
804
- const e = Pt(i, t), s = new Date(e);
804
+ const e = Ot(i, t), s = new Date(e);
805
805
  return s.setDate(s.getDate() + 6), s.setHours(23, 59, 59, 999), s;
806
806
  }
807
- function ln(i) {
807
+ function un(i) {
808
808
  if (!w(i)) return 0;
809
809
  const t = /* @__PURE__ */ new Date();
810
810
  let e = t.getFullYear() - i.getFullYear();
811
811
  return (t.getMonth() < i.getMonth() || t.getMonth() === i.getMonth() && t.getDate() < i.getDate()) && e--, Math.max(0, e);
812
812
  }
813
- function cn(i) {
813
+ function pn(i) {
814
814
  if (!w(i)) return "";
815
- const e = tt() - i.getTime(), s = 60 * 1e3, n = 60 * s, r = 24 * n, a = 7 * r, o = 30 * r, l = 365 * r;
815
+ const e = st() - i.getTime(), s = 60 * 1e3, n = 60 * s, r = 24 * n, a = 7 * r, o = 30 * r, l = 365 * r;
816
816
  return e < s ? "刚刚" : e < n ? `${Math.floor(e / s)}分钟前` : e < r ? `${Math.floor(e / n)}小时前` : e < a ? `${Math.floor(e / r)}天前` : e < o ? `${Math.floor(e / a)}周前` : e < l ? `${Math.floor(e / o)}个月前` : `${Math.floor(e / l)}年前`;
817
817
  }
818
- const hn = { now: tt, today: K, tomorrow: zi, yesterday: Pi, isDate: w, isValid: zt, parse: $i, format: Bi, toISO: qi, toUTC: Oi, addDays: Fi, addHours: Ni, addMinutes: Ri, addSeconds: Vi, diffDays: et, diffHours: Ki, diffMinutes: Wi, diffSeconds: Ui, isToday: Yi, isYesterday: Xi, isTomorrow: ji, isFuture: Ji, isPast: Zi, isLeapYear: Gi, getDaysInMonth: Qi, getWeekOfYear: tn, getQuarter: en, startOfDay: sn, endOfDay: nn, startOfMonth: rn, endOfMonth: an, startOfWeek: Pt, endOfWeek: on, getAge: ln, fromNow: cn };
819
- function dn(i, t, e = {}) {
818
+ const fn = { now: st, today: K, tomorrow: qi, yesterday: Oi, isDate: w, isValid: qt, parse: Fi, format: Ni, toISO: Ri, toUTC: Vi, addDays: Ki, addHours: Wi, addMinutes: Ui, addSeconds: Yi, diffDays: it, diffHours: Xi, diffMinutes: ji, diffSeconds: Ji, isToday: Zi, isYesterday: Gi, isTomorrow: Qi, isFuture: tn, isPast: en, isLeapYear: sn, getDaysInMonth: nn, getWeekOfYear: rn, getQuarter: an, startOfDay: on, endOfDay: ln, startOfMonth: cn, endOfMonth: hn, startOfWeek: Ot, endOfWeek: dn, getAge: un, fromNow: pn };
819
+ function mn(i, t, e = {}) {
820
820
  let s = null, n = null, r = null, a = 0;
821
821
  const o = e.leading || !1, l = e.trailing !== !1;
822
822
  function c() {
@@ -835,7 +835,7 @@ function dn(i, t, e = {}) {
835
835
  n = f, r = this, a = Date.now(), s ? (clearTimeout(s), s = setTimeout(d, u())) : h();
836
836
  };
837
837
  }
838
- function un(i, t, e = {}) {
838
+ function gn(i, t, e = {}) {
839
839
  let s = !1;
840
840
  const n = e.trailing || !1;
841
841
  let r = null, a = null;
@@ -848,31 +848,31 @@ function un(i, t, e = {}) {
848
848
  }, t));
849
849
  };
850
850
  }
851
- function pn(i) {
851
+ function _n(i) {
852
852
  return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(i || "");
853
853
  }
854
- function fn(i) {
854
+ function yn(i) {
855
855
  return /^1[3-9]\d{9}$/.test(i || "");
856
856
  }
857
- function mn(i) {
857
+ function vn(i) {
858
858
  return /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w.-]*)*\/?$/.test(i || "");
859
859
  }
860
- function $t(i) {
860
+ function Ft(i) {
861
861
  return /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(i || "");
862
862
  }
863
- function Bt(i) {
863
+ function Nt(i) {
864
864
  return /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(i || "");
865
865
  }
866
- function gn(i) {
867
- return $t(i) || Bt(i);
866
+ function bn(i) {
867
+ return Ft(i) || Nt(i);
868
868
  }
869
- function _n(i) {
869
+ function xn(i) {
870
870
  return /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(i || "");
871
871
  }
872
- function yn(i) {
872
+ function En(i) {
873
873
  return /^[A-Z][0-9]{8}$|^[A-Z]{2}[0-9]{7}$/.test(i || "");
874
874
  }
875
- function vn(i) {
875
+ function wn(i) {
876
876
  const t = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9]{2})[0-9]{12}|3[47][0-9]{13})$/, e = i.replace(/\s/g, "");
877
877
  if (!t.test(e)) return !1;
878
878
  let s = 0, n = !1;
@@ -882,113 +882,113 @@ function vn(i) {
882
882
  }
883
883
  return s % 10 === 0;
884
884
  }
885
- function qt(i) {
885
+ function Rt(i) {
886
886
  return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i || "");
887
887
  }
888
- function Ot(i) {
888
+ function Vt(i) {
889
889
  const t = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(i || "");
890
890
  return t ? t.slice(1).every((e) => parseInt(e) >= 0 && parseInt(e) <= 255) : !1;
891
891
  }
892
- function Ft(i) {
892
+ function Kt(i) {
893
893
  const t = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*([01]|0\.\d+)\)$/.exec(i || "");
894
894
  if (!t) return !1;
895
895
  const [, e, s, n, r] = t;
896
896
  return parseInt(e) >= 0 && parseInt(e) <= 255 && parseInt(s) >= 0 && parseInt(s) <= 255 && parseInt(n) >= 0 && parseInt(n) <= 255 && parseFloat(r) >= 0 && parseFloat(r) <= 1;
897
897
  }
898
- function bn(i) {
899
- return qt(i) || Ot(i) || Ft(i);
898
+ function kn(i) {
899
+ return Rt(i) || Vt(i) || Kt(i);
900
900
  }
901
- function xn(i) {
901
+ function Cn(i) {
902
902
  return !isNaN(new Date(i).getTime());
903
903
  }
904
- function En(i) {
904
+ function Sn(i) {
905
905
  try {
906
906
  return JSON.parse(i), !0;
907
907
  } catch {
908
908
  return !1;
909
909
  }
910
910
  }
911
- function wn(i) {
911
+ function Ln(i) {
912
912
  return !i || i.trim() === "";
913
913
  }
914
- function kn(i) {
914
+ function Dn(i) {
915
915
  return /^\s+$/.test(i || "");
916
916
  }
917
- function Cn(i) {
917
+ function Hn(i) {
918
918
  return !isNaN(parseFloat(i)) && isFinite(i);
919
919
  }
920
- function Sn(i) {
920
+ function Mn(i) {
921
921
  return /^-?\d+$/.test(i || "");
922
922
  }
923
- function Ln(i) {
923
+ function In(i) {
924
924
  return /^-?\d+\.\d+$/.test(i || "");
925
925
  }
926
- function Dn(i) {
926
+ function Tn(i) {
927
927
  const t = parseFloat(i);
928
928
  return !isNaN(t) && t > 0;
929
929
  }
930
- function Hn(i) {
930
+ function An(i) {
931
931
  const t = parseFloat(i);
932
932
  return !isNaN(t) && t < 0;
933
933
  }
934
- function Mn(i) {
934
+ function zn(i) {
935
935
  return /^[a-zA-Z]+$/.test(i || "");
936
936
  }
937
- function In(i) {
937
+ function Pn(i) {
938
938
  return /^[a-zA-Z0-9]+$/.test(i || "");
939
939
  }
940
- function Tn(i) {
940
+ function $n(i) {
941
941
  return /^[\u4e00-\u9fa5]+$/.test(i || "");
942
942
  }
943
- function An(i, t, e) {
943
+ function Bn(i, t, e) {
944
944
  const s = (i || "").length;
945
945
  return s >= t && (e === void 0 || s <= e);
946
946
  }
947
- function zn(i, t) {
947
+ function qn(i, t) {
948
948
  return (i || "").length >= t;
949
949
  }
950
- function Pn(i, t) {
950
+ function On(i, t) {
951
951
  return (i || "").length <= t;
952
952
  }
953
- function $n(i, t) {
953
+ function Fn(i, t) {
954
954
  return t instanceof RegExp ? t.test(i || "") : !1;
955
955
  }
956
- function Bn(i, t) {
956
+ function Nn(i, t) {
957
957
  return String(i) === String(t);
958
958
  }
959
- function Nt(i, t) {
959
+ function Wt(i, t) {
960
960
  return (i || "").includes(t);
961
961
  }
962
- function qn(i, t) {
963
- return !Nt(i, t);
962
+ function Rn(i, t) {
963
+ return !Wt(i, t);
964
964
  }
965
- function On(i) {
965
+ function Vn(i) {
966
966
  return Array.isArray(i);
967
967
  }
968
- function Fn(i, t, e) {
968
+ function Kn(i, t, e) {
969
969
  const s = i ? i.length : 0;
970
970
  return s >= t && (e === void 0 || s <= e);
971
971
  }
972
- function Nn(i, t) {
972
+ function Wn(i, t) {
973
973
  return i ? i.length >= t : !1;
974
974
  }
975
- function Rn(i, t) {
975
+ function Un(i, t) {
976
976
  return i ? i.length <= t : !1;
977
977
  }
978
- function Vn(i) {
978
+ function Yn(i) {
979
979
  return i !== null && typeof i == "object" && !Array.isArray(i);
980
980
  }
981
- function Kn(i, t) {
981
+ function Xn(i, t) {
982
982
  return !i || !t || !Array.isArray(t) ? !1 : t.every((e) => Object.prototype.hasOwnProperty.call(i, e));
983
983
  }
984
- function Wn(i, t) {
984
+ function jn(i, t) {
985
985
  const e = {};
986
986
  return Object.keys(t).forEach((s) => {
987
987
  const n = i[s], r = t[s], a = [];
988
988
  r.forEach((o) => {
989
989
  if (typeof o == "string") {
990
990
  const [l, ...c] = o.split(":");
991
- Rt[l](n, ...c) || a.push(l);
991
+ Ut[l](n, ...c) || a.push(l);
992
992
  } else if (typeof o == "function") {
993
993
  const l = o(n, i);
994
994
  l !== !0 && a.push(l || "validation_failed");
@@ -996,8 +996,8 @@ function Wn(i, t) {
996
996
  }), a.length > 0 && (e[s] = a);
997
997
  }), { valid: Object.keys(e).length === 0, errors: e };
998
998
  }
999
- const Rt = { isEmail: pn, isPhone: fn, isURL: mn, isIPv4: $t, isIPv6: Bt, isIP: gn, isIDCard: _n, isPassport: yn, isCreditCard: vn, isHexColor: qt, isRGB: Ot, isRGBA: Ft, isColor: bn, isDate: xn, isJSON: En, isEmpty: wn, isWhitespace: kn, isNumber: Cn, isInteger: Sn, isFloat: Ln, isPositive: Dn, isNegative: Hn, isAlpha: Mn, isAlphaNumeric: In, isChinese: Tn, isLength: An, minLength: zn, maxLength: Pn, matches: $n, equals: Bn, contains: Nt, notContains: qn, isArray: On, arrayLength: Fn, arrayMinLength: Nn, arrayMaxLength: Rn, isObject: Vn, hasKeys: Kn, validate: Wn };
1000
- function Un(i) {
999
+ const Ut = { isEmail: _n, isPhone: yn, isURL: vn, isIPv4: Ft, isIPv6: Nt, isIP: bn, isIDCard: xn, isPassport: En, isCreditCard: wn, isHexColor: Rt, isRGB: Vt, isRGBA: Kt, isColor: kn, isDate: Cn, isJSON: Sn, isEmpty: Ln, isWhitespace: Dn, isNumber: Hn, isInteger: Mn, isFloat: In, isPositive: Tn, isNegative: An, isAlpha: zn, isAlphaNumeric: Pn, isChinese: $n, isLength: Bn, minLength: qn, maxLength: On, matches: Fn, equals: Nn, contains: Wt, notContains: Rn, isArray: Vn, arrayLength: Kn, arrayMinLength: Wn, arrayMaxLength: Un, isObject: Yn, hasKeys: Xn, validate: jn };
1000
+ function Jn(i) {
1001
1001
  const t = i ? String(i) : "", e = [1732584193, 4023233417, 2562383102, 271733878], s = [3614090360, 3905402710, 606105819, 3250441966, 4118548399, 1200080426, 2821735955, 4249261313, 1770035416, 2336552879, 4294925233, 2304563134, 1804603682, 4254626195, 2792965006, 1236535329, 4129170786, 3225465664, 643717713, 3921069994, 3593408605, 38016083, 3634488961, 3889429448, 568446438, 3275163606, 4107603335, 1163531501, 2850285829, 4243563512, 1735328473, 2368359562, 4294588738, 2272392833, 1839030562, 4259657740, 2763975236, 1272893353, 4139469664, 3200236656, 681279174, 3936430074, 3572445317, 76029189, 3654602809, 3873151461, 530742520, 3299628645, 4096336452, 1126891415, 2878612391, 4237533241, 1700485571, 2399980690, 4293915773, 2240044497, 1873313359, 4264355552, 2734768916, 1309151649, 4149444226, 3174756917, 718787259, 3951481745], n = [[7, 12, 17, 22], [5, 9, 14, 20], [4, 11, 16, 23], [6, 10, 15, 21]];
1002
1002
  function r(d, u) {
1003
1003
  return d << u | d >>> 32 - u;
@@ -1037,7 +1037,7 @@ function Un(i) {
1037
1037
  h += (d >>> 8 * u & 255).toString(16).padStart(2, "0");
1038
1038
  }), h;
1039
1039
  }
1040
- function Yn(i) {
1040
+ function Zn(i) {
1041
1041
  const t = i ? String(i) : "", e = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298];
1042
1042
  function s(c, h) {
1043
1043
  return c >>> h | c << 32 - h;
@@ -1078,7 +1078,7 @@ function Yn(i) {
1078
1078
  l += (c >>> 8 * h & 255).toString(16).padStart(2, "0");
1079
1079
  }), l;
1080
1080
  }
1081
- function Xn(i) {
1081
+ function Gn(i) {
1082
1082
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1083
1083
  let e = "", s = 0;
1084
1084
  const n = i ? i.split("").map((r) => r.charCodeAt(0)) : [];
@@ -1088,7 +1088,7 @@ function Xn(i) {
1088
1088
  }
1089
1089
  return e;
1090
1090
  }
1091
- function jn(i) {
1091
+ function Qn(i) {
1092
1092
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1093
1093
  let e = "", s = 0;
1094
1094
  for (i = i.replace(/[^A-Za-z0-9+/=]/g, ""); s < i.length; ) {
@@ -1097,13 +1097,13 @@ function jn(i) {
1097
1097
  }
1098
1098
  return e;
1099
1099
  }
1100
- function Jn() {
1100
+ function tr() {
1101
1101
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (i) => {
1102
1102
  const t = Math.random() * 16 | 0;
1103
1103
  return (i === "x" ? t : t & 3 | 8).toString(16);
1104
1104
  });
1105
1105
  }
1106
- const Zn = { md5: Un, sha256: Yn, base64Encode: Xn, base64Decode: jn, uuid: Jn }, B = /* @__PURE__ */ new Map();
1106
+ const er = { md5: Jn, sha256: Zn, base64Encode: Gn, base64Decode: Qn, uuid: tr }, B = /* @__PURE__ */ new Map();
1107
1107
  async function Z(i, t = {}) {
1108
1108
  const { crossOrigin: e = "anonymous" } = t;
1109
1109
  return B.has(i) ? B.get(i) : new Promise((s, n) => {
@@ -1115,7 +1115,7 @@ async function Z(i, t = {}) {
1115
1115
  }, r.src = i;
1116
1116
  });
1117
1117
  }
1118
- async function Gn(i, t = {}) {
1118
+ async function sr(i, t = {}) {
1119
1119
  const { parallel: e = !0 } = t;
1120
1120
  if (e) return Promise.all(i.map((n) => Z(n, t)));
1121
1121
  const s = [];
@@ -1123,7 +1123,7 @@ async function Gn(i, t = {}) {
1123
1123
  s.push(await Z(n, t));
1124
1124
  return s;
1125
1125
  }
1126
- async function Vt(i, t = {}) {
1126
+ async function Yt(i, t = {}) {
1127
1127
  const { type: e = "text/javascript", async: s = !0, defer: n = !1 } = t;
1128
1128
  return B.has(i) ? B.get(i) : new Promise((r, a) => {
1129
1129
  const o = document.createElement("script");
@@ -1134,7 +1134,7 @@ async function Vt(i, t = {}) {
1134
1134
  }, o.src = i, document.head.appendChild(o);
1135
1135
  });
1136
1136
  }
1137
- async function Kt(i, t = {}) {
1137
+ async function Xt(i, t = {}) {
1138
1138
  const { media: e = "all" } = t;
1139
1139
  return B.has(i) ? B.get(i) : new Promise((s, n) => {
1140
1140
  const r = document.createElement("link");
@@ -1145,7 +1145,7 @@ async function Kt(i, t = {}) {
1145
1145
  }, document.head.appendChild(r);
1146
1146
  });
1147
1147
  }
1148
- async function Qn(i, t, e = {}) {
1148
+ async function ir(i, t, e = {}) {
1149
1149
  const { weight: s = "normal", style: n = "normal" } = e, r = new FontFace(i, `url(${t})`, { weight: s, style: n });
1150
1150
  try {
1151
1151
  return await r.load(), document.fonts.add(r), r;
@@ -1153,41 +1153,41 @@ async function Qn(i, t, e = {}) {
1153
1153
  throw new Error(`Failed to load font: ${i}`);
1154
1154
  }
1155
1155
  }
1156
- async function tr(i, t = "image") {
1156
+ async function nr(i, t = "image") {
1157
1157
  switch (t) {
1158
1158
  case "image":
1159
1159
  return Z(i);
1160
1160
  case "script":
1161
- return Vt(i);
1161
+ return Yt(i);
1162
1162
  case "stylesheet":
1163
1163
  case "style":
1164
- return Kt(i);
1164
+ return Xt(i);
1165
1165
  default:
1166
1166
  throw new Error(`Unsupported preload type: ${t}`);
1167
1167
  }
1168
1168
  }
1169
- function er(i) {
1169
+ function rr(i) {
1170
1170
  return B.has(i);
1171
1171
  }
1172
- function sr() {
1172
+ function ar() {
1173
1173
  B.clear();
1174
1174
  }
1175
- function ir(i) {
1175
+ function or(i) {
1176
1176
  B.delete(i);
1177
1177
  }
1178
- const nr = { loadImage: Z, loadImages: Gn, loadScript: Vt, loadStylesheet: Kt, loadFont: Qn, preload: tr, isLoaded: er, clearCache: sr, clearCacheByUrl: ir }, za = {
1179
- string: Ze,
1180
- array: Fs,
1181
- object: ai,
1182
- number: Ai,
1183
- date: hn,
1184
- debounce: dn,
1185
- throttle: un,
1186
- validator: Rt,
1187
- crypto: Zn,
1188
- preload: nr
1178
+ const lr = { loadImage: Z, loadImages: sr, loadScript: Yt, loadStylesheet: Xt, loadFont: ir, preload: nr, isLoaded: rr, clearCache: ar, clearCacheByUrl: or }, Oa = {
1179
+ string: es,
1180
+ array: Ks,
1181
+ object: hi,
1182
+ number: Bi,
1183
+ date: fn,
1184
+ debounce: mn,
1185
+ throttle: gn,
1186
+ validator: Ut,
1187
+ crypto: er,
1188
+ preload: lr
1189
1189
  };
1190
- function rr(i) {
1190
+ function cr(i) {
1191
1191
  if (!i) return "";
1192
1192
  let t = String(i);
1193
1193
  const e = /<\s*(script|iframe|object|embed|applet|form|base|link|meta|style)\b[^>]*>[\s\S]*?<\s*\/\s*\1\s*>|<\s*(script|iframe|object|embed|applet|form|base|link|meta|style)\b[^>]*\/?>/gi;
@@ -1197,20 +1197,20 @@ function rr(i) {
1197
1197
  while (t !== s);
1198
1198
  return t = t.replace(/\bon\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, ""), t = t.replace(/(href|src|action|background)\s*=\s*(?:"[^"]*(?:javascript|vbscript|data)\s*:[^"]*"|'[^']*(?:javascript|vbscript|data)\s*:[^']*'|[^\s>]*(?:javascript|vbscript|data)\s*:[^\s>]*)/gi, '$1=""'), t = t.replace(/expression\s*\([^)]*\)/gi, ""), t;
1199
1199
  }
1200
- class gt {
1200
+ class vt {
1201
1201
  constructor() {
1202
1202
  this.children = {}, this.keys = [];
1203
1203
  }
1204
1204
  }
1205
- class nt {
1205
+ class at {
1206
1206
  constructor() {
1207
- this.root = new gt();
1207
+ this.root = new vt();
1208
1208
  }
1209
1209
  insert(t) {
1210
1210
  let e = this.root;
1211
1211
  const s = t.split(".");
1212
1212
  s.forEach((n, r) => {
1213
- e.children[n] || (e.children[n] = new gt()), e = e.children[n], r === s.length - 1 && e.keys.push(t);
1213
+ e.children[n] || (e.children[n] = new vt()), e = e.children[n], r === s.length - 1 && e.keys.push(t);
1214
1214
  });
1215
1215
  }
1216
1216
  getSubKeys(t) {
@@ -1242,9 +1242,9 @@ const g = {
1242
1242
  path: Symbol("reactive_path"),
1243
1243
  isReactive: Symbol("reactive_is_reactive")
1244
1244
  };
1245
- class ar {
1245
+ class hr {
1246
1246
  constructor() {
1247
- this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new nt(), this.updateQueue = /* @__PURE__ */ new Map(), this.isProcessing = !1, this.pendingComputed = /* @__PURE__ */ new Set(), this.persistedKeys = /* @__PURE__ */ new Map(), this.snapshots = [], this.snapshotLimit = 10, this._proxyCache = /* @__PURE__ */ new WeakMap(), this.createReactiveData();
1247
+ this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new at(), this.updateQueue = /* @__PURE__ */ new Map(), this.isProcessing = !1, this.pendingComputed = /* @__PURE__ */ new Set(), this.persistedKeys = /* @__PURE__ */ new Map(), this.snapshots = [], this.snapshotLimit = 10, this._proxyCache = /* @__PURE__ */ new WeakMap(), this.createReactiveData();
1248
1248
  }
1249
1249
  createReactiveData() {
1250
1250
  const t = {
@@ -1382,7 +1382,7 @@ class ar {
1382
1382
  t.textContent !== String(e ?? "") && (t.textContent = e ?? "");
1383
1383
  break;
1384
1384
  case "html":
1385
- const c = rr(e);
1385
+ const c = cr(e);
1386
1386
  t.innerHTML !== c && (t.innerHTML = c);
1387
1387
  break;
1388
1388
  case "value":
@@ -1440,7 +1440,7 @@ class ar {
1440
1440
  }), this.processComputed();
1441
1441
  }
1442
1442
  reset() {
1443
- this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new nt(), this.updateQueue.clear(), this.snapshots = [], this.createReactiveData(), this.bind();
1443
+ this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new at(), this.updateQueue.clear(), this.snapshots = [], this.createReactiveData(), this.bind();
1444
1444
  }
1445
1445
  persist(t, e = {}) {
1446
1446
  const {
@@ -1706,10 +1706,10 @@ class ar {
1706
1706
  });
1707
1707
  }), this.persistedKeys.forEach((t, e) => {
1708
1708
  t.timeout && clearTimeout(t.timeout);
1709
- }), this.persistedKeys.clear(), this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new nt(), this.updateQueue.clear(), this.snapshots = [];
1709
+ }), this.persistedKeys.clear(), this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new at(), this.updateQueue.clear(), this.snapshots = [];
1710
1710
  }
1711
1711
  }
1712
- class _t {
1712
+ class bt {
1713
1713
  constructor(t, e = {}) {
1714
1714
  this.name = t, this._stateKey = `__store_${t}__`;
1715
1715
  const s = e.state ? e.state() : {};
@@ -1779,25 +1779,25 @@ class _t {
1779
1779
  };
1780
1780
  }
1781
1781
  }
1782
- class or {
1782
+ class dr {
1783
1783
  constructor() {
1784
1784
  this.stores = /* @__PURE__ */ new Map();
1785
1785
  }
1786
1786
  createStore(t, e) {
1787
- const s = new _t(t, e);
1787
+ const s = new bt(t, e);
1788
1788
  return this.stores.set(t, s), s;
1789
1789
  }
1790
1790
  getStore(t) {
1791
1791
  return this.stores.get(t);
1792
1792
  }
1793
1793
  registerStore(t) {
1794
- t instanceof _t && this.stores.set(t.name, t);
1794
+ t instanceof bt && this.stores.set(t.name, t);
1795
1795
  }
1796
1796
  dispose() {
1797
1797
  this.stores.clear();
1798
1798
  }
1799
1799
  }
1800
- class lr {
1800
+ class ur {
1801
1801
  constructor() {
1802
1802
  this.events = {}, this.delegatedEvents = {}, this.eventListeners = {};
1803
1803
  }
@@ -1874,14 +1874,14 @@ function T(i = null) {
1874
1874
  }
1875
1875
  }), t;
1876
1876
  }
1877
- const O = new ar(), Pa = new lr(), Wt = new or();
1878
- function $a(i, t) {
1879
- return Wt.createStore(i, t);
1877
+ const O = new hr(), Fa = new ur(), jt = new dr();
1878
+ function Na(i, t) {
1879
+ return jt.createStore(i, t);
1880
1880
  }
1881
- function Ba(i) {
1882
- return Wt.getStore(i);
1881
+ function Ra(i) {
1882
+ return jt.getStore(i);
1883
1883
  }
1884
- const I = {
1884
+ const M = {
1885
1885
  paths: {
1886
1886
  icons: "/icons/",
1887
1887
  base: "/"
@@ -1975,58 +1975,92 @@ const I = {
1975
1975
  autoInit: !0,
1976
1976
  silentErrors: !1
1977
1977
  }
1978
- };
1979
- function cr(i) {
1980
- Ut(I, i);
1978
+ }, G = [];
1979
+ function xt() {
1980
+ if (typeof window < "u" && window.kupolaConfig)
1981
+ try {
1982
+ mt(M, window.kupolaConfig), Jt();
1983
+ } catch (i) {
1984
+ console.warn("[Kupola] Failed to parse window.kupolaConfig:", i);
1985
+ }
1981
1986
  }
1982
- function dt(i) {
1983
- return i ? gr(I, i) : I;
1987
+ function Jt() {
1988
+ G.forEach((i) => {
1989
+ try {
1990
+ i(M);
1991
+ } catch (t) {
1992
+ console.warn("[Kupola] Error in config change listener:", t);
1993
+ }
1994
+ });
1995
+ }
1996
+ function pr(i) {
1997
+ typeof i == "function" && G.push(i);
1998
+ }
1999
+ function Va(i) {
2000
+ const t = G.indexOf(i);
2001
+ t > -1 && G.splice(t, 1);
2002
+ }
2003
+ typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", xt) : xt());
2004
+ function fr(i) {
2005
+ mt(M, i), Jt();
1984
2006
  }
1985
- function ut() {
1986
- return I.paths.base + I.paths.icons.replace(/^\//, "");
2007
+ function pt(i) {
2008
+ return i ? xr(M, i) : M;
1987
2009
  }
1988
- function qa() {
1989
- return I.paths.base;
2010
+ function ft() {
2011
+ return M.paths.base + M.paths.icons.replace(/^\//, "");
1990
2012
  }
1991
- function hr() {
1992
- return I.theme.default;
2013
+ function Ka() {
2014
+ return M.paths.base;
1993
2015
  }
1994
- function dr() {
1995
- return I.theme.brand;
2016
+ function mr() {
2017
+ return M.theme.default;
2018
+ }
2019
+ function gr() {
2020
+ return M.theme.brand;
1996
2021
  }
1997
- function Oa() {
1998
- return I.http;
2022
+ function Wa() {
2023
+ return M.http;
1999
2024
  }
2000
2025
  function j() {
2001
- return I.ui;
2026
+ return M.ui;
2002
2027
  }
2003
2028
  function W() {
2004
- return I.zIndex;
2029
+ return M.zIndex;
2005
2030
  }
2006
- function st() {
2007
- return I.security;
2031
+ function nt() {
2032
+ return M.security;
2008
2033
  }
2009
- function ur() {
2010
- return I.performance;
2034
+ function _r() {
2035
+ return M.performance;
2011
2036
  }
2012
- function pr() {
2013
- return I.message;
2037
+ function yr() {
2038
+ return M.message;
2014
2039
  }
2015
- function fr() {
2016
- return I.notification;
2040
+ function vr() {
2041
+ return M.notification;
2017
2042
  }
2018
- function mr() {
2019
- return I.validation;
2043
+ function br() {
2044
+ return M.validation;
2020
2045
  }
2021
- function Ut(i, t) {
2046
+ function mt(i, t) {
2022
2047
  for (const e in t)
2023
- t[e] instanceof Object && e in i && i[e] instanceof Object ? Ut(i[e], t[e]) : i[e] = t[e];
2048
+ t[e] instanceof Object && e in i && i[e] instanceof Object ? mt(i[e], t[e]) : i[e] = t[e];
2024
2049
  return i;
2025
2050
  }
2026
- function gr(i, t) {
2051
+ function xr(i, t) {
2027
2052
  return t.split(".").reduce((e, s) => (e && e[s]) !== void 0 ? e[s] : void 0, i);
2028
2053
  }
2029
- const Yt = "kupola-theme", Xt = "kupola-brand", X = [
2054
+ const Zt = "kupola-theme", Gt = "kupola-brand";
2055
+ let Et = !1;
2056
+ pr((i) => {
2057
+ const t = document.querySelector("[data-theme-toggle]");
2058
+ if (t) {
2059
+ const e = F();
2060
+ ct(t), Q(e);
2061
+ }
2062
+ });
2063
+ const X = [
2030
2064
  { id: "green", name: "翠绿", color: "#32F08C" },
2031
2065
  { id: "xionghuang", name: "雄黄", color: "#FF9900" },
2032
2066
  { id: "jianghuang", name: "姜黄", color: "#E2C027" },
@@ -2039,12 +2073,12 @@ const Yt = "kupola-theme", Xt = "kupola-brand", X = [
2039
2073
  { id: "zengqing", name: "曾青", color: "#535164" },
2040
2074
  { id: "roulan", name: "柔蓝", color: "#106898" }
2041
2075
  ];
2042
- function R() {
2043
- return localStorage.getItem(Yt) || hr();
2076
+ function F() {
2077
+ return localStorage.getItem(Zt) || mr();
2044
2078
  }
2045
- function at(i) {
2079
+ function Q(i) {
2046
2080
  if (i !== "dark" && i !== "light") return;
2047
- document.documentElement.setAttribute("data-theme", i), localStorage.setItem(Yt, i);
2081
+ document.documentElement.setAttribute("data-theme", i), localStorage.setItem(Zt, i);
2048
2082
  const t = document.querySelector("[data-theme-toggle]");
2049
2083
  if (t) {
2050
2084
  t.setAttribute("data-current-theme", i);
@@ -2056,12 +2090,12 @@ function at(i) {
2056
2090
  }
2057
2091
  }
2058
2092
  function J() {
2059
- return localStorage.getItem(Xt) || dr();
2093
+ return localStorage.getItem(Gt) || gr();
2060
2094
  }
2061
- function ot(i) {
2095
+ function lt(i) {
2062
2096
  const t = X.find((n) => n.id === i);
2063
2097
  if (!t) return;
2064
- document.documentElement.setAttribute("data-brand", i), localStorage.setItem(Xt, i);
2098
+ document.documentElement.setAttribute("data-brand", i), localStorage.setItem(Gt, i);
2065
2099
  const e = document.querySelector("[data-brand-toggle]");
2066
2100
  if (e) {
2067
2101
  e.setAttribute("data-current-brand", i);
@@ -2074,20 +2108,20 @@ function ot(i) {
2074
2108
  n.getAttribute("data-brand-btn") === i ? n.classList.add("is-active") : n.classList.remove("is-active");
2075
2109
  });
2076
2110
  }
2077
- function yt(i) {
2111
+ function ct(i) {
2078
2112
  const t = i.querySelector(".theme-icon");
2079
2113
  if (t) {
2080
- const e = R(), s = ut();
2114
+ const e = F(), s = ft();
2081
2115
  t.src = e === "dark" ? s + "sun.svg" : s + "moon.svg";
2082
2116
  }
2083
2117
  }
2084
- function _r() {
2118
+ function Er() {
2085
2119
  const i = document.querySelector("[data-theme-toggle]");
2086
- if (i) {
2120
+ if (!Et && (Et = !0, i)) {
2087
2121
  const o = i.querySelector(".theme-icon");
2088
- if (o && o.src && ut() === "/icons/") {
2122
+ if (o && o.src && ft() === "/icons/") {
2089
2123
  const c = o.src.substring(0, o.src.lastIndexOf("/") + 1), h = window.location.pathname.substring(0, window.location.pathname.lastIndexOf("/") + 1), d = c.replace(window.location.origin + h, "");
2090
- d !== c && cr({
2124
+ d !== c && fr({
2091
2125
  paths: {
2092
2126
  icons: d,
2093
2127
  base: h
@@ -2095,16 +2129,16 @@ function _r() {
2095
2129
  });
2096
2130
  }
2097
2131
  }
2098
- const t = R();
2099
- at(t);
2132
+ const t = F();
2133
+ Q(t);
2100
2134
  const e = J();
2101
- if (ot(e), i) {
2102
- yt(i);
2135
+ if (lt(e), i) {
2136
+ ct(i);
2103
2137
  const o = i.onclick;
2104
2138
  i.onclick = function(l) {
2105
2139
  l.preventDefault();
2106
- const h = R() === "dark" ? "light" : "dark";
2107
- at(h), yt(i), typeof o == "function" && o.call(this, l);
2140
+ const h = F() === "dark" ? "light" : "dark";
2141
+ Q(h), ct(i), typeof o == "function" && o.call(this, l);
2108
2142
  };
2109
2143
  }
2110
2144
  let s = document.getElementById("brand-picker");
@@ -2129,23 +2163,23 @@ function _r() {
2129
2163
  o.addEventListener("click", (l) => {
2130
2164
  l.stopPropagation();
2131
2165
  const c = o.getAttribute("data-brand-btn");
2132
- ot(c), s && (s.style.display = "none");
2166
+ lt(c), s && (s.style.display = "none");
2133
2167
  });
2134
2168
  });
2135
2169
  }
2136
- function Fa() {
2170
+ function Ua() {
2137
2171
  const i = document.createElement("button");
2138
- i.setAttribute("data-theme-toggle", ""), i.setAttribute("data-current-theme", R()), i.className = "ds-btn ds-btn--ghost ds-btn--sm ds-btn--icon", i.style.position = "fixed", i.style.top = "16px", i.style.right = "16px", i.style.zIndex = "9999";
2172
+ i.setAttribute("data-theme-toggle", ""), i.setAttribute("data-current-theme", F()), i.className = "ds-btn ds-btn--ghost ds-btn--sm ds-btn--icon", i.style.position = "fixed", i.style.top = "16px", i.style.right = "16px", i.style.zIndex = "9999";
2139
2173
  const t = document.createElement("img");
2140
2174
  t.className = "theme-icon";
2141
- const e = ut();
2142
- return t.src = R() === "dark" ? e + "sun.svg" : e + "moon.svg", t.width = 14, t.height = 14, t.alt = "Toggle theme", i.appendChild(t), document.body.appendChild(i), i.onclick = function(s) {
2175
+ const e = ft();
2176
+ return t.src = F() === "dark" ? e + "sun.svg" : e + "moon.svg", t.width = 14, t.height = 14, t.alt = "Toggle theme", i.appendChild(t), document.body.appendChild(i), i.onclick = function(s) {
2143
2177
  s.preventDefault();
2144
- const r = R() === "dark" ? "light" : "dark";
2145
- at(r);
2178
+ const r = F() === "dark" ? "light" : "dark";
2179
+ Q(r);
2146
2180
  }, i;
2147
2181
  }
2148
- function Na() {
2182
+ function Ya() {
2149
2183
  const i = document.createElement("div");
2150
2184
  i.id = "brand-picker-auto", i.style.position = "fixed", i.style.top = "56px", i.style.right = "16px", i.style.zIndex = "9998", i.style.display = "none", i.style.padding = "12px", i.style.width = "200px", i.style.gridTemplateColumns = "repeat(3, 1fr)", i.style.gap = "6px", i.style.backgroundColor = "var(--bg-base-secondary)", i.style.border = "1px solid var(--border-neutral-l1)", i.style.borderRadius = "8px", i.style.boxShadow = "0 4px 20px rgba(0, 0, 0, 0.2)", i.style.overflow = "hidden", X.forEach((a) => {
2151
2185
  const o = document.createElement("button");
@@ -2172,12 +2206,12 @@ function Na() {
2172
2206
  a.addEventListener("click", (o) => {
2173
2207
  o.stopPropagation();
2174
2208
  const l = a.getAttribute("data-brand-btn");
2175
- ot(l), i.style.display = "none";
2209
+ lt(l), i.style.display = "none";
2176
2210
  });
2177
2211
  }), { toggleBtn: t, container: i };
2178
2212
  }
2179
- function Ra(i, t = {}) {
2180
- const s = st()?.sanitizeHtml || {};
2213
+ function Xa(i, t = {}) {
2214
+ const s = nt()?.sanitizeHtml || {};
2181
2215
  if (!s.enabled && !t.force)
2182
2216
  return i;
2183
2217
  const n = t.allowedTags || s.allowedTags || [], r = t.allowedAttributes || s.allowedAttributes || {};
@@ -2196,17 +2230,17 @@ function Ra(i, t = {}) {
2196
2230
  });
2197
2231
  }), o.body.innerHTML;
2198
2232
  }
2199
- function Va(i) {
2233
+ function ja(i) {
2200
2234
  if (typeof i != "string")
2201
2235
  return i;
2202
2236
  const t = document.createElement("div");
2203
2237
  return t.textContent = i, t.innerHTML;
2204
2238
  }
2205
- function Ka(i) {
2239
+ function Ja(i) {
2206
2240
  return typeof i != "string" ? i : new DOMParser().parseFromString(i, "text/html").body.textContent || "";
2207
2241
  }
2208
- function Wa(i, t, e = {}) {
2209
- const n = st()?.maskData || {};
2242
+ function Za(i, t, e = {}) {
2243
+ const n = nt()?.maskData || {};
2210
2244
  if (!n.enabled && !e.force || i == null)
2211
2245
  return i;
2212
2246
  const a = (e.patterns || n.patterns || {})[t];
@@ -2215,8 +2249,8 @@ function Wa(i, t, e = {}) {
2215
2249
  const o = typeof a.regex == "string" ? new RegExp(a.regex) : a.regex;
2216
2250
  return String(i).replace(o, a.replace);
2217
2251
  }
2218
- function Ua(i, t) {
2219
- const s = st()?.secureId || {}, n = i || s.length || 16, r = s.charset || "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2252
+ function Ga(i, t) {
2253
+ const s = nt()?.secureId || {}, n = i || s.length || 16, r = s.charset || "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2220
2254
  if (typeof crypto > "u" || !crypto.getRandomValues) {
2221
2255
  let l = "";
2222
2256
  for (let c = 0; c < n; c++)
@@ -2230,7 +2264,7 @@ function Ua(i, t) {
2230
2264
  o += r[a[l] % r.length];
2231
2265
  return t ? `${t}_${o}` : o;
2232
2266
  }
2233
- class yr {
2267
+ class wr {
2234
2268
  constructor() {
2235
2269
  this.initializers = /* @__PURE__ */ new Map(), this.cleanupFunctions = /* @__PURE__ */ new Map(), this.processedElements = /* @__PURE__ */ new WeakSet(), this._dataAttrs = ["data-component"], this._cssClasses = [], this._cachedSelector = null;
2236
2270
  }
@@ -2337,7 +2371,7 @@ class yr {
2337
2371
  }), await Promise.all(n);
2338
2372
  }
2339
2373
  }
2340
- const E = new yr(), vr = [
2374
+ const E = new wr(), kr = [
2341
2375
  { attr: "data-dropdown", cls: "ds-dropdown" },
2342
2376
  { attr: "data-select", cls: "ds-select" },
2343
2377
  { attr: "data-datepicker", cls: "ds-datepicker" },
@@ -2359,11 +2393,11 @@ const E = new yr(), vr = [
2359
2393
  { cls: "ds-notification" },
2360
2394
  { cls: "ds-message" }
2361
2395
  ];
2362
- for (const i of vr)
2396
+ for (const i of kr)
2363
2397
  i.attr && !E._dataAttrs.includes(i.attr) && E._dataAttrs.push(i.attr), i.cls && !E._cssClasses.includes(i.cls) && E._cssClasses.push(i.cls);
2364
- class G {
2398
+ class tt {
2365
2399
  constructor(t) {
2366
- this.element = t, this.isMounted = !1, this.isDestroyed = !1, this.props = this._parseProps(), this.state = {}, this.slots = this._parseSlots(), this._eventListeners = {}, this._appliedMixins = [], this.lifecycle = new ht(), this.setupContext = null;
2400
+ this.element = t, this.isMounted = !1, this.isDestroyed = !1, this.props = this._parseProps(), this.state = {}, this.slots = this._parseSlots(), this._eventListeners = {}, this._appliedMixins = [], this.lifecycle = new ut(), this.setupContext = null;
2367
2401
  }
2368
2402
  _parseProps() {
2369
2403
  const t = {};
@@ -2462,7 +2496,7 @@ class G {
2462
2496
  };
2463
2497
  let e = Object.getPrototypeOf(this);
2464
2498
  const s = /* @__PURE__ */ new Set();
2465
- for (; e && e.constructor !== Object && e.constructor !== G; ) {
2499
+ for (; e && e.constructor !== Object && e.constructor !== tt; ) {
2466
2500
  for (const [n, r] of Object.entries(t))
2467
2501
  s.has(n) || e.hasOwnProperty(n) && (Array.isArray(r) ? r.forEach((a) => {
2468
2502
  n === "render" && this.lifecycle.on(a, () => this.render?.());
@@ -2496,7 +2530,7 @@ class G {
2496
2530
  setup() {
2497
2531
  }
2498
2532
  }
2499
- function vt(i, t) {
2533
+ function wt(i, t) {
2500
2534
  Object.keys(t).forEach((e) => {
2501
2535
  if (e !== "constructor")
2502
2536
  if (typeof t[e] == "function") {
@@ -2508,12 +2542,12 @@ function vt(i, t) {
2508
2542
  i.prototype[e] = t[e];
2509
2543
  });
2510
2544
  }
2511
- class br {
2545
+ class Cr {
2512
2546
  constructor() {
2513
2547
  this.components = /* @__PURE__ */ new Map(), this.lazyComponents = /* @__PURE__ */ new Map(), this.loadedComponents = /* @__PURE__ */ new Map(), this.instances = /* @__PURE__ */ new Map(), this.observer = null, this.mixins = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
2514
2548
  }
2515
2549
  register(t, e) {
2516
- if (!(e.prototype instanceof G))
2550
+ if (!(e.prototype instanceof tt))
2517
2551
  throw new Error(`Component ${t} must extend KupolaComponent`);
2518
2552
  this.components.set(t, e);
2519
2553
  }
@@ -2537,7 +2571,7 @@ class br {
2537
2571
  const n = (async () => {
2538
2572
  try {
2539
2573
  const r = await s(), a = r.default || r;
2540
- if (!(a.prototype instanceof G))
2574
+ if (!(a.prototype instanceof tt))
2541
2575
  throw new Error(`Component ${t} must extend KupolaComponent`);
2542
2576
  return this.loadedComponents.set(t, a), a;
2543
2577
  } catch (r) {
@@ -2552,7 +2586,7 @@ class br {
2552
2586
  useMixin(t, ...e) {
2553
2587
  e.forEach((s) => {
2554
2588
  const n = this.mixins.get(s);
2555
- n && vt(t, n);
2589
+ n && wt(t, n);
2556
2590
  });
2557
2591
  }
2558
2592
  async bootstrap(t = document) {
@@ -2593,7 +2627,7 @@ class br {
2593
2627
  const n = t.getAttribute("data-mixins"), r = s;
2594
2628
  n && n.split(",").forEach((o) => {
2595
2629
  const l = this.mixins.get(o.trim());
2596
- l && vt(r, l);
2630
+ l && wt(r, l);
2597
2631
  });
2598
2632
  const a = new r(t);
2599
2633
  t.__kupolaInstance = a, this.instances.set(t, a), a.mount();
@@ -2638,41 +2672,41 @@ class br {
2638
2672
  }), this.instances.clear(), this.components.clear(), this.mixins.clear();
2639
2673
  }
2640
2674
  }
2641
- let M = null;
2642
- typeof window < "u" && (M = new br());
2643
- function xr() {
2644
- if (st().xssProtection && typeof document < "u") {
2675
+ let I = null;
2676
+ typeof window < "u" && (I = new Cr());
2677
+ function Sr() {
2678
+ if (nt().xssProtection && typeof document < "u") {
2645
2679
  let t = document.querySelector('meta[http-equiv="X-XSS-Protection"]');
2646
2680
  t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-XSS-Protection"), t.setAttribute("content", "1; mode=block"), document.head.insertBefore(t, document.head.firstChild)), t = document.querySelector('meta[http-equiv="X-Content-Type-Options"]'), t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-Content-Type-Options"), t.setAttribute("content", "nosniff"), document.head.insertBefore(t, document.head.firstChild));
2647
2681
  }
2648
2682
  }
2649
- async function bt() {
2683
+ async function kt() {
2650
2684
  if (typeof window < "u") {
2651
- xr();
2652
- const i = dt();
2653
- O.loadPersisted(), O.bind(), _r(), i.components?.autoInit !== !1 && (await E.initializeAll(), M && await M.bootstrap());
2685
+ Sr();
2686
+ const i = pt();
2687
+ O.loadPersisted(), O.bind(), Er(), i.components?.autoInit !== !1 && (await E.initializeAll(), I && await I.bootstrap());
2654
2688
  }
2655
2689
  }
2656
- typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", bt) : typeof window < "u" && setTimeout(bt, 0);
2657
- function Ya(i, t) {
2658
- M && M.register(i, t);
2690
+ typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", kt) : typeof window < "u" && setTimeout(kt, 0);
2691
+ function Qa(i, t) {
2692
+ I && I.register(i, t);
2659
2693
  }
2660
- function Xa(i, t) {
2661
- M && M.registerLazy(i, t);
2694
+ function to(i, t) {
2695
+ I && I.registerLazy(i, t);
2662
2696
  }
2663
- function ja(i) {
2664
- return M ? M.bootstrap(i) : Promise.resolve();
2697
+ function eo(i) {
2698
+ return I ? I.bootstrap(i) : Promise.resolve();
2665
2699
  }
2666
- function Ja(i, t) {
2667
- M && M.defineMixin(i, t);
2700
+ function so(i, t) {
2701
+ I && I.defineMixin(i, t);
2668
2702
  }
2669
- function Za(i, ...t) {
2670
- M && M.useMixin(i, ...t);
2703
+ function io(i, ...t) {
2704
+ I && I.useMixin(i, ...t);
2671
2705
  }
2672
- function Ga(i, t) {
2706
+ function no(i, t) {
2673
2707
  if (!t || typeof t != "object")
2674
2708
  throw new Error(`defineComponent("${i}"): options must be an object`);
2675
- t.componentClass ? M && M.register(i, t.componentClass) : t.lazy && M && M.registerLazy(i, t.lazy), t.init ? E.register(i, t.init, t.cleanup || null, {
2709
+ t.componentClass ? I && I.register(i, t.componentClass) : t.lazy && I && I.registerLazy(i, t.lazy), t.init ? E.register(i, t.init, t.cleanup || null, {
2676
2710
  dataAttribute: t.dataAttribute,
2677
2711
  cssClass: t.cssClass
2678
2712
  }) : (t.dataAttribute || t.cssClass) && E.register(i, () => {
@@ -2681,9 +2715,9 @@ function Ga(i, t) {
2681
2715
  cssClass: t.cssClass
2682
2716
  });
2683
2717
  }
2684
- class jt {
2718
+ class Qt {
2685
2719
  constructor(t = {}) {
2686
- const e = dt();
2720
+ const e = pt();
2687
2721
  this.locales = t.locales || {}, this.currentLocale = t.defaultLocale || e.i18n?.locale || "zh-CN", this.fallbackLocale = t.fallbackLocale || e.i18n?.fallbackLocale || "en-US", this.delimiter = t.delimiter || ".", this.missingHandler = t.missingHandler || ((s) => (console.warn(`Missing translation: ${s}`), s)), this._initFromDOM();
2688
2722
  }
2689
2723
  _initFromDOM() {
@@ -2779,32 +2813,32 @@ class jt {
2779
2813
  return new Intl.RelativeTimeFormat(n, s).format(t, e);
2780
2814
  }
2781
2815
  }
2782
- const N = new jt();
2783
- function Qa(i) {
2784
- return new jt(i);
2816
+ const R = new Qt();
2817
+ function ro(i) {
2818
+ return new Qt(i);
2785
2819
  }
2786
- function to(i, t = {}) {
2787
- return N.t(i, t);
2820
+ function ao(i, t = {}) {
2821
+ return R.t(i, t);
2788
2822
  }
2789
- function eo(i, t, e = {}) {
2790
- return N.n(i, t, e);
2823
+ function oo(i, t, e = {}) {
2824
+ return R.n(i, t, e);
2791
2825
  }
2792
- function so(i) {
2793
- return N.setLocale(i);
2826
+ function lo(i) {
2827
+ return R.setLocale(i);
2794
2828
  }
2795
- function io() {
2796
- return N.getLocale();
2829
+ function co() {
2830
+ return R.getLocale();
2797
2831
  }
2798
- function no(i, t = {}) {
2799
- return N.formatDate(i, t);
2832
+ function ho(i, t = {}) {
2833
+ return R.formatDate(i, t);
2800
2834
  }
2801
- function ro(i, t = {}) {
2802
- return N.formatNumber(i, t);
2835
+ function uo(i, t = {}) {
2836
+ return R.formatNumber(i, t);
2803
2837
  }
2804
- function ao(i, t, e = {}) {
2805
- return N.formatCurrency(i, t, e);
2838
+ function po(i, t, e = {}) {
2839
+ return R.formatCurrency(i, t, e);
2806
2840
  }
2807
- class Er {
2841
+ class Lr {
2808
2842
  constructor() {
2809
2843
  this._listeners = /* @__PURE__ */ new Map(), this._scopeListeners = /* @__PURE__ */ new Map();
2810
2844
  }
@@ -2934,32 +2968,32 @@ class Er {
2934
2968
  this._listeners.clear(), this._scopeListeners.clear();
2935
2969
  }
2936
2970
  }
2937
- const H = new Er();
2938
- function oo(i, t, e, s) {
2971
+ const H = new Lr();
2972
+ function fo(i, t, e, s) {
2939
2973
  return H.on(i, t, e, s);
2940
2974
  }
2941
- function lo(i, t, e, s) {
2975
+ function mo(i, t, e, s) {
2942
2976
  return H.once(i, t, e, s);
2943
2977
  }
2944
- function co(i, t, e) {
2978
+ function go(i, t, e) {
2945
2979
  H.off(i, t, e);
2946
2980
  }
2947
- function ho(i, t, e) {
2981
+ function _o(i, t, e) {
2948
2982
  return H.emit(i, t, e);
2949
2983
  }
2950
- function uo(i, t) {
2984
+ function yo(i, t) {
2951
2985
  return H.emitGlobal(i, t);
2952
2986
  }
2953
- function po(i) {
2987
+ function vo(i) {
2954
2988
  H.offByScope(i);
2955
2989
  }
2956
- function fo(i, t) {
2990
+ function bo(i, t) {
2957
2991
  H.offAll(i, t);
2958
2992
  }
2959
- function mo(i, t) {
2993
+ function xo(i, t) {
2960
2994
  return H.getListenerCount(i, t);
2961
2995
  }
2962
- class wr {
2996
+ class Dr {
2963
2997
  constructor(t, e = {}) {
2964
2998
  this.element = t, this.trigger = t.querySelector(".ds-dropdown__trigger"), this.menu = t.querySelector(".ds-dropdown__menu"), this.triggerText = this.trigger ? this.trigger.querySelector("span") : null, this.scope = `dropdown-${Math.random().toString(36).substr(2, 9)}`;
2965
2999
  const s = j();
@@ -3094,26 +3128,26 @@ class wr {
3094
3128
  }), this._mouseenterHandler && this.menu.removeEventListener("mouseenter", this._mouseenterHandler), this._mouseleaveHandler && this.menu.removeEventListener("mouseleave", this._mouseleaveHandler)), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this.appendToBody && this._originalParent && this._restoreMenuFromBody(), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._itemClickHandler = null, this._keydownHandler = null, this._mouseenterHandler = null, this._mouseleaveHandler = null, this._triggerMouseenterHandler = null, this._triggerMouseleaveHandler = null, this._triggerKeydownHandler = null, this.element.__kupolaInitialized = !1);
3095
3129
  }
3096
3130
  }
3097
- function Jt(i, t) {
3131
+ function te(i, t) {
3098
3132
  i._kupolaDropdown && i._kupolaDropdown.destroy();
3099
- const e = new wr(i, t);
3133
+ const e = new Dr(i, t);
3100
3134
  e.init(), i._kupolaDropdown = e;
3101
3135
  }
3102
- function go(i = document) {
3136
+ function Eo(i = document) {
3103
3137
  i.querySelectorAll(".ds-dropdown").forEach((t) => {
3104
- Jt(t);
3138
+ te(t);
3105
3139
  });
3106
3140
  }
3107
- function Zt(i) {
3141
+ function ee(i) {
3108
3142
  i._kupolaDropdown && (i._kupolaDropdown.destroy(), i._kupolaDropdown = null);
3109
3143
  }
3110
- function _o() {
3144
+ function wo() {
3111
3145
  document.querySelectorAll(".ds-dropdown").forEach((i) => {
3112
- Zt(i);
3146
+ ee(i);
3113
3147
  });
3114
3148
  }
3115
- E.register("dropdown", Jt, Zt);
3116
- class kr {
3149
+ E.register("dropdown", te, ee);
3150
+ class Hr {
3117
3151
  constructor(t, e = {}) {
3118
3152
  this.element = t, this.trigger = t.querySelector(".ds-select__trigger"), this.valueEl = t.querySelector(".ds-select__value") || t.querySelector(".ds-select__trigger span"), this.optionsEl = t.querySelector(".ds-select__options") || t.querySelector(".ds-select__menu"), this.nativeSelect = t.querySelector("select"), this.icon = t.querySelector(".ds-select__icon"), this.scope = `select-${Math.random().toString(36).substr(2, 9)}`, this.multiple = e.multiple || t.hasAttribute("data-select-multiple"), this.searchable = e.searchable || t.hasAttribute("data-select-search"), this.clearable = e.clearable || t.hasAttribute("data-select-clear"), this.placeholder = e.placeholder || t.getAttribute("data-select-placeholder") || "", this.disabled = e.disabled || t.hasAttribute("data-select-disabled"), this.maxSelection = e.maxSelection || parseInt(t.getAttribute("data-select-max")) || 1 / 0, this.remoteMethod = e.remoteMethod || null, this.onChange = e.onChange || null, this.appendToBody = e.appendToBody !== !1, this.isOpen = !1, this.selectedValues = /* @__PURE__ */ new Set(), this.allOptions = [], this.filteredOptions = [], this.focusIndex = -1, this.searchInput = null, this.clearBtn = null, this.tagsWrap = null, this._originalParent = null, this._originalPosition = null, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._optionClickHandler = null, this._keydownHandler = null;
3119
3153
  }
@@ -3359,20 +3393,20 @@ class kr {
3359
3393
  }), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this.searchInput && this.searchInput.remove(), this.clearBtn && this.clearBtn.remove(), this.tagsWrap && this.tagsWrap.remove(), this.appendToBody && this._originalParent && this._restoreOptionsFromBody(), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._optionClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
3360
3394
  }
3361
3395
  }
3362
- function Gt(i, t) {
3363
- const e = new kr(i, t);
3396
+ function se(i, t) {
3397
+ const e = new Hr(i, t);
3364
3398
  e.init(), i._kupolaSelect = e;
3365
3399
  }
3366
- function yo(i = document) {
3400
+ function ko(i = document) {
3367
3401
  i.querySelectorAll(".ds-select").forEach((t) => {
3368
- Gt(t);
3402
+ se(t);
3369
3403
  });
3370
3404
  }
3371
- function Cr(i) {
3405
+ function Mr(i) {
3372
3406
  i._kupolaSelect && (i._kupolaSelect.destroy(), i._kupolaSelect = null);
3373
3407
  }
3374
- E.register("select", Gt, Cr);
3375
- class Sr {
3408
+ E.register("select", se, Mr);
3409
+ class Ir {
3376
3410
  constructor(t, e = {}) {
3377
3411
  this.element = t, this.input = t.querySelector("input"), this.endInput = t.querySelector(".ds-datepicker__end-input"), this.icon = t.querySelector(".ds-datepicker__icon"), this.calendarEl = t.querySelector(".ds-datepicker__calendar"), this.scope = `datepicker-${Math.random().toString(36).substr(2, 9)}`;
3378
3412
  const s = j(), n = s.datepicker?.weekStart !== void 0 ? s.datepicker.weekStart : 1;
@@ -3635,20 +3669,20 @@ class Sr {
3635
3669
  }), this.appendToBody && this._originalParent && this._restoreCalendarFromBody(), this._documentClickHandler = null, this._resizeHandler = null, this._documentClickListener = null, this._resizeListener = null, this._iconClickHandler = null, this._inputClickHandler = null, this._endInputClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
3636
3670
  }
3637
3671
  }
3638
- function Qt(i, t) {
3639
- const e = new Sr(i, t);
3672
+ function ie(i, t) {
3673
+ const e = new Ir(i, t);
3640
3674
  e.init(), i._kupolaDatepicker = e;
3641
3675
  }
3642
- function vo(i = document) {
3676
+ function Co(i = document) {
3643
3677
  i.querySelectorAll(".ds-datepicker").forEach((t) => {
3644
- Qt(t);
3678
+ ie(t);
3645
3679
  });
3646
3680
  }
3647
- function Lr(i) {
3681
+ function Tr(i) {
3648
3682
  i._kupolaDatepicker && (i._kupolaDatepicker.destroy(), i._kupolaDatepicker = null);
3649
3683
  }
3650
- E.register("datepicker", Qt, Lr);
3651
- class Dr {
3684
+ E.register("datepicker", ie, Tr);
3685
+ class Ar {
3652
3686
  constructor(t, e = {}) {
3653
3687
  this.element = t, this.input = t.querySelector("input"), this.inputWrap = t.querySelector(".ds-timepicker__input-wrap"), this.panelEl = null, this.scope = `timepicker-${Math.random().toString(36).substr(2, 9)}`, this.showSeconds = e.showSeconds || t.hasAttribute("data-timepicker-seconds"), this.use12Hour = e.use12Hour || t.hasAttribute("data-timepicker-12h"), this.hourStep = e.hourStep || parseInt(t.getAttribute("data-timepicker-hour-step")) || 1, this.minuteStep = e.minuteStep || parseInt(t.getAttribute("data-timepicker-minute-step")) || 5, this.secondStep = e.secondStep || parseInt(t.getAttribute("data-timepicker-second-step")) || 5, this.minTime = e.minTime || t.getAttribute("data-timepicker-min") || null, this.maxTime = e.maxTime || t.getAttribute("data-timepicker-max") || null, this.disabledTime = e.disabledTime || null, this.placeholder = e.placeholder || t.getAttribute("data-timepicker-placeholder") || "", this.clearable = e.clearable || t.hasAttribute("data-timepicker-clear"), this.onChange = e.onChange || null, this.selectedHour = 12, this.selectedMinute = 0, this.selectedSecond = 0, this.isPM = !1, this._inputWrapClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._resizeHandler = null, this._resizeListener = null, this._keydownHandler = null;
3654
3688
  }
@@ -3830,20 +3864,20 @@ class Dr {
3830
3864
  this.element.__kupolaInitialized && (this.inputWrap && this._inputWrapClickHandler && this.inputWrap.removeEventListener("click", this._inputWrapClickHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this._resizeListener && this._resizeListener.unsubscribe ? this._resizeListener.unsubscribe() : this._resizeHandler && window.removeEventListener("resize", this._resizeHandler), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this.panelEl && (this.panelEl.remove(), this.panelEl = null), this._inputWrapClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._resizeHandler = null, this._resizeListener = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
3831
3865
  }
3832
3866
  }
3833
- function te(i, t) {
3834
- const e = new Dr(i, t);
3867
+ function ne(i, t) {
3868
+ const e = new Ar(i, t);
3835
3869
  e.init(), i._kupolaTimepicker = e;
3836
3870
  }
3837
- function bo(i = document) {
3871
+ function So(i = document) {
3838
3872
  i.querySelectorAll(".ds-timepicker").forEach((t) => {
3839
- te(t);
3873
+ ne(t);
3840
3874
  });
3841
3875
  }
3842
- function Hr(i) {
3876
+ function zr(i) {
3843
3877
  i._kupolaTimepicker && (i._kupolaTimepicker.destroy(), i._kupolaTimepicker = null);
3844
3878
  }
3845
- E.register("timepicker", te, Hr);
3846
- class Mr {
3879
+ E.register("timepicker", ne, zr);
3880
+ class Pr {
3847
3881
  constructor(t, e = {}) {
3848
3882
  if (this.element = t, this.track = t.querySelector(".ds-slider__track"), this.fill = t.querySelector(".ds-slider__fill"), this.input = t.querySelector(".ds-slider__input"), this.valueEl = t.querySelector(".ds-slider__value"), this.range = e.range || t.hasAttribute("data-slider-range"), this.vertical = e.vertical || t.hasAttribute("data-slider-vertical"), this.disabled = e.disabled || t.hasAttribute("data-slider-disabled"), this.showTooltip = e.showTooltip !== !1, this.showMarks = e.marks || t.hasAttribute("data-slider-marks"), this.markStep = e.markStep || parseInt(t.getAttribute("data-slider-mark-step")) || 10, this.tooltipFormat = e.tooltipFormat || ((s) => s), this.onChange = e.onChange || null, this.onInput = e.onInput || null, this.inputEnd = t.querySelector(".ds-slider__input--end"), this.fillEnd = null, this.thumbStart = null, this.thumbEnd = null, this.tooltipStart = null, this.tooltipEnd = null, this.marksEl = null, this._listeners = [], this._isDragging = !1, this._activeThumb = null, !this.track || !this.fill)
3849
3883
  throw new Error("Slider: Missing required elements");
@@ -3991,26 +4025,26 @@ class Mr {
3991
4025
  this.disabled = !0, this.element.classList.add("is-disabled");
3992
4026
  }
3993
4027
  }
3994
- function ee(i, t) {
4028
+ function re(i, t) {
3995
4029
  if (!i.__kupolaInitialized)
3996
4030
  try {
3997
- const e = new Mr(i, t);
4031
+ const e = new Pr(i, t);
3998
4032
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
3999
4033
  } catch (e) {
4000
4034
  console.error("[Slider] Error initializing:", e);
4001
4035
  }
4002
4036
  }
4003
- function Ir(i) {
4037
+ function $r(i) {
4004
4038
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
4005
4039
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
4006
4040
  }
4007
- function xo() {
4041
+ function Lo() {
4008
4042
  document.querySelectorAll(".ds-slider").forEach((i) => {
4009
- ee(i);
4043
+ re(i);
4010
4044
  });
4011
4045
  }
4012
- E.register("slider", ee, Ir);
4013
- class Tr {
4046
+ E.register("slider", re, $r);
4047
+ class Br {
4014
4048
  constructor(t, e = {}) {
4015
4049
  this.element = t, this.track = t.querySelector(".ds-carousel__track"), this.items = t.querySelectorAll(".ds-carousel__item"), this.prevBtn = t.querySelector(".ds-carousel__prev"), this.nextBtn = t.querySelector(".ds-carousel__next"), this.indicators = t.querySelectorAll(".ds-carousel__indicator"), this.autoBtn = t.querySelector(".ds-carousel__auto"), this.mode = e.mode || t.getAttribute("data-carousel-mode") || "slide", this.vertical = e.vertical || t.hasAttribute("data-carousel-vertical"), this.autoPlay = e.autoPlay !== !1, this.interval = e.interval || parseInt(t.getAttribute("data-carousel-interval")) || 3e3, this.transitionDuration = e.transitionDuration || parseInt(t.getAttribute("data-carousel-duration")) || 500, this.loop = e.loop !== !1, this.pauseOnHover = e.pauseOnHover !== !1, this.swipe = e.swipe !== !1, this.swipeThreshold = e.swipeThreshold || 50, this.keyboardNav = e.keyboardNav || t.hasAttribute("data-carousel-keyboard"), this.onChange = e.onChange || null, this.currentIndex = 0, this.totalItems = this.items.length, this.autoPlayTimer = null, this.isAutoPlaying = !1, this.isTransitioning = !1, this.touchStartX = 0, this.touchStartY = 0, this.touchDeltaX = 0, this.touchDeltaY = 0, this.isSwiping = !1, this._mouseEnterHandler = () => {
4016
4050
  this.pauseOnHover && this.stopAutoPlay();
@@ -4091,22 +4125,22 @@ class Tr {
4091
4125
  }), this._touchStartHandler && this.element.removeEventListener("touchstart", this._touchStartHandler), this._touchMoveHandler && this.element.removeEventListener("touchmove", this._touchMoveHandler), this._touchEndHandler && this.element.removeEventListener("touchend", this._touchEndHandler), this._keydownHandler && this.element.removeEventListener("keydown", this._keydownHandler), this._prevClickHandler = null, this._nextClickHandler = null, this._autoClickHandler = null, this._indicatorClickHandlers = null;
4092
4126
  }
4093
4127
  }
4094
- function se(i, t) {
4128
+ function ae(i, t) {
4095
4129
  if (i.__kupolaInitialized) return;
4096
- const e = new Tr(i, t);
4130
+ const e = new Br(i, t);
4097
4131
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
4098
4132
  }
4099
- function Eo(i = document) {
4133
+ function Do(i = document) {
4100
4134
  i.querySelectorAll(".ds-carousel").forEach((t) => {
4101
- se(t);
4135
+ ae(t);
4102
4136
  });
4103
4137
  }
4104
- function Ar(i) {
4138
+ function qr(i) {
4105
4139
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
4106
4140
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
4107
4141
  }
4108
- E.register("carousel", se, Ar);
4109
- class zr {
4142
+ E.register("carousel", ae, qr);
4143
+ class Or {
4110
4144
  constructor(t, e = {}) {
4111
4145
  this.element = t, this.mask = t.querySelector(".ds-drawer-mask"), this.drawerEl = t.querySelector(".ds-drawer"), this.placement = e.placement || t.getAttribute("data-drawer-placement") || "right", this.width = e.width || t.getAttribute("data-drawer-width") || "400px", this.height = e.height || t.getAttribute("data-drawer-height") || "400px", this.escClose = e.escClose !== !1, this.maskClosable = e.maskClosable !== !1, this.showMask = e.showMask !== !1, this.onOpen = e.onOpen || null, this.onClose = e.onClose || null, this.onBeforeClose = e.onBeforeClose || null, this._keydownHandler = null, this._bindEvents();
4112
4146
  }
@@ -4143,20 +4177,20 @@ class zr {
4143
4177
  return this.drawerEl?.classList.contains("is-visible") || !1;
4144
4178
  }
4145
4179
  }
4146
- function lt(i, t) {
4180
+ function ht(i, t) {
4147
4181
  if (i.__kupolaInitialized) return;
4148
- const e = new zr(i, t);
4182
+ const e = new Or(i, t);
4149
4183
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
4150
4184
  }
4151
- function Pr(i) {
4185
+ function Fr(i) {
4152
4186
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
4153
4187
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
4154
4188
  }
4155
- function wo() {
4189
+ function Ho() {
4156
4190
  document.querySelectorAll("[data-drawer]").forEach((i) => {
4157
4191
  i.addEventListener("click", () => {
4158
4192
  const t = i.getAttribute("data-drawer"), e = document.getElementById(t);
4159
- e && (lt(e, {
4193
+ e && (ht(e, {
4160
4194
  placement: i.getAttribute("data-drawer-placement") || "right",
4161
4195
  width: i.getAttribute("data-drawer-width"),
4162
4196
  height: i.getAttribute("data-drawer-height")
@@ -4164,10 +4198,10 @@ function wo() {
4164
4198
  });
4165
4199
  }), document.querySelectorAll(".ds-drawer-mask").forEach((i) => {
4166
4200
  const t = i.parentElement;
4167
- t && lt(t);
4201
+ t && ht(t);
4168
4202
  });
4169
4203
  }
4170
- E.register("drawer", lt, Pr);
4204
+ E.register("drawer", ht, Fr);
4171
4205
  class $ {
4172
4206
  constructor(t, e = {}) {
4173
4207
  this.element = t, this.mask = t.querySelector(".ds-modal-mask"), this.modal = t.querySelector(".ds-modal"), this.closeBtn = t.querySelector(".ds-modal__close");
@@ -4204,7 +4238,7 @@ class $ {
4204
4238
  }
4205
4239
  }
4206
4240
  $._openCount = 0;
4207
- function ie(i = {}) {
4241
+ function oe(i = {}) {
4208
4242
  const {
4209
4243
  title: t = "",
4210
4244
  content: e = "",
@@ -4252,8 +4286,8 @@ function ie(i = {}) {
4252
4286
  const z = C.querySelector(".ds-modal__body");
4253
4287
  z && (s ? z.innerHTML = e : z.textContent = e);
4254
4288
  const D = C.querySelector("[data-modal-confirm]"), q = C.querySelector("[data-modal-cancel]");
4255
- let pt = !1;
4256
- const ft = async () => {
4289
+ let gt = !1;
4290
+ const _t = async () => {
4257
4291
  if (p) {
4258
4292
  D.disabled = !0, D.classList.add("is-loading");
4259
4293
  try {
@@ -4266,52 +4300,52 @@ function ie(i = {}) {
4266
4300
  return;
4267
4301
  }
4268
4302
  }
4269
- pt = !0, k.close();
4270
- }, mt = () => {
4303
+ gt = !0, k.close();
4304
+ }, yt = () => {
4271
4305
  m && m(), k.close();
4272
4306
  };
4273
- D && D.addEventListener("click", ft), q && q.addEventListener("click", mt);
4274
- const ke = () => {
4307
+ D && D.addEventListener("click", _t), q && q.addEventListener("click", yt);
4308
+ const De = () => {
4275
4309
  setTimeout(() => {
4276
- D && D.removeEventListener("click", ft), q && q.removeEventListener("click", mt), k.destroy(), C.remove(), _ && _(pt);
4310
+ D && D.removeEventListener("click", _t), q && q.removeEventListener("click", yt), k.destroy(), C.remove(), _ && _(gt);
4277
4311
  }, 300);
4278
- }, Ce = k.close.bind(k);
4312
+ }, He = k.close.bind(k);
4279
4313
  return k.close = () => {
4280
- Ce(), ke();
4314
+ He(), De();
4281
4315
  }, k.open(), y && setTimeout(() => y(), 50), k;
4282
4316
  }
4283
- function ko(i) {
4284
- return typeof i == "string" && (i = { content: i }), ie({
4317
+ function Mo(i) {
4318
+ return typeof i == "string" && (i = { content: i }), oe({
4285
4319
  ...i,
4286
4320
  showCancel: !0,
4287
4321
  showConfirm: !0
4288
4322
  });
4289
4323
  }
4290
- function Co(i) {
4291
- return typeof i == "string" && (i = { content: i }), ie({
4324
+ function Io(i) {
4325
+ return typeof i == "string" && (i = { content: i }), oe({
4292
4326
  ...i,
4293
4327
  showCancel: !1,
4294
4328
  showConfirm: !0
4295
4329
  });
4296
4330
  }
4297
- function ne(i) {
4331
+ function le(i) {
4298
4332
  if (i.__kupolaInitialized)
4299
4333
  return;
4300
4334
  const t = new $(i);
4301
4335
  i.__kupolaInstance = t, i.__kupolaInitialized = !0;
4302
4336
  }
4303
- function $r(i) {
4337
+ function Nr(i) {
4304
4338
  if (!i.__kupolaInitialized || !i.__kupolaInstance)
4305
4339
  return;
4306
4340
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
4307
4341
  }
4308
- function So() {
4342
+ function To() {
4309
4343
  document.querySelectorAll(".ds-modal-container").forEach((i) => {
4310
- ne(i);
4344
+ le(i);
4311
4345
  });
4312
4346
  }
4313
- E.register("modal", ne, $r);
4314
- class Lo {
4347
+ E.register("modal", le, Nr);
4348
+ class Ao {
4315
4349
  static normal(t = {}) {
4316
4350
  return this._create({ type: "normal", ...t });
4317
4351
  }
@@ -4376,7 +4410,7 @@ class Lo {
4376
4410
  return c.classList.add("is-visible"), document.body.style.overflow = "hidden", h && h.addEventListener("click", p), d && d.addEventListener("click", m), c.addEventListener("click", f), document.addEventListener("keydown", u), { close: y };
4377
4411
  }
4378
4412
  }
4379
- const Do = {
4413
+ const zo = {
4380
4414
  normal: function(i) {
4381
4415
  this.show({ ...i, type: "normal" });
4382
4416
  },
@@ -4393,7 +4427,7 @@ const Do = {
4393
4427
  this.show({ ...i, type: "info" });
4394
4428
  },
4395
4429
  show: function(i) {
4396
- const t = fr(), { title: e, message: s, type: n = "normal", duration: r = t.duration, position: a = t.position } = i, o = document.createElement("div");
4430
+ const t = vr(), { title: e, message: s, type: n = "normal", duration: r = t.duration, position: a = t.position } = i, o = document.createElement("div");
4397
4431
  o.className = `ds-notification__item ds-notification__item--${n}`;
4398
4432
  const l = {
4399
4433
  normal: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',
@@ -4427,9 +4461,9 @@ const Do = {
4427
4461
  }, r);
4428
4462
  }
4429
4463
  };
4430
- function Ho() {
4464
+ function Po() {
4431
4465
  }
4432
- const Mo = {
4466
+ const $o = {
4433
4467
  normal: function(i, t = {}) {
4434
4468
  this.show(i, "normal", t);
4435
4469
  },
@@ -4446,7 +4480,7 @@ const Mo = {
4446
4480
  this.show(i, "info", t);
4447
4481
  },
4448
4482
  show: function(i, t = "normal", e = {}) {
4449
- const s = pr(), { duration: n = s.duration, position: r = s.position } = e, a = s.maxCount || 5, o = document.createElement("div");
4483
+ const s = yr(), { duration: n = s.duration, position: r = s.position } = e, a = s.maxCount || 5, o = document.createElement("div");
4450
4484
  o.className = `ds-message__item ds-message__item--${t}`;
4451
4485
  const l = {
4452
4486
  normal: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',
@@ -4477,12 +4511,12 @@ const Mo = {
4477
4511
  }, n);
4478
4512
  }
4479
4513
  };
4480
- function Io() {
4514
+ function Bo() {
4481
4515
  }
4482
- function xt(i) {
4516
+ function Ct(i) {
4483
4517
  return i ? i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;") : "";
4484
4518
  }
4485
- class Br {
4519
+ class Rr {
4486
4520
  constructor(t) {
4487
4521
  this.element = t, this.dropzone = t.querySelector(".ds-fileupload__dropzone"), this.input = t.querySelector(".ds-fileupload__input"), this.list = t.querySelector(".ds-fileupload__list"), this.progress = t.querySelector(".ds-fileupload__preview"), this.files = [], this.maxSize = parseInt(t.getAttribute("data-max-size")) || 0, this.maxCount = parseInt(t.getAttribute("data-max-count")) || 0, this._listeners = [], this.init();
4488
4522
  }
@@ -4538,7 +4572,7 @@ class Br {
4538
4572
  <div class="ds-fileupload__icon" style="width: 24px; height: 24px; border-radius: 4px;">
4539
4573
  ${s}
4540
4574
  </div>
4541
- <span class="ds-fileupload__filename">${this.truncateFilename(xt(t.name))}</span>
4575
+ <span class="ds-fileupload__filename">${this.truncateFilename(Ct(t.name))}</span>
4542
4576
  <span class="ds-fileupload__size">${this.formatSize(t.size)}</span>
4543
4577
  <button class="ds-fileupload__remove" type="button" aria-label="Remove file">
4544
4578
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -4590,7 +4624,7 @@ class Br {
4590
4624
  e.onload = (s) => {
4591
4625
  const n = document.createElement("div");
4592
4626
  n.className = "ds-fileupload__preview-item", n.innerHTML = `
4593
- <img src="${s.target.result}" alt="${xt(t.name)}">
4627
+ <img src="${s.target.result}" alt="${Ct(t.name)}">
4594
4628
  <button class="ds-fileupload__preview-remove" type="button" aria-label="Remove preview">
4595
4629
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
4596
4630
  <path d="M18 6L6 18"/>
@@ -4640,22 +4674,22 @@ class Br {
4640
4674
  }), this._listeners = null, this.files = [], this.dropzone = null, this.input = null, this.list = null, this.progress = null, this.preview = null, this.element = null;
4641
4675
  }
4642
4676
  }
4643
- function re(i) {
4677
+ function ce(i) {
4644
4678
  if (i.__kupolaInitialized) return;
4645
- const t = new Br(i);
4679
+ const t = new Rr(i);
4646
4680
  i.__kupolaInstance = t, i.__kupolaInitialized = !0;
4647
4681
  }
4648
- function qr(i) {
4682
+ function Vr(i) {
4649
4683
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
4650
4684
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
4651
4685
  }
4652
- function To() {
4686
+ function qo() {
4653
4687
  document.querySelectorAll(".ds-fileupload").forEach((i) => {
4654
- re(i);
4688
+ ce(i);
4655
4689
  });
4656
4690
  }
4657
- E.register("fileupload", re, qr);
4658
- class Or {
4691
+ E.register("fileupload", ce, Vr);
4692
+ class Kr {
4659
4693
  constructor(t, e = {}) {
4660
4694
  this.element = t, this.headers = [], this._listeners = [], this.accordion = e.accordion || t.hasAttribute("data-collapse-accordion"), this.animationDuration = e.animationDuration || parseInt(t.getAttribute("data-collapse-duration")) || 300, this.disabledItems = e.disabledItems || [], this.defaultExpanded = e.defaultExpanded || [], this._init();
4661
4695
  }
@@ -4737,22 +4771,22 @@ class Or {
4737
4771
  this.headers[t] && (this.headers[t].isDisabled = !1, this.headers[t].item.classList.remove("is-disabled"));
4738
4772
  }
4739
4773
  }
4740
- function ae(i, t) {
4774
+ function he(i, t) {
4741
4775
  if (i.__kupolaInitialized) return;
4742
- const e = new Or(i, t);
4776
+ const e = new Kr(i, t);
4743
4777
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
4744
4778
  }
4745
- function Fr(i) {
4779
+ function Wr(i) {
4746
4780
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
4747
4781
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
4748
4782
  }
4749
- function Ao() {
4783
+ function Oo() {
4750
4784
  document.querySelectorAll(".ds-collapse").forEach((i) => {
4751
- ae(i);
4785
+ he(i);
4752
4786
  });
4753
4787
  }
4754
- E.register("collapse", ae, Fr);
4755
- class Nr {
4788
+ E.register("collapse", he, Wr);
4789
+ class Ur {
4756
4790
  constructor(t, e = {}) {
4757
4791
  this.element = t, this.trigger = t.querySelector(".ds-color-picker__trigger"), this.panel = t.querySelector(".ds-color-picker__panel"), this.valueSpan = t.querySelector(".ds-color-picker__value"), this.customInput = t.querySelector(".ds-color-picker__input"), this.scope = `colorpicker-${Math.random().toString(36).substr(2, 9)}`, this.options = e, this.value = e.value || "#007bff", this.showAlpha = e.showAlpha !== !1, this.mode = e.mode || "hex", this.previousColors = e.previousColors || this._getStoredColors(), this.previousColorsLimit = e.previousColorsLimit || 12, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._colorClickHandler = null, this._inputInputHandler = null, this._alphaChangeHandler = null, this._modeChangeHandler = null, this._hueChangeHandler = null, this._saturationChangeHandler = null, this._valueChangeHandler = null, this.hue = 210, this.saturation = 100, this.brightness = 50, this.alpha = 100, this._colorStringToHSB(this.value);
4758
4792
  }
@@ -4917,20 +4951,20 @@ class Nr {
4917
4951
  }), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._colorClickHandler = null, this._inputInputHandler = null, this._alphaChangeHandler = null, this._modeChangeHandler = null, this._hueChangeHandler = null, this._saturationChangeHandler = null, this._valueChangeHandler = null, this.element.__kupolaInitialized = !1;
4918
4952
  }
4919
4953
  }
4920
- function oe(i, t) {
4921
- const e = new Nr(i, t);
4954
+ function de(i, t) {
4955
+ const e = new Ur(i, t);
4922
4956
  e.init(), i._kupolaColorPicker = e;
4923
4957
  }
4924
- function zo(i = document) {
4958
+ function Fo(i = document) {
4925
4959
  i.querySelectorAll(".ds-color-picker").forEach((t) => {
4926
- oe(t);
4960
+ de(t);
4927
4961
  });
4928
4962
  }
4929
- function Rr(i) {
4963
+ function Yr(i) {
4930
4964
  i._kupolaColorPicker && (i._kupolaColorPicker.destroy(), i._kupolaColorPicker = null);
4931
4965
  }
4932
- E.register("color-picker", oe, Rr);
4933
- class Vr {
4966
+ E.register("color-picker", de, Yr);
4967
+ class Xr {
4934
4968
  constructor(t, e = {}) {
4935
4969
  if (this.element = t, this.titleEl = t.querySelector(".ds-calendar__title"), this.daysEl = t.querySelector(".ds-calendar__days"), this.prevBtn = t.querySelector(".ds-calendar__nav--prev"), this.nextBtn = t.querySelector(".ds-calendar__nav--next"), this.todayBtn = t.querySelector(".ds-calendar__nav--today"), this._listeners = [], !this.titleEl || !this.daysEl)
4936
4970
  throw new Error("Calendar: Missing required elements");
@@ -5127,26 +5161,26 @@ class Vr {
5127
5161
  this.isRangeMode = !this.isRangeMode, this.rangeStart = null, this.rangeEnd = null, this.render(), this._emitChange();
5128
5162
  }
5129
5163
  }
5130
- function le(i, t) {
5164
+ function ue(i, t) {
5131
5165
  if (!i.__kupolaInitialized)
5132
5166
  try {
5133
- const e = new Vr(i, t);
5167
+ const e = new Xr(i, t);
5134
5168
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
5135
5169
  } catch (e) {
5136
5170
  console.error("[Calendar] Error initializing:", e);
5137
5171
  }
5138
5172
  }
5139
- function Kr(i) {
5173
+ function jr(i) {
5140
5174
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
5141
5175
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
5142
5176
  }
5143
- function Po() {
5177
+ function No() {
5144
5178
  document.querySelectorAll(".ds-calendar").forEach((i) => {
5145
- le(i);
5179
+ ue(i);
5146
5180
  });
5147
5181
  }
5148
- E.register("calendar", le, Kr);
5149
- class Wr {
5182
+ E.register("calendar", ue, jr);
5183
+ class Jr {
5150
5184
  constructor(t, e = {}) {
5151
5185
  this.element = t, this.input = t.querySelector(".ds-dynamic-tags__input"), this._listeners = [], this.maxCount = e.maxCount || parseInt(t.getAttribute("data-dynamic-tags-max")) || 1 / 0, this.allowDuplicates = e.allowDuplicates !== !1, this.color = e.color || t.getAttribute("data-dynamic-tags-color") || "default", this.init();
5152
5186
  }
@@ -5292,22 +5326,22 @@ class Wr {
5292
5326
  }), this._listeners = null, this.input = null, this.element = null;
5293
5327
  }
5294
5328
  }
5295
- function ce(i, t) {
5329
+ function pe(i, t) {
5296
5330
  if (i.__kupolaInitialized) return;
5297
- const e = new Wr(i, t);
5331
+ const e = new Jr(i, t);
5298
5332
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
5299
5333
  }
5300
- function Ur(i) {
5334
+ function Zr(i) {
5301
5335
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
5302
5336
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
5303
5337
  }
5304
- function $o() {
5338
+ function Ro() {
5305
5339
  document.querySelectorAll(".ds-dynamic-tags").forEach((i) => {
5306
- ce(i);
5340
+ pe(i);
5307
5341
  });
5308
5342
  }
5309
- E.register("dynamic-tags", ce, Ur);
5310
- class he {
5343
+ E.register("dynamic-tags", pe, Zr);
5344
+ class fe {
5311
5345
  constructor(t = {}) {
5312
5346
  this.images = t.images || [], this.currentIndex = t.currentIndex || 0, this.overlay = null, this.closeHandler = this.close.bind(this), this.keyHandler = this.handleKeydown.bind(this), this.clickHandler = this.handleOverlayClick.bind(this), this.zoom = 1, this.rotation = 0, this.zoomStep = t.zoomStep || 0.2, this.minZoom = t.minZoom || 0.5, this.maxZoom = t.maxZoom || 3, this.init();
5313
5347
  }
@@ -5499,18 +5533,18 @@ class he {
5499
5533
  }
5500
5534
  }
5501
5535
  let V = null;
5502
- function Bo() {
5503
- V || (V = new he()), document.querySelectorAll("[data-image-preview]").forEach((i) => {
5536
+ function Vo() {
5537
+ V || (V = new fe()), document.querySelectorAll("[data-image-preview]").forEach((i) => {
5504
5538
  i.addEventListener("click", () => {
5505
5539
  const t = JSON.parse(i.getAttribute("data-image-preview")), e = parseInt(i.getAttribute("data-image-index")) || 0;
5506
5540
  V.show(t, e);
5507
5541
  });
5508
5542
  });
5509
5543
  }
5510
- function qo(i, t = 0) {
5511
- V || (V = new he()), V.show(i, t);
5544
+ function Ko(i, t = 0) {
5545
+ V || (V = new fe()), V.show(i, t);
5512
5546
  }
5513
- class Yr {
5547
+ class Gr {
5514
5548
  constructor(t, e = {}) {
5515
5549
  this.element = t, this.closeBtn = t.querySelector(".ds-tag__close"), this.checkbox = t.querySelector(".ds-tag__checkbox"), this.editInput = t.querySelector(".ds-tag__input"), this._listeners = [], this.color = e.color || t.getAttribute("data-tag-color") || "default", this.size = e.size || t.getAttribute("data-tag-size") || "default", this.checkable = e.checkable || t.hasAttribute("data-tag-checkable"), this.checked = e.checked || t.hasAttribute("data-tag-checked"), this.editable = e.editable || t.hasAttribute("data-tag-editable"), this.maxLength = e.maxLength || parseInt(t.getAttribute("data-tag-maxlength")) || 50, this.init();
5516
5550
  }
@@ -5640,22 +5674,22 @@ class Yr {
5640
5674
  }), this._listeners = [], this.closeBtn = null, this.checkbox = null, this.editInput = null, this.element = null;
5641
5675
  }
5642
5676
  }
5643
- function de(i, t) {
5677
+ function me(i, t) {
5644
5678
  if (i.__kupolaInitialized) return;
5645
- const e = new Yr(i, t);
5679
+ const e = new Gr(i, t);
5646
5680
  i.__kupolaInstance = e, i.__kupolaInitialized = !0;
5647
5681
  }
5648
- function Xr(i) {
5682
+ function Qr(i) {
5649
5683
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
5650
5684
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
5651
5685
  }
5652
- function Oo() {
5686
+ function Wo() {
5653
5687
  document.querySelectorAll(".ds-tag").forEach((i) => {
5654
- de(i);
5688
+ me(i);
5655
5689
  });
5656
5690
  }
5657
- E.register("tag", de, Xr);
5658
- class jr {
5691
+ E.register("tag", me, Qr);
5692
+ class ta {
5659
5693
  constructor(t) {
5660
5694
  this.element = t, this.valueElement = t.querySelector(".ds-statcard__value"), this.progressFill = t.querySelector(".ds-statcard__progress-fill"), this.animated = !1, this._observer = null, this.init();
5661
5695
  }
@@ -5715,22 +5749,22 @@ class jr {
5715
5749
  this._observer && (this._observer.disconnect(), this._observer = null), this.animated = !1, this.valueElement = null, this.progressFill = null, this.element = null;
5716
5750
  }
5717
5751
  }
5718
- function ue(i) {
5752
+ function ge(i) {
5719
5753
  if (i.__kupolaInitialized) return;
5720
- const t = new jr(i);
5754
+ const t = new ta(i);
5721
5755
  i.__kupolaInstance = t, i.__kupolaInitialized = !0;
5722
5756
  }
5723
- function Jr(i) {
5757
+ function ea(i) {
5724
5758
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
5725
5759
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
5726
5760
  }
5727
- function Fo() {
5761
+ function Uo() {
5728
5762
  document.querySelectorAll(".ds-statcard").forEach((i) => {
5729
- ue(i);
5763
+ ge(i);
5730
5764
  });
5731
5765
  }
5732
- E.register("statcard", ue, Jr);
5733
- class Zr {
5766
+ E.register("statcard", ge, ea);
5767
+ class sa {
5734
5768
  constructor(t, e = {}) {
5735
5769
  this.element = t, this.data = e.data || [], this.startDate = e.startDate || this.getOneYearAgo(), this.endDate = e.endDate || /* @__PURE__ */ new Date(), this.cellSize = e.cellSize || 14, this.onCellClick = e.onCellClick || null, this.tooltip = null, this.baseColor = e.color || t.getAttribute("data-color") || "#22c55e", this._listeners = [], this.init();
5736
5770
  }
@@ -5885,7 +5919,7 @@ class Zr {
5885
5919
  }), this._listeners = null, this.tooltip && this.tooltip.parentNode && this.tooltip.parentNode.removeChild(this.tooltip), this.tooltip = null, this.data = [], this.element = null;
5886
5920
  }
5887
5921
  }
5888
- function pe(i) {
5922
+ function _e(i) {
5889
5923
  if (i.__kupolaInitialized) return;
5890
5924
  const t = i.getAttribute("data-heatmap-data");
5891
5925
  let e = [];
@@ -5893,27 +5927,27 @@ function pe(i) {
5893
5927
  try {
5894
5928
  e = JSON.parse(t);
5895
5929
  } catch {
5896
- e = Et();
5930
+ e = St();
5897
5931
  }
5898
5932
  else
5899
- e = Et();
5900
- const s = new Zr(i, {
5933
+ e = St();
5934
+ const s = new sa(i, {
5901
5935
  data: e,
5902
5936
  onCellClick: (n) => {
5903
5937
  }
5904
5938
  });
5905
5939
  i.__kupolaInstance = s, i.__kupolaInitialized = !0;
5906
5940
  }
5907
- function Gr(i) {
5941
+ function ia(i) {
5908
5942
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
5909
5943
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
5910
5944
  }
5911
- function No() {
5945
+ function Yo() {
5912
5946
  document.querySelectorAll(".ds-heatmap").forEach((i) => {
5913
- pe(i);
5947
+ _e(i);
5914
5948
  });
5915
5949
  }
5916
- function Et() {
5950
+ function St() {
5917
5951
  const i = [], t = /* @__PURE__ */ new Date(), e = /* @__PURE__ */ new Date();
5918
5952
  e.setFullYear(e.getFullYear() - 1);
5919
5953
  for (let s = new Date(e); s <= t; s.setDate(s.getDate() + 1)) {
@@ -5925,8 +5959,8 @@ function Et() {
5925
5959
  }
5926
5960
  return i;
5927
5961
  }
5928
- E.register("heatmap", pe, Gr);
5929
- class Qr {
5962
+ E.register("heatmap", _e, ia);
5963
+ class na {
5930
5964
  constructor(t, e = {}) {
5931
5965
  this.element = t, this.tooltipEl = null, this.options = e;
5932
5966
  const s = j(), n = s.tooltip?.delay !== void 0 ? s.tooltip.delay : 300;
@@ -6027,20 +6061,20 @@ class Qr {
6027
6061
  this.element.__kupolaInitialized && (this._showTimer && (clearTimeout(this._showTimer), this._showTimer = null), this._hideTimer && (clearTimeout(this._hideTimer), this._hideTimer = null), (this.trigger === "hover" || this.trigger === "focus") && (this.element.removeEventListener("mouseenter", this._showTooltip), this.element.removeEventListener("mouseleave", this._hideTooltip)), this.trigger === "click" && this.element.removeEventListener("click", this._clickHandler), (this.trigger === "focus" || this.trigger === "hover") && (this.element.removeEventListener("focus", this._showTooltip), this.element.removeEventListener("blur", this._hideTooltip)), this.mouseFollow && this.element.removeEventListener("mousemove", this._mouseMoveHandler), this.tooltipEl && (this.tooltipEl.remove(), this.tooltipEl = null), this.isVisible = !1, this._showTooltip = null, this._hideTooltip = null, this._clickHandler = null, this._mouseMoveHandler = null, this.element.__kupolaInitialized = !1);
6028
6062
  }
6029
6063
  }
6030
- function fe(i, t) {
6031
- const e = new Qr(i, t);
6064
+ function ye(i, t) {
6065
+ const e = new na(i, t);
6032
6066
  e.init(), i._kupolaTooltip = e;
6033
6067
  }
6034
- function Ro(i = document) {
6068
+ function Xo(i = document) {
6035
6069
  i.querySelectorAll("[data-tooltip]").forEach((t) => {
6036
- fe(t);
6070
+ ye(t);
6037
6071
  });
6038
6072
  }
6039
- function ta(i) {
6073
+ function ra(i) {
6040
6074
  i._kupolaTooltip && (i._kupolaTooltip.destroy(), i._kupolaTooltip = null);
6041
6075
  }
6042
- E.register("tooltip", fe, ta);
6043
- class ea {
6076
+ E.register("tooltip", ye, ra);
6077
+ class aa {
6044
6078
  constructor() {
6045
6079
  this.validators = {
6046
6080
  required: this.validateRequired,
@@ -6266,7 +6300,7 @@ class ea {
6266
6300
  }[t] || "Invalid input";
6267
6301
  }
6268
6302
  }
6269
- const P = new ea();
6303
+ const P = new aa();
6270
6304
  window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized = !0, document.addEventListener("DOMContentLoaded", () => {
6271
6305
  document.querySelectorAll("form[data-validation]").forEach((i) => {
6272
6306
  i.addEventListener("submit", async (t) => {
@@ -6296,7 +6330,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
6296
6330
  r && r.focus();
6297
6331
  }
6298
6332
  }), i.querySelectorAll("[data-validate]").forEach((t) => {
6299
- const e = mr(), s = e.trigger || "blur", n = () => {
6333
+ const e = br(), s = e.trigger || "blur", n = () => {
6300
6334
  e.showErrors && setTimeout(() => {
6301
6335
  const l = document.activeElement;
6302
6336
  if (l && l.closest(".ds-select"))
@@ -6310,7 +6344,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
6310
6344
  return (...d) => {
6311
6345
  clearTimeout(h), h = setTimeout(() => l(...d), c);
6312
6346
  };
6313
- }, a = ur(), o = r(() => {
6347
+ }, a = _r(), o = r(() => {
6314
6348
  if (!e.showErrors)
6315
6349
  return;
6316
6350
  const l = P.getValue(t);
@@ -6322,7 +6356,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
6322
6356
  });
6323
6357
  });
6324
6358
  }));
6325
- class sa {
6359
+ class oa {
6326
6360
  constructor(t, e = {}) {
6327
6361
  this.element = t, this.data = e.data || [], this.itemHeight = e.itemHeight || 48, this.itemWidth = e.itemWidth || 200, this.bufferSize = e.bufferSize || 5, this.renderItem = e.renderItem || this.defaultRenderItem, this.onItemClick = e.onItemClick || null, this.onItemSelect = e.onItemSelect || null, this.onScroll = e.onScroll || null, this.onScrollEnd = e.onScrollEnd || null, this.selectedKey = e.selectedKey || null, this.keyField = e.keyField || "id", this.useDynamicHeight = e.useDynamicHeight || !1, this.dynamicHeightCache = /* @__PURE__ */ new Map(), this.estimatedHeight = e.estimatedHeight || 48, this.container = null, this.scrollbarTrack = null, this.scrollbarThumb = null, this.totalHeight = 0, this.startIndex = 0, this.endIndex = 0, this.isScrolling = !1, this.scrollTimeout = null, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.init();
6328
6362
  }
@@ -6561,7 +6595,7 @@ class sa {
6561
6595
  }), this.data = [], this.dynamicHeightCache.clear(), this.container.innerHTML = "", this._listeners = null, this._scrollHandler = null, this._thumbDragStartHandler = null, this._thumbDragMoveHandler = null, this._thumbDragEndHandler = null, this._wheelHandler = null, this.container = null, this.scrollbarThumb = null, this.element = null;
6562
6596
  }
6563
6597
  }
6564
- function wt(i = 1e3) {
6598
+ function Lt(i = 1e3) {
6565
6599
  const t = [], e = ["Document", "Image", "Video", "Folder", "Archive", "Spreadsheet", "Presentation", "Code"];
6566
6600
  for (let s = 1; s <= i; s++) {
6567
6601
  const n = Math.floor(Math.random() * e.length), r = Math.floor(Math.random() * 1e4);
@@ -6574,7 +6608,7 @@ function wt(i = 1e3) {
6574
6608
  }
6575
6609
  return t;
6576
6610
  }
6577
- function ia(i) {
6611
+ function la(i) {
6578
6612
  if (i.__kupolaInitialized) return;
6579
6613
  const t = i.getAttribute("data-virtual-list");
6580
6614
  let e = [];
@@ -6582,11 +6616,11 @@ function ia(i) {
6582
6616
  try {
6583
6617
  e = JSON.parse(t);
6584
6618
  } catch {
6585
- e = wt(1e3);
6619
+ e = Lt(1e3);
6586
6620
  }
6587
6621
  else
6588
- e = wt(1e3);
6589
- const s = new sa(i, {
6622
+ e = Lt(1e3);
6623
+ const s = new oa(i, {
6590
6624
  data: e,
6591
6625
  onItemClick: (n) => {
6592
6626
  },
@@ -6595,12 +6629,12 @@ function ia(i) {
6595
6629
  });
6596
6630
  i.__kupolaInstance = s, i.__kupolaInitialized = !0;
6597
6631
  }
6598
- function na(i) {
6632
+ function ca(i) {
6599
6633
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
6600
6634
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
6601
6635
  }
6602
- E.register("virtual-list", ia, na);
6603
- const ra = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="miter"', me = {
6636
+ E.register("virtual-list", la, ca);
6637
+ const ha = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="miter"', ve = {
6604
6638
  globe: '<circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15.3 15.3 0 0 1 0 20"/><path d="M12 2a15.3 15.3 0 0 0 0 20"/>',
6605
6639
  dashboard: '<rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/>',
6606
6640
  mouse: '<rect x="6" y="2" width="12" height="20" rx="6"/><line x1="12" y1="6" x2="12" y2="11"/>',
@@ -6710,19 +6744,19 @@ const ra = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0
6710
6744
  code: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
6711
6745
  apple: '<path fill="currentColor" stroke="none" d="M17.05 12.04c-.03-3.04 2.49-4.5 2.6-4.57-1.42-2.07-3.62-2.36-4.4-2.39-1.87-.19-3.65 1.1-4.6 1.1-.96 0-2.42-1.08-3.98-1.05-2.05.03-3.94 1.19-4.99 3.02-2.13 3.69-.54 9.13 1.53 12.12 1.01 1.46 2.21 3.1 3.78 3.04 1.52-.06 2.09-.98 3.93-.98 1.83 0 2.36.98 3.97.95 1.64-.03 2.68-1.49 3.68-2.96 1.16-1.7 1.64-3.35 1.66-3.43-.04-.02-3.18-1.22-3.21-4.85zM14.06 4.34c.83-1.01 1.39-2.41 1.24-3.81-1.2.05-2.65.8-3.51 1.8-.77.89-1.45 2.31-1.27 3.68 1.34.1 2.71-.68 3.54-1.67z"/>'
6712
6746
  };
6713
- function ge(i, t = 16, e = "0 0 24 24") {
6714
- const s = me[i];
6715
- return s ? `<svg ${ra.replace('width="16"', `width="${t}"`).replace('height="16"', `height="${t}"`).replace('viewBox="0 0 24 24"', `viewBox="${e}"`)}>${s}</svg>` : "";
6747
+ function be(i, t = 16, e = "0 0 24 24") {
6748
+ const s = ve[i];
6749
+ return s ? `<svg ${ha.replace('width="16"', `width="${t}"`).replace('height="16"', `height="${t}"`).replace('viewBox="0 0 24 24"', `viewBox="${e}"`)}>${s}</svg>` : "";
6716
6750
  }
6717
- function ct(i = document) {
6751
+ function dt(i = document) {
6718
6752
  i.querySelectorAll("[data-icon]").forEach((t) => {
6719
6753
  const e = t.getAttribute("data-icon"), s = +t.getAttribute("data-size") || 16, n = t.getAttribute("data-viewbox") || "0 0 24 24";
6720
- t.innerHTML = ge(e, s, n), t.classList.add("icon");
6754
+ t.innerHTML = be(e, s, n), t.classList.add("icon");
6721
6755
  });
6722
6756
  }
6723
- const Vo = { svg: ge, render: ct, PATHS: me };
6724
- typeof document < "u" && (document.readyState !== "loading" ? ct() : document.addEventListener("DOMContentLoaded", () => ct()));
6725
- class aa {
6757
+ const jo = { svg: be, render: dt, PATHS: ve };
6758
+ typeof document < "u" && (document.readyState !== "loading" ? dt() : document.addEventListener("DOMContentLoaded", () => dt()));
6759
+ class da {
6726
6760
  constructor(t) {
6727
6761
  this.element = t, this.hoursEl = t.querySelector(".ds-countdown__item--hours .ds-countdown__value"), this.minutesEl = t.querySelector(".ds-countdown__item--minutes .ds-countdown__value"), this.secondsEl = t.querySelector(".ds-countdown__item--seconds .ds-countdown__value"), this.endTime = this.parseEndTime(), this.interval = null, this.init();
6728
6762
  }
@@ -6774,22 +6808,22 @@ class aa {
6774
6808
  this.stop(), this.hoursEl = null, this.minutesEl = null, this.secondsEl = null, this.element = null;
6775
6809
  }
6776
6810
  }
6777
- function _e(i) {
6811
+ function xe(i) {
6778
6812
  if (i.__kupolaInitialized) return;
6779
- const t = new aa(i);
6813
+ const t = new da(i);
6780
6814
  i.__kupolaInstance = t, i.__kupolaInitialized = !0;
6781
6815
  }
6782
- function oa(i) {
6816
+ function ua(i) {
6783
6817
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
6784
6818
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
6785
6819
  }
6786
- function Ko() {
6820
+ function Jo() {
6787
6821
  document.querySelectorAll(".ds-countdown").forEach((t) => {
6788
- _e(t);
6822
+ xe(t);
6789
6823
  });
6790
6824
  }
6791
- E.register("countdown", _e, oa);
6792
- class la {
6825
+ E.register("countdown", xe, ua);
6826
+ class pa {
6793
6827
  constructor(t) {
6794
6828
  if (this.element = t, this.minusBtn = t.querySelector(".ds-number-input__btn--decrease"), this.plusBtn = t.querySelector(".ds-number-input__btn--increase"), this.inputEl = t.querySelector(".ds-number-input__input"), this._listeners = [], !this.minusBtn || !this.plusBtn || !this.inputEl)
6795
6829
  throw new Error("NumberInput: Missing required elements");
@@ -6840,26 +6874,26 @@ class la {
6840
6874
  }), this._listeners = null, this.minusBtn = null, this.plusBtn = null, this.inputEl = null, this.element = null;
6841
6875
  }
6842
6876
  }
6843
- function ye(i) {
6877
+ function Ee(i) {
6844
6878
  if (!i.__kupolaInitialized)
6845
6879
  try {
6846
- const t = new la(i);
6880
+ const t = new pa(i);
6847
6881
  i.__kupolaInstance = t, i.__kupolaInitialized = !0;
6848
6882
  } catch (t) {
6849
6883
  console.error("[NumberInput] Error initializing:", t);
6850
6884
  }
6851
6885
  }
6852
- function ca(i) {
6886
+ function fa(i) {
6853
6887
  if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
6854
6888
  i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
6855
6889
  }
6856
- function Wo() {
6890
+ function Zo() {
6857
6891
  document.querySelectorAll(".ds-number-input").forEach((i) => {
6858
- ye(i);
6892
+ Ee(i);
6859
6893
  });
6860
6894
  }
6861
- E.register("number-input", ye, ca);
6862
- class ha {
6895
+ E.register("number-input", Ee, fa);
6896
+ class ma {
6863
6897
  constructor(t) {
6864
6898
  this.container = t, this.track = t.querySelector(".ds-slider-captcha__track"), this.btn = t.querySelector(".ds-slider-captcha__btn"), this.text = t.querySelector(".ds-slider-captcha__text"), this.progress = t.querySelector(".ds-slider-captcha__progress"), this.statusEl = t.querySelector(".ds-slider-captcha__status"), this.refreshBtn = t.querySelector(".ds-slider-captcha__refresh"), this.footerRefreshBtn = t.querySelector(".ds-slider-captcha__footer-refresh"), this.config = {
6865
6899
  tolerance: 6,
@@ -7002,22 +7036,22 @@ class ha {
7002
7036
  this.container._initialized && (this.btn && this._mouseDownHandler && this.btn.removeEventListener("mousedown", this._mouseDownHandler), this.btn && this._touchStartHandler && this.btn.removeEventListener("touchstart", this._touchStartHandler), this.refreshBtn && this.refreshBtn.removeEventListener("click", () => this.loadCaptcha()), this.footerRefreshBtn && this.footerRefreshBtn.removeEventListener("click", () => this.loadCaptcha()), this._mouseMoveListener && this._mouseMoveListener.unsubscribe ? this._mouseMoveListener.unsubscribe() : this._mouseMoveHandler && document.removeEventListener("mousemove", this._mouseMoveHandler), this._mouseUpListener && this._mouseUpListener.unsubscribe ? this._mouseUpListener.unsubscribe() : this._mouseUpHandler && document.removeEventListener("mouseup", this._mouseUpHandler), this._touchMoveListener && this._touchMoveListener.unsubscribe ? this._touchMoveListener.unsubscribe() : this._touchMoveHandler && document.removeEventListener("touchmove", this._touchMoveHandler), this._touchEndListener && this._touchEndListener.unsubscribe ? this._touchEndListener.unsubscribe() : this._touchEndHandler && document.removeEventListener("touchend", this._touchEndHandler), this.container._initialized = !1);
7003
7037
  }
7004
7038
  }
7005
- function da() {
7039
+ function ga() {
7006
7040
  document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
7007
- const t = new ha(i);
7041
+ const t = new ma(i);
7008
7042
  t.init(), i._kupolaSlideCaptcha = t;
7009
7043
  });
7010
7044
  }
7011
- function ua(i) {
7045
+ function _a(i) {
7012
7046
  i._kupolaSlideCaptcha && (i._kupolaSlideCaptcha.destroy(), i._kupolaSlideCaptcha = null);
7013
7047
  }
7014
- function pa() {
7048
+ function ya() {
7015
7049
  document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
7016
- ua(i);
7050
+ _a(i);
7017
7051
  });
7018
7052
  }
7019
- E.register("slide-captcha", da, pa);
7020
- class fa {
7053
+ E.register("slide-captcha", ga, ya);
7054
+ class va {
7021
7055
  constructor(t) {
7022
7056
  this.form = t, this.fields = [], this.validators = {}, this.errorMessages = {}, this._submitHandler = null, this._fieldHandlers = /* @__PURE__ */ new Map(), this._init();
7023
7057
  }
@@ -7157,23 +7191,23 @@ class fa {
7157
7191
  }), this._submitHandler = null, this._fieldHandlers.clear(), this._fieldHandlers = null, this.fields = null, this.validators = null, this.errorMessages = null, this.form = null;
7158
7192
  }
7159
7193
  }
7160
- function ma(i) {
7194
+ function ba(i) {
7161
7195
  const t = document.querySelectorAll(i || ".ds-form");
7162
7196
  return t.forEach((e) => {
7163
7197
  if (e._kupolaForm) return;
7164
- const s = new fa(e);
7198
+ const s = new va(e);
7165
7199
  e._kupolaForm = s;
7166
7200
  }), t.length;
7167
7201
  }
7168
- function Uo(i) {
7202
+ function Go(i) {
7169
7203
  return i._kupolaForm;
7170
7204
  }
7171
- function Yo(i) {
7205
+ function Qo(i) {
7172
7206
  const t = i._kupolaForm;
7173
7207
  return t ? t.validate() : !1;
7174
7208
  }
7175
- E.register("form-validation", ma);
7176
- class ga {
7209
+ E.register("form-validation", ba);
7210
+ class xa {
7177
7211
  constructor() {
7178
7212
  this._queue = /* @__PURE__ */ new Set(), this._scheduled = !1, this._flushDepth = 0, this._maxDepth = 10;
7179
7213
  }
@@ -7200,8 +7234,8 @@ class ga {
7200
7234
  this._flushDepth--;
7201
7235
  }
7202
7236
  }
7203
- const _a = new ga();
7204
- class ya {
7237
+ const Ea = new xa();
7238
+ class wa {
7205
7239
  constructor(t, e) {
7206
7240
  this.data = t, this.createdAt = Date.now(), this.ttl = e;
7207
7241
  }
@@ -7212,7 +7246,7 @@ class ya {
7212
7246
  return !this.isFresh;
7213
7247
  }
7214
7248
  }
7215
- class ve {
7249
+ class we {
7216
7250
  constructor() {
7217
7251
  this._store = /* @__PURE__ */ new Map();
7218
7252
  }
@@ -7221,7 +7255,7 @@ class ve {
7221
7255
  return e || null;
7222
7256
  }
7223
7257
  set(t, e, s = 6e4) {
7224
- this._store.set(t, new ya(e, s));
7258
+ this._store.set(t, new wa(e, s));
7225
7259
  }
7226
7260
  has(t) {
7227
7261
  return this._store.has(t);
@@ -7238,22 +7272,22 @@ class ve {
7238
7272
  return e ? e.data : null;
7239
7273
  }
7240
7274
  }
7241
- class F extends Error {
7275
+ class N extends Error {
7242
7276
  constructor(t, e, s) {
7243
7277
  super(t), this.name = "DependsError", this.code = e, this.cause = s, this.timestamp = Date.now();
7244
7278
  }
7245
7279
  }
7246
- let it = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
7247
- function Xo(i) {
7280
+ let rt = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
7281
+ function tl(i) {
7248
7282
  if (!i || typeof i.fetch != "function")
7249
7283
  throw new TypeError("[Kupola] configureHttpClient: client must provide a fetch function");
7250
- it = i.fetch.bind(i);
7284
+ rt = i.fetch.bind(i);
7251
7285
  }
7252
- function jo() {
7253
- return it;
7286
+ function el() {
7287
+ return rt;
7254
7288
  }
7255
- function Jo() {
7256
- it = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
7289
+ function sl() {
7290
+ rt = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
7257
7291
  }
7258
7292
  class U {
7259
7293
  constructor(t, e) {
@@ -7266,7 +7300,7 @@ class U {
7266
7300
  };
7267
7301
  }
7268
7302
  notify() {
7269
- _a.schedule(() => {
7303
+ Ea.schedule(() => {
7270
7304
  this.subscribers.forEach((t) => {
7271
7305
  try {
7272
7306
  t();
@@ -7277,7 +7311,7 @@ class U {
7277
7311
  });
7278
7312
  }
7279
7313
  async fetch(t) {
7280
- throw new F("Source fetch not implemented", "NOT_IMPLEMENTED");
7314
+ throw new N("Source fetch not implemented", "NOT_IMPLEMENTED");
7281
7315
  }
7282
7316
  async getValue(t) {
7283
7317
  const e = this.cache.get(this.cacheKey);
@@ -7292,7 +7326,7 @@ class U {
7292
7326
  const r = this.retryDelay * Math.pow(2, e), a = Math.random() * r * 0.5, o = r + a;
7293
7327
  return await new Promise((l) => setTimeout(l, o)), this._fetchWithRetry(t, e + 1);
7294
7328
  }
7295
- const n = s instanceof F ? s : new F(s.message || "Fetch failed", "FETCH_ERROR", s);
7329
+ const n = s instanceof N ? s : new N(s.message || "Fetch failed", "FETCH_ERROR", s);
7296
7330
  if (this.onError)
7297
7331
  try {
7298
7332
  this.onError(n);
@@ -7314,13 +7348,13 @@ class U {
7314
7348
  this.subscribers = [], this.pending = null;
7315
7349
  }
7316
7350
  }
7317
- class va extends U {
7351
+ class ka extends U {
7318
7352
  constructor(t, e) {
7319
7353
  super(t, e), this.method = t.method || "GET", this.headers = t.headers || {}, this.queryParams = t.query || {};
7320
7354
  }
7321
7355
  async fetch(t) {
7322
7356
  let e = this.config.source;
7323
- const s = dt("http");
7357
+ const s = pt("http");
7324
7358
  s?.baseURL && !e.startsWith("http://") && !e.startsWith("https://") && (e = s.baseURL + e.replace(/^\//, ""));
7325
7359
  for (const u in t)
7326
7360
  e = e.replace(`:${u}`, encodeURIComponent(t[u]));
@@ -7335,16 +7369,16 @@ class va extends U {
7335
7369
  headers: { "Content-Type": "application/json", ...r, ...this.headers }
7336
7370
  };
7337
7371
  s?.withCredentials && (a.credentials = "include"), ["POST", "PUT", "PATCH"].includes(a.method) && (a.body = JSON.stringify(t));
7338
- const o = it;
7372
+ const o = rt;
7339
7373
  if (!o)
7340
- throw new F("No HTTP client available. Use configureHttpClient() to set one.", "NO_HTTP_CLIENT");
7374
+ throw new N("No HTTP client available. Use configureHttpClient() to set one.", "NO_HTTP_CLIENT");
7341
7375
  const l = await o(e, a), c = typeof l.ok == "boolean" ? l.ok : l.status >= 200 && l.status < 300, h = typeof l.status == "number" ? l.status : 0;
7342
7376
  if (!c)
7343
- throw new F(`HTTP ${h}`, "HTTP_ERROR");
7377
+ throw new N(`HTTP ${h}`, "HTTP_ERROR");
7344
7378
  return typeof l.json == "function" ? await l.json() : l.data !== void 0 ? l.data : l;
7345
7379
  }
7346
7380
  }
7347
- class be extends U {
7381
+ class ke extends U {
7348
7382
  constructor(t, e) {
7349
7383
  super(t, e), this.storageKey = t.source.replace("localStorage:", ""), this.defaultValue = t.default, this.sync = t.sync !== !1, this.sync && typeof window < "u" && (this._storageHandler = (s) => {
7350
7384
  s.key === this.storageKey && (this.cache.delete(this.cacheKey), this.notify());
@@ -7371,7 +7405,7 @@ class be extends U {
7371
7405
  super.destroy(), this._storageHandler && window.removeEventListener("storage", this._storageHandler);
7372
7406
  }
7373
7407
  }
7374
- class ba extends U {
7408
+ class Ca extends U {
7375
7409
  constructor(t, e) {
7376
7410
  super(t, e), this.paramName = t.source.replace("route:", "");
7377
7411
  }
@@ -7381,17 +7415,17 @@ class ba extends U {
7381
7415
  return e ? decodeURIComponent(e[1]) : new URLSearchParams(location.search).get(this.paramName) || "";
7382
7416
  }
7383
7417
  }
7384
- class xa extends U {
7418
+ class Sa extends U {
7385
7419
  async fetch(t) {
7386
7420
  return await this.config.source(t);
7387
7421
  }
7388
7422
  }
7389
- class Ea extends U {
7423
+ class La extends U {
7390
7424
  async fetch() {
7391
7425
  return this.config.source;
7392
7426
  }
7393
7427
  }
7394
- class xe extends U {
7428
+ class Ce extends U {
7395
7429
  constructor(t, e) {
7396
7430
  super(t, e), this.ws = null, this.reconnect = t.reconnect !== !1, this.reconnectDelay = t.reconnectDelay || 3e3, this._reconnectAttempt = 0, this._maxReconnectDelay = t.maxReconnectDelay || 3e4, this.messageHandler = null, this._connected = !1, this._destroyed = !1;
7397
7431
  }
@@ -7409,7 +7443,7 @@ class xe extends U {
7409
7443
  }
7410
7444
  this.cache.set(this.cacheKey, n, this.staleTime), this.notify();
7411
7445
  }, this.ws.onmessage = this.messageHandler, this.ws.onerror = (s) => {
7412
- this._connected || e(new F("WebSocket connection failed", "WS_ERROR", s));
7446
+ this._connected || e(new N("WebSocket connection failed", "WS_ERROR", s));
7413
7447
  }, this.ws.onclose = () => {
7414
7448
  if (this._connected = !1, this.reconnect && !this._destroyed) {
7415
7449
  const s = this.reconnectDelay * Math.pow(2, this._reconnectAttempt), n = Math.random() * s * 0.3, r = Math.min(s + n, this._maxReconnectDelay);
@@ -7420,7 +7454,7 @@ class xe extends U {
7420
7454
  }
7421
7455
  };
7422
7456
  } catch (s) {
7423
- e(new F("WebSocket creation failed", "WS_ERROR", s));
7457
+ e(new N("WebSocket creation failed", "WS_ERROR", s));
7424
7458
  }
7425
7459
  });
7426
7460
  }
@@ -7431,21 +7465,21 @@ class xe extends U {
7431
7465
  this._destroyed = !0, super.destroy(), this.ws && (this.ws.onmessage = null, this.ws.onclose = null, this.ws.close(), this.ws = null);
7432
7466
  }
7433
7467
  }
7434
- function Ee(i, t) {
7468
+ function Se(i, t) {
7435
7469
  const e = i.source;
7436
- return typeof e == "function" ? new xa(i, t) : typeof e == "string" && (e.startsWith("ws://") || e.startsWith("wss://")) ? new xe(i, t) : typeof e == "string" && (e.startsWith("/") || e.startsWith("http")) ? new va(i, t) : typeof e == "string" && e.startsWith("localStorage:") ? new be(i, t) : typeof e == "string" && e.startsWith("route:") ? new ba(i, t) : new Ea(i, t);
7470
+ return typeof e == "function" ? new Sa(i, t) : typeof e == "string" && (e.startsWith("ws://") || e.startsWith("wss://")) ? new Ce(i, t) : typeof e == "string" && (e.startsWith("/") || e.startsWith("http")) ? new ka(i, t) : typeof e == "string" && e.startsWith("localStorage:") ? new ke(i, t) : typeof e == "string" && e.startsWith("route:") ? new Ca(i, t) : new La(i, t);
7437
7471
  }
7438
- function Zo(i, t) {
7439
- const e = {}, s = new ve(), n = [];
7472
+ function il(i, t) {
7473
+ const e = {}, s = new we(), n = [];
7440
7474
  for (const r in t) {
7441
7475
  let p = function() {
7442
- return kt(i);
7476
+ return Dt(i);
7443
7477
  }, a = t[r];
7444
7478
  typeof a == "string" && (a = { source: a });
7445
7479
  const o = {
7446
7480
  ...a,
7447
- cacheKey: a.cacheKey || `${r}-${JSON.stringify(kt(i))}`
7448
- }, l = Ee(o, s), c = T(null), h = T(!0), d = T(null), u = T(null);
7481
+ cacheKey: a.cacheKey || `${r}-${JSON.stringify(Dt(i))}`
7482
+ }, l = Se(o, s), c = T(null), h = T(!0), d = T(null), u = T(null);
7449
7483
  let f = 0;
7450
7484
  async function m() {
7451
7485
  const b = ++f;
@@ -7486,11 +7520,11 @@ function Zo(i, t) {
7486
7520
  },
7487
7521
  // For StorageSource
7488
7522
  setValue(b) {
7489
- l instanceof be && (l.setValue(b), c.value = b);
7523
+ l instanceof ke && (l.setValue(b), c.value = b);
7490
7524
  },
7491
7525
  // For WebSocketSource
7492
7526
  send(b) {
7493
- l instanceof xe && l.send(b);
7527
+ l instanceof Ce && l.send(b);
7494
7528
  },
7495
7529
  _source: l
7496
7530
  };
@@ -7502,8 +7536,8 @@ function Zo(i, t) {
7502
7536
  }
7503
7537
  }, window.__kupolaDepInstances || (window.__kupolaDepInstances = []), window.__kupolaDepInstances.push(e), e;
7504
7538
  }
7505
- function Go(i) {
7506
- const t = new ve(), e = Ee(i, t), s = T(null), n = T(!0), r = T(null);
7539
+ function nl(i) {
7540
+ const t = new we(), e = Se(i, t), s = T(null), n = T(!0), r = T(null);
7507
7541
  let a = 0;
7508
7542
  async function o() {
7509
7543
  const l = ++a;
@@ -7531,7 +7565,7 @@ function Go(i) {
7531
7565
  }
7532
7566
  };
7533
7567
  }
7534
- function kt(i) {
7568
+ function Dt(i) {
7535
7569
  const t = {};
7536
7570
  for (const e in i) {
7537
7571
  const s = i[e];
@@ -7539,9 +7573,9 @@ function kt(i) {
7539
7573
  }
7540
7574
  return t;
7541
7575
  }
7542
- function Qo() {
7576
+ function rl() {
7543
7577
  }
7544
- class wa {
7578
+ class Da {
7545
7579
  constructor(t, e = {}) {
7546
7580
  this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this.columns = (e.columns || []).map((s, n) => ({ ...s, _index: n })), this.rowKey = e.rowKey || "id", this._data = [], this._loading = !1, this.striped = e.striped !== !1, this.bordered = e.bordered || !1, this.hoverable = e.hoverable !== !1, this.compact = e.compact || !1, this.emptyText = e.emptyText || "暂无数据", this.loadingText = e.loadingText || "加载中...", this.multiSort = e.multiSort || !1, this._sorts = [], this._filterText = "", this._showPagination = e.pagination !== !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._pageSize = e.pageSize || 10, this._currentPage = 1, this._total = 0, this.selection = e.selection || null, this._selectedKeys = /* @__PURE__ */ new Set(), this.selectionColumnTitle = e.selectionColumnTitle || "", this.expandable = e.expandable || null, this._expandedKeys = /* @__PURE__ */ new Set(), this.expandColumnTitle = e.expandColumnTitle || "", this.editable = e.editable || !1, this._editingCell = null, this._editBuffer = {}, this.resizable = e.resizable || !1, this.draggable = e.draggable || !1, this._dragState = null, this.tree = e.tree || null, this._treeExpandedKeys = /* @__PURE__ */ new Set(), e.tree?.defaultExpandAll && (this._treeExpandAll = !0), this.virtualScroll = e.virtualScroll || null, this._scrollContainer = null, this._scrollHandler = null, this._resizeCleanups = [], this._filterDebounceTimer = null, this._reactiveCleanups = [], this.mergeCells = e.mergeCells || null, this.onSort = e.onSort || null, this.onPageChange = e.onPageChange || null, this.onRowClick = e.onRowClick || null, this.onFilter = e.onFilter || null, this.onSelect = e.onSelect || null, this.onExpand = e.onExpand || null, this.onEditSave = e.onEditSave || null, this.onEditCancel = e.onEditCancel || null, this.onRowDragEnd = e.onRowDragEnd || null, this.onColumnResize = e.onColumnResize || null, this.sortKey = T(null), this.sortOrder = T(null), this.currentPage = T(1), this.filterText = T(""), this.selectedKeys = T([]), this._init();
7547
7581
  }
@@ -8081,10 +8115,10 @@ class wa {
8081
8115
  this._filterDebounceTimer && (clearTimeout(this._filterDebounceTimer), this._filterDebounceTimer = null), this._resizeCleanups.forEach((t) => t()), this._resizeCleanups = [], this._reactiveCleanups.forEach((t) => t.unsubscribe()), this._reactiveCleanups = [], this.element.innerHTML = "", this.element.classList.remove("kupola-table-wrapper", "kupola-table-virtual-wrapper"), this._data = [], this._virtualData = null, this._dragState = null, this._editingCell = null, this._editBuffer = {};
8082
8116
  }
8083
8117
  }
8084
- function we(i, t) {
8085
- return new wa(i, t);
8118
+ function Le(i, t) {
8119
+ return new Da(i, t);
8086
8120
  }
8087
- function tl() {
8121
+ function al() {
8088
8122
  document.querySelectorAll("[data-kupola-table]").forEach((i) => {
8089
8123
  const t = i.getAttribute("data-kupola-table");
8090
8124
  let e = {};
@@ -8093,11 +8127,11 @@ function tl() {
8093
8127
  e = JSON.parse(t);
8094
8128
  } catch {
8095
8129
  }
8096
- we(i, e);
8130
+ Le(i, e);
8097
8131
  });
8098
8132
  }
8099
- E.register("table", we);
8100
- class ka {
8133
+ E.register("table", Le);
8134
+ class Ha {
8101
8135
  constructor(t, e = {}) {
8102
8136
  this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this._current = e.current || 1, this._total = e.total || 0, this._pageSize = e.pageSize || 10, this._maxPages = e.maxPages || 7, this._showTotal = e.showTotal !== !1, this._showSizeChanger = e.showSizeChanger || !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._simple = e.simple || !1, this.current = T(this._current), this.total = T(this._total), this.onChange = e.onChange || null, this.onPageSizeChange = e.onPageSizeChange || null, this._init();
8103
8137
  }
@@ -8197,9 +8231,9 @@ class ka {
8197
8231
  this.element.innerHTML = "", this.element.classList.remove("kupola-pagination");
8198
8232
  }
8199
8233
  }
8200
- let Ct = !1;
8201
- function Ca() {
8202
- if (Ct || typeof document > "u") return;
8234
+ let Ht = !1;
8235
+ function Ma() {
8236
+ if (Ht || typeof document > "u") return;
8203
8237
  const i = document.createElement("style");
8204
8238
  i.textContent = `
8205
8239
  .kupola-pagination { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@@ -8215,13 +8249,13 @@ function Ca() {
8215
8249
  .kupola-pagination-jumper { font-size: 14px; color: #666; }
8216
8250
  .kupola-pagination-jumper input { width: 50px; height: 28px; margin: 0 4px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; text-align: center; font-size: 13px; }
8217
8251
  .kupola-pagination-jumper input:focus { outline: none; border-color: #1890ff; }
8218
- `, document.head.appendChild(i), Ct = !0;
8252
+ `, document.head.appendChild(i), Ht = !0;
8219
8253
  }
8220
- function el(i, t) {
8221
- return Ca(), new ka(i, t);
8254
+ function ol(i, t) {
8255
+ return Ma(), new Ha(i, t);
8222
8256
  }
8223
- let St = !1;
8224
- class Sa extends HTMLElement {
8257
+ let Mt = !1;
8258
+ class Ia extends HTMLElement {
8225
8259
  static get observedAttributes() {
8226
8260
  return ["open"];
8227
8261
  }
@@ -8243,7 +8277,7 @@ class Sa extends HTMLElement {
8243
8277
  }
8244
8278
  }
8245
8279
  }
8246
- class La extends HTMLElement {
8280
+ class Ta extends HTMLElement {
8247
8281
  static get observedAttributes() {
8248
8282
  return ["title", "position"];
8249
8283
  }
@@ -8258,7 +8292,7 @@ class La extends HTMLElement {
8258
8292
  }
8259
8293
  }
8260
8294
  }
8261
- class Da extends HTMLElement {
8295
+ class Aa extends HTMLElement {
8262
8296
  connectedCallback() {
8263
8297
  this._render();
8264
8298
  }
@@ -8276,13 +8310,13 @@ class Da extends HTMLElement {
8276
8310
  }), this.innerHTML = "", this.appendChild(t);
8277
8311
  }
8278
8312
  }
8279
- class Ha extends HTMLElement {
8313
+ class za extends HTMLElement {
8280
8314
  static get observedAttributes() {
8281
8315
  return ["title"];
8282
8316
  }
8283
8317
  // Content is read by parent <k-collapse> during its connectedCallback
8284
8318
  }
8285
- class Ma extends HTMLElement {
8319
+ class Pa extends HTMLElement {
8286
8320
  static get observedAttributes() {
8287
8321
  return ["position", "open"];
8288
8322
  }
@@ -8300,7 +8334,7 @@ class Ma extends HTMLElement {
8300
8334
  }
8301
8335
  }
8302
8336
  }
8303
- class Ia extends HTMLElement {
8337
+ class $a extends HTMLElement {
8304
8338
  static get observedAttributes() {
8305
8339
  return ["title", "open"];
8306
8340
  }
@@ -8343,232 +8377,234 @@ class Ia extends HTMLElement {
8343
8377
  this.removeAttribute("open");
8344
8378
  }
8345
8379
  }
8346
- function sl() {
8347
- if (St || typeof customElements > "u") return;
8348
- St = !0;
8380
+ function ll() {
8381
+ if (Mt || typeof customElements > "u") return;
8382
+ Mt = !0;
8349
8383
  const i = [
8350
- ["k-dropdown", Sa],
8351
- ["k-tooltip", La],
8352
- ["k-collapse", Da],
8353
- ["k-collapse-item", Ha],
8354
- ["k-drawer", Ma],
8355
- ["k-modal", Ia]
8384
+ ["k-dropdown", Ia],
8385
+ ["k-tooltip", Ta],
8386
+ ["k-collapse", Aa],
8387
+ ["k-collapse-item", za],
8388
+ ["k-drawer", Pa],
8389
+ ["k-modal", $a]
8356
8390
  ];
8357
8391
  for (const [t, e] of i)
8358
8392
  customElements.get(t) || customElements.define(t, e);
8359
8393
  }
8360
8394
  export {
8361
8395
  X as BRAND_OPTIONS,
8362
- ya as CacheEntry,
8363
- ve as CacheManager,
8364
- Vr as Calendar,
8365
- Tr as Carousel,
8366
- Or as Collapse,
8367
- Nr as ColorPicker,
8368
- yr as ComponentInitializerRegistry,
8369
- aa as Countdown,
8370
- Sr as Datepicker,
8371
- F as DependsError,
8396
+ wa as CacheEntry,
8397
+ we as CacheManager,
8398
+ Xr as Calendar,
8399
+ Br as Carousel,
8400
+ Kr as Collapse,
8401
+ Ur as ColorPicker,
8402
+ wr as ComponentInitializerRegistry,
8403
+ da as Countdown,
8404
+ Ir as Datepicker,
8405
+ N as DependsError,
8372
8406
  U as DependsSource,
8373
- Lo as Dialog,
8374
- zr as Drawer,
8375
- wr as Dropdown,
8376
- Wr as DynamicTags,
8377
- va as FetchedSource,
8378
- Br as FileUpload,
8379
- xa as FunctionSource,
8380
- Er as GlobalEvents,
8381
- Zr as Heatmap,
8382
- Vo as Icons,
8383
- he as ImagePreview,
8384
- G as KupolaComponent,
8385
- br as KupolaComponentRegistry,
8386
- ar as KupolaDataBind,
8387
- lr as KupolaEventBus,
8388
- fa as KupolaForm,
8389
- jt as KupolaI18n,
8390
- ht as KupolaLifecycle,
8391
- ka as KupolaPagination,
8392
- _t as KupolaStore,
8393
- or as KupolaStoreManager,
8394
- wa as KupolaTable,
8395
- za as KupolaUtils,
8396
- ea as KupolaValidator,
8397
- Mo as Message,
8407
+ Ao as Dialog,
8408
+ Or as Drawer,
8409
+ Dr as Dropdown,
8410
+ Jr as DynamicTags,
8411
+ ka as FetchedSource,
8412
+ Rr as FileUpload,
8413
+ Sa as FunctionSource,
8414
+ Lr as GlobalEvents,
8415
+ sa as Heatmap,
8416
+ jo as Icons,
8417
+ fe as ImagePreview,
8418
+ tt as KupolaComponent,
8419
+ Cr as KupolaComponentRegistry,
8420
+ hr as KupolaDataBind,
8421
+ ur as KupolaEventBus,
8422
+ va as KupolaForm,
8423
+ Qt as KupolaI18n,
8424
+ ut as KupolaLifecycle,
8425
+ Ha as KupolaPagination,
8426
+ bt as KupolaStore,
8427
+ dr as KupolaStoreManager,
8428
+ Da as KupolaTable,
8429
+ Oa as KupolaUtils,
8430
+ aa as KupolaValidator,
8431
+ $o as Message,
8398
8432
  $ as Modal,
8399
- Do as Notification,
8400
- la as NumberInput,
8401
- me as PATHS,
8402
- ba as RouteSource,
8403
- ga as Scheduler,
8404
- kr as Select,
8405
- ha as SlideCaptcha,
8406
- Mr as Slider,
8407
- jr as StatCard,
8408
- Ea as StaticSource,
8409
- be as StorageSource,
8410
- Yr as Tag,
8411
- Dr as Timepicker,
8412
- Qr as Tooltip,
8413
- sa as VirtualList,
8414
- xe as WebSocketSource,
8415
- Co as alertModal,
8416
- vt as applyMixin,
8417
- Fs as arrayUtils,
8418
- ja as bootstrapComponents,
8419
- _o as cleanupAllDropdowns,
8420
- pa as cleanupAllSlideCaptchas,
8421
- Kr as cleanupCalendar,
8422
- Ar as cleanupCarousel,
8423
- Fr as cleanupCollapse,
8424
- Rr as cleanupColorPicker,
8425
- oa as cleanupCountdown,
8426
- Lr as cleanupDatepicker,
8427
- Pr as cleanupDrawer,
8428
- Zt as cleanupDropdown,
8429
- Ur as cleanupDynamicTags,
8430
- qr as cleanupFileUpload,
8431
- Gr as cleanupHeatmap,
8432
- $r as cleanupModal,
8433
- ca as cleanupNumberInput,
8434
- Cr as cleanupSelect,
8435
- ua as cleanupSlideCaptcha,
8436
- Ir as cleanupSlider,
8437
- Jr as cleanupStatCard,
8438
- Xr as cleanupTag,
8439
- Hr as cleanupTimepicker,
8440
- ta as cleanupTooltip,
8441
- na as cleanupVirtualList,
8442
- Qo as clearCache,
8443
- Xo as configureHttpClient,
8444
- ko as confirmModal,
8445
- Na as createBrandPicker,
8446
- Qa as createI18n,
8447
- Aa as createLifecycle,
8448
- ie as createModal,
8449
- Ee as createSource,
8450
- $a as createStore,
8451
- Fa as createThemeToggle,
8452
- Zn as cryptoUtils,
8453
- hn as dateUtils,
8454
- dn as debounce,
8455
- Ga as defineComponent,
8456
- Ja as defineMixin,
8457
- ho as emit,
8458
- uo as emitGlobal,
8459
- Va as escapeHtml,
8460
- ao as formatCurrency,
8461
- no as formatDate,
8462
- ro as formatNumber,
8463
- Ua as generateSecureId,
8464
- qa as getBasePath,
8433
+ zo as Notification,
8434
+ pa as NumberInput,
8435
+ ve as PATHS,
8436
+ Ca as RouteSource,
8437
+ xa as Scheduler,
8438
+ Hr as Select,
8439
+ ma as SlideCaptcha,
8440
+ Pr as Slider,
8441
+ ta as StatCard,
8442
+ La as StaticSource,
8443
+ ke as StorageSource,
8444
+ Gr as Tag,
8445
+ Ar as Timepicker,
8446
+ na as Tooltip,
8447
+ oa as VirtualList,
8448
+ Ce as WebSocketSource,
8449
+ Io as alertModal,
8450
+ wt as applyMixin,
8451
+ Ks as arrayUtils,
8452
+ eo as bootstrapComponents,
8453
+ wo as cleanupAllDropdowns,
8454
+ ya as cleanupAllSlideCaptchas,
8455
+ jr as cleanupCalendar,
8456
+ qr as cleanupCarousel,
8457
+ Wr as cleanupCollapse,
8458
+ Yr as cleanupColorPicker,
8459
+ ua as cleanupCountdown,
8460
+ Tr as cleanupDatepicker,
8461
+ Fr as cleanupDrawer,
8462
+ ee as cleanupDropdown,
8463
+ Zr as cleanupDynamicTags,
8464
+ Vr as cleanupFileUpload,
8465
+ ia as cleanupHeatmap,
8466
+ Nr as cleanupModal,
8467
+ fa as cleanupNumberInput,
8468
+ Mr as cleanupSelect,
8469
+ _a as cleanupSlideCaptcha,
8470
+ $r as cleanupSlider,
8471
+ ea as cleanupStatCard,
8472
+ Qr as cleanupTag,
8473
+ zr as cleanupTimepicker,
8474
+ ra as cleanupTooltip,
8475
+ ca as cleanupVirtualList,
8476
+ rl as clearCache,
8477
+ tl as configureHttpClient,
8478
+ Mo as confirmModal,
8479
+ Ya as createBrandPicker,
8480
+ ro as createI18n,
8481
+ qa as createLifecycle,
8482
+ oe as createModal,
8483
+ Se as createSource,
8484
+ Na as createStore,
8485
+ Ua as createThemeToggle,
8486
+ er as cryptoUtils,
8487
+ fn as dateUtils,
8488
+ mn as debounce,
8489
+ no as defineComponent,
8490
+ so as defineMixin,
8491
+ _o as emit,
8492
+ yo as emitGlobal,
8493
+ ja as escapeHtml,
8494
+ po as formatCurrency,
8495
+ ho as formatDate,
8496
+ uo as formatNumber,
8497
+ Ga as generateSecureId,
8498
+ Ka as getBasePath,
8465
8499
  J as getBrand,
8466
- dt as getConfig,
8467
- dr as getDefaultBrand,
8468
- hr as getDefaultTheme,
8469
- Uo as getFormInstance,
8470
- jo as getHttpClient,
8471
- Oa as getHttpConfig,
8472
- ut as getIconsPath,
8473
- mo as getListenerCount,
8474
- io as getLocale,
8475
- pr as getMessageConfig,
8476
- fr as getNotificationConfig,
8477
- ur as getPerformanceConfig,
8478
- st as getSecurityConfig,
8479
- Ba as getStore,
8480
- R as getTheme,
8500
+ pt as getConfig,
8501
+ gr as getDefaultBrand,
8502
+ mr as getDefaultTheme,
8503
+ Go as getFormInstance,
8504
+ el as getHttpClient,
8505
+ Wa as getHttpConfig,
8506
+ ft as getIconsPath,
8507
+ xo as getListenerCount,
8508
+ co as getLocale,
8509
+ yr as getMessageConfig,
8510
+ vr as getNotificationConfig,
8511
+ _r as getPerformanceConfig,
8512
+ nt as getSecurityConfig,
8513
+ Ra as getStore,
8514
+ F as getTheme,
8481
8515
  j as getUiConfig,
8482
- mr as getValidationConfig,
8516
+ br as getValidationConfig,
8483
8517
  H as globalEvents,
8484
- tl as initAllTables,
8485
- le as initCalendar,
8486
- Po as initCalendars,
8487
- se as initCarousel,
8488
- Eo as initCarousels,
8489
- ae as initCollapse,
8490
- Ao as initCollapses,
8491
- oe as initColorPicker,
8492
- zo as initColorPickers,
8493
- _e as initCountdown,
8494
- Ko as initCountdowns,
8495
- Qt as initDatepicker,
8496
- vo as initDatepickers,
8497
- lt as initDrawer,
8498
- wo as initDrawers,
8499
- Jt as initDropdown,
8500
- go as initDropdowns,
8501
- ce as initDynamicTags,
8502
- $o as initDynamicTagsAll,
8503
- re as initFileUpload,
8504
- To as initFileUploads,
8505
- ma as initFormValidation,
8506
- pe as initHeatmap,
8507
- No as initHeatmaps,
8508
- Bo as initImagePreview,
8509
- Io as initMessages,
8510
- ne as initModal,
8511
- So as initModals,
8512
- Ho as initNotifications,
8513
- ye as initNumberInput,
8514
- Wo as initNumberInputs,
8515
- el as initPagination,
8516
- Gt as initSelect,
8517
- yo as initSelects,
8518
- da as initSlideCaptchas,
8519
- ee as initSlider,
8520
- xo as initSliders,
8521
- ue as initStatCard,
8522
- Fo as initStatCards,
8523
- we as initTable,
8524
- de as initTag,
8525
- Oo as initTags,
8526
- _r as initTheme,
8527
- te as initTimepicker,
8528
- bo as initTimepickers,
8529
- fe as initTooltip,
8530
- Ro as initTooltips,
8531
- ia as initVirtualList,
8532
- bt as kupolaBootstrap,
8518
+ al as initAllTables,
8519
+ ue as initCalendar,
8520
+ No as initCalendars,
8521
+ ae as initCarousel,
8522
+ Do as initCarousels,
8523
+ he as initCollapse,
8524
+ Oo as initCollapses,
8525
+ de as initColorPicker,
8526
+ Fo as initColorPickers,
8527
+ xe as initCountdown,
8528
+ Jo as initCountdowns,
8529
+ ie as initDatepicker,
8530
+ Co as initDatepickers,
8531
+ ht as initDrawer,
8532
+ Ho as initDrawers,
8533
+ te as initDropdown,
8534
+ Eo as initDropdowns,
8535
+ pe as initDynamicTags,
8536
+ Ro as initDynamicTagsAll,
8537
+ ce as initFileUpload,
8538
+ qo as initFileUploads,
8539
+ ba as initFormValidation,
8540
+ _e as initHeatmap,
8541
+ Yo as initHeatmaps,
8542
+ Vo as initImagePreview,
8543
+ Bo as initMessages,
8544
+ le as initModal,
8545
+ To as initModals,
8546
+ Po as initNotifications,
8547
+ Ee as initNumberInput,
8548
+ Zo as initNumberInputs,
8549
+ ol as initPagination,
8550
+ se as initSelect,
8551
+ ko as initSelects,
8552
+ ga as initSlideCaptchas,
8553
+ re as initSlider,
8554
+ Lo as initSliders,
8555
+ ge as initStatCard,
8556
+ Uo as initStatCards,
8557
+ Le as initTable,
8558
+ me as initTag,
8559
+ Wo as initTags,
8560
+ Er as initTheme,
8561
+ ne as initTimepicker,
8562
+ So as initTimepickers,
8563
+ ye as initTooltip,
8564
+ Xo as initTooltips,
8565
+ la as initVirtualList,
8566
+ kt as kupolaBootstrap,
8533
8567
  O as kupolaData,
8534
- Pa as kupolaEvents,
8535
- N as kupolaI18n,
8568
+ Fa as kupolaEvents,
8569
+ R as kupolaI18n,
8536
8570
  E as kupolaInitializer,
8537
- Ta as kupolaLifecycle,
8538
- M as kupolaRegistry,
8539
- Wt as kupolaStoreManager,
8540
- Wa as maskData,
8541
- eo as n,
8542
- Ai as numberUtils,
8543
- ai as objectUtils,
8544
- co as off,
8545
- fo as offAll,
8546
- po as offByScope,
8547
- oo as on,
8548
- lo as once,
8549
- nr as preloadUtils,
8571
+ Ba as kupolaLifecycle,
8572
+ I as kupolaRegistry,
8573
+ jt as kupolaStoreManager,
8574
+ Za as maskData,
8575
+ oo as n,
8576
+ Bi as numberUtils,
8577
+ hi as objectUtils,
8578
+ go as off,
8579
+ bo as offAll,
8580
+ vo as offByScope,
8581
+ Va as offConfigChange,
8582
+ fo as on,
8583
+ pr as onConfigChange,
8584
+ mo as once,
8585
+ lr as preloadUtils,
8550
8586
  T as ref,
8551
- Ya as registerComponent,
8552
- Xa as registerLazyComponent,
8553
- sl as registerWebComponents,
8554
- ct as renderIcon,
8555
- Jo as resetHttpClient,
8556
- Ra as sanitizeHtml,
8557
- ot as setBrand,
8558
- cr as setConfig,
8559
- so as setLocale,
8560
- at as setTheme,
8561
- qo as showImagePreview,
8562
- Ze as stringUtils,
8563
- Ka as stripHtml,
8564
- ge as svg,
8565
- to as t,
8566
- un as throttle,
8567
- Zo as useDeps,
8568
- Za as useMixin,
8569
- Go as useQuery,
8570
- Yo as validateForm,
8587
+ Qa as registerComponent,
8588
+ to as registerLazyComponent,
8589
+ ll as registerWebComponents,
8590
+ dt as renderIcon,
8591
+ sl as resetHttpClient,
8592
+ Xa as sanitizeHtml,
8593
+ lt as setBrand,
8594
+ fr as setConfig,
8595
+ lo as setLocale,
8596
+ Q as setTheme,
8597
+ Ko as showImagePreview,
8598
+ es as stringUtils,
8599
+ Ja as stripHtml,
8600
+ be as svg,
8601
+ ao as t,
8602
+ gn as throttle,
8603
+ il as useDeps,
8604
+ io as useMixin,
8605
+ nl as useQuery,
8606
+ Qo as validateForm,
8571
8607
  P as validator,
8572
- Rt as validatorUtils
8608
+ Ut as validatorUtils
8573
8609
  };
8574
8610
  //# sourceMappingURL=kupola.esm.js.map