@kupola/kupola 1.6.8 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kupola.cjs.js +4 -4
- package/dist/kupola.cjs.js.map +1 -1
- package/dist/kupola.esm.js +94 -94
- package/dist/kupola.esm.js.map +1 -1
- package/dist/kupola.umd.js +4 -4
- package/dist/kupola.umd.js.map +1 -1
- package/js/theme.js +13 -10
- package/package.json +1 -1
package/dist/kupola.esm.js
CHANGED
|
@@ -401,8 +401,8 @@ function Ls(i, t) {
|
|
|
401
401
|
function Ds(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 Lt(i) {
|
|
405
|
+
return i ? i.reduce((t, e) => Array.isArray(e) ? t.concat(Lt(e)) : t.concat(e), []) : [];
|
|
406
406
|
}
|
|
407
407
|
function Hs(i) {
|
|
408
408
|
return i ? [...new Set(i)] : [];
|
|
@@ -431,11 +431,11 @@ function Ts(i) {
|
|
|
431
431
|
}
|
|
432
432
|
return t;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Dt(i) {
|
|
435
435
|
return i ? i.reduce((t, e) => t + (Number(e) || 0), 0) : 0;
|
|
436
436
|
}
|
|
437
437
|
function As(i) {
|
|
438
|
-
return !i || i.length === 0 ? 0 :
|
|
438
|
+
return !i || i.length === 0 ? 0 : Dt(i) / i.length;
|
|
439
439
|
}
|
|
440
440
|
function zs(i) {
|
|
441
441
|
return i && i.length > 0 ? Math.max(...i) : -1 / 0;
|
|
@@ -457,7 +457,7 @@ function Os(...i) {
|
|
|
457
457
|
const t = Math.max(...i.map((e) => e ? e.length : 0));
|
|
458
458
|
return Array.from({ length: t }, (e, s) => i.map((n) => n && n[s]));
|
|
459
459
|
}
|
|
460
|
-
const Fs = { isArray: Ge, isEmpty: Qe, size: ts, first: es, last: ss, get: is, slice: ns, concat: rs, join: as, indexOf: os, lastIndexOf: ls, includes: cs, push: hs, pop: ds, shift: us, unshift: ps, remove: fs, removeAt: ms, insert: gs, reverse: _s, sort: ys, sortBy: vs, filter: bs, map: xs, reduce: Es, forEach: ws, every: ks, some: Cs, find: Ss, findIndex: Ls, flat: Ds, flattenDeep:
|
|
460
|
+
const Fs = { isArray: Ge, isEmpty: Qe, size: ts, first: es, last: ss, get: is, slice: ns, concat: rs, join: as, indexOf: os, lastIndexOf: ls, includes: cs, push: hs, pop: ds, shift: us, unshift: ps, remove: fs, removeAt: ms, insert: gs, reverse: _s, sort: ys, sortBy: vs, filter: bs, map: xs, reduce: Es, forEach: ws, every: ks, some: Cs, find: Ss, findIndex: Ls, flat: Ds, flattenDeep: Lt, unique: Hs, uniqueBy: Ms, chunk: Is, shuffle: Ts, sum: Dt, average: As, max: zs, min: Ps, intersection: $s, union: Bs, difference: qs, zip: Os };
|
|
461
461
|
function rt(i) {
|
|
462
462
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
463
463
|
}
|
|
@@ -497,9 +497,9 @@ function Xs(i, t) {
|
|
|
497
497
|
function js(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 Ht(...i) {
|
|
501
501
|
return i.reduce((t, e) => (e && typeof e == "object" && Object.keys(e).forEach((s) => {
|
|
502
|
-
Q(s) || (rt(e[s]) && rt(t[s]) ? t[s] =
|
|
502
|
+
Q(s) || (rt(e[s]) && rt(t[s]) ? t[s] = Ht(t[s], e[s]) : t[s] = e[s]);
|
|
503
503
|
}), t), {});
|
|
504
504
|
}
|
|
505
505
|
function Js(i) {
|
|
@@ -566,21 +566,21 @@ function ni(i) {
|
|
|
566
566
|
t[i[e]] = e;
|
|
567
567
|
}), t;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Mt(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) => Mt(i[n], t[n]));
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function It(i) {
|
|
576
576
|
return i && (Object.freeze(i), Object.keys(i).forEach((t) => {
|
|
577
|
-
typeof i[t] == "object" &&
|
|
577
|
+
typeof i[t] == "object" && It(i[t]);
|
|
578
578
|
}), i);
|
|
579
579
|
}
|
|
580
580
|
function ri(i) {
|
|
581
581
|
return i && Object.seal(i);
|
|
582
582
|
}
|
|
583
|
-
const ai = { isObject: rt, isEmpty: Ns, keys: Rs, values: Vs, entries: Ks, has: Ws, get: Us, set: Ys, pick: Xs, omit: js, merge:
|
|
583
|
+
const ai = { isObject: rt, isEmpty: Ns, keys: Rs, values: Vs, entries: Ks, has: Ws, get: Us, set: Ys, pick: Xs, omit: js, merge: Ht, clone: Js, deepClone: Y, forEach: Zs, map: Gs, filter: Qs, reduce: ti, toArray: ei, fromArray: si, size: ii, invert: ni, isEqual: Mt, freeze: It, seal: ri };
|
|
584
584
|
function L(i) {
|
|
585
585
|
return typeof i == "number" && !isNaN(i);
|
|
586
586
|
}
|
|
@@ -624,18 +624,18 @@ function yi(...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 Tt(...i) {
|
|
628
628
|
return i.flat().filter(L).reduce((e, s) => e + s, 0);
|
|
629
629
|
}
|
|
630
630
|
function vi(...i) {
|
|
631
631
|
const t = i.flat().filter(L);
|
|
632
|
-
return t.length > 0 ?
|
|
632
|
+
return t.length > 0 ? Tt(t) / t.length : 0;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function At(i = 0, t = 1) {
|
|
635
635
|
return Math.random() * (t - i) + i;
|
|
636
636
|
}
|
|
637
637
|
function bi(i, t) {
|
|
638
|
-
return Math.floor(
|
|
638
|
+
return Math.floor(At(i, t + 1));
|
|
639
639
|
}
|
|
640
640
|
function xi(i, t = 2) {
|
|
641
641
|
return L(i) ? i.toFixed(t) : String(i);
|
|
@@ -674,7 +674,7 @@ function Ii(i, t, e = 0) {
|
|
|
674
674
|
function Ti(...i) {
|
|
675
675
|
return i.reduce((t, e) => !L(t) || !L(e) ? 0 : t * e, 1);
|
|
676
676
|
}
|
|
677
|
-
const Ai = { isNumber: L, isInteger: oi, isFloat: li, isPositive: ci, isNegative: hi, isZero: di, clamp: ui, round: pi, floor: fi, ceil: mi, abs: gi, min: _i, max: yi, sum:
|
|
677
|
+
const Ai = { isNumber: L, isInteger: oi, isFloat: li, isPositive: ci, isNegative: hi, isZero: di, clamp: ui, round: pi, floor: fi, ceil: mi, abs: gi, min: _i, max: yi, sum: Tt, average: vi, random: At, randomInt: bi, format: xi, formatCurrency: Ei, formatPercent: wi, toFixed: ki, toPrecision: Ci, isNaN: Si, isFinite: Li, parseInt: Di, parseFloat: Hi, toNumber: Mi, safeDivide: Ii, safeMultiply: Ti };
|
|
678
678
|
function tt() {
|
|
679
679
|
return Date.now();
|
|
680
680
|
}
|
|
@@ -693,12 +693,12 @@ function Pi() {
|
|
|
693
693
|
function w(i) {
|
|
694
694
|
return i instanceof Date && !isNaN(i.getTime());
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function zt(i) {
|
|
697
697
|
return w(i);
|
|
698
698
|
}
|
|
699
699
|
function $i(i) {
|
|
700
700
|
const t = new Date(i);
|
|
701
|
-
return
|
|
701
|
+
return zt(t) ? t : null;
|
|
702
702
|
}
|
|
703
703
|
function Bi(i, t = "YYYY-MM-DD HH:mm:ss") {
|
|
704
704
|
if (!w(i)) return "";
|
|
@@ -794,14 +794,14 @@ function rn(i) {
|
|
|
794
794
|
function an(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 Pt(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
802
|
function on(i, t = 1) {
|
|
803
803
|
if (!w(i)) return i;
|
|
804
|
-
const e =
|
|
804
|
+
const e = Pt(i, t), s = new Date(e);
|
|
805
805
|
return s.setDate(s.getDate() + 6), s.setHours(23, 59, 59, 999), s;
|
|
806
806
|
}
|
|
807
807
|
function ln(i) {
|
|
@@ -815,7 +815,7 @@ function cn(i) {
|
|
|
815
815
|
const e = tt() - i.getTime(), s = 60 * 1e3, n = 60 * s, r = 24 * n, a = 7 * r, o = 30 * r, l = 365 * r;
|
|
816
816
|
return e < s ? "刚刚" : e < n ? `${Math.floor(e / s)}分钟前` : e < r ? `${Math.floor(e / n)}小时前` : e < a ? `${Math.floor(e / r)}天前` : e < o ? `${Math.floor(e / a)}周前` : e < l ? `${Math.floor(e / o)}个月前` : `${Math.floor(e / l)}年前`;
|
|
817
817
|
}
|
|
818
|
-
const hn = { now: tt, today: K, tomorrow: zi, yesterday: Pi, isDate: w, isValid:
|
|
818
|
+
const hn = { now: tt, today: K, tomorrow: zi, yesterday: Pi, isDate: w, isValid: zt, parse: $i, format: Bi, toISO: qi, toUTC: Oi, addDays: Fi, addHours: Ni, addMinutes: Ri, addSeconds: Vi, diffDays: et, diffHours: Ki, diffMinutes: Wi, diffSeconds: Ui, isToday: Yi, isYesterday: Xi, isTomorrow: ji, isFuture: Ji, isPast: Zi, isLeapYear: Gi, getDaysInMonth: Qi, getWeekOfYear: tn, getQuarter: en, startOfDay: sn, endOfDay: nn, startOfMonth: rn, endOfMonth: an, startOfWeek: Pt, endOfWeek: on, getAge: ln, fromNow: cn };
|
|
819
819
|
function dn(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;
|
|
@@ -857,14 +857,14 @@ function fn(i) {
|
|
|
857
857
|
function mn(i) {
|
|
858
858
|
return /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w.-]*)*\/?$/.test(i || "");
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function $t(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 Bt(i) {
|
|
864
864
|
return /^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/.test(i || "");
|
|
865
865
|
}
|
|
866
866
|
function gn(i) {
|
|
867
|
-
return
|
|
867
|
+
return $t(i) || Bt(i);
|
|
868
868
|
}
|
|
869
869
|
function _n(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 || "");
|
|
@@ -882,21 +882,21 @@ function vn(i) {
|
|
|
882
882
|
}
|
|
883
883
|
return s % 10 === 0;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function qt(i) {
|
|
886
886
|
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(i || "");
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function Ot(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 Ft(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
898
|
function bn(i) {
|
|
899
|
-
return
|
|
899
|
+
return qt(i) || Ot(i) || Ft(i);
|
|
900
900
|
}
|
|
901
901
|
function xn(i) {
|
|
902
902
|
return !isNaN(new Date(i).getTime());
|
|
@@ -956,11 +956,11 @@ function $n(i, t) {
|
|
|
956
956
|
function Bn(i, t) {
|
|
957
957
|
return String(i) === String(t);
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function Nt(i, t) {
|
|
960
960
|
return (i || "").includes(t);
|
|
961
961
|
}
|
|
962
962
|
function qn(i, t) {
|
|
963
|
-
return !
|
|
963
|
+
return !Nt(i, t);
|
|
964
964
|
}
|
|
965
965
|
function On(i) {
|
|
966
966
|
return Array.isArray(i);
|
|
@@ -988,7 +988,7 @@ function Wn(i, t) {
|
|
|
988
988
|
r.forEach((o) => {
|
|
989
989
|
if (typeof o == "string") {
|
|
990
990
|
const [l, ...c] = o.split(":");
|
|
991
|
-
|
|
991
|
+
Rt[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,7 +996,7 @@ function Wn(i, t) {
|
|
|
996
996
|
}), a.length > 0 && (e[s] = a);
|
|
997
997
|
}), { valid: Object.keys(e).length === 0, errors: e };
|
|
998
998
|
}
|
|
999
|
-
const
|
|
999
|
+
const Rt = { isEmail: pn, isPhone: fn, isURL: mn, isIPv4: $t, isIPv6: Bt, isIP: gn, isIDCard: _n, isPassport: yn, isCreditCard: vn, isHexColor: qt, isRGB: Ot, isRGBA: Ft, isColor: bn, isDate: xn, isJSON: En, isEmpty: wn, isWhitespace: kn, isNumber: Cn, isInteger: Sn, isFloat: Ln, isPositive: Dn, isNegative: Hn, isAlpha: Mn, isAlphaNumeric: In, isChinese: Tn, isLength: An, minLength: zn, maxLength: Pn, matches: $n, equals: Bn, contains: Nt, notContains: qn, isArray: On, arrayLength: Fn, arrayMinLength: Nn, arrayMaxLength: Rn, isObject: Vn, hasKeys: Kn, validate: Wn };
|
|
1000
1000
|
function Un(i) {
|
|
1001
1001
|
const t = i ? String(i) : "", e = [1732584193, 4023233417, 2562383102, 271733878], s = [3614090360, 3905402710, 606105819, 3250441966, 4118548399, 1200080426, 2821735955, 4249261313, 1770035416, 2336552879, 4294925233, 2304563134, 1804603682, 4254626195, 2792965006, 1236535329, 4129170786, 3225465664, 643717713, 3921069994, 3593408605, 38016083, 3634488961, 3889429448, 568446438, 3275163606, 4107603335, 1163531501, 2850285829, 4243563512, 1735328473, 2368359562, 4294588738, 2272392833, 1839030562, 4259657740, 2763975236, 1272893353, 4139469664, 3200236656, 681279174, 3936430074, 3572445317, 76029189, 3654602809, 3873151461, 530742520, 3299628645, 4096336452, 1126891415, 2878612391, 4237533241, 1700485571, 2399980690, 4293915773, 2240044497, 1873313359, 4264355552, 2734768916, 1309151649, 4149444226, 3174756917, 718787259, 3951481745], n = [[7, 12, 17, 22], [5, 9, 14, 20], [4, 11, 16, 23], [6, 10, 15, 21]];
|
|
1002
1002
|
function r(d, u) {
|
|
@@ -1123,7 +1123,7 @@ async function Gn(i, t = {}) {
|
|
|
1123
1123
|
s.push(await Z(n, t));
|
|
1124
1124
|
return s;
|
|
1125
1125
|
}
|
|
1126
|
-
async function
|
|
1126
|
+
async function Vt(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 Rt(i, t = {}) {
|
|
|
1134
1134
|
}, o.src = i, document.head.appendChild(o);
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
async function
|
|
1137
|
+
async function Kt(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");
|
|
@@ -1158,10 +1158,10 @@ async function tr(i, t = "image") {
|
|
|
1158
1158
|
case "image":
|
|
1159
1159
|
return Z(i);
|
|
1160
1160
|
case "script":
|
|
1161
|
-
return
|
|
1161
|
+
return Vt(i);
|
|
1162
1162
|
case "stylesheet":
|
|
1163
1163
|
case "style":
|
|
1164
|
-
return
|
|
1164
|
+
return Kt(i);
|
|
1165
1165
|
default:
|
|
1166
1166
|
throw new Error(`Unsupported preload type: ${t}`);
|
|
1167
1167
|
}
|
|
@@ -1175,7 +1175,7 @@ function sr() {
|
|
|
1175
1175
|
function ir(i) {
|
|
1176
1176
|
B.delete(i);
|
|
1177
1177
|
}
|
|
1178
|
-
const nr = { loadImage: Z, loadImages: Gn, loadScript:
|
|
1178
|
+
const nr = { loadImage: Z, loadImages: Gn, loadScript: Vt, loadStylesheet: Kt, loadFont: Qn, preload: tr, isLoaded: er, clearCache: sr, clearCacheByUrl: ir }, za = {
|
|
1179
1179
|
string: Ze,
|
|
1180
1180
|
array: Fs,
|
|
1181
1181
|
object: ai,
|
|
@@ -1183,7 +1183,7 @@ const nr = { loadImage: Z, loadImages: Gn, loadScript: Rt, loadStylesheet: Vt, l
|
|
|
1183
1183
|
date: hn,
|
|
1184
1184
|
debounce: dn,
|
|
1185
1185
|
throttle: un,
|
|
1186
|
-
validator:
|
|
1186
|
+
validator: Rt,
|
|
1187
1187
|
crypto: Zn,
|
|
1188
1188
|
preload: nr
|
|
1189
1189
|
};
|
|
@@ -1197,20 +1197,20 @@ function rr(i) {
|
|
|
1197
1197
|
while (t !== s);
|
|
1198
1198
|
return t = t.replace(/\bon\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, ""), t = t.replace(/(href|src|action|background)\s*=\s*(?:"[^"]*(?:javascript|vbscript|data)\s*:[^"]*"|'[^']*(?:javascript|vbscript|data)\s*:[^']*'|[^\s>]*(?:javascript|vbscript|data)\s*:[^\s>]*)/gi, '$1=""'), t = t.replace(/expression\s*\([^)]*\)/gi, ""), t;
|
|
1199
1199
|
}
|
|
1200
|
-
class
|
|
1200
|
+
class gt {
|
|
1201
1201
|
constructor() {
|
|
1202
1202
|
this.children = {}, this.keys = [];
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
class nt {
|
|
1206
1206
|
constructor() {
|
|
1207
|
-
this.root = new
|
|
1207
|
+
this.root = new gt();
|
|
1208
1208
|
}
|
|
1209
1209
|
insert(t) {
|
|
1210
1210
|
let e = this.root;
|
|
1211
1211
|
const s = t.split(".");
|
|
1212
1212
|
s.forEach((n, r) => {
|
|
1213
|
-
e.children[n] || (e.children[n] = new
|
|
1213
|
+
e.children[n] || (e.children[n] = new gt()), e = e.children[n], r === s.length - 1 && e.keys.push(t);
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
1216
|
getSubKeys(t) {
|
|
@@ -1709,7 +1709,7 @@ class ar {
|
|
|
1709
1709
|
}), this.persistedKeys.clear(), this.rawData = {}, this.observers = {}, this.elements = {}, this.computedProperties = {}, this.pathTrie = new nt(), this.updateQueue.clear(), this.snapshots = [];
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|
|
1712
|
-
class
|
|
1712
|
+
class _t {
|
|
1713
1713
|
constructor(t, e = {}) {
|
|
1714
1714
|
this.name = t, this._stateKey = `__store_${t}__`;
|
|
1715
1715
|
const s = e.state ? e.state() : {};
|
|
@@ -1784,14 +1784,14 @@ class or {
|
|
|
1784
1784
|
this.stores = /* @__PURE__ */ new Map();
|
|
1785
1785
|
}
|
|
1786
1786
|
createStore(t, e) {
|
|
1787
|
-
const s = new
|
|
1787
|
+
const s = new _t(t, e);
|
|
1788
1788
|
return this.stores.set(t, s), s;
|
|
1789
1789
|
}
|
|
1790
1790
|
getStore(t) {
|
|
1791
1791
|
return this.stores.get(t);
|
|
1792
1792
|
}
|
|
1793
1793
|
registerStore(t) {
|
|
1794
|
-
t instanceof
|
|
1794
|
+
t instanceof _t && this.stores.set(t.name, t);
|
|
1795
1795
|
}
|
|
1796
1796
|
dispose() {
|
|
1797
1797
|
this.stores.clear();
|
|
@@ -1874,12 +1874,12 @@ function T(i = null) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
}), t;
|
|
1876
1876
|
}
|
|
1877
|
-
const O = new ar(), Pa = new lr(),
|
|
1877
|
+
const O = new ar(), Pa = new lr(), Wt = new or();
|
|
1878
1878
|
function $a(i, t) {
|
|
1879
|
-
return
|
|
1879
|
+
return Wt.createStore(i, t);
|
|
1880
1880
|
}
|
|
1881
1881
|
function Ba(i) {
|
|
1882
|
-
return
|
|
1882
|
+
return Wt.getStore(i);
|
|
1883
1883
|
}
|
|
1884
1884
|
const I = {
|
|
1885
1885
|
paths: {
|
|
@@ -1982,7 +1982,7 @@ function cr(i) {
|
|
|
1982
1982
|
function dt(i) {
|
|
1983
1983
|
return i ? gr(I, i) : I;
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function ut() {
|
|
1986
1986
|
return I.paths.base + I.paths.icons.replace(/^\//, "");
|
|
1987
1987
|
}
|
|
1988
1988
|
function qa() {
|
|
@@ -2074,10 +2074,10 @@ function ot(i) {
|
|
|
2074
2074
|
n.getAttribute("data-brand-btn") === i ? n.classList.add("is-active") : n.classList.remove("is-active");
|
|
2075
2075
|
});
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2077
|
+
function yt(i) {
|
|
2078
2078
|
const t = i.querySelector(".theme-icon");
|
|
2079
2079
|
if (t) {
|
|
2080
|
-
const e = R(), s =
|
|
2080
|
+
const e = R(), s = ut();
|
|
2081
2081
|
t.src = e === "dark" ? s + "sun.svg" : s + "moon.svg";
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
@@ -2085,12 +2085,12 @@ function _r() {
|
|
|
2085
2085
|
const i = document.querySelector("[data-theme-toggle]");
|
|
2086
2086
|
if (i) {
|
|
2087
2087
|
const o = i.querySelector(".theme-icon");
|
|
2088
|
-
if (o && o.src) {
|
|
2089
|
-
const
|
|
2090
|
-
|
|
2088
|
+
if (o && o.src && ut() === "/icons/") {
|
|
2089
|
+
const c = o.src.substring(0, o.src.lastIndexOf("/") + 1), h = window.location.pathname.substring(0, window.location.pathname.lastIndexOf("/") + 1), d = c.replace(window.location.origin + h, "");
|
|
2090
|
+
d !== c && cr({
|
|
2091
2091
|
paths: {
|
|
2092
|
-
icons:
|
|
2093
|
-
base:
|
|
2092
|
+
icons: d,
|
|
2093
|
+
base: h
|
|
2094
2094
|
}
|
|
2095
2095
|
});
|
|
2096
2096
|
}
|
|
@@ -2099,12 +2099,12 @@ function _r() {
|
|
|
2099
2099
|
at(t);
|
|
2100
2100
|
const e = J();
|
|
2101
2101
|
if (ot(e), i) {
|
|
2102
|
-
|
|
2102
|
+
yt(i);
|
|
2103
2103
|
const o = i.onclick;
|
|
2104
2104
|
i.onclick = function(l) {
|
|
2105
2105
|
l.preventDefault();
|
|
2106
2106
|
const h = R() === "dark" ? "light" : "dark";
|
|
2107
|
-
at(h),
|
|
2107
|
+
at(h), yt(i), typeof o == "function" && o.call(this, l);
|
|
2108
2108
|
};
|
|
2109
2109
|
}
|
|
2110
2110
|
let s = document.getElementById("brand-picker");
|
|
@@ -2138,7 +2138,7 @@ function Fa() {
|
|
|
2138
2138
|
i.setAttribute("data-theme-toggle", ""), i.setAttribute("data-current-theme", R()), i.className = "ds-btn ds-btn--ghost ds-btn--sm ds-btn--icon", i.style.position = "fixed", i.style.top = "16px", i.style.right = "16px", i.style.zIndex = "9999";
|
|
2139
2139
|
const t = document.createElement("img");
|
|
2140
2140
|
t.className = "theme-icon";
|
|
2141
|
-
const e =
|
|
2141
|
+
const e = ut();
|
|
2142
2142
|
return t.src = R() === "dark" ? e + "sun.svg" : e + "moon.svg", t.width = 14, t.height = 14, t.alt = "Toggle theme", i.appendChild(t), document.body.appendChild(i), i.onclick = function(s) {
|
|
2143
2143
|
s.preventDefault();
|
|
2144
2144
|
const r = R() === "dark" ? "light" : "dark";
|
|
@@ -2496,7 +2496,7 @@ class G {
|
|
|
2496
2496
|
setup() {
|
|
2497
2497
|
}
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function vt(i, t) {
|
|
2500
2500
|
Object.keys(t).forEach((e) => {
|
|
2501
2501
|
if (e !== "constructor")
|
|
2502
2502
|
if (typeof t[e] == "function") {
|
|
@@ -2552,7 +2552,7 @@ class br {
|
|
|
2552
2552
|
useMixin(t, ...e) {
|
|
2553
2553
|
e.forEach((s) => {
|
|
2554
2554
|
const n = this.mixins.get(s);
|
|
2555
|
-
n &&
|
|
2555
|
+
n && vt(t, n);
|
|
2556
2556
|
});
|
|
2557
2557
|
}
|
|
2558
2558
|
async bootstrap(t = document) {
|
|
@@ -2593,7 +2593,7 @@ class br {
|
|
|
2593
2593
|
const n = t.getAttribute("data-mixins"), r = s;
|
|
2594
2594
|
n && n.split(",").forEach((o) => {
|
|
2595
2595
|
const l = this.mixins.get(o.trim());
|
|
2596
|
-
l &&
|
|
2596
|
+
l && vt(r, l);
|
|
2597
2597
|
});
|
|
2598
2598
|
const a = new r(t);
|
|
2599
2599
|
t.__kupolaInstance = a, this.instances.set(t, a), a.mount();
|
|
@@ -2646,14 +2646,14 @@ function xr() {
|
|
|
2646
2646
|
t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-XSS-Protection"), t.setAttribute("content", "1; mode=block"), document.head.insertBefore(t, document.head.firstChild)), t = document.querySelector('meta[http-equiv="X-Content-Type-Options"]'), t || (t = document.createElement("meta"), t.setAttribute("http-equiv", "X-Content-Type-Options"), t.setAttribute("content", "nosniff"), document.head.insertBefore(t, document.head.firstChild));
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
|
-
async function
|
|
2649
|
+
async function bt() {
|
|
2650
2650
|
if (typeof window < "u") {
|
|
2651
2651
|
xr();
|
|
2652
2652
|
const i = dt();
|
|
2653
2653
|
O.loadPersisted(), O.bind(), _r(), i.components?.autoInit !== !1 && (await E.initializeAll(), M && await M.bootstrap());
|
|
2654
2654
|
}
|
|
2655
2655
|
}
|
|
2656
|
-
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
2656
|
+
typeof document < "u" && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", bt) : typeof window < "u" && setTimeout(bt, 0);
|
|
2657
2657
|
function Ya(i, t) {
|
|
2658
2658
|
M && M.register(i, t);
|
|
2659
2659
|
}
|
|
@@ -4252,8 +4252,8 @@ function ie(i = {}) {
|
|
|
4252
4252
|
const z = C.querySelector(".ds-modal__body");
|
|
4253
4253
|
z && (s ? z.innerHTML = e : z.textContent = e);
|
|
4254
4254
|
const D = C.querySelector("[data-modal-confirm]"), q = C.querySelector("[data-modal-cancel]");
|
|
4255
|
-
let
|
|
4256
|
-
const
|
|
4255
|
+
let pt = !1;
|
|
4256
|
+
const ft = async () => {
|
|
4257
4257
|
if (p) {
|
|
4258
4258
|
D.disabled = !0, D.classList.add("is-loading");
|
|
4259
4259
|
try {
|
|
@@ -4266,14 +4266,14 @@ function ie(i = {}) {
|
|
|
4266
4266
|
return;
|
|
4267
4267
|
}
|
|
4268
4268
|
}
|
|
4269
|
-
|
|
4270
|
-
},
|
|
4269
|
+
pt = !0, k.close();
|
|
4270
|
+
}, mt = () => {
|
|
4271
4271
|
m && m(), k.close();
|
|
4272
4272
|
};
|
|
4273
|
-
D && D.addEventListener("click",
|
|
4273
|
+
D && D.addEventListener("click", ft), q && q.addEventListener("click", mt);
|
|
4274
4274
|
const ke = () => {
|
|
4275
4275
|
setTimeout(() => {
|
|
4276
|
-
D && D.removeEventListener("click",
|
|
4276
|
+
D && D.removeEventListener("click", ft), q && q.removeEventListener("click", mt), k.destroy(), C.remove(), _ && _(pt);
|
|
4277
4277
|
}, 300);
|
|
4278
4278
|
}, Ce = k.close.bind(k);
|
|
4279
4279
|
return k.close = () => {
|
|
@@ -4479,7 +4479,7 @@ const Mo = {
|
|
|
4479
4479
|
};
|
|
4480
4480
|
function Io() {
|
|
4481
4481
|
}
|
|
4482
|
-
function
|
|
4482
|
+
function xt(i) {
|
|
4483
4483
|
return i ? i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
4484
4484
|
}
|
|
4485
4485
|
class Br {
|
|
@@ -4538,7 +4538,7 @@ class Br {
|
|
|
4538
4538
|
<div class="ds-fileupload__icon" style="width: 24px; height: 24px; border-radius: 4px;">
|
|
4539
4539
|
${s}
|
|
4540
4540
|
</div>
|
|
4541
|
-
<span class="ds-fileupload__filename">${this.truncateFilename(
|
|
4541
|
+
<span class="ds-fileupload__filename">${this.truncateFilename(xt(t.name))}</span>
|
|
4542
4542
|
<span class="ds-fileupload__size">${this.formatSize(t.size)}</span>
|
|
4543
4543
|
<button class="ds-fileupload__remove" type="button" aria-label="Remove file">
|
|
4544
4544
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -4590,7 +4590,7 @@ class Br {
|
|
|
4590
4590
|
e.onload = (s) => {
|
|
4591
4591
|
const n = document.createElement("div");
|
|
4592
4592
|
n.className = "ds-fileupload__preview-item", n.innerHTML = `
|
|
4593
|
-
<img src="${s.target.result}" alt="${
|
|
4593
|
+
<img src="${s.target.result}" alt="${xt(t.name)}">
|
|
4594
4594
|
<button class="ds-fileupload__preview-remove" type="button" aria-label="Remove preview">
|
|
4595
4595
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
4596
4596
|
<path d="M18 6L6 18"/>
|
|
@@ -5893,10 +5893,10 @@ function pe(i) {
|
|
|
5893
5893
|
try {
|
|
5894
5894
|
e = JSON.parse(t);
|
|
5895
5895
|
} catch {
|
|
5896
|
-
e =
|
|
5896
|
+
e = Et();
|
|
5897
5897
|
}
|
|
5898
5898
|
else
|
|
5899
|
-
e =
|
|
5899
|
+
e = Et();
|
|
5900
5900
|
const s = new Zr(i, {
|
|
5901
5901
|
data: e,
|
|
5902
5902
|
onCellClick: (n) => {
|
|
@@ -5913,7 +5913,7 @@ function No() {
|
|
|
5913
5913
|
pe(i);
|
|
5914
5914
|
});
|
|
5915
5915
|
}
|
|
5916
|
-
function
|
|
5916
|
+
function Et() {
|
|
5917
5917
|
const i = [], t = /* @__PURE__ */ new Date(), e = /* @__PURE__ */ new Date();
|
|
5918
5918
|
e.setFullYear(e.getFullYear() - 1);
|
|
5919
5919
|
for (let s = new Date(e); s <= t; s.setDate(s.getDate() + 1)) {
|
|
@@ -6561,7 +6561,7 @@ class sa {
|
|
|
6561
6561
|
}), this.data = [], this.dynamicHeightCache.clear(), this.container.innerHTML = "", this._listeners = null, this._scrollHandler = null, this._thumbDragStartHandler = null, this._thumbDragMoveHandler = null, this._thumbDragEndHandler = null, this._wheelHandler = null, this.container = null, this.scrollbarThumb = null, this.element = null;
|
|
6562
6562
|
}
|
|
6563
6563
|
}
|
|
6564
|
-
function
|
|
6564
|
+
function wt(i = 1e3) {
|
|
6565
6565
|
const t = [], e = ["Document", "Image", "Video", "Folder", "Archive", "Spreadsheet", "Presentation", "Code"];
|
|
6566
6566
|
for (let s = 1; s <= i; s++) {
|
|
6567
6567
|
const n = Math.floor(Math.random() * e.length), r = Math.floor(Math.random() * 1e4);
|
|
@@ -6582,10 +6582,10 @@ function ia(i) {
|
|
|
6582
6582
|
try {
|
|
6583
6583
|
e = JSON.parse(t);
|
|
6584
6584
|
} catch {
|
|
6585
|
-
e =
|
|
6585
|
+
e = wt(1e3);
|
|
6586
6586
|
}
|
|
6587
6587
|
else
|
|
6588
|
-
e =
|
|
6588
|
+
e = wt(1e3);
|
|
6589
6589
|
const s = new sa(i, {
|
|
6590
6590
|
data: e,
|
|
6591
6591
|
onItemClick: (n) => {
|
|
@@ -7439,12 +7439,12 @@ function Zo(i, t) {
|
|
|
7439
7439
|
const e = {}, s = new ve(), n = [];
|
|
7440
7440
|
for (const r in t) {
|
|
7441
7441
|
let p = function() {
|
|
7442
|
-
return
|
|
7442
|
+
return kt(i);
|
|
7443
7443
|
}, a = t[r];
|
|
7444
7444
|
typeof a == "string" && (a = { source: a });
|
|
7445
7445
|
const o = {
|
|
7446
7446
|
...a,
|
|
7447
|
-
cacheKey: a.cacheKey || `${r}-${JSON.stringify(
|
|
7447
|
+
cacheKey: a.cacheKey || `${r}-${JSON.stringify(kt(i))}`
|
|
7448
7448
|
}, l = Ee(o, s), c = T(null), h = T(!0), d = T(null), u = T(null);
|
|
7449
7449
|
let f = 0;
|
|
7450
7450
|
async function m() {
|
|
@@ -7531,7 +7531,7 @@ function Go(i) {
|
|
|
7531
7531
|
}
|
|
7532
7532
|
};
|
|
7533
7533
|
}
|
|
7534
|
-
function
|
|
7534
|
+
function kt(i) {
|
|
7535
7535
|
const t = {};
|
|
7536
7536
|
for (const e in i) {
|
|
7537
7537
|
const s = i[e];
|
|
@@ -8197,9 +8197,9 @@ class ka {
|
|
|
8197
8197
|
this.element.innerHTML = "", this.element.classList.remove("kupola-pagination");
|
|
8198
8198
|
}
|
|
8199
8199
|
}
|
|
8200
|
-
let
|
|
8200
|
+
let Ct = !1;
|
|
8201
8201
|
function Ca() {
|
|
8202
|
-
if (
|
|
8202
|
+
if (Ct || typeof document > "u") return;
|
|
8203
8203
|
const i = document.createElement("style");
|
|
8204
8204
|
i.textContent = `
|
|
8205
8205
|
.kupola-pagination { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
@@ -8215,12 +8215,12 @@ function Ca() {
|
|
|
8215
8215
|
.kupola-pagination-jumper { font-size: 14px; color: #666; }
|
|
8216
8216
|
.kupola-pagination-jumper input { width: 50px; height: 28px; margin: 0 4px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; text-align: center; font-size: 13px; }
|
|
8217
8217
|
.kupola-pagination-jumper input:focus { outline: none; border-color: #1890ff; }
|
|
8218
|
-
`, document.head.appendChild(i),
|
|
8218
|
+
`, document.head.appendChild(i), Ct = !0;
|
|
8219
8219
|
}
|
|
8220
8220
|
function el(i, t) {
|
|
8221
8221
|
return Ca(), new ka(i, t);
|
|
8222
8222
|
}
|
|
8223
|
-
let
|
|
8223
|
+
let St = !1;
|
|
8224
8224
|
class Sa extends HTMLElement {
|
|
8225
8225
|
static get observedAttributes() {
|
|
8226
8226
|
return ["open"];
|
|
@@ -8344,8 +8344,8 @@ class Ia extends HTMLElement {
|
|
|
8344
8344
|
}
|
|
8345
8345
|
}
|
|
8346
8346
|
function sl() {
|
|
8347
|
-
if (
|
|
8348
|
-
|
|
8347
|
+
if (St || typeof customElements > "u") return;
|
|
8348
|
+
St = !0;
|
|
8349
8349
|
const i = [
|
|
8350
8350
|
["k-dropdown", Sa],
|
|
8351
8351
|
["k-tooltip", La],
|
|
@@ -8389,7 +8389,7 @@ export {
|
|
|
8389
8389
|
jt as KupolaI18n,
|
|
8390
8390
|
ht as KupolaLifecycle,
|
|
8391
8391
|
ka as KupolaPagination,
|
|
8392
|
-
|
|
8392
|
+
_t as KupolaStore,
|
|
8393
8393
|
or as KupolaStoreManager,
|
|
8394
8394
|
wa as KupolaTable,
|
|
8395
8395
|
za as KupolaUtils,
|
|
@@ -8413,7 +8413,7 @@ export {
|
|
|
8413
8413
|
sa as VirtualList,
|
|
8414
8414
|
xe as WebSocketSource,
|
|
8415
8415
|
Co as alertModal,
|
|
8416
|
-
|
|
8416
|
+
vt as applyMixin,
|
|
8417
8417
|
Fs as arrayUtils,
|
|
8418
8418
|
ja as bootstrapComponents,
|
|
8419
8419
|
_o as cleanupAllDropdowns,
|
|
@@ -8469,7 +8469,7 @@ export {
|
|
|
8469
8469
|
Uo as getFormInstance,
|
|
8470
8470
|
jo as getHttpClient,
|
|
8471
8471
|
Oa as getHttpConfig,
|
|
8472
|
-
|
|
8472
|
+
ut as getIconsPath,
|
|
8473
8473
|
mo as getListenerCount,
|
|
8474
8474
|
io as getLocale,
|
|
8475
8475
|
pr as getMessageConfig,
|
|
@@ -8529,14 +8529,14 @@ export {
|
|
|
8529
8529
|
fe as initTooltip,
|
|
8530
8530
|
Ro as initTooltips,
|
|
8531
8531
|
ia as initVirtualList,
|
|
8532
|
-
|
|
8532
|
+
bt as kupolaBootstrap,
|
|
8533
8533
|
O as kupolaData,
|
|
8534
8534
|
Pa as kupolaEvents,
|
|
8535
8535
|
N as kupolaI18n,
|
|
8536
8536
|
E as kupolaInitializer,
|
|
8537
8537
|
Ta as kupolaLifecycle,
|
|
8538
8538
|
M as kupolaRegistry,
|
|
8539
|
-
|
|
8539
|
+
Wt as kupolaStoreManager,
|
|
8540
8540
|
Wa as maskData,
|
|
8541
8541
|
eo as n,
|
|
8542
8542
|
Ai as numberUtils,
|
|
@@ -8569,6 +8569,6 @@ export {
|
|
|
8569
8569
|
Go as useQuery,
|
|
8570
8570
|
Yo as validateForm,
|
|
8571
8571
|
P as validator,
|
|
8572
|
-
|
|
8572
|
+
Rt as validatorUtils
|
|
8573
8573
|
};
|
|
8574
8574
|
//# sourceMappingURL=kupola.esm.js.map
|