@kupola/kupola 1.4.8 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kupola.cjs.js +19 -19
- package/dist/kupola.cjs.js.map +1 -1
- package/dist/kupola.esm.js +1086 -1019
- package/dist/kupola.esm.js.map +1 -1
- package/dist/kupola.umd.js +19 -19
- package/dist/kupola.umd.js.map +1 -1
- package/js/depends.js +6 -0
- package/js/i18n.js +5 -2
- package/js/kupola-config.js +69 -0
- package/js/kupola-core.js +10 -5
- package/js/theme.js +9 -8
- package/package.json +3 -3
package/dist/kupola.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class ot {
|
|
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"]],
|
|
@@ -66,20 +66,20 @@ class at {
|
|
|
66
66
|
for (const o of s) {
|
|
67
67
|
await this._resolveDepends(o.depends, t);
|
|
68
68
|
const l = performance.now();
|
|
69
|
-
let c,
|
|
69
|
+
let c, d;
|
|
70
70
|
try {
|
|
71
71
|
c = o.handler(...e), c instanceof Promise && await c, o.resolved = !0;
|
|
72
72
|
} catch (u) {
|
|
73
|
-
|
|
73
|
+
d = u, console.error(`[KupolaLifecycle] Error in ${t} hook "${o.name}":`, u), t !== "error" && await this._handleError({ phase: t, hook: o.name, error: u, args: e });
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const h = performance.now() - l;
|
|
76
76
|
this.trace.push({
|
|
77
77
|
emitId: n,
|
|
78
78
|
phase: t,
|
|
79
79
|
hookName: o.name,
|
|
80
|
-
duration:
|
|
81
|
-
status:
|
|
82
|
-
error:
|
|
80
|
+
duration: h,
|
|
81
|
+
status: d ? "error" : "success",
|
|
82
|
+
error: d ? d.message : null,
|
|
83
83
|
timestamp: Date.now()
|
|
84
84
|
});
|
|
85
85
|
}
|
|
@@ -201,123 +201,123 @@ class at {
|
|
|
201
201
|
console.error(`[KupolaLifecycle] Unhandled error in ${t.phase}:`, t.error);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
function
|
|
206
|
-
return new
|
|
204
|
+
const xa = new ot("app");
|
|
205
|
+
function Ea(i = "app") {
|
|
206
|
+
return new ot(i);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
function
|
|
210
|
-
return
|
|
208
|
+
const Ee = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
209
|
+
function G(i) {
|
|
210
|
+
return Ee.has(i);
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function ke(i) {
|
|
213
213
|
return i ? i.trim() : "";
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function we(i) {
|
|
216
216
|
return i ? i.replace(/^\s+/, "") : "";
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Ce(i) {
|
|
219
219
|
return i ? i.replace(/\s+$/, "") : "";
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Se(i) {
|
|
222
222
|
return i ? i.toUpperCase() : "";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Le(i) {
|
|
225
225
|
return i ? i.toLowerCase() : "";
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function De(i) {
|
|
228
228
|
return i ? i.charAt(0).toUpperCase() + i.slice(1) : "";
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function He(i) {
|
|
231
231
|
return i ? i.replace(/-(\w)/g, (t, e) => e ? e.toUpperCase() : "") : "";
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Me(i) {
|
|
234
234
|
return i ? i.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "") : "";
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Ie(i, t, e = " ") {
|
|
237
237
|
return (String(i) || "").padStart(t, e);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Te(i, t, e = " ") {
|
|
240
240
|
return (String(i) || "").padEnd(t, e);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Ae(i, t, e = "...") {
|
|
243
243
|
return !i || i.length <= t ? i || "" : i.slice(0, t) + e;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function ze(i, t, e) {
|
|
246
246
|
return i ? i.split(t).join(e) : "";
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Pe(i, t) {
|
|
249
249
|
return i ? i.replace(/\{\{(\w+)\}\}/g, (e, s) => t[s] !== void 0 ? t[s] : `{{${s}}}`) : "";
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function $e(i, t) {
|
|
252
252
|
return (i || "").startsWith(t);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function qe(i, t) {
|
|
255
255
|
return (i || "").endsWith(t);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Be(i, t) {
|
|
258
258
|
return (i || "").includes(t);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function Fe(i, t) {
|
|
261
261
|
return (i || "").repeat(t);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Ne(i) {
|
|
264
264
|
return (i || "").split("").reverse().join("");
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Oe(i, t) {
|
|
267
267
|
return !i || !t ? 0 : i.split(t).length - 1;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Re(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
|
|
274
|
+
function Ve(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
|
|
279
|
+
function Ke(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
|
|
286
|
+
function We() {
|
|
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
|
|
293
|
-
function
|
|
292
|
+
const Ue = { trim: ke, trimLeft: we, trimRight: Ce, toUpperCase: Se, toLowerCase: Le, capitalize: De, camelize: He, hyphenate: Me, padStart: Ie, padEnd: Te, truncate: Ae, replaceAll: ze, format: Pe, startsWith: $e, endsWith: qe, includes: Be, repeat: Fe, reverse: Ne, countOccurrences: Oe, escapeHtml: Re, unescapeHtml: Ve, generateRandom: Ke, generateUUID: We };
|
|
293
|
+
function Ye(i) {
|
|
294
294
|
return Array.isArray(i);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Xe(i) {
|
|
297
297
|
return !i || i.length === 0;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function je(i) {
|
|
300
300
|
return i ? i.length : 0;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Je(i, t) {
|
|
303
303
|
return i && i.length > 0 ? i[0] : t;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function Ge(i, t) {
|
|
306
306
|
return i && i.length > 0 ? i[i.length - 1] : t;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Ze(i, t, e) {
|
|
309
309
|
return i && i[t] !== void 0 ? i[t] : e;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Qe(i, t, e) {
|
|
312
312
|
return i ? i.slice(t, e) : [];
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function ts(...i) {
|
|
315
315
|
return i.reduce((t, e) => t.concat(e || []), []);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function es(i, t = ",") {
|
|
318
318
|
return i ? i.join(t) : "";
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function ss(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 Ze(i, t, e = 0) {
|
|
|
326
326
|
}
|
|
327
327
|
return i.indexOf(t, e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function is(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 Qe(i, t, e) {
|
|
|
336
336
|
}
|
|
337
337
|
return i.lastIndexOf(t, e);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function ns(i, t) {
|
|
340
340
|
return i ? i.includes(t) : !1;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function rs(i, ...t) {
|
|
343
343
|
return i && i.push(...t), i;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function as(i) {
|
|
346
346
|
return i ? i.pop() : void 0;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function os(i) {
|
|
349
349
|
return i ? i.shift() : void 0;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ls(i, ...t) {
|
|
352
352
|
return i && i.unshift(...t), i;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function cs(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
|
|
359
|
+
function hs(i, t) {
|
|
360
360
|
return !i || t < 0 || t >= i.length || i.splice(t, 1), i;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function ds(i, t, e) {
|
|
363
363
|
return i && (i.splice(t, 0, e), i);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function us(i) {
|
|
366
366
|
return i ? i.slice().reverse() : [];
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function ps(i, t) {
|
|
369
369
|
return i ? i.slice().sort(t) : [];
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function fs(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
|
|
377
|
+
function ms(i, t) {
|
|
378
378
|
return i ? i.filter(t) : [];
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function gs(i, t) {
|
|
381
381
|
return i ? i.map(t) : [];
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function _s(i, t, e) {
|
|
384
384
|
return i ? i.reduce(t, e) : e;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function ys(i, t) {
|
|
387
387
|
i && i.forEach(t);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function vs(i, t) {
|
|
390
390
|
return i ? i.every(t) : !0;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function bs(i, t) {
|
|
393
393
|
return i ? i.some(t) : !1;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function xs(i, t) {
|
|
396
396
|
return i ? i.find(t) : void 0;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Es(i, t) {
|
|
399
399
|
return i ? i.findIndex(t) : -1;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function ks(i, t = 1) {
|
|
402
402
|
return i ? i.flat(t) : [];
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(
|
|
404
|
+
function xt(i) {
|
|
405
|
+
return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(xt(e)) : t.concat(e), []) : [];
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function ws(i) {
|
|
408
408
|
return i ? [...new Set(i)] : [];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Cs(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 xs(i, t) {
|
|
|
415
415
|
return e.has(n) ? !1 : (e.add(n), !0);
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Ss(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
|
|
425
|
+
function Ls(i) {
|
|
426
426
|
if (!i) return [];
|
|
427
427
|
const t = i.slice();
|
|
428
428
|
for (let e = t.length - 1; e > 0; e--) {
|
|
@@ -431,411 +431,411 @@ function ks(i) {
|
|
|
431
431
|
}
|
|
432
432
|
return t;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Et(i) {
|
|
435
435
|
return i ? i.reduce((t, e) => t + (Number(e) || 0), 0) : 0;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return !i || i.length === 0 ? 0 :
|
|
437
|
+
function Ds(i) {
|
|
438
|
+
return !i || i.length === 0 ? 0 : Et(i) / i.length;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Hs(i) {
|
|
441
441
|
return i && i.length > 0 ? Math.max(...i) : -1 / 0;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Ms(i) {
|
|
444
444
|
return i && i.length > 0 ? Math.min(...i) : 1 / 0;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Is(...i) {
|
|
447
447
|
return i.length === 0 ? [] : i.reduce((t, e) => t.filter((s) => e && e.includes(s)));
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Ts(...i) {
|
|
450
450
|
return [...new Set(i.flat().filter(Boolean))];
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function As(i, t) {
|
|
453
453
|
return i ? i.filter((e) => !t || !t.includes(e)) : [];
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function zs(...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
|
|
461
|
-
function
|
|
460
|
+
const Ps = { isArray: Ye, isEmpty: Xe, size: je, first: Je, last: Ge, get: Ze, slice: Qe, concat: ts, join: es, indexOf: ss, lastIndexOf: is, includes: ns, push: rs, pop: as, shift: os, unshift: ls, remove: cs, removeAt: hs, insert: ds, reverse: us, sort: ps, sortBy: fs, filter: ms, map: gs, reduce: _s, forEach: ys, every: vs, some: bs, find: xs, findIndex: Es, flat: ks, flattenDeep: xt, unique: ws, uniqueBy: Cs, chunk: Ss, shuffle: Ls, sum: Et, average: Ds, max: Hs, min: Ms, intersection: Is, union: Ts, difference: As, zip: zs };
|
|
461
|
+
function st(i) {
|
|
462
462
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function $s(i) {
|
|
465
465
|
return !i || typeof i != "object" ? !0 : Object.keys(i).length === 0;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function qs(i) {
|
|
468
468
|
return i ? Object.keys(i) : [];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Bs(i) {
|
|
471
471
|
return i ? Object.values(i) : [];
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Fs(i) {
|
|
474
474
|
return i ? Object.entries(i) : [];
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Ns(i, t) {
|
|
477
477
|
return i ? Object.prototype.hasOwnProperty.call(i, t) : !1;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Os(i, t, e) {
|
|
480
480
|
if (!i) return e;
|
|
481
481
|
const s = t.split(".");
|
|
482
|
-
return s.some(
|
|
482
|
+
return s.some(G) ? e : s.reduce((n, r) => n && n[r], i) ?? e;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Rs(i, t, e) {
|
|
485
485
|
if (!i || typeof i != "object") return i;
|
|
486
486
|
const s = t.split(".");
|
|
487
|
-
if (s.some(
|
|
487
|
+
if (s.some(G)) 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
|
|
494
|
+
function Vs(i, t) {
|
|
495
495
|
return i ? t.reduce((e, s) => (i[s] !== void 0 && (e[s] = i[s]), e), {}) : {};
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Ks(i, t) {
|
|
498
498
|
return i ? Object.keys(i).reduce((e, s) => (t.includes(s) || (e[s] = i[s]), e), {}) : {};
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function kt(...i) {
|
|
501
501
|
return i.reduce((t, e) => (e && typeof e == "object" && Object.keys(e).forEach((s) => {
|
|
502
|
-
|
|
502
|
+
G(s) || (st(e[s]) && st(t[s]) ? t[s] = kt(t[s], e[s]) : t[s] = e[s]);
|
|
503
503
|
}), t), {});
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Ws(i) {
|
|
506
506
|
return i && JSON.parse(JSON.stringify(i));
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function U(i, t = /* @__PURE__ */ new WeakMap()) {
|
|
509
509
|
if (!i || typeof i != "object") return i;
|
|
510
510
|
if (t.has(i)) return t.get(i);
|
|
511
511
|
if (i instanceof Date) return new Date(i);
|
|
512
512
|
if (i instanceof RegExp) return new RegExp(i);
|
|
513
513
|
if (i instanceof Map) {
|
|
514
514
|
const s = /* @__PURE__ */ new Map();
|
|
515
|
-
return t.set(i, s), i.forEach((n, r) => s.set(r,
|
|
515
|
+
return t.set(i, s), i.forEach((n, r) => s.set(r, U(n, t))), s;
|
|
516
516
|
}
|
|
517
517
|
if (i instanceof Set) {
|
|
518
518
|
const s = /* @__PURE__ */ new Set();
|
|
519
|
-
return t.set(i, s), i.forEach((n) => s.add(
|
|
519
|
+
return t.set(i, s), i.forEach((n) => s.add(U(n, t))), s;
|
|
520
520
|
}
|
|
521
521
|
if (Array.isArray(i)) {
|
|
522
522
|
const s = [];
|
|
523
|
-
return t.set(i, s), i.forEach((n) => s.push(
|
|
523
|
+
return t.set(i, s), i.forEach((n) => s.push(U(n, t))), s;
|
|
524
524
|
}
|
|
525
525
|
const e = {};
|
|
526
526
|
return t.set(i, e), Object.keys(i).forEach((s) => {
|
|
527
|
-
|
|
527
|
+
G(s) || (e[s] = U(i[s], t));
|
|
528
528
|
}), e;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Us(i, t) {
|
|
531
531
|
i && Object.keys(i).forEach((e) => t(i[e], e, i));
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Ys(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
|
|
540
|
+
function Xs(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
|
|
547
|
+
function js(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
|
|
550
|
+
function Js(i) {
|
|
551
551
|
return i ? Object.keys(i).map((t) => ({ key: t, value: i[t] })) : [];
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Gs(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
|
|
559
|
+
function Zs(i) {
|
|
560
560
|
return i ? Object.keys(i).length : 0;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Qs(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
|
|
569
|
+
function wt(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) =>
|
|
573
|
+
return e.length !== s.length ? !1 : e.every((n) => wt(i[n], t[n]));
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Ct(i) {
|
|
576
576
|
return i && (Object.freeze(i), Object.keys(i).forEach((t) => {
|
|
577
|
-
typeof i[t] == "object" &&
|
|
577
|
+
typeof i[t] == "object" && Ct(i[t]);
|
|
578
578
|
}), i);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function ti(i) {
|
|
581
581
|
return i && Object.seal(i);
|
|
582
582
|
}
|
|
583
|
-
const
|
|
583
|
+
const ei = { isObject: st, isEmpty: $s, keys: qs, values: Bs, entries: Fs, has: Ns, get: Os, set: Rs, pick: Vs, omit: Ks, merge: kt, clone: Ws, deepClone: U, forEach: Us, map: Ys, filter: Xs, reduce: js, toArray: Js, fromArray: Gs, size: Zs, invert: Qs, isEqual: wt, freeze: Ct, seal: ti };
|
|
584
584
|
function L(i) {
|
|
585
585
|
return typeof i == "number" && !isNaN(i);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function si(i) {
|
|
588
588
|
return Number.isInteger(i);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function ii(i) {
|
|
591
591
|
return L(i) && !Number.isInteger(i);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function ni(i) {
|
|
594
594
|
return L(i) && i > 0;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function ri(i) {
|
|
597
597
|
return L(i) && i < 0;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function ai(i) {
|
|
600
600
|
return L(i) && i === 0;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function oi(i, t, e) {
|
|
603
603
|
return L(i) ? Math.min(Math.max(i, t), e) : i;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function li(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
|
|
610
|
+
function ci(i) {
|
|
611
611
|
return L(i) ? Math.floor(i) : i;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function hi(i) {
|
|
614
614
|
return L(i) ? Math.ceil(i) : i;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function di(i) {
|
|
617
617
|
return L(i) ? Math.abs(i) : i;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function ui(...i) {
|
|
620
620
|
const t = i.filter(L);
|
|
621
621
|
return t.length > 0 ? Math.min(...t) : void 0;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function pi(...i) {
|
|
624
624
|
const t = i.filter(L);
|
|
625
625
|
return t.length > 0 ? Math.max(...t) : void 0;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function St(...i) {
|
|
628
628
|
return i.flat().filter(L).reduce((e, s) => e + s, 0);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function fi(...i) {
|
|
631
631
|
const t = i.flat().filter(L);
|
|
632
|
-
return t.length > 0 ?
|
|
632
|
+
return t.length > 0 ? St(t) / t.length : 0;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Lt(i = 0, t = 1) {
|
|
635
635
|
return Math.random() * (t - i) + i;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
return Math.floor(
|
|
637
|
+
function mi(i, t) {
|
|
638
|
+
return Math.floor(Lt(i, t + 1));
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function gi(i, t = 2) {
|
|
641
641
|
return L(i) ? i.toFixed(t) : String(i);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function _i(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
|
|
646
|
+
function yi(i, t = 0) {
|
|
647
647
|
return L(i) ? `${(i * 100).toFixed(t)}%` : String(i);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function vi(i, t = 0) {
|
|
650
650
|
return L(i) ? i.toFixed(t) : String(i);
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function bi(i, t = 6) {
|
|
653
653
|
return L(i) ? i.toPrecision(t) : String(i);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function xi(i) {
|
|
656
656
|
return Number.isNaN(i);
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Ei(i) {
|
|
659
659
|
return Number.isFinite(i);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function ki(i, t = 10) {
|
|
662
662
|
return Number.parseInt(i, t);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function wi(i) {
|
|
665
665
|
return Number.parseFloat(i);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Ci(i, t = 0) {
|
|
668
668
|
const e = Number(i);
|
|
669
669
|
return isNaN(e) ? t : e;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Si(i, t, e = 0) {
|
|
672
672
|
return !L(i) || !L(t) || t === 0 ? e : i / t;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Li(...i) {
|
|
675
675
|
return i.reduce((t, e) => !L(t) || !L(e) ? 0 : t * e, 1);
|
|
676
676
|
}
|
|
677
|
-
const
|
|
678
|
-
function
|
|
677
|
+
const Di = { isNumber: L, isInteger: si, isFloat: ii, isPositive: ni, isNegative: ri, isZero: ai, clamp: oi, round: li, floor: ci, ceil: hi, abs: di, min: ui, max: pi, sum: St, average: fi, random: Lt, randomInt: mi, format: gi, formatCurrency: _i, formatPercent: yi, toFixed: vi, toPrecision: bi, isNaN: xi, isFinite: Ei, parseInt: ki, parseFloat: wi, toNumber: Ci, safeDivide: Si, safeMultiply: Li };
|
|
678
|
+
function Z() {
|
|
679
679
|
return Date.now();
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function K() {
|
|
682
682
|
const i = /* @__PURE__ */ new Date();
|
|
683
683
|
return i.setHours(0, 0, 0, 0), i;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
const i =
|
|
685
|
+
function Hi() {
|
|
686
|
+
const i = K();
|
|
687
687
|
return i.setDate(i.getDate() + 1), i;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
const i =
|
|
689
|
+
function Mi() {
|
|
690
|
+
const i = K();
|
|
691
691
|
return i.setDate(i.getDate() - 1), i;
|
|
692
692
|
}
|
|
693
693
|
function k(i) {
|
|
694
694
|
return i instanceof Date && !isNaN(i.getTime());
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function Dt(i) {
|
|
697
697
|
return k(i);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Ii(i) {
|
|
700
700
|
const t = new Date(i);
|
|
701
|
-
return
|
|
701
|
+
return Dt(t) ? t : null;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Ti(i, t = "YYYY-MM-DD HH:mm:ss") {
|
|
704
704
|
if (!k(i)) return "";
|
|
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"),
|
|
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",
|
|
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"), d = ["日", "一", "二", "三", "四", "五", "六"][i.getDay()];
|
|
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", d);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Ai(i) {
|
|
709
709
|
return k(i) ? i.toISOString() : "";
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function zi(i) {
|
|
712
712
|
return k(i) ? new Date(i.toUTCString()) : null;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Pi(i, t) {
|
|
715
715
|
if (!k(i)) return i;
|
|
716
716
|
const e = new Date(i);
|
|
717
717
|
return e.setDate(e.getDate() + t), e;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function $i(i, t) {
|
|
720
720
|
if (!k(i)) return i;
|
|
721
721
|
const e = new Date(i);
|
|
722
722
|
return e.setHours(e.getHours() + t), e;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function qi(i, t) {
|
|
725
725
|
if (!k(i)) return i;
|
|
726
726
|
const e = new Date(i);
|
|
727
727
|
return e.setMinutes(e.getMinutes() + t), e;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function Bi(i, t) {
|
|
730
730
|
if (!k(i)) return i;
|
|
731
731
|
const e = new Date(i);
|
|
732
732
|
return e.setSeconds(e.getSeconds() + t), e;
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function Q(i, t) {
|
|
735
735
|
if (!k(i) || !k(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
|
|
741
|
+
function Fi(i, t) {
|
|
742
742
|
return !k(i) || !k(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60 * 60));
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function Ni(i, t) {
|
|
745
745
|
return !k(i) || !k(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60));
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Oi(i, t) {
|
|
748
748
|
return !k(i) || !k(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / 1e3);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
751
|
-
return k(i) ?
|
|
750
|
+
function Ri(i) {
|
|
751
|
+
return k(i) ? Q(i, K()) === 0 : !1;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
754
|
-
return k(i) ?
|
|
753
|
+
function Vi(i) {
|
|
754
|
+
return k(i) ? Q(i, K()) === -1 : !1;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return k(i) ?
|
|
756
|
+
function Ki(i) {
|
|
757
|
+
return k(i) ? Q(i, K()) === 1 : !1;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
return k(i) ? i.getTime() >
|
|
759
|
+
function Wi(i) {
|
|
760
|
+
return k(i) ? i.getTime() > Z() : !1;
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
return k(i) ? i.getTime() <
|
|
762
|
+
function Ui(i) {
|
|
763
|
+
return k(i) ? i.getTime() < Z() : !1;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Yi(i) {
|
|
766
766
|
if (!k(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
|
|
770
|
+
function Xi(i) {
|
|
771
771
|
return k(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0).getDate() : 0;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function ji(i) {
|
|
774
774
|
if (!k(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
|
|
778
|
+
function Ji(i) {
|
|
779
779
|
return k(i) ? Math.ceil((i.getMonth() + 1) / 3) : 0;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function Gi(i) {
|
|
782
782
|
if (!k(i)) return i;
|
|
783
783
|
const t = new Date(i);
|
|
784
784
|
return t.setHours(0, 0, 0, 0), t;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function Zi(i) {
|
|
787
787
|
if (!k(i)) return i;
|
|
788
788
|
const t = new Date(i);
|
|
789
789
|
return t.setHours(23, 59, 59, 999), t;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Qi(i) {
|
|
792
792
|
return k(i) ? new Date(i.getFullYear(), i.getMonth(), 1) : i;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function tn(i) {
|
|
795
795
|
return k(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0, 23, 59, 59, 999) : i;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Ht(i, t = 1) {
|
|
798
798
|
if (!k(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
|
|
802
|
+
function en(i, t = 1) {
|
|
803
803
|
if (!k(i)) return i;
|
|
804
|
-
const e =
|
|
804
|
+
const e = Ht(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
|
|
807
|
+
function sn(i) {
|
|
808
808
|
if (!k(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
|
|
813
|
+
function nn(i) {
|
|
814
814
|
if (!k(i)) return "";
|
|
815
|
-
const e =
|
|
815
|
+
const e = Z() - 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
|
|
819
|
-
function
|
|
818
|
+
const rn = { now: Z, today: K, tomorrow: Hi, yesterday: Mi, isDate: k, isValid: Dt, parse: Ii, format: Ti, toISO: Ai, toUTC: zi, addDays: Pi, addHours: $i, addMinutes: qi, addSeconds: Bi, diffDays: Q, diffHours: Fi, diffMinutes: Ni, diffSeconds: Oi, isToday: Ri, isYesterday: Vi, isTomorrow: Ki, isFuture: Wi, isPast: Ui, isLeapYear: Yi, getDaysInMonth: Xi, getWeekOfYear: ji, getQuarter: Ji, startOfDay: Gi, endOfDay: Zi, startOfMonth: Qi, endOfMonth: tn, startOfWeek: Ht, endOfWeek: en, getAge: sn, fromNow: nn };
|
|
819
|
+
function an(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() {
|
|
823
823
|
i.apply(r, n);
|
|
824
824
|
}
|
|
825
|
-
function h() {
|
|
826
|
-
a = Date.now(), o ? (s = setTimeout(d, t), c()) : s = setTimeout(d, t);
|
|
827
|
-
}
|
|
828
825
|
function d() {
|
|
826
|
+
a = Date.now(), o ? (s = setTimeout(h, t), c()) : s = setTimeout(h, t);
|
|
827
|
+
}
|
|
828
|
+
function h() {
|
|
829
829
|
s = null, l && n && c(), n = null, r = null;
|
|
830
830
|
}
|
|
831
831
|
function u() {
|
|
832
832
|
return Math.max(0, t - (Date.now() - a));
|
|
833
833
|
}
|
|
834
834
|
return function(...f) {
|
|
835
|
-
n = f, r = this, a = Date.now(), s ? (clearTimeout(s), s = setTimeout(
|
|
835
|
+
n = f, r = this, a = Date.now(), s ? (clearTimeout(s), s = setTimeout(h, u())) : d();
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function on(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 sn(i, t, e = {}) {
|
|
|
848
848
|
}, t));
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function ln(i) {
|
|
852
852
|
return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(i || "");
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function cn(i) {
|
|
855
855
|
return /^1[3-9]\d{9}$/.test(i || "");
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function hn(i) {
|
|
858
858
|
return /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w.-]*)*\/?$/.test(i || "");
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function Mt(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
|
|
863
|
+
function It(i) {
|
|
864
864
|
return /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(i || "");
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
866
|
+
function dn(i) {
|
|
867
|
+
return Mt(i) || It(i);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function un(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
|
|
872
|
+
function pn(i) {
|
|
873
873
|
return /^[A-Z][0-9]{8}$|^[A-Z]{2}[0-9]{7}$/.test(i || "");
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function fn(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 hn(i) {
|
|
|
882
882
|
}
|
|
883
883
|
return s % 10 === 0;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Tt(i) {
|
|
886
886
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i || "");
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function At(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
|
|
892
|
+
function zt(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
|
|
899
|
-
return
|
|
898
|
+
function mn(i) {
|
|
899
|
+
return Tt(i) || At(i) || zt(i);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function gn(i) {
|
|
902
902
|
return !isNaN(new Date(i).getTime());
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function _n(i) {
|
|
905
905
|
try {
|
|
906
906
|
return JSON.parse(i), !0;
|
|
907
907
|
} catch {
|
|
908
908
|
return !1;
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function yn(i) {
|
|
912
912
|
return !i || i.trim() === "";
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function vn(i) {
|
|
915
915
|
return /^\s+$/.test(i || "");
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function bn(i) {
|
|
918
918
|
return !isNaN(parseFloat(i)) && isFinite(i);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function xn(i) {
|
|
921
921
|
return /^-?\d+$/.test(i || "");
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function En(i) {
|
|
924
924
|
return /^-?\d+\.\d+$/.test(i || "");
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function kn(i) {
|
|
927
927
|
const t = parseFloat(i);
|
|
928
928
|
return !isNaN(t) && t > 0;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function wn(i) {
|
|
931
931
|
const t = parseFloat(i);
|
|
932
932
|
return !isNaN(t) && t < 0;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Cn(i) {
|
|
935
935
|
return /^[a-zA-Z]+$/.test(i || "");
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function Sn(i) {
|
|
938
938
|
return /^[a-zA-Z0-9]+$/.test(i || "");
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Ln(i) {
|
|
941
941
|
return /^[\u4e00-\u9fa5]+$/.test(i || "");
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function Dn(i, t, e) {
|
|
944
944
|
const s = (i || "").length;
|
|
945
945
|
return s >= t && (e === void 0 || s <= e);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Hn(i, t) {
|
|
948
948
|
return (i || "").length >= t;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Mn(i, t) {
|
|
951
951
|
return (i || "").length <= t;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function In(i, t) {
|
|
954
954
|
return t instanceof RegExp ? t.test(i || "") : !1;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Tn(i, t) {
|
|
957
957
|
return String(i) === String(t);
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function Pt(i, t) {
|
|
960
960
|
return (i || "").includes(t);
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
return !
|
|
962
|
+
function An(i, t) {
|
|
963
|
+
return !Pt(i, t);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function zn(i) {
|
|
966
966
|
return Array.isArray(i);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function Pn(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
|
|
972
|
+
function $n(i, t) {
|
|
973
973
|
return i ? i.length >= t : !1;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function qn(i, t) {
|
|
976
976
|
return i ? i.length <= t : !1;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Bn(i) {
|
|
979
979
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function Fn(i, t) {
|
|
982
982
|
return !i || !t || !Array.isArray(t) ? !1 : t.every((e) => Object.prototype.hasOwnProperty.call(i, e));
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Nn(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
|
-
|
|
991
|
+
$t[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,27 +996,27 @@ function $n(i, t) {
|
|
|
996
996
|
}), a.length > 0 && (e[s] = a);
|
|
997
997
|
}), { valid: Object.keys(e).length === 0, errors: e };
|
|
998
998
|
}
|
|
999
|
-
const
|
|
1000
|
-
function
|
|
999
|
+
const $t = { isEmail: ln, isPhone: cn, isURL: hn, isIPv4: Mt, isIPv6: It, isIP: dn, isIDCard: un, isPassport: pn, isCreditCard: fn, isHexColor: Tt, isRGB: At, isRGBA: zt, isColor: mn, isDate: gn, isJSON: _n, isEmpty: yn, isWhitespace: vn, isNumber: bn, isInteger: xn, isFloat: En, isPositive: kn, isNegative: wn, isAlpha: Cn, isAlphaNumeric: Sn, isChinese: Ln, isLength: Dn, minLength: Hn, maxLength: Mn, matches: In, equals: Tn, contains: Pt, notContains: An, isArray: zn, arrayLength: Pn, arrayMinLength: $n, arrayMaxLength: qn, isObject: Bn, hasKeys: Fn, validate: Nn };
|
|
1000
|
+
function On(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
|
-
function r(
|
|
1003
|
-
return
|
|
1002
|
+
function r(h, u) {
|
|
1003
|
+
return h << u | h >>> 32 - u;
|
|
1004
1004
|
}
|
|
1005
|
-
function a(
|
|
1006
|
-
const u =
|
|
1007
|
-
for (
|
|
1008
|
-
|
|
1005
|
+
function a(h) {
|
|
1006
|
+
const u = h.length * 8;
|
|
1007
|
+
for (h += ""; h.length % 64 !== 56; )
|
|
1008
|
+
h += "\0";
|
|
1009
1009
|
const f = u & 4294967295, p = u >>> 32 & 4294967295;
|
|
1010
1010
|
for (let m = 0; m < 4; m++)
|
|
1011
|
-
|
|
1011
|
+
h += String.fromCharCode(f >>> 8 * m & 255);
|
|
1012
1012
|
for (let m = 0; m < 4; m++)
|
|
1013
|
-
|
|
1014
|
-
return
|
|
1013
|
+
h += String.fromCharCode(p >>> 8 * m & 255);
|
|
1014
|
+
return h;
|
|
1015
1015
|
}
|
|
1016
|
-
function o(
|
|
1016
|
+
function o(h, u) {
|
|
1017
1017
|
const [f, p, m, y] = u, _ = [];
|
|
1018
1018
|
for (let S = 0; S < 16; S++)
|
|
1019
|
-
_[S] =
|
|
1019
|
+
_[S] = h.charCodeAt(S * 4) & 255 | (h.charCodeAt(S * 4 + 1) & 255) << 8 | (h.charCodeAt(S * 4 + 2) & 255) << 16 | (h.charCodeAt(S * 4 + 3) & 255) << 24;
|
|
1020
1020
|
let x = f, b = p, v = m, w = y;
|
|
1021
1021
|
for (let S = 0; S < 64; S++) {
|
|
1022
1022
|
let C, D;
|
|
@@ -1029,44 +1029,44 @@ function qn(i) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
const l = a(t);
|
|
1031
1031
|
let c = [...e];
|
|
1032
|
-
for (let
|
|
1033
|
-
c = o(l.substring(
|
|
1034
|
-
let
|
|
1035
|
-
return c.forEach((
|
|
1032
|
+
for (let h = 0; h < l.length; h += 64)
|
|
1033
|
+
c = o(l.substring(h, h + 64), c);
|
|
1034
|
+
let d = "";
|
|
1035
|
+
return c.forEach((h) => {
|
|
1036
1036
|
for (let u = 0; u < 4; u++)
|
|
1037
|
-
|
|
1038
|
-
}),
|
|
1037
|
+
d += (h >>> 8 * u & 255).toString(16).padStart(2, "0");
|
|
1038
|
+
}), d;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Rn(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
|
-
function s(c,
|
|
1043
|
-
return c >>>
|
|
1042
|
+
function s(c, d) {
|
|
1043
|
+
return c >>> d | c << 32 - d;
|
|
1044
1044
|
}
|
|
1045
1045
|
function n(c) {
|
|
1046
|
-
const
|
|
1046
|
+
const d = c.length * 8;
|
|
1047
1047
|
for (c += ""; c.length % 64 !== 56; )
|
|
1048
1048
|
c += "\0";
|
|
1049
|
-
const
|
|
1049
|
+
const h = d & 4294967295, u = d >>> 32 & 4294967295;
|
|
1050
1050
|
for (let f = 0; f < 4; f++)
|
|
1051
1051
|
c += String.fromCharCode(u >>> 8 * f & 255);
|
|
1052
1052
|
for (let f = 0; f < 4; f++)
|
|
1053
|
-
c += String.fromCharCode(
|
|
1053
|
+
c += String.fromCharCode(h >>> 8 * f & 255);
|
|
1054
1054
|
return c;
|
|
1055
1055
|
}
|
|
1056
|
-
function r(c,
|
|
1057
|
-
const
|
|
1056
|
+
function r(c, d) {
|
|
1057
|
+
const h = [];
|
|
1058
1058
|
for (let v = 0; v < 16; v++)
|
|
1059
|
-
|
|
1059
|
+
h[v] = c.charCodeAt(v * 4) & 255 | (c.charCodeAt(v * 4 + 1) & 255) << 8 | (c.charCodeAt(v * 4 + 2) & 255) << 16 | (c.charCodeAt(v * 4 + 3) & 255) << 24;
|
|
1060
1060
|
for (let v = 16; v < 64; v++) {
|
|
1061
|
-
const w = s(
|
|
1062
|
-
|
|
1061
|
+
const w = s(h[v - 15], 7) ^ s(h[v - 15], 18) ^ h[v - 15] >>> 3, S = s(h[v - 2], 17) ^ s(h[v - 2], 19) ^ h[v - 2] >>> 10;
|
|
1062
|
+
h[v] = h[v - 16] + w + h[v - 7] + S & 4294967295;
|
|
1063
1063
|
}
|
|
1064
|
-
let [u, f, p, m, y, _, x, b] =
|
|
1064
|
+
let [u, f, p, m, y, _, x, b] = d;
|
|
1065
1065
|
for (let v = 0; v < 64; v++) {
|
|
1066
|
-
const w = s(y, 6) ^ s(y, 11) ^ s(y, 25), S = y & _ ^ ~y & x, C = b + w + S + e[v] +
|
|
1066
|
+
const w = s(y, 6) ^ s(y, 11) ^ s(y, 25), S = y & _ ^ ~y & x, C = b + w + S + e[v] + h[v] & 4294967295, D = s(u, 2) ^ s(u, 13) ^ s(u, 22), I = u & f ^ u & p ^ f & p, z = D + I & 4294967295;
|
|
1067
1067
|
b = x, x = _, _ = y, y = m + C & 4294967295, m = p, p = f, f = u, u = C + z & 4294967295;
|
|
1068
1068
|
}
|
|
1069
|
-
return [
|
|
1069
|
+
return [d[0] + u & 4294967295, d[1] + f & 4294967295, d[2] + p & 4294967295, d[3] + m & 4294967295, d[4] + y & 4294967295, d[5] + _ & 4294967295, d[6] + x & 4294967295, d[7] + b & 4294967295];
|
|
1070
1070
|
}
|
|
1071
1071
|
const a = n(t);
|
|
1072
1072
|
let o = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225];
|
|
@@ -1074,37 +1074,37 @@ function Bn(i) {
|
|
|
1074
1074
|
o = r(a.substring(c, c + 64), o);
|
|
1075
1075
|
let l = "";
|
|
1076
1076
|
return o.forEach((c) => {
|
|
1077
|
-
for (let
|
|
1078
|
-
l += (c >>> 8 *
|
|
1077
|
+
for (let d = 3; d >= 0; d--)
|
|
1078
|
+
l += (c >>> 8 * d & 255).toString(16).padStart(2, "0");
|
|
1079
1079
|
}), l;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Vn(i) {
|
|
1082
1082
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1083
1083
|
let e = "", s = 0;
|
|
1084
1084
|
const n = i ? i.split("").map((r) => r.charCodeAt(0)) : [];
|
|
1085
1085
|
for (; s < n.length; ) {
|
|
1086
|
-
const r = n[s++], a = n[s++] || 0, o = n[s++] || 0, l = r >> 2, c = (r & 3) << 4 | a >> 4,
|
|
1087
|
-
e += t[l] + t[c] + (s > n.length + 1 ? "=" : t[
|
|
1086
|
+
const r = n[s++], a = n[s++] || 0, o = n[s++] || 0, l = r >> 2, c = (r & 3) << 4 | a >> 4, d = (a & 15) << 2 | o >> 6, h = o & 63;
|
|
1087
|
+
e += t[l] + t[c] + (s > n.length + 1 ? "=" : t[d]) + (s > n.length ? "=" : t[h]);
|
|
1088
1088
|
}
|
|
1089
1089
|
return e;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Kn(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; ) {
|
|
1095
|
-
const n = t.indexOf(i.charAt(s++)), r = t.indexOf(i.charAt(s++)), a = t.indexOf(i.charAt(s++)), o = t.indexOf(i.charAt(s++)), l = n << 2 | r >> 4, c = (r & 15) << 4 | a >> 2,
|
|
1096
|
-
e += String.fromCharCode(l), a !== 64 && (e += String.fromCharCode(c)), o !== 64 && (e += String.fromCharCode(
|
|
1095
|
+
const n = t.indexOf(i.charAt(s++)), r = t.indexOf(i.charAt(s++)), a = t.indexOf(i.charAt(s++)), o = t.indexOf(i.charAt(s++)), l = n << 2 | r >> 4, c = (r & 15) << 4 | a >> 2, d = (a & 3) << 6 | o;
|
|
1096
|
+
e += String.fromCharCode(l), a !== 64 && (e += String.fromCharCode(c)), o !== 64 && (e += String.fromCharCode(d));
|
|
1097
1097
|
}
|
|
1098
1098
|
return e;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Wn() {
|
|
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
|
|
1107
|
-
async function
|
|
1106
|
+
const Un = { md5: On, sha256: Rn, base64Encode: Vn, base64Decode: Kn, uuid: Wn }, $ = /* @__PURE__ */ new Map();
|
|
1107
|
+
async function j(i, t = {}) {
|
|
1108
1108
|
const { crossOrigin: e = "anonymous" } = t;
|
|
1109
1109
|
return $.has(i) ? $.get(i) : new Promise((s, n) => {
|
|
1110
1110
|
const r = new Image();
|
|
@@ -1115,15 +1115,15 @@ async function X(i, t = {}) {
|
|
|
1115
1115
|
}, r.src = i;
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
|
-
async function
|
|
1118
|
+
async function Yn(i, t = {}) {
|
|
1119
1119
|
const { parallel: e = !0 } = t;
|
|
1120
|
-
if (e) return Promise.all(i.map((n) =>
|
|
1120
|
+
if (e) return Promise.all(i.map((n) => j(n, t)));
|
|
1121
1121
|
const s = [];
|
|
1122
1122
|
for (const n of i)
|
|
1123
|
-
s.push(await
|
|
1123
|
+
s.push(await j(n, t));
|
|
1124
1124
|
return s;
|
|
1125
1125
|
}
|
|
1126
|
-
async function
|
|
1126
|
+
async function qt(i, t = {}) {
|
|
1127
1127
|
const { type: e = "text/javascript", async: s = !0, defer: n = !1 } = t;
|
|
1128
1128
|
return $.has(i) ? $.get(i) : new Promise((r, a) => {
|
|
1129
1129
|
const o = document.createElement("script");
|
|
@@ -1134,7 +1134,7 @@ async function Pt(i, t = {}) {
|
|
|
1134
1134
|
}, o.src = i, document.head.appendChild(o);
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
async function
|
|
1137
|
+
async function Bt(i, t = {}) {
|
|
1138
1138
|
const { media: e = "all" } = t;
|
|
1139
1139
|
return $.has(i) ? $.get(i) : new Promise((s, n) => {
|
|
1140
1140
|
const r = document.createElement("link");
|
|
@@ -1145,7 +1145,7 @@ async function $t(i, t = {}) {
|
|
|
1145
1145
|
}, document.head.appendChild(r);
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
async function
|
|
1148
|
+
async function Xn(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 Kn(i, t, e = {}) {
|
|
|
1153
1153
|
throw new Error(`Failed to load font: ${i}`);
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
async function
|
|
1156
|
+
async function jn(i, t = "image") {
|
|
1157
1157
|
switch (t) {
|
|
1158
1158
|
case "image":
|
|
1159
|
-
return
|
|
1159
|
+
return j(i);
|
|
1160
1160
|
case "script":
|
|
1161
|
-
return
|
|
1161
|
+
return qt(i);
|
|
1162
1162
|
case "stylesheet":
|
|
1163
1163
|
case "style":
|
|
1164
|
-
return
|
|
1164
|
+
return Bt(i);
|
|
1165
1165
|
default:
|
|
1166
1166
|
throw new Error(`Unsupported preload type: ${t}`);
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function Jn(i) {
|
|
1170
1170
|
return $.has(i);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Gn() {
|
|
1173
1173
|
$.clear();
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function Zn(i) {
|
|
1176
1176
|
$.delete(i);
|
|
1177
1177
|
}
|
|
1178
|
-
const
|
|
1179
|
-
string:
|
|
1180
|
-
array:
|
|
1181
|
-
object:
|
|
1182
|
-
number:
|
|
1183
|
-
date:
|
|
1184
|
-
debounce:
|
|
1185
|
-
throttle:
|
|
1186
|
-
validator:
|
|
1187
|
-
crypto:
|
|
1188
|
-
preload:
|
|
1178
|
+
const Qn = { loadImage: j, loadImages: Yn, loadScript: qt, loadStylesheet: Bt, loadFont: Xn, preload: jn, isLoaded: Jn, clearCache: Gn, clearCacheByUrl: Zn }, ka = {
|
|
1179
|
+
string: Ue,
|
|
1180
|
+
array: Ps,
|
|
1181
|
+
object: ei,
|
|
1182
|
+
number: Di,
|
|
1183
|
+
date: rn,
|
|
1184
|
+
debounce: an,
|
|
1185
|
+
throttle: on,
|
|
1186
|
+
validator: $t,
|
|
1187
|
+
crypto: Un,
|
|
1188
|
+
preload: Qn
|
|
1189
1189
|
};
|
|
1190
|
-
function
|
|
1190
|
+
function tr(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 Jn(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
|
|
1200
|
+
class ht {
|
|
1201
1201
|
constructor() {
|
|
1202
1202
|
this.children = {}, this.keys = [];
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
class
|
|
1205
|
+
class et {
|
|
1206
1206
|
constructor() {
|
|
1207
|
-
this.root = new
|
|
1207
|
+
this.root = new ht();
|
|
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
|
|
1213
|
+
e.children[n] || (e.children[n] = new ht()), 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
|
|
1245
|
+
class er {
|
|
1246
1246
|
constructor() {
|
|
1247
|
-
this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new
|
|
1247
|
+
this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new et(), 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 = {
|
|
@@ -1280,8 +1280,8 @@ class Gn {
|
|
|
1280
1280
|
set: (r, a, o, l) => {
|
|
1281
1281
|
if (a === g.parent || a === g.path || a === g.isReactive || a === "__parent__" || a === "__path__" || a === "__isReactive__")
|
|
1282
1282
|
return !0;
|
|
1283
|
-
const c = Reflect.get(r, a, l),
|
|
1284
|
-
return this.notify(
|
|
1283
|
+
const c = Reflect.get(r, a, l), d = Reflect.set(r, a, o, l), h = `${r[g.path]}${r[g.path] ? "." : ""}${a}`;
|
|
1284
|
+
return this.notify(h, o, c), this.queueUpdate(h, o), d;
|
|
1285
1285
|
},
|
|
1286
1286
|
deleteProperty: (r, a) => {
|
|
1287
1287
|
if (a === g.parent || a === g.path || a === g.isReactive)
|
|
@@ -1382,7 +1382,7 @@ class Gn {
|
|
|
1382
1382
|
t.textContent !== String(e ?? "") && (t.textContent = e ?? "");
|
|
1383
1383
|
break;
|
|
1384
1384
|
case "html":
|
|
1385
|
-
const c =
|
|
1385
|
+
const c = tr(e);
|
|
1386
1386
|
t.innerHTML !== c && (t.innerHTML = c);
|
|
1387
1387
|
break;
|
|
1388
1388
|
case "value":
|
|
@@ -1395,8 +1395,8 @@ class Gn {
|
|
|
1395
1395
|
t.disabled !== !!e && (t.disabled = !!e);
|
|
1396
1396
|
break;
|
|
1397
1397
|
case "hidden":
|
|
1398
|
-
const
|
|
1399
|
-
t.style.display !==
|
|
1398
|
+
const d = e ? "none" : "";
|
|
1399
|
+
t.style.display !== d && (t.style.display = d);
|
|
1400
1400
|
break;
|
|
1401
1401
|
case "class":
|
|
1402
1402
|
l && (e ? t.classList.add(l) : t.classList.remove(l));
|
|
@@ -1440,7 +1440,7 @@ class Gn {
|
|
|
1440
1440
|
}), this.processComputed();
|
|
1441
1441
|
}
|
|
1442
1442
|
reset() {
|
|
1443
|
-
this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new
|
|
1443
|
+
this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new et(), this.updateQueue.clear(), this.snapshots = [], this.createReactiveData(), this.bind();
|
|
1444
1444
|
}
|
|
1445
1445
|
persist(t, e = {}) {
|
|
1446
1446
|
const {
|
|
@@ -1459,18 +1459,18 @@ class Gn {
|
|
|
1459
1459
|
encryptionKey: o
|
|
1460
1460
|
});
|
|
1461
1461
|
const c = this.get(t);
|
|
1462
|
-
c !== void 0 && this._persistSave(t, c, l, { version: r, encrypt: a, encryptionKey: o }), this.observe(t, (
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
this._persistSave(t,
|
|
1466
|
-
version:
|
|
1467
|
-
encrypt:
|
|
1468
|
-
encryptionKey:
|
|
1462
|
+
c !== void 0 && this._persistSave(t, c, l, { version: r, encrypt: a, encryptionKey: o }), this.observe(t, (d) => {
|
|
1463
|
+
const h = this.persistedKeys.get(t);
|
|
1464
|
+
h && (h.debounce > 0 ? (h.timeout && clearTimeout(h.timeout), h.timeout = setTimeout(() => {
|
|
1465
|
+
this._persistSave(t, d, h.storage, {
|
|
1466
|
+
version: h.version,
|
|
1467
|
+
encrypt: h.encrypt,
|
|
1468
|
+
encryptionKey: h.encryptionKey
|
|
1469
1469
|
});
|
|
1470
|
-
},
|
|
1471
|
-
version:
|
|
1472
|
-
encrypt:
|
|
1473
|
-
encryptionKey:
|
|
1470
|
+
}, h.debounce)) : this._persistSave(t, d, h.storage, {
|
|
1471
|
+
version: h.version,
|
|
1472
|
+
encrypt: h.encrypt,
|
|
1473
|
+
encryptionKey: h.encryptionKey
|
|
1474
1474
|
}));
|
|
1475
1475
|
});
|
|
1476
1476
|
}
|
|
@@ -1636,8 +1636,8 @@ class Gn {
|
|
|
1636
1636
|
set: (r, a, o, l) => {
|
|
1637
1637
|
if (a === g.parent || a === g.path || a === g.isReactive || a === "__parent__" || a === "__path__" || a === "__isReactive__")
|
|
1638
1638
|
return !0;
|
|
1639
|
-
const c = Reflect.get(r, a, l),
|
|
1640
|
-
return this.notify(
|
|
1639
|
+
const c = Reflect.get(r, a, l), d = Reflect.set(r, a, o, l), h = `${r[g.path]}${r[g.path] ? "." : ""}${a}`;
|
|
1640
|
+
return this.notify(h, o, c), this.queueUpdate(h, o), d;
|
|
1641
1641
|
},
|
|
1642
1642
|
deleteProperty: (r, a) => {
|
|
1643
1643
|
if (a === g.parent || a === g.path || a === g.isReactive)
|
|
@@ -1706,10 +1706,10 @@ class Gn {
|
|
|
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
|
|
1709
|
+
}), this.persistedKeys.clear(), this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new et(), this.updateQueue.clear(), this.snapshots = [];
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|
|
1712
|
-
class
|
|
1712
|
+
class dt {
|
|
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 ct {
|
|
|
1779
1779
|
};
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
class
|
|
1782
|
+
class sr {
|
|
1783
1783
|
constructor() {
|
|
1784
1784
|
this.stores = /* @__PURE__ */ new Map();
|
|
1785
1785
|
}
|
|
1786
1786
|
createStore(t, e) {
|
|
1787
|
-
const s = new
|
|
1787
|
+
const s = new dt(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
|
|
1794
|
+
t instanceof dt && this.stores.set(t.name, t);
|
|
1795
1795
|
}
|
|
1796
1796
|
dispose() {
|
|
1797
1797
|
this.stores.clear();
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
|
-
class
|
|
1800
|
+
class ir {
|
|
1801
1801
|
constructor() {
|
|
1802
1802
|
this.events = {}, this.delegatedEvents = {}, this.eventListeners = {};
|
|
1803
1803
|
}
|
|
@@ -1874,14 +1874,69 @@ function T(i = null) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
}), t;
|
|
1876
1876
|
}
|
|
1877
|
-
const q = new
|
|
1878
|
-
function
|
|
1879
|
-
return
|
|
1877
|
+
const q = new er(), wa = new ir(), Ft = new sr();
|
|
1878
|
+
function Ca(i, t) {
|
|
1879
|
+
return Ft.createStore(i, t);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1882
|
-
return
|
|
1881
|
+
function Sa(i) {
|
|
1882
|
+
return Ft.getStore(i);
|
|
1883
1883
|
}
|
|
1884
|
-
const
|
|
1884
|
+
const F = {
|
|
1885
|
+
paths: {
|
|
1886
|
+
icons: "/icons/",
|
|
1887
|
+
base: "/"
|
|
1888
|
+
},
|
|
1889
|
+
theme: {
|
|
1890
|
+
default: "dark",
|
|
1891
|
+
brand: "zengqing"
|
|
1892
|
+
},
|
|
1893
|
+
i18n: {
|
|
1894
|
+
locale: "zh-CN",
|
|
1895
|
+
fallbackLocale: "en-US"
|
|
1896
|
+
},
|
|
1897
|
+
http: {
|
|
1898
|
+
baseURL: "",
|
|
1899
|
+
timeout: 1e4
|
|
1900
|
+
},
|
|
1901
|
+
components: {
|
|
1902
|
+
autoInit: !0,
|
|
1903
|
+
silentErrors: !1
|
|
1904
|
+
},
|
|
1905
|
+
store: {
|
|
1906
|
+
persist: !0,
|
|
1907
|
+
prefix: "kupola-"
|
|
1908
|
+
},
|
|
1909
|
+
events: {
|
|
1910
|
+
global: !0
|
|
1911
|
+
}
|
|
1912
|
+
};
|
|
1913
|
+
function La(i) {
|
|
1914
|
+
Ot(F, i);
|
|
1915
|
+
}
|
|
1916
|
+
function lt(i) {
|
|
1917
|
+
return i ? ar(F, i) : F;
|
|
1918
|
+
}
|
|
1919
|
+
function Nt() {
|
|
1920
|
+
return F.paths.base + F.paths.icons.replace(/^\//, "");
|
|
1921
|
+
}
|
|
1922
|
+
function Da() {
|
|
1923
|
+
return F.paths.base;
|
|
1924
|
+
}
|
|
1925
|
+
function nr() {
|
|
1926
|
+
return F.theme.default;
|
|
1927
|
+
}
|
|
1928
|
+
function rr() {
|
|
1929
|
+
return F.theme.brand;
|
|
1930
|
+
}
|
|
1931
|
+
function Ot(i, t) {
|
|
1932
|
+
for (const e in t)
|
|
1933
|
+
t[e] instanceof Object && e in i && i[e] instanceof Object ? Ot(i[e], t[e]) : i[e] = t[e];
|
|
1934
|
+
return i;
|
|
1935
|
+
}
|
|
1936
|
+
function ar(i, t) {
|
|
1937
|
+
return t.split(".").reduce((e, s) => (e && e[s]) !== void 0 ? e[s] : void 0, i);
|
|
1938
|
+
}
|
|
1939
|
+
const Rt = "kupola-theme", Vt = "kupola-brand", Y = [
|
|
1885
1940
|
{ id: "green", name: "翠绿", color: "#32F08C" },
|
|
1886
1941
|
{ id: "xionghuang", name: "雄黄", color: "#FF9900" },
|
|
1887
1942
|
{ id: "jianghuang", name: "姜黄", color: "#E2C027" },
|
|
@@ -1894,12 +1949,12 @@ const Bt = "kupola-theme", Ft = "kupola-brand", Y = [
|
|
|
1894
1949
|
{ id: "zengqing", name: "曾青", color: "#535164" },
|
|
1895
1950
|
{ id: "roulan", name: "柔蓝", color: "#106898" }
|
|
1896
1951
|
];
|
|
1897
|
-
function
|
|
1898
|
-
return localStorage.getItem(
|
|
1952
|
+
function R() {
|
|
1953
|
+
return localStorage.getItem(Rt) || nr();
|
|
1899
1954
|
}
|
|
1900
|
-
function
|
|
1955
|
+
function it(i) {
|
|
1901
1956
|
if (i !== "dark" && i !== "light") return;
|
|
1902
|
-
document.documentElement.setAttribute("data-theme", i), localStorage.setItem(
|
|
1957
|
+
document.documentElement.setAttribute("data-theme", i), localStorage.setItem(Rt, i);
|
|
1903
1958
|
const t = document.querySelector("[data-theme-toggle]");
|
|
1904
1959
|
if (t) {
|
|
1905
1960
|
t.setAttribute("data-current-theme", i);
|
|
@@ -1910,13 +1965,13 @@ function st(i) {
|
|
|
1910
1965
|
}
|
|
1911
1966
|
}
|
|
1912
1967
|
}
|
|
1913
|
-
function
|
|
1914
|
-
return localStorage.getItem(
|
|
1968
|
+
function X() {
|
|
1969
|
+
return localStorage.getItem(Vt) || rr();
|
|
1915
1970
|
}
|
|
1916
|
-
function
|
|
1971
|
+
function nt(i) {
|
|
1917
1972
|
const t = Y.find((n) => n.id === i);
|
|
1918
1973
|
if (!t) return;
|
|
1919
|
-
document.documentElement.setAttribute("data-brand", i), localStorage.setItem(
|
|
1974
|
+
document.documentElement.setAttribute("data-brand", i), localStorage.setItem(Vt, i);
|
|
1920
1975
|
const e = document.querySelector("[data-brand-toggle]");
|
|
1921
1976
|
if (e) {
|
|
1922
1977
|
e.setAttribute("data-current-brand", i);
|
|
@@ -1929,26 +1984,26 @@ function it(i) {
|
|
|
1929
1984
|
n.getAttribute("data-brand-btn") === i ? n.classList.add("is-active") : n.classList.remove("is-active");
|
|
1930
1985
|
});
|
|
1931
1986
|
}
|
|
1932
|
-
function
|
|
1987
|
+
function ut(i) {
|
|
1933
1988
|
const t = i.querySelector(".theme-icon");
|
|
1934
1989
|
if (t) {
|
|
1935
|
-
const e =
|
|
1936
|
-
t.src = e === "dark" ? "
|
|
1990
|
+
const e = R(), s = Nt();
|
|
1991
|
+
t.src = e === "dark" ? s + "sun.svg" : s + "moon.svg";
|
|
1937
1992
|
}
|
|
1938
1993
|
}
|
|
1939
|
-
function
|
|
1940
|
-
const i =
|
|
1941
|
-
|
|
1942
|
-
const t =
|
|
1943
|
-
|
|
1994
|
+
function or() {
|
|
1995
|
+
const i = R();
|
|
1996
|
+
it(i);
|
|
1997
|
+
const t = X();
|
|
1998
|
+
nt(t);
|
|
1944
1999
|
const e = document.querySelector("[data-theme-toggle]");
|
|
1945
2000
|
if (e) {
|
|
1946
|
-
|
|
2001
|
+
ut(e);
|
|
1947
2002
|
const o = e.onclick;
|
|
1948
2003
|
e.onclick = function(l) {
|
|
1949
2004
|
l.preventDefault();
|
|
1950
|
-
const
|
|
1951
|
-
|
|
2005
|
+
const d = R() === "dark" ? "light" : "dark";
|
|
2006
|
+
it(d), ut(e), typeof o == "function" && o.call(this, l);
|
|
1952
2007
|
};
|
|
1953
2008
|
}
|
|
1954
2009
|
let s = document.getElementById("brand-picker");
|
|
@@ -1973,34 +2028,34 @@ function tr() {
|
|
|
1973
2028
|
o.addEventListener("click", (l) => {
|
|
1974
2029
|
l.stopPropagation();
|
|
1975
2030
|
const c = o.getAttribute("data-brand-btn");
|
|
1976
|
-
|
|
2031
|
+
nt(c), s && (s.style.display = "none");
|
|
1977
2032
|
});
|
|
1978
2033
|
});
|
|
1979
2034
|
}
|
|
1980
|
-
function
|
|
2035
|
+
function Ha() {
|
|
1981
2036
|
const i = document.createElement("button");
|
|
1982
|
-
i.setAttribute("data-theme-toggle", ""), i.setAttribute("data-current-theme",
|
|
2037
|
+
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";
|
|
1983
2038
|
const t = document.createElement("img");
|
|
1984
2039
|
t.className = "theme-icon";
|
|
1985
|
-
const e =
|
|
1986
|
-
return t.src =
|
|
1987
|
-
|
|
1988
|
-
const
|
|
1989
|
-
|
|
2040
|
+
const e = Nt();
|
|
2041
|
+
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) {
|
|
2042
|
+
s.preventDefault();
|
|
2043
|
+
const r = R() === "dark" ? "light" : "dark";
|
|
2044
|
+
it(r);
|
|
1990
2045
|
}, i;
|
|
1991
2046
|
}
|
|
1992
|
-
function
|
|
2047
|
+
function Ma() {
|
|
1993
2048
|
const i = document.createElement("div");
|
|
1994
2049
|
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", Y.forEach((a) => {
|
|
1995
2050
|
const o = document.createElement("button");
|
|
1996
2051
|
o.setAttribute("data-brand-btn", a.id), o.style.display = "flex", o.style.justifyContent = "center", o.style.alignItems = "center", o.style.height = "60px", o.style.backgroundColor = a.color, o.style.color = ["#32F08C", "#FF9900", "#E2C027", "#0EB0C9", "#B1A6CC"].includes(a.color) ? "#0C0C0D" : "#FFFFFF", o.style.fontWeight = "500", o.style.borderRadius = "4px", o.style.border = "none", o.style.cursor = "pointer", o.style.margin = "0", o.style.padding = "0", o.textContent = a.name, i.appendChild(o);
|
|
1997
2052
|
}), document.body.appendChild(i);
|
|
1998
2053
|
const t = document.createElement("button");
|
|
1999
|
-
t.setAttribute("data-brand-toggle", ""), t.setAttribute("data-current-brand",
|
|
2054
|
+
t.setAttribute("data-brand-toggle", ""), t.setAttribute("data-current-brand", X()), t.className = "ds-btn ds-btn--ghost ds-btn--sm", t.style.position = "fixed", t.style.top = "16px", t.style.right = "56px", t.style.zIndex = "9999", t.style.display = "flex", t.style.alignItems = "center", t.style.gap = "6px";
|
|
2000
2055
|
const e = document.createElement("span");
|
|
2001
|
-
e.className = "brand-icon", e.style.width = "12px", e.style.height = "12px", e.style.borderRadius = "50%", e.style.backgroundColor = Y.find((a) => a.id ===
|
|
2056
|
+
e.className = "brand-icon", e.style.width = "12px", e.style.height = "12px", e.style.borderRadius = "50%", e.style.backgroundColor = Y.find((a) => a.id === X()).color;
|
|
2002
2057
|
const s = document.createElement("span");
|
|
2003
|
-
s.className = "brand-name", s.style.fontSize = "11px", s.textContent = Y.find((a) => a.id ===
|
|
2058
|
+
s.className = "brand-name", s.style.fontSize = "11px", s.textContent = Y.find((a) => a.id === X()).name, t.appendChild(e), t.appendChild(s), document.body.appendChild(t), t.onclick = function(a) {
|
|
2004
2059
|
a.stopPropagation(), a.preventDefault();
|
|
2005
2060
|
const o = i.style.display === "none";
|
|
2006
2061
|
i.style.display = o ? "grid" : "none", o ? setTimeout(() => {
|
|
@@ -2016,11 +2071,11 @@ function xa() {
|
|
|
2016
2071
|
a.addEventListener("click", (o) => {
|
|
2017
2072
|
o.stopPropagation();
|
|
2018
2073
|
const l = a.getAttribute("data-brand-btn");
|
|
2019
|
-
|
|
2074
|
+
nt(l), i.style.display = "none";
|
|
2020
2075
|
});
|
|
2021
2076
|
}), { toggleBtn: t, container: i };
|
|
2022
2077
|
}
|
|
2023
|
-
class
|
|
2078
|
+
class lr {
|
|
2024
2079
|
constructor() {
|
|
2025
2080
|
this.initializers = /* @__PURE__ */ new Map(), this.cleanupFunctions = /* @__PURE__ */ new Map(), this.processedElements = /* @__PURE__ */ new WeakSet(), this._dataAttrs = ["data-component"], this._cssClasses = [], this._cachedSelector = null;
|
|
2026
2081
|
}
|
|
@@ -2127,7 +2182,7 @@ class er {
|
|
|
2127
2182
|
}), await Promise.all(n);
|
|
2128
2183
|
}
|
|
2129
2184
|
}
|
|
2130
|
-
const E = new
|
|
2185
|
+
const E = new lr(), cr = [
|
|
2131
2186
|
{ attr: "data-dropdown", cls: "ds-dropdown" },
|
|
2132
2187
|
{ attr: "data-select", cls: "ds-select" },
|
|
2133
2188
|
{ attr: "data-datepicker", cls: "ds-datepicker" },
|
|
@@ -2149,11 +2204,11 @@ const E = new er(), sr = [
|
|
|
2149
2204
|
{ cls: "ds-notification" },
|
|
2150
2205
|
{ cls: "ds-message" }
|
|
2151
2206
|
];
|
|
2152
|
-
for (const i of
|
|
2207
|
+
for (const i of cr)
|
|
2153
2208
|
i.attr && !E._dataAttrs.includes(i.attr) && E._dataAttrs.push(i.attr), i.cls && !E._cssClasses.includes(i.cls) && E._cssClasses.push(i.cls);
|
|
2154
|
-
class
|
|
2209
|
+
class J {
|
|
2155
2210
|
constructor(t) {
|
|
2156
|
-
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
|
|
2211
|
+
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 ot(), this.setupContext = null;
|
|
2157
2212
|
}
|
|
2158
2213
|
_parseProps() {
|
|
2159
2214
|
const t = {};
|
|
@@ -2252,7 +2307,7 @@ class j {
|
|
|
2252
2307
|
};
|
|
2253
2308
|
let e = Object.getPrototypeOf(this);
|
|
2254
2309
|
const s = /* @__PURE__ */ new Set();
|
|
2255
|
-
for (; e && e.constructor !== Object && e.constructor !==
|
|
2310
|
+
for (; e && e.constructor !== Object && e.constructor !== J; ) {
|
|
2256
2311
|
for (const [n, r] of Object.entries(t))
|
|
2257
2312
|
s.has(n) || e.hasOwnProperty(n) && (Array.isArray(r) ? r.forEach((a) => {
|
|
2258
2313
|
n === "render" && this.lifecycle.on(a, () => this.render?.());
|
|
@@ -2286,7 +2341,7 @@ class j {
|
|
|
2286
2341
|
setup() {
|
|
2287
2342
|
}
|
|
2288
2343
|
}
|
|
2289
|
-
function
|
|
2344
|
+
function pt(i, t) {
|
|
2290
2345
|
Object.keys(t).forEach((e) => {
|
|
2291
2346
|
if (e !== "constructor")
|
|
2292
2347
|
if (typeof t[e] == "function") {
|
|
@@ -2298,12 +2353,12 @@ function dt(i, t) {
|
|
|
2298
2353
|
i.prototype[e] = t[e];
|
|
2299
2354
|
});
|
|
2300
2355
|
}
|
|
2301
|
-
class
|
|
2356
|
+
class hr {
|
|
2302
2357
|
constructor() {
|
|
2303
2358
|
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();
|
|
2304
2359
|
}
|
|
2305
2360
|
register(t, e) {
|
|
2306
|
-
if (!(e.prototype instanceof
|
|
2361
|
+
if (!(e.prototype instanceof J))
|
|
2307
2362
|
throw new Error(`Component ${t} must extend KupolaComponent`);
|
|
2308
2363
|
this.components.set(t, e);
|
|
2309
2364
|
}
|
|
@@ -2327,7 +2382,7 @@ class ir {
|
|
|
2327
2382
|
const n = (async () => {
|
|
2328
2383
|
try {
|
|
2329
2384
|
const r = await s(), a = r.default || r;
|
|
2330
|
-
if (!(a.prototype instanceof
|
|
2385
|
+
if (!(a.prototype instanceof J))
|
|
2331
2386
|
throw new Error(`Component ${t} must extend KupolaComponent`);
|
|
2332
2387
|
return this.loadedComponents.set(t, a), a;
|
|
2333
2388
|
} catch (r) {
|
|
@@ -2342,7 +2397,7 @@ class ir {
|
|
|
2342
2397
|
useMixin(t, ...e) {
|
|
2343
2398
|
e.forEach((s) => {
|
|
2344
2399
|
const n = this.mixins.get(s);
|
|
2345
|
-
n &&
|
|
2400
|
+
n && pt(t, n);
|
|
2346
2401
|
});
|
|
2347
2402
|
}
|
|
2348
2403
|
async bootstrap(t = document) {
|
|
@@ -2383,7 +2438,7 @@ class ir {
|
|
|
2383
2438
|
const n = t.getAttribute("data-mixins"), r = s;
|
|
2384
2439
|
n && n.split(",").forEach((o) => {
|
|
2385
2440
|
const l = this.mixins.get(o.trim());
|
|
2386
|
-
l &&
|
|
2441
|
+
l && pt(r, l);
|
|
2387
2442
|
});
|
|
2388
2443
|
const a = new r(t);
|
|
2389
2444
|
t.__kupolaInstance = a, this.instances.set(t, a), a.mount();
|
|
@@ -2429,27 +2484,30 @@ class ir {
|
|
|
2429
2484
|
}
|
|
2430
2485
|
}
|
|
2431
2486
|
let M = null;
|
|
2432
|
-
typeof window < "u" && (M = new
|
|
2433
|
-
async function
|
|
2434
|
-
typeof window < "u"
|
|
2487
|
+
typeof window < "u" && (M = new hr());
|
|
2488
|
+
async function ft() {
|
|
2489
|
+
if (typeof window < "u") {
|
|
2490
|
+
const i = lt();
|
|
2491
|
+
q.loadPersisted(), q.bind(), or(), i.components?.autoInit !== !1 && (await E.initializeAll(), M && await M.bootstrap());
|
|
2492
|
+
}
|
|
2435
2493
|
}
|
|
2436
|
-
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
2437
|
-
function
|
|
2494
|
+
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ft) : typeof window < "u" && setTimeout(ft, 0);
|
|
2495
|
+
function Ia(i, t) {
|
|
2438
2496
|
M && M.register(i, t);
|
|
2439
2497
|
}
|
|
2440
|
-
function
|
|
2498
|
+
function Ta(i, t) {
|
|
2441
2499
|
M && M.registerLazy(i, t);
|
|
2442
2500
|
}
|
|
2443
|
-
function
|
|
2501
|
+
function Aa(i) {
|
|
2444
2502
|
return M ? M.bootstrap(i) : Promise.resolve();
|
|
2445
2503
|
}
|
|
2446
|
-
function
|
|
2504
|
+
function za(i, t) {
|
|
2447
2505
|
M && M.defineMixin(i, t);
|
|
2448
2506
|
}
|
|
2449
|
-
function
|
|
2507
|
+
function Pa(i, ...t) {
|
|
2450
2508
|
M && M.useMixin(i, ...t);
|
|
2451
2509
|
}
|
|
2452
|
-
function
|
|
2510
|
+
function $a(i, t) {
|
|
2453
2511
|
if (!t || typeof t != "object")
|
|
2454
2512
|
throw new Error(`defineComponent("${i}"): options must be an object`);
|
|
2455
2513
|
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, {
|
|
@@ -2461,9 +2519,10 @@ function La(i, t) {
|
|
|
2461
2519
|
cssClass: t.cssClass
|
|
2462
2520
|
});
|
|
2463
2521
|
}
|
|
2464
|
-
class
|
|
2522
|
+
class Kt {
|
|
2465
2523
|
constructor(t = {}) {
|
|
2466
|
-
|
|
2524
|
+
const e = lt();
|
|
2525
|
+
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();
|
|
2467
2526
|
}
|
|
2468
2527
|
_initFromDOM() {
|
|
2469
2528
|
document.querySelectorAll('script[type="application/json"][data-kupola-i18n]').forEach((s) => {
|
|
@@ -2558,37 +2617,37 @@ class Nt {
|
|
|
2558
2617
|
return new Intl.RelativeTimeFormat(n, s).format(t, e);
|
|
2559
2618
|
}
|
|
2560
2619
|
}
|
|
2561
|
-
const
|
|
2562
|
-
function
|
|
2563
|
-
return new
|
|
2620
|
+
const O = new Kt();
|
|
2621
|
+
function qa(i) {
|
|
2622
|
+
return new Kt(i);
|
|
2564
2623
|
}
|
|
2565
|
-
function
|
|
2566
|
-
return
|
|
2624
|
+
function Ba(i, t = {}) {
|
|
2625
|
+
return O.t(i, t);
|
|
2567
2626
|
}
|
|
2568
|
-
function
|
|
2569
|
-
return
|
|
2627
|
+
function Fa(i, t, e = {}) {
|
|
2628
|
+
return O.n(i, t, e);
|
|
2570
2629
|
}
|
|
2571
|
-
function
|
|
2572
|
-
return
|
|
2630
|
+
function Na(i) {
|
|
2631
|
+
return O.setLocale(i);
|
|
2573
2632
|
}
|
|
2574
|
-
function
|
|
2575
|
-
return
|
|
2633
|
+
function Oa() {
|
|
2634
|
+
return O.getLocale();
|
|
2576
2635
|
}
|
|
2577
|
-
function
|
|
2578
|
-
return
|
|
2636
|
+
function Ra(i, t = {}) {
|
|
2637
|
+
return O.formatDate(i, t);
|
|
2579
2638
|
}
|
|
2580
|
-
function
|
|
2581
|
-
return
|
|
2639
|
+
function Va(i, t = {}) {
|
|
2640
|
+
return O.formatNumber(i, t);
|
|
2582
2641
|
}
|
|
2583
|
-
function
|
|
2584
|
-
return
|
|
2642
|
+
function Ka(i, t, e = {}) {
|
|
2643
|
+
return O.formatCurrency(i, t, e);
|
|
2585
2644
|
}
|
|
2586
|
-
class
|
|
2645
|
+
class dr {
|
|
2587
2646
|
constructor() {
|
|
2588
2647
|
this._listeners = /* @__PURE__ */ new Map(), this._scopeListeners = /* @__PURE__ */ new Map();
|
|
2589
2648
|
}
|
|
2590
2649
|
on(t, e, s, n = {}) {
|
|
2591
|
-
const { scope: r = null, once: a = !1, passive: o = !1, capture: l = !1 } = n, c = this._generateId(),
|
|
2650
|
+
const { scope: r = null, once: a = !1, passive: o = !1, capture: l = !1 } = n, c = this._generateId(), d = {
|
|
2592
2651
|
id: c,
|
|
2593
2652
|
target: t,
|
|
2594
2653
|
eventName: e,
|
|
@@ -2597,11 +2656,11 @@ class nr {
|
|
|
2597
2656
|
once: a,
|
|
2598
2657
|
wrappedHandler: null
|
|
2599
2658
|
};
|
|
2600
|
-
|
|
2659
|
+
d.wrappedHandler = (u) => {
|
|
2601
2660
|
a && this.offById(c), s.call(t, u);
|
|
2602
2661
|
};
|
|
2603
|
-
const
|
|
2604
|
-
return this._listeners.has(
|
|
2662
|
+
const h = this._getEventKey(t, e);
|
|
2663
|
+
return this._listeners.has(h) || this._listeners.set(h, []), this._listeners.get(h).push(d), r && (this._scopeListeners.has(r) || this._scopeListeners.set(r, []), this._scopeListeners.get(r).push(c)), t.addEventListener(e, d.wrappedHandler, {
|
|
2605
2664
|
passive: o,
|
|
2606
2665
|
capture: l
|
|
2607
2666
|
}), {
|
|
@@ -2713,32 +2772,32 @@ class nr {
|
|
|
2713
2772
|
this._listeners.clear(), this._scopeListeners.clear();
|
|
2714
2773
|
}
|
|
2715
2774
|
}
|
|
2716
|
-
const H = new
|
|
2717
|
-
function
|
|
2775
|
+
const H = new dr();
|
|
2776
|
+
function Wa(i, t, e, s) {
|
|
2718
2777
|
return H.on(i, t, e, s);
|
|
2719
2778
|
}
|
|
2720
|
-
function
|
|
2779
|
+
function Ua(i, t, e, s) {
|
|
2721
2780
|
return H.once(i, t, e, s);
|
|
2722
2781
|
}
|
|
2723
|
-
function
|
|
2782
|
+
function Ya(i, t, e) {
|
|
2724
2783
|
H.off(i, t, e);
|
|
2725
2784
|
}
|
|
2726
|
-
function
|
|
2785
|
+
function Xa(i, t, e) {
|
|
2727
2786
|
return H.emit(i, t, e);
|
|
2728
2787
|
}
|
|
2729
|
-
function
|
|
2788
|
+
function ja(i, t) {
|
|
2730
2789
|
return H.emitGlobal(i, t);
|
|
2731
2790
|
}
|
|
2732
|
-
function
|
|
2791
|
+
function Ja(i) {
|
|
2733
2792
|
H.offByScope(i);
|
|
2734
2793
|
}
|
|
2735
|
-
function
|
|
2794
|
+
function Ga(i, t) {
|
|
2736
2795
|
H.offAll(i, t);
|
|
2737
2796
|
}
|
|
2738
|
-
function
|
|
2797
|
+
function Za(i, t) {
|
|
2739
2798
|
return H.getListenerCount(i, t);
|
|
2740
2799
|
}
|
|
2741
|
-
class
|
|
2800
|
+
class ur {
|
|
2742
2801
|
constructor(t, e = {}) {
|
|
2743
2802
|
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)}`, this.triggerMode = e.trigger || t.getAttribute("data-dropdown-trigger") || "click", this.hoverDelay = e.hoverDelay || parseInt(t.getAttribute("data-dropdown-hover-delay")) || 150, this.disabled = e.disabled || t.hasAttribute("data-dropdown-disabled"), this.keyboardNav = e.keyboardNav !== !1, this.autoPosition = e.autoPosition !== !1, this.onSelect = e.onSelect || null, this.onShow = e.onShow || null, this.onHide = e.onHide || null, this.isOpen = !1, this.focusIndex = -1, this._hoverTimer = null, this._hoverLeaveTimer = null, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._itemClickHandler = null, this._keydownHandler = null, this._mouseenterHandler = null, this._mouseleaveHandler = null, this._triggerMouseenterHandler = null, this._triggerMouseleaveHandler = null, this._triggerKeydownHandler = null;
|
|
2744
2803
|
}
|
|
@@ -2840,25 +2899,25 @@ class rr {
|
|
|
2840
2899
|
}), 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._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);
|
|
2841
2900
|
}
|
|
2842
2901
|
}
|
|
2843
|
-
function
|
|
2844
|
-
const e = new
|
|
2902
|
+
function Wt(i, t) {
|
|
2903
|
+
const e = new ur(i, t);
|
|
2845
2904
|
e.init(), i._kupolaDropdown = e;
|
|
2846
2905
|
}
|
|
2847
|
-
function
|
|
2906
|
+
function Qa(i = document) {
|
|
2848
2907
|
i.querySelectorAll(".ds-dropdown").forEach((t) => {
|
|
2849
|
-
|
|
2908
|
+
Wt(t);
|
|
2850
2909
|
});
|
|
2851
2910
|
}
|
|
2852
|
-
function
|
|
2911
|
+
function Ut(i) {
|
|
2853
2912
|
i._kupolaDropdown && (i._kupolaDropdown.destroy(), i._kupolaDropdown = null);
|
|
2854
2913
|
}
|
|
2855
|
-
function
|
|
2914
|
+
function to() {
|
|
2856
2915
|
document.querySelectorAll(".ds-dropdown").forEach((i) => {
|
|
2857
|
-
|
|
2916
|
+
Ut(i);
|
|
2858
2917
|
});
|
|
2859
2918
|
}
|
|
2860
|
-
E.register("dropdown",
|
|
2861
|
-
class
|
|
2919
|
+
E.register("dropdown", Wt, Ut);
|
|
2920
|
+
class pr {
|
|
2862
2921
|
constructor(t, e = {}) {
|
|
2863
2922
|
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.isOpen = !1, this.selectedValues = /* @__PURE__ */ new Set(), this.allOptions = [], this.filteredOptions = [], this.focusIndex = -1, this.searchInput = null, this.clearBtn = null, this.tagsWrap = null, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._optionClickHandler = null, this._keydownHandler = null;
|
|
2864
2923
|
}
|
|
@@ -3071,20 +3130,20 @@ class ar {
|
|
|
3071
3130
|
}), 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._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._optionClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3072
3131
|
}
|
|
3073
3132
|
}
|
|
3074
|
-
function
|
|
3075
|
-
const e = new
|
|
3133
|
+
function Yt(i, t) {
|
|
3134
|
+
const e = new pr(i, t);
|
|
3076
3135
|
e.init(), i._kupolaSelect = e;
|
|
3077
3136
|
}
|
|
3078
|
-
function
|
|
3137
|
+
function eo(i = document) {
|
|
3079
3138
|
i.querySelectorAll(".ds-select").forEach((t) => {
|
|
3080
|
-
|
|
3139
|
+
Yt(t);
|
|
3081
3140
|
});
|
|
3082
3141
|
}
|
|
3083
|
-
function
|
|
3142
|
+
function fr(i) {
|
|
3084
3143
|
i._kupolaSelect && (i._kupolaSelect.destroy(), i._kupolaSelect = null);
|
|
3085
3144
|
}
|
|
3086
|
-
E.register("select",
|
|
3087
|
-
class
|
|
3145
|
+
E.register("select", Yt, fr);
|
|
3146
|
+
class mr {
|
|
3088
3147
|
constructor(t, e = {}) {
|
|
3089
3148
|
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)}`, this.format = e.format || t.getAttribute("data-datepicker-format") || "YYYY-MM-DD", this.range = e.range || t.hasAttribute("data-datepicker-range"), this.minDate = e.minDate || t.getAttribute("data-datepicker-min") || null, this.maxDate = e.maxDate || t.getAttribute("data-datepicker-max") || null, this.disabledDate = e.disabledDate || null, this.weekStart = e.weekStart || parseInt(t.getAttribute("data-datepicker-week-start")) || 0, this.placeholder = e.placeholder || t.getAttribute("data-datepicker-placeholder") || "", this.showToday = e.showToday !== !1, this.showWeekNumber = e.showWeekNumber || t.hasAttribute("data-datepicker-week-number"), this.onChange = e.onChange || null, this.months = e.months || ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], this.weekDays = e.weekDays || ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], this.todayText = e.todayText || "Today", this.clearText = e.clearText || "Clear", this.currentDate = /* @__PURE__ */ new Date(), this.viewMode = "days", this.selectedDate = null, this.rangeStart = null, this.rangeEnd = null, this.isSelectingEnd = !1, this._iconClickHandler = null, this._inputClickHandler = null, this._endInputClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._resizeHandler = null, this._resizeListener = null, this._keydownHandler = null;
|
|
3090
3149
|
}
|
|
@@ -3187,20 +3246,20 @@ class lr {
|
|
|
3187
3246
|
const m = document.createElement("span");
|
|
3188
3247
|
m.className = "ds-datepicker__weekday", m.textContent = p, l.appendChild(m);
|
|
3189
3248
|
}), t.appendChild(l);
|
|
3190
|
-
const
|
|
3191
|
-
|
|
3192
|
-
const
|
|
3249
|
+
const d = document.createElement("div");
|
|
3250
|
+
d.className = "ds-datepicker__days";
|
|
3251
|
+
const h = new Date(e, s, 1).getDay(), u = new Date(e, s + 1, 0).getDate(), f = (h - this.weekStart + 7) % 7;
|
|
3193
3252
|
for (let p = 0; p < f; p++) {
|
|
3194
3253
|
const m = document.createElement("span");
|
|
3195
|
-
m.className = "ds-datepicker__day ds-datepicker__day--empty",
|
|
3254
|
+
m.className = "ds-datepicker__day ds-datepicker__day--empty", d.appendChild(m);
|
|
3196
3255
|
}
|
|
3197
3256
|
for (let p = 1; p <= u; p++) {
|
|
3198
3257
|
const m = new Date(e, s, p), y = document.createElement("button");
|
|
3199
3258
|
y.className = "ds-datepicker__day", y.type = "button", y.textContent = p, this._formatDate(m), this._isToday(m) && y.classList.add("is-today"), this.range ? ((this._isSameDay(m, this.rangeStart) || this._isSameDay(m, this.rangeEnd)) && y.classList.add("is-selected"), this._isInRange(m) && y.classList.add("is-in-range")) : this._isSameDay(m, this.selectedDate) && y.classList.add("is-selected"), this._isDateDisabled(m) && (y.classList.add("is-disabled"), y.disabled = !0);
|
|
3200
3259
|
const _ = () => this._selectDate(m);
|
|
3201
|
-
y.addEventListener("click", _), y._dayClickHandler = _,
|
|
3260
|
+
y.addEventListener("click", _), y._dayClickHandler = _, d.appendChild(y);
|
|
3202
3261
|
}
|
|
3203
|
-
if (t.appendChild(
|
|
3262
|
+
if (t.appendChild(d), this.showToday) {
|
|
3204
3263
|
const p = document.createElement("div");
|
|
3205
3264
|
p.className = "ds-datepicker__footer";
|
|
3206
3265
|
const m = document.createElement("button");
|
|
@@ -3233,10 +3292,10 @@ class lr {
|
|
|
3233
3292
|
const l = document.createElement("div");
|
|
3234
3293
|
l.className = "ds-datepicker__years-grid";
|
|
3235
3294
|
for (let c = 0; c < 12; c++) {
|
|
3236
|
-
const
|
|
3237
|
-
|
|
3238
|
-
u.stopPropagation(), this.currentDate.setFullYear(
|
|
3239
|
-
}), l.appendChild(
|
|
3295
|
+
const d = s + c, h = document.createElement("button");
|
|
3296
|
+
h.className = "ds-datepicker__year-cell", h.type = "button", h.textContent = d, d === e && h.classList.add("is-selected"), h.addEventListener("click", (u) => {
|
|
3297
|
+
u.stopPropagation(), this.currentDate.setFullYear(d), this.viewMode = "months", this._renderCalendar();
|
|
3298
|
+
}), l.appendChild(h);
|
|
3240
3299
|
}
|
|
3241
3300
|
t.appendChild(l);
|
|
3242
3301
|
}
|
|
@@ -3259,10 +3318,10 @@ class lr {
|
|
|
3259
3318
|
}), s.appendChild(n), s.appendChild(r), s.appendChild(a), t.appendChild(s);
|
|
3260
3319
|
const o = document.createElement("div");
|
|
3261
3320
|
o.className = "ds-datepicker__months-grid", this.months.forEach((l, c) => {
|
|
3262
|
-
const
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
}), o.appendChild(
|
|
3321
|
+
const d = document.createElement("button");
|
|
3322
|
+
d.className = "ds-datepicker__month-cell", d.type = "button", d.textContent = l, c === this.currentDate.getMonth() && d.classList.add("is-selected"), d.addEventListener("click", (h) => {
|
|
3323
|
+
h.stopPropagation(), this.currentDate.setMonth(c), this.viewMode = "days", this._renderCalendar();
|
|
3324
|
+
}), o.appendChild(d);
|
|
3266
3325
|
}), t.appendChild(o);
|
|
3267
3326
|
}
|
|
3268
3327
|
_selectDate(t) {
|
|
@@ -3322,20 +3381,20 @@ class lr {
|
|
|
3322
3381
|
}), 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);
|
|
3323
3382
|
}
|
|
3324
3383
|
}
|
|
3325
|
-
function
|
|
3326
|
-
const e = new
|
|
3384
|
+
function Xt(i, t) {
|
|
3385
|
+
const e = new mr(i, t);
|
|
3327
3386
|
e.init(), i._kupolaDatepicker = e;
|
|
3328
3387
|
}
|
|
3329
|
-
function
|
|
3388
|
+
function so(i = document) {
|
|
3330
3389
|
i.querySelectorAll(".ds-datepicker").forEach((t) => {
|
|
3331
|
-
|
|
3390
|
+
Xt(t);
|
|
3332
3391
|
});
|
|
3333
3392
|
}
|
|
3334
|
-
function
|
|
3393
|
+
function gr(i) {
|
|
3335
3394
|
i._kupolaDatepicker && (i._kupolaDatepicker.destroy(), i._kupolaDatepicker = null);
|
|
3336
3395
|
}
|
|
3337
|
-
E.register("datepicker",
|
|
3338
|
-
class
|
|
3396
|
+
E.register("datepicker", Xt, gr);
|
|
3397
|
+
class _r {
|
|
3339
3398
|
constructor(t, e = {}) {
|
|
3340
3399
|
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;
|
|
3341
3400
|
}
|
|
@@ -3517,20 +3576,20 @@ class hr {
|
|
|
3517
3576
|
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);
|
|
3518
3577
|
}
|
|
3519
3578
|
}
|
|
3520
|
-
function
|
|
3521
|
-
const e = new
|
|
3579
|
+
function jt(i, t) {
|
|
3580
|
+
const e = new _r(i, t);
|
|
3522
3581
|
e.init(), i._kupolaTimepicker = e;
|
|
3523
3582
|
}
|
|
3524
|
-
function
|
|
3583
|
+
function io(i = document) {
|
|
3525
3584
|
i.querySelectorAll(".ds-timepicker").forEach((t) => {
|
|
3526
|
-
|
|
3585
|
+
jt(t);
|
|
3527
3586
|
});
|
|
3528
3587
|
}
|
|
3529
|
-
function
|
|
3588
|
+
function yr(i) {
|
|
3530
3589
|
i._kupolaTimepicker && (i._kupolaTimepicker.destroy(), i._kupolaTimepicker = null);
|
|
3531
3590
|
}
|
|
3532
|
-
E.register("timepicker",
|
|
3533
|
-
class
|
|
3591
|
+
E.register("timepicker", jt, yr);
|
|
3592
|
+
class vr {
|
|
3534
3593
|
constructor(t, e = {}) {
|
|
3535
3594
|
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)
|
|
3536
3595
|
throw new Error("Slider: Missing required elements");
|
|
@@ -3586,11 +3645,11 @@ class ur {
|
|
|
3586
3645
|
if (!this._isDragging) return;
|
|
3587
3646
|
a.preventDefault();
|
|
3588
3647
|
const o = a.touches ? a.touches[0].clientX : a.clientX, l = a.touches ? a.touches[0].clientY : a.clientY, c = this.track.getBoundingClientRect();
|
|
3589
|
-
let
|
|
3590
|
-
this.vertical ?
|
|
3591
|
-
const
|
|
3592
|
-
let p =
|
|
3593
|
-
if (p = Math.round(p / f) * f, p = Math.max(
|
|
3648
|
+
let d;
|
|
3649
|
+
this.vertical ? d = 1 - (l - c.top) / c.height : d = (o - c.left) / c.width, d = Math.max(0, Math.min(1, d));
|
|
3650
|
+
const h = parseFloat(this.input?.min || 0), u = parseFloat(this.input?.max || 100), f = parseFloat(this.input?.step || 1);
|
|
3651
|
+
let p = h + d * (u - h);
|
|
3652
|
+
if (p = Math.round(p / f) * f, p = Math.max(h, Math.min(u, p)), e === "start" && this.range && this.inputEnd) {
|
|
3594
3653
|
const m = parseFloat(this.inputEnd.value);
|
|
3595
3654
|
p > m && (p = m);
|
|
3596
3655
|
}
|
|
@@ -3598,7 +3657,7 @@ class ur {
|
|
|
3598
3657
|
const m = parseFloat(this.input.value);
|
|
3599
3658
|
p < m && (p = m);
|
|
3600
3659
|
}
|
|
3601
|
-
e === "start" && this.input ? this.input.value = p : e === "end" && this.inputEnd && (this.inputEnd.value = p), this.updateSlider(), this.onInput && this.onInput({ value: this.getValue(), percentage:
|
|
3660
|
+
e === "start" && this.input ? this.input.value = p : e === "end" && this.inputEnd && (this.inputEnd.value = p), this.updateSlider(), this.onInput && this.onInput({ value: this.getValue(), percentage: d });
|
|
3602
3661
|
}, r = () => {
|
|
3603
3662
|
this._isDragging = !1, this._activeThumb = null, this.element.classList.remove("is-dragging"), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), this.onChange && this.onChange({ value: this.getValue() }), this.element.dispatchEvent(new CustomEvent("kupola:slider-change", {
|
|
3604
3663
|
detail: { value: this.getValue() },
|
|
@@ -3618,8 +3677,8 @@ class ur {
|
|
|
3618
3677
|
const a = parseFloat(this.input?.min || 0), o = parseFloat(this.input?.max || 100), l = parseFloat(this.input?.step || 1);
|
|
3619
3678
|
let c = a + r * (o - a);
|
|
3620
3679
|
if (c = Math.round(c / l) * l, this.range) {
|
|
3621
|
-
const
|
|
3622
|
-
u <= f ? this.input && (this.input.value = Math.min(c,
|
|
3680
|
+
const d = parseFloat(this.input?.value || 0), h = parseFloat(this.inputEnd?.value || 0), u = Math.abs(c - d), f = Math.abs(c - h);
|
|
3681
|
+
u <= f ? this.input && (this.input.value = Math.min(c, h)) : this.inputEnd && (this.inputEnd.value = Math.max(c, d));
|
|
3623
3682
|
} else
|
|
3624
3683
|
this.input && (this.input.value = c);
|
|
3625
3684
|
this.updateSlider();
|
|
@@ -3678,26 +3737,26 @@ class ur {
|
|
|
3678
3737
|
this.disabled = !0, this.element.classList.add("is-disabled");
|
|
3679
3738
|
}
|
|
3680
3739
|
}
|
|
3681
|
-
function
|
|
3740
|
+
function Jt(i, t) {
|
|
3682
3741
|
if (!i.__kupolaInitialized)
|
|
3683
3742
|
try {
|
|
3684
|
-
const e = new
|
|
3743
|
+
const e = new vr(i, t);
|
|
3685
3744
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
3686
3745
|
} catch (e) {
|
|
3687
3746
|
console.error("[Slider] Error initializing:", e);
|
|
3688
3747
|
}
|
|
3689
3748
|
}
|
|
3690
|
-
function
|
|
3749
|
+
function br(i) {
|
|
3691
3750
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3692
3751
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3693
3752
|
}
|
|
3694
|
-
function
|
|
3753
|
+
function no() {
|
|
3695
3754
|
document.querySelectorAll(".ds-slider").forEach((i) => {
|
|
3696
|
-
|
|
3755
|
+
Jt(i);
|
|
3697
3756
|
});
|
|
3698
3757
|
}
|
|
3699
|
-
E.register("slider",
|
|
3700
|
-
class
|
|
3758
|
+
E.register("slider", Jt, br);
|
|
3759
|
+
class xr {
|
|
3701
3760
|
constructor(t, e = {}) {
|
|
3702
3761
|
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 = () => {
|
|
3703
3762
|
this.pauseOnHover && this.stopAutoPlay();
|
|
@@ -3778,22 +3837,22 @@ class fr {
|
|
|
3778
3837
|
}), 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;
|
|
3779
3838
|
}
|
|
3780
3839
|
}
|
|
3781
|
-
function
|
|
3840
|
+
function Gt(i, t) {
|
|
3782
3841
|
if (i.__kupolaInitialized) return;
|
|
3783
|
-
const e = new
|
|
3842
|
+
const e = new xr(i, t);
|
|
3784
3843
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
3785
3844
|
}
|
|
3786
|
-
function
|
|
3845
|
+
function ro(i = document) {
|
|
3787
3846
|
i.querySelectorAll(".ds-carousel").forEach((t) => {
|
|
3788
|
-
|
|
3847
|
+
Gt(t);
|
|
3789
3848
|
});
|
|
3790
3849
|
}
|
|
3791
|
-
function
|
|
3850
|
+
function Er(i) {
|
|
3792
3851
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3793
3852
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3794
3853
|
}
|
|
3795
|
-
E.register("carousel",
|
|
3796
|
-
class
|
|
3854
|
+
E.register("carousel", Gt, Er);
|
|
3855
|
+
class kr {
|
|
3797
3856
|
constructor(t, e = {}) {
|
|
3798
3857
|
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();
|
|
3799
3858
|
}
|
|
@@ -3830,20 +3889,20 @@ class gr {
|
|
|
3830
3889
|
return this.drawerEl?.classList.contains("is-visible") || !1;
|
|
3831
3890
|
}
|
|
3832
3891
|
}
|
|
3833
|
-
function
|
|
3892
|
+
function rt(i, t) {
|
|
3834
3893
|
if (i.__kupolaInitialized) return;
|
|
3835
|
-
const e = new
|
|
3894
|
+
const e = new kr(i, t);
|
|
3836
3895
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
3837
3896
|
}
|
|
3838
|
-
function
|
|
3897
|
+
function wr(i) {
|
|
3839
3898
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3840
3899
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3841
3900
|
}
|
|
3842
|
-
function
|
|
3901
|
+
function ao() {
|
|
3843
3902
|
document.querySelectorAll("[data-drawer]").forEach((i) => {
|
|
3844
3903
|
i.addEventListener("click", () => {
|
|
3845
3904
|
const t = i.getAttribute("data-drawer"), e = document.getElementById(t);
|
|
3846
|
-
e && (
|
|
3905
|
+
e && (rt(e, {
|
|
3847
3906
|
placement: i.getAttribute("data-drawer-placement") || "right",
|
|
3848
3907
|
width: i.getAttribute("data-drawer-width"),
|
|
3849
3908
|
height: i.getAttribute("data-drawer-height")
|
|
@@ -3851,10 +3910,10 @@ function Ga() {
|
|
|
3851
3910
|
});
|
|
3852
3911
|
}), document.querySelectorAll(".ds-drawer-mask").forEach((i) => {
|
|
3853
3912
|
const t = i.parentElement;
|
|
3854
|
-
t &&
|
|
3913
|
+
t && rt(t);
|
|
3855
3914
|
});
|
|
3856
3915
|
}
|
|
3857
|
-
E.register("drawer",
|
|
3916
|
+
E.register("drawer", rt, wr);
|
|
3858
3917
|
class P {
|
|
3859
3918
|
constructor(t, e = {}) {
|
|
3860
3919
|
this.element = t, this.mask = t.querySelector(".ds-modal-mask"), this.modal = t.querySelector(".ds-modal"), this.closeBtn = t.querySelector(".ds-modal__close"), this.fullscreen = e.fullscreen || t.hasAttribute("data-modal-fullscreen"), this.closableOnMask = e.closableOnMask !== !1, this.escClose = e.escClose !== !1, this.width = e.width || t.getAttribute("data-modal-width") || "", this.center = e.center !== !1, this.onBeforeOpen = e.onBeforeOpen || null, this.onBeforeClose = e.onBeforeClose || null, this.onOpened = e.onOpened || null, this.onClosed = e.onClosed || null, this._isOpen = !1, this._keydownHandler = (s) => {
|
|
@@ -3889,7 +3948,7 @@ class P {
|
|
|
3889
3948
|
}
|
|
3890
3949
|
}
|
|
3891
3950
|
P._openCount = 0;
|
|
3892
|
-
function
|
|
3951
|
+
function Zt(i = {}) {
|
|
3893
3952
|
const {
|
|
3894
3953
|
title: t = "",
|
|
3895
3954
|
content: e = "",
|
|
@@ -3900,8 +3959,8 @@ function Xt(i = {}) {
|
|
|
3900
3959
|
showConfirm: o = !0,
|
|
3901
3960
|
confirmText: l = "OK",
|
|
3902
3961
|
cancelText: c = "Cancel",
|
|
3903
|
-
confirmClass:
|
|
3904
|
-
cancelClass:
|
|
3962
|
+
confirmClass: d = "ds-btn--brand",
|
|
3963
|
+
cancelClass: h = "ds-btn--ghost",
|
|
3905
3964
|
closable: u = !0,
|
|
3906
3965
|
maskClosable: f = !0,
|
|
3907
3966
|
onConfirm: p,
|
|
@@ -3913,8 +3972,8 @@ function Xt(i = {}) {
|
|
|
3913
3972
|
b.className = "ds-modal-container";
|
|
3914
3973
|
let v = "";
|
|
3915
3974
|
x !== null && (typeof x == "string" ? v = `<div class="ds-modal__footer">${x}</div>` : (o || a) && (v = `<div class="ds-modal__footer">
|
|
3916
|
-
${a ? `<button class="ds-btn ${
|
|
3917
|
-
${o ? `<button class="ds-btn ${
|
|
3975
|
+
${a ? `<button class="ds-btn ${h}" data-modal-cancel>${c}</button>` : ""}
|
|
3976
|
+
${o ? `<button class="ds-btn ${d}" data-modal-confirm>${l}</button>` : ""}
|
|
3918
3977
|
</div>`)), b.innerHTML = `
|
|
3919
3978
|
<div class="ds-modal-mask">
|
|
3920
3979
|
<div class="ds-modal${r ? " ds-modal--fullscreen" : ""}" style="${r ? "" : "max-width: " + n}">
|
|
@@ -3951,49 +4010,49 @@ function Xt(i = {}) {
|
|
|
3951
4010
|
}
|
|
3952
4011
|
}
|
|
3953
4012
|
z = !0, w.close();
|
|
3954
|
-
},
|
|
4013
|
+
}, ct = () => {
|
|
3955
4014
|
m && m(), w.close();
|
|
3956
4015
|
};
|
|
3957
|
-
D && D.addEventListener("click", B), I && I.addEventListener("click",
|
|
3958
|
-
const
|
|
4016
|
+
D && D.addEventListener("click", B), I && I.addEventListener("click", ct);
|
|
4017
|
+
const ve = () => {
|
|
3959
4018
|
setTimeout(() => {
|
|
3960
|
-
D && D.removeEventListener("click", B), I && I.removeEventListener("click",
|
|
4019
|
+
D && D.removeEventListener("click", B), I && I.removeEventListener("click", ct), w.destroy(), b.remove(), _ && _(z);
|
|
3961
4020
|
}, 300);
|
|
3962
|
-
},
|
|
4021
|
+
}, be = w.close.bind(w);
|
|
3963
4022
|
return w.close = () => {
|
|
3964
|
-
|
|
4023
|
+
be(), ve();
|
|
3965
4024
|
}, w.open(), y && setTimeout(() => y(), 50), w;
|
|
3966
4025
|
}
|
|
3967
|
-
function
|
|
3968
|
-
return typeof i == "string" && (i = { content: i }),
|
|
4026
|
+
function oo(i) {
|
|
4027
|
+
return typeof i == "string" && (i = { content: i }), Zt({
|
|
3969
4028
|
...i,
|
|
3970
4029
|
showCancel: !0,
|
|
3971
4030
|
showConfirm: !0
|
|
3972
4031
|
});
|
|
3973
4032
|
}
|
|
3974
|
-
function
|
|
3975
|
-
return typeof i == "string" && (i = { content: i }),
|
|
4033
|
+
function lo(i) {
|
|
4034
|
+
return typeof i == "string" && (i = { content: i }), Zt({
|
|
3976
4035
|
...i,
|
|
3977
4036
|
showCancel: !1,
|
|
3978
4037
|
showConfirm: !0
|
|
3979
4038
|
});
|
|
3980
4039
|
}
|
|
3981
|
-
function
|
|
4040
|
+
function Qt(i) {
|
|
3982
4041
|
if (i.__kupolaInitialized) return;
|
|
3983
4042
|
const t = new P(i);
|
|
3984
4043
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
3985
4044
|
}
|
|
3986
|
-
function
|
|
4045
|
+
function Cr(i) {
|
|
3987
4046
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
3988
4047
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
3989
4048
|
}
|
|
3990
|
-
function
|
|
4049
|
+
function co() {
|
|
3991
4050
|
document.querySelectorAll(".ds-modal-container").forEach((i) => {
|
|
3992
|
-
|
|
4051
|
+
Qt(i);
|
|
3993
4052
|
});
|
|
3994
4053
|
}
|
|
3995
|
-
E.register("modal",
|
|
3996
|
-
class
|
|
4054
|
+
E.register("modal", Qt, Cr);
|
|
4055
|
+
class ho {
|
|
3997
4056
|
static normal(t = {}) {
|
|
3998
4057
|
return this._create({ type: "normal", ...t });
|
|
3999
4058
|
}
|
|
@@ -4044,7 +4103,7 @@ class eo {
|
|
|
4044
4103
|
</div>
|
|
4045
4104
|
</div>
|
|
4046
4105
|
`, document.body.appendChild(l), s && (l.querySelector(".ds-dialog__title").textContent = s), l.querySelector(".ds-dialog__content").textContent = n;
|
|
4047
|
-
const c = l.querySelector(".ds-modal-mask"),
|
|
4106
|
+
const c = l.querySelector(".ds-modal-mask"), d = l.querySelector("[data-dialog-confirm]"), h = l.querySelector("[data-dialog-cancel]"), u = function(_) {
|
|
4048
4107
|
_.key === "Escape" && (a && a(), y());
|
|
4049
4108
|
}, f = function(_) {
|
|
4050
4109
|
_.target === c && (a && a(), y());
|
|
@@ -4053,12 +4112,12 @@ class eo {
|
|
|
4053
4112
|
}, m = function() {
|
|
4054
4113
|
a && a(), y();
|
|
4055
4114
|
}, y = () => {
|
|
4056
|
-
c.classList.remove("is-visible"), document.body.style.overflow = "", document.removeEventListener("keydown", u), c.removeEventListener("click", f),
|
|
4115
|
+
c.classList.remove("is-visible"), document.body.style.overflow = "", document.removeEventListener("keydown", u), c.removeEventListener("click", f), d && d.removeEventListener("click", p), h && h.removeEventListener("click", m), setTimeout(() => l.remove(), 300);
|
|
4057
4116
|
};
|
|
4058
|
-
return c.classList.add("is-visible"), document.body.style.overflow = "hidden",
|
|
4117
|
+
return c.classList.add("is-visible"), document.body.style.overflow = "hidden", d && d.addEventListener("click", p), h && h.addEventListener("click", m), c.addEventListener("click", f), document.addEventListener("keydown", u), { close: y };
|
|
4059
4118
|
}
|
|
4060
4119
|
}
|
|
4061
|
-
const
|
|
4120
|
+
const uo = {
|
|
4062
4121
|
normal: function(i) {
|
|
4063
4122
|
this.show({ ...i, type: "normal" });
|
|
4064
4123
|
},
|
|
@@ -4104,9 +4163,9 @@ const so = {
|
|
|
4104
4163
|
}, n);
|
|
4105
4164
|
}
|
|
4106
4165
|
};
|
|
4107
|
-
function
|
|
4166
|
+
function po() {
|
|
4108
4167
|
}
|
|
4109
|
-
const
|
|
4168
|
+
const fo = {
|
|
4110
4169
|
normal: function(i, t = {}) {
|
|
4111
4170
|
this.show(i, "normal", t);
|
|
4112
4171
|
},
|
|
@@ -4144,12 +4203,12 @@ const no = {
|
|
|
4144
4203
|
}, s);
|
|
4145
4204
|
}
|
|
4146
4205
|
};
|
|
4147
|
-
function
|
|
4206
|
+
function mo() {
|
|
4148
4207
|
}
|
|
4149
|
-
function
|
|
4208
|
+
function mt(i) {
|
|
4150
4209
|
return i ? i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
4151
4210
|
}
|
|
4152
|
-
class
|
|
4211
|
+
class Sr {
|
|
4153
4212
|
constructor(t) {
|
|
4154
4213
|
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();
|
|
4155
4214
|
}
|
|
@@ -4205,7 +4264,7 @@ class vr {
|
|
|
4205
4264
|
<div class="ds-fileupload__icon" style="width: 24px; height: 24px; border-radius: 4px;">
|
|
4206
4265
|
${s}
|
|
4207
4266
|
</div>
|
|
4208
|
-
<span class="ds-fileupload__filename">${this.truncateFilename(
|
|
4267
|
+
<span class="ds-fileupload__filename">${this.truncateFilename(mt(t.name))}</span>
|
|
4209
4268
|
<span class="ds-fileupload__size">${this.formatSize(t.size)}</span>
|
|
4210
4269
|
<button class="ds-fileupload__remove" type="button" aria-label="Remove file">
|
|
4211
4270
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -4257,7 +4316,7 @@ class vr {
|
|
|
4257
4316
|
e.onload = (s) => {
|
|
4258
4317
|
const n = document.createElement("div");
|
|
4259
4318
|
n.className = "ds-fileupload__preview-item", n.innerHTML = `
|
|
4260
|
-
<img src="${s.target.result}" alt="${
|
|
4319
|
+
<img src="${s.target.result}" alt="${mt(t.name)}">
|
|
4261
4320
|
<button class="ds-fileupload__preview-remove" type="button" aria-label="Remove preview">
|
|
4262
4321
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
4263
4322
|
<path d="M18 6L6 18"/>
|
|
@@ -4307,22 +4366,22 @@ class vr {
|
|
|
4307
4366
|
}), this._listeners = null, this.files = [], this.dropzone = null, this.input = null, this.list = null, this.progress = null, this.preview = null, this.element = null;
|
|
4308
4367
|
}
|
|
4309
4368
|
}
|
|
4310
|
-
function
|
|
4369
|
+
function te(i) {
|
|
4311
4370
|
if (i.__kupolaInitialized) return;
|
|
4312
|
-
const t = new
|
|
4371
|
+
const t = new Sr(i);
|
|
4313
4372
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
4314
4373
|
}
|
|
4315
|
-
function
|
|
4374
|
+
function Lr(i) {
|
|
4316
4375
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4317
4376
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4318
4377
|
}
|
|
4319
|
-
function
|
|
4378
|
+
function go() {
|
|
4320
4379
|
document.querySelectorAll(".ds-fileupload").forEach((i) => {
|
|
4321
|
-
|
|
4380
|
+
te(i);
|
|
4322
4381
|
});
|
|
4323
4382
|
}
|
|
4324
|
-
E.register("fileupload",
|
|
4325
|
-
class
|
|
4383
|
+
E.register("fileupload", te, Lr);
|
|
4384
|
+
class Dr {
|
|
4326
4385
|
constructor(t, e = {}) {
|
|
4327
4386
|
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();
|
|
4328
4387
|
}
|
|
@@ -4339,8 +4398,8 @@ class xr {
|
|
|
4339
4398
|
const l = () => {
|
|
4340
4399
|
if (a) return;
|
|
4341
4400
|
const c = n.classList.contains("is-active");
|
|
4342
|
-
this.accordion && !c && this.headers.forEach((
|
|
4343
|
-
|
|
4401
|
+
this.accordion && !c && this.headers.forEach((d, h) => {
|
|
4402
|
+
h !== s && d.item.classList.contains("is-active") && this._collapseItem(d);
|
|
4344
4403
|
}), c ? this._collapseItem({ item: n, content: r }) : this._expandItem({ item: n, content: r }), this.element.dispatchEvent(new CustomEvent("kupola:collapse-toggle", {
|
|
4345
4404
|
detail: { index: s, expanded: !c, item: n },
|
|
4346
4405
|
bubbles: !0
|
|
@@ -4404,22 +4463,22 @@ class xr {
|
|
|
4404
4463
|
this.headers[t] && (this.headers[t].isDisabled = !1, this.headers[t].item.classList.remove("is-disabled"));
|
|
4405
4464
|
}
|
|
4406
4465
|
}
|
|
4407
|
-
function
|
|
4466
|
+
function ee(i, t) {
|
|
4408
4467
|
if (i.__kupolaInitialized) return;
|
|
4409
|
-
const e = new
|
|
4468
|
+
const e = new Dr(i, t);
|
|
4410
4469
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4411
4470
|
}
|
|
4412
|
-
function
|
|
4471
|
+
function Hr(i) {
|
|
4413
4472
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4414
4473
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4415
4474
|
}
|
|
4416
|
-
function
|
|
4475
|
+
function _o() {
|
|
4417
4476
|
document.querySelectorAll(".ds-collapse").forEach((i) => {
|
|
4418
|
-
|
|
4477
|
+
ee(i);
|
|
4419
4478
|
});
|
|
4420
4479
|
}
|
|
4421
|
-
E.register("collapse",
|
|
4422
|
-
class
|
|
4480
|
+
E.register("collapse", ee, Hr);
|
|
4481
|
+
class Mr {
|
|
4423
4482
|
constructor(t, e = {}) {
|
|
4424
4483
|
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);
|
|
4425
4484
|
}
|
|
@@ -4443,9 +4502,9 @@ class kr {
|
|
|
4443
4502
|
}
|
|
4444
4503
|
_colorStringToHSB(t) {
|
|
4445
4504
|
const e = t.replace(/^#/, ""), s = parseInt(e.substring(0, 2), 16) / 255, n = parseInt(e.substring(2, 4), 16) / 255, r = parseInt(e.substring(4, 6), 16) / 255, a = e.length === 8 ? parseInt(e.substring(6, 8), 16) / 255 : 1, o = Math.max(s, n, r), l = Math.min(s, n, r);
|
|
4446
|
-
let c = 0,
|
|
4505
|
+
let c = 0, d = 0, h = o;
|
|
4447
4506
|
const u = o - l;
|
|
4448
|
-
if (
|
|
4507
|
+
if (d = o === 0 ? 0 : u / o, o !== l)
|
|
4449
4508
|
switch (o) {
|
|
4450
4509
|
case s:
|
|
4451
4510
|
c = ((n - r) / u + (n < r ? 6 : 0)) / 6;
|
|
@@ -4457,17 +4516,17 @@ class kr {
|
|
|
4457
4516
|
c = ((s - n) / u + 4) / 6;
|
|
4458
4517
|
break;
|
|
4459
4518
|
}
|
|
4460
|
-
this.hue = Math.round(c * 360), this.saturation = Math.round(
|
|
4519
|
+
this.hue = Math.round(c * 360), this.saturation = Math.round(d * 100), this.brightness = Math.round(h * 100), this.alpha = Math.round(a * 100);
|
|
4461
4520
|
}
|
|
4462
4521
|
_HSBToColorString(t, e, s, n = 1) {
|
|
4463
4522
|
e /= 100, s /= 100, n /= 100;
|
|
4464
|
-
const r = (
|
|
4523
|
+
const r = (h) => (h + t / 60) % 6, a = (h) => s * (1 - e * Math.max(0, Math.min(r(h), 4 - r(h), 1))), o = Math.round(a(5) * 255), l = Math.round(a(3) * 255), c = Math.round(a(1) * 255);
|
|
4465
4524
|
if (this.mode === "rgb")
|
|
4466
4525
|
return n < 1 ? `rgba(${o}, ${l}, ${c}, ${n.toFixed(2)})` : `rgb(${o}, ${l}, ${c})`;
|
|
4467
4526
|
if (this.mode === "hsl")
|
|
4468
4527
|
return n < 1 ? `hsla(${t}, ${Math.round(e * 100)}%, ${Math.round(s * 100)}%, ${n.toFixed(2)})` : `hsl(${t}, ${Math.round(e * 100)}%, ${Math.round(s * 100)}%)`;
|
|
4469
|
-
const
|
|
4470
|
-
return n < 1 ?
|
|
4528
|
+
const d = `#${o.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${c.toString(16).padStart(2, "0")}`;
|
|
4529
|
+
return n < 1 ? d + Math.round(n * 255).toString(16).padStart(2, "0") : d;
|
|
4471
4530
|
}
|
|
4472
4531
|
_renderPreviousColors() {
|
|
4473
4532
|
const t = this.panel.querySelector(".ds-color-picker__previous");
|
|
@@ -4584,20 +4643,20 @@ class kr {
|
|
|
4584
4643
|
}), 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;
|
|
4585
4644
|
}
|
|
4586
4645
|
}
|
|
4587
|
-
function
|
|
4588
|
-
const e = new
|
|
4646
|
+
function se(i, t) {
|
|
4647
|
+
const e = new Mr(i, t);
|
|
4589
4648
|
e.init(), i._kupolaColorPicker = e;
|
|
4590
4649
|
}
|
|
4591
|
-
function
|
|
4650
|
+
function yo(i = document) {
|
|
4592
4651
|
i.querySelectorAll(".ds-color-picker").forEach((t) => {
|
|
4593
|
-
|
|
4652
|
+
se(t);
|
|
4594
4653
|
});
|
|
4595
4654
|
}
|
|
4596
|
-
function
|
|
4655
|
+
function Ir(i) {
|
|
4597
4656
|
i._kupolaColorPicker && (i._kupolaColorPicker.destroy(), i._kupolaColorPicker = null);
|
|
4598
4657
|
}
|
|
4599
|
-
E.register("color-picker",
|
|
4600
|
-
class
|
|
4658
|
+
E.register("color-picker", se, Ir);
|
|
4659
|
+
class Tr {
|
|
4601
4660
|
constructor(t, e = {}) {
|
|
4602
4661
|
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)
|
|
4603
4662
|
throw new Error("Calendar: Missing required elements");
|
|
@@ -4677,22 +4736,22 @@ class Cr {
|
|
|
4677
4736
|
for (let o = 1; o <= n; o++) {
|
|
4678
4737
|
const l = new Date(t, e, o), c = document.createElement("button");
|
|
4679
4738
|
c.className = "ds-calendar__day", c.textContent = o;
|
|
4680
|
-
const
|
|
4681
|
-
|
|
4682
|
-
const
|
|
4683
|
-
if (
|
|
4739
|
+
const d = this._formatDate(l);
|
|
4740
|
+
d === a && c.classList.add("is-today"), this._isSameDay(l, this.selectedDate) && c.classList.add("is-selected"), this.isRangeMode && (this._isRangeStart(l) && c.classList.add("is-range-start"), this._isRangeEnd(l) && c.classList.add("is-range-end"), this._isDateInRange(l) && c.classList.add("is-in-range"));
|
|
4741
|
+
const h = this._getEventsForDate(l);
|
|
4742
|
+
if (h.length > 0) {
|
|
4684
4743
|
c.classList.add("has-events");
|
|
4685
4744
|
const f = document.createElement("span");
|
|
4686
|
-
f.className = "ds-calendar__day-event", f.style.backgroundColor =
|
|
4745
|
+
f.className = "ds-calendar__day-event", f.style.backgroundColor = h[0].color || "#007bff", c.appendChild(f);
|
|
4687
4746
|
}
|
|
4688
4747
|
const u = () => {
|
|
4689
4748
|
this.element.querySelectorAll(".ds-calendar__day").forEach((f) => f.classList.remove("is-selected")), c.classList.add("is-selected"), this.isRangeMode ? !this.rangeStart || this.rangeEnd && !this._isSameDay(l, this.rangeEnd) ? (this.rangeStart = l, this.rangeEnd = null) : this.rangeStart && !this.rangeEnd && (l < this.rangeStart ? (this.rangeEnd = this.rangeStart, this.rangeStart = l) : this.rangeEnd = l, this.onRangeSelect && this.onRangeSelect({ start: this.rangeStart, end: this.rangeEnd }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-range-select", {
|
|
4690
4749
|
detail: { start: this.rangeStart, end: this.rangeEnd },
|
|
4691
4750
|
bubbles: !0
|
|
4692
|
-
}))) : (this.selectedDate = l, this.onSelect && this.onSelect({ date: l, dateStr:
|
|
4693
|
-
detail: { date: l, dateStr:
|
|
4751
|
+
}))) : (this.selectedDate = l, this.onSelect && this.onSelect({ date: l, dateStr: d }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-select", {
|
|
4752
|
+
detail: { date: l, dateStr: d },
|
|
4694
4753
|
bubbles: !0
|
|
4695
|
-
}))),
|
|
4754
|
+
}))), h.forEach((f) => {
|
|
4696
4755
|
this.onEventClick && this.onEventClick(f, l);
|
|
4697
4756
|
}), this.render();
|
|
4698
4757
|
};
|
|
@@ -4704,31 +4763,31 @@ class Cr {
|
|
|
4704
4763
|
a.setDate(n.getDate() + 6), this.titleEl.textContent = `${this.i18n.shortMonths[r.getMonth()]} ${r.getDate()} - ${this.i18n.shortMonths[a.getMonth()]} ${a.getDate()} ${t}`, this.daysEl.innerHTML = "";
|
|
4705
4764
|
const o = /* @__PURE__ */ new Date(), l = this._formatDate(o);
|
|
4706
4765
|
for (let c = 0; c < 7; c++) {
|
|
4707
|
-
const
|
|
4708
|
-
|
|
4709
|
-
const
|
|
4710
|
-
|
|
4766
|
+
const d = new Date(n);
|
|
4767
|
+
d.setDate(n.getDate() + c);
|
|
4768
|
+
const h = document.createElement("button");
|
|
4769
|
+
h.className = "ds-calendar__day ds-calendar__day--week";
|
|
4711
4770
|
const u = document.createElement("span");
|
|
4712
|
-
u.className = "ds-calendar__day-header", u.textContent = this.i18n.shortWeekdays[
|
|
4771
|
+
u.className = "ds-calendar__day-header", u.textContent = this.i18n.shortWeekdays[d.getDay()], h.appendChild(u);
|
|
4713
4772
|
const f = document.createElement("span");
|
|
4714
|
-
f.className = "ds-calendar__day-number", f.textContent =
|
|
4715
|
-
const p = this._formatDate(
|
|
4716
|
-
p === l &&
|
|
4717
|
-
const m = this._getEventsForDate(
|
|
4773
|
+
f.className = "ds-calendar__day-number", f.textContent = d.getDate(), h.appendChild(f);
|
|
4774
|
+
const p = this._formatDate(d);
|
|
4775
|
+
p === l && h.classList.add("is-today"), this._isSameDay(d, this.selectedDate) && h.classList.add("is-selected");
|
|
4776
|
+
const m = this._getEventsForDate(d);
|
|
4718
4777
|
if (m.length > 0) {
|
|
4719
4778
|
const _ = document.createElement("span");
|
|
4720
4779
|
_.className = "ds-calendar__day-events", m.slice(0, 3).forEach((x) => {
|
|
4721
4780
|
const b = document.createElement("span");
|
|
4722
4781
|
b.className = "ds-calendar__day-event", b.style.backgroundColor = x.color || "#007bff", _.appendChild(b);
|
|
4723
|
-
}),
|
|
4782
|
+
}), h.appendChild(_);
|
|
4724
4783
|
}
|
|
4725
4784
|
const y = () => {
|
|
4726
|
-
this.element.querySelectorAll(".ds-calendar__day").forEach((_) => _.classList.remove("is-selected")),
|
|
4727
|
-
detail: { date:
|
|
4785
|
+
this.element.querySelectorAll(".ds-calendar__day").forEach((_) => _.classList.remove("is-selected")), h.classList.add("is-selected"), this.selectedDate = d, this.onSelect && this.onSelect({ date: d, dateStr: p }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-select", {
|
|
4786
|
+
detail: { date: d, dateStr: p },
|
|
4728
4787
|
bubbles: !0
|
|
4729
4788
|
})), this.render();
|
|
4730
4789
|
};
|
|
4731
|
-
|
|
4790
|
+
h.addEventListener("click", y), this._listeners.push({ el: h, event: "click", handler: y }), this.daysEl.appendChild(h);
|
|
4732
4791
|
}
|
|
4733
4792
|
}
|
|
4734
4793
|
destroy() {
|
|
@@ -4794,26 +4853,26 @@ class Cr {
|
|
|
4794
4853
|
this.isRangeMode = !this.isRangeMode, this.rangeStart = null, this.rangeEnd = null, this.render(), this._emitChange();
|
|
4795
4854
|
}
|
|
4796
4855
|
}
|
|
4797
|
-
function
|
|
4856
|
+
function ie(i, t) {
|
|
4798
4857
|
if (!i.__kupolaInitialized)
|
|
4799
4858
|
try {
|
|
4800
|
-
const e = new
|
|
4859
|
+
const e = new Tr(i, t);
|
|
4801
4860
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4802
4861
|
} catch (e) {
|
|
4803
4862
|
console.error("[Calendar] Error initializing:", e);
|
|
4804
4863
|
}
|
|
4805
4864
|
}
|
|
4806
|
-
function
|
|
4865
|
+
function Ar(i) {
|
|
4807
4866
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4808
4867
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4809
4868
|
}
|
|
4810
|
-
function
|
|
4869
|
+
function vo() {
|
|
4811
4870
|
document.querySelectorAll(".ds-calendar").forEach((i) => {
|
|
4812
|
-
|
|
4871
|
+
ie(i);
|
|
4813
4872
|
});
|
|
4814
4873
|
}
|
|
4815
|
-
E.register("calendar",
|
|
4816
|
-
class
|
|
4874
|
+
E.register("calendar", ie, Ar);
|
|
4875
|
+
class zr {
|
|
4817
4876
|
constructor(t, e = {}) {
|
|
4818
4877
|
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();
|
|
4819
4878
|
}
|
|
@@ -4959,22 +5018,22 @@ class Lr {
|
|
|
4959
5018
|
}), this._listeners = null, this.input = null, this.element = null;
|
|
4960
5019
|
}
|
|
4961
5020
|
}
|
|
4962
|
-
function
|
|
5021
|
+
function ne(i, t) {
|
|
4963
5022
|
if (i.__kupolaInitialized) return;
|
|
4964
|
-
const e = new
|
|
5023
|
+
const e = new zr(i, t);
|
|
4965
5024
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4966
5025
|
}
|
|
4967
|
-
function
|
|
5026
|
+
function Pr(i) {
|
|
4968
5027
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4969
5028
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4970
5029
|
}
|
|
4971
|
-
function
|
|
5030
|
+
function bo() {
|
|
4972
5031
|
document.querySelectorAll(".ds-dynamic-tags").forEach((i) => {
|
|
4973
|
-
|
|
5032
|
+
ne(i);
|
|
4974
5033
|
});
|
|
4975
5034
|
}
|
|
4976
|
-
E.register("dynamic-tags",
|
|
4977
|
-
class
|
|
5035
|
+
E.register("dynamic-tags", ne, Pr);
|
|
5036
|
+
class re {
|
|
4978
5037
|
constructor(t = {}) {
|
|
4979
5038
|
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();
|
|
4980
5039
|
}
|
|
@@ -5165,19 +5224,19 @@ class ee {
|
|
|
5165
5224
|
e && e.removeEventListener("click", this.closeHandler), s && this._prevHandler && s.removeEventListener("click", this._prevHandler), n && this._nextHandler && n.removeEventListener("click", this._nextHandler), this.overlay && this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
|
|
5166
5225
|
}
|
|
5167
5226
|
}
|
|
5168
|
-
let
|
|
5169
|
-
function
|
|
5170
|
-
|
|
5227
|
+
let V = null;
|
|
5228
|
+
function xo() {
|
|
5229
|
+
V || (V = new re()), document.querySelectorAll("[data-image-preview]").forEach((i) => {
|
|
5171
5230
|
i.addEventListener("click", () => {
|
|
5172
5231
|
const t = JSON.parse(i.getAttribute("data-image-preview")), e = parseInt(i.getAttribute("data-image-index")) || 0;
|
|
5173
|
-
|
|
5232
|
+
V.show(t, e);
|
|
5174
5233
|
});
|
|
5175
5234
|
});
|
|
5176
5235
|
}
|
|
5177
|
-
function
|
|
5178
|
-
|
|
5236
|
+
function Eo(i, t = 0) {
|
|
5237
|
+
V || (V = new re()), V.show(i, t);
|
|
5179
5238
|
}
|
|
5180
|
-
class
|
|
5239
|
+
class $r {
|
|
5181
5240
|
constructor(t, e = {}) {
|
|
5182
5241
|
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();
|
|
5183
5242
|
}
|
|
@@ -5307,22 +5366,22 @@ class Hr {
|
|
|
5307
5366
|
}), this._listeners = [], this.closeBtn = null, this.checkbox = null, this.editInput = null, this.element = null;
|
|
5308
5367
|
}
|
|
5309
5368
|
}
|
|
5310
|
-
function
|
|
5369
|
+
function ae(i, t) {
|
|
5311
5370
|
if (i.__kupolaInitialized) return;
|
|
5312
|
-
const e = new
|
|
5371
|
+
const e = new $r(i, t);
|
|
5313
5372
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
5314
5373
|
}
|
|
5315
|
-
function
|
|
5374
|
+
function qr(i) {
|
|
5316
5375
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5317
5376
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5318
5377
|
}
|
|
5319
|
-
function
|
|
5378
|
+
function ko() {
|
|
5320
5379
|
document.querySelectorAll(".ds-tag").forEach((i) => {
|
|
5321
|
-
|
|
5380
|
+
ae(i);
|
|
5322
5381
|
});
|
|
5323
5382
|
}
|
|
5324
|
-
E.register("tag",
|
|
5325
|
-
class
|
|
5383
|
+
E.register("tag", ae, qr);
|
|
5384
|
+
class Br {
|
|
5326
5385
|
constructor(t) {
|
|
5327
5386
|
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();
|
|
5328
5387
|
}
|
|
@@ -5337,8 +5396,8 @@ class Ir {
|
|
|
5337
5396
|
if (!this.valueElement) return;
|
|
5338
5397
|
const t = this.valueElement.textContent, e = t.match(/[\d.,]+/);
|
|
5339
5398
|
if (!e) return;
|
|
5340
|
-
const s = parseFloat(e[0].replace(",", "")), n = t.substring(0, e.index), r = t.substring(e.index + e[0].length), a = 1500, o = performance.now(), l = 0, c = (
|
|
5341
|
-
const
|
|
5399
|
+
const s = parseFloat(e[0].replace(",", "")), n = t.substring(0, e.index), r = t.substring(e.index + e[0].length), a = 1500, o = performance.now(), l = 0, c = (d) => {
|
|
5400
|
+
const h = d - o, u = Math.min(h / a, 1), f = 1 - Math.pow(1 - u, 3), p = l + (s - l) * f;
|
|
5342
5401
|
let m;
|
|
5343
5402
|
s >= 1e6 ? m = (p / 1e6).toFixed(1) + "M" : s >= 1e3 ? m = (p / 1e3).toFixed(1) + "K" : Number.isInteger(s) ? m = Math.floor(p).toLocaleString() : m = p.toFixed(2), this.valueElement.textContent = n + m + r, u < 1 && requestAnimationFrame(c);
|
|
5344
5403
|
};
|
|
@@ -5356,18 +5415,18 @@ class Ir {
|
|
|
5356
5415
|
this.valueElement.textContent = t;
|
|
5357
5416
|
return;
|
|
5358
5417
|
}
|
|
5359
|
-
const a = n.substring(0, r.index), o = n.substring(r.index + r[0].length), l = parseFloat(r[0].replace(",", "")), c = parseFloat(t),
|
|
5360
|
-
const f = u -
|
|
5418
|
+
const a = n.substring(0, r.index), o = n.substring(r.index + r[0].length), l = parseFloat(r[0].replace(",", "")), c = parseFloat(t), d = performance.now(), h = (u) => {
|
|
5419
|
+
const f = u - d, p = Math.min(f / s, 1), m = 1 - Math.pow(1 - p, 3), y = l + (c - l) * m;
|
|
5361
5420
|
let _;
|
|
5362
|
-
c >= 1e6 ? _ = (y / 1e6).toFixed(1) + "M" : c >= 1e3 ? _ = (y / 1e3).toFixed(1) + "K" : Number.isInteger(c) ? _ = Math.floor(y).toLocaleString() : _ = y.toFixed(2), this.valueElement.textContent = a + _ + o, p < 1 && requestAnimationFrame(
|
|
5421
|
+
c >= 1e6 ? _ = (y / 1e6).toFixed(1) + "M" : c >= 1e3 ? _ = (y / 1e3).toFixed(1) + "K" : Number.isInteger(c) ? _ = Math.floor(y).toLocaleString() : _ = y.toFixed(2), this.valueElement.textContent = a + _ + o, p < 1 && requestAnimationFrame(h);
|
|
5363
5422
|
};
|
|
5364
|
-
requestAnimationFrame(
|
|
5423
|
+
requestAnimationFrame(h);
|
|
5365
5424
|
}
|
|
5366
5425
|
updateProgress(t, e = {}) {
|
|
5367
5426
|
if (!this.progressFill) return;
|
|
5368
5427
|
const s = e.duration || 600, n = parseFloat(this.progressFill.style.width || "0"), r = Math.min(Math.max(t, 0), 100), a = performance.now(), o = (l) => {
|
|
5369
|
-
const c = l - a,
|
|
5370
|
-
this.progressFill.style.width = u + "%",
|
|
5428
|
+
const c = l - a, d = Math.min(c / s, 1), h = 1 - Math.pow(1 - d, 3), u = n + (r - n) * h;
|
|
5429
|
+
this.progressFill.style.width = u + "%", d < 1 && requestAnimationFrame(o);
|
|
5371
5430
|
};
|
|
5372
5431
|
requestAnimationFrame(o);
|
|
5373
5432
|
}
|
|
@@ -5382,22 +5441,22 @@ class Ir {
|
|
|
5382
5441
|
this._observer && (this._observer.disconnect(), this._observer = null), this.animated = !1, this.valueElement = null, this.progressFill = null, this.element = null;
|
|
5383
5442
|
}
|
|
5384
5443
|
}
|
|
5385
|
-
function
|
|
5444
|
+
function oe(i) {
|
|
5386
5445
|
if (i.__kupolaInitialized) return;
|
|
5387
|
-
const t = new
|
|
5446
|
+
const t = new Br(i);
|
|
5388
5447
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
5389
5448
|
}
|
|
5390
|
-
function
|
|
5449
|
+
function Fr(i) {
|
|
5391
5450
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5392
5451
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5393
5452
|
}
|
|
5394
|
-
function
|
|
5453
|
+
function wo() {
|
|
5395
5454
|
document.querySelectorAll(".ds-statcard").forEach((i) => {
|
|
5396
|
-
|
|
5455
|
+
oe(i);
|
|
5397
5456
|
});
|
|
5398
5457
|
}
|
|
5399
|
-
E.register("statcard",
|
|
5400
|
-
class
|
|
5458
|
+
E.register("statcard", oe, Fr);
|
|
5459
|
+
class Nr {
|
|
5401
5460
|
constructor(t, e = {}) {
|
|
5402
5461
|
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();
|
|
5403
5462
|
}
|
|
@@ -5468,15 +5527,15 @@ class Ar {
|
|
|
5468
5527
|
s.push(new Date(_)), (_.getDay() === 6 || _.getTime() === this.endDate.getTime()) && (e.push(s), s = []);
|
|
5469
5528
|
const a = e.length, o = this.element.classList.contains("ds-heatmap--compact") ? 12 : 16, l = a * o, c = document.createElement("div");
|
|
5470
5529
|
c.className = "ds-heatmap__container";
|
|
5471
|
-
const h = document.createElement("div");
|
|
5472
|
-
h.className = "ds-heatmap__labels-and-grid";
|
|
5473
5530
|
const d = document.createElement("div");
|
|
5474
|
-
d.className = "ds-
|
|
5531
|
+
d.className = "ds-heatmap__labels-and-grid";
|
|
5532
|
+
const h = document.createElement("div");
|
|
5533
|
+
h.className = "ds-heatmap__weekday-labels";
|
|
5475
5534
|
const u = this.element.classList.contains("ds-heatmap--compact") ? 12 : 16;
|
|
5476
5535
|
this.getWeekdayLabels().forEach((_) => {
|
|
5477
5536
|
const x = document.createElement("div");
|
|
5478
|
-
x.className = "ds-heatmap__weekday-label", x.textContent = _, x.style.height = u + "px", x.style.lineHeight = u + "px",
|
|
5479
|
-
}),
|
|
5537
|
+
x.className = "ds-heatmap__weekday-label", x.textContent = _, x.style.height = u + "px", x.style.lineHeight = u + "px", h.appendChild(x);
|
|
5538
|
+
}), d.appendChild(h);
|
|
5480
5539
|
const f = document.createElement("div");
|
|
5481
5540
|
f.className = "ds-heatmap__grid-container";
|
|
5482
5541
|
const p = document.createElement("div");
|
|
@@ -5509,7 +5568,7 @@ class Ar {
|
|
|
5509
5568
|
), x.appendChild(C);
|
|
5510
5569
|
}
|
|
5511
5570
|
}), y.appendChild(x);
|
|
5512
|
-
}), f.appendChild(y),
|
|
5571
|
+
}), f.appendChild(y), d.appendChild(f), c.appendChild(d), t.appendChild(c), this.renderLegend(t);
|
|
5513
5572
|
}
|
|
5514
5573
|
renderLegend(t) {
|
|
5515
5574
|
const e = document.createElement("div");
|
|
@@ -5552,7 +5611,7 @@ class Ar {
|
|
|
5552
5611
|
}), this._listeners = null, this.tooltip && this.tooltip.parentNode && this.tooltip.parentNode.removeChild(this.tooltip), this.tooltip = null, this.data = [], this.element = null;
|
|
5553
5612
|
}
|
|
5554
5613
|
}
|
|
5555
|
-
function
|
|
5614
|
+
function le(i) {
|
|
5556
5615
|
if (i.__kupolaInitialized) return;
|
|
5557
5616
|
const t = i.getAttribute("data-heatmap-data");
|
|
5558
5617
|
let e = [];
|
|
@@ -5560,27 +5619,27 @@ function ne(i) {
|
|
|
5560
5619
|
try {
|
|
5561
5620
|
e = JSON.parse(t);
|
|
5562
5621
|
} catch {
|
|
5563
|
-
e =
|
|
5622
|
+
e = gt();
|
|
5564
5623
|
}
|
|
5565
5624
|
else
|
|
5566
|
-
e =
|
|
5567
|
-
const s = new
|
|
5625
|
+
e = gt();
|
|
5626
|
+
const s = new Nr(i, {
|
|
5568
5627
|
data: e,
|
|
5569
5628
|
onCellClick: (n) => {
|
|
5570
5629
|
}
|
|
5571
5630
|
});
|
|
5572
5631
|
i.__kupolaInstance = s, i.__kupolaInitialized = !0;
|
|
5573
5632
|
}
|
|
5574
|
-
function
|
|
5633
|
+
function Or(i) {
|
|
5575
5634
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5576
5635
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5577
5636
|
}
|
|
5578
|
-
function
|
|
5637
|
+
function Co() {
|
|
5579
5638
|
document.querySelectorAll(".ds-heatmap").forEach((i) => {
|
|
5580
|
-
|
|
5639
|
+
le(i);
|
|
5581
5640
|
});
|
|
5582
5641
|
}
|
|
5583
|
-
function
|
|
5642
|
+
function gt() {
|
|
5584
5643
|
const i = [], t = /* @__PURE__ */ new Date(), e = /* @__PURE__ */ new Date();
|
|
5585
5644
|
e.setFullYear(e.getFullYear() - 1);
|
|
5586
5645
|
for (let s = new Date(e); s <= t; s.setDate(s.getDate() + 1)) {
|
|
@@ -5592,8 +5651,8 @@ function ft() {
|
|
|
5592
5651
|
}
|
|
5593
5652
|
return i;
|
|
5594
5653
|
}
|
|
5595
|
-
E.register("heatmap",
|
|
5596
|
-
class
|
|
5654
|
+
E.register("heatmap", le, Or);
|
|
5655
|
+
class Rr {
|
|
5597
5656
|
constructor(t, e = {}) {
|
|
5598
5657
|
this.element = t, this.tooltipEl = null, this.options = e, this.delay = e.delay || parseInt(t.getAttribute("data-tooltip-delay")) || 0, this.hideDelay = e.hideDelay || parseInt(t.getAttribute("data-tooltip-hide-delay")) || 0, this.trigger = e.trigger || t.getAttribute("data-tooltip-trigger") || "hover", this.html = e.html || t.hasAttribute("data-tooltip-html"), this.theme = e.theme || t.getAttribute("data-tooltip-theme") || "default", this.position = e.position || t.getAttribute("data-tooltip-position") || "top", this.animation = e.animation !== !1, this.mouseFollow = e.mouseFollow || t.hasAttribute("data-tooltip-mouse-follow"), this._showTooltip = null, this._hideTooltip = null, this._showTimer = null, this._hideTimer = null, this._clickHandler = null, this._focusHandler = null, this._blurHandler = null, this._mouseMoveHandler = null, this.isVisible = !1;
|
|
5599
5658
|
}
|
|
@@ -5684,20 +5743,20 @@ class Pr {
|
|
|
5684
5743
|
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);
|
|
5685
5744
|
}
|
|
5686
5745
|
}
|
|
5687
|
-
function
|
|
5688
|
-
const e = new
|
|
5746
|
+
function ce(i, t) {
|
|
5747
|
+
const e = new Rr(i, t);
|
|
5689
5748
|
e.init(), i._kupolaTooltip = e;
|
|
5690
5749
|
}
|
|
5691
|
-
function
|
|
5750
|
+
function So(i = document) {
|
|
5692
5751
|
i.querySelectorAll("[data-tooltip]").forEach((t) => {
|
|
5693
|
-
|
|
5752
|
+
ce(t);
|
|
5694
5753
|
});
|
|
5695
5754
|
}
|
|
5696
|
-
function
|
|
5755
|
+
function Vr(i) {
|
|
5697
5756
|
i._kupolaTooltip && (i._kupolaTooltip.destroy(), i._kupolaTooltip = null);
|
|
5698
5757
|
}
|
|
5699
|
-
E.register("tooltip",
|
|
5700
|
-
class
|
|
5758
|
+
E.register("tooltip", ce, Vr);
|
|
5759
|
+
class Kr {
|
|
5701
5760
|
constructor() {
|
|
5702
5761
|
this.validators = {
|
|
5703
5762
|
required: this.validateRequired,
|
|
@@ -5725,11 +5784,11 @@ class qr {
|
|
|
5725
5784
|
let r = !1;
|
|
5726
5785
|
return n.forEach((a) => {
|
|
5727
5786
|
const o = a.name || a.id, l = this.parseRules(a.getAttribute("data-validate")), c = this.getValue(a);
|
|
5728
|
-
for (const [
|
|
5729
|
-
if ((this.customValidators[
|
|
5787
|
+
for (const [d, h] of Object.entries(l))
|
|
5788
|
+
if ((this.customValidators[d] || this.validators[d])?.(c, h))
|
|
5730
5789
|
this.clearError(a);
|
|
5731
5790
|
else {
|
|
5732
|
-
s[o] = this.getErrorMessage(
|
|
5791
|
+
s[o] = this.getErrorMessage(d, h, a), this.showError(a, s[o]), r = !0;
|
|
5733
5792
|
break;
|
|
5734
5793
|
}
|
|
5735
5794
|
}), this.formStates[e] = {
|
|
@@ -5772,8 +5831,8 @@ class qr {
|
|
|
5772
5831
|
await this.validateInputAsync(l) || (a = !0);
|
|
5773
5832
|
const o = {};
|
|
5774
5833
|
return r.forEach((l) => {
|
|
5775
|
-
const c = l.name || l.id,
|
|
5776
|
-
|
|
5834
|
+
const c = l.name || l.id, d = l.parentElement.querySelector(".ds-input__error");
|
|
5835
|
+
d && (o[c] = d.textContent);
|
|
5777
5836
|
}), this.formStates[s] = {
|
|
5778
5837
|
valid: !a,
|
|
5779
5838
|
errors: o,
|
|
@@ -5923,7 +5982,7 @@ class qr {
|
|
|
5923
5982
|
}[t] || "Invalid input";
|
|
5924
5983
|
}
|
|
5925
5984
|
}
|
|
5926
|
-
const A = new
|
|
5985
|
+
const A = new Kr();
|
|
5927
5986
|
window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized = !0, document.addEventListener("DOMContentLoaded", () => {
|
|
5928
5987
|
document.querySelectorAll("form[data-validation]").forEach((i) => {
|
|
5929
5988
|
i.addEventListener("submit", async (t) => {
|
|
@@ -5976,7 +6035,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
5976
6035
|
});
|
|
5977
6036
|
});
|
|
5978
6037
|
}));
|
|
5979
|
-
class
|
|
6038
|
+
class Wr {
|
|
5980
6039
|
constructor(t, e = {}) {
|
|
5981
6040
|
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();
|
|
5982
6041
|
}
|
|
@@ -6100,9 +6159,9 @@ class Br {
|
|
|
6100
6159
|
const c = t ? this.itemWidth : this.itemHeight;
|
|
6101
6160
|
l = n * c;
|
|
6102
6161
|
}
|
|
6103
|
-
a.forEach((c,
|
|
6104
|
-
const
|
|
6105
|
-
o += this._buildItemHtml(c,
|
|
6162
|
+
a.forEach((c, d) => {
|
|
6163
|
+
const h = n + d, u = c[this.keyField] || h, f = this.selectedKey === u, p = this.getItemSize(h);
|
|
6164
|
+
o += this._buildItemHtml(c, h, u, f, p, l, t), l += p;
|
|
6106
6165
|
}), this.container.innerHTML = o, this.useDynamicHeight && this.updateDynamicHeights(), this.container.querySelectorAll(".ds-virtual-list__item").forEach((c) => {
|
|
6107
6166
|
c.addEventListener("click", () => this.handleItemClick(c));
|
|
6108
6167
|
});
|
|
@@ -6215,7 +6274,7 @@ class Br {
|
|
|
6215
6274
|
}), 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;
|
|
6216
6275
|
}
|
|
6217
6276
|
}
|
|
6218
|
-
function
|
|
6277
|
+
function _t(i = 1e3) {
|
|
6219
6278
|
const t = [], e = ["Document", "Image", "Video", "Folder", "Archive", "Spreadsheet", "Presentation", "Code"];
|
|
6220
6279
|
for (let s = 1; s <= i; s++) {
|
|
6221
6280
|
const n = Math.floor(Math.random() * e.length), r = Math.floor(Math.random() * 1e4);
|
|
@@ -6228,7 +6287,7 @@ function mt(i = 1e3) {
|
|
|
6228
6287
|
}
|
|
6229
6288
|
return t;
|
|
6230
6289
|
}
|
|
6231
|
-
function
|
|
6290
|
+
function Ur(i) {
|
|
6232
6291
|
if (i.__kupolaInitialized) return;
|
|
6233
6292
|
const t = i.getAttribute("data-virtual-list");
|
|
6234
6293
|
let e = [];
|
|
@@ -6236,11 +6295,11 @@ function Fr(i) {
|
|
|
6236
6295
|
try {
|
|
6237
6296
|
e = JSON.parse(t);
|
|
6238
6297
|
} catch {
|
|
6239
|
-
e =
|
|
6298
|
+
e = _t(1e3);
|
|
6240
6299
|
}
|
|
6241
6300
|
else
|
|
6242
|
-
e =
|
|
6243
|
-
const s = new
|
|
6301
|
+
e = _t(1e3);
|
|
6302
|
+
const s = new Wr(i, {
|
|
6244
6303
|
data: e,
|
|
6245
6304
|
onItemClick: (n) => {
|
|
6246
6305
|
},
|
|
@@ -6249,12 +6308,12 @@ function Fr(i) {
|
|
|
6249
6308
|
});
|
|
6250
6309
|
i.__kupolaInstance = s, i.__kupolaInitialized = !0;
|
|
6251
6310
|
}
|
|
6252
|
-
function
|
|
6311
|
+
function Yr(i) {
|
|
6253
6312
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6254
6313
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6255
6314
|
}
|
|
6256
|
-
E.register("virtual-list",
|
|
6257
|
-
const
|
|
6315
|
+
E.register("virtual-list", Ur, Yr);
|
|
6316
|
+
const Xr = '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"', he = {
|
|
6258
6317
|
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"/>',
|
|
6259
6318
|
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"/>',
|
|
6260
6319
|
mouse: '<rect x="6" y="2" width="12" height="20" rx="6"/><line x1="12" y1="6" x2="12" y2="11"/>',
|
|
@@ -6364,19 +6423,19 @@ const Or = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0
|
|
|
6364
6423
|
code: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
|
|
6365
6424
|
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"/>'
|
|
6366
6425
|
};
|
|
6367
|
-
function
|
|
6368
|
-
const s =
|
|
6369
|
-
return s ? `<svg ${
|
|
6426
|
+
function de(i, t = 16, e = "0 0 24 24") {
|
|
6427
|
+
const s = he[i];
|
|
6428
|
+
return s ? `<svg ${Xr.replace('width="16"', `width="${t}"`).replace('height="16"', `height="${t}"`).replace('viewBox="0 0 24 24"', `viewBox="${e}"`)}>${s}</svg>` : "";
|
|
6370
6429
|
}
|
|
6371
|
-
function
|
|
6430
|
+
function at(i = document) {
|
|
6372
6431
|
i.querySelectorAll("[data-icon]").forEach((t) => {
|
|
6373
6432
|
const e = t.getAttribute("data-icon"), s = +t.getAttribute("data-size") || 16, n = t.getAttribute("data-viewbox") || "0 0 24 24";
|
|
6374
|
-
t.innerHTML =
|
|
6433
|
+
t.innerHTML = de(e, s, n), t.classList.add("icon");
|
|
6375
6434
|
});
|
|
6376
6435
|
}
|
|
6377
|
-
const
|
|
6378
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
6379
|
-
class
|
|
6436
|
+
const Lo = { svg: de, render: at, PATHS: he };
|
|
6437
|
+
typeof document < "u" && (document.readyState !== "loading" ? at() : document.addEventListener("DOMContentLoaded", () => at()));
|
|
6438
|
+
class jr {
|
|
6380
6439
|
constructor(t) {
|
|
6381
6440
|
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();
|
|
6382
6441
|
}
|
|
@@ -6428,22 +6487,22 @@ class Rr {
|
|
|
6428
6487
|
this.stop(), this.hoursEl = null, this.minutesEl = null, this.secondsEl = null, this.element = null;
|
|
6429
6488
|
}
|
|
6430
6489
|
}
|
|
6431
|
-
function
|
|
6490
|
+
function ue(i) {
|
|
6432
6491
|
if (i.__kupolaInitialized) return;
|
|
6433
|
-
const t = new
|
|
6492
|
+
const t = new jr(i);
|
|
6434
6493
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
6435
6494
|
}
|
|
6436
|
-
function
|
|
6495
|
+
function Jr(i) {
|
|
6437
6496
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6438
6497
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6439
6498
|
}
|
|
6440
|
-
function
|
|
6499
|
+
function Do() {
|
|
6441
6500
|
document.querySelectorAll(".ds-countdown").forEach((t) => {
|
|
6442
|
-
|
|
6501
|
+
ue(t);
|
|
6443
6502
|
});
|
|
6444
6503
|
}
|
|
6445
|
-
E.register("countdown",
|
|
6446
|
-
class
|
|
6504
|
+
E.register("countdown", ue, Jr);
|
|
6505
|
+
class Gr {
|
|
6447
6506
|
constructor(t) {
|
|
6448
6507
|
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)
|
|
6449
6508
|
throw new Error("NumberInput: Missing required elements");
|
|
@@ -6494,26 +6553,26 @@ class Kr {
|
|
|
6494
6553
|
}), this._listeners = null, this.minusBtn = null, this.plusBtn = null, this.inputEl = null, this.element = null;
|
|
6495
6554
|
}
|
|
6496
6555
|
}
|
|
6497
|
-
function
|
|
6556
|
+
function pe(i) {
|
|
6498
6557
|
if (!i.__kupolaInitialized)
|
|
6499
6558
|
try {
|
|
6500
|
-
const t = new
|
|
6559
|
+
const t = new Gr(i);
|
|
6501
6560
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
6502
6561
|
} catch (t) {
|
|
6503
6562
|
console.error("[NumberInput] Error initializing:", t);
|
|
6504
6563
|
}
|
|
6505
6564
|
}
|
|
6506
|
-
function
|
|
6565
|
+
function Zr(i) {
|
|
6507
6566
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6508
6567
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6509
6568
|
}
|
|
6510
|
-
function
|
|
6569
|
+
function Ho() {
|
|
6511
6570
|
document.querySelectorAll(".ds-number-input").forEach((i) => {
|
|
6512
|
-
|
|
6571
|
+
pe(i);
|
|
6513
6572
|
});
|
|
6514
6573
|
}
|
|
6515
|
-
E.register("number-input",
|
|
6516
|
-
class
|
|
6574
|
+
E.register("number-input", pe, Zr);
|
|
6575
|
+
class Qr {
|
|
6517
6576
|
constructor(t) {
|
|
6518
6577
|
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 = {
|
|
6519
6578
|
tolerance: 6,
|
|
@@ -6573,11 +6632,11 @@ class Yr {
|
|
|
6573
6632
|
const n = Date.now() - this.startTime;
|
|
6574
6633
|
let r = 0, a = 0;
|
|
6575
6634
|
if (this.trackData.length > 0) {
|
|
6576
|
-
const l = this.trackData[this.trackData.length - 1], c = this.currentX - l.x,
|
|
6577
|
-
if (
|
|
6578
|
-
const
|
|
6635
|
+
const l = this.trackData[this.trackData.length - 1], c = this.currentX - l.x, d = n - l.t;
|
|
6636
|
+
if (d > 0 && (r = c / d, this.trackData.length > 1)) {
|
|
6637
|
+
const h = this.trackData[this.trackData.length - 2], u = l.t - h.t;
|
|
6579
6638
|
if (u > 0) {
|
|
6580
|
-
const f = (l.x -
|
|
6639
|
+
const f = (l.x - h.x) / u;
|
|
6581
6640
|
a = r - f;
|
|
6582
6641
|
}
|
|
6583
6642
|
}
|
|
@@ -6601,9 +6660,9 @@ class Yr {
|
|
|
6601
6660
|
if (s > this.config.tolerance)
|
|
6602
6661
|
return { passed: !1, msg: "验证失败" };
|
|
6603
6662
|
const n = [];
|
|
6604
|
-
for (let
|
|
6605
|
-
const
|
|
6606
|
-
u > 0 && u < 500 && n.push(
|
|
6663
|
+
for (let d = 1; d < this.trackData.length; d++) {
|
|
6664
|
+
const h = this.trackData[d].x - this.trackData[d - 1].x, u = this.trackData[d].t - this.trackData[d - 1].t;
|
|
6665
|
+
u > 0 && u < 500 && n.push(h / u);
|
|
6607
6666
|
}
|
|
6608
6667
|
if (n.length < 3)
|
|
6609
6668
|
return { passed: !1, msg: "验证失败" };
|
|
@@ -6611,8 +6670,8 @@ class Yr {
|
|
|
6611
6670
|
if (r - a < this.config.minSpeedDelta)
|
|
6612
6671
|
return { passed: !1, msg: "验证失败" };
|
|
6613
6672
|
let o = !1;
|
|
6614
|
-
for (const
|
|
6615
|
-
if (Math.abs(
|
|
6673
|
+
for (const d of this.trackData)
|
|
6674
|
+
if (Math.abs(d.y) > 2) {
|
|
6616
6675
|
o = !0;
|
|
6617
6676
|
break;
|
|
6618
6677
|
}
|
|
@@ -6624,9 +6683,9 @@ class Yr {
|
|
|
6624
6683
|
if (l > this.config.maxDuration)
|
|
6625
6684
|
return { passed: !1, msg: "验证失败" };
|
|
6626
6685
|
const c = [];
|
|
6627
|
-
for (let
|
|
6628
|
-
c.push(Math.abs(n[
|
|
6629
|
-
return c.length > 2 && c.reduce((
|
|
6686
|
+
for (let d = 1; d < n.length; d++)
|
|
6687
|
+
c.push(Math.abs(n[d] - n[d - 1]));
|
|
6688
|
+
return c.length > 2 && c.reduce((h, u) => h + u, 0) / c.length < 0.05 ? { passed: !1, msg: "验证失败" } : { passed: !0, msg: "验证通过" };
|
|
6630
6689
|
}
|
|
6631
6690
|
verifyCaptcha() {
|
|
6632
6691
|
this.isProcessing || this.isVerified || (this.isProcessing = !0, this.statusEl && (this.statusEl.textContent = "验证中...", this.statusEl.className = "ds-slider-captcha__status is-loading"), this.btn.style.cursor = "wait", this.container.classList.add("is-disabled"), setTimeout(() => {
|
|
@@ -6656,22 +6715,22 @@ class Yr {
|
|
|
6656
6715
|
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);
|
|
6657
6716
|
}
|
|
6658
6717
|
}
|
|
6659
|
-
function
|
|
6718
|
+
function ta() {
|
|
6660
6719
|
document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
|
|
6661
|
-
const t = new
|
|
6720
|
+
const t = new Qr(i);
|
|
6662
6721
|
t.init(), i._kupolaSlideCaptcha = t;
|
|
6663
6722
|
});
|
|
6664
6723
|
}
|
|
6665
|
-
function
|
|
6724
|
+
function ea(i) {
|
|
6666
6725
|
i._kupolaSlideCaptcha && (i._kupolaSlideCaptcha.destroy(), i._kupolaSlideCaptcha = null);
|
|
6667
6726
|
}
|
|
6668
|
-
function
|
|
6727
|
+
function sa() {
|
|
6669
6728
|
document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
|
|
6670
|
-
|
|
6729
|
+
ea(i);
|
|
6671
6730
|
});
|
|
6672
6731
|
}
|
|
6673
|
-
E.register("slide-captcha",
|
|
6674
|
-
class
|
|
6732
|
+
E.register("slide-captcha", ta, sa);
|
|
6733
|
+
class ia {
|
|
6675
6734
|
constructor(t) {
|
|
6676
6735
|
this.form = t, this.fields = [], this.validators = {}, this.errorMessages = {}, this._submitHandler = null, this._fieldHandlers = /* @__PURE__ */ new Map(), this._init();
|
|
6677
6736
|
}
|
|
@@ -6811,23 +6870,23 @@ class Jr {
|
|
|
6811
6870
|
}), this._submitHandler = null, this._fieldHandlers.clear(), this._fieldHandlers = null, this.fields = null, this.validators = null, this.errorMessages = null, this.form = null;
|
|
6812
6871
|
}
|
|
6813
6872
|
}
|
|
6814
|
-
function
|
|
6873
|
+
function na(i) {
|
|
6815
6874
|
const t = document.querySelectorAll(i || ".ds-form");
|
|
6816
6875
|
return t.forEach((e) => {
|
|
6817
6876
|
if (e._kupolaForm) return;
|
|
6818
|
-
const s = new
|
|
6877
|
+
const s = new ia(e);
|
|
6819
6878
|
e._kupolaForm = s;
|
|
6820
6879
|
}), t.length;
|
|
6821
6880
|
}
|
|
6822
|
-
function
|
|
6881
|
+
function Mo(i) {
|
|
6823
6882
|
return i._kupolaForm;
|
|
6824
6883
|
}
|
|
6825
|
-
function
|
|
6884
|
+
function Io(i) {
|
|
6826
6885
|
const t = i._kupolaForm;
|
|
6827
6886
|
return t ? t.validate() : !1;
|
|
6828
6887
|
}
|
|
6829
|
-
E.register("form-validation",
|
|
6830
|
-
class
|
|
6888
|
+
E.register("form-validation", na);
|
|
6889
|
+
class ra {
|
|
6831
6890
|
constructor() {
|
|
6832
6891
|
this._queue = /* @__PURE__ */ new Set(), this._scheduled = !1, this._flushDepth = 0, this._maxDepth = 10;
|
|
6833
6892
|
}
|
|
@@ -6854,8 +6913,8 @@ class Zr {
|
|
|
6854
6913
|
this._flushDepth--;
|
|
6855
6914
|
}
|
|
6856
6915
|
}
|
|
6857
|
-
const
|
|
6858
|
-
class
|
|
6916
|
+
const aa = new ra();
|
|
6917
|
+
class oa {
|
|
6859
6918
|
constructor(t, e) {
|
|
6860
6919
|
this.data = t, this.createdAt = Date.now(), this.ttl = e;
|
|
6861
6920
|
}
|
|
@@ -6866,7 +6925,7 @@ class ta {
|
|
|
6866
6925
|
return !this.isFresh;
|
|
6867
6926
|
}
|
|
6868
6927
|
}
|
|
6869
|
-
class
|
|
6928
|
+
class fe {
|
|
6870
6929
|
constructor() {
|
|
6871
6930
|
this._store = /* @__PURE__ */ new Map();
|
|
6872
6931
|
}
|
|
@@ -6875,7 +6934,7 @@ class he {
|
|
|
6875
6934
|
return e || null;
|
|
6876
6935
|
}
|
|
6877
6936
|
set(t, e, s = 6e4) {
|
|
6878
|
-
this._store.set(t, new
|
|
6937
|
+
this._store.set(t, new oa(e, s));
|
|
6879
6938
|
}
|
|
6880
6939
|
has(t) {
|
|
6881
6940
|
return this._store.has(t);
|
|
@@ -6892,24 +6951,24 @@ class he {
|
|
|
6892
6951
|
return e ? e.data : null;
|
|
6893
6952
|
}
|
|
6894
6953
|
}
|
|
6895
|
-
class
|
|
6954
|
+
class N extends Error {
|
|
6896
6955
|
constructor(t, e, s) {
|
|
6897
6956
|
super(t), this.name = "DependsError", this.code = e, this.cause = s, this.timestamp = Date.now();
|
|
6898
6957
|
}
|
|
6899
6958
|
}
|
|
6900
|
-
let
|
|
6901
|
-
function
|
|
6959
|
+
let tt = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
|
|
6960
|
+
function To(i) {
|
|
6902
6961
|
if (!i || typeof i.fetch != "function")
|
|
6903
6962
|
throw new TypeError("[Kupola] configureHttpClient: client must provide a fetch function");
|
|
6904
|
-
|
|
6963
|
+
tt = i.fetch.bind(i);
|
|
6905
6964
|
}
|
|
6906
|
-
function
|
|
6907
|
-
return
|
|
6965
|
+
function Ao() {
|
|
6966
|
+
return tt;
|
|
6908
6967
|
}
|
|
6909
|
-
function
|
|
6910
|
-
|
|
6968
|
+
function zo() {
|
|
6969
|
+
tt = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
|
|
6911
6970
|
}
|
|
6912
|
-
class
|
|
6971
|
+
class W {
|
|
6913
6972
|
constructor(t, e) {
|
|
6914
6973
|
this.config = t, this.cacheKey = t.cacheKey || String(t.source), this.staleTime = t.staleTime ?? 6e4, this.cache = e, this.subscribers = [], this.pending = null, this.retryCount = t.retry ?? 0, this.retryDelay = t.retryDelay ?? 1e3, this.onError = t.onError || null;
|
|
6915
6974
|
}
|
|
@@ -6920,7 +6979,7 @@ class K {
|
|
|
6920
6979
|
};
|
|
6921
6980
|
}
|
|
6922
6981
|
notify() {
|
|
6923
|
-
|
|
6982
|
+
aa.schedule(() => {
|
|
6924
6983
|
this.subscribers.forEach((t) => {
|
|
6925
6984
|
try {
|
|
6926
6985
|
t();
|
|
@@ -6931,7 +6990,7 @@ class K {
|
|
|
6931
6990
|
});
|
|
6932
6991
|
}
|
|
6933
6992
|
async fetch(t) {
|
|
6934
|
-
throw new
|
|
6993
|
+
throw new N("Source fetch not implemented", "NOT_IMPLEMENTED");
|
|
6935
6994
|
}
|
|
6936
6995
|
async getValue(t) {
|
|
6937
6996
|
const e = this.cache.get(this.cacheKey);
|
|
@@ -6946,7 +7005,7 @@ class K {
|
|
|
6946
7005
|
const r = this.retryDelay * Math.pow(2, e), a = Math.random() * r * 0.5, o = r + a;
|
|
6947
7006
|
return await new Promise((l) => setTimeout(l, o)), this._fetchWithRetry(t, e + 1);
|
|
6948
7007
|
}
|
|
6949
|
-
const n = s instanceof
|
|
7008
|
+
const n = s instanceof N ? s : new N(s.message || "Fetch failed", "FETCH_ERROR", s);
|
|
6950
7009
|
if (this.onError)
|
|
6951
7010
|
try {
|
|
6952
7011
|
this.onError(n);
|
|
@@ -6968,35 +7027,37 @@ class K {
|
|
|
6968
7027
|
this.subscribers = [], this.pending = null;
|
|
6969
7028
|
}
|
|
6970
7029
|
}
|
|
6971
|
-
class
|
|
7030
|
+
class la extends W {
|
|
6972
7031
|
constructor(t, e) {
|
|
6973
7032
|
super(t, e), this.method = t.method || "GET", this.headers = t.headers || {}, this.queryParams = t.query || {};
|
|
6974
7033
|
}
|
|
6975
7034
|
async fetch(t) {
|
|
6976
7035
|
let e = this.config.source;
|
|
7036
|
+
const s = lt("http");
|
|
7037
|
+
s?.baseURL && !e.startsWith("http://") && !e.startsWith("https://") && (e = s.baseURL + e.replace(/^\//, ""));
|
|
6977
7038
|
for (const h in t)
|
|
6978
7039
|
e = e.replace(`:${h}`, encodeURIComponent(t[h]));
|
|
6979
|
-
const
|
|
6980
|
-
for (const [h,
|
|
6981
|
-
|
|
7040
|
+
const n = [];
|
|
7041
|
+
for (const [h, u] of Object.entries(this.queryParams || {}))
|
|
7042
|
+
n.push(`${encodeURIComponent(h)}=${encodeURIComponent(u)}`);
|
|
6982
7043
|
for (const h in t)
|
|
6983
|
-
this.config.source.includes(`:${h}`) ||
|
|
6984
|
-
|
|
6985
|
-
const
|
|
7044
|
+
this.config.source.includes(`:${h}`) || n.push(`${encodeURIComponent(h)}=${encodeURIComponent(t[h])}`);
|
|
7045
|
+
n.length > 0 && (e += (e.includes("?") ? "&" : "?") + n.join("&"));
|
|
7046
|
+
const r = {
|
|
6986
7047
|
method: this.method.toUpperCase(),
|
|
6987
7048
|
headers: { "Content-Type": "application/json", ...this.headers }
|
|
6988
7049
|
};
|
|
6989
|
-
["POST", "PUT", "PATCH"].includes(
|
|
6990
|
-
const
|
|
6991
|
-
if (!
|
|
6992
|
-
throw new
|
|
6993
|
-
const
|
|
6994
|
-
if (!
|
|
6995
|
-
throw new
|
|
6996
|
-
return typeof
|
|
7050
|
+
["POST", "PUT", "PATCH"].includes(r.method) && (r.body = JSON.stringify(t));
|
|
7051
|
+
const a = tt;
|
|
7052
|
+
if (!a)
|
|
7053
|
+
throw new N("No HTTP client available. Use configureHttpClient() to set one.", "NO_HTTP_CLIENT");
|
|
7054
|
+
const o = await a(e, r), l = typeof o.ok == "boolean" ? o.ok : o.status >= 200 && o.status < 300, c = typeof o.status == "number" ? o.status : 0;
|
|
7055
|
+
if (!l)
|
|
7056
|
+
throw new N(`HTTP ${c}`, "HTTP_ERROR");
|
|
7057
|
+
return typeof o.json == "function" ? await o.json() : o.data !== void 0 ? o.data : o;
|
|
6997
7058
|
}
|
|
6998
7059
|
}
|
|
6999
|
-
class
|
|
7060
|
+
class me extends W {
|
|
7000
7061
|
constructor(t, e) {
|
|
7001
7062
|
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) => {
|
|
7002
7063
|
s.key === this.storageKey && (this.cache.delete(this.cacheKey), this.notify());
|
|
@@ -7023,7 +7084,7 @@ class de extends K {
|
|
|
7023
7084
|
super.destroy(), this._storageHandler && window.removeEventListener("storage", this._storageHandler);
|
|
7024
7085
|
}
|
|
7025
7086
|
}
|
|
7026
|
-
class
|
|
7087
|
+
class ca extends W {
|
|
7027
7088
|
constructor(t, e) {
|
|
7028
7089
|
super(t, e), this.paramName = t.source.replace("route:", "");
|
|
7029
7090
|
}
|
|
@@ -7033,17 +7094,17 @@ class sa extends K {
|
|
|
7033
7094
|
return e ? decodeURIComponent(e[1]) : new URLSearchParams(location.search).get(this.paramName) || "";
|
|
7034
7095
|
}
|
|
7035
7096
|
}
|
|
7036
|
-
class
|
|
7097
|
+
class ha extends W {
|
|
7037
7098
|
async fetch(t) {
|
|
7038
7099
|
return await this.config.source(t);
|
|
7039
7100
|
}
|
|
7040
7101
|
}
|
|
7041
|
-
class
|
|
7102
|
+
class da extends W {
|
|
7042
7103
|
async fetch() {
|
|
7043
7104
|
return this.config.source;
|
|
7044
7105
|
}
|
|
7045
7106
|
}
|
|
7046
|
-
class
|
|
7107
|
+
class ge extends W {
|
|
7047
7108
|
constructor(t, e) {
|
|
7048
7109
|
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;
|
|
7049
7110
|
}
|
|
@@ -7061,7 +7122,7 @@ class ue extends K {
|
|
|
7061
7122
|
}
|
|
7062
7123
|
this.cache.set(this.cacheKey, n, this.staleTime), this.notify();
|
|
7063
7124
|
}, this.ws.onmessage = this.messageHandler, this.ws.onerror = (s) => {
|
|
7064
|
-
this._connected || e(new
|
|
7125
|
+
this._connected || e(new N("WebSocket connection failed", "WS_ERROR", s));
|
|
7065
7126
|
}, this.ws.onclose = () => {
|
|
7066
7127
|
if (this._connected = !1, this.reconnect && !this._destroyed) {
|
|
7067
7128
|
const s = this.reconnectDelay * Math.pow(2, this._reconnectAttempt), n = Math.random() * s * 0.3, r = Math.min(s + n, this._maxReconnectDelay);
|
|
@@ -7072,7 +7133,7 @@ class ue extends K {
|
|
|
7072
7133
|
}
|
|
7073
7134
|
};
|
|
7074
7135
|
} catch (s) {
|
|
7075
|
-
e(new
|
|
7136
|
+
e(new N("WebSocket creation failed", "WS_ERROR", s));
|
|
7076
7137
|
}
|
|
7077
7138
|
});
|
|
7078
7139
|
}
|
|
@@ -7083,34 +7144,34 @@ class ue extends K {
|
|
|
7083
7144
|
this._destroyed = !0, super.destroy(), this.ws && (this.ws.onmessage = null, this.ws.onclose = null, this.ws.close(), this.ws = null);
|
|
7084
7145
|
}
|
|
7085
7146
|
}
|
|
7086
|
-
function
|
|
7147
|
+
function _e(i, t) {
|
|
7087
7148
|
const e = i.source;
|
|
7088
|
-
return typeof e == "function" ? new
|
|
7149
|
+
return typeof e == "function" ? new ha(i, t) : typeof e == "string" && (e.startsWith("ws://") || e.startsWith("wss://")) ? new ge(i, t) : typeof e == "string" && (e.startsWith("/") || e.startsWith("http")) ? new la(i, t) : typeof e == "string" && e.startsWith("localStorage:") ? new me(i, t) : typeof e == "string" && e.startsWith("route:") ? new ca(i, t) : new da(i, t);
|
|
7089
7150
|
}
|
|
7090
|
-
function
|
|
7091
|
-
const e = {}, s = new
|
|
7151
|
+
function Po(i, t) {
|
|
7152
|
+
const e = {}, s = new fe(), n = [];
|
|
7092
7153
|
for (const r in t) {
|
|
7093
7154
|
let p = function() {
|
|
7094
|
-
return
|
|
7155
|
+
return yt(i);
|
|
7095
7156
|
}, a = t[r];
|
|
7096
7157
|
typeof a == "string" && (a = { source: a });
|
|
7097
7158
|
const o = {
|
|
7098
7159
|
...a,
|
|
7099
|
-
cacheKey: a.cacheKey || `${r}-${JSON.stringify(
|
|
7100
|
-
}, l =
|
|
7160
|
+
cacheKey: a.cacheKey || `${r}-${JSON.stringify(yt(i))}`
|
|
7161
|
+
}, l = _e(o, s), c = T(null), d = T(!0), h = T(null), u = T(null);
|
|
7101
7162
|
let f = 0;
|
|
7102
7163
|
async function m() {
|
|
7103
7164
|
const x = ++f;
|
|
7104
|
-
|
|
7165
|
+
d.value = !0, h.value = null;
|
|
7105
7166
|
try {
|
|
7106
7167
|
const b = await l.getValue(p());
|
|
7107
7168
|
if (x !== f) return;
|
|
7108
7169
|
c.value = b, u.value = Date.now();
|
|
7109
7170
|
} catch (b) {
|
|
7110
7171
|
if (x !== f) return;
|
|
7111
|
-
|
|
7172
|
+
h.value = b.message || "Unknown error";
|
|
7112
7173
|
} finally {
|
|
7113
|
-
x === f && (
|
|
7174
|
+
x === f && (d.value = !1);
|
|
7114
7175
|
}
|
|
7115
7176
|
}
|
|
7116
7177
|
m();
|
|
@@ -7130,19 +7191,19 @@ function So(i, t) {
|
|
|
7130
7191
|
}
|
|
7131
7192
|
}), e[r] = {
|
|
7132
7193
|
data: c,
|
|
7133
|
-
loading:
|
|
7134
|
-
error:
|
|
7194
|
+
loading: d,
|
|
7195
|
+
error: h,
|
|
7135
7196
|
lastUpdated: u,
|
|
7136
7197
|
refresh() {
|
|
7137
7198
|
return l.invalidate(), m();
|
|
7138
7199
|
},
|
|
7139
7200
|
// For StorageSource
|
|
7140
7201
|
setValue(x) {
|
|
7141
|
-
l instanceof
|
|
7202
|
+
l instanceof me && (l.setValue(x), c.value = x);
|
|
7142
7203
|
},
|
|
7143
7204
|
// For WebSocketSource
|
|
7144
7205
|
send(x) {
|
|
7145
|
-
l instanceof
|
|
7206
|
+
l instanceof ge && l.send(x);
|
|
7146
7207
|
},
|
|
7147
7208
|
_source: l
|
|
7148
7209
|
};
|
|
@@ -7154,8 +7215,8 @@ function So(i, t) {
|
|
|
7154
7215
|
}
|
|
7155
7216
|
}, window.__kupolaDepInstances || (window.__kupolaDepInstances = []), window.__kupolaDepInstances.push(e), e;
|
|
7156
7217
|
}
|
|
7157
|
-
function
|
|
7158
|
-
const t = new
|
|
7218
|
+
function $o(i) {
|
|
7219
|
+
const t = new fe(), e = _e(i, t), s = T(null), n = T(!0), r = T(null);
|
|
7159
7220
|
let a = 0;
|
|
7160
7221
|
async function o() {
|
|
7161
7222
|
const l = ++a;
|
|
@@ -7183,7 +7244,7 @@ function Lo(i) {
|
|
|
7183
7244
|
}
|
|
7184
7245
|
};
|
|
7185
7246
|
}
|
|
7186
|
-
function
|
|
7247
|
+
function yt(i) {
|
|
7187
7248
|
const t = {};
|
|
7188
7249
|
for (const e in i) {
|
|
7189
7250
|
const s = i[e];
|
|
@@ -7191,9 +7252,9 @@ function gt(i) {
|
|
|
7191
7252
|
}
|
|
7192
7253
|
return t;
|
|
7193
7254
|
}
|
|
7194
|
-
function
|
|
7255
|
+
function qo() {
|
|
7195
7256
|
}
|
|
7196
|
-
class
|
|
7257
|
+
class ua {
|
|
7197
7258
|
constructor(t, e = {}) {
|
|
7198
7259
|
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();
|
|
7199
7260
|
}
|
|
@@ -7347,8 +7408,8 @@ class ra {
|
|
|
7347
7408
|
s.forEach((a) => n.set(`${a.row}-${a.col}`, a));
|
|
7348
7409
|
const r = /* @__PURE__ */ new Set();
|
|
7349
7410
|
t.forEach((a, o) => {
|
|
7350
|
-
const l = a[this.rowKey] ?? o, c = this._selectedKeys.has(l),
|
|
7351
|
-
if (e.appendChild(
|
|
7411
|
+
const l = a[this.rowKey] ?? o, c = this._selectedKeys.has(l), d = this._expandedKeys.has(l), h = this._renderDataRow(a, o, l, c, r, n);
|
|
7412
|
+
if (e.appendChild(h), this.expandable && d) {
|
|
7352
7413
|
const u = document.createElement("tr");
|
|
7353
7414
|
u.className = "kupola-table-expand-row";
|
|
7354
7415
|
const f = document.createElement("td"), p = this.columns.length + (this.selection ? 1 : 0) + 1;
|
|
@@ -7364,8 +7425,8 @@ class ra {
|
|
|
7364
7425
|
const o = document.createElement("tr");
|
|
7365
7426
|
return o.setAttribute("data-row-key", s), n && o.classList.add("kupola-table-row-selected"), this.draggable && (o.draggable = !0, o.classList.add("kupola-table-draggable")), this.selection && this._renderSelectionCell(o, s, n), this.expandable && this._renderExpandCell(o, s), this.columns.forEach((l, c) => {
|
|
7366
7427
|
if (r.has(`${e}-${c}`)) return;
|
|
7367
|
-
const
|
|
7368
|
-
o.appendChild(
|
|
7428
|
+
const d = this._renderDataCell(t, e, s, l, c, r, a);
|
|
7429
|
+
o.appendChild(d);
|
|
7369
7430
|
}), this.onRowClick && (o.style.cursor = "pointer", o.addEventListener("click", (l) => {
|
|
7370
7431
|
l.target.closest(".kupola-table-expand-btn, .kupola-table-tree-toggle, input, button") || this.onRowClick(t, e, l);
|
|
7371
7432
|
})), o;
|
|
@@ -7390,20 +7451,20 @@ class ra {
|
|
|
7390
7451
|
const c = o.get(`${e}-${r}`);
|
|
7391
7452
|
if (c) {
|
|
7392
7453
|
c.rowSpan > 1 && (l.rowSpan = c.rowSpan), c.colSpan > 1 && (l.colSpan = c.colSpan);
|
|
7393
|
-
for (let
|
|
7454
|
+
for (let h = 0; h < (c.rowSpan || 1); h++)
|
|
7394
7455
|
for (let u = 0; u < (c.colSpan || 1); u++)
|
|
7395
|
-
|
|
7456
|
+
h === 0 && u === 0 || a.add(`${e + h}-${r + u}`);
|
|
7396
7457
|
}
|
|
7397
7458
|
this.tree && r === 0 && t._level > 0 && this._renderTreeIndent(l, t);
|
|
7398
|
-
const
|
|
7399
|
-
if (
|
|
7459
|
+
const d = this._editingCell && this._editingCell.rowKey === s && this._editingCell.colKey === n.key;
|
|
7460
|
+
if (d)
|
|
7400
7461
|
l.appendChild(this._renderEditCell(n, t));
|
|
7401
7462
|
else if (n.render) {
|
|
7402
|
-
const
|
|
7403
|
-
typeof
|
|
7463
|
+
const h = n.render(t[n.key], t, e);
|
|
7464
|
+
typeof h == "string" ? l.innerHTML = h : h instanceof HTMLElement && l.appendChild(h);
|
|
7404
7465
|
} else
|
|
7405
7466
|
l.textContent = t[n.key] ?? "";
|
|
7406
|
-
return this.editable && !
|
|
7467
|
+
return this.editable && !d && n.editable !== !1 && (l.classList.add("kupola-table-editable-cell"), l.addEventListener("dblclick", () => this._startEdit(s, n.key, t[n.key]))), l;
|
|
7407
7468
|
}
|
|
7408
7469
|
_renderTreeIndent(t, e) {
|
|
7409
7470
|
const s = document.createElement("span");
|
|
@@ -7441,16 +7502,16 @@ class ra {
|
|
|
7441
7502
|
if (!this._virtualData) return;
|
|
7442
7503
|
const { data: t, rowHeight: e, overscan: s, tbody: n, topSpacer: r } = this._virtualData, a = this.element.querySelector(".kupola-table-container");
|
|
7443
7504
|
if (!a) return;
|
|
7444
|
-
const o = a.scrollTop, l = a.clientHeight, c = Math.max(0, Math.floor(o / e) - s),
|
|
7505
|
+
const o = a.scrollTop, l = a.clientHeight, c = Math.max(0, Math.floor(o / e) - s), d = Math.min(t.length, Math.ceil((o + l) / e) + s);
|
|
7445
7506
|
n.querySelectorAll(".kupola-table-virtual-row").forEach((p) => p.remove());
|
|
7446
7507
|
const u = document.createDocumentFragment();
|
|
7447
|
-
for (let p = c; p <
|
|
7508
|
+
for (let p = c; p < d; p++) {
|
|
7448
7509
|
const m = t[p], y = m[this.rowKey] ?? p, _ = this._renderDataRow(m, p, y, this._selectedKeys.has(y), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map());
|
|
7449
7510
|
_.classList.add("kupola-table-virtual-row"), _.style.height = e + "px", u.appendChild(_);
|
|
7450
7511
|
}
|
|
7451
7512
|
r.style.height = c * e + "px";
|
|
7452
7513
|
const f = n.querySelector(".kupola-table-virtual-spacer-bottom");
|
|
7453
|
-
f && (f.style.height = (t.length -
|
|
7514
|
+
f && (f.style.height = (t.length - d) * e + "px"), r.after(u);
|
|
7454
7515
|
}
|
|
7455
7516
|
// ================================================================
|
|
7456
7517
|
// INLINE EDIT
|
|
@@ -7462,8 +7523,8 @@ class ra {
|
|
|
7462
7523
|
if (n.type = t.editType || "text", n.className = "ds-input kupola-table-edit-input", n.value = this._editBuffer[t.key] ?? e[t.key] ?? "", t.editOptions) {
|
|
7463
7524
|
const l = document.createElement("select");
|
|
7464
7525
|
l.className = "ds-input kupola-table-edit-input", t.editOptions.forEach((c) => {
|
|
7465
|
-
const
|
|
7466
|
-
|
|
7526
|
+
const d = document.createElement("option");
|
|
7527
|
+
d.value = typeof c == "object" ? c.value : c, d.textContent = typeof c == "object" ? c.label : c, String(d.value) === String(n.value) && (d.selected = !0), l.appendChild(d);
|
|
7467
7528
|
}), l.addEventListener("change", () => {
|
|
7468
7529
|
this._editBuffer[t.key] = l.value;
|
|
7469
7530
|
}), s.appendChild(l);
|
|
@@ -7553,11 +7614,11 @@ class ra {
|
|
|
7553
7614
|
this.element.querySelectorAll(".kupola-table-resize-handle").forEach((e) => {
|
|
7554
7615
|
e.addEventListener("mousedown", (s) => {
|
|
7555
7616
|
s.preventDefault();
|
|
7556
|
-
const n = e.getAttribute("data-col-key"), r = e.parentElement, a = s.clientX, o = r.offsetWidth, l = (
|
|
7557
|
-
const
|
|
7558
|
-
r.style.width =
|
|
7617
|
+
const n = e.getAttribute("data-col-key"), r = e.parentElement, a = s.clientX, o = r.offsetWidth, l = (d) => {
|
|
7618
|
+
const h = Math.max(50, o + (d.clientX - a));
|
|
7619
|
+
r.style.width = h + "px";
|
|
7559
7620
|
const u = this.columns.find((f) => f.key === n);
|
|
7560
|
-
u && (u.width =
|
|
7621
|
+
u && (u.width = h), this.onColumnResize && this.onColumnResize(n, h);
|
|
7561
7622
|
}, c = () => {
|
|
7562
7623
|
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", c);
|
|
7563
7624
|
};
|
|
@@ -7701,9 +7762,9 @@ class ra {
|
|
|
7701
7762
|
// ================================================================
|
|
7702
7763
|
exportCSV(t = "export.csv") {
|
|
7703
7764
|
const e = this.getProcessedData(), s = this.columns.map((c) => c.title || c.key), n = e.map(
|
|
7704
|
-
(c) => this.columns.map((
|
|
7705
|
-
let
|
|
7706
|
-
return
|
|
7765
|
+
(c) => this.columns.map((d) => {
|
|
7766
|
+
let h = c[d.key];
|
|
7767
|
+
return h == null && (h = ""), h = String(h).replace(/"/g, '""'), `"${h}"`;
|
|
7707
7768
|
}).join(",")
|
|
7708
7769
|
), r = "\uFEFF" + [s.join(","), ...n].join(`
|
|
7709
7770
|
`), a = new Blob([r], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(a), l = document.createElement("a");
|
|
@@ -7733,10 +7794,10 @@ class ra {
|
|
|
7733
7794
|
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 = {};
|
|
7734
7795
|
}
|
|
7735
7796
|
}
|
|
7736
|
-
function
|
|
7737
|
-
return new
|
|
7797
|
+
function ye(i, t) {
|
|
7798
|
+
return new ua(i, t);
|
|
7738
7799
|
}
|
|
7739
|
-
function
|
|
7800
|
+
function Bo() {
|
|
7740
7801
|
document.querySelectorAll("[data-kupola-table]").forEach((i) => {
|
|
7741
7802
|
const t = i.getAttribute("data-kupola-table");
|
|
7742
7803
|
let e = {};
|
|
@@ -7745,11 +7806,11 @@ function Ho() {
|
|
|
7745
7806
|
e = JSON.parse(t);
|
|
7746
7807
|
} catch {
|
|
7747
7808
|
}
|
|
7748
|
-
|
|
7809
|
+
ye(i, e);
|
|
7749
7810
|
});
|
|
7750
7811
|
}
|
|
7751
|
-
E.register("table",
|
|
7752
|
-
class
|
|
7812
|
+
E.register("table", ye);
|
|
7813
|
+
class pa {
|
|
7753
7814
|
constructor(t, e = {}) {
|
|
7754
7815
|
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();
|
|
7755
7816
|
}
|
|
@@ -7849,9 +7910,9 @@ class aa {
|
|
|
7849
7910
|
this.element.innerHTML = "", this.element.classList.remove("kupola-pagination");
|
|
7850
7911
|
}
|
|
7851
7912
|
}
|
|
7852
|
-
let
|
|
7853
|
-
function
|
|
7854
|
-
if (
|
|
7913
|
+
let vt = !1;
|
|
7914
|
+
function fa() {
|
|
7915
|
+
if (vt || typeof document > "u") return;
|
|
7855
7916
|
const i = document.createElement("style");
|
|
7856
7917
|
i.textContent = `
|
|
7857
7918
|
.kupola-pagination { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
@@ -7867,13 +7928,13 @@ function oa() {
|
|
|
7867
7928
|
.kupola-pagination-jumper { font-size: 14px; color: #666; }
|
|
7868
7929
|
.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; }
|
|
7869
7930
|
.kupola-pagination-jumper input:focus { outline: none; border-color: #1890ff; }
|
|
7870
|
-
`, document.head.appendChild(i),
|
|
7931
|
+
`, document.head.appendChild(i), vt = !0;
|
|
7871
7932
|
}
|
|
7872
|
-
function
|
|
7873
|
-
return
|
|
7933
|
+
function Fo(i, t) {
|
|
7934
|
+
return fa(), new pa(i, t);
|
|
7874
7935
|
}
|
|
7875
|
-
let
|
|
7876
|
-
class
|
|
7936
|
+
let bt = !1;
|
|
7937
|
+
class ma extends HTMLElement {
|
|
7877
7938
|
static get observedAttributes() {
|
|
7878
7939
|
return ["open"];
|
|
7879
7940
|
}
|
|
@@ -7895,7 +7956,7 @@ class la extends HTMLElement {
|
|
|
7895
7956
|
}
|
|
7896
7957
|
}
|
|
7897
7958
|
}
|
|
7898
|
-
class
|
|
7959
|
+
class ga extends HTMLElement {
|
|
7899
7960
|
static get observedAttributes() {
|
|
7900
7961
|
return ["title", "position"];
|
|
7901
7962
|
}
|
|
@@ -7910,7 +7971,7 @@ class ca extends HTMLElement {
|
|
|
7910
7971
|
}
|
|
7911
7972
|
}
|
|
7912
7973
|
}
|
|
7913
|
-
class
|
|
7974
|
+
class _a extends HTMLElement {
|
|
7914
7975
|
connectedCallback() {
|
|
7915
7976
|
this._render();
|
|
7916
7977
|
}
|
|
@@ -7928,13 +7989,13 @@ class ha extends HTMLElement {
|
|
|
7928
7989
|
}), this.innerHTML = "", this.appendChild(t);
|
|
7929
7990
|
}
|
|
7930
7991
|
}
|
|
7931
|
-
class
|
|
7992
|
+
class ya extends HTMLElement {
|
|
7932
7993
|
static get observedAttributes() {
|
|
7933
7994
|
return ["title"];
|
|
7934
7995
|
}
|
|
7935
7996
|
// Content is read by parent <k-collapse> during its connectedCallback
|
|
7936
7997
|
}
|
|
7937
|
-
class
|
|
7998
|
+
class va extends HTMLElement {
|
|
7938
7999
|
static get observedAttributes() {
|
|
7939
8000
|
return ["position", "open"];
|
|
7940
8001
|
}
|
|
@@ -7952,7 +8013,7 @@ class ua extends HTMLElement {
|
|
|
7952
8013
|
}
|
|
7953
8014
|
}
|
|
7954
8015
|
}
|
|
7955
|
-
class
|
|
8016
|
+
class ba extends HTMLElement {
|
|
7956
8017
|
static get observedAttributes() {
|
|
7957
8018
|
return ["title", "open"];
|
|
7958
8019
|
}
|
|
@@ -7995,214 +8056,220 @@ class pa extends HTMLElement {
|
|
|
7995
8056
|
this.removeAttribute("open");
|
|
7996
8057
|
}
|
|
7997
8058
|
}
|
|
7998
|
-
function
|
|
7999
|
-
if (
|
|
8000
|
-
|
|
8059
|
+
function No() {
|
|
8060
|
+
if (bt || typeof customElements > "u") return;
|
|
8061
|
+
bt = !0;
|
|
8001
8062
|
const i = [
|
|
8002
|
-
["k-dropdown",
|
|
8003
|
-
["k-tooltip",
|
|
8004
|
-
["k-collapse",
|
|
8005
|
-
["k-collapse-item",
|
|
8006
|
-
["k-drawer",
|
|
8007
|
-
["k-modal",
|
|
8063
|
+
["k-dropdown", ma],
|
|
8064
|
+
["k-tooltip", ga],
|
|
8065
|
+
["k-collapse", _a],
|
|
8066
|
+
["k-collapse-item", ya],
|
|
8067
|
+
["k-drawer", va],
|
|
8068
|
+
["k-modal", ba]
|
|
8008
8069
|
];
|
|
8009
8070
|
for (const [t, e] of i)
|
|
8010
8071
|
customElements.get(t) || customElements.define(t, e);
|
|
8011
8072
|
}
|
|
8012
8073
|
export {
|
|
8013
8074
|
Y as BRAND_OPTIONS,
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8075
|
+
oa as CacheEntry,
|
|
8076
|
+
fe as CacheManager,
|
|
8077
|
+
Tr as Calendar,
|
|
8078
|
+
xr as Carousel,
|
|
8079
|
+
Dr as Collapse,
|
|
8080
|
+
Mr as ColorPicker,
|
|
8081
|
+
lr as ComponentInitializerRegistry,
|
|
8082
|
+
jr as Countdown,
|
|
8083
|
+
mr as Datepicker,
|
|
8084
|
+
N as DependsError,
|
|
8085
|
+
W as DependsSource,
|
|
8086
|
+
ho as Dialog,
|
|
8087
|
+
kr as Drawer,
|
|
8088
|
+
ur as Dropdown,
|
|
8089
|
+
zr as DynamicTags,
|
|
8090
|
+
la as FetchedSource,
|
|
8091
|
+
Sr as FileUpload,
|
|
8092
|
+
ha as FunctionSource,
|
|
8093
|
+
dr as GlobalEvents,
|
|
8094
|
+
Nr as Heatmap,
|
|
8095
|
+
Lo as Icons,
|
|
8096
|
+
re as ImagePreview,
|
|
8097
|
+
J as KupolaComponent,
|
|
8098
|
+
hr as KupolaComponentRegistry,
|
|
8099
|
+
er as KupolaDataBind,
|
|
8100
|
+
ir as KupolaEventBus,
|
|
8101
|
+
ia as KupolaForm,
|
|
8102
|
+
Kt as KupolaI18n,
|
|
8103
|
+
ot as KupolaLifecycle,
|
|
8104
|
+
pa as KupolaPagination,
|
|
8105
|
+
dt as KupolaStore,
|
|
8106
|
+
sr as KupolaStoreManager,
|
|
8107
|
+
ua as KupolaTable,
|
|
8108
|
+
ka as KupolaUtils,
|
|
8109
|
+
Kr as KupolaValidator,
|
|
8110
|
+
fo as Message,
|
|
8050
8111
|
P as Modal,
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8112
|
+
uo as Notification,
|
|
8113
|
+
Gr as NumberInput,
|
|
8114
|
+
he as PATHS,
|
|
8115
|
+
ca as RouteSource,
|
|
8116
|
+
ra as Scheduler,
|
|
8117
|
+
pr as Select,
|
|
8118
|
+
Qr as SlideCaptcha,
|
|
8119
|
+
vr as Slider,
|
|
8120
|
+
Br as StatCard,
|
|
8121
|
+
da as StaticSource,
|
|
8122
|
+
me as StorageSource,
|
|
8123
|
+
$r as Tag,
|
|
8124
|
+
_r as Timepicker,
|
|
8125
|
+
Rr as Tooltip,
|
|
8126
|
+
Wr as VirtualList,
|
|
8127
|
+
ge as WebSocketSource,
|
|
8128
|
+
lo as alertModal,
|
|
8129
|
+
pt as applyMixin,
|
|
8130
|
+
Ps as arrayUtils,
|
|
8131
|
+
Aa as bootstrapComponents,
|
|
8132
|
+
to as cleanupAllDropdowns,
|
|
8133
|
+
sa as cleanupAllSlideCaptchas,
|
|
8134
|
+
Ar as cleanupCalendar,
|
|
8135
|
+
Er as cleanupCarousel,
|
|
8136
|
+
Hr as cleanupCollapse,
|
|
8137
|
+
Ir as cleanupColorPicker,
|
|
8138
|
+
Jr as cleanupCountdown,
|
|
8139
|
+
gr as cleanupDatepicker,
|
|
8140
|
+
wr as cleanupDrawer,
|
|
8141
|
+
Ut as cleanupDropdown,
|
|
8142
|
+
Pr as cleanupDynamicTags,
|
|
8143
|
+
Lr as cleanupFileUpload,
|
|
8144
|
+
Or as cleanupHeatmap,
|
|
8145
|
+
Cr as cleanupModal,
|
|
8146
|
+
Zr as cleanupNumberInput,
|
|
8147
|
+
fr as cleanupSelect,
|
|
8148
|
+
ea as cleanupSlideCaptcha,
|
|
8149
|
+
br as cleanupSlider,
|
|
8150
|
+
Fr as cleanupStatCard,
|
|
8151
|
+
qr as cleanupTag,
|
|
8152
|
+
yr as cleanupTimepicker,
|
|
8153
|
+
Vr as cleanupTooltip,
|
|
8154
|
+
Yr as cleanupVirtualList,
|
|
8155
|
+
qo as clearCache,
|
|
8156
|
+
To as configureHttpClient,
|
|
8157
|
+
oo as confirmModal,
|
|
8158
|
+
Ma as createBrandPicker,
|
|
8159
|
+
qa as createI18n,
|
|
8160
|
+
Ea as createLifecycle,
|
|
8161
|
+
Zt as createModal,
|
|
8162
|
+
_e as createSource,
|
|
8163
|
+
Ca as createStore,
|
|
8164
|
+
Ha as createThemeToggle,
|
|
8165
|
+
Un as cryptoUtils,
|
|
8166
|
+
rn as dateUtils,
|
|
8167
|
+
an as debounce,
|
|
8168
|
+
$a as defineComponent,
|
|
8169
|
+
za as defineMixin,
|
|
8170
|
+
Xa as emit,
|
|
8171
|
+
ja as emitGlobal,
|
|
8172
|
+
Ka as formatCurrency,
|
|
8173
|
+
Ra as formatDate,
|
|
8174
|
+
Va as formatNumber,
|
|
8175
|
+
Da as getBasePath,
|
|
8176
|
+
X as getBrand,
|
|
8177
|
+
lt as getConfig,
|
|
8178
|
+
rr as getDefaultBrand,
|
|
8179
|
+
nr as getDefaultTheme,
|
|
8180
|
+
Mo as getFormInstance,
|
|
8181
|
+
Ao as getHttpClient,
|
|
8182
|
+
Nt as getIconsPath,
|
|
8183
|
+
Za as getListenerCount,
|
|
8184
|
+
Oa as getLocale,
|
|
8185
|
+
Sa as getStore,
|
|
8186
|
+
R as getTheme,
|
|
8121
8187
|
H as globalEvents,
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8188
|
+
Bo as initAllTables,
|
|
8189
|
+
ie as initCalendar,
|
|
8190
|
+
vo as initCalendars,
|
|
8191
|
+
Gt as initCarousel,
|
|
8192
|
+
ro as initCarousels,
|
|
8193
|
+
ee as initCollapse,
|
|
8194
|
+
_o as initCollapses,
|
|
8195
|
+
se as initColorPicker,
|
|
8196
|
+
yo as initColorPickers,
|
|
8197
|
+
ue as initCountdown,
|
|
8198
|
+
Do as initCountdowns,
|
|
8199
|
+
Xt as initDatepicker,
|
|
8200
|
+
so as initDatepickers,
|
|
8201
|
+
rt as initDrawer,
|
|
8202
|
+
ao as initDrawers,
|
|
8203
|
+
Wt as initDropdown,
|
|
8204
|
+
Qa as initDropdowns,
|
|
8205
|
+
ne as initDynamicTags,
|
|
8206
|
+
bo as initDynamicTagsAll,
|
|
8207
|
+
te as initFileUpload,
|
|
8208
|
+
go as initFileUploads,
|
|
8209
|
+
na as initFormValidation,
|
|
8210
|
+
le as initHeatmap,
|
|
8211
|
+
Co as initHeatmaps,
|
|
8212
|
+
xo as initImagePreview,
|
|
8213
|
+
mo as initMessages,
|
|
8214
|
+
Qt as initModal,
|
|
8215
|
+
co as initModals,
|
|
8216
|
+
po as initNotifications,
|
|
8217
|
+
pe as initNumberInput,
|
|
8218
|
+
Ho as initNumberInputs,
|
|
8219
|
+
Fo as initPagination,
|
|
8220
|
+
Yt as initSelect,
|
|
8221
|
+
eo as initSelects,
|
|
8222
|
+
ta as initSlideCaptchas,
|
|
8223
|
+
Jt as initSlider,
|
|
8224
|
+
no as initSliders,
|
|
8225
|
+
oe as initStatCard,
|
|
8226
|
+
wo as initStatCards,
|
|
8227
|
+
ye as initTable,
|
|
8228
|
+
ae as initTag,
|
|
8229
|
+
ko as initTags,
|
|
8230
|
+
or as initTheme,
|
|
8231
|
+
jt as initTimepicker,
|
|
8232
|
+
io as initTimepickers,
|
|
8233
|
+
ce as initTooltip,
|
|
8234
|
+
So as initTooltips,
|
|
8235
|
+
Ur as initVirtualList,
|
|
8236
|
+
ft as kupolaBootstrap,
|
|
8171
8237
|
q as kupolaData,
|
|
8172
|
-
|
|
8173
|
-
|
|
8238
|
+
wa as kupolaEvents,
|
|
8239
|
+
O as kupolaI18n,
|
|
8174
8240
|
E as kupolaInitializer,
|
|
8175
|
-
|
|
8241
|
+
xa as kupolaLifecycle,
|
|
8176
8242
|
M as kupolaRegistry,
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8243
|
+
Ft as kupolaStoreManager,
|
|
8244
|
+
Fa as n,
|
|
8245
|
+
Di as numberUtils,
|
|
8246
|
+
ei as objectUtils,
|
|
8247
|
+
Ya as off,
|
|
8248
|
+
Ga as offAll,
|
|
8249
|
+
Ja as offByScope,
|
|
8250
|
+
Wa as on,
|
|
8251
|
+
Ua as once,
|
|
8252
|
+
Qn as preloadUtils,
|
|
8187
8253
|
T as ref,
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8254
|
+
Ia as registerComponent,
|
|
8255
|
+
Ta as registerLazyComponent,
|
|
8256
|
+
No as registerWebComponents,
|
|
8257
|
+
at as renderIcon,
|
|
8258
|
+
zo as resetHttpClient,
|
|
8259
|
+
nt as setBrand,
|
|
8260
|
+
La as setConfig,
|
|
8261
|
+
Na as setLocale,
|
|
8262
|
+
it as setTheme,
|
|
8263
|
+
Eo as showImagePreview,
|
|
8264
|
+
Ue as stringUtils,
|
|
8265
|
+
de as svg,
|
|
8266
|
+
Ba as t,
|
|
8267
|
+
on as throttle,
|
|
8268
|
+
Po as useDeps,
|
|
8269
|
+
Pa as useMixin,
|
|
8270
|
+
$o as useQuery,
|
|
8271
|
+
Io as validateForm,
|
|
8205
8272
|
A as validator,
|
|
8206
|
-
|
|
8273
|
+
$t as validatorUtils
|
|
8207
8274
|
};
|
|
8208
8275
|
//# sourceMappingURL=kupola.esm.js.map
|