@kupola/kupola 1.7.3 → 1.7.4
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/css/kupola.css +20 -0
- package/dist/css/kupola.css +20 -0
- package/dist/kupola.cjs.js +19 -19
- package/dist/kupola.cjs.js.map +1 -1
- package/dist/kupola.esm.js +1046 -1050
- package/dist/kupola.esm.js.map +1 -1
- package/dist/kupola.umd.js +23 -23
- package/dist/kupola.umd.js.map +1 -1
- package/js/theme.js +17 -24
- package/package.json +1 -1
package/dist/kupola.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class dt {
|
|
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 ut {
|
|
|
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 ut {
|
|
|
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 Ba = new dt("app");
|
|
205
|
+
function qa(i = "app") {
|
|
206
|
+
return new dt(i);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
function
|
|
210
|
-
return
|
|
208
|
+
const Ie = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
209
|
+
function tt(i) {
|
|
210
|
+
return Ie.has(i);
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Ae(i) {
|
|
213
213
|
return i ? i.trim() : "";
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function ze(i) {
|
|
216
216
|
return i ? i.replace(/^\s+/, "") : "";
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Pe(i) {
|
|
219
219
|
return i ? i.replace(/\s+$/, "") : "";
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function $e(i) {
|
|
222
222
|
return i ? i.toUpperCase() : "";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Be(i) {
|
|
225
225
|
return i ? i.toLowerCase() : "";
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function qe(i) {
|
|
228
228
|
return i ? i.charAt(0).toUpperCase() + i.slice(1) : "";
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Oe(i) {
|
|
231
231
|
return i ? i.replace(/-(\w)/g, (t, e) => e ? e.toUpperCase() : "") : "";
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Fe(i) {
|
|
234
234
|
return i ? i.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "") : "";
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Ne(i, t, e = " ") {
|
|
237
237
|
return (String(i) || "").padStart(t, e);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Re(i, t, e = " ") {
|
|
240
240
|
return (String(i) || "").padEnd(t, e);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Ve(i, t, e = "...") {
|
|
243
243
|
return !i || i.length <= t ? i || "" : i.slice(0, t) + e;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Ke(i, t, e) {
|
|
246
246
|
return i ? i.split(t).join(e) : "";
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function We(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 Ue(i, t) {
|
|
252
252
|
return (i || "").startsWith(t);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Ye(i, t) {
|
|
255
255
|
return (i || "").endsWith(t);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Xe(i, t) {
|
|
258
258
|
return (i || "").includes(t);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function je(i, t) {
|
|
261
261
|
return (i || "").repeat(t);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Je(i) {
|
|
264
264
|
return (i || "").split("").reverse().join("");
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function Ze(i, t) {
|
|
267
267
|
return !i || !t ? 0 : i.split(t).length - 1;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Ge(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 Qe(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 ts(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 es() {
|
|
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 ss = { trim: Ae, trimLeft: ze, trimRight: Pe, toUpperCase: $e, toLowerCase: Be, capitalize: qe, camelize: Oe, hyphenate: Fe, padStart: Ne, padEnd: Re, truncate: Ve, replaceAll: Ke, format: We, startsWith: Ue, endsWith: Ye, includes: Xe, repeat: je, reverse: Je, countOccurrences: Ze, escapeHtml: Ge, unescapeHtml: Qe, generateRandom: ts, generateUUID: es };
|
|
293
|
+
function is(i) {
|
|
294
294
|
return Array.isArray(i);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function ns(i) {
|
|
297
297
|
return !i || i.length === 0;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function rs(i) {
|
|
300
300
|
return i ? i.length : 0;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function as(i, t) {
|
|
303
303
|
return i && i.length > 0 ? i[0] : t;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function os(i, t) {
|
|
306
306
|
return i && i.length > 0 ? i[i.length - 1] : t;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ls(i, t, e) {
|
|
309
309
|
return i && i[t] !== void 0 ? i[t] : e;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function cs(i, t, e) {
|
|
312
312
|
return i ? i.slice(t, e) : [];
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function hs(...i) {
|
|
315
315
|
return i.reduce((t, e) => t.concat(e || []), []);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function ds(i, t = ",") {
|
|
318
318
|
return i ? i.join(t) : "";
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function us(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 hs(i, t, e = 0) {
|
|
|
326
326
|
}
|
|
327
327
|
return i.indexOf(t, e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function ps(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 ds(i, t, e) {
|
|
|
336
336
|
}
|
|
337
337
|
return i.lastIndexOf(t, e);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function fs(i, t) {
|
|
340
340
|
return i ? i.includes(t) : !1;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function ms(i, ...t) {
|
|
343
343
|
return i && i.push(...t), i;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function gs(i) {
|
|
346
346
|
return i ? i.pop() : void 0;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function _s(i) {
|
|
349
349
|
return i ? i.shift() : void 0;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ys(i, ...t) {
|
|
352
352
|
return i && i.unshift(...t), i;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function vs(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 bs(i, t) {
|
|
360
360
|
return !i || t < 0 || t >= i.length || i.splice(t, 1), i;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function xs(i, t, e) {
|
|
363
363
|
return i && (i.splice(t, 0, e), i);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function Es(i) {
|
|
366
366
|
return i ? i.slice().reverse() : [];
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function ws(i, t) {
|
|
369
369
|
return i ? i.slice().sort(t) : [];
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function ks(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 Cs(i, t) {
|
|
378
378
|
return i ? i.filter(t) : [];
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Ss(i, t) {
|
|
381
381
|
return i ? i.map(t) : [];
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function Ls(i, t, e) {
|
|
384
384
|
return i ? i.reduce(t, e) : e;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function Ds(i, t) {
|
|
387
387
|
i && i.forEach(t);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Hs(i, t) {
|
|
390
390
|
return i ? i.every(t) : !0;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Ms(i, t) {
|
|
393
393
|
return i ? i.some(t) : !1;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Ts(i, t) {
|
|
396
396
|
return i ? i.find(t) : void 0;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Is(i, t) {
|
|
399
399
|
return i ? i.findIndex(t) : -1;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function As(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 Tt(i) {
|
|
405
|
+
return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(Tt(e)) : t.concat(e), []) : [];
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function zs(i) {
|
|
408
408
|
return i ? [...new Set(i)] : [];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Ps(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 As(i, t) {
|
|
|
415
415
|
return e.has(n) ? !1 : (e.add(n), !0);
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function $s(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 Bs(i) {
|
|
426
426
|
if (!i) return [];
|
|
427
427
|
const t = i.slice();
|
|
428
428
|
for (let e = t.length - 1; e > 0; e--) {
|
|
@@ -431,78 +431,78 @@ function Ps(i) {
|
|
|
431
431
|
}
|
|
432
432
|
return t;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function It(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 qs(i) {
|
|
438
|
+
return !i || i.length === 0 ? 0 : It(i) / i.length;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Os(i) {
|
|
441
441
|
return i && i.length > 0 ? Math.max(...i) : -1 / 0;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Fs(i) {
|
|
444
444
|
return i && i.length > 0 ? Math.min(...i) : 1 / 0;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Ns(...i) {
|
|
447
447
|
return i.length === 0 ? [] : i.reduce((t, e) => t.filter((s) => e && e.includes(s)));
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Rs(...i) {
|
|
450
450
|
return [...new Set(i.flat().filter(Boolean))];
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Vs(i, t) {
|
|
453
453
|
return i ? i.filter((e) => !t || !t.includes(e)) : [];
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Ks(...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
|
|
460
|
+
const Ws = { isArray: is, isEmpty: ns, size: rs, first: as, last: os, get: ls, slice: cs, concat: hs, join: ds, indexOf: us, lastIndexOf: ps, includes: fs, push: ms, pop: gs, shift: _s, unshift: ys, remove: vs, removeAt: bs, insert: xs, reverse: Es, sort: ws, sortBy: ks, filter: Cs, map: Ss, reduce: Ls, forEach: Ds, every: Hs, some: Ms, find: Ts, findIndex: Is, flat: As, flattenDeep: Tt, unique: zs, uniqueBy: Ps, chunk: $s, shuffle: Bs, sum: It, average: qs, max: Os, min: Fs, intersection: Ns, union: Rs, difference: Vs, zip: Ks };
|
|
461
461
|
function ot(i) {
|
|
462
462
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Us(i) {
|
|
465
465
|
return !i || typeof i != "object" ? !0 : Object.keys(i).length === 0;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Ys(i) {
|
|
468
468
|
return i ? Object.keys(i) : [];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Xs(i) {
|
|
471
471
|
return i ? Object.values(i) : [];
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function js(i) {
|
|
474
474
|
return i ? Object.entries(i) : [];
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Js(i, t) {
|
|
477
477
|
return i ? Object.prototype.hasOwnProperty.call(i, t) : !1;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Zs(i, t, e) {
|
|
480
480
|
if (!i) return e;
|
|
481
481
|
const s = t.split(".");
|
|
482
|
-
return s.some(
|
|
482
|
+
return s.some(tt) ? e : s.reduce((n, r) => n && n[r], i) ?? e;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Gs(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(tt)) 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 Qs(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 ti(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 At(...i) {
|
|
501
501
|
return i.reduce((t, e) => (e && typeof e == "object" && Object.keys(e).forEach((s) => {
|
|
502
|
-
|
|
502
|
+
tt(s) || (ot(e[s]) && ot(t[s]) ? t[s] = At(t[s], e[s]) : t[s] = e[s]);
|
|
503
503
|
}), t), {});
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function ei(i) {
|
|
506
506
|
return i && JSON.parse(JSON.stringify(i));
|
|
507
507
|
}
|
|
508
508
|
function Y(i, t = /* @__PURE__ */ new WeakMap()) {
|
|
@@ -524,318 +524,318 @@ function Y(i, t = /* @__PURE__ */ new WeakMap()) {
|
|
|
524
524
|
}
|
|
525
525
|
const e = {};
|
|
526
526
|
return t.set(i, e), Object.keys(i).forEach((s) => {
|
|
527
|
-
|
|
527
|
+
tt(s) || (e[s] = Y(i[s], t));
|
|
528
528
|
}), e;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function si(i, t) {
|
|
531
531
|
i && Object.keys(i).forEach((e) => t(i[e], e, i));
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function ii(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 ni(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 ri(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 ai(i) {
|
|
551
551
|
return i ? Object.keys(i).map((t) => ({ key: t, value: i[t] })) : [];
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function oi(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 li(i) {
|
|
560
560
|
return i ? Object.keys(i).length : 0;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function ci(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 zt(i, t) {
|
|
570
570
|
if (i === t) return !0;
|
|
571
571
|
if (!i || !t || typeof i != "object" || typeof t != "object") return !1;
|
|
572
572
|
const e = Object.keys(i), s = Object.keys(t);
|
|
573
|
-
return e.length !== s.length ? !1 : e.every((n) =>
|
|
573
|
+
return e.length !== s.length ? !1 : e.every((n) => zt(i[n], t[n]));
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function Pt(i) {
|
|
576
576
|
return i && (Object.freeze(i), Object.keys(i).forEach((t) => {
|
|
577
|
-
typeof i[t] == "object" &&
|
|
577
|
+
typeof i[t] == "object" && Pt(i[t]);
|
|
578
578
|
}), i);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function hi(i) {
|
|
581
581
|
return i && Object.seal(i);
|
|
582
582
|
}
|
|
583
|
-
const
|
|
583
|
+
const di = { isObject: ot, isEmpty: Us, keys: Ys, values: Xs, entries: js, has: Js, get: Zs, set: Gs, pick: Qs, omit: ti, merge: At, clone: ei, deepClone: Y, forEach: si, map: ii, filter: ni, reduce: ri, toArray: ai, fromArray: oi, size: li, invert: ci, isEqual: zt, freeze: Pt, seal: hi };
|
|
584
584
|
function L(i) {
|
|
585
585
|
return typeof i == "number" && !isNaN(i);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ui(i) {
|
|
588
588
|
return Number.isInteger(i);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function pi(i) {
|
|
591
591
|
return L(i) && !Number.isInteger(i);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function fi(i) {
|
|
594
594
|
return L(i) && i > 0;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function mi(i) {
|
|
597
597
|
return L(i) && i < 0;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function gi(i) {
|
|
600
600
|
return L(i) && i === 0;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function _i(i, t, e) {
|
|
603
603
|
return L(i) ? Math.min(Math.max(i, t), e) : i;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function yi(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 vi(i) {
|
|
611
611
|
return L(i) ? Math.floor(i) : i;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function bi(i) {
|
|
614
614
|
return L(i) ? Math.ceil(i) : i;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function xi(i) {
|
|
617
617
|
return L(i) ? Math.abs(i) : i;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Ei(...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 wi(...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 $t(...i) {
|
|
628
628
|
return i.flat().filter(L).reduce((e, s) => e + s, 0);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function ki(...i) {
|
|
631
631
|
const t = i.flat().filter(L);
|
|
632
|
-
return t.length > 0 ?
|
|
632
|
+
return t.length > 0 ? $t(t) / t.length : 0;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Bt(i = 0, t = 1) {
|
|
635
635
|
return Math.random() * (t - i) + i;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
return Math.floor(
|
|
637
|
+
function Ci(i, t) {
|
|
638
|
+
return Math.floor(Bt(i, t + 1));
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Si(i, t = 2) {
|
|
641
641
|
return L(i) ? i.toFixed(t) : String(i);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Li(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 Di(i, t = 0) {
|
|
647
647
|
return L(i) ? `${(i * 100).toFixed(t)}%` : String(i);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function Hi(i, t = 0) {
|
|
650
650
|
return L(i) ? i.toFixed(t) : String(i);
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function Mi(i, t = 6) {
|
|
653
653
|
return L(i) ? i.toPrecision(t) : String(i);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Ti(i) {
|
|
656
656
|
return Number.isNaN(i);
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Ii(i) {
|
|
659
659
|
return Number.isFinite(i);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function Ai(i, t = 10) {
|
|
662
662
|
return Number.parseInt(i, t);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function zi(i) {
|
|
665
665
|
return Number.parseFloat(i);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Pi(i, t = 0) {
|
|
668
668
|
const e = Number(i);
|
|
669
669
|
return isNaN(e) ? t : e;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function $i(i, t, e = 0) {
|
|
672
672
|
return !L(i) || !L(t) || t === 0 ? e : i / t;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Bi(...i) {
|
|
675
675
|
return i.reduce((t, e) => !L(t) || !L(e) ? 0 : t * e, 1);
|
|
676
676
|
}
|
|
677
|
-
const
|
|
678
|
-
function
|
|
677
|
+
const qi = { isNumber: L, isInteger: ui, isFloat: pi, isPositive: fi, isNegative: mi, isZero: gi, clamp: _i, round: yi, floor: vi, ceil: bi, abs: xi, min: Ei, max: wi, sum: $t, average: ki, random: Bt, randomInt: Ci, format: Si, formatCurrency: Li, formatPercent: Di, toFixed: Hi, toPrecision: Mi, isNaN: Ti, isFinite: Ii, parseInt: Ai, parseFloat: zi, toNumber: Pi, safeDivide: $i, safeMultiply: Bi };
|
|
678
|
+
function et() {
|
|
679
679
|
return Date.now();
|
|
680
680
|
}
|
|
681
681
|
function K() {
|
|
682
682
|
const i = /* @__PURE__ */ new Date();
|
|
683
683
|
return i.setHours(0, 0, 0, 0), i;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Oi() {
|
|
686
686
|
const i = K();
|
|
687
687
|
return i.setDate(i.getDate() + 1), i;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Fi() {
|
|
690
690
|
const i = K();
|
|
691
691
|
return i.setDate(i.getDate() - 1), i;
|
|
692
692
|
}
|
|
693
693
|
function w(i) {
|
|
694
694
|
return i instanceof Date && !isNaN(i.getTime());
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function qt(i) {
|
|
697
697
|
return w(i);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Ni(i) {
|
|
700
700
|
const t = new Date(i);
|
|
701
|
-
return
|
|
701
|
+
return qt(t) ? t : null;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Ri(i, t = "YYYY-MM-DD HH:mm:ss") {
|
|
704
704
|
if (!w(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 Vi(i) {
|
|
709
709
|
return w(i) ? i.toISOString() : "";
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Ki(i) {
|
|
712
712
|
return w(i) ? new Date(i.toUTCString()) : null;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Wi(i, t) {
|
|
715
715
|
if (!w(i)) return i;
|
|
716
716
|
const e = new Date(i);
|
|
717
717
|
return e.setDate(e.getDate() + t), e;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Ui(i, t) {
|
|
720
720
|
if (!w(i)) return i;
|
|
721
721
|
const e = new Date(i);
|
|
722
722
|
return e.setHours(e.getHours() + t), e;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function Yi(i, t) {
|
|
725
725
|
if (!w(i)) return i;
|
|
726
726
|
const e = new Date(i);
|
|
727
727
|
return e.setMinutes(e.getMinutes() + t), e;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function Xi(i, t) {
|
|
730
730
|
if (!w(i)) return i;
|
|
731
731
|
const e = new Date(i);
|
|
732
732
|
return e.setSeconds(e.getSeconds() + t), e;
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function st(i, t) {
|
|
735
735
|
if (!w(i) || !w(t)) return 0;
|
|
736
736
|
const e = new Date(i);
|
|
737
737
|
e.setHours(0, 0, 0, 0);
|
|
738
738
|
const s = new Date(t);
|
|
739
739
|
return s.setHours(0, 0, 0, 0), Math.floor((e.getTime() - s.getTime()) / (1e3 * 60 * 60 * 24));
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function ji(i, t) {
|
|
742
742
|
return !w(i) || !w(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60 * 60));
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function Ji(i, t) {
|
|
745
745
|
return !w(i) || !w(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / (1e3 * 60));
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Zi(i, t) {
|
|
748
748
|
return !w(i) || !w(t) ? 0 : Math.floor((i.getTime() - t.getTime()) / 1e3);
|
|
749
749
|
}
|
|
750
|
-
function Ji(i) {
|
|
751
|
-
return w(i) ? it(i, K()) === 0 : !1;
|
|
752
|
-
}
|
|
753
|
-
function Zi(i) {
|
|
754
|
-
return w(i) ? it(i, K()) === -1 : !1;
|
|
755
|
-
}
|
|
756
750
|
function Gi(i) {
|
|
757
|
-
return w(i) ?
|
|
751
|
+
return w(i) ? st(i, K()) === 0 : !1;
|
|
758
752
|
}
|
|
759
753
|
function Qi(i) {
|
|
760
|
-
return w(i) ? i
|
|
754
|
+
return w(i) ? st(i, K()) === -1 : !1;
|
|
761
755
|
}
|
|
762
756
|
function tn(i) {
|
|
763
|
-
return w(i) ? i
|
|
757
|
+
return w(i) ? st(i, K()) === 1 : !1;
|
|
764
758
|
}
|
|
765
759
|
function en(i) {
|
|
760
|
+
return w(i) ? i.getTime() > et() : !1;
|
|
761
|
+
}
|
|
762
|
+
function sn(i) {
|
|
763
|
+
return w(i) ? i.getTime() < et() : !1;
|
|
764
|
+
}
|
|
765
|
+
function nn(i) {
|
|
766
766
|
if (!w(i)) return !1;
|
|
767
767
|
const t = i.getFullYear();
|
|
768
768
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function rn(i) {
|
|
771
771
|
return w(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0).getDate() : 0;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function an(i) {
|
|
774
774
|
if (!w(i)) return 0;
|
|
775
775
|
const t = new Date(i.getFullYear(), 0, 1), e = i.getTime() - t.getTime();
|
|
776
776
|
return Math.ceil(e / (1e3 * 60 * 60 * 24 * 7));
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function on(i) {
|
|
779
779
|
return w(i) ? Math.ceil((i.getMonth() + 1) / 3) : 0;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function ln(i) {
|
|
782
782
|
if (!w(i)) return i;
|
|
783
783
|
const t = new Date(i);
|
|
784
784
|
return t.setHours(0, 0, 0, 0), t;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function cn(i) {
|
|
787
787
|
if (!w(i)) return i;
|
|
788
788
|
const t = new Date(i);
|
|
789
789
|
return t.setHours(23, 59, 59, 999), t;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function hn(i) {
|
|
792
792
|
return w(i) ? new Date(i.getFullYear(), i.getMonth(), 1) : i;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function dn(i) {
|
|
795
795
|
return w(i) ? new Date(i.getFullYear(), i.getMonth() + 1, 0, 23, 59, 59, 999) : i;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Ot(i, t = 1) {
|
|
798
798
|
if (!w(i)) return i;
|
|
799
799
|
const e = new Date(i), s = e.getDay(), n = s >= t ? s - t : s + (7 - t);
|
|
800
800
|
return e.setDate(e.getDate() - n), e.setHours(0, 0, 0, 0), e;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function un(i, t = 1) {
|
|
803
803
|
if (!w(i)) return i;
|
|
804
|
-
const e =
|
|
804
|
+
const e = Ot(i, t), s = new Date(e);
|
|
805
805
|
return s.setDate(s.getDate() + 6), s.setHours(23, 59, 59, 999), s;
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function pn(i) {
|
|
808
808
|
if (!w(i)) return 0;
|
|
809
809
|
const t = /* @__PURE__ */ new Date();
|
|
810
810
|
let e = t.getFullYear() - i.getFullYear();
|
|
811
811
|
return (t.getMonth() < i.getMonth() || t.getMonth() === i.getMonth() && t.getDate() < i.getDate()) && e--, Math.max(0, e);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function fn(i) {
|
|
814
814
|
if (!w(i)) return "";
|
|
815
|
-
const e =
|
|
815
|
+
const e = et() - 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 mn = { now: et, today: K, tomorrow: Oi, yesterday: Fi, isDate: w, isValid: qt, parse: Ni, format: Ri, toISO: Vi, toUTC: Ki, addDays: Wi, addHours: Ui, addMinutes: Yi, addSeconds: Xi, diffDays: st, diffHours: ji, diffMinutes: Ji, diffSeconds: Zi, isToday: Gi, isYesterday: Qi, isTomorrow: tn, isFuture: en, isPast: sn, isLeapYear: nn, getDaysInMonth: rn, getWeekOfYear: an, getQuarter: on, startOfDay: ln, endOfDay: cn, startOfMonth: hn, endOfMonth: dn, startOfWeek: Ot, endOfWeek: un, getAge: pn, fromNow: fn };
|
|
819
|
+
function gn(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 _n(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 mn(i, t, e = {}) {
|
|
|
848
848
|
}, t));
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function yn(i) {
|
|
852
852
|
return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(i || "");
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function vn(i) {
|
|
855
855
|
return /^1[3-9]\d{9}$/.test(i || "");
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function bn(i) {
|
|
858
858
|
return /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w.-]*)*\/?$/.test(i || "");
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function Ft(i) {
|
|
861
861
|
return /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(i || "");
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function Nt(i) {
|
|
864
864
|
return /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(i || "");
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
866
|
+
function xn(i) {
|
|
867
|
+
return Ft(i) || Nt(i);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function En(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 wn(i) {
|
|
873
873
|
return /^[A-Z][0-9]{8}$|^[A-Z]{2}[0-9]{7}$/.test(i || "");
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function kn(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 En(i) {
|
|
|
882
882
|
}
|
|
883
883
|
return s % 10 === 0;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Rt(i) {
|
|
886
886
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i || "");
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function Vt(i) {
|
|
889
889
|
const t = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(i || "");
|
|
890
890
|
return t ? t.slice(1).every((e) => parseInt(e) >= 0 && parseInt(e) <= 255) : !1;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Kt(i) {
|
|
893
893
|
const t = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*([01]|0\.\d+)\)$/.exec(i || "");
|
|
894
894
|
if (!t) return !1;
|
|
895
895
|
const [, e, s, n, r] = t;
|
|
896
896
|
return parseInt(e) >= 0 && parseInt(e) <= 255 && parseInt(s) >= 0 && parseInt(s) <= 255 && parseInt(n) >= 0 && parseInt(n) <= 255 && parseFloat(r) >= 0 && parseFloat(r) <= 1;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
return
|
|
898
|
+
function Cn(i) {
|
|
899
|
+
return Rt(i) || Vt(i) || Kt(i);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Sn(i) {
|
|
902
902
|
return !isNaN(new Date(i).getTime());
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Ln(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 Dn(i) {
|
|
912
912
|
return !i || i.trim() === "";
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Hn(i) {
|
|
915
915
|
return /^\s+$/.test(i || "");
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Mn(i) {
|
|
918
918
|
return !isNaN(parseFloat(i)) && isFinite(i);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Tn(i) {
|
|
921
921
|
return /^-?\d+$/.test(i || "");
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function In(i) {
|
|
924
924
|
return /^-?\d+\.\d+$/.test(i || "");
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function An(i) {
|
|
927
927
|
const t = parseFloat(i);
|
|
928
928
|
return !isNaN(t) && t > 0;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function zn(i) {
|
|
931
931
|
const t = parseFloat(i);
|
|
932
932
|
return !isNaN(t) && t < 0;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Pn(i) {
|
|
935
935
|
return /^[a-zA-Z]+$/.test(i || "");
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function $n(i) {
|
|
938
938
|
return /^[a-zA-Z0-9]+$/.test(i || "");
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Bn(i) {
|
|
941
941
|
return /^[\u4e00-\u9fa5]+$/.test(i || "");
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function qn(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 On(i, t) {
|
|
948
948
|
return (i || "").length >= t;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Fn(i, t) {
|
|
951
951
|
return (i || "").length <= t;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Nn(i, t) {
|
|
954
954
|
return t instanceof RegExp ? t.test(i || "") : !1;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Rn(i, t) {
|
|
957
957
|
return String(i) === String(t);
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function Wt(i, t) {
|
|
960
960
|
return (i || "").includes(t);
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
return !
|
|
962
|
+
function Vn(i, t) {
|
|
963
|
+
return !Wt(i, t);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Kn(i) {
|
|
966
966
|
return Array.isArray(i);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function Wn(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 Un(i, t) {
|
|
973
973
|
return i ? i.length >= t : !1;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function Yn(i, t) {
|
|
976
976
|
return i ? i.length <= t : !1;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Xn(i) {
|
|
979
979
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function jn(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 Jn(i, t) {
|
|
985
985
|
const e = {};
|
|
986
986
|
return Object.keys(t).forEach((s) => {
|
|
987
987
|
const n = i[s], r = t[s], a = [];
|
|
988
988
|
r.forEach((o) => {
|
|
989
989
|
if (typeof o == "string") {
|
|
990
990
|
const [l, ...c] = o.split(":");
|
|
991
|
-
|
|
991
|
+
Ut[l](n, ...c) || a.push(l);
|
|
992
992
|
} else if (typeof o == "function") {
|
|
993
993
|
const l = o(n, i);
|
|
994
994
|
l !== !0 && a.push(l || "validation_failed");
|
|
@@ -996,27 +996,27 @@ function Xn(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 Ut = { isEmail: yn, isPhone: vn, isURL: bn, isIPv4: Ft, isIPv6: Nt, isIP: xn, isIDCard: En, isPassport: wn, isCreditCard: kn, isHexColor: Rt, isRGB: Vt, isRGBA: Kt, isColor: Cn, isDate: Sn, isJSON: Ln, isEmpty: Dn, isWhitespace: Hn, isNumber: Mn, isInteger: Tn, isFloat: In, isPositive: An, isNegative: zn, isAlpha: Pn, isAlphaNumeric: $n, isChinese: Bn, isLength: qn, minLength: On, maxLength: Fn, matches: Nn, equals: Rn, contains: Wt, notContains: Vn, isArray: Kn, arrayLength: Wn, arrayMinLength: Un, arrayMaxLength: Yn, isObject: Xn, hasKeys: jn, validate: Jn };
|
|
1000
|
+
function Zn(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 b = f, x = p, v = m, C = y;
|
|
1021
1021
|
for (let S = 0; S < 64; S++) {
|
|
1022
1022
|
let k, A;
|
|
@@ -1029,44 +1029,44 @@ function jn(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 Gn(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 C = s(
|
|
1062
|
-
|
|
1061
|
+
const C = 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] + C + h[v - 7] + S & 4294967295;
|
|
1063
1063
|
}
|
|
1064
|
-
let [u, f, p, m, y, _, b, x] =
|
|
1064
|
+
let [u, f, p, m, y, _, b, x] = d;
|
|
1065
1065
|
for (let v = 0; v < 64; v++) {
|
|
1066
|
-
const C = s(y, 6) ^ s(y, 11) ^ s(y, 25), S = y & _ ^ ~y & b, k = x + C + S + e[v] +
|
|
1066
|
+
const C = s(y, 6) ^ s(y, 11) ^ s(y, 25), S = y & _ ^ ~y & b, k = x + C + S + e[v] + h[v] & 4294967295, A = s(u, 2) ^ s(u, 13) ^ s(u, 22), z = u & f ^ u & p ^ f & p, D = A + z & 4294967295;
|
|
1067
1067
|
x = b, b = _, _ = y, y = m + k & 4294967295, m = p, p = f, f = u, u = k + D & 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] + b & 4294967295, d[7] + x & 4294967295];
|
|
1070
1070
|
}
|
|
1071
1071
|
const a = n(t);
|
|
1072
1072
|
let o = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225];
|
|
@@ -1074,36 +1074,36 @@ function Jn(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 Qn(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 tr(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 er() {
|
|
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
|
|
1106
|
+
const sr = { md5: Zn, sha256: Gn, base64Encode: Qn, base64Decode: tr, uuid: er }, B = /* @__PURE__ */ new Map();
|
|
1107
1107
|
async function Z(i, t = {}) {
|
|
1108
1108
|
const { crossOrigin: e = "anonymous" } = t;
|
|
1109
1109
|
return B.has(i) ? B.get(i) : new Promise((s, n) => {
|
|
@@ -1115,7 +1115,7 @@ async function Z(i, t = {}) {
|
|
|
1115
1115
|
}, r.src = i;
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
|
-
async function
|
|
1118
|
+
async function ir(i, t = {}) {
|
|
1119
1119
|
const { parallel: e = !0 } = t;
|
|
1120
1120
|
if (e) return Promise.all(i.map((n) => Z(n, t)));
|
|
1121
1121
|
const s = [];
|
|
@@ -1123,7 +1123,7 @@ async function er(i, t = {}) {
|
|
|
1123
1123
|
s.push(await Z(n, t));
|
|
1124
1124
|
return s;
|
|
1125
1125
|
}
|
|
1126
|
-
async function
|
|
1126
|
+
async function Yt(i, t = {}) {
|
|
1127
1127
|
const { type: e = "text/javascript", async: s = !0, defer: n = !1 } = t;
|
|
1128
1128
|
return B.has(i) ? B.get(i) : new Promise((r, a) => {
|
|
1129
1129
|
const o = document.createElement("script");
|
|
@@ -1134,7 +1134,7 @@ async function Wt(i, t = {}) {
|
|
|
1134
1134
|
}, o.src = i, document.head.appendChild(o);
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
async function
|
|
1137
|
+
async function Xt(i, t = {}) {
|
|
1138
1138
|
const { media: e = "all" } = t;
|
|
1139
1139
|
return B.has(i) ? B.get(i) : new Promise((s, n) => {
|
|
1140
1140
|
const r = document.createElement("link");
|
|
@@ -1145,7 +1145,7 @@ async function Ut(i, t = {}) {
|
|
|
1145
1145
|
}, document.head.appendChild(r);
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
async function
|
|
1148
|
+
async function nr(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 sr(i, t, e = {}) {
|
|
|
1153
1153
|
throw new Error(`Failed to load font: ${i}`);
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
async function
|
|
1156
|
+
async function rr(i, t = "image") {
|
|
1157
1157
|
switch (t) {
|
|
1158
1158
|
case "image":
|
|
1159
1159
|
return Z(i);
|
|
1160
1160
|
case "script":
|
|
1161
|
-
return
|
|
1161
|
+
return Yt(i);
|
|
1162
1162
|
case "stylesheet":
|
|
1163
1163
|
case "style":
|
|
1164
|
-
return
|
|
1164
|
+
return Xt(i);
|
|
1165
1165
|
default:
|
|
1166
1166
|
throw new Error(`Unsupported preload type: ${t}`);
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function ar(i) {
|
|
1170
1170
|
return B.has(i);
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function or() {
|
|
1173
1173
|
B.clear();
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function lr(i) {
|
|
1176
1176
|
B.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 cr = { loadImage: Z, loadImages: ir, loadScript: Yt, loadStylesheet: Xt, loadFont: nr, preload: rr, isLoaded: ar, clearCache: or, clearCacheByUrl: lr }, Oa = {
|
|
1179
|
+
string: ss,
|
|
1180
|
+
array: Ws,
|
|
1181
|
+
object: di,
|
|
1182
|
+
number: qi,
|
|
1183
|
+
date: mn,
|
|
1184
|
+
debounce: gn,
|
|
1185
|
+
throttle: _n,
|
|
1186
|
+
validator: Ut,
|
|
1187
|
+
crypto: sr,
|
|
1188
|
+
preload: cr
|
|
1189
1189
|
};
|
|
1190
|
-
function
|
|
1190
|
+
function hr(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;
|
|
@@ -1242,7 +1242,7 @@ const g = {
|
|
|
1242
1242
|
path: Symbol("reactive_path"),
|
|
1243
1243
|
isReactive: Symbol("reactive_is_reactive")
|
|
1244
1244
|
};
|
|
1245
|
-
class
|
|
1245
|
+
class dr {
|
|
1246
1246
|
constructor() {
|
|
1247
1247
|
this.rawData = {}, this.data = null, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new at(), this.updateQueue = /* @__PURE__ */ new Map(), this.isProcessing = !1, this.pendingComputed = /* @__PURE__ */ new Set(), this.persistedKeys = /* @__PURE__ */ new Map(), this.snapshots = [], this.snapshotLimit = 10, this._proxyCache = /* @__PURE__ */ new WeakMap(), this.createReactiveData();
|
|
1248
1248
|
}
|
|
@@ -1280,8 +1280,8 @@ class cr {
|
|
|
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 cr {
|
|
|
1382
1382
|
t.textContent !== String(e ?? "") && (t.textContent = e ?? "");
|
|
1383
1383
|
break;
|
|
1384
1384
|
case "html":
|
|
1385
|
-
const c =
|
|
1385
|
+
const c = hr(e);
|
|
1386
1386
|
t.innerHTML !== c && (t.innerHTML = c);
|
|
1387
1387
|
break;
|
|
1388
1388
|
case "value":
|
|
@@ -1395,8 +1395,8 @@ class cr {
|
|
|
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));
|
|
@@ -1459,18 +1459,18 @@ class cr {
|
|
|
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 cr {
|
|
|
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)
|
|
@@ -1779,7 +1779,7 @@ class vt {
|
|
|
1779
1779
|
};
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
class
|
|
1782
|
+
class ur {
|
|
1783
1783
|
constructor() {
|
|
1784
1784
|
this.stores = /* @__PURE__ */ new Map();
|
|
1785
1785
|
}
|
|
@@ -1797,7 +1797,7 @@ class hr {
|
|
|
1797
1797
|
this.stores.clear();
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
|
-
class
|
|
1800
|
+
class pr {
|
|
1801
1801
|
constructor() {
|
|
1802
1802
|
this.events = {}, this.delegatedEvents = {}, this.eventListeners = {};
|
|
1803
1803
|
}
|
|
@@ -1874,12 +1874,12 @@ function I(i = null) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
}), t;
|
|
1876
1876
|
}
|
|
1877
|
-
const O = new
|
|
1878
|
-
function
|
|
1879
|
-
return
|
|
1877
|
+
const O = new dr(), Fa = new pr(), jt = new ur();
|
|
1878
|
+
function Na(i, t) {
|
|
1879
|
+
return jt.createStore(i, t);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1882
|
-
return
|
|
1881
|
+
function Ra(i) {
|
|
1882
|
+
return jt.getStore(i);
|
|
1883
1883
|
}
|
|
1884
1884
|
const M = {
|
|
1885
1885
|
paths: {
|
|
@@ -1979,12 +1979,12 @@ const M = {
|
|
|
1979
1979
|
function bt() {
|
|
1980
1980
|
if (typeof window < "u" && window.kupolaConfig)
|
|
1981
1981
|
try {
|
|
1982
|
-
|
|
1982
|
+
pt(M, window.kupolaConfig), Jt();
|
|
1983
1983
|
} catch (i) {
|
|
1984
1984
|
console.warn("[Kupola] Failed to parse window.kupolaConfig:", i);
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function Jt() {
|
|
1988
1988
|
G.forEach((i) => {
|
|
1989
1989
|
try {
|
|
1990
1990
|
i(M);
|
|
@@ -1993,33 +1993,33 @@ function Xt() {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
});
|
|
1995
1995
|
}
|
|
1996
|
-
function
|
|
1996
|
+
function fr(i) {
|
|
1997
1997
|
typeof i == "function" && G.push(i);
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function Va(i) {
|
|
2000
2000
|
const t = G.indexOf(i);
|
|
2001
2001
|
t > -1 && G.splice(t, 1);
|
|
2002
2002
|
}
|
|
2003
2003
|
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", bt) : bt());
|
|
2004
|
-
function
|
|
2005
|
-
|
|
2004
|
+
function Ka(i) {
|
|
2005
|
+
pt(M, i), Jt();
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2008
|
-
return i ?
|
|
2007
|
+
function ut(i) {
|
|
2008
|
+
return i ? xr(M, i) : M;
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function Zt() {
|
|
2011
2011
|
return M.paths.base + M.paths.icons.replace(/^\//, "");
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function Wa() {
|
|
2014
2014
|
return M.paths.base;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function mr() {
|
|
2017
2017
|
return M.theme.default;
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2019
|
+
function gr() {
|
|
2020
2020
|
return M.theme.brand;
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function Ua() {
|
|
2023
2023
|
return M.http;
|
|
2024
2024
|
}
|
|
2025
2025
|
function j() {
|
|
@@ -2028,35 +2028,36 @@ function j() {
|
|
|
2028
2028
|
function W() {
|
|
2029
2029
|
return M.zIndex;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function it() {
|
|
2032
2032
|
return M.security;
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2034
|
+
function _r() {
|
|
2035
2035
|
return M.performance;
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function yr() {
|
|
2038
2038
|
return M.message;
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2040
|
+
function vr() {
|
|
2041
2041
|
return M.notification;
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function br() {
|
|
2044
2044
|
return M.validation;
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function pt(i, t) {
|
|
2047
2047
|
for (const e in t)
|
|
2048
|
-
t[e] instanceof Object && e in i && i[e] instanceof Object ?
|
|
2048
|
+
t[e] instanceof Object && e in i && i[e] instanceof Object ? pt(i[e], t[e]) : i[e] = t[e];
|
|
2049
2049
|
return i;
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2051
|
+
function xr(i, t) {
|
|
2052
2052
|
return t.split(".").reduce((e, s) => (e && e[s]) !== void 0 ? e[s] : void 0, i);
|
|
2053
2053
|
}
|
|
2054
|
-
const
|
|
2055
|
-
|
|
2054
|
+
const Gt = "kupola-theme", Qt = "kupola-brand";
|
|
2055
|
+
let xt = !1;
|
|
2056
|
+
fr((i) => {
|
|
2056
2057
|
const t = document.querySelector("[data-theme-toggle]");
|
|
2057
2058
|
if (t) {
|
|
2058
2059
|
const e = F();
|
|
2059
|
-
|
|
2060
|
+
ft(t), nt(e);
|
|
2060
2061
|
}
|
|
2061
2062
|
});
|
|
2062
2063
|
const X = [
|
|
@@ -2073,28 +2074,21 @@ const X = [
|
|
|
2073
2074
|
{ id: "roulan", name: "柔蓝", color: "#106898" }
|
|
2074
2075
|
];
|
|
2075
2076
|
function F() {
|
|
2076
|
-
return localStorage.getItem(
|
|
2077
|
+
return localStorage.getItem(Gt) || mr();
|
|
2077
2078
|
}
|
|
2078
|
-
function
|
|
2079
|
+
function nt(i) {
|
|
2079
2080
|
if (i !== "dark" && i !== "light") return;
|
|
2080
|
-
document.documentElement.setAttribute("data-theme", i), localStorage.setItem(
|
|
2081
|
+
document.documentElement.setAttribute("data-theme", i), localStorage.setItem(Gt, i);
|
|
2081
2082
|
const t = document.querySelector("[data-theme-toggle]");
|
|
2082
|
-
|
|
2083
|
-
t.setAttribute("data-current-theme", i);
|
|
2084
|
-
const e = t.querySelector(".theme-icon");
|
|
2085
|
-
if (e) {
|
|
2086
|
-
const s = e.src.substring(0, e.src.lastIndexOf("/") + 1);
|
|
2087
|
-
e.src = i === "dark" ? s + "sun.svg" : s + "moon.svg";
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2083
|
+
t && (t.setAttribute("data-current-theme", i), ft(t));
|
|
2090
2084
|
}
|
|
2091
2085
|
function J() {
|
|
2092
|
-
return localStorage.getItem(
|
|
2086
|
+
return localStorage.getItem(Qt) || gr();
|
|
2093
2087
|
}
|
|
2094
2088
|
function lt(i) {
|
|
2095
2089
|
const t = X.find((n) => n.id === i);
|
|
2096
2090
|
if (!t) return;
|
|
2097
|
-
document.documentElement.setAttribute("data-brand", i), localStorage.setItem(
|
|
2091
|
+
document.documentElement.setAttribute("data-brand", i), localStorage.setItem(Qt, i);
|
|
2098
2092
|
const e = document.querySelector("[data-brand-toggle]");
|
|
2099
2093
|
if (e) {
|
|
2100
2094
|
e.setAttribute("data-current-brand", i);
|
|
@@ -2107,65 +2101,67 @@ function lt(i) {
|
|
|
2107
2101
|
n.getAttribute("data-brand-btn") === i ? n.classList.add("is-active") : n.classList.remove("is-active");
|
|
2108
2102
|
});
|
|
2109
2103
|
}
|
|
2110
|
-
function
|
|
2104
|
+
function ft(i) {
|
|
2111
2105
|
const t = i.querySelector(".theme-icon");
|
|
2112
2106
|
if (t) {
|
|
2113
|
-
const e = F(), s =
|
|
2107
|
+
const e = F(), s = Zt();
|
|
2114
2108
|
t.src = e === "dark" ? s + "sun.svg" : s + "moon.svg";
|
|
2115
2109
|
}
|
|
2116
2110
|
}
|
|
2117
|
-
function
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2111
|
+
function Et(i) {
|
|
2112
|
+
i.preventDefault();
|
|
2113
|
+
const e = F() === "dark" ? "light" : "dark";
|
|
2114
|
+
nt(e);
|
|
2115
|
+
}
|
|
2116
|
+
function Er() {
|
|
2117
|
+
const i = document.querySelector("[data-theme-toggle]");
|
|
2118
|
+
if (!xt) {
|
|
2119
|
+
xt = !0;
|
|
2120
|
+
const r = F();
|
|
2121
|
+
nt(r);
|
|
2122
|
+
const a = J();
|
|
2123
|
+
lt(a);
|
|
2129
2124
|
}
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2125
|
+
i && (ft(i), i.removeEventListener("click", Et), i.addEventListener("click", Et));
|
|
2126
|
+
let t = document.getElementById("brand-picker");
|
|
2127
|
+
t || (t = document.createElement("div"), t.id = "brand-picker", t.style.position = "fixed", t.style.top = "64px", t.style.right = "16px", t.style.zIndex = "9998", t.style.display = "none", t.style.padding = "12px", t.style.width = "200px", t.style.gridTemplateColumns = "repeat(3, 1fr)", t.style.gap = "6px", t.style.backgroundColor = "var(--bg-base-secondary)", t.style.border = "1px solid var(--border-neutral-l1)", t.style.borderRadius = "8px", t.style.boxShadow = "0 4px 20px rgba(0, 0, 0, 0.2)", t.style.overflow = "hidden", X.forEach((r) => {
|
|
2128
|
+
const a = document.createElement("button");
|
|
2129
|
+
a.setAttribute("data-brand-btn", r.id), a.style.display = "flex", a.style.justifyContent = "center", a.style.alignItems = "center", a.style.height = "60px", a.style.backgroundColor = r.color, a.style.color = ["#32F08C", "#FF9900", "#E2C027", "#0EB0C9", "#B1A6CC"].includes(r.color) ? "#0C0C0D" : "#FFFFFF", a.style.fontWeight = "500", a.style.borderRadius = "4px", a.style.border = "none", a.style.cursor = "pointer", a.style.margin = "0", a.style.padding = "0", a.textContent = r.name, t.appendChild(a);
|
|
2130
|
+
}), document.body.appendChild(t));
|
|
2131
|
+
const e = document.querySelector("[data-brand-toggle]");
|
|
2132
|
+
e && t && (e.onclick = function(r) {
|
|
2133
|
+
r.stopPropagation(), r.preventDefault();
|
|
2134
|
+
const a = t.style.display === "none";
|
|
2135
|
+
t.style.display = a ? "grid" : "none", a ? setTimeout(() => {
|
|
2136
|
+
document.addEventListener("click", s, !0);
|
|
2137
|
+
}, 0) : document.removeEventListener("click", s, !0);
|
|
2138
|
+
}, t.onclick = function(r) {
|
|
2139
|
+
r.stopPropagation();
|
|
2144
2140
|
});
|
|
2145
|
-
function r
|
|
2146
|
-
|
|
2147
|
-
}
|
|
2148
|
-
document.querySelectorAll("[data-brand-btn]").forEach((
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2152
|
-
lt(
|
|
2141
|
+
function s(r) {
|
|
2142
|
+
t && e && !t.contains(r.target) && !e.contains(r.target) && (t.style.display = "none", document.removeEventListener("click", s, !0));
|
|
2143
|
+
}
|
|
2144
|
+
document.querySelectorAll("[data-brand-btn]").forEach((r) => {
|
|
2145
|
+
r.addEventListener("click", (a) => {
|
|
2146
|
+
a.stopPropagation();
|
|
2147
|
+
const o = r.getAttribute("data-brand-btn");
|
|
2148
|
+
lt(o), t && (t.style.display = "none");
|
|
2153
2149
|
});
|
|
2154
2150
|
});
|
|
2155
2151
|
}
|
|
2156
|
-
function
|
|
2152
|
+
function Ya() {
|
|
2157
2153
|
const i = document.createElement("button");
|
|
2158
2154
|
i.setAttribute("data-theme-toggle", ""), i.setAttribute("data-current-theme", F()), i.className = "ds-btn ds-btn--ghost ds-btn--sm ds-btn--icon", i.style.position = "fixed", i.style.top = "16px", i.style.right = "16px", i.style.zIndex = "9999";
|
|
2159
2155
|
const t = document.createElement("img");
|
|
2160
2156
|
t.className = "theme-icon";
|
|
2161
|
-
const e =
|
|
2157
|
+
const e = Zt();
|
|
2162
2158
|
return t.src = F() === "dark" ? e + "sun.svg" : e + "moon.svg", t.width = 14, t.height = 14, t.alt = "Toggle theme", i.appendChild(t), document.body.appendChild(i), i.onclick = function(s) {
|
|
2163
2159
|
s.preventDefault();
|
|
2164
2160
|
const r = F() === "dark" ? "light" : "dark";
|
|
2165
|
-
|
|
2161
|
+
nt(r);
|
|
2166
2162
|
}, i;
|
|
2167
2163
|
}
|
|
2168
|
-
function
|
|
2164
|
+
function Xa() {
|
|
2169
2165
|
const i = document.createElement("div");
|
|
2170
2166
|
i.id = "brand-picker-auto", i.style.position = "fixed", i.style.top = "56px", i.style.right = "16px", i.style.zIndex = "9998", i.style.display = "none", i.style.padding = "12px", i.style.width = "200px", i.style.gridTemplateColumns = "repeat(3, 1fr)", i.style.gap = "6px", i.style.backgroundColor = "var(--bg-base-secondary)", i.style.border = "1px solid var(--border-neutral-l1)", i.style.borderRadius = "8px", i.style.boxShadow = "0 4px 20px rgba(0, 0, 0, 0.2)", i.style.overflow = "hidden", X.forEach((a) => {
|
|
2171
2167
|
const o = document.createElement("button");
|
|
@@ -2196,8 +2192,8 @@ function Ua() {
|
|
|
2196
2192
|
});
|
|
2197
2193
|
}), { toggleBtn: t, container: i };
|
|
2198
2194
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const s =
|
|
2195
|
+
function ja(i, t = {}) {
|
|
2196
|
+
const s = it()?.sanitizeHtml || {};
|
|
2201
2197
|
if (!s.enabled && !t.force)
|
|
2202
2198
|
return i;
|
|
2203
2199
|
const n = t.allowedTags || s.allowedTags || [], r = t.allowedAttributes || s.allowedAttributes || {};
|
|
@@ -2205,28 +2201,28 @@ function Ya(i, t = {}) {
|
|
|
2205
2201
|
return i;
|
|
2206
2202
|
const o = new DOMParser().parseFromString(i, "text/html");
|
|
2207
2203
|
return o.body.querySelectorAll("*").forEach((c) => {
|
|
2208
|
-
const
|
|
2209
|
-
if (!n.includes(
|
|
2204
|
+
const d = c.tagName.toLowerCase();
|
|
2205
|
+
if (!n.includes(d)) {
|
|
2210
2206
|
c.remove();
|
|
2211
2207
|
return;
|
|
2212
2208
|
}
|
|
2213
|
-
Array.from(c.attributes).forEach((
|
|
2214
|
-
const u =
|
|
2215
|
-
(r[
|
|
2209
|
+
Array.from(c.attributes).forEach((h) => {
|
|
2210
|
+
const u = h.name.toLowerCase();
|
|
2211
|
+
(r[d] || []).includes(u) || c.removeAttribute(h.name);
|
|
2216
2212
|
});
|
|
2217
2213
|
}), o.body.innerHTML;
|
|
2218
2214
|
}
|
|
2219
|
-
function
|
|
2215
|
+
function Ja(i) {
|
|
2220
2216
|
if (typeof i != "string")
|
|
2221
2217
|
return i;
|
|
2222
2218
|
const t = document.createElement("div");
|
|
2223
2219
|
return t.textContent = i, t.innerHTML;
|
|
2224
2220
|
}
|
|
2225
|
-
function
|
|
2221
|
+
function Za(i) {
|
|
2226
2222
|
return typeof i != "string" ? i : new DOMParser().parseFromString(i, "text/html").body.textContent || "";
|
|
2227
2223
|
}
|
|
2228
|
-
function
|
|
2229
|
-
const n =
|
|
2224
|
+
function Ga(i, t, e = {}) {
|
|
2225
|
+
const n = it()?.maskData || {};
|
|
2230
2226
|
if (!n.enabled && !e.force || i == null)
|
|
2231
2227
|
return i;
|
|
2232
2228
|
const a = (e.patterns || n.patterns || {})[t];
|
|
@@ -2235,8 +2231,8 @@ function Ja(i, t, e = {}) {
|
|
|
2235
2231
|
const o = typeof a.regex == "string" ? new RegExp(a.regex) : a.regex;
|
|
2236
2232
|
return String(i).replace(o, a.replace);
|
|
2237
2233
|
}
|
|
2238
|
-
function
|
|
2239
|
-
const s =
|
|
2234
|
+
function Qa(i, t) {
|
|
2235
|
+
const s = it()?.secureId || {}, n = i || s.length || 16, r = s.charset || "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
2240
2236
|
if (typeof crypto > "u" || !crypto.getRandomValues) {
|
|
2241
2237
|
let l = "";
|
|
2242
2238
|
for (let c = 0; c < n; c++)
|
|
@@ -2250,7 +2246,7 @@ function Za(i, t) {
|
|
|
2250
2246
|
o += r[a[l] % r.length];
|
|
2251
2247
|
return t ? `${t}_${o}` : o;
|
|
2252
2248
|
}
|
|
2253
|
-
class
|
|
2249
|
+
class wr {
|
|
2254
2250
|
constructor() {
|
|
2255
2251
|
this.initializers = /* @__PURE__ */ new Map(), this.cleanupFunctions = /* @__PURE__ */ new Map(), this.processedElements = /* @__PURE__ */ new WeakSet(), this._dataAttrs = ["data-component"], this._cssClasses = [], this._cachedSelector = null;
|
|
2256
2252
|
}
|
|
@@ -2357,7 +2353,7 @@ class xr {
|
|
|
2357
2353
|
}), await Promise.all(n);
|
|
2358
2354
|
}
|
|
2359
2355
|
}
|
|
2360
|
-
const E = new
|
|
2356
|
+
const E = new wr(), kr = [
|
|
2361
2357
|
{ attr: "data-dropdown", cls: "ds-dropdown" },
|
|
2362
2358
|
{ attr: "data-select", cls: "ds-select" },
|
|
2363
2359
|
{ attr: "data-datepicker", cls: "ds-datepicker" },
|
|
@@ -2379,11 +2375,11 @@ const E = new xr(), Er = [
|
|
|
2379
2375
|
{ cls: "ds-notification" },
|
|
2380
2376
|
{ cls: "ds-message" }
|
|
2381
2377
|
];
|
|
2382
|
-
for (const i of
|
|
2378
|
+
for (const i of kr)
|
|
2383
2379
|
i.attr && !E._dataAttrs.includes(i.attr) && E._dataAttrs.push(i.attr), i.cls && !E._cssClasses.includes(i.cls) && E._cssClasses.push(i.cls);
|
|
2384
|
-
class
|
|
2380
|
+
class Q {
|
|
2385
2381
|
constructor(t) {
|
|
2386
|
-
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
|
|
2382
|
+
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 dt(), this.setupContext = null;
|
|
2387
2383
|
}
|
|
2388
2384
|
_parseProps() {
|
|
2389
2385
|
const t = {};
|
|
@@ -2482,7 +2478,7 @@ class tt {
|
|
|
2482
2478
|
};
|
|
2483
2479
|
let e = Object.getPrototypeOf(this);
|
|
2484
2480
|
const s = /* @__PURE__ */ new Set();
|
|
2485
|
-
for (; e && e.constructor !== Object && e.constructor !==
|
|
2481
|
+
for (; e && e.constructor !== Object && e.constructor !== Q; ) {
|
|
2486
2482
|
for (const [n, r] of Object.entries(t))
|
|
2487
2483
|
s.has(n) || e.hasOwnProperty(n) && (Array.isArray(r) ? r.forEach((a) => {
|
|
2488
2484
|
n === "render" && this.lifecycle.on(a, () => this.render?.());
|
|
@@ -2516,7 +2512,7 @@ class tt {
|
|
|
2516
2512
|
setup() {
|
|
2517
2513
|
}
|
|
2518
2514
|
}
|
|
2519
|
-
function
|
|
2515
|
+
function wt(i, t) {
|
|
2520
2516
|
Object.keys(t).forEach((e) => {
|
|
2521
2517
|
if (e !== "constructor")
|
|
2522
2518
|
if (typeof t[e] == "function") {
|
|
@@ -2528,12 +2524,12 @@ function xt(i, t) {
|
|
|
2528
2524
|
i.prototype[e] = t[e];
|
|
2529
2525
|
});
|
|
2530
2526
|
}
|
|
2531
|
-
class
|
|
2527
|
+
class Cr {
|
|
2532
2528
|
constructor() {
|
|
2533
2529
|
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();
|
|
2534
2530
|
}
|
|
2535
2531
|
register(t, e) {
|
|
2536
|
-
if (!(e.prototype instanceof
|
|
2532
|
+
if (!(e.prototype instanceof Q))
|
|
2537
2533
|
throw new Error(`Component ${t} must extend KupolaComponent`);
|
|
2538
2534
|
this.components.set(t, e);
|
|
2539
2535
|
}
|
|
@@ -2557,7 +2553,7 @@ class wr {
|
|
|
2557
2553
|
const n = (async () => {
|
|
2558
2554
|
try {
|
|
2559
2555
|
const r = await s(), a = r.default || r;
|
|
2560
|
-
if (!(a.prototype instanceof
|
|
2556
|
+
if (!(a.prototype instanceof Q))
|
|
2561
2557
|
throw new Error(`Component ${t} must extend KupolaComponent`);
|
|
2562
2558
|
return this.loadedComponents.set(t, a), a;
|
|
2563
2559
|
} catch (r) {
|
|
@@ -2572,7 +2568,7 @@ class wr {
|
|
|
2572
2568
|
useMixin(t, ...e) {
|
|
2573
2569
|
e.forEach((s) => {
|
|
2574
2570
|
const n = this.mixins.get(s);
|
|
2575
|
-
n &&
|
|
2571
|
+
n && wt(t, n);
|
|
2576
2572
|
});
|
|
2577
2573
|
}
|
|
2578
2574
|
async bootstrap(t = document) {
|
|
@@ -2613,7 +2609,7 @@ class wr {
|
|
|
2613
2609
|
const n = t.getAttribute("data-mixins"), r = s;
|
|
2614
2610
|
n && n.split(",").forEach((o) => {
|
|
2615
2611
|
const l = this.mixins.get(o.trim());
|
|
2616
|
-
l &&
|
|
2612
|
+
l && wt(r, l);
|
|
2617
2613
|
});
|
|
2618
2614
|
const a = new r(t);
|
|
2619
2615
|
t.__kupolaInstance = a, this.instances.set(t, a), a.mount();
|
|
@@ -2659,37 +2655,37 @@ class wr {
|
|
|
2659
2655
|
}
|
|
2660
2656
|
}
|
|
2661
2657
|
let T = null;
|
|
2662
|
-
typeof window < "u" && (T = new
|
|
2663
|
-
function
|
|
2664
|
-
if (
|
|
2658
|
+
typeof window < "u" && (T = new Cr());
|
|
2659
|
+
function Sr() {
|
|
2660
|
+
if (it().xssProtection && typeof document < "u") {
|
|
2665
2661
|
let t = document.querySelector('meta[http-equiv="X-XSS-Protection"]');
|
|
2666
2662
|
t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-XSS-Protection"), t.setAttribute("content", "1; mode=block"), document.head.insertBefore(t, document.head.firstChild)), t = document.querySelector('meta[http-equiv="X-Content-Type-Options"]'), t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-Content-Type-Options"), t.setAttribute("content", "nosniff"), document.head.insertBefore(t, document.head.firstChild));
|
|
2667
2663
|
}
|
|
2668
2664
|
}
|
|
2669
|
-
async function
|
|
2665
|
+
async function kt() {
|
|
2670
2666
|
if (typeof window < "u") {
|
|
2671
|
-
|
|
2672
|
-
const i =
|
|
2673
|
-
O.loadPersisted(), O.bind(),
|
|
2667
|
+
Sr();
|
|
2668
|
+
const i = ut();
|
|
2669
|
+
O.loadPersisted(), O.bind(), Er(), i.components?.autoInit !== !1 && (await E.initializeAll(), T && await T.bootstrap());
|
|
2674
2670
|
}
|
|
2675
2671
|
}
|
|
2676
|
-
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
2677
|
-
function
|
|
2672
|
+
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", kt) : typeof window < "u" && setTimeout(kt, 0);
|
|
2673
|
+
function to(i, t) {
|
|
2678
2674
|
T && T.register(i, t);
|
|
2679
2675
|
}
|
|
2680
|
-
function
|
|
2676
|
+
function eo(i, t) {
|
|
2681
2677
|
T && T.registerLazy(i, t);
|
|
2682
2678
|
}
|
|
2683
|
-
function
|
|
2679
|
+
function so(i) {
|
|
2684
2680
|
return T ? T.bootstrap(i) : Promise.resolve();
|
|
2685
2681
|
}
|
|
2686
|
-
function
|
|
2682
|
+
function io(i, t) {
|
|
2687
2683
|
T && T.defineMixin(i, t);
|
|
2688
2684
|
}
|
|
2689
|
-
function
|
|
2685
|
+
function no(i, ...t) {
|
|
2690
2686
|
T && T.useMixin(i, ...t);
|
|
2691
2687
|
}
|
|
2692
|
-
function
|
|
2688
|
+
function ro(i, t) {
|
|
2693
2689
|
if (!t || typeof t != "object")
|
|
2694
2690
|
throw new Error(`defineComponent("${i}"): options must be an object`);
|
|
2695
2691
|
t.componentClass ? T && T.register(i, t.componentClass) : t.lazy && T && T.registerLazy(i, t.lazy), t.init ? E.register(i, t.init, t.cleanup || null, {
|
|
@@ -2701,9 +2697,9 @@ function io(i, t) {
|
|
|
2701
2697
|
cssClass: t.cssClass
|
|
2702
2698
|
});
|
|
2703
2699
|
}
|
|
2704
|
-
class
|
|
2700
|
+
class te {
|
|
2705
2701
|
constructor(t = {}) {
|
|
2706
|
-
const e =
|
|
2702
|
+
const e = ut();
|
|
2707
2703
|
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();
|
|
2708
2704
|
}
|
|
2709
2705
|
_initFromDOM() {
|
|
@@ -2799,37 +2795,37 @@ class Gt {
|
|
|
2799
2795
|
return new Intl.RelativeTimeFormat(n, s).format(t, e);
|
|
2800
2796
|
}
|
|
2801
2797
|
}
|
|
2802
|
-
const R = new
|
|
2803
|
-
function
|
|
2804
|
-
return new
|
|
2798
|
+
const R = new te();
|
|
2799
|
+
function ao(i) {
|
|
2800
|
+
return new te(i);
|
|
2805
2801
|
}
|
|
2806
|
-
function
|
|
2802
|
+
function oo(i, t = {}) {
|
|
2807
2803
|
return R.t(i, t);
|
|
2808
2804
|
}
|
|
2809
|
-
function
|
|
2805
|
+
function lo(i, t, e = {}) {
|
|
2810
2806
|
return R.n(i, t, e);
|
|
2811
2807
|
}
|
|
2812
|
-
function
|
|
2808
|
+
function co(i) {
|
|
2813
2809
|
return R.setLocale(i);
|
|
2814
2810
|
}
|
|
2815
|
-
function
|
|
2811
|
+
function ho() {
|
|
2816
2812
|
return R.getLocale();
|
|
2817
2813
|
}
|
|
2818
|
-
function
|
|
2814
|
+
function uo(i, t = {}) {
|
|
2819
2815
|
return R.formatDate(i, t);
|
|
2820
2816
|
}
|
|
2821
|
-
function
|
|
2817
|
+
function po(i, t = {}) {
|
|
2822
2818
|
return R.formatNumber(i, t);
|
|
2823
2819
|
}
|
|
2824
|
-
function
|
|
2820
|
+
function fo(i, t, e = {}) {
|
|
2825
2821
|
return R.formatCurrency(i, t, e);
|
|
2826
2822
|
}
|
|
2827
|
-
class
|
|
2823
|
+
class Lr {
|
|
2828
2824
|
constructor() {
|
|
2829
2825
|
this._listeners = /* @__PURE__ */ new Map(), this._scopeListeners = /* @__PURE__ */ new Map();
|
|
2830
2826
|
}
|
|
2831
2827
|
on(t, e, s, n = {}) {
|
|
2832
|
-
const { scope: r = null, once: a = !1, passive: o = !1, capture: l = !1 } = n, c = this._generateId(),
|
|
2828
|
+
const { scope: r = null, once: a = !1, passive: o = !1, capture: l = !1 } = n, c = this._generateId(), d = {
|
|
2833
2829
|
id: c,
|
|
2834
2830
|
target: t,
|
|
2835
2831
|
eventName: e,
|
|
@@ -2838,11 +2834,11 @@ class Cr {
|
|
|
2838
2834
|
once: a,
|
|
2839
2835
|
wrappedHandler: null
|
|
2840
2836
|
};
|
|
2841
|
-
|
|
2837
|
+
d.wrappedHandler = (u) => {
|
|
2842
2838
|
a && this.offById(c), s.call(t, u);
|
|
2843
2839
|
};
|
|
2844
|
-
const
|
|
2845
|
-
return this._listeners.has(
|
|
2840
|
+
const h = this._getEventKey(t, e);
|
|
2841
|
+
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, {
|
|
2846
2842
|
passive: o,
|
|
2847
2843
|
capture: l
|
|
2848
2844
|
}), {
|
|
@@ -2954,32 +2950,32 @@ class Cr {
|
|
|
2954
2950
|
this._listeners.clear(), this._scopeListeners.clear();
|
|
2955
2951
|
}
|
|
2956
2952
|
}
|
|
2957
|
-
const H = new
|
|
2958
|
-
function
|
|
2953
|
+
const H = new Lr();
|
|
2954
|
+
function mo(i, t, e, s) {
|
|
2959
2955
|
return H.on(i, t, e, s);
|
|
2960
2956
|
}
|
|
2961
|
-
function
|
|
2957
|
+
function go(i, t, e, s) {
|
|
2962
2958
|
return H.once(i, t, e, s);
|
|
2963
2959
|
}
|
|
2964
|
-
function
|
|
2960
|
+
function _o(i, t, e) {
|
|
2965
2961
|
H.off(i, t, e);
|
|
2966
2962
|
}
|
|
2967
|
-
function
|
|
2963
|
+
function yo(i, t, e) {
|
|
2968
2964
|
return H.emit(i, t, e);
|
|
2969
2965
|
}
|
|
2970
|
-
function
|
|
2966
|
+
function vo(i, t) {
|
|
2971
2967
|
return H.emitGlobal(i, t);
|
|
2972
2968
|
}
|
|
2973
|
-
function
|
|
2969
|
+
function bo(i) {
|
|
2974
2970
|
H.offByScope(i);
|
|
2975
2971
|
}
|
|
2976
|
-
function
|
|
2972
|
+
function xo(i, t) {
|
|
2977
2973
|
H.offAll(i, t);
|
|
2978
2974
|
}
|
|
2979
|
-
function
|
|
2975
|
+
function Eo(i, t) {
|
|
2980
2976
|
return H.getListenerCount(i, t);
|
|
2981
2977
|
}
|
|
2982
|
-
class
|
|
2978
|
+
class Dr {
|
|
2983
2979
|
constructor(t, e = {}) {
|
|
2984
2980
|
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)}`;
|
|
2985
2981
|
const s = j();
|
|
@@ -3114,26 +3110,26 @@ class Sr {
|
|
|
3114
3110
|
}), this._mouseenterHandler && this.menu.removeEventListener("mouseenter", this._mouseenterHandler), this._mouseleaveHandler && this.menu.removeEventListener("mouseleave", this._mouseleaveHandler)), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this.appendToBody && this._originalParent && this._restoreMenuFromBody(), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._itemClickHandler = null, this._keydownHandler = null, this._mouseenterHandler = null, this._mouseleaveHandler = null, this._triggerMouseenterHandler = null, this._triggerMouseleaveHandler = null, this._triggerKeydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3115
3111
|
}
|
|
3116
3112
|
}
|
|
3117
|
-
function
|
|
3113
|
+
function ee(i, t) {
|
|
3118
3114
|
i._kupolaDropdown && i._kupolaDropdown.destroy();
|
|
3119
|
-
const e = new
|
|
3115
|
+
const e = new Dr(i, t);
|
|
3120
3116
|
e.init(), i._kupolaDropdown = e;
|
|
3121
3117
|
}
|
|
3122
|
-
function
|
|
3118
|
+
function wo(i = document) {
|
|
3123
3119
|
i.querySelectorAll(".ds-dropdown").forEach((t) => {
|
|
3124
|
-
|
|
3120
|
+
ee(t);
|
|
3125
3121
|
});
|
|
3126
3122
|
}
|
|
3127
|
-
function
|
|
3123
|
+
function se(i) {
|
|
3128
3124
|
i._kupolaDropdown && (i._kupolaDropdown.destroy(), i._kupolaDropdown = null);
|
|
3129
3125
|
}
|
|
3130
|
-
function
|
|
3126
|
+
function ko() {
|
|
3131
3127
|
document.querySelectorAll(".ds-dropdown").forEach((i) => {
|
|
3132
|
-
|
|
3128
|
+
se(i);
|
|
3133
3129
|
});
|
|
3134
3130
|
}
|
|
3135
|
-
E.register("dropdown",
|
|
3136
|
-
class
|
|
3131
|
+
E.register("dropdown", ee, se);
|
|
3132
|
+
class Hr {
|
|
3137
3133
|
constructor(t, e = {}) {
|
|
3138
3134
|
this.element = t, this.trigger = t.querySelector(".ds-select__trigger"), this.valueEl = t.querySelector(".ds-select__value") || t.querySelector(".ds-select__trigger span"), this.optionsEl = t.querySelector(".ds-select__options") || t.querySelector(".ds-select__menu"), this.nativeSelect = t.querySelector("select"), this.icon = t.querySelector(".ds-select__icon"), this.scope = `select-${Math.random().toString(36).substr(2, 9)}`, this.multiple = e.multiple || t.hasAttribute("data-select-multiple"), this.searchable = e.searchable || t.hasAttribute("data-select-search"), this.clearable = e.clearable || t.hasAttribute("data-select-clear"), this.placeholder = e.placeholder || t.getAttribute("data-select-placeholder") || "", this.disabled = e.disabled || t.hasAttribute("data-select-disabled"), this.maxSelection = e.maxSelection || parseInt(t.getAttribute("data-select-max")) || 1 / 0, this.remoteMethod = e.remoteMethod || null, this.onChange = e.onChange || null, this.appendToBody = e.appendToBody !== !1, this.isOpen = !1, this.selectedValues = /* @__PURE__ */ new Set(), this.allOptions = [], this.filteredOptions = [], this.focusIndex = -1, this.searchInput = null, this.clearBtn = null, this.tagsWrap = null, this._originalParent = null, this._originalPosition = null, this._triggerClickHandler = null, this._documentClickHandler = null, this._documentClickListener = null, this._optionClickHandler = null, this._keydownHandler = null;
|
|
3139
3135
|
}
|
|
@@ -3379,20 +3375,20 @@ class Lr {
|
|
|
3379
3375
|
}), this._keydownHandler && document.removeEventListener("keydown", this._keydownHandler), this._documentClickListener && this._documentClickListener.unsubscribe ? this._documentClickListener.unsubscribe() : this._documentClickHandler && document.removeEventListener("click", this._documentClickHandler), this.searchInput && this.searchInput.remove(), this.clearBtn && this.clearBtn.remove(), this.tagsWrap && this.tagsWrap.remove(), this.appendToBody && this._originalParent && this._restoreOptionsFromBody(), this._documentClickHandler = null, this._documentClickListener = null, this._triggerClickHandler = null, this._optionClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3380
3376
|
}
|
|
3381
3377
|
}
|
|
3382
|
-
function
|
|
3383
|
-
const e = new
|
|
3378
|
+
function ie(i, t) {
|
|
3379
|
+
const e = new Hr(i, t);
|
|
3384
3380
|
e.init(), i._kupolaSelect = e;
|
|
3385
3381
|
}
|
|
3386
|
-
function
|
|
3382
|
+
function Co(i = document) {
|
|
3387
3383
|
i.querySelectorAll(".ds-select").forEach((t) => {
|
|
3388
|
-
|
|
3384
|
+
ie(t);
|
|
3389
3385
|
});
|
|
3390
3386
|
}
|
|
3391
|
-
function
|
|
3387
|
+
function Mr(i) {
|
|
3392
3388
|
i._kupolaSelect && (i._kupolaSelect.destroy(), i._kupolaSelect = null);
|
|
3393
3389
|
}
|
|
3394
|
-
E.register("select",
|
|
3395
|
-
class
|
|
3390
|
+
E.register("select", ie, Mr);
|
|
3391
|
+
class Tr {
|
|
3396
3392
|
constructor(t, e = {}) {
|
|
3397
3393
|
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)}`;
|
|
3398
3394
|
const s = j(), n = s.datepicker?.weekStart !== void 0 ? s.datepicker.weekStart : 1;
|
|
@@ -3520,20 +3516,20 @@ class Hr {
|
|
|
3520
3516
|
const m = document.createElement("span");
|
|
3521
3517
|
m.className = "ds-datepicker__weekday", m.textContent = p, l.appendChild(m);
|
|
3522
3518
|
}), t.appendChild(l);
|
|
3523
|
-
const
|
|
3524
|
-
|
|
3525
|
-
const
|
|
3519
|
+
const d = document.createElement("div");
|
|
3520
|
+
d.className = "ds-datepicker__days";
|
|
3521
|
+
const h = new Date(e, s, 1).getDay(), u = new Date(e, s + 1, 0).getDate(), f = (h - this.weekStart + 7) % 7;
|
|
3526
3522
|
for (let p = 0; p < f; p++) {
|
|
3527
3523
|
const m = document.createElement("span");
|
|
3528
|
-
m.className = "ds-datepicker__day ds-datepicker__day--empty",
|
|
3524
|
+
m.className = "ds-datepicker__day ds-datepicker__day--empty", d.appendChild(m);
|
|
3529
3525
|
}
|
|
3530
3526
|
for (let p = 1; p <= u; p++) {
|
|
3531
3527
|
const m = new Date(e, s, p), y = document.createElement("button");
|
|
3532
3528
|
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);
|
|
3533
3529
|
const _ = () => this._selectDate(m);
|
|
3534
|
-
y.addEventListener("click", _), y._dayClickHandler = _,
|
|
3530
|
+
y.addEventListener("click", _), y._dayClickHandler = _, d.appendChild(y);
|
|
3535
3531
|
}
|
|
3536
|
-
if (t.appendChild(
|
|
3532
|
+
if (t.appendChild(d), this.showToday) {
|
|
3537
3533
|
const p = document.createElement("div");
|
|
3538
3534
|
p.className = "ds-datepicker__footer";
|
|
3539
3535
|
const m = document.createElement("button");
|
|
@@ -3566,10 +3562,10 @@ class Hr {
|
|
|
3566
3562
|
const l = document.createElement("div");
|
|
3567
3563
|
l.className = "ds-datepicker__years-grid";
|
|
3568
3564
|
for (let c = 0; c < 12; c++) {
|
|
3569
|
-
const
|
|
3570
|
-
|
|
3571
|
-
u.stopPropagation(), this.currentDate.setFullYear(
|
|
3572
|
-
}), l.appendChild(
|
|
3565
|
+
const d = s + c, h = document.createElement("button");
|
|
3566
|
+
h.className = "ds-datepicker__year-cell", h.type = "button", h.textContent = d, d === e && h.classList.add("is-selected"), h.addEventListener("click", (u) => {
|
|
3567
|
+
u.stopPropagation(), this.currentDate.setFullYear(d), this.viewMode = "months", this._renderCalendar();
|
|
3568
|
+
}), l.appendChild(h);
|
|
3573
3569
|
}
|
|
3574
3570
|
t.appendChild(l);
|
|
3575
3571
|
}
|
|
@@ -3592,10 +3588,10 @@ class Hr {
|
|
|
3592
3588
|
}), s.appendChild(n), s.appendChild(r), s.appendChild(a), t.appendChild(s);
|
|
3593
3589
|
const o = document.createElement("div");
|
|
3594
3590
|
o.className = "ds-datepicker__months-grid", this.months.forEach((l, c) => {
|
|
3595
|
-
const
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
}), o.appendChild(
|
|
3591
|
+
const d = document.createElement("button");
|
|
3592
|
+
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) => {
|
|
3593
|
+
h.stopPropagation(), this.currentDate.setMonth(c), this.viewMode = "days", this._renderCalendar();
|
|
3594
|
+
}), o.appendChild(d);
|
|
3599
3595
|
}), t.appendChild(o);
|
|
3600
3596
|
}
|
|
3601
3597
|
_selectDate(t) {
|
|
@@ -3655,20 +3651,20 @@ class Hr {
|
|
|
3655
3651
|
}), this.appendToBody && this._originalParent && this._restoreCalendarFromBody(), this._documentClickHandler = null, this._resizeHandler = null, this._documentClickListener = null, this._resizeListener = null, this._iconClickHandler = null, this._inputClickHandler = null, this._endInputClickHandler = null, this._keydownHandler = null, this.element.__kupolaInitialized = !1);
|
|
3656
3652
|
}
|
|
3657
3653
|
}
|
|
3658
|
-
function
|
|
3659
|
-
const e = new
|
|
3654
|
+
function ne(i, t) {
|
|
3655
|
+
const e = new Tr(i, t);
|
|
3660
3656
|
e.init(), i._kupolaDatepicker = e;
|
|
3661
3657
|
}
|
|
3662
|
-
function
|
|
3658
|
+
function So(i = document) {
|
|
3663
3659
|
i.querySelectorAll(".ds-datepicker").forEach((t) => {
|
|
3664
|
-
|
|
3660
|
+
ne(t);
|
|
3665
3661
|
});
|
|
3666
3662
|
}
|
|
3667
|
-
function
|
|
3663
|
+
function Ir(i) {
|
|
3668
3664
|
i._kupolaDatepicker && (i._kupolaDatepicker.destroy(), i._kupolaDatepicker = null);
|
|
3669
3665
|
}
|
|
3670
|
-
E.register("datepicker",
|
|
3671
|
-
class
|
|
3666
|
+
E.register("datepicker", ne, Ir);
|
|
3667
|
+
class Ar {
|
|
3672
3668
|
constructor(t, e = {}) {
|
|
3673
3669
|
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;
|
|
3674
3670
|
}
|
|
@@ -3850,20 +3846,20 @@ class Tr {
|
|
|
3850
3846
|
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);
|
|
3851
3847
|
}
|
|
3852
3848
|
}
|
|
3853
|
-
function
|
|
3854
|
-
const e = new
|
|
3849
|
+
function re(i, t) {
|
|
3850
|
+
const e = new Ar(i, t);
|
|
3855
3851
|
e.init(), i._kupolaTimepicker = e;
|
|
3856
3852
|
}
|
|
3857
|
-
function
|
|
3853
|
+
function Lo(i = document) {
|
|
3858
3854
|
i.querySelectorAll(".ds-timepicker").forEach((t) => {
|
|
3859
|
-
|
|
3855
|
+
re(t);
|
|
3860
3856
|
});
|
|
3861
3857
|
}
|
|
3862
|
-
function
|
|
3858
|
+
function zr(i) {
|
|
3863
3859
|
i._kupolaTimepicker && (i._kupolaTimepicker.destroy(), i._kupolaTimepicker = null);
|
|
3864
3860
|
}
|
|
3865
|
-
E.register("timepicker",
|
|
3866
|
-
class
|
|
3861
|
+
E.register("timepicker", re, zr);
|
|
3862
|
+
class Pr {
|
|
3867
3863
|
constructor(t, e = {}) {
|
|
3868
3864
|
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)
|
|
3869
3865
|
throw new Error("Slider: Missing required elements");
|
|
@@ -3919,11 +3915,11 @@ class Ar {
|
|
|
3919
3915
|
if (!this._isDragging) return;
|
|
3920
3916
|
a.preventDefault();
|
|
3921
3917
|
const o = a.touches ? a.touches[0].clientX : a.clientX, l = a.touches ? a.touches[0].clientY : a.clientY, c = this.track.getBoundingClientRect();
|
|
3922
|
-
let
|
|
3923
|
-
this.vertical ?
|
|
3924
|
-
const
|
|
3925
|
-
let p =
|
|
3926
|
-
if (p = Math.round(p / f) * f, p = Math.max(
|
|
3918
|
+
let d;
|
|
3919
|
+
this.vertical ? d = 1 - (l - c.top) / c.height : d = (o - c.left) / c.width, d = Math.max(0, Math.min(1, d));
|
|
3920
|
+
const h = parseFloat(this.input?.min || 0), u = parseFloat(this.input?.max || 100), f = parseFloat(this.input?.step || 1);
|
|
3921
|
+
let p = h + d * (u - h);
|
|
3922
|
+
if (p = Math.round(p / f) * f, p = Math.max(h, Math.min(u, p)), e === "start" && this.range && this.inputEnd) {
|
|
3927
3923
|
const m = parseFloat(this.inputEnd.value);
|
|
3928
3924
|
p > m && (p = m);
|
|
3929
3925
|
}
|
|
@@ -3931,7 +3927,7 @@ class Ar {
|
|
|
3931
3927
|
const m = parseFloat(this.input.value);
|
|
3932
3928
|
p < m && (p = m);
|
|
3933
3929
|
}
|
|
3934
|
-
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:
|
|
3930
|
+
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 });
|
|
3935
3931
|
}, r = () => {
|
|
3936
3932
|
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", {
|
|
3937
3933
|
detail: { value: this.getValue() },
|
|
@@ -3951,8 +3947,8 @@ class Ar {
|
|
|
3951
3947
|
const a = parseFloat(this.input?.min || 0), o = parseFloat(this.input?.max || 100), l = parseFloat(this.input?.step || 1);
|
|
3952
3948
|
let c = a + r * (o - a);
|
|
3953
3949
|
if (c = Math.round(c / l) * l, this.range) {
|
|
3954
|
-
const
|
|
3955
|
-
u <= f ? this.input && (this.input.value = Math.min(c,
|
|
3950
|
+
const d = parseFloat(this.input?.value || 0), h = parseFloat(this.inputEnd?.value || 0), u = Math.abs(c - d), f = Math.abs(c - h);
|
|
3951
|
+
u <= f ? this.input && (this.input.value = Math.min(c, h)) : this.inputEnd && (this.inputEnd.value = Math.max(c, d));
|
|
3956
3952
|
} else
|
|
3957
3953
|
this.input && (this.input.value = c);
|
|
3958
3954
|
this.updateSlider();
|
|
@@ -4011,26 +4007,26 @@ class Ar {
|
|
|
4011
4007
|
this.disabled = !0, this.element.classList.add("is-disabled");
|
|
4012
4008
|
}
|
|
4013
4009
|
}
|
|
4014
|
-
function
|
|
4010
|
+
function ae(i, t) {
|
|
4015
4011
|
if (!i.__kupolaInitialized)
|
|
4016
4012
|
try {
|
|
4017
|
-
const e = new
|
|
4013
|
+
const e = new Pr(i, t);
|
|
4018
4014
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4019
4015
|
} catch (e) {
|
|
4020
4016
|
console.error("[Slider] Error initializing:", e);
|
|
4021
4017
|
}
|
|
4022
4018
|
}
|
|
4023
|
-
function
|
|
4019
|
+
function $r(i) {
|
|
4024
4020
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4025
4021
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4026
4022
|
}
|
|
4027
|
-
function
|
|
4023
|
+
function Do() {
|
|
4028
4024
|
document.querySelectorAll(".ds-slider").forEach((i) => {
|
|
4029
|
-
|
|
4025
|
+
ae(i);
|
|
4030
4026
|
});
|
|
4031
4027
|
}
|
|
4032
|
-
E.register("slider",
|
|
4033
|
-
class
|
|
4028
|
+
E.register("slider", ae, $r);
|
|
4029
|
+
class Br {
|
|
4034
4030
|
constructor(t, e = {}) {
|
|
4035
4031
|
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 = () => {
|
|
4036
4032
|
this.pauseOnHover && this.stopAutoPlay();
|
|
@@ -4111,22 +4107,22 @@ class Pr {
|
|
|
4111
4107
|
}), 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;
|
|
4112
4108
|
}
|
|
4113
4109
|
}
|
|
4114
|
-
function
|
|
4110
|
+
function oe(i, t) {
|
|
4115
4111
|
if (i.__kupolaInitialized) return;
|
|
4116
|
-
const e = new
|
|
4112
|
+
const e = new Br(i, t);
|
|
4117
4113
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4118
4114
|
}
|
|
4119
|
-
function
|
|
4115
|
+
function Ho(i = document) {
|
|
4120
4116
|
i.querySelectorAll(".ds-carousel").forEach((t) => {
|
|
4121
|
-
|
|
4117
|
+
oe(t);
|
|
4122
4118
|
});
|
|
4123
4119
|
}
|
|
4124
|
-
function
|
|
4120
|
+
function qr(i) {
|
|
4125
4121
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4126
4122
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4127
4123
|
}
|
|
4128
|
-
E.register("carousel",
|
|
4129
|
-
class
|
|
4124
|
+
E.register("carousel", oe, qr);
|
|
4125
|
+
class Or {
|
|
4130
4126
|
constructor(t, e = {}) {
|
|
4131
4127
|
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();
|
|
4132
4128
|
}
|
|
@@ -4163,20 +4159,20 @@ class Br {
|
|
|
4163
4159
|
return this.drawerEl?.classList.contains("is-visible") || !1;
|
|
4164
4160
|
}
|
|
4165
4161
|
}
|
|
4166
|
-
function
|
|
4162
|
+
function ct(i, t) {
|
|
4167
4163
|
if (i.__kupolaInitialized) return;
|
|
4168
|
-
const e = new
|
|
4164
|
+
const e = new Or(i, t);
|
|
4169
4165
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4170
4166
|
}
|
|
4171
|
-
function
|
|
4167
|
+
function Fr(i) {
|
|
4172
4168
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4173
4169
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4174
4170
|
}
|
|
4175
|
-
function
|
|
4171
|
+
function Mo() {
|
|
4176
4172
|
document.querySelectorAll("[data-drawer]").forEach((i) => {
|
|
4177
4173
|
i.addEventListener("click", () => {
|
|
4178
4174
|
const t = i.getAttribute("data-drawer"), e = document.getElementById(t);
|
|
4179
|
-
e && (
|
|
4175
|
+
e && (ct(e, {
|
|
4180
4176
|
placement: i.getAttribute("data-drawer-placement") || "right",
|
|
4181
4177
|
width: i.getAttribute("data-drawer-width"),
|
|
4182
4178
|
height: i.getAttribute("data-drawer-height")
|
|
@@ -4184,10 +4180,10 @@ function Do() {
|
|
|
4184
4180
|
});
|
|
4185
4181
|
}), document.querySelectorAll(".ds-drawer-mask").forEach((i) => {
|
|
4186
4182
|
const t = i.parentElement;
|
|
4187
|
-
t &&
|
|
4183
|
+
t && ct(t);
|
|
4188
4184
|
});
|
|
4189
4185
|
}
|
|
4190
|
-
E.register("drawer",
|
|
4186
|
+
E.register("drawer", ct, Fr);
|
|
4191
4187
|
class $ {
|
|
4192
4188
|
constructor(t, e = {}) {
|
|
4193
4189
|
this.element = t, this.mask = t.querySelector(".ds-modal-mask"), this.modal = t.querySelector(".ds-modal"), this.closeBtn = t.querySelector(".ds-modal__close");
|
|
@@ -4224,7 +4220,7 @@ class $ {
|
|
|
4224
4220
|
}
|
|
4225
4221
|
}
|
|
4226
4222
|
$._openCount = 0;
|
|
4227
|
-
function
|
|
4223
|
+
function le(i = {}) {
|
|
4228
4224
|
const {
|
|
4229
4225
|
title: t = "",
|
|
4230
4226
|
content: e = "",
|
|
@@ -4235,8 +4231,8 @@ function ae(i = {}) {
|
|
|
4235
4231
|
showConfirm: o = !0,
|
|
4236
4232
|
confirmText: l = "OK",
|
|
4237
4233
|
cancelText: c = "Cancel",
|
|
4238
|
-
confirmClass:
|
|
4239
|
-
cancelClass:
|
|
4234
|
+
confirmClass: d = "ds-btn--brand",
|
|
4235
|
+
cancelClass: h = "ds-btn--ghost",
|
|
4240
4236
|
closable: u = !0,
|
|
4241
4237
|
maskClosable: f = !0,
|
|
4242
4238
|
onConfirm: p,
|
|
@@ -4249,8 +4245,8 @@ function ae(i = {}) {
|
|
|
4249
4245
|
C.className = "ds-modal-container";
|
|
4250
4246
|
let S = "";
|
|
4251
4247
|
b !== null && (typeof b == "string" ? S = `<div class="ds-modal__footer">${b}</div>` : (o || a) && (S = `<div class="ds-modal__footer">
|
|
4252
|
-
${a ? `<button class="ds-btn ${v} ${
|
|
4253
|
-
${o ? `<button class="ds-btn ${v} ${
|
|
4248
|
+
${a ? `<button class="ds-btn ${v} ${h}" data-modal-cancel>${c}</button>` : ""}
|
|
4249
|
+
${o ? `<button class="ds-btn ${v} ${d}" data-modal-confirm>${l}</button>` : ""}
|
|
4254
4250
|
</div>`)), C.innerHTML = `
|
|
4255
4251
|
<div class="ds-modal-mask">
|
|
4256
4252
|
<div class="ds-modal${r ? " ds-modal--fullscreen" : ""}" style="${r ? "" : "max-width: " + n}">
|
|
@@ -4291,47 +4287,47 @@ function ae(i = {}) {
|
|
|
4291
4287
|
m && m(), k.close();
|
|
4292
4288
|
};
|
|
4293
4289
|
D && D.addEventListener("click", gt), q && q.addEventListener("click", _t);
|
|
4294
|
-
const
|
|
4290
|
+
const He = () => {
|
|
4295
4291
|
setTimeout(() => {
|
|
4296
4292
|
D && D.removeEventListener("click", gt), q && q.removeEventListener("click", _t), k.destroy(), C.remove(), _ && _(mt);
|
|
4297
4293
|
}, 300);
|
|
4298
|
-
},
|
|
4294
|
+
}, Me = k.close.bind(k);
|
|
4299
4295
|
return k.close = () => {
|
|
4300
|
-
|
|
4296
|
+
Me(), He();
|
|
4301
4297
|
}, k.open(), y && setTimeout(() => y(), 50), k;
|
|
4302
4298
|
}
|
|
4303
|
-
function
|
|
4304
|
-
return typeof i == "string" && (i = { content: i }),
|
|
4299
|
+
function To(i) {
|
|
4300
|
+
return typeof i == "string" && (i = { content: i }), le({
|
|
4305
4301
|
...i,
|
|
4306
4302
|
showCancel: !0,
|
|
4307
4303
|
showConfirm: !0
|
|
4308
4304
|
});
|
|
4309
4305
|
}
|
|
4310
|
-
function
|
|
4311
|
-
return typeof i == "string" && (i = { content: i }),
|
|
4306
|
+
function Io(i) {
|
|
4307
|
+
return typeof i == "string" && (i = { content: i }), le({
|
|
4312
4308
|
...i,
|
|
4313
4309
|
showCancel: !1,
|
|
4314
4310
|
showConfirm: !0
|
|
4315
4311
|
});
|
|
4316
4312
|
}
|
|
4317
|
-
function
|
|
4313
|
+
function ce(i) {
|
|
4318
4314
|
if (i.__kupolaInitialized)
|
|
4319
4315
|
return;
|
|
4320
4316
|
const t = new $(i);
|
|
4321
4317
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
4322
4318
|
}
|
|
4323
|
-
function
|
|
4319
|
+
function Nr(i) {
|
|
4324
4320
|
if (!i.__kupolaInitialized || !i.__kupolaInstance)
|
|
4325
4321
|
return;
|
|
4326
4322
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4327
4323
|
}
|
|
4328
|
-
function
|
|
4324
|
+
function Ao() {
|
|
4329
4325
|
document.querySelectorAll(".ds-modal-container").forEach((i) => {
|
|
4330
|
-
|
|
4326
|
+
ce(i);
|
|
4331
4327
|
});
|
|
4332
4328
|
}
|
|
4333
|
-
E.register("modal",
|
|
4334
|
-
class
|
|
4329
|
+
E.register("modal", ce, Nr);
|
|
4330
|
+
class zo {
|
|
4335
4331
|
static normal(t = {}) {
|
|
4336
4332
|
return this._create({ type: "normal", ...t });
|
|
4337
4333
|
}
|
|
@@ -4382,7 +4378,7 @@ class Io {
|
|
|
4382
4378
|
</div>
|
|
4383
4379
|
</div>
|
|
4384
4380
|
`, document.body.appendChild(l), s && (l.querySelector(".ds-dialog__title").textContent = s), l.querySelector(".ds-dialog__content").textContent = n;
|
|
4385
|
-
const c = l.querySelector(".ds-modal-mask"),
|
|
4381
|
+
const c = l.querySelector(".ds-modal-mask"), d = l.querySelector("[data-dialog-confirm]"), h = l.querySelector("[data-dialog-cancel]"), u = function(_) {
|
|
4386
4382
|
_.key === "Escape" && (a && a(), y());
|
|
4387
4383
|
}, f = function(_) {
|
|
4388
4384
|
_.target === c && (a && a(), y());
|
|
@@ -4391,12 +4387,12 @@ class Io {
|
|
|
4391
4387
|
}, m = function() {
|
|
4392
4388
|
a && a(), y();
|
|
4393
4389
|
}, y = () => {
|
|
4394
|
-
c.classList.remove("is-visible"), document.body.style.overflow = "", document.removeEventListener("keydown", u), c.removeEventListener("click", f),
|
|
4390
|
+
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);
|
|
4395
4391
|
};
|
|
4396
|
-
return c.classList.add("is-visible"), document.body.style.overflow = "hidden",
|
|
4392
|
+
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 };
|
|
4397
4393
|
}
|
|
4398
4394
|
}
|
|
4399
|
-
const
|
|
4395
|
+
const Po = {
|
|
4400
4396
|
normal: function(i) {
|
|
4401
4397
|
this.show({ ...i, type: "normal" });
|
|
4402
4398
|
},
|
|
@@ -4413,7 +4409,7 @@ const Ao = {
|
|
|
4413
4409
|
this.show({ ...i, type: "info" });
|
|
4414
4410
|
},
|
|
4415
4411
|
show: function(i) {
|
|
4416
|
-
const t =
|
|
4412
|
+
const t = vr(), { title: e, message: s, type: n = "normal", duration: r = t.duration, position: a = t.position } = i, o = document.createElement("div");
|
|
4417
4413
|
o.className = `ds-notification__item ds-notification__item--${n}`;
|
|
4418
4414
|
const l = {
|
|
4419
4415
|
normal: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',
|
|
@@ -4435,8 +4431,8 @@ const Ao = {
|
|
|
4435
4431
|
let c = document.querySelector(".ds-notification");
|
|
4436
4432
|
if (!c) {
|
|
4437
4433
|
c = document.createElement("div"), c.className = `ds-notification ds-notification--${a}`;
|
|
4438
|
-
const
|
|
4439
|
-
c.style.zIndex =
|
|
4434
|
+
const d = W().notification;
|
|
4435
|
+
c.style.zIndex = d, c.style.transform = "translateZ(0)", document.body.appendChild(c);
|
|
4440
4436
|
}
|
|
4441
4437
|
c.appendChild(o), setTimeout(() => {
|
|
4442
4438
|
o.classList.add("is-visible");
|
|
@@ -4447,9 +4443,9 @@ const Ao = {
|
|
|
4447
4443
|
}, r);
|
|
4448
4444
|
}
|
|
4449
4445
|
};
|
|
4450
|
-
function
|
|
4446
|
+
function $o() {
|
|
4451
4447
|
}
|
|
4452
|
-
const
|
|
4448
|
+
const Bo = {
|
|
4453
4449
|
normal: function(i, t = {}) {
|
|
4454
4450
|
this.show(i, "normal", t);
|
|
4455
4451
|
},
|
|
@@ -4466,7 +4462,7 @@ const Po = {
|
|
|
4466
4462
|
this.show(i, "info", t);
|
|
4467
4463
|
},
|
|
4468
4464
|
show: function(i, t = "normal", e = {}) {
|
|
4469
|
-
const s =
|
|
4465
|
+
const s = yr(), { duration: n = s.duration, position: r = s.position } = e, a = s.maxCount || 5, o = document.createElement("div");
|
|
4470
4466
|
o.className = `ds-message__item ds-message__item--${t}`;
|
|
4471
4467
|
const l = {
|
|
4472
4468
|
normal: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',
|
|
@@ -4482,13 +4478,13 @@ const Po = {
|
|
|
4482
4478
|
let c = document.querySelector(".ds-message");
|
|
4483
4479
|
if (!c) {
|
|
4484
4480
|
c = document.createElement("div"), c.className = `ds-message ds-message--${r}`;
|
|
4485
|
-
const
|
|
4486
|
-
c.style.zIndex =
|
|
4481
|
+
const h = W().message;
|
|
4482
|
+
c.style.zIndex = h, c.style.transform = "translateZ(0)", document.body.appendChild(c);
|
|
4487
4483
|
}
|
|
4488
|
-
const
|
|
4489
|
-
if (
|
|
4490
|
-
const
|
|
4491
|
-
|
|
4484
|
+
const d = c.querySelectorAll(".ds-message__item");
|
|
4485
|
+
if (d.length >= a) {
|
|
4486
|
+
const h = d[0];
|
|
4487
|
+
h.classList.remove("is-visible"), h.classList.add("is-exiting"), setTimeout(() => h.remove(), 300);
|
|
4492
4488
|
}
|
|
4493
4489
|
c.appendChild(o), setTimeout(() => {
|
|
4494
4490
|
o.classList.add("is-visible");
|
|
@@ -4497,12 +4493,12 @@ const Po = {
|
|
|
4497
4493
|
}, n);
|
|
4498
4494
|
}
|
|
4499
4495
|
};
|
|
4500
|
-
function
|
|
4496
|
+
function qo() {
|
|
4501
4497
|
}
|
|
4502
|
-
function
|
|
4498
|
+
function Ct(i) {
|
|
4503
4499
|
return i ? i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
4504
4500
|
}
|
|
4505
|
-
class
|
|
4501
|
+
class Rr {
|
|
4506
4502
|
constructor(t) {
|
|
4507
4503
|
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();
|
|
4508
4504
|
}
|
|
@@ -4558,7 +4554,7 @@ class Fr {
|
|
|
4558
4554
|
<div class="ds-fileupload__icon" style="width: 24px; height: 24px; border-radius: 4px;">
|
|
4559
4555
|
${s}
|
|
4560
4556
|
</div>
|
|
4561
|
-
<span class="ds-fileupload__filename">${this.truncateFilename(
|
|
4557
|
+
<span class="ds-fileupload__filename">${this.truncateFilename(Ct(t.name))}</span>
|
|
4562
4558
|
<span class="ds-fileupload__size">${this.formatSize(t.size)}</span>
|
|
4563
4559
|
<button class="ds-fileupload__remove" type="button" aria-label="Remove file">
|
|
4564
4560
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -4610,7 +4606,7 @@ class Fr {
|
|
|
4610
4606
|
e.onload = (s) => {
|
|
4611
4607
|
const n = document.createElement("div");
|
|
4612
4608
|
n.className = "ds-fileupload__preview-item", n.innerHTML = `
|
|
4613
|
-
<img src="${s.target.result}" alt="${
|
|
4609
|
+
<img src="${s.target.result}" alt="${Ct(t.name)}">
|
|
4614
4610
|
<button class="ds-fileupload__preview-remove" type="button" aria-label="Remove preview">
|
|
4615
4611
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
4616
4612
|
<path d="M18 6L6 18"/>
|
|
@@ -4660,22 +4656,22 @@ class Fr {
|
|
|
4660
4656
|
}), this._listeners = null, this.files = [], this.dropzone = null, this.input = null, this.list = null, this.progress = null, this.preview = null, this.element = null;
|
|
4661
4657
|
}
|
|
4662
4658
|
}
|
|
4663
|
-
function
|
|
4659
|
+
function he(i) {
|
|
4664
4660
|
if (i.__kupolaInitialized) return;
|
|
4665
|
-
const t = new
|
|
4661
|
+
const t = new Rr(i);
|
|
4666
4662
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
4667
4663
|
}
|
|
4668
|
-
function
|
|
4664
|
+
function Vr(i) {
|
|
4669
4665
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4670
4666
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4671
4667
|
}
|
|
4672
|
-
function
|
|
4668
|
+
function Oo() {
|
|
4673
4669
|
document.querySelectorAll(".ds-fileupload").forEach((i) => {
|
|
4674
|
-
|
|
4670
|
+
he(i);
|
|
4675
4671
|
});
|
|
4676
4672
|
}
|
|
4677
|
-
E.register("fileupload",
|
|
4678
|
-
class
|
|
4673
|
+
E.register("fileupload", he, Vr);
|
|
4674
|
+
class Kr {
|
|
4679
4675
|
constructor(t, e = {}) {
|
|
4680
4676
|
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();
|
|
4681
4677
|
}
|
|
@@ -4692,8 +4688,8 @@ class Rr {
|
|
|
4692
4688
|
const l = () => {
|
|
4693
4689
|
if (a) return;
|
|
4694
4690
|
const c = n.classList.contains("is-active");
|
|
4695
|
-
this.accordion && !c && this.headers.forEach((
|
|
4696
|
-
|
|
4691
|
+
this.accordion && !c && this.headers.forEach((d, h) => {
|
|
4692
|
+
h !== s && d.item.classList.contains("is-active") && this._collapseItem(d);
|
|
4697
4693
|
}), c ? this._collapseItem({ item: n, content: r }) : this._expandItem({ item: n, content: r }), this.element.dispatchEvent(new CustomEvent("kupola:collapse-toggle", {
|
|
4698
4694
|
detail: { index: s, expanded: !c, item: n },
|
|
4699
4695
|
bubbles: !0
|
|
@@ -4757,22 +4753,22 @@ class Rr {
|
|
|
4757
4753
|
this.headers[t] && (this.headers[t].isDisabled = !1, this.headers[t].item.classList.remove("is-disabled"));
|
|
4758
4754
|
}
|
|
4759
4755
|
}
|
|
4760
|
-
function
|
|
4756
|
+
function de(i, t) {
|
|
4761
4757
|
if (i.__kupolaInitialized) return;
|
|
4762
|
-
const e = new
|
|
4758
|
+
const e = new Kr(i, t);
|
|
4763
4759
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4764
4760
|
}
|
|
4765
|
-
function
|
|
4761
|
+
function Wr(i) {
|
|
4766
4762
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4767
4763
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4768
4764
|
}
|
|
4769
|
-
function
|
|
4765
|
+
function Fo() {
|
|
4770
4766
|
document.querySelectorAll(".ds-collapse").forEach((i) => {
|
|
4771
|
-
|
|
4767
|
+
de(i);
|
|
4772
4768
|
});
|
|
4773
4769
|
}
|
|
4774
|
-
E.register("collapse",
|
|
4775
|
-
class
|
|
4770
|
+
E.register("collapse", de, Wr);
|
|
4771
|
+
class Ur {
|
|
4776
4772
|
constructor(t, e = {}) {
|
|
4777
4773
|
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);
|
|
4778
4774
|
}
|
|
@@ -4796,9 +4792,9 @@ class Kr {
|
|
|
4796
4792
|
}
|
|
4797
4793
|
_colorStringToHSB(t) {
|
|
4798
4794
|
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);
|
|
4799
|
-
let c = 0,
|
|
4795
|
+
let c = 0, d = 0, h = o;
|
|
4800
4796
|
const u = o - l;
|
|
4801
|
-
if (
|
|
4797
|
+
if (d = o === 0 ? 0 : u / o, o !== l)
|
|
4802
4798
|
switch (o) {
|
|
4803
4799
|
case s:
|
|
4804
4800
|
c = ((n - r) / u + (n < r ? 6 : 0)) / 6;
|
|
@@ -4810,17 +4806,17 @@ class Kr {
|
|
|
4810
4806
|
c = ((s - n) / u + 4) / 6;
|
|
4811
4807
|
break;
|
|
4812
4808
|
}
|
|
4813
|
-
this.hue = Math.round(c * 360), this.saturation = Math.round(
|
|
4809
|
+
this.hue = Math.round(c * 360), this.saturation = Math.round(d * 100), this.brightness = Math.round(h * 100), this.alpha = Math.round(a * 100);
|
|
4814
4810
|
}
|
|
4815
4811
|
_HSBToColorString(t, e, s, n = 1) {
|
|
4816
4812
|
e /= 100, s /= 100, n /= 100;
|
|
4817
|
-
const r = (
|
|
4813
|
+
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);
|
|
4818
4814
|
if (this.mode === "rgb")
|
|
4819
4815
|
return n < 1 ? `rgba(${o}, ${l}, ${c}, ${n.toFixed(2)})` : `rgb(${o}, ${l}, ${c})`;
|
|
4820
4816
|
if (this.mode === "hsl")
|
|
4821
4817
|
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)}%)`;
|
|
4822
|
-
const
|
|
4823
|
-
return n < 1 ?
|
|
4818
|
+
const d = `#${o.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}${c.toString(16).padStart(2, "0")}`;
|
|
4819
|
+
return n < 1 ? d + Math.round(n * 255).toString(16).padStart(2, "0") : d;
|
|
4824
4820
|
}
|
|
4825
4821
|
_renderPreviousColors() {
|
|
4826
4822
|
const t = this.panel.querySelector(".ds-color-picker__previous");
|
|
@@ -4937,20 +4933,20 @@ class Kr {
|
|
|
4937
4933
|
}), 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;
|
|
4938
4934
|
}
|
|
4939
4935
|
}
|
|
4940
|
-
function
|
|
4941
|
-
const e = new
|
|
4936
|
+
function ue(i, t) {
|
|
4937
|
+
const e = new Ur(i, t);
|
|
4942
4938
|
e.init(), i._kupolaColorPicker = e;
|
|
4943
4939
|
}
|
|
4944
|
-
function
|
|
4940
|
+
function No(i = document) {
|
|
4945
4941
|
i.querySelectorAll(".ds-color-picker").forEach((t) => {
|
|
4946
|
-
|
|
4942
|
+
ue(t);
|
|
4947
4943
|
});
|
|
4948
4944
|
}
|
|
4949
|
-
function
|
|
4945
|
+
function Yr(i) {
|
|
4950
4946
|
i._kupolaColorPicker && (i._kupolaColorPicker.destroy(), i._kupolaColorPicker = null);
|
|
4951
4947
|
}
|
|
4952
|
-
E.register("color-picker",
|
|
4953
|
-
class
|
|
4948
|
+
E.register("color-picker", ue, Yr);
|
|
4949
|
+
class Xr {
|
|
4954
4950
|
constructor(t, e = {}) {
|
|
4955
4951
|
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)
|
|
4956
4952
|
throw new Error("Calendar: Missing required elements");
|
|
@@ -5030,22 +5026,22 @@ class Ur {
|
|
|
5030
5026
|
for (let o = 1; o <= n; o++) {
|
|
5031
5027
|
const l = new Date(t, e, o), c = document.createElement("button");
|
|
5032
5028
|
c.className = "ds-calendar__day", c.textContent = o;
|
|
5033
|
-
const
|
|
5034
|
-
|
|
5035
|
-
const
|
|
5036
|
-
if (
|
|
5029
|
+
const d = this._formatDate(l);
|
|
5030
|
+
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"));
|
|
5031
|
+
const h = this._getEventsForDate(l);
|
|
5032
|
+
if (h.length > 0) {
|
|
5037
5033
|
c.classList.add("has-events");
|
|
5038
5034
|
const f = document.createElement("span");
|
|
5039
|
-
f.className = "ds-calendar__day-event", f.style.backgroundColor =
|
|
5035
|
+
f.className = "ds-calendar__day-event", f.style.backgroundColor = h[0].color || "#007bff", c.appendChild(f);
|
|
5040
5036
|
}
|
|
5041
5037
|
const u = () => {
|
|
5042
5038
|
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", {
|
|
5043
5039
|
detail: { start: this.rangeStart, end: this.rangeEnd },
|
|
5044
5040
|
bubbles: !0
|
|
5045
|
-
}))) : (this.selectedDate = l, this.onSelect && this.onSelect({ date: l, dateStr:
|
|
5046
|
-
detail: { date: l, dateStr:
|
|
5041
|
+
}))) : (this.selectedDate = l, this.onSelect && this.onSelect({ date: l, dateStr: d }), this.element.dispatchEvent(new CustomEvent("kupola:calendar-select", {
|
|
5042
|
+
detail: { date: l, dateStr: d },
|
|
5047
5043
|
bubbles: !0
|
|
5048
|
-
}))),
|
|
5044
|
+
}))), h.forEach((f) => {
|
|
5049
5045
|
this.onEventClick && this.onEventClick(f, l);
|
|
5050
5046
|
}), this.render();
|
|
5051
5047
|
};
|
|
@@ -5057,31 +5053,31 @@ class Ur {
|
|
|
5057
5053
|
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 = "";
|
|
5058
5054
|
const o = /* @__PURE__ */ new Date(), l = this._formatDate(o);
|
|
5059
5055
|
for (let c = 0; c < 7; c++) {
|
|
5060
|
-
const
|
|
5061
|
-
|
|
5062
|
-
const
|
|
5063
|
-
|
|
5056
|
+
const d = new Date(n);
|
|
5057
|
+
d.setDate(n.getDate() + c);
|
|
5058
|
+
const h = document.createElement("button");
|
|
5059
|
+
h.className = "ds-calendar__day ds-calendar__day--week";
|
|
5064
5060
|
const u = document.createElement("span");
|
|
5065
|
-
u.className = "ds-calendar__day-header", u.textContent = this.i18n.shortWeekdays[
|
|
5061
|
+
u.className = "ds-calendar__day-header", u.textContent = this.i18n.shortWeekdays[d.getDay()], h.appendChild(u);
|
|
5066
5062
|
const f = document.createElement("span");
|
|
5067
|
-
f.className = "ds-calendar__day-number", f.textContent =
|
|
5068
|
-
const p = this._formatDate(
|
|
5069
|
-
p === l &&
|
|
5070
|
-
const m = this._getEventsForDate(
|
|
5063
|
+
f.className = "ds-calendar__day-number", f.textContent = d.getDate(), h.appendChild(f);
|
|
5064
|
+
const p = this._formatDate(d);
|
|
5065
|
+
p === l && h.classList.add("is-today"), this._isSameDay(d, this.selectedDate) && h.classList.add("is-selected");
|
|
5066
|
+
const m = this._getEventsForDate(d);
|
|
5071
5067
|
if (m.length > 0) {
|
|
5072
5068
|
const _ = document.createElement("span");
|
|
5073
5069
|
_.className = "ds-calendar__day-events", m.slice(0, 3).forEach((b) => {
|
|
5074
5070
|
const x = document.createElement("span");
|
|
5075
5071
|
x.className = "ds-calendar__day-event", x.style.backgroundColor = b.color || "#007bff", _.appendChild(x);
|
|
5076
|
-
}),
|
|
5072
|
+
}), h.appendChild(_);
|
|
5077
5073
|
}
|
|
5078
5074
|
const y = () => {
|
|
5079
|
-
this.element.querySelectorAll(".ds-calendar__day").forEach((_) => _.classList.remove("is-selected")),
|
|
5080
|
-
detail: { date:
|
|
5075
|
+
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", {
|
|
5076
|
+
detail: { date: d, dateStr: p },
|
|
5081
5077
|
bubbles: !0
|
|
5082
5078
|
})), this.render();
|
|
5083
5079
|
};
|
|
5084
|
-
|
|
5080
|
+
h.addEventListener("click", y), this._listeners.push({ el: h, event: "click", handler: y }), this.daysEl.appendChild(h);
|
|
5085
5081
|
}
|
|
5086
5082
|
}
|
|
5087
5083
|
destroy() {
|
|
@@ -5147,26 +5143,26 @@ class Ur {
|
|
|
5147
5143
|
this.isRangeMode = !this.isRangeMode, this.rangeStart = null, this.rangeEnd = null, this.render(), this._emitChange();
|
|
5148
5144
|
}
|
|
5149
5145
|
}
|
|
5150
|
-
function
|
|
5146
|
+
function pe(i, t) {
|
|
5151
5147
|
if (!i.__kupolaInitialized)
|
|
5152
5148
|
try {
|
|
5153
|
-
const e = new
|
|
5149
|
+
const e = new Xr(i, t);
|
|
5154
5150
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
5155
5151
|
} catch (e) {
|
|
5156
5152
|
console.error("[Calendar] Error initializing:", e);
|
|
5157
5153
|
}
|
|
5158
5154
|
}
|
|
5159
|
-
function
|
|
5155
|
+
function jr(i) {
|
|
5160
5156
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5161
5157
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5162
5158
|
}
|
|
5163
|
-
function
|
|
5159
|
+
function Ro() {
|
|
5164
5160
|
document.querySelectorAll(".ds-calendar").forEach((i) => {
|
|
5165
|
-
|
|
5161
|
+
pe(i);
|
|
5166
5162
|
});
|
|
5167
5163
|
}
|
|
5168
|
-
E.register("calendar",
|
|
5169
|
-
class
|
|
5164
|
+
E.register("calendar", pe, jr);
|
|
5165
|
+
class Jr {
|
|
5170
5166
|
constructor(t, e = {}) {
|
|
5171
5167
|
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();
|
|
5172
5168
|
}
|
|
@@ -5312,22 +5308,22 @@ class Xr {
|
|
|
5312
5308
|
}), this._listeners = null, this.input = null, this.element = null;
|
|
5313
5309
|
}
|
|
5314
5310
|
}
|
|
5315
|
-
function
|
|
5311
|
+
function fe(i, t) {
|
|
5316
5312
|
if (i.__kupolaInitialized) return;
|
|
5317
|
-
const e = new
|
|
5313
|
+
const e = new Jr(i, t);
|
|
5318
5314
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
5319
5315
|
}
|
|
5320
|
-
function
|
|
5316
|
+
function Zr(i) {
|
|
5321
5317
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5322
5318
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5323
5319
|
}
|
|
5324
|
-
function
|
|
5320
|
+
function Vo() {
|
|
5325
5321
|
document.querySelectorAll(".ds-dynamic-tags").forEach((i) => {
|
|
5326
|
-
|
|
5322
|
+
fe(i);
|
|
5327
5323
|
});
|
|
5328
5324
|
}
|
|
5329
|
-
E.register("dynamic-tags",
|
|
5330
|
-
class
|
|
5325
|
+
E.register("dynamic-tags", fe, Zr);
|
|
5326
|
+
class me {
|
|
5331
5327
|
constructor(t = {}) {
|
|
5332
5328
|
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();
|
|
5333
5329
|
}
|
|
@@ -5519,18 +5515,18 @@ class pe {
|
|
|
5519
5515
|
}
|
|
5520
5516
|
}
|
|
5521
5517
|
let V = null;
|
|
5522
|
-
function
|
|
5523
|
-
V || (V = new
|
|
5518
|
+
function Ko() {
|
|
5519
|
+
V || (V = new me()), document.querySelectorAll("[data-image-preview]").forEach((i) => {
|
|
5524
5520
|
i.addEventListener("click", () => {
|
|
5525
5521
|
const t = JSON.parse(i.getAttribute("data-image-preview")), e = parseInt(i.getAttribute("data-image-index")) || 0;
|
|
5526
5522
|
V.show(t, e);
|
|
5527
5523
|
});
|
|
5528
5524
|
});
|
|
5529
5525
|
}
|
|
5530
|
-
function
|
|
5531
|
-
V || (V = new
|
|
5526
|
+
function Wo(i, t = 0) {
|
|
5527
|
+
V || (V = new me()), V.show(i, t);
|
|
5532
5528
|
}
|
|
5533
|
-
class
|
|
5529
|
+
class Gr {
|
|
5534
5530
|
constructor(t, e = {}) {
|
|
5535
5531
|
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();
|
|
5536
5532
|
}
|
|
@@ -5660,22 +5656,22 @@ class Jr {
|
|
|
5660
5656
|
}), this._listeners = [], this.closeBtn = null, this.checkbox = null, this.editInput = null, this.element = null;
|
|
5661
5657
|
}
|
|
5662
5658
|
}
|
|
5663
|
-
function
|
|
5659
|
+
function ge(i, t) {
|
|
5664
5660
|
if (i.__kupolaInitialized) return;
|
|
5665
|
-
const e = new
|
|
5661
|
+
const e = new Gr(i, t);
|
|
5666
5662
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
5667
5663
|
}
|
|
5668
|
-
function
|
|
5664
|
+
function Qr(i) {
|
|
5669
5665
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5670
5666
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5671
5667
|
}
|
|
5672
|
-
function
|
|
5668
|
+
function Uo() {
|
|
5673
5669
|
document.querySelectorAll(".ds-tag").forEach((i) => {
|
|
5674
|
-
|
|
5670
|
+
ge(i);
|
|
5675
5671
|
});
|
|
5676
5672
|
}
|
|
5677
|
-
E.register("tag",
|
|
5678
|
-
class
|
|
5673
|
+
E.register("tag", ge, Qr);
|
|
5674
|
+
class ta {
|
|
5679
5675
|
constructor(t) {
|
|
5680
5676
|
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();
|
|
5681
5677
|
}
|
|
@@ -5690,8 +5686,8 @@ class Gr {
|
|
|
5690
5686
|
if (!this.valueElement) return;
|
|
5691
5687
|
const t = this.valueElement.textContent, e = t.match(/[\d.,]+/);
|
|
5692
5688
|
if (!e) return;
|
|
5693
|
-
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 = (
|
|
5694
|
-
const
|
|
5689
|
+
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) => {
|
|
5690
|
+
const h = d - o, u = Math.min(h / a, 1), f = 1 - Math.pow(1 - u, 3), p = l + (s - l) * f;
|
|
5695
5691
|
let m;
|
|
5696
5692
|
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);
|
|
5697
5693
|
};
|
|
@@ -5709,18 +5705,18 @@ class Gr {
|
|
|
5709
5705
|
this.valueElement.textContent = t;
|
|
5710
5706
|
return;
|
|
5711
5707
|
}
|
|
5712
|
-
const a = n.substring(0, r.index), o = n.substring(r.index + r[0].length), l = parseFloat(r[0].replace(",", "")), c = parseFloat(t),
|
|
5713
|
-
const f = u -
|
|
5708
|
+
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) => {
|
|
5709
|
+
const f = u - d, p = Math.min(f / s, 1), m = 1 - Math.pow(1 - p, 3), y = l + (c - l) * m;
|
|
5714
5710
|
let _;
|
|
5715
|
-
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(
|
|
5711
|
+
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);
|
|
5716
5712
|
};
|
|
5717
|
-
requestAnimationFrame(
|
|
5713
|
+
requestAnimationFrame(h);
|
|
5718
5714
|
}
|
|
5719
5715
|
updateProgress(t, e = {}) {
|
|
5720
5716
|
if (!this.progressFill) return;
|
|
5721
5717
|
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) => {
|
|
5722
|
-
const c = l - a,
|
|
5723
|
-
this.progressFill.style.width = u + "%",
|
|
5718
|
+
const c = l - a, d = Math.min(c / s, 1), h = 1 - Math.pow(1 - d, 3), u = n + (r - n) * h;
|
|
5719
|
+
this.progressFill.style.width = u + "%", d < 1 && requestAnimationFrame(o);
|
|
5724
5720
|
};
|
|
5725
5721
|
requestAnimationFrame(o);
|
|
5726
5722
|
}
|
|
@@ -5735,22 +5731,22 @@ class Gr {
|
|
|
5735
5731
|
this._observer && (this._observer.disconnect(), this._observer = null), this.animated = !1, this.valueElement = null, this.progressFill = null, this.element = null;
|
|
5736
5732
|
}
|
|
5737
5733
|
}
|
|
5738
|
-
function
|
|
5734
|
+
function _e(i) {
|
|
5739
5735
|
if (i.__kupolaInitialized) return;
|
|
5740
|
-
const t = new
|
|
5736
|
+
const t = new ta(i);
|
|
5741
5737
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
5742
5738
|
}
|
|
5743
|
-
function
|
|
5739
|
+
function ea(i) {
|
|
5744
5740
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5745
5741
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5746
5742
|
}
|
|
5747
|
-
function
|
|
5743
|
+
function Yo() {
|
|
5748
5744
|
document.querySelectorAll(".ds-statcard").forEach((i) => {
|
|
5749
|
-
|
|
5745
|
+
_e(i);
|
|
5750
5746
|
});
|
|
5751
5747
|
}
|
|
5752
|
-
E.register("statcard",
|
|
5753
|
-
class
|
|
5748
|
+
E.register("statcard", _e, ea);
|
|
5749
|
+
class sa {
|
|
5754
5750
|
constructor(t, e = {}) {
|
|
5755
5751
|
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();
|
|
5756
5752
|
}
|
|
@@ -5821,15 +5817,15 @@ class ta {
|
|
|
5821
5817
|
s.push(new Date(_)), (_.getDay() === 6 || _.getTime() === this.endDate.getTime()) && (e.push(s), s = []);
|
|
5822
5818
|
const a = e.length, o = this.element.classList.contains("ds-heatmap--compact") ? 12 : 16, l = a * o, c = document.createElement("div");
|
|
5823
5819
|
c.className = "ds-heatmap__container";
|
|
5824
|
-
const h = document.createElement("div");
|
|
5825
|
-
h.className = "ds-heatmap__labels-and-grid";
|
|
5826
5820
|
const d = document.createElement("div");
|
|
5827
|
-
d.className = "ds-
|
|
5821
|
+
d.className = "ds-heatmap__labels-and-grid";
|
|
5822
|
+
const h = document.createElement("div");
|
|
5823
|
+
h.className = "ds-heatmap__weekday-labels";
|
|
5828
5824
|
const u = this.element.classList.contains("ds-heatmap--compact") ? 12 : 16;
|
|
5829
5825
|
this.getWeekdayLabels().forEach((_) => {
|
|
5830
5826
|
const b = document.createElement("div");
|
|
5831
|
-
b.className = "ds-heatmap__weekday-label", b.textContent = _, b.style.height = u + "px", b.style.lineHeight = u + "px",
|
|
5832
|
-
}),
|
|
5827
|
+
b.className = "ds-heatmap__weekday-label", b.textContent = _, b.style.height = u + "px", b.style.lineHeight = u + "px", h.appendChild(b);
|
|
5828
|
+
}), d.appendChild(h);
|
|
5833
5829
|
const f = document.createElement("div");
|
|
5834
5830
|
f.className = "ds-heatmap__grid-container";
|
|
5835
5831
|
const p = document.createElement("div");
|
|
@@ -5862,7 +5858,7 @@ class ta {
|
|
|
5862
5858
|
), b.appendChild(k);
|
|
5863
5859
|
}
|
|
5864
5860
|
}), y.appendChild(b);
|
|
5865
|
-
}), f.appendChild(y),
|
|
5861
|
+
}), f.appendChild(y), d.appendChild(f), c.appendChild(d), t.appendChild(c), this.renderLegend(t);
|
|
5866
5862
|
}
|
|
5867
5863
|
renderLegend(t) {
|
|
5868
5864
|
const e = document.createElement("div");
|
|
@@ -5905,7 +5901,7 @@ class ta {
|
|
|
5905
5901
|
}), this._listeners = null, this.tooltip && this.tooltip.parentNode && this.tooltip.parentNode.removeChild(this.tooltip), this.tooltip = null, this.data = [], this.element = null;
|
|
5906
5902
|
}
|
|
5907
5903
|
}
|
|
5908
|
-
function
|
|
5904
|
+
function ye(i) {
|
|
5909
5905
|
if (i.__kupolaInitialized) return;
|
|
5910
5906
|
const t = i.getAttribute("data-heatmap-data");
|
|
5911
5907
|
let e = [];
|
|
@@ -5913,27 +5909,27 @@ function ge(i) {
|
|
|
5913
5909
|
try {
|
|
5914
5910
|
e = JSON.parse(t);
|
|
5915
5911
|
} catch {
|
|
5916
|
-
e =
|
|
5912
|
+
e = St();
|
|
5917
5913
|
}
|
|
5918
5914
|
else
|
|
5919
|
-
e =
|
|
5920
|
-
const s = new
|
|
5915
|
+
e = St();
|
|
5916
|
+
const s = new sa(i, {
|
|
5921
5917
|
data: e,
|
|
5922
5918
|
onCellClick: (n) => {
|
|
5923
5919
|
}
|
|
5924
5920
|
});
|
|
5925
5921
|
i.__kupolaInstance = s, i.__kupolaInitialized = !0;
|
|
5926
5922
|
}
|
|
5927
|
-
function
|
|
5923
|
+
function ia(i) {
|
|
5928
5924
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
5929
5925
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
5930
5926
|
}
|
|
5931
|
-
function
|
|
5927
|
+
function Xo() {
|
|
5932
5928
|
document.querySelectorAll(".ds-heatmap").forEach((i) => {
|
|
5933
|
-
|
|
5929
|
+
ye(i);
|
|
5934
5930
|
});
|
|
5935
5931
|
}
|
|
5936
|
-
function
|
|
5932
|
+
function St() {
|
|
5937
5933
|
const i = [], t = /* @__PURE__ */ new Date(), e = /* @__PURE__ */ new Date();
|
|
5938
5934
|
e.setFullYear(e.getFullYear() - 1);
|
|
5939
5935
|
for (let s = new Date(e); s <= t; s.setDate(s.getDate() + 1)) {
|
|
@@ -5945,8 +5941,8 @@ function kt() {
|
|
|
5945
5941
|
}
|
|
5946
5942
|
return i;
|
|
5947
5943
|
}
|
|
5948
|
-
E.register("heatmap",
|
|
5949
|
-
class
|
|
5944
|
+
E.register("heatmap", ye, ia);
|
|
5945
|
+
class na {
|
|
5950
5946
|
constructor(t, e = {}) {
|
|
5951
5947
|
this.element = t, this.tooltipEl = null, this.options = e;
|
|
5952
5948
|
const s = j(), n = s.tooltip?.delay !== void 0 ? s.tooltip.delay : 300;
|
|
@@ -6047,20 +6043,20 @@ class sa {
|
|
|
6047
6043
|
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);
|
|
6048
6044
|
}
|
|
6049
6045
|
}
|
|
6050
|
-
function
|
|
6051
|
-
const e = new
|
|
6046
|
+
function ve(i, t) {
|
|
6047
|
+
const e = new na(i, t);
|
|
6052
6048
|
e.init(), i._kupolaTooltip = e;
|
|
6053
6049
|
}
|
|
6054
|
-
function
|
|
6050
|
+
function jo(i = document) {
|
|
6055
6051
|
i.querySelectorAll("[data-tooltip]").forEach((t) => {
|
|
6056
|
-
|
|
6052
|
+
ve(t);
|
|
6057
6053
|
});
|
|
6058
6054
|
}
|
|
6059
|
-
function
|
|
6055
|
+
function ra(i) {
|
|
6060
6056
|
i._kupolaTooltip && (i._kupolaTooltip.destroy(), i._kupolaTooltip = null);
|
|
6061
6057
|
}
|
|
6062
|
-
E.register("tooltip",
|
|
6063
|
-
class
|
|
6058
|
+
E.register("tooltip", ve, ra);
|
|
6059
|
+
class aa {
|
|
6064
6060
|
constructor() {
|
|
6065
6061
|
this.validators = {
|
|
6066
6062
|
required: this.validateRequired,
|
|
@@ -6088,11 +6084,11 @@ class na {
|
|
|
6088
6084
|
let r = !1;
|
|
6089
6085
|
return n.forEach((a) => {
|
|
6090
6086
|
const o = a.name || a.id, l = this.parseRules(a.getAttribute("data-validate")), c = this.getValue(a);
|
|
6091
|
-
for (const [
|
|
6092
|
-
if ((this.customValidators[
|
|
6087
|
+
for (const [d, h] of Object.entries(l))
|
|
6088
|
+
if ((this.customValidators[d] || this.validators[d])?.(c, h))
|
|
6093
6089
|
this.clearError(a);
|
|
6094
6090
|
else {
|
|
6095
|
-
s[o] = this.getErrorMessage(
|
|
6091
|
+
s[o] = this.getErrorMessage(d, h, a), this.showError(a, s[o]), r = !0;
|
|
6096
6092
|
break;
|
|
6097
6093
|
}
|
|
6098
6094
|
}), this.formStates[e] = {
|
|
@@ -6135,8 +6131,8 @@ class na {
|
|
|
6135
6131
|
await this.validateInputAsync(l) || (a = !0);
|
|
6136
6132
|
const o = {};
|
|
6137
6133
|
return r.forEach((l) => {
|
|
6138
|
-
const c = l.name || l.id,
|
|
6139
|
-
|
|
6134
|
+
const c = l.name || l.id, d = l.parentElement.querySelector(".ds-input__error");
|
|
6135
|
+
d && (o[c] = d.textContent);
|
|
6140
6136
|
}), this.formStates[s] = {
|
|
6141
6137
|
valid: !a,
|
|
6142
6138
|
errors: o,
|
|
@@ -6286,7 +6282,7 @@ class na {
|
|
|
6286
6282
|
}[t] || "Invalid input";
|
|
6287
6283
|
}
|
|
6288
6284
|
}
|
|
6289
|
-
const P = new
|
|
6285
|
+
const P = new aa();
|
|
6290
6286
|
window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized = !0, document.addEventListener("DOMContentLoaded", () => {
|
|
6291
6287
|
document.querySelectorAll("form[data-validation]").forEach((i) => {
|
|
6292
6288
|
i.addEventListener("submit", async (t) => {
|
|
@@ -6316,7 +6312,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
6316
6312
|
r && r.focus();
|
|
6317
6313
|
}
|
|
6318
6314
|
}), i.querySelectorAll("[data-validate]").forEach((t) => {
|
|
6319
|
-
const e =
|
|
6315
|
+
const e = br(), s = e.trigger || "blur", n = () => {
|
|
6320
6316
|
e.showErrors && setTimeout(() => {
|
|
6321
6317
|
const l = document.activeElement;
|
|
6322
6318
|
if (l && l.closest(".ds-select"))
|
|
@@ -6326,11 +6322,11 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
6326
6322
|
};
|
|
6327
6323
|
(s === "blur" || s === "both") && t.addEventListener("blur", n);
|
|
6328
6324
|
const r = (l, c) => {
|
|
6329
|
-
let
|
|
6330
|
-
return (...
|
|
6331
|
-
clearTimeout(
|
|
6325
|
+
let d;
|
|
6326
|
+
return (...h) => {
|
|
6327
|
+
clearTimeout(d), d = setTimeout(() => l(...h), c);
|
|
6332
6328
|
};
|
|
6333
|
-
}, a =
|
|
6329
|
+
}, a = _r(), o = r(() => {
|
|
6334
6330
|
if (!e.showErrors)
|
|
6335
6331
|
return;
|
|
6336
6332
|
const l = P.getValue(t);
|
|
@@ -6342,7 +6338,7 @@ window.__kupolaValidationInitialized || (window.__kupolaValidationInitialized =
|
|
|
6342
6338
|
});
|
|
6343
6339
|
});
|
|
6344
6340
|
}));
|
|
6345
|
-
class
|
|
6341
|
+
class oa {
|
|
6346
6342
|
constructor(t, e = {}) {
|
|
6347
6343
|
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();
|
|
6348
6344
|
}
|
|
@@ -6466,9 +6462,9 @@ class ra {
|
|
|
6466
6462
|
const c = t ? this.itemWidth : this.itemHeight;
|
|
6467
6463
|
l = n * c;
|
|
6468
6464
|
}
|
|
6469
|
-
a.forEach((c,
|
|
6470
|
-
const
|
|
6471
|
-
o += this._buildItemHtml(c,
|
|
6465
|
+
a.forEach((c, d) => {
|
|
6466
|
+
const h = n + d, u = c[this.keyField] || h, f = this.selectedKey === u, p = this.getItemSize(h);
|
|
6467
|
+
o += this._buildItemHtml(c, h, u, f, p, l, t), l += p;
|
|
6472
6468
|
}), this.container.innerHTML = o, this.useDynamicHeight && this.updateDynamicHeights(), this.container.querySelectorAll(".ds-virtual-list__item").forEach((c) => {
|
|
6473
6469
|
c.addEventListener("click", () => this.handleItemClick(c));
|
|
6474
6470
|
});
|
|
@@ -6581,7 +6577,7 @@ class ra {
|
|
|
6581
6577
|
}), 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;
|
|
6582
6578
|
}
|
|
6583
6579
|
}
|
|
6584
|
-
function
|
|
6580
|
+
function Lt(i = 1e3) {
|
|
6585
6581
|
const t = [], e = ["Document", "Image", "Video", "Folder", "Archive", "Spreadsheet", "Presentation", "Code"];
|
|
6586
6582
|
for (let s = 1; s <= i; s++) {
|
|
6587
6583
|
const n = Math.floor(Math.random() * e.length), r = Math.floor(Math.random() * 1e4);
|
|
@@ -6594,7 +6590,7 @@ function Ct(i = 1e3) {
|
|
|
6594
6590
|
}
|
|
6595
6591
|
return t;
|
|
6596
6592
|
}
|
|
6597
|
-
function
|
|
6593
|
+
function la(i) {
|
|
6598
6594
|
if (i.__kupolaInitialized) return;
|
|
6599
6595
|
const t = i.getAttribute("data-virtual-list");
|
|
6600
6596
|
let e = [];
|
|
@@ -6602,11 +6598,11 @@ function aa(i) {
|
|
|
6602
6598
|
try {
|
|
6603
6599
|
e = JSON.parse(t);
|
|
6604
6600
|
} catch {
|
|
6605
|
-
e =
|
|
6601
|
+
e = Lt(1e3);
|
|
6606
6602
|
}
|
|
6607
6603
|
else
|
|
6608
|
-
e =
|
|
6609
|
-
const s = new
|
|
6604
|
+
e = Lt(1e3);
|
|
6605
|
+
const s = new oa(i, {
|
|
6610
6606
|
data: e,
|
|
6611
6607
|
onItemClick: (n) => {
|
|
6612
6608
|
},
|
|
@@ -6615,12 +6611,12 @@ function aa(i) {
|
|
|
6615
6611
|
});
|
|
6616
6612
|
i.__kupolaInstance = s, i.__kupolaInitialized = !0;
|
|
6617
6613
|
}
|
|
6618
|
-
function
|
|
6614
|
+
function ca(i) {
|
|
6619
6615
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6620
6616
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6621
6617
|
}
|
|
6622
|
-
E.register("virtual-list",
|
|
6623
|
-
const
|
|
6618
|
+
E.register("virtual-list", la, ca);
|
|
6619
|
+
const ha = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="miter"', be = {
|
|
6624
6620
|
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"/>',
|
|
6625
6621
|
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"/>',
|
|
6626
6622
|
mouse: '<rect x="6" y="2" width="12" height="20" rx="6"/><line x1="12" y1="6" x2="12" y2="11"/>',
|
|
@@ -6730,19 +6726,19 @@ const la = 'xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0
|
|
|
6730
6726
|
code: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
|
|
6731
6727
|
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"/>'
|
|
6732
6728
|
};
|
|
6733
|
-
function
|
|
6734
|
-
const s =
|
|
6735
|
-
return s ? `<svg ${
|
|
6729
|
+
function xe(i, t = 16, e = "0 0 24 24") {
|
|
6730
|
+
const s = be[i];
|
|
6731
|
+
return s ? `<svg ${ha.replace('width="16"', `width="${t}"`).replace('height="16"', `height="${t}"`).replace('viewBox="0 0 24 24"', `viewBox="${e}"`)}>${s}</svg>` : "";
|
|
6736
6732
|
}
|
|
6737
|
-
function
|
|
6733
|
+
function ht(i = document) {
|
|
6738
6734
|
i.querySelectorAll("[data-icon]").forEach((t) => {
|
|
6739
6735
|
const e = t.getAttribute("data-icon"), s = +t.getAttribute("data-size") || 16, n = t.getAttribute("data-viewbox") || "0 0 24 24";
|
|
6740
|
-
t.innerHTML =
|
|
6736
|
+
t.innerHTML = xe(e, s, n), t.classList.add("icon");
|
|
6741
6737
|
});
|
|
6742
6738
|
}
|
|
6743
|
-
const
|
|
6744
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
6745
|
-
class
|
|
6739
|
+
const Jo = { svg: xe, render: ht, PATHS: be };
|
|
6740
|
+
typeof document < "u" && (document.readyState !== "loading" ? ht() : document.addEventListener("DOMContentLoaded", () => ht()));
|
|
6741
|
+
class da {
|
|
6746
6742
|
constructor(t) {
|
|
6747
6743
|
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();
|
|
6748
6744
|
}
|
|
@@ -6794,22 +6790,22 @@ class ca {
|
|
|
6794
6790
|
this.stop(), this.hoursEl = null, this.minutesEl = null, this.secondsEl = null, this.element = null;
|
|
6795
6791
|
}
|
|
6796
6792
|
}
|
|
6797
|
-
function
|
|
6793
|
+
function Ee(i) {
|
|
6798
6794
|
if (i.__kupolaInitialized) return;
|
|
6799
|
-
const t = new
|
|
6795
|
+
const t = new da(i);
|
|
6800
6796
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
6801
6797
|
}
|
|
6802
|
-
function
|
|
6798
|
+
function ua(i) {
|
|
6803
6799
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6804
6800
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6805
6801
|
}
|
|
6806
|
-
function
|
|
6802
|
+
function Zo() {
|
|
6807
6803
|
document.querySelectorAll(".ds-countdown").forEach((t) => {
|
|
6808
|
-
|
|
6804
|
+
Ee(t);
|
|
6809
6805
|
});
|
|
6810
6806
|
}
|
|
6811
|
-
E.register("countdown",
|
|
6812
|
-
class
|
|
6807
|
+
E.register("countdown", Ee, ua);
|
|
6808
|
+
class pa {
|
|
6813
6809
|
constructor(t) {
|
|
6814
6810
|
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)
|
|
6815
6811
|
throw new Error("NumberInput: Missing required elements");
|
|
@@ -6860,26 +6856,26 @@ class da {
|
|
|
6860
6856
|
}), this._listeners = null, this.minusBtn = null, this.plusBtn = null, this.inputEl = null, this.element = null;
|
|
6861
6857
|
}
|
|
6862
6858
|
}
|
|
6863
|
-
function
|
|
6859
|
+
function we(i) {
|
|
6864
6860
|
if (!i.__kupolaInitialized)
|
|
6865
6861
|
try {
|
|
6866
|
-
const t = new
|
|
6862
|
+
const t = new pa(i);
|
|
6867
6863
|
i.__kupolaInstance = t, i.__kupolaInitialized = !0;
|
|
6868
6864
|
} catch (t) {
|
|
6869
6865
|
console.error("[NumberInput] Error initializing:", t);
|
|
6870
6866
|
}
|
|
6871
6867
|
}
|
|
6872
|
-
function
|
|
6868
|
+
function fa(i) {
|
|
6873
6869
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
6874
6870
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
6875
6871
|
}
|
|
6876
|
-
function
|
|
6872
|
+
function Go() {
|
|
6877
6873
|
document.querySelectorAll(".ds-number-input").forEach((i) => {
|
|
6878
|
-
|
|
6874
|
+
we(i);
|
|
6879
6875
|
});
|
|
6880
6876
|
}
|
|
6881
|
-
E.register("number-input",
|
|
6882
|
-
class
|
|
6877
|
+
E.register("number-input", we, fa);
|
|
6878
|
+
class ma {
|
|
6883
6879
|
constructor(t) {
|
|
6884
6880
|
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 = {
|
|
6885
6881
|
tolerance: 6,
|
|
@@ -6939,11 +6935,11 @@ class pa {
|
|
|
6939
6935
|
const n = Date.now() - this.startTime;
|
|
6940
6936
|
let r = 0, a = 0;
|
|
6941
6937
|
if (this.trackData.length > 0) {
|
|
6942
|
-
const l = this.trackData[this.trackData.length - 1], c = this.currentX - l.x,
|
|
6943
|
-
if (
|
|
6944
|
-
const
|
|
6938
|
+
const l = this.trackData[this.trackData.length - 1], c = this.currentX - l.x, d = n - l.t;
|
|
6939
|
+
if (d > 0 && (r = c / d, this.trackData.length > 1)) {
|
|
6940
|
+
const h = this.trackData[this.trackData.length - 2], u = l.t - h.t;
|
|
6945
6941
|
if (u > 0) {
|
|
6946
|
-
const f = (l.x -
|
|
6942
|
+
const f = (l.x - h.x) / u;
|
|
6947
6943
|
a = r - f;
|
|
6948
6944
|
}
|
|
6949
6945
|
}
|
|
@@ -6967,9 +6963,9 @@ class pa {
|
|
|
6967
6963
|
if (s > this.config.tolerance)
|
|
6968
6964
|
return { passed: !1, msg: "验证失败" };
|
|
6969
6965
|
const n = [];
|
|
6970
|
-
for (let
|
|
6971
|
-
const
|
|
6972
|
-
u > 0 && u < 500 && n.push(
|
|
6966
|
+
for (let d = 1; d < this.trackData.length; d++) {
|
|
6967
|
+
const h = this.trackData[d].x - this.trackData[d - 1].x, u = this.trackData[d].t - this.trackData[d - 1].t;
|
|
6968
|
+
u > 0 && u < 500 && n.push(h / u);
|
|
6973
6969
|
}
|
|
6974
6970
|
if (n.length < 3)
|
|
6975
6971
|
return { passed: !1, msg: "验证失败" };
|
|
@@ -6977,8 +6973,8 @@ class pa {
|
|
|
6977
6973
|
if (r - a < this.config.minSpeedDelta)
|
|
6978
6974
|
return { passed: !1, msg: "验证失败" };
|
|
6979
6975
|
let o = !1;
|
|
6980
|
-
for (const
|
|
6981
|
-
if (Math.abs(
|
|
6976
|
+
for (const d of this.trackData)
|
|
6977
|
+
if (Math.abs(d.y) > 2) {
|
|
6982
6978
|
o = !0;
|
|
6983
6979
|
break;
|
|
6984
6980
|
}
|
|
@@ -6990,9 +6986,9 @@ class pa {
|
|
|
6990
6986
|
if (l > this.config.maxDuration)
|
|
6991
6987
|
return { passed: !1, msg: "验证失败" };
|
|
6992
6988
|
const c = [];
|
|
6993
|
-
for (let
|
|
6994
|
-
c.push(Math.abs(n[
|
|
6995
|
-
return c.length > 2 && c.reduce((
|
|
6989
|
+
for (let d = 1; d < n.length; d++)
|
|
6990
|
+
c.push(Math.abs(n[d] - n[d - 1]));
|
|
6991
|
+
return c.length > 2 && c.reduce((h, u) => h + u, 0) / c.length < 0.05 ? { passed: !1, msg: "验证失败" } : { passed: !0, msg: "验证通过" };
|
|
6996
6992
|
}
|
|
6997
6993
|
verifyCaptcha() {
|
|
6998
6994
|
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(() => {
|
|
@@ -7022,22 +7018,22 @@ class pa {
|
|
|
7022
7018
|
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);
|
|
7023
7019
|
}
|
|
7024
7020
|
}
|
|
7025
|
-
function
|
|
7021
|
+
function ga() {
|
|
7026
7022
|
document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
|
|
7027
|
-
const t = new
|
|
7023
|
+
const t = new ma(i);
|
|
7028
7024
|
t.init(), i._kupolaSlideCaptcha = t;
|
|
7029
7025
|
});
|
|
7030
7026
|
}
|
|
7031
|
-
function
|
|
7027
|
+
function _a(i) {
|
|
7032
7028
|
i._kupolaSlideCaptcha && (i._kupolaSlideCaptcha.destroy(), i._kupolaSlideCaptcha = null);
|
|
7033
7029
|
}
|
|
7034
|
-
function
|
|
7030
|
+
function ya() {
|
|
7035
7031
|
document.querySelectorAll(".ds-slider-captcha").forEach((i) => {
|
|
7036
|
-
|
|
7032
|
+
_a(i);
|
|
7037
7033
|
});
|
|
7038
7034
|
}
|
|
7039
|
-
E.register("slide-captcha",
|
|
7040
|
-
class
|
|
7035
|
+
E.register("slide-captcha", ga, ya);
|
|
7036
|
+
class va {
|
|
7041
7037
|
constructor(t) {
|
|
7042
7038
|
this.form = t, this.fields = [], this.validators = {}, this.errorMessages = {}, this._submitHandler = null, this._fieldHandlers = /* @__PURE__ */ new Map(), this._init();
|
|
7043
7039
|
}
|
|
@@ -7177,23 +7173,23 @@ class _a {
|
|
|
7177
7173
|
}), this._submitHandler = null, this._fieldHandlers.clear(), this._fieldHandlers = null, this.fields = null, this.validators = null, this.errorMessages = null, this.form = null;
|
|
7178
7174
|
}
|
|
7179
7175
|
}
|
|
7180
|
-
function
|
|
7176
|
+
function ba(i) {
|
|
7181
7177
|
const t = document.querySelectorAll(i || ".ds-form");
|
|
7182
7178
|
return t.forEach((e) => {
|
|
7183
7179
|
if (e._kupolaForm) return;
|
|
7184
|
-
const s = new
|
|
7180
|
+
const s = new va(e);
|
|
7185
7181
|
e._kupolaForm = s;
|
|
7186
7182
|
}), t.length;
|
|
7187
7183
|
}
|
|
7188
|
-
function
|
|
7184
|
+
function Qo(i) {
|
|
7189
7185
|
return i._kupolaForm;
|
|
7190
7186
|
}
|
|
7191
|
-
function
|
|
7187
|
+
function tl(i) {
|
|
7192
7188
|
const t = i._kupolaForm;
|
|
7193
7189
|
return t ? t.validate() : !1;
|
|
7194
7190
|
}
|
|
7195
|
-
E.register("form-validation",
|
|
7196
|
-
class
|
|
7191
|
+
E.register("form-validation", ba);
|
|
7192
|
+
class xa {
|
|
7197
7193
|
constructor() {
|
|
7198
7194
|
this._queue = /* @__PURE__ */ new Set(), this._scheduled = !1, this._flushDepth = 0, this._maxDepth = 10;
|
|
7199
7195
|
}
|
|
@@ -7220,8 +7216,8 @@ class va {
|
|
|
7220
7216
|
this._flushDepth--;
|
|
7221
7217
|
}
|
|
7222
7218
|
}
|
|
7223
|
-
const
|
|
7224
|
-
class
|
|
7219
|
+
const Ea = new xa();
|
|
7220
|
+
class wa {
|
|
7225
7221
|
constructor(t, e) {
|
|
7226
7222
|
this.data = t, this.createdAt = Date.now(), this.ttl = e;
|
|
7227
7223
|
}
|
|
@@ -7232,7 +7228,7 @@ class xa {
|
|
|
7232
7228
|
return !this.isFresh;
|
|
7233
7229
|
}
|
|
7234
7230
|
}
|
|
7235
|
-
class
|
|
7231
|
+
class ke {
|
|
7236
7232
|
constructor() {
|
|
7237
7233
|
this._store = /* @__PURE__ */ new Map();
|
|
7238
7234
|
}
|
|
@@ -7241,7 +7237,7 @@ class Ee {
|
|
|
7241
7237
|
return e || null;
|
|
7242
7238
|
}
|
|
7243
7239
|
set(t, e, s = 6e4) {
|
|
7244
|
-
this._store.set(t, new
|
|
7240
|
+
this._store.set(t, new wa(e, s));
|
|
7245
7241
|
}
|
|
7246
7242
|
has(t) {
|
|
7247
7243
|
return this._store.has(t);
|
|
@@ -7264,15 +7260,15 @@ class N extends Error {
|
|
|
7264
7260
|
}
|
|
7265
7261
|
}
|
|
7266
7262
|
let rt = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
|
|
7267
|
-
function
|
|
7263
|
+
function el(i) {
|
|
7268
7264
|
if (!i || typeof i.fetch != "function")
|
|
7269
7265
|
throw new TypeError("[Kupola] configureHttpClient: client must provide a fetch function");
|
|
7270
7266
|
rt = i.fetch.bind(i);
|
|
7271
7267
|
}
|
|
7272
|
-
function
|
|
7268
|
+
function sl() {
|
|
7273
7269
|
return rt;
|
|
7274
7270
|
}
|
|
7275
|
-
function
|
|
7271
|
+
function il() {
|
|
7276
7272
|
rt = typeof globalThis < "u" && globalThis.fetch ? globalThis.fetch.bind(globalThis) : typeof window < "u" && window.fetch ? window.fetch.bind(window) : null;
|
|
7277
7273
|
}
|
|
7278
7274
|
class U {
|
|
@@ -7286,7 +7282,7 @@ class U {
|
|
|
7286
7282
|
};
|
|
7287
7283
|
}
|
|
7288
7284
|
notify() {
|
|
7289
|
-
|
|
7285
|
+
Ea.schedule(() => {
|
|
7290
7286
|
this.subscribers.forEach((t) => {
|
|
7291
7287
|
try {
|
|
7292
7288
|
t();
|
|
@@ -7334,13 +7330,13 @@ class U {
|
|
|
7334
7330
|
this.subscribers = [], this.pending = null;
|
|
7335
7331
|
}
|
|
7336
7332
|
}
|
|
7337
|
-
class
|
|
7333
|
+
class ka extends U {
|
|
7338
7334
|
constructor(t, e) {
|
|
7339
7335
|
super(t, e), this.method = t.method || "GET", this.headers = t.headers || {}, this.queryParams = t.query || {};
|
|
7340
7336
|
}
|
|
7341
7337
|
async fetch(t) {
|
|
7342
7338
|
let e = this.config.source;
|
|
7343
|
-
const s =
|
|
7339
|
+
const s = ut("http");
|
|
7344
7340
|
s?.baseURL && !e.startsWith("http://") && !e.startsWith("https://") && (e = s.baseURL + e.replace(/^\//, ""));
|
|
7345
7341
|
for (const u in t)
|
|
7346
7342
|
e = e.replace(`:${u}`, encodeURIComponent(t[u]));
|
|
@@ -7358,13 +7354,13 @@ class Ea extends U {
|
|
|
7358
7354
|
const o = rt;
|
|
7359
7355
|
if (!o)
|
|
7360
7356
|
throw new N("No HTTP client available. Use configureHttpClient() to set one.", "NO_HTTP_CLIENT");
|
|
7361
|
-
const l = await o(e, a), c = typeof l.ok == "boolean" ? l.ok : l.status >= 200 && l.status < 300,
|
|
7357
|
+
const l = await o(e, a), c = typeof l.ok == "boolean" ? l.ok : l.status >= 200 && l.status < 300, d = typeof l.status == "number" ? l.status : 0;
|
|
7362
7358
|
if (!c)
|
|
7363
|
-
throw new N(`HTTP ${
|
|
7359
|
+
throw new N(`HTTP ${d}`, "HTTP_ERROR");
|
|
7364
7360
|
return typeof l.json == "function" ? await l.json() : l.data !== void 0 ? l.data : l;
|
|
7365
7361
|
}
|
|
7366
7362
|
}
|
|
7367
|
-
class
|
|
7363
|
+
class Ce extends U {
|
|
7368
7364
|
constructor(t, e) {
|
|
7369
7365
|
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) => {
|
|
7370
7366
|
s.key === this.storageKey && (this.cache.delete(this.cacheKey), this.notify());
|
|
@@ -7391,7 +7387,7 @@ class we extends U {
|
|
|
7391
7387
|
super.destroy(), this._storageHandler && window.removeEventListener("storage", this._storageHandler);
|
|
7392
7388
|
}
|
|
7393
7389
|
}
|
|
7394
|
-
class
|
|
7390
|
+
class Ca extends U {
|
|
7395
7391
|
constructor(t, e) {
|
|
7396
7392
|
super(t, e), this.paramName = t.source.replace("route:", "");
|
|
7397
7393
|
}
|
|
@@ -7401,17 +7397,17 @@ class wa extends U {
|
|
|
7401
7397
|
return e ? decodeURIComponent(e[1]) : new URLSearchParams(location.search).get(this.paramName) || "";
|
|
7402
7398
|
}
|
|
7403
7399
|
}
|
|
7404
|
-
class
|
|
7400
|
+
class Sa extends U {
|
|
7405
7401
|
async fetch(t) {
|
|
7406
7402
|
return await this.config.source(t);
|
|
7407
7403
|
}
|
|
7408
7404
|
}
|
|
7409
|
-
class
|
|
7405
|
+
class La extends U {
|
|
7410
7406
|
async fetch() {
|
|
7411
7407
|
return this.config.source;
|
|
7412
7408
|
}
|
|
7413
7409
|
}
|
|
7414
|
-
class
|
|
7410
|
+
class Se extends U {
|
|
7415
7411
|
constructor(t, e) {
|
|
7416
7412
|
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;
|
|
7417
7413
|
}
|
|
@@ -7451,34 +7447,34 @@ class ke extends U {
|
|
|
7451
7447
|
this._destroyed = !0, super.destroy(), this.ws && (this.ws.onmessage = null, this.ws.onclose = null, this.ws.close(), this.ws = null);
|
|
7452
7448
|
}
|
|
7453
7449
|
}
|
|
7454
|
-
function
|
|
7450
|
+
function Le(i, t) {
|
|
7455
7451
|
const e = i.source;
|
|
7456
|
-
return typeof e == "function" ? new
|
|
7452
|
+
return typeof e == "function" ? new Sa(i, t) : typeof e == "string" && (e.startsWith("ws://") || e.startsWith("wss://")) ? new Se(i, t) : typeof e == "string" && (e.startsWith("/") || e.startsWith("http")) ? new ka(i, t) : typeof e == "string" && e.startsWith("localStorage:") ? new Ce(i, t) : typeof e == "string" && e.startsWith("route:") ? new Ca(i, t) : new La(i, t);
|
|
7457
7453
|
}
|
|
7458
|
-
function
|
|
7459
|
-
const e = {}, s = new
|
|
7454
|
+
function nl(i, t) {
|
|
7455
|
+
const e = {}, s = new ke(), n = [];
|
|
7460
7456
|
for (const r in t) {
|
|
7461
7457
|
let p = function() {
|
|
7462
|
-
return
|
|
7458
|
+
return Dt(i);
|
|
7463
7459
|
}, a = t[r];
|
|
7464
7460
|
typeof a == "string" && (a = { source: a });
|
|
7465
7461
|
const o = {
|
|
7466
7462
|
...a,
|
|
7467
|
-
cacheKey: a.cacheKey || `${r}-${JSON.stringify(
|
|
7468
|
-
}, l =
|
|
7463
|
+
cacheKey: a.cacheKey || `${r}-${JSON.stringify(Dt(i))}`
|
|
7464
|
+
}, l = Le(o, s), c = I(null), d = I(!0), h = I(null), u = I(null);
|
|
7469
7465
|
let f = 0;
|
|
7470
7466
|
async function m() {
|
|
7471
7467
|
const b = ++f;
|
|
7472
|
-
|
|
7468
|
+
d.value = !0, h.value = null;
|
|
7473
7469
|
try {
|
|
7474
7470
|
const x = await l.getValue(p());
|
|
7475
7471
|
if (b !== f) return;
|
|
7476
7472
|
c.value = x, u.value = Date.now();
|
|
7477
7473
|
} catch (x) {
|
|
7478
7474
|
if (b !== f) return;
|
|
7479
|
-
|
|
7475
|
+
h.value = x.message || "Unknown error";
|
|
7480
7476
|
} finally {
|
|
7481
|
-
b === f && (
|
|
7477
|
+
b === f && (d.value = !1);
|
|
7482
7478
|
}
|
|
7483
7479
|
}
|
|
7484
7480
|
m();
|
|
@@ -7498,19 +7494,19 @@ function sl(i, t) {
|
|
|
7498
7494
|
}
|
|
7499
7495
|
}), e[r] = {
|
|
7500
7496
|
data: c,
|
|
7501
|
-
loading:
|
|
7502
|
-
error:
|
|
7497
|
+
loading: d,
|
|
7498
|
+
error: h,
|
|
7503
7499
|
lastUpdated: u,
|
|
7504
7500
|
refresh() {
|
|
7505
7501
|
return l.invalidate(), m();
|
|
7506
7502
|
},
|
|
7507
7503
|
// For StorageSource
|
|
7508
7504
|
setValue(b) {
|
|
7509
|
-
l instanceof
|
|
7505
|
+
l instanceof Ce && (l.setValue(b), c.value = b);
|
|
7510
7506
|
},
|
|
7511
7507
|
// For WebSocketSource
|
|
7512
7508
|
send(b) {
|
|
7513
|
-
l instanceof
|
|
7509
|
+
l instanceof Se && l.send(b);
|
|
7514
7510
|
},
|
|
7515
7511
|
_source: l
|
|
7516
7512
|
};
|
|
@@ -7522,8 +7518,8 @@ function sl(i, t) {
|
|
|
7522
7518
|
}
|
|
7523
7519
|
}, window.__kupolaDepInstances || (window.__kupolaDepInstances = []), window.__kupolaDepInstances.push(e), e;
|
|
7524
7520
|
}
|
|
7525
|
-
function
|
|
7526
|
-
const t = new
|
|
7521
|
+
function rl(i) {
|
|
7522
|
+
const t = new ke(), e = Le(i, t), s = I(null), n = I(!0), r = I(null);
|
|
7527
7523
|
let a = 0;
|
|
7528
7524
|
async function o() {
|
|
7529
7525
|
const l = ++a;
|
|
@@ -7551,7 +7547,7 @@ function il(i) {
|
|
|
7551
7547
|
}
|
|
7552
7548
|
};
|
|
7553
7549
|
}
|
|
7554
|
-
function
|
|
7550
|
+
function Dt(i) {
|
|
7555
7551
|
const t = {};
|
|
7556
7552
|
for (const e in i) {
|
|
7557
7553
|
const s = i[e];
|
|
@@ -7559,9 +7555,9 @@ function St(i) {
|
|
|
7559
7555
|
}
|
|
7560
7556
|
return t;
|
|
7561
7557
|
}
|
|
7562
|
-
function
|
|
7558
|
+
function al() {
|
|
7563
7559
|
}
|
|
7564
|
-
class
|
|
7560
|
+
class Da {
|
|
7565
7561
|
constructor(t, e = {}) {
|
|
7566
7562
|
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 = I(null), this.sortOrder = I(null), this.currentPage = I(1), this.filterText = I(""), this.selectedKeys = I([]), this._init();
|
|
7567
7563
|
}
|
|
@@ -7715,8 +7711,8 @@ class Sa {
|
|
|
7715
7711
|
s.forEach((a) => n.set(`${a.row}-${a.col}`, a));
|
|
7716
7712
|
const r = /* @__PURE__ */ new Set();
|
|
7717
7713
|
t.forEach((a, o) => {
|
|
7718
|
-
const l = a[this.rowKey] ?? o, c = this._selectedKeys.has(l),
|
|
7719
|
-
if (e.appendChild(
|
|
7714
|
+
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);
|
|
7715
|
+
if (e.appendChild(h), this.expandable && d) {
|
|
7720
7716
|
const u = document.createElement("tr");
|
|
7721
7717
|
u.className = "kupola-table-expand-row";
|
|
7722
7718
|
const f = document.createElement("td"), p = this.columns.length + (this.selection ? 1 : 0) + 1;
|
|
@@ -7732,8 +7728,8 @@ class Sa {
|
|
|
7732
7728
|
const o = document.createElement("tr");
|
|
7733
7729
|
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) => {
|
|
7734
7730
|
if (r.has(`${e}-${c}`)) return;
|
|
7735
|
-
const
|
|
7736
|
-
o.appendChild(
|
|
7731
|
+
const d = this._renderDataCell(t, e, s, l, c, r, a);
|
|
7732
|
+
o.appendChild(d);
|
|
7737
7733
|
}), this.onRowClick && (o.style.cursor = "pointer", o.addEventListener("click", (l) => {
|
|
7738
7734
|
l.target.closest(".kupola-table-expand-btn, .kupola-table-tree-toggle, input, button") || this.onRowClick(t, e, l);
|
|
7739
7735
|
})), o;
|
|
@@ -7758,20 +7754,20 @@ class Sa {
|
|
|
7758
7754
|
const c = o.get(`${e}-${r}`);
|
|
7759
7755
|
if (c) {
|
|
7760
7756
|
c.rowSpan > 1 && (l.rowSpan = c.rowSpan), c.colSpan > 1 && (l.colSpan = c.colSpan);
|
|
7761
|
-
for (let
|
|
7757
|
+
for (let h = 0; h < (c.rowSpan || 1); h++)
|
|
7762
7758
|
for (let u = 0; u < (c.colSpan || 1); u++)
|
|
7763
|
-
|
|
7759
|
+
h === 0 && u === 0 || a.add(`${e + h}-${r + u}`);
|
|
7764
7760
|
}
|
|
7765
7761
|
this.tree && r === 0 && t._level > 0 && this._renderTreeIndent(l, t);
|
|
7766
|
-
const
|
|
7767
|
-
if (
|
|
7762
|
+
const d = this._editingCell && this._editingCell.rowKey === s && this._editingCell.colKey === n.key;
|
|
7763
|
+
if (d)
|
|
7768
7764
|
l.appendChild(this._renderEditCell(n, t));
|
|
7769
7765
|
else if (n.render) {
|
|
7770
|
-
const
|
|
7771
|
-
typeof
|
|
7766
|
+
const h = n.render(t[n.key], t, e);
|
|
7767
|
+
typeof h == "string" ? l.innerHTML = h : h instanceof HTMLElement && l.appendChild(h);
|
|
7772
7768
|
} else
|
|
7773
7769
|
l.textContent = t[n.key] ?? "";
|
|
7774
|
-
return this.editable && !
|
|
7770
|
+
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;
|
|
7775
7771
|
}
|
|
7776
7772
|
_renderTreeIndent(t, e) {
|
|
7777
7773
|
const s = document.createElement("span");
|
|
@@ -7809,16 +7805,16 @@ class Sa {
|
|
|
7809
7805
|
if (!this._virtualData) return;
|
|
7810
7806
|
const { data: t, rowHeight: e, overscan: s, tbody: n, topSpacer: r } = this._virtualData, a = this.element.querySelector(".kupola-table-container");
|
|
7811
7807
|
if (!a) return;
|
|
7812
|
-
const o = a.scrollTop, l = a.clientHeight, c = Math.max(0, Math.floor(o / e) - s),
|
|
7808
|
+
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);
|
|
7813
7809
|
n.querySelectorAll(".kupola-table-virtual-row").forEach((p) => p.remove());
|
|
7814
7810
|
const u = document.createDocumentFragment();
|
|
7815
|
-
for (let p = c; p <
|
|
7811
|
+
for (let p = c; p < d; p++) {
|
|
7816
7812
|
const m = t[p], y = m[this.rowKey] ?? p, _ = this._renderDataRow(m, p, y, this._selectedKeys.has(y), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map());
|
|
7817
7813
|
_.classList.add("kupola-table-virtual-row"), _.style.height = e + "px", u.appendChild(_);
|
|
7818
7814
|
}
|
|
7819
7815
|
r.style.height = c * e + "px";
|
|
7820
7816
|
const f = n.querySelector(".kupola-table-virtual-spacer-bottom");
|
|
7821
|
-
f && (f.style.height = (t.length -
|
|
7817
|
+
f && (f.style.height = (t.length - d) * e + "px"), r.after(u);
|
|
7822
7818
|
}
|
|
7823
7819
|
// ================================================================
|
|
7824
7820
|
// INLINE EDIT
|
|
@@ -7830,8 +7826,8 @@ class Sa {
|
|
|
7830
7826
|
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) {
|
|
7831
7827
|
const l = document.createElement("select");
|
|
7832
7828
|
l.className = "ds-input kupola-table-edit-input", t.editOptions.forEach((c) => {
|
|
7833
|
-
const
|
|
7834
|
-
|
|
7829
|
+
const d = document.createElement("option");
|
|
7830
|
+
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);
|
|
7835
7831
|
}), l.addEventListener("change", () => {
|
|
7836
7832
|
this._editBuffer[t.key] = l.value;
|
|
7837
7833
|
}), s.appendChild(l);
|
|
@@ -7921,11 +7917,11 @@ class Sa {
|
|
|
7921
7917
|
this.element.querySelectorAll(".kupola-table-resize-handle").forEach((e) => {
|
|
7922
7918
|
e.addEventListener("mousedown", (s) => {
|
|
7923
7919
|
s.preventDefault();
|
|
7924
|
-
const n = e.getAttribute("data-col-key"), r = e.parentElement, a = s.clientX, o = r.offsetWidth, l = (
|
|
7925
|
-
const
|
|
7926
|
-
r.style.width =
|
|
7920
|
+
const n = e.getAttribute("data-col-key"), r = e.parentElement, a = s.clientX, o = r.offsetWidth, l = (d) => {
|
|
7921
|
+
const h = Math.max(50, o + (d.clientX - a));
|
|
7922
|
+
r.style.width = h + "px";
|
|
7927
7923
|
const u = this.columns.find((f) => f.key === n);
|
|
7928
|
-
u && (u.width =
|
|
7924
|
+
u && (u.width = h), this.onColumnResize && this.onColumnResize(n, h);
|
|
7929
7925
|
}, c = () => {
|
|
7930
7926
|
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", c);
|
|
7931
7927
|
};
|
|
@@ -8069,9 +8065,9 @@ class Sa {
|
|
|
8069
8065
|
// ================================================================
|
|
8070
8066
|
exportCSV(t = "export.csv") {
|
|
8071
8067
|
const e = this.getProcessedData(), s = this.columns.map((c) => c.title || c.key), n = e.map(
|
|
8072
|
-
(c) => this.columns.map((
|
|
8073
|
-
let
|
|
8074
|
-
return
|
|
8068
|
+
(c) => this.columns.map((d) => {
|
|
8069
|
+
let h = c[d.key];
|
|
8070
|
+
return h == null && (h = ""), h = String(h).replace(/"/g, '""'), `"${h}"`;
|
|
8075
8071
|
}).join(",")
|
|
8076
8072
|
), r = "\uFEFF" + [s.join(","), ...n].join(`
|
|
8077
8073
|
`), a = new Blob([r], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(a), l = document.createElement("a");
|
|
@@ -8101,10 +8097,10 @@ class Sa {
|
|
|
8101
8097
|
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 = {};
|
|
8102
8098
|
}
|
|
8103
8099
|
}
|
|
8104
|
-
function
|
|
8105
|
-
return new
|
|
8100
|
+
function De(i, t) {
|
|
8101
|
+
return new Da(i, t);
|
|
8106
8102
|
}
|
|
8107
|
-
function
|
|
8103
|
+
function ol() {
|
|
8108
8104
|
document.querySelectorAll("[data-kupola-table]").forEach((i) => {
|
|
8109
8105
|
const t = i.getAttribute("data-kupola-table");
|
|
8110
8106
|
let e = {};
|
|
@@ -8113,11 +8109,11 @@ function rl() {
|
|
|
8113
8109
|
e = JSON.parse(t);
|
|
8114
8110
|
} catch {
|
|
8115
8111
|
}
|
|
8116
|
-
|
|
8112
|
+
De(i, e);
|
|
8117
8113
|
});
|
|
8118
8114
|
}
|
|
8119
|
-
E.register("table",
|
|
8120
|
-
class
|
|
8115
|
+
E.register("table", De);
|
|
8116
|
+
class Ha {
|
|
8121
8117
|
constructor(t, e = {}) {
|
|
8122
8118
|
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 = I(this._current), this.total = I(this._total), this.onChange = e.onChange || null, this.onPageSizeChange = e.onPageSizeChange || null, this._init();
|
|
8123
8119
|
}
|
|
@@ -8217,9 +8213,9 @@ class La {
|
|
|
8217
8213
|
this.element.innerHTML = "", this.element.classList.remove("kupola-pagination");
|
|
8218
8214
|
}
|
|
8219
8215
|
}
|
|
8220
|
-
let
|
|
8221
|
-
function
|
|
8222
|
-
if (
|
|
8216
|
+
let Ht = !1;
|
|
8217
|
+
function Ma() {
|
|
8218
|
+
if (Ht || typeof document > "u") return;
|
|
8223
8219
|
const i = document.createElement("style");
|
|
8224
8220
|
i.textContent = `
|
|
8225
8221
|
.kupola-pagination { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
@@ -8235,13 +8231,13 @@ function Da() {
|
|
|
8235
8231
|
.kupola-pagination-jumper { font-size: 14px; color: #666; }
|
|
8236
8232
|
.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; }
|
|
8237
8233
|
.kupola-pagination-jumper input:focus { outline: none; border-color: #1890ff; }
|
|
8238
|
-
`, document.head.appendChild(i),
|
|
8234
|
+
`, document.head.appendChild(i), Ht = !0;
|
|
8239
8235
|
}
|
|
8240
|
-
function
|
|
8241
|
-
return
|
|
8236
|
+
function ll(i, t) {
|
|
8237
|
+
return Ma(), new Ha(i, t);
|
|
8242
8238
|
}
|
|
8243
|
-
let
|
|
8244
|
-
class
|
|
8239
|
+
let Mt = !1;
|
|
8240
|
+
class Ta extends HTMLElement {
|
|
8245
8241
|
static get observedAttributes() {
|
|
8246
8242
|
return ["open"];
|
|
8247
8243
|
}
|
|
@@ -8263,7 +8259,7 @@ class Ha extends HTMLElement {
|
|
|
8263
8259
|
}
|
|
8264
8260
|
}
|
|
8265
8261
|
}
|
|
8266
|
-
class
|
|
8262
|
+
class Ia extends HTMLElement {
|
|
8267
8263
|
static get observedAttributes() {
|
|
8268
8264
|
return ["title", "position"];
|
|
8269
8265
|
}
|
|
@@ -8278,7 +8274,7 @@ class Ma extends HTMLElement {
|
|
|
8278
8274
|
}
|
|
8279
8275
|
}
|
|
8280
8276
|
}
|
|
8281
|
-
class
|
|
8277
|
+
class Aa extends HTMLElement {
|
|
8282
8278
|
connectedCallback() {
|
|
8283
8279
|
this._render();
|
|
8284
8280
|
}
|
|
@@ -8296,13 +8292,13 @@ class Ta extends HTMLElement {
|
|
|
8296
8292
|
}), this.innerHTML = "", this.appendChild(t);
|
|
8297
8293
|
}
|
|
8298
8294
|
}
|
|
8299
|
-
class
|
|
8295
|
+
class za extends HTMLElement {
|
|
8300
8296
|
static get observedAttributes() {
|
|
8301
8297
|
return ["title"];
|
|
8302
8298
|
}
|
|
8303
8299
|
// Content is read by parent <k-collapse> during its connectedCallback
|
|
8304
8300
|
}
|
|
8305
|
-
class
|
|
8301
|
+
class Pa extends HTMLElement {
|
|
8306
8302
|
static get observedAttributes() {
|
|
8307
8303
|
return ["position", "open"];
|
|
8308
8304
|
}
|
|
@@ -8320,7 +8316,7 @@ class Aa extends HTMLElement {
|
|
|
8320
8316
|
}
|
|
8321
8317
|
}
|
|
8322
8318
|
}
|
|
8323
|
-
class
|
|
8319
|
+
class $a extends HTMLElement {
|
|
8324
8320
|
static get observedAttributes() {
|
|
8325
8321
|
return ["title", "open"];
|
|
8326
8322
|
}
|
|
@@ -8363,234 +8359,234 @@ class za extends HTMLElement {
|
|
|
8363
8359
|
this.removeAttribute("open");
|
|
8364
8360
|
}
|
|
8365
8361
|
}
|
|
8366
|
-
function
|
|
8367
|
-
if (
|
|
8368
|
-
|
|
8362
|
+
function cl() {
|
|
8363
|
+
if (Mt || typeof customElements > "u") return;
|
|
8364
|
+
Mt = !0;
|
|
8369
8365
|
const i = [
|
|
8370
|
-
["k-dropdown",
|
|
8371
|
-
["k-tooltip",
|
|
8372
|
-
["k-collapse",
|
|
8373
|
-
["k-collapse-item",
|
|
8374
|
-
["k-drawer",
|
|
8375
|
-
["k-modal",
|
|
8366
|
+
["k-dropdown", Ta],
|
|
8367
|
+
["k-tooltip", Ia],
|
|
8368
|
+
["k-collapse", Aa],
|
|
8369
|
+
["k-collapse-item", za],
|
|
8370
|
+
["k-drawer", Pa],
|
|
8371
|
+
["k-modal", $a]
|
|
8376
8372
|
];
|
|
8377
8373
|
for (const [t, e] of i)
|
|
8378
8374
|
customElements.get(t) || customElements.define(t, e);
|
|
8379
8375
|
}
|
|
8380
8376
|
export {
|
|
8381
8377
|
X as BRAND_OPTIONS,
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8378
|
+
wa as CacheEntry,
|
|
8379
|
+
ke as CacheManager,
|
|
8380
|
+
Xr as Calendar,
|
|
8381
|
+
Br as Carousel,
|
|
8382
|
+
Kr as Collapse,
|
|
8383
|
+
Ur as ColorPicker,
|
|
8384
|
+
wr as ComponentInitializerRegistry,
|
|
8385
|
+
da as Countdown,
|
|
8386
|
+
Tr as Datepicker,
|
|
8391
8387
|
N as DependsError,
|
|
8392
8388
|
U as DependsSource,
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8389
|
+
zo as Dialog,
|
|
8390
|
+
Or as Drawer,
|
|
8391
|
+
Dr as Dropdown,
|
|
8392
|
+
Jr as DynamicTags,
|
|
8393
|
+
ka as FetchedSource,
|
|
8394
|
+
Rr as FileUpload,
|
|
8395
|
+
Sa as FunctionSource,
|
|
8396
|
+
Lr as GlobalEvents,
|
|
8397
|
+
sa as Heatmap,
|
|
8398
|
+
Jo as Icons,
|
|
8399
|
+
me as ImagePreview,
|
|
8400
|
+
Q as KupolaComponent,
|
|
8401
|
+
Cr as KupolaComponentRegistry,
|
|
8402
|
+
dr as KupolaDataBind,
|
|
8403
|
+
pr as KupolaEventBus,
|
|
8404
|
+
va as KupolaForm,
|
|
8405
|
+
te as KupolaI18n,
|
|
8406
|
+
dt as KupolaLifecycle,
|
|
8407
|
+
Ha as KupolaPagination,
|
|
8412
8408
|
vt as KupolaStore,
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8409
|
+
ur as KupolaStoreManager,
|
|
8410
|
+
Da as KupolaTable,
|
|
8411
|
+
Oa as KupolaUtils,
|
|
8412
|
+
aa as KupolaValidator,
|
|
8413
|
+
Bo as Message,
|
|
8418
8414
|
$ as Modal,
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8415
|
+
Po as Notification,
|
|
8416
|
+
pa as NumberInput,
|
|
8417
|
+
be as PATHS,
|
|
8418
|
+
Ca as RouteSource,
|
|
8419
|
+
xa as Scheduler,
|
|
8420
|
+
Hr as Select,
|
|
8421
|
+
ma as SlideCaptcha,
|
|
8422
|
+
Pr as Slider,
|
|
8423
|
+
ta as StatCard,
|
|
8424
|
+
La as StaticSource,
|
|
8425
|
+
Ce as StorageSource,
|
|
8426
|
+
Gr as Tag,
|
|
8427
|
+
Ar as Timepicker,
|
|
8428
|
+
na as Tooltip,
|
|
8429
|
+
oa as VirtualList,
|
|
8430
|
+
Se as WebSocketSource,
|
|
8431
|
+
Io as alertModal,
|
|
8432
|
+
wt as applyMixin,
|
|
8433
|
+
Ws as arrayUtils,
|
|
8434
|
+
so as bootstrapComponents,
|
|
8435
|
+
ko as cleanupAllDropdowns,
|
|
8436
|
+
ya as cleanupAllSlideCaptchas,
|
|
8437
|
+
jr as cleanupCalendar,
|
|
8438
|
+
qr as cleanupCarousel,
|
|
8439
|
+
Wr as cleanupCollapse,
|
|
8440
|
+
Yr as cleanupColorPicker,
|
|
8441
|
+
ua as cleanupCountdown,
|
|
8442
|
+
Ir as cleanupDatepicker,
|
|
8443
|
+
Fr as cleanupDrawer,
|
|
8444
|
+
se as cleanupDropdown,
|
|
8445
|
+
Zr as cleanupDynamicTags,
|
|
8446
|
+
Vr as cleanupFileUpload,
|
|
8447
|
+
ia as cleanupHeatmap,
|
|
8448
|
+
Nr as cleanupModal,
|
|
8449
|
+
fa as cleanupNumberInput,
|
|
8450
|
+
Mr as cleanupSelect,
|
|
8451
|
+
_a as cleanupSlideCaptcha,
|
|
8452
|
+
$r as cleanupSlider,
|
|
8453
|
+
ea as cleanupStatCard,
|
|
8454
|
+
Qr as cleanupTag,
|
|
8455
|
+
zr as cleanupTimepicker,
|
|
8456
|
+
ra as cleanupTooltip,
|
|
8457
|
+
ca as cleanupVirtualList,
|
|
8458
|
+
al as clearCache,
|
|
8459
|
+
el as configureHttpClient,
|
|
8460
|
+
To as confirmModal,
|
|
8461
|
+
Xa as createBrandPicker,
|
|
8462
|
+
ao as createI18n,
|
|
8463
|
+
qa as createLifecycle,
|
|
8464
|
+
le as createModal,
|
|
8465
|
+
Le as createSource,
|
|
8466
|
+
Na as createStore,
|
|
8467
|
+
Ya as createThemeToggle,
|
|
8468
|
+
sr as cryptoUtils,
|
|
8469
|
+
mn as dateUtils,
|
|
8470
|
+
gn as debounce,
|
|
8471
|
+
ro as defineComponent,
|
|
8472
|
+
io as defineMixin,
|
|
8473
|
+
yo as emit,
|
|
8474
|
+
vo as emitGlobal,
|
|
8475
|
+
Ja as escapeHtml,
|
|
8476
|
+
fo as formatCurrency,
|
|
8477
|
+
uo as formatDate,
|
|
8478
|
+
po as formatNumber,
|
|
8479
|
+
Qa as generateSecureId,
|
|
8480
|
+
Wa as getBasePath,
|
|
8485
8481
|
J as getBrand,
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8482
|
+
ut as getConfig,
|
|
8483
|
+
gr as getDefaultBrand,
|
|
8484
|
+
mr as getDefaultTheme,
|
|
8485
|
+
Qo as getFormInstance,
|
|
8486
|
+
sl as getHttpClient,
|
|
8487
|
+
Ua as getHttpConfig,
|
|
8488
|
+
Zt as getIconsPath,
|
|
8489
|
+
Eo as getListenerCount,
|
|
8490
|
+
ho as getLocale,
|
|
8491
|
+
yr as getMessageConfig,
|
|
8492
|
+
vr as getNotificationConfig,
|
|
8493
|
+
_r as getPerformanceConfig,
|
|
8494
|
+
it as getSecurityConfig,
|
|
8495
|
+
Ra as getStore,
|
|
8500
8496
|
F as getTheme,
|
|
8501
8497
|
j as getUiConfig,
|
|
8502
|
-
|
|
8498
|
+
br as getValidationConfig,
|
|
8503
8499
|
H as globalEvents,
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8500
|
+
ol as initAllTables,
|
|
8501
|
+
pe as initCalendar,
|
|
8502
|
+
Ro as initCalendars,
|
|
8503
|
+
oe as initCarousel,
|
|
8504
|
+
Ho as initCarousels,
|
|
8505
|
+
de as initCollapse,
|
|
8506
|
+
Fo as initCollapses,
|
|
8507
|
+
ue as initColorPicker,
|
|
8508
|
+
No as initColorPickers,
|
|
8509
|
+
Ee as initCountdown,
|
|
8510
|
+
Zo as initCountdowns,
|
|
8511
|
+
ne as initDatepicker,
|
|
8512
|
+
So as initDatepickers,
|
|
8513
|
+
ct as initDrawer,
|
|
8514
|
+
Mo as initDrawers,
|
|
8515
|
+
ee as initDropdown,
|
|
8516
|
+
wo as initDropdowns,
|
|
8517
|
+
fe as initDynamicTags,
|
|
8518
|
+
Vo as initDynamicTagsAll,
|
|
8519
|
+
he as initFileUpload,
|
|
8520
|
+
Oo as initFileUploads,
|
|
8521
|
+
ba as initFormValidation,
|
|
8522
|
+
ye as initHeatmap,
|
|
8523
|
+
Xo as initHeatmaps,
|
|
8524
|
+
Ko as initImagePreview,
|
|
8525
|
+
qo as initMessages,
|
|
8526
|
+
ce as initModal,
|
|
8527
|
+
Ao as initModals,
|
|
8528
|
+
$o as initNotifications,
|
|
8529
|
+
we as initNumberInput,
|
|
8530
|
+
Go as initNumberInputs,
|
|
8531
|
+
ll as initPagination,
|
|
8532
|
+
ie as initSelect,
|
|
8533
|
+
Co as initSelects,
|
|
8534
|
+
ga as initSlideCaptchas,
|
|
8535
|
+
ae as initSlider,
|
|
8536
|
+
Do as initSliders,
|
|
8537
|
+
_e as initStatCard,
|
|
8538
|
+
Yo as initStatCards,
|
|
8539
|
+
De as initTable,
|
|
8540
|
+
ge as initTag,
|
|
8541
|
+
Uo as initTags,
|
|
8542
|
+
Er as initTheme,
|
|
8543
|
+
re as initTimepicker,
|
|
8544
|
+
Lo as initTimepickers,
|
|
8545
|
+
ve as initTooltip,
|
|
8546
|
+
jo as initTooltips,
|
|
8547
|
+
la as initVirtualList,
|
|
8548
|
+
kt as kupolaBootstrap,
|
|
8553
8549
|
O as kupolaData,
|
|
8554
|
-
|
|
8550
|
+
Fa as kupolaEvents,
|
|
8555
8551
|
R as kupolaI18n,
|
|
8556
8552
|
E as kupolaInitializer,
|
|
8557
|
-
|
|
8553
|
+
Ba as kupolaLifecycle,
|
|
8558
8554
|
T as kupolaRegistry,
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8555
|
+
jt as kupolaStoreManager,
|
|
8556
|
+
Ga as maskData,
|
|
8557
|
+
lo as n,
|
|
8558
|
+
qi as numberUtils,
|
|
8559
|
+
di as objectUtils,
|
|
8560
|
+
_o as off,
|
|
8561
|
+
xo as offAll,
|
|
8562
|
+
bo as offByScope,
|
|
8563
|
+
Va as offConfigChange,
|
|
8564
|
+
mo as on,
|
|
8565
|
+
fr as onConfigChange,
|
|
8566
|
+
go as once,
|
|
8567
|
+
cr as preloadUtils,
|
|
8572
8568
|
I as ref,
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8569
|
+
to as registerComponent,
|
|
8570
|
+
eo as registerLazyComponent,
|
|
8571
|
+
cl as registerWebComponents,
|
|
8572
|
+
ht as renderIcon,
|
|
8573
|
+
il as resetHttpClient,
|
|
8574
|
+
ja as sanitizeHtml,
|
|
8579
8575
|
lt as setBrand,
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8576
|
+
Ka as setConfig,
|
|
8577
|
+
co as setLocale,
|
|
8578
|
+
nt as setTheme,
|
|
8579
|
+
Wo as showImagePreview,
|
|
8580
|
+
ss as stringUtils,
|
|
8581
|
+
Za as stripHtml,
|
|
8582
|
+
xe as svg,
|
|
8583
|
+
oo as t,
|
|
8584
|
+
_n as throttle,
|
|
8585
|
+
nl as useDeps,
|
|
8586
|
+
no as useMixin,
|
|
8587
|
+
rl as useQuery,
|
|
8588
|
+
tl as validateForm,
|
|
8593
8589
|
P as validator,
|
|
8594
|
-
|
|
8590
|
+
Ut as validatorUtils
|
|
8595
8591
|
};
|
|
8596
8592
|
//# sourceMappingURL=kupola.esm.js.map
|