@dxtmisha/functional-basic 1.3.6 → 1.3.8
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/CHANGELOG.md +14 -0
- package/ai-description.txt +12 -7
- package/ai-types.txt +1170 -121
- package/dist/library.js +443 -382
- package/dist/src/classes/Geo.d.ts +7 -0
- package/dist/src/classes/GeoInstance.d.ts +12 -0
- package/dist/src/classes/UrlItem.d.ts +71 -0
- package/dist/src/library.d.ts +1 -0
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -513,7 +513,7 @@ function he(e, t, n = !0) {
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/classes/ServerStorage.ts
|
|
516
|
-
var
|
|
516
|
+
var ge = "__ui:server-storage__", _e = "__ui:server:storage:id__", D = class {
|
|
517
517
|
static init(e) {
|
|
518
518
|
return this.listener || (this.listener = e), this;
|
|
519
519
|
}
|
|
@@ -543,7 +543,7 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
543
543
|
e in t && delete t[e];
|
|
544
544
|
}
|
|
545
545
|
static toString() {
|
|
546
|
-
return me(
|
|
546
|
+
return me(_e, this.getDataForHydration());
|
|
547
547
|
}
|
|
548
548
|
static getStorage(e = !0, t) {
|
|
549
549
|
var n;
|
|
@@ -557,11 +557,11 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
557
557
|
details: { status: t }
|
|
558
558
|
}), e && !this.storage && (this.storage = {}), (i = this.storage) == null ? {} : i;
|
|
559
559
|
}
|
|
560
|
-
return
|
|
560
|
+
return ge in r || (r[ge] = {}), r[ge];
|
|
561
561
|
}
|
|
562
562
|
static getStorageDom() {
|
|
563
563
|
if (!this.storage) {
|
|
564
|
-
let e = he(
|
|
564
|
+
let e = he(_e, {});
|
|
565
565
|
this.storage = {}, r(e, (e, t) => {
|
|
566
566
|
this.storage[t] = {
|
|
567
567
|
value: e,
|
|
@@ -578,16 +578,16 @@ var D = "__ui:server-storage__", ge = "__ui:server:storage:id__", O = class {
|
|
|
578
578
|
}), t;
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
|
-
T(
|
|
581
|
+
T(D, "storage", void 0), T(D, "listener", void 0), T(D, "hideError", void 0);
|
|
582
582
|
//#endregion
|
|
583
583
|
//#region src/classes/DataStorage.ts
|
|
584
|
-
var
|
|
584
|
+
var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O = class {
|
|
585
585
|
static setPrefix(e) {
|
|
586
|
-
|
|
586
|
+
ve = e;
|
|
587
587
|
}
|
|
588
588
|
constructor(e, t = !1, n = E.getItem()) {
|
|
589
589
|
T(this, "name", void 0), T(this, "isSession", void 0), T(this, "errorCenter", void 0), T(this, "value", void 0), T(this, "age", void 0), this.name = e, this.isSession = t, this.errorCenter = n;
|
|
590
|
-
let r = `${t ? "session" : "storage"}#${e}`, i =
|
|
590
|
+
let r = `${t ? "session" : "storage"}#${e}`, i = ye();
|
|
591
591
|
if (r in i) return i[r];
|
|
592
592
|
this.make(), i[r] = this;
|
|
593
593
|
}
|
|
@@ -624,7 +624,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
getIndex() {
|
|
627
|
-
return `${
|
|
627
|
+
return `${ve}__${this.name}`;
|
|
628
628
|
}
|
|
629
629
|
getValue() {
|
|
630
630
|
var e, t;
|
|
@@ -643,9 +643,9 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
643
643
|
let e = this.getValue();
|
|
644
644
|
return e ? (this.value = e.value, this.age = e.age) : (this.value = void 0, this.age = void 0), this;
|
|
645
645
|
}
|
|
646
|
-
},
|
|
646
|
+
}, be = "__ui:cookie-block__", xe = class {
|
|
647
647
|
constructor() {
|
|
648
|
-
T(this, "storage", new
|
|
648
|
+
T(this, "storage", new O(be));
|
|
649
649
|
}
|
|
650
650
|
get() {
|
|
651
651
|
var e;
|
|
@@ -654,9 +654,9 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
654
654
|
set(e) {
|
|
655
655
|
this.storage.set(e);
|
|
656
656
|
}
|
|
657
|
-
},
|
|
657
|
+
}, Se = class {
|
|
658
658
|
static getItem() {
|
|
659
|
-
return
|
|
659
|
+
return D.get("__ui:cookie-block__", () => new xe());
|
|
660
660
|
}
|
|
661
661
|
static get() {
|
|
662
662
|
return this.getItem().get();
|
|
@@ -664,7 +664,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
664
664
|
static set(e) {
|
|
665
665
|
this.getItem().set(e);
|
|
666
666
|
}
|
|
667
|
-
},
|
|
667
|
+
}, Ce = "__ui:cookie-storage__", k = class {
|
|
668
668
|
static init(e, t, n) {
|
|
669
669
|
this.getListener = e, this.getListenerRaw = t, this.setListener = n;
|
|
670
670
|
}
|
|
@@ -678,7 +678,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
678
678
|
}
|
|
679
679
|
static set(e, t, n) {
|
|
680
680
|
let r = S(t);
|
|
681
|
-
if (
|
|
681
|
+
if (Se.get()) return r;
|
|
682
682
|
let i = C(r, !1);
|
|
683
683
|
return this.setListener ? this.setListener(e, i, this.format(e, i, n), n) : (this.initItems()[e] = i === "" ? void 0 : r, this.hasDom() && (document.cookie = this.format(e, i, n))), r;
|
|
684
684
|
}
|
|
@@ -686,7 +686,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
686
686
|
this.set(e, "", { age: -1 });
|
|
687
687
|
}
|
|
688
688
|
static update() {
|
|
689
|
-
s() && (
|
|
689
|
+
s() && (D.remove(Ce), this.initItems());
|
|
690
690
|
}
|
|
691
691
|
static format(e, t, n) {
|
|
692
692
|
return [
|
|
@@ -713,7 +713,7 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
713
713
|
return t;
|
|
714
714
|
}
|
|
715
715
|
static initItems() {
|
|
716
|
-
return
|
|
716
|
+
return D.get(Ce, () => {
|
|
717
717
|
var e;
|
|
718
718
|
if (this.hasDom()) return this.parse(document.cookie);
|
|
719
719
|
let t = (e = this.getListenerRaw) == null ? void 0 : e.call(this);
|
|
@@ -745,19 +745,19 @@ var _e = "ui-storage", ve = () => O.get("__ui:data-storage__", () => ({})), k =
|
|
|
745
745
|
return e === void 0 ? [] : Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => `${e}=${C(t)}`);
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
|
-
T(
|
|
748
|
+
T(k, "getListener", void 0), T(k, "getListenerRaw", void 0), T(k, "setListener", void 0);
|
|
749
749
|
//#endregion
|
|
750
750
|
//#region src/classes/Cookie.ts
|
|
751
|
-
var
|
|
751
|
+
var we = () => D.get("__ui:cookie-items__", () => ({})), Te = class e {
|
|
752
752
|
static getInstance(t) {
|
|
753
753
|
var n, r;
|
|
754
|
-
return (n = (r =
|
|
754
|
+
return (n = (r = we()) == null ? void 0 : r[t]) == null ? new e(t) : n;
|
|
755
755
|
}
|
|
756
756
|
constructor(e) {
|
|
757
757
|
T(this, "name", void 0), T(this, "value", void 0), T(this, "options", {}), this.name = e;
|
|
758
|
-
let t =
|
|
758
|
+
let t = we();
|
|
759
759
|
if (e in t) return t[e];
|
|
760
|
-
this.value =
|
|
760
|
+
this.value = k.get(this.name), t[e] = this;
|
|
761
761
|
}
|
|
762
762
|
get(e, t) {
|
|
763
763
|
return this.value === void 0 && e && this.set(e, t), this.value;
|
|
@@ -769,11 +769,11 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
769
769
|
this.set("");
|
|
770
770
|
}
|
|
771
771
|
update() {
|
|
772
|
-
|
|
772
|
+
k.set(this.name, this.value, this.options);
|
|
773
773
|
}
|
|
774
|
-
},
|
|
774
|
+
}, Ee = "ui-geo-code", De = "__ui:geo-code__", Oe = class {
|
|
775
775
|
constructor() {
|
|
776
|
-
T(this, "storage", new
|
|
776
|
+
T(this, "storage", new O(De)), T(this, "location", void 0), T(this, "valueDefault", void 0), T(this, "item", void 0), T(this, "language", void 0), T(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
777
777
|
}
|
|
778
778
|
get() {
|
|
779
779
|
return this.item;
|
|
@@ -842,11 +842,14 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
842
842
|
setTimezone(e) {
|
|
843
843
|
this.timezone = e;
|
|
844
844
|
}
|
|
845
|
+
setValueDefault(e) {
|
|
846
|
+
this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
|
|
847
|
+
}
|
|
845
848
|
getCookie() {
|
|
846
|
-
return
|
|
849
|
+
return Te.getInstance(Ee);
|
|
847
850
|
}
|
|
848
851
|
findLocation() {
|
|
849
|
-
return this.findLocationDom() || this.getCookie().get() || "en-GB";
|
|
852
|
+
return this.findLocationDom() || this.getCookie().get() || this.valueDefault || "en-GB";
|
|
850
853
|
}
|
|
851
854
|
findLocationDom() {
|
|
852
855
|
var e;
|
|
@@ -868,9 +871,9 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
868
871
|
firstDay: (e == null ? void 0 : e.firstDay) || "Mo"
|
|
869
872
|
};
|
|
870
873
|
}
|
|
871
|
-
},
|
|
874
|
+
}, A = class {
|
|
872
875
|
static getObject() {
|
|
873
|
-
return
|
|
876
|
+
return D.get("__ui:geo-instance__", () => new Oe());
|
|
874
877
|
}
|
|
875
878
|
static get() {
|
|
876
879
|
return this.getObject().get();
|
|
@@ -926,17 +929,20 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
|
|
|
926
929
|
static setTimezone(e) {
|
|
927
930
|
this.getObject().setTimezone(e);
|
|
928
931
|
}
|
|
932
|
+
static setValueDefault(e) {
|
|
933
|
+
this.getObject().setValueDefault(e);
|
|
934
|
+
}
|
|
929
935
|
};
|
|
930
936
|
//#endregion
|
|
931
937
|
//#region src/functions/isWindow.ts
|
|
932
|
-
function
|
|
938
|
+
function ke(e) {
|
|
933
939
|
return s() && e === window;
|
|
934
940
|
}
|
|
935
941
|
//#endregion
|
|
936
942
|
//#region src/functions/getElement.ts
|
|
937
|
-
function
|
|
943
|
+
function j(e) {
|
|
938
944
|
if (!s()) return d(e) ? void 0 : e;
|
|
939
|
-
if (
|
|
945
|
+
if (ke(e)) return document.body;
|
|
940
946
|
if (d(e)) {
|
|
941
947
|
var t;
|
|
942
948
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -945,30 +951,30 @@ function M(e) {
|
|
|
945
951
|
}
|
|
946
952
|
//#endregion
|
|
947
953
|
//#region src/functions/getElementOrWindow.ts
|
|
948
|
-
function
|
|
949
|
-
return
|
|
954
|
+
function Ae(e) {
|
|
955
|
+
return ke(e) ? e : j(e);
|
|
950
956
|
}
|
|
951
957
|
//#endregion
|
|
952
958
|
//#region src/functions/isInDom.ts
|
|
953
|
-
function
|
|
959
|
+
function je(e) {
|
|
954
960
|
var t;
|
|
955
|
-
return (e == null ? void 0 : e.isConnected) || !!((t =
|
|
961
|
+
return (e == null ? void 0 : e.isConnected) || !!((t = j(e)) != null && t.closest("html"));
|
|
956
962
|
}
|
|
957
963
|
//#endregion
|
|
958
964
|
//#region src/functions/toArray.ts
|
|
959
|
-
function
|
|
965
|
+
function M(e) {
|
|
960
966
|
return Array.isArray(e) ? e : [e];
|
|
961
967
|
}
|
|
962
968
|
//#endregion
|
|
963
969
|
//#region src/classes/EventItem.ts
|
|
964
|
-
var
|
|
970
|
+
var Me = class {
|
|
965
971
|
constructor(e, n = ["click"], r, i, a) {
|
|
966
972
|
T(this, "listener", void 0), T(this, "options", void 0), T(this, "detail", void 0), T(this, "element", void 0), T(this, "elementControl", void 0), T(this, "elementControlEdit", void 0), T(this, "type", void 0), T(this, "listenerRecent", (e) => {
|
|
967
|
-
if (
|
|
973
|
+
if (je(this.elementControl)) {
|
|
968
974
|
var n, r;
|
|
969
975
|
(n = this.listener) == null || n.call(this.element, e, this.detail), t(this.options) && (r = this.options) != null && r.once && this.stop();
|
|
970
976
|
} else this.stop();
|
|
971
|
-
}), T(this, "activity", !1), T(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element =
|
|
977
|
+
}), T(this, "activity", !1), T(this, "activityItems", []), this.listener = r, this.options = i, this.detail = a, this.element = Ae(e), this.elementControl = j(e), this.type = M(n);
|
|
972
978
|
}
|
|
973
979
|
isActive() {
|
|
974
980
|
return this.activity;
|
|
@@ -977,14 +983,14 @@ var je = class {
|
|
|
977
983
|
return this.element;
|
|
978
984
|
}
|
|
979
985
|
setElement(e) {
|
|
980
|
-
let t =
|
|
981
|
-
return this.elementControlEdit || (this.elementControl =
|
|
986
|
+
let t = Ae(e);
|
|
987
|
+
return this.elementControlEdit || (this.elementControl = j(e)), this.element = t, this.reset(), this;
|
|
982
988
|
}
|
|
983
989
|
setElementControl(e) {
|
|
984
|
-
return this.elementControl =
|
|
990
|
+
return this.elementControl = j(e), this.elementControlEdit = !c(this.elementControl), this.elementControlEdit || (this.elementControl = j(this.element)), this;
|
|
985
991
|
}
|
|
986
992
|
setType(e) {
|
|
987
|
-
return this.type =
|
|
993
|
+
return this.type = M(e), this.reset(), this;
|
|
988
994
|
}
|
|
989
995
|
setListener(e) {
|
|
990
996
|
return this.listener = e, this;
|
|
@@ -1053,9 +1059,9 @@ var je = class {
|
|
|
1053
1059
|
}
|
|
1054
1060
|
return !1;
|
|
1055
1061
|
}
|
|
1056
|
-
},
|
|
1057
|
-
constructor(e =
|
|
1058
|
-
T(this, "eventName", void 0), T(this, "value", 0), T(this, "event", void 0), T(this, "registrationList", []), this.eventName = e, s() && (this.event = new
|
|
1062
|
+
}, Ne = "ui-loading", Pe = class {
|
|
1063
|
+
constructor(e = Ne) {
|
|
1064
|
+
T(this, "eventName", void 0), T(this, "value", 0), T(this, "event", void 0), T(this, "registrationList", []), this.eventName = e, s() && (this.event = new Me(window, this.eventName));
|
|
1059
1065
|
}
|
|
1060
1066
|
is() {
|
|
1061
1067
|
return this.value > 0;
|
|
@@ -1071,7 +1077,7 @@ var je = class {
|
|
|
1071
1077
|
}
|
|
1072
1078
|
registrationEvent(e, t) {
|
|
1073
1079
|
if (s()) {
|
|
1074
|
-
let n = new
|
|
1080
|
+
let n = new Me(window, this.eventName, e).setElementControl(t).start();
|
|
1075
1081
|
this.registrationList.push({
|
|
1076
1082
|
item: n,
|
|
1077
1083
|
listener: e,
|
|
@@ -1086,7 +1092,7 @@ var je = class {
|
|
|
1086
1092
|
var e;
|
|
1087
1093
|
(e = this.event) == null || e.dispatch({ loading: this.is() });
|
|
1088
1094
|
}
|
|
1089
|
-
},
|
|
1095
|
+
}, N = class {
|
|
1090
1096
|
static is() {
|
|
1091
1097
|
return this.getItem().is();
|
|
1092
1098
|
}
|
|
@@ -1094,7 +1100,7 @@ var je = class {
|
|
|
1094
1100
|
return this.getItem().get();
|
|
1095
1101
|
}
|
|
1096
1102
|
static getItem() {
|
|
1097
|
-
return
|
|
1103
|
+
return D.get("__ui:loading-instance__", () => new Pe());
|
|
1098
1104
|
}
|
|
1099
1105
|
static show() {
|
|
1100
1106
|
this.getItem().show();
|
|
@@ -1108,7 +1114,7 @@ var je = class {
|
|
|
1108
1114
|
static unregistrationEvent(e, t) {
|
|
1109
1115
|
this.getItem().unregistrationEvent(e, t);
|
|
1110
1116
|
}
|
|
1111
|
-
},
|
|
1117
|
+
}, Fe, Ie = 1440 * 60, P = class {
|
|
1112
1118
|
static init(e, t, n, r) {
|
|
1113
1119
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1114
1120
|
}
|
|
@@ -1130,7 +1136,7 @@ var je = class {
|
|
|
1130
1136
|
let t = this.generateKey(e);
|
|
1131
1137
|
return await this.get(t);
|
|
1132
1138
|
}
|
|
1133
|
-
static async set(e, t, n =
|
|
1139
|
+
static async set(e, t, n = Ie) {
|
|
1134
1140
|
let r = {
|
|
1135
1141
|
value: t,
|
|
1136
1142
|
age: n,
|
|
@@ -1193,10 +1199,10 @@ var je = class {
|
|
|
1193
1199
|
}
|
|
1194
1200
|
}
|
|
1195
1201
|
};
|
|
1196
|
-
|
|
1202
|
+
Fe = P, T(P, "items", void 0), T(P, "getListener", void 0), T(P, "setListener", void 0), T(P, "removeListener", void 0), T(P, "cacheStepAgeClearOld", 16384), T(P, "stepAgeClearOld", Fe.cacheStepAgeClearOld);
|
|
1197
1203
|
//#endregion
|
|
1198
1204
|
//#region src/classes/ApiStatus.ts
|
|
1199
|
-
var
|
|
1205
|
+
var Le = class {
|
|
1200
1206
|
constructor() {
|
|
1201
1207
|
T(this, "value", void 0);
|
|
1202
1208
|
}
|
|
@@ -1258,13 +1264,13 @@ var Ie = class {
|
|
|
1258
1264
|
setValue(e, t) {
|
|
1259
1265
|
this.value || (this.value = {}), this.value[e] = t;
|
|
1260
1266
|
}
|
|
1261
|
-
},
|
|
1267
|
+
}, Re = [
|
|
1262
1268
|
"success",
|
|
1263
1269
|
"status",
|
|
1264
1270
|
"code",
|
|
1265
1271
|
"message",
|
|
1266
1272
|
"error"
|
|
1267
|
-
],
|
|
1273
|
+
], ze = class {
|
|
1268
1274
|
constructor(e, t, n, r) {
|
|
1269
1275
|
T(this, "apiFetch", void 0), T(this, "query", void 0), T(this, "end", void 0), T(this, "error", void 0), T(this, "data", void 0), T(this, "dataMod", void 0), this.apiFetch = e, this.query = t, this.end = n, this.error = r;
|
|
1270
1276
|
}
|
|
@@ -1296,16 +1302,16 @@ var Ie = class {
|
|
|
1296
1302
|
}
|
|
1297
1303
|
initItem(e) {
|
|
1298
1304
|
let t = { ...e.data };
|
|
1299
|
-
return
|
|
1305
|
+
return Re.forEach((r) => {
|
|
1300
1306
|
if (r in e && !(r in t) && (t[r] = e[r], r === "error" && n(e[r]))) {
|
|
1301
1307
|
var i, a, o, s;
|
|
1302
1308
|
t.code = (i = (a = e[r]) == null ? void 0 : a.code) == null ? e.code : i, t.message = (o = (s = e[r]) == null ? void 0 : s.message) == null ? e.message : o;
|
|
1303
1309
|
}
|
|
1304
1310
|
}), t;
|
|
1305
1311
|
}
|
|
1306
|
-
},
|
|
1312
|
+
}, F = /* @__PURE__ */ function(e) {
|
|
1307
1313
|
return e.delete = "DELETE", e.get = "GET", e.post = "POST", e.put = "PUT", e.patch = "PATCH", e;
|
|
1308
|
-
}({}),
|
|
1314
|
+
}({}), Be = class {
|
|
1309
1315
|
constructor() {
|
|
1310
1316
|
T(this, "value", void 0);
|
|
1311
1317
|
}
|
|
@@ -1334,7 +1340,7 @@ var Ie = class {
|
|
|
1334
1340
|
e.has(t) || e.set(t, n);
|
|
1335
1341
|
}), this;
|
|
1336
1342
|
}
|
|
1337
|
-
},
|
|
1343
|
+
}, Ve = class {
|
|
1338
1344
|
constructor(e, t, n) {
|
|
1339
1345
|
T(this, "method", void 0), T(this, "response", void 0), T(this, "error", void 0), T(this, "jsonResponse", void 0), this.method = e, this.response = t, this.error = n;
|
|
1340
1346
|
}
|
|
@@ -1358,7 +1364,7 @@ var Ie = class {
|
|
|
1358
1364
|
getStatus() {
|
|
1359
1365
|
return this.response.status;
|
|
1360
1366
|
}
|
|
1361
|
-
},
|
|
1367
|
+
}, He = class {
|
|
1362
1368
|
constructor() {
|
|
1363
1369
|
T(this, "storage", []);
|
|
1364
1370
|
}
|
|
@@ -1377,7 +1383,7 @@ var Ie = class {
|
|
|
1377
1383
|
};
|
|
1378
1384
|
}
|
|
1379
1385
|
add(e, t, n) {
|
|
1380
|
-
return
|
|
1386
|
+
return M(e).forEach((e) => {
|
|
1381
1387
|
let r = e.url || t, i = e.method || n;
|
|
1382
1388
|
r && i && this.storage.push({
|
|
1383
1389
|
...e,
|
|
@@ -1412,17 +1418,17 @@ var Ie = class {
|
|
|
1412
1418
|
getMessage(e) {
|
|
1413
1419
|
return this.getDataByKey(e, "message");
|
|
1414
1420
|
}
|
|
1415
|
-
},
|
|
1421
|
+
}, Ue = class {
|
|
1416
1422
|
static getStorage() {
|
|
1417
|
-
return
|
|
1423
|
+
return D.get("__ui:api-error-storage__", () => new He());
|
|
1418
1424
|
}
|
|
1419
1425
|
static add(e, t, n) {
|
|
1420
1426
|
this.getStorage().add(e, t, n);
|
|
1421
1427
|
}
|
|
1422
1428
|
static async getItem(e, t) {
|
|
1423
|
-
return new
|
|
1429
|
+
return new Ve(e, t, await this.getStorage().find(e, t));
|
|
1424
1430
|
}
|
|
1425
|
-
},
|
|
1431
|
+
}, We = class {
|
|
1426
1432
|
constructor() {
|
|
1427
1433
|
T(this, "headers", {});
|
|
1428
1434
|
}
|
|
@@ -1438,7 +1444,7 @@ var Ie = class {
|
|
|
1438
1444
|
set(e) {
|
|
1439
1445
|
return this.headers = e, this;
|
|
1440
1446
|
}
|
|
1441
|
-
},
|
|
1447
|
+
}, Ge = "__ui:api:hydration:id__", Ke = class {
|
|
1442
1448
|
constructor() {
|
|
1443
1449
|
T(this, "list", []);
|
|
1444
1450
|
}
|
|
@@ -1446,7 +1452,7 @@ var Ie = class {
|
|
|
1446
1452
|
s() && e.add(this.getListByClient());
|
|
1447
1453
|
}
|
|
1448
1454
|
toClient(e, t) {
|
|
1449
|
-
let { path: n, method: r =
|
|
1455
|
+
let { path: n, method: r = F.get, request: i, global: a = r === F.get } = e;
|
|
1450
1456
|
!a || !n || s() || this.list.push({
|
|
1451
1457
|
path: n,
|
|
1452
1458
|
method: r,
|
|
@@ -1455,12 +1461,12 @@ var Ie = class {
|
|
|
1455
1461
|
});
|
|
1456
1462
|
}
|
|
1457
1463
|
toString() {
|
|
1458
|
-
return me(
|
|
1464
|
+
return me(Ge, this.list);
|
|
1459
1465
|
}
|
|
1460
1466
|
getListByClient() {
|
|
1461
|
-
return he(
|
|
1467
|
+
return he(Ge, []);
|
|
1462
1468
|
}
|
|
1463
|
-
},
|
|
1469
|
+
}, qe = class {
|
|
1464
1470
|
constructor() {
|
|
1465
1471
|
T(this, "callback", void 0), T(this, "callbackEnd", void 0), T(this, "loading", !1);
|
|
1466
1472
|
}
|
|
@@ -1488,13 +1494,13 @@ var Ie = class {
|
|
|
1488
1494
|
};
|
|
1489
1495
|
//#endregion
|
|
1490
1496
|
//#region src/functions/executePromise.ts
|
|
1491
|
-
async function
|
|
1497
|
+
async function Je(e, ...t) {
|
|
1492
1498
|
let n = S(e, ...t);
|
|
1493
1499
|
return n instanceof Promise ? await n : n;
|
|
1494
1500
|
}
|
|
1495
1501
|
//#endregion
|
|
1496
1502
|
//#region src/classes/ApiResponse.ts
|
|
1497
|
-
var
|
|
1503
|
+
var Ye = "d-response-loading", Xe = class {
|
|
1498
1504
|
constructor(e) {
|
|
1499
1505
|
T(this, "requestDefault", void 0), T(this, "first", []), T(this, "response", []), T(this, "loading", void 0), T(this, "devMode", !1), this.requestDefault = e;
|
|
1500
1506
|
}
|
|
@@ -1505,7 +1511,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1505
1511
|
return this.response.filter((e) => e.isForGlobal !== !0);
|
|
1506
1512
|
}
|
|
1507
1513
|
add(e) {
|
|
1508
|
-
return this.response.push(...
|
|
1514
|
+
return this.response.push(...M(e)), this;
|
|
1509
1515
|
}
|
|
1510
1516
|
setDevMode(e) {
|
|
1511
1517
|
return this.devMode = e, this;
|
|
@@ -1539,7 +1545,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1539
1545
|
}
|
|
1540
1546
|
readData(e) {
|
|
1541
1547
|
if (!s()) return;
|
|
1542
|
-
let { path: t = "", method: n =
|
|
1548
|
+
let { path: t = "", method: n = F.get, global: r = n === F.get, devMode: i = !1 } = e;
|
|
1543
1549
|
if (r || this.isDevMode(i)) {
|
|
1544
1550
|
let r = this.requestDefault.request(e.request), a = this.get(t, n, r, i);
|
|
1545
1551
|
if (a) return {
|
|
@@ -1550,9 +1556,9 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1550
1556
|
}
|
|
1551
1557
|
fetch(e, t) {
|
|
1552
1558
|
return this.startResponseLoading(), new Promise((n) => {
|
|
1553
|
-
|
|
1554
|
-
e != null && e.lag ? (
|
|
1555
|
-
this.stopResponseLoading(), n(t),
|
|
1559
|
+
Je(x(e.response) ? e.response(t) : e.response).then((t) => {
|
|
1560
|
+
e != null && e.lag ? (N.show(), setTimeout(() => {
|
|
1561
|
+
this.stopResponseLoading(), n(t), N.hide();
|
|
1556
1562
|
}, f(0, 2e3))) : (this.stopResponseLoading(), n(t));
|
|
1557
1563
|
});
|
|
1558
1564
|
});
|
|
@@ -1561,17 +1567,17 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1561
1567
|
return e.response;
|
|
1562
1568
|
}
|
|
1563
1569
|
startResponseLoading() {
|
|
1564
|
-
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(
|
|
1570
|
+
this.loading && clearTimeout(this.loading), s() && document.body.classList.add(Ye);
|
|
1565
1571
|
}
|
|
1566
1572
|
stopResponseLoading() {
|
|
1567
1573
|
s() && (this.loading = setTimeout(() => {
|
|
1568
|
-
this.loading = void 0, document.body.classList.remove(
|
|
1574
|
+
this.loading = void 0, document.body.classList.remove(Ye);
|
|
1569
1575
|
}, 2400));
|
|
1570
1576
|
}
|
|
1571
|
-
},
|
|
1577
|
+
}, Ze = class {
|
|
1572
1578
|
constructor(e = "/api/", t = {}) {
|
|
1573
1579
|
T(this, "url", void 0), T(this, "headers", void 0), T(this, "requestDefault", void 0), T(this, "status", void 0), T(this, "response", void 0), T(this, "preparation", void 0), T(this, "loading", void 0), T(this, "errorCenter", void 0), T(this, "hydration", void 0), T(this, "timeout", 16e3), T(this, "origin", void 0), this.url = e;
|
|
1574
|
-
let { headersClass: n =
|
|
1580
|
+
let { headersClass: n = We, requestDefaultClass: r = Be, statusClass: i = Le, responseClass: a = Xe, preparationClass: o = qe, loadingClass: s = N.getItem(), errorCenterClass: c = E.getItem(), hydrationClass: l = Ke } = t;
|
|
1575
1581
|
this.headers = new n(), this.requestDefault = new r(), this.status = new i(), this.response = new a(this.requestDefault), this.preparation = new o(), this.loading = s, this.errorCenter = c, this.hydration = new l(), this.hydration.initResponse(this.response);
|
|
1576
1582
|
}
|
|
1577
1583
|
isLocalhost() {
|
|
@@ -1590,14 +1596,14 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1590
1596
|
return this.origin && /^\//.test(this.url) ? `${this.origin}${this.url}` : this.url;
|
|
1591
1597
|
}
|
|
1592
1598
|
getUrl(e, t = !0) {
|
|
1593
|
-
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}",
|
|
1599
|
+
return `${t ? this.getOrigin() : ""}${e}`.replace("{locale}", A.getLocation()).replace("{country}", A.getCountry()).replace("{language}", A.getLanguage());
|
|
1594
1600
|
}
|
|
1595
|
-
getBody(e = {}, t =
|
|
1601
|
+
getBody(e = {}, t = F.get) {
|
|
1596
1602
|
if (e instanceof FormData) return e;
|
|
1597
|
-
if (t !==
|
|
1603
|
+
if (t !== F.get && l(e)) return d(e) ? e : JSON.stringify(e);
|
|
1598
1604
|
}
|
|
1599
|
-
getBodyForGet(e, t = "", n =
|
|
1600
|
-
if (n ===
|
|
1605
|
+
getBodyForGet(e, t = "", n = F.get) {
|
|
1606
|
+
if (n === F.get) {
|
|
1601
1607
|
let n = t.match(/\?/) ? "&" : "?", r = typeof e == "object" ? o(e) : e;
|
|
1602
1608
|
if (l(r)) return `${n}${r}`;
|
|
1603
1609
|
}
|
|
@@ -1633,42 +1639,42 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1633
1639
|
get(e) {
|
|
1634
1640
|
return this.request({
|
|
1635
1641
|
...e,
|
|
1636
|
-
method:
|
|
1642
|
+
method: F.get
|
|
1637
1643
|
});
|
|
1638
1644
|
}
|
|
1639
1645
|
post(e) {
|
|
1640
1646
|
return this.request({
|
|
1641
1647
|
...e,
|
|
1642
|
-
method:
|
|
1648
|
+
method: F.post
|
|
1643
1649
|
});
|
|
1644
1650
|
}
|
|
1645
1651
|
put(e) {
|
|
1646
1652
|
return this.request({
|
|
1647
1653
|
...e,
|
|
1648
|
-
method:
|
|
1654
|
+
method: F.put
|
|
1649
1655
|
});
|
|
1650
1656
|
}
|
|
1651
1657
|
patch(e) {
|
|
1652
1658
|
return this.request({
|
|
1653
1659
|
...e,
|
|
1654
|
-
method:
|
|
1660
|
+
method: F.patch
|
|
1655
1661
|
});
|
|
1656
1662
|
}
|
|
1657
1663
|
delete(e) {
|
|
1658
1664
|
return this.request({
|
|
1659
1665
|
...e,
|
|
1660
|
-
method:
|
|
1666
|
+
method: F.delete
|
|
1661
1667
|
});
|
|
1662
1668
|
}
|
|
1663
1669
|
getRetryDelay(e, t) {
|
|
1664
1670
|
return f(t, t + e * t);
|
|
1665
1671
|
}
|
|
1666
1672
|
async fetch(e, t = 0) {
|
|
1667
|
-
let { method: n =
|
|
1673
|
+
let { method: n = F.get, api: r = !0, path: i = "", hideError: a = !1, hideLoading: o = !1, retry: s = 0, retryDelay: c = 64, globalPreparation: l = !0, globalEnd: u = !0, initError: d = !0, endResetLimit: f = 8 } = e, te = this.getUrl(i, r), p = await this.response.emulator(e);
|
|
1668
1674
|
if (p) return p;
|
|
1669
|
-
let m = await
|
|
1675
|
+
let m = await P.getByFetch(e);
|
|
1670
1676
|
if (m) return this.hydration.toClient(e, m), m;
|
|
1671
|
-
let h = new
|
|
1677
|
+
let h = new Le(), g, _;
|
|
1672
1678
|
o || this.loading.show();
|
|
1673
1679
|
try {
|
|
1674
1680
|
await this.preparation.make(l, e);
|
|
@@ -1677,19 +1683,19 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1677
1683
|
let p = await this.preparation.makeEnd(u, r, e);
|
|
1678
1684
|
if (h.setStatus(r.status, r.statusText), this.status.setStatus(r.status, r.statusText), !a && r.status >= 400) {
|
|
1679
1685
|
var ne;
|
|
1680
|
-
d && (_ = await
|
|
1686
|
+
d && (_ = await Ue.getItem(n, r)), this.makeErrorQuery((ne = _) == null ? r : ne);
|
|
1681
1687
|
}
|
|
1682
1688
|
if (p != null && p.reset && t < f || t < s) return await ee(this.getRetryDelay(t, c)), o || this.loading.hide(), await this.fetch(e, t + 1);
|
|
1683
|
-
g = new
|
|
1689
|
+
g = new ze(e, r, p, _), await g.init();
|
|
1684
1690
|
} catch (e) {
|
|
1685
1691
|
throw a || this.makeError(e), h.setError(String(e)), this.status.setError(String(e)), o || this.loading.hide(), e;
|
|
1686
1692
|
}
|
|
1687
1693
|
h.setLastResponse(g.getData()), this.status.setLastResponse(g.getData());
|
|
1688
1694
|
let v = g.getAndStatus(h);
|
|
1689
|
-
return o || this.loading.hide(), this.hydration.toClient(e, v), await
|
|
1695
|
+
return o || this.loading.hide(), this.hydration.toClient(e, v), await P.setByFetch(e, v), v;
|
|
1690
1696
|
}
|
|
1691
1697
|
async makeQuery(e, t) {
|
|
1692
|
-
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i =
|
|
1698
|
+
let n = this.requestDefault.request(e.request), { pathFull: r = void 0, method: i = F.get, headers: a = {}, type: o = "application/json;charset=UTF-8", init: s = {} } = e, c = r == null ? t : r, l = `${c}${this.getBodyForGet(n, c, i)}`, u = this.headers.getByRequest(e.request, a, o), d = {
|
|
1693
1699
|
...s,
|
|
1694
1700
|
method: i,
|
|
1695
1701
|
body: this.getBody(n, i)
|
|
@@ -1783,12 +1789,12 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1783
1789
|
}, n);
|
|
1784
1790
|
}
|
|
1785
1791
|
}
|
|
1786
|
-
},
|
|
1792
|
+
}, I = class {
|
|
1787
1793
|
static isLocalhost() {
|
|
1788
1794
|
return this.getItem().isLocalhost();
|
|
1789
1795
|
}
|
|
1790
1796
|
static getItem() {
|
|
1791
|
-
return
|
|
1797
|
+
return D.get("__ui:api-instance__", () => new Ze());
|
|
1792
1798
|
}
|
|
1793
1799
|
static getStatus() {
|
|
1794
1800
|
return this.getItem().getStatus();
|
|
@@ -1808,10 +1814,10 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1808
1814
|
static getUrl(e, t = !0) {
|
|
1809
1815
|
return this.getItem().getUrl(e, t);
|
|
1810
1816
|
}
|
|
1811
|
-
static getBody(e = {}, t =
|
|
1817
|
+
static getBody(e = {}, t = F.get) {
|
|
1812
1818
|
return this.getItem().getBody(e, t);
|
|
1813
1819
|
}
|
|
1814
|
-
static getBodyForGet(e, t = "", n =
|
|
1820
|
+
static getBodyForGet(e, t = "", n = F.get) {
|
|
1815
1821
|
return this.getItem().getBodyForGet(e, t, n);
|
|
1816
1822
|
}
|
|
1817
1823
|
static setHeaders(e) {
|
|
@@ -1856,7 +1862,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1856
1862
|
static delete(e) {
|
|
1857
1863
|
return this.getItem().delete(e);
|
|
1858
1864
|
}
|
|
1859
|
-
},
|
|
1865
|
+
}, Qe = class {
|
|
1860
1866
|
constructor(e, t, n, r = E.getItem()) {
|
|
1861
1867
|
if (T(this, "callback", void 0), T(this, "callbackError", void 0), T(this, "channel", void 0), T(this, "update", (e) => {
|
|
1862
1868
|
var t;
|
|
@@ -1865,7 +1871,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1865
1871
|
var t;
|
|
1866
1872
|
return (t = this.callbackError) == null || t.call(this, e), this;
|
|
1867
1873
|
}), this.callback = t, this.callbackError = n, s()) try {
|
|
1868
|
-
this.channel = new BroadcastChannel(`${
|
|
1874
|
+
this.channel = new BroadcastChannel(`${$e()}__${e}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1869
1875
|
} catch (e) {
|
|
1870
1876
|
r.on({
|
|
1871
1877
|
group: "broadcast",
|
|
@@ -1891,7 +1897,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1891
1897
|
var e;
|
|
1892
1898
|
return (e = this.channel) == null || e.close(), this.channel = void 0, this;
|
|
1893
1899
|
}
|
|
1894
|
-
},
|
|
1900
|
+
}, $e = () => new O("__ui:broadcast-name__").get(() => `name_${f(1e6, 9999999)}`), et = class {
|
|
1895
1901
|
constructor(e) {
|
|
1896
1902
|
T(this, "callback", void 0), T(this, "cache", void 0), T(this, "cacheOld", void 0), T(this, "comparisons", []), this.callback = e;
|
|
1897
1903
|
}
|
|
@@ -1913,7 +1919,7 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1913
1919
|
isUpdate(e) {
|
|
1914
1920
|
return this.cache === void 0 || this.comparisons.length !== e.length || this.comparisons.findIndex((t, n) => t !== e[n]) >= 0 ? (this.comparisons = [...e], !0) : !1;
|
|
1915
1921
|
}
|
|
1916
|
-
},
|
|
1922
|
+
}, tt = class {
|
|
1917
1923
|
constructor() {
|
|
1918
1924
|
T(this, "cache", {});
|
|
1919
1925
|
}
|
|
@@ -1924,11 +1930,11 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1924
1930
|
return await this.getCacheItem(e, t).getCacheAsync(n == null ? [] : n);
|
|
1925
1931
|
}
|
|
1926
1932
|
getCacheItem(e, t) {
|
|
1927
|
-
return e in this.cache || (this.cache[e] = new
|
|
1933
|
+
return e in this.cache || (this.cache[e] = new et(t)), this.cache[e];
|
|
1928
1934
|
}
|
|
1929
|
-
},
|
|
1935
|
+
}, nt = class {
|
|
1930
1936
|
static getItem() {
|
|
1931
|
-
return
|
|
1937
|
+
return D.get("__ui:cache-static__", () => new tt());
|
|
1932
1938
|
}
|
|
1933
1939
|
static get(e, t, n) {
|
|
1934
1940
|
return this.getItem().get(e, t, n);
|
|
@@ -1939,41 +1945,41 @@ var Je = "d-response-loading", Ye = class {
|
|
|
1939
1945
|
};
|
|
1940
1946
|
//#endregion
|
|
1941
1947
|
//#region src/functions/toDate.ts
|
|
1942
|
-
function
|
|
1948
|
+
function L(e) {
|
|
1943
1949
|
var t, n, r, i, a, o, s, l;
|
|
1944
1950
|
if (e instanceof Date) return e;
|
|
1945
1951
|
if (c(e)) return /* @__PURE__ */ new Date();
|
|
1946
1952
|
if (typeof e == "number") return new Date(e);
|
|
1947
|
-
let u = e, d =
|
|
1953
|
+
let u = e, d = A.getTimezoneFormat().trim();
|
|
1948
1954
|
e.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (e, t, n) => (u = t, d = n.trim(), e));
|
|
1949
1955
|
let f = (t = (n = (r = (i = (a = (o = (s = (l = /^\d{4}\d{2}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) == null ? /^\d{4}\d{2}$/.exec(u) && `${u.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00` : l) == null ? /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(u) && u.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6") : s) == null ? /^\d{4}-\d{2}-\d{2}$/.exec(u) && `${u}T00:00:00` : o) == null ? /^\d{4}-\d{2}$/.exec(u) && `${u}-01T00:00:00` : a) == null ? /^\d{4}$/.exec(u) && `${u}-01-01T00:00:00` : i) == null ? /^\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}:00` : r) == null ? /^\d{2}:\d{2}:\d{2}$/.exec(u) && `2000-01-01T${u}` : n) == null ? u.replace(" ", "T") : t;
|
|
1950
1956
|
return /* @__PURE__ */ new Date(`${f.trim()}${d}`);
|
|
1951
1957
|
}
|
|
1952
1958
|
//#endregion
|
|
1953
1959
|
//#region src/functions/getColumn.ts
|
|
1954
|
-
function
|
|
1960
|
+
function rt(e, t) {
|
|
1955
1961
|
return r(e, (e) => e == null ? void 0 : e[t], !0);
|
|
1956
1962
|
}
|
|
1957
1963
|
//#endregion
|
|
1958
1964
|
//#region src/classes/GeoIntl.ts
|
|
1959
|
-
var
|
|
1960
|
-
static isItem(e =
|
|
1961
|
-
return this.getLocation(e) in
|
|
1965
|
+
var R = class e {
|
|
1966
|
+
static isItem(e = A.getLocation()) {
|
|
1967
|
+
return this.getLocation(e) in B;
|
|
1962
1968
|
}
|
|
1963
|
-
static getLocation(e =
|
|
1964
|
-
if (e in
|
|
1965
|
-
let t =
|
|
1966
|
-
return
|
|
1969
|
+
static getLocation(e = A.getLocation()) {
|
|
1970
|
+
if (e in z) return z[e];
|
|
1971
|
+
let t = A.find(e);
|
|
1972
|
+
return z[e] = t.standard, t.standard;
|
|
1967
1973
|
}
|
|
1968
|
-
static getInstance(t =
|
|
1974
|
+
static getInstance(t = A.getLocation()) {
|
|
1969
1975
|
let n = this.getLocation(t);
|
|
1970
|
-
return n in
|
|
1976
|
+
return n in B ? B[n] : new e(t);
|
|
1971
1977
|
}
|
|
1972
|
-
constructor(e =
|
|
1973
|
-
T(this, "errorCenter", void 0), T(this, "geo", void 0), this.errorCenter = t, this.geo =
|
|
1978
|
+
constructor(e = A.getLocation(), t = E.getItem()) {
|
|
1979
|
+
T(this, "errorCenter", void 0), T(this, "geo", void 0), this.errorCenter = t, this.geo = A.find(e);
|
|
1974
1980
|
let n = this.getLocation();
|
|
1975
|
-
if (n in
|
|
1976
|
-
|
|
1981
|
+
if (n in B) return B[n];
|
|
1982
|
+
z[e] = n, B[n] = this;
|
|
1977
1983
|
}
|
|
1978
1984
|
getLocation() {
|
|
1979
1985
|
return this.geo.standard;
|
|
@@ -2004,7 +2010,7 @@ var z = class e {
|
|
|
2004
2010
|
type: "language",
|
|
2005
2011
|
style: t
|
|
2006
2012
|
};
|
|
2007
|
-
return this.display(
|
|
2013
|
+
return this.display(A.getByCode(e).language, n);
|
|
2008
2014
|
}
|
|
2009
2015
|
countryName(e, t) {
|
|
2010
2016
|
let n = {
|
|
@@ -2048,7 +2054,7 @@ var z = class e {
|
|
|
2048
2054
|
}, i = e.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...e) => (r.currency = String(e[2]).toUpperCase(), String(e[1])));
|
|
2049
2055
|
if (n) {
|
|
2050
2056
|
let t = this.numberObject(r);
|
|
2051
|
-
return t ?
|
|
2057
|
+
return t ? rt(t.formatToParts(y(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
2052
2058
|
} else if ("currency" in r) return this.number(typeof e == "number" ? e : i, r);
|
|
2053
2059
|
else return this.number(typeof e == "number" ? e : i, {
|
|
2054
2060
|
...r,
|
|
@@ -2129,18 +2135,18 @@ var z = class e {
|
|
|
2129
2135
|
return `${this.number(a, r)} ${(i = o == null ? void 0 : o[0]) == null ? "" : i}`.trim();
|
|
2130
2136
|
}
|
|
2131
2137
|
date(e, t, n, r) {
|
|
2132
|
-
let i =
|
|
2138
|
+
let i = L(e), a = typeof n == "string", o = this.dateOptions(t, a ? n : "short");
|
|
2133
2139
|
return r && (o.hour12 = !1), a || Object.assign(o, n), i.toLocaleString(this.getLocation(), o);
|
|
2134
2140
|
}
|
|
2135
2141
|
relative(e, t, n) {
|
|
2136
|
-
let r =
|
|
2142
|
+
let r = L(e), i = n || /* @__PURE__ */ new Date(), a = {
|
|
2137
2143
|
numeric: "auto",
|
|
2138
2144
|
...typeof t == "string" ? { style: t } : t || {}
|
|
2139
2145
|
}, o = "second", s = (r.getTime() - i.getTime()) / 1e3;
|
|
2140
2146
|
return Math.abs(s) >= 60 && (o = "minute", s /= 60, Math.abs(s) >= 60 && (o = "hour", s /= 60, Math.abs(s) >= 24 && (o = "day", s /= 24, Math.abs(s) >= 30 && (o = "month", s /= 30, Math.abs(s) >= 12 && (o = "year", s /= 12))))), this.relativeByValue(s, o, a);
|
|
2141
2147
|
}
|
|
2142
2148
|
relativeLimit(e, t, n, r, i, a, o) {
|
|
2143
|
-
let s =
|
|
2149
|
+
let s = L(e), c = n || /* @__PURE__ */ new Date(), l = new Date(c), u = new Date(c);
|
|
2144
2150
|
return l.setDate(c.getDate() - t), u.setDate(c.getDate() + t), s >= l && s <= u ? this.relative(s, r, c) : this.date(s, a, i, o);
|
|
2145
2151
|
}
|
|
2146
2152
|
relativeByValue(e, t, n) {
|
|
@@ -2161,7 +2167,7 @@ var z = class e {
|
|
|
2161
2167
|
}
|
|
2162
2168
|
month(e, t) {
|
|
2163
2169
|
try {
|
|
2164
|
-
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(
|
|
2170
|
+
if (this.hasIntlDateTimeFormat()) return Intl.DateTimeFormat(this.getLocation(), { month: t || "long" }).format(L(e));
|
|
2165
2171
|
} catch (e) {
|
|
2166
2172
|
this.errorCenter.on({
|
|
2167
2173
|
group: "intl",
|
|
@@ -2195,7 +2201,7 @@ var z = class e {
|
|
|
2195
2201
|
}
|
|
2196
2202
|
weekday(e, t) {
|
|
2197
2203
|
try {
|
|
2198
|
-
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(
|
|
2204
|
+
if (this.hasIntlDateTimeFormat()) return new Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }).format(L(e));
|
|
2199
2205
|
} catch (e) {
|
|
2200
2206
|
this.errorCenter.on({
|
|
2201
2207
|
group: "intl",
|
|
@@ -2297,15 +2303,15 @@ var z = class e {
|
|
|
2297
2303
|
"second"
|
|
2298
2304
|
].indexOf(e) !== -1 && (n.second = "2-digit")), n;
|
|
2299
2305
|
}
|
|
2300
|
-
},
|
|
2301
|
-
constructor(e, t = "date", n =
|
|
2302
|
-
T(this, "type", void 0), T(this, "code", void 0), T(this, "date", void 0), T(this, "hour24", !1), T(this, "watch", void 0), this.type = t, this.code = n, this.date =
|
|
2306
|
+
}, z = {}, B = {}, it = class e {
|
|
2307
|
+
constructor(e, t = "date", n = A.getLocation()) {
|
|
2308
|
+
T(this, "type", void 0), T(this, "code", void 0), T(this, "date", void 0), T(this, "hour24", !1), T(this, "watch", void 0), this.type = t, this.code = n, this.date = L(e), isNaN(this.date.getTime()) && E.on({
|
|
2303
2309
|
group: "intl",
|
|
2304
2310
|
code: "invalid"
|
|
2305
2311
|
});
|
|
2306
2312
|
}
|
|
2307
2313
|
getIntl() {
|
|
2308
|
-
return
|
|
2314
|
+
return R.getInstance(this.code);
|
|
2309
2315
|
}
|
|
2310
2316
|
getDate() {
|
|
2311
2317
|
return this.date;
|
|
@@ -2408,7 +2414,7 @@ var z = class e {
|
|
|
2408
2414
|
].indexOf(this.type) !== -1 && (i = n.locale("time"))), `${r.join("-")}${i ? `T${i}${t ? n.getTimeZone() : ""}` : ""}`;
|
|
2409
2415
|
}
|
|
2410
2416
|
setDate(e) {
|
|
2411
|
-
return this.date =
|
|
2417
|
+
return this.date = L(e), this.update(), this;
|
|
2412
2418
|
}
|
|
2413
2419
|
setType(e) {
|
|
2414
2420
|
return this.type = e, this.update(), this;
|
|
@@ -2560,22 +2566,22 @@ var z = class e {
|
|
|
2560
2566
|
};
|
|
2561
2567
|
//#endregion
|
|
2562
2568
|
//#region src/functions/getItemByPath.ts
|
|
2563
|
-
function
|
|
2569
|
+
function V(e, n) {
|
|
2564
2570
|
var r;
|
|
2565
2571
|
if (!l(n, !0)) return;
|
|
2566
2572
|
let i = ae(n, ".", 2), a = i[0];
|
|
2567
|
-
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ?
|
|
2573
|
+
return a && e != null && e[a] && t(e[a]) && i != null && i[1] ? V(e[a], i[1]) : (r = e == null ? void 0 : e[a]) == null ? void 0 : r;
|
|
2568
2574
|
}
|
|
2569
2575
|
//#endregion
|
|
2570
2576
|
//#region src/functions/toCamelCase.ts
|
|
2571
|
-
function
|
|
2577
|
+
function at(e) {
|
|
2572
2578
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...e) => `${String(e[1]).toUpperCase()}`).replace(/^([A-Z])/, (e) => `${e.toLowerCase()}`);
|
|
2573
2579
|
}
|
|
2574
2580
|
//#endregion
|
|
2575
2581
|
//#region src/types/formattersTypes.ts
|
|
2576
|
-
var
|
|
2582
|
+
var H = /* @__PURE__ */ function(e) {
|
|
2577
2583
|
return e.currency = "currency", e.date = "date", e.name = "name", e.number = "number", e.plural = "plural", e.unit = "unit", e;
|
|
2578
|
-
}({}),
|
|
2584
|
+
}({}), ot = class {
|
|
2579
2585
|
constructor(e, t) {
|
|
2580
2586
|
T(this, "options", void 0), T(this, "list", void 0), this.options = e, this.list = t;
|
|
2581
2587
|
}
|
|
@@ -2589,7 +2595,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2589
2595
|
return this.list ? this.isArray() ? this.list.length : 1 : 0;
|
|
2590
2596
|
}
|
|
2591
2597
|
getList() {
|
|
2592
|
-
return this.list ?
|
|
2598
|
+
return this.list ? M(this.list) : [];
|
|
2593
2599
|
}
|
|
2594
2600
|
getOptions() {
|
|
2595
2601
|
return this.options;
|
|
@@ -2607,50 +2613,50 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2607
2613
|
getFormatData(e) {
|
|
2608
2614
|
let t = {};
|
|
2609
2615
|
return r(this.options, (n, r) => {
|
|
2610
|
-
let i = `${
|
|
2616
|
+
let i = `${at(r)}Format`, a = V(e, r);
|
|
2611
2617
|
n != null && n.transformation ? l(a) ? t[i] = n.transformation(a, e, n.options) : t[i] = "" : t[i] = this.transformation(a, e, n.type, n.options);
|
|
2612
2618
|
}), t;
|
|
2613
2619
|
}
|
|
2614
2620
|
transformation(e, t, n, r) {
|
|
2615
|
-
if (l(e) || n ===
|
|
2616
|
-
case
|
|
2617
|
-
case
|
|
2618
|
-
case
|
|
2619
|
-
case
|
|
2620
|
-
case
|
|
2621
|
-
case
|
|
2621
|
+
if (l(e) || n === H.name) switch (n) {
|
|
2622
|
+
case H.currency: return this.formatCurrency(e, t, r);
|
|
2623
|
+
case H.date: return this.formatDate(e, r);
|
|
2624
|
+
case H.name: return this.formatName(t, r);
|
|
2625
|
+
case H.number: return this.formatNumber(e, r);
|
|
2626
|
+
case H.plural: return this.formatPlural(e, r);
|
|
2627
|
+
case H.unit: return this.formatUnit(e, r);
|
|
2622
2628
|
default: return String(e);
|
|
2623
2629
|
}
|
|
2624
2630
|
return "";
|
|
2625
2631
|
}
|
|
2626
2632
|
formatCurrency(e, t, n) {
|
|
2627
2633
|
var r;
|
|
2628
|
-
let i = n != null && n.currencyPropName ?
|
|
2629
|
-
return
|
|
2634
|
+
let i = n != null && n.currencyPropName ? V(t, n.currencyPropName) : t == null ? void 0 : t.currency;
|
|
2635
|
+
return R.getInstance().currency(e, (r = n == null ? void 0 : n.options) == null ? i : r, n == null ? void 0 : n.numberOnly);
|
|
2630
2636
|
}
|
|
2631
2637
|
formatDate(e, t) {
|
|
2632
|
-
return
|
|
2638
|
+
return R.getInstance().date(e, t == null ? void 0 : t.type, t == null ? void 0 : t.options, t == null ? void 0 : t.hour24);
|
|
2633
2639
|
}
|
|
2634
2640
|
formatName(e, t) {
|
|
2635
2641
|
var n, r, i;
|
|
2636
|
-
let a =
|
|
2637
|
-
return a && o ?
|
|
2642
|
+
let a = V(e, (n = t == null ? void 0 : t.lastPropName) == null ? "lastName" : n), o = V(e, (r = t == null ? void 0 : t.firstPropName) == null ? "firstName" : r), s = V(e, (i = t == null ? void 0 : t.surname) == null ? "surname" : i);
|
|
2643
|
+
return a && o ? R.getInstance().fullName(a, o, s, t == null ? void 0 : t.short) : "";
|
|
2638
2644
|
}
|
|
2639
2645
|
formatNumber(e, t) {
|
|
2640
|
-
return
|
|
2646
|
+
return R.getInstance().number(e, t == null ? void 0 : t.options);
|
|
2641
2647
|
}
|
|
2642
2648
|
formatPlural(e, t) {
|
|
2643
|
-
return t && t.words ?
|
|
2649
|
+
return t && t.words ? R.getInstance().plural(e, t == null ? void 0 : t.words, t == null ? void 0 : t.options, t == null ? void 0 : t.optionsNumber) : e;
|
|
2644
2650
|
}
|
|
2645
2651
|
formatUnit(e, t) {
|
|
2646
|
-
return t && t.unit ?
|
|
2652
|
+
return t && t.unit ? R.getInstance().unit(e, t.unit) : e;
|
|
2647
2653
|
}
|
|
2648
|
-
},
|
|
2649
|
-
constructor(e =
|
|
2654
|
+
}, st = "f", ct = class e {
|
|
2655
|
+
constructor(e = A.getLocation()) {
|
|
2650
2656
|
T(this, "code", void 0), this.code = e;
|
|
2651
2657
|
}
|
|
2652
2658
|
get(t = this.getCode()) {
|
|
2653
|
-
let n =
|
|
2659
|
+
let n = A.find(t);
|
|
2654
2660
|
if (n) {
|
|
2655
2661
|
var r;
|
|
2656
2662
|
let t = this.getCountry(n);
|
|
@@ -2666,7 +2672,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2666
2672
|
}
|
|
2667
2673
|
}
|
|
2668
2674
|
getCode() {
|
|
2669
|
-
return this.code ||
|
|
2675
|
+
return this.code || A.getLocation();
|
|
2670
2676
|
}
|
|
2671
2677
|
getFlag(e = this.getCode()) {
|
|
2672
2678
|
var t;
|
|
@@ -2674,7 +2680,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2674
2680
|
}
|
|
2675
2681
|
getList(e, t = !0) {
|
|
2676
2682
|
let n = r(this.getCodes(e), (e) => this.get(e));
|
|
2677
|
-
return t ? new
|
|
2683
|
+
return t ? new R().sort(n, (e, t) => [e.label, t.label]) : n;
|
|
2678
2684
|
}
|
|
2679
2685
|
getNational(t, n = !0) {
|
|
2680
2686
|
let i = r(this.getList(t, !1), (t) => {
|
|
@@ -2686,13 +2692,13 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2686
2692
|
nationalCountry: n == null ? void 0 : n.country
|
|
2687
2693
|
};
|
|
2688
2694
|
});
|
|
2689
|
-
return n ? new
|
|
2695
|
+
return n ? new R().sort(i, (e, t) => [e.label, t.label]) : i;
|
|
2690
2696
|
}
|
|
2691
2697
|
setCode(e) {
|
|
2692
2698
|
return this.code = e, this;
|
|
2693
2699
|
}
|
|
2694
2700
|
getLocation() {
|
|
2695
|
-
return new
|
|
2701
|
+
return new R(this.code);
|
|
2696
2702
|
}
|
|
2697
2703
|
getCodes(t) {
|
|
2698
2704
|
return t == null ? Object.keys(e.flags) : t;
|
|
@@ -2704,7 +2710,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
2704
2710
|
return this.getLocation().countryName(e.country);
|
|
2705
2711
|
}
|
|
2706
2712
|
};
|
|
2707
|
-
T(
|
|
2713
|
+
T(ct, "flags", {
|
|
2708
2714
|
AD: "f-ad",
|
|
2709
2715
|
AE: "f-ae",
|
|
2710
2716
|
AF: "f-af",
|
|
@@ -2949,7 +2955,7 @@ T(st, "flags", {
|
|
|
2949
2955
|
});
|
|
2950
2956
|
//#endregion
|
|
2951
2957
|
//#region src/classes/GeoPhone.ts
|
|
2952
|
-
var
|
|
2958
|
+
var lt = class {
|
|
2953
2959
|
static get(e) {
|
|
2954
2960
|
return this.getList().find((t) => e === t.value);
|
|
2955
2961
|
}
|
|
@@ -3005,11 +3011,11 @@ var ct = class {
|
|
|
3005
3011
|
return (t = (n = e.match(/\*/g)) == null ? void 0 : n.length) == null ? 0 : t;
|
|
3006
3012
|
}
|
|
3007
3013
|
static makeList() {
|
|
3008
|
-
let e = r(
|
|
3014
|
+
let e = r(A.getList(), (e) => {
|
|
3009
3015
|
if (e != null && e.phoneMask) return {
|
|
3010
3016
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/g, "")) || void 0,
|
|
3011
3017
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3012
|
-
mask:
|
|
3018
|
+
mask: M(e.phoneMask),
|
|
3013
3019
|
value: e.country
|
|
3014
3020
|
};
|
|
3015
3021
|
});
|
|
@@ -3048,12 +3054,12 @@ var ct = class {
|
|
|
3048
3054
|
return e.replace(/\*/, this.getWithinSymbol(t));
|
|
3049
3055
|
}
|
|
3050
3056
|
};
|
|
3051
|
-
T(
|
|
3057
|
+
T(lt, "list", void 0), T(lt, "map", void 0);
|
|
3052
3058
|
//#endregion
|
|
3053
3059
|
//#region src/classes/Global.ts
|
|
3054
|
-
var
|
|
3060
|
+
var ut = class {
|
|
3055
3061
|
static getItem() {
|
|
3056
|
-
return
|
|
3062
|
+
return D.get("__ui:global-instance__", () => ({}));
|
|
3057
3063
|
}
|
|
3058
3064
|
static get(e) {
|
|
3059
3065
|
var t;
|
|
@@ -3063,7 +3069,7 @@ var lt = class {
|
|
|
3063
3069
|
let t = this.getItem();
|
|
3064
3070
|
Object.keys(t).length > 0 || Object.assign(t, e);
|
|
3065
3071
|
}
|
|
3066
|
-
},
|
|
3072
|
+
}, dt = class {
|
|
3067
3073
|
constructor() {
|
|
3068
3074
|
T(this, "hash", void 0), T(this, "watch", {}), T(this, "block", !1), T(this, "time", void 0);
|
|
3069
3075
|
}
|
|
@@ -3129,9 +3135,9 @@ var lt = class {
|
|
|
3129
3135
|
((r = this.hash) == null ? void 0 : r[n]) !== (e == null ? void 0 : e[n]) && t.forEach((t) => t(e[n]));
|
|
3130
3136
|
}), this;
|
|
3131
3137
|
}
|
|
3132
|
-
},
|
|
3138
|
+
}, ft = class {
|
|
3133
3139
|
static getItem() {
|
|
3134
|
-
return
|
|
3140
|
+
return D.get("__ui:hash-instance__", () => new dt());
|
|
3135
3141
|
}
|
|
3136
3142
|
static get(e, t) {
|
|
3137
3143
|
return this.getItem().get(e, t);
|
|
@@ -3148,29 +3154,29 @@ var lt = class {
|
|
|
3148
3154
|
static reload() {
|
|
3149
3155
|
this.getItem().reload();
|
|
3150
3156
|
}
|
|
3151
|
-
},
|
|
3157
|
+
}, pt = 320, mt = "--LOAD--", ht = class {
|
|
3152
3158
|
static is(e) {
|
|
3153
3159
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3154
3160
|
}
|
|
3155
3161
|
static async get(e, t = "", n = 1e3 * 60 * 3) {
|
|
3156
3162
|
let r = this.getRaw(e, t);
|
|
3157
|
-
return typeof r == "string" ? r ===
|
|
3163
|
+
return typeof r == "string" ? r === mt && n > 0 ? (await this.wait(), this.get(e, t, n - pt)) : r : x(r) ? await r() : await r;
|
|
3158
3164
|
}
|
|
3159
3165
|
static getAsync(e, t = "") {
|
|
3160
3166
|
let n = this.getRaw(e, t);
|
|
3161
|
-
return typeof n == "string" && n !==
|
|
3167
|
+
return typeof n == "string" && n !== mt ? n : "";
|
|
3162
3168
|
}
|
|
3163
3169
|
static getNameList() {
|
|
3164
3170
|
return r(this.icons, (e, t) => t.replace(/^@/, ""));
|
|
3165
3171
|
}
|
|
3166
3172
|
static getUrlGlobal() {
|
|
3167
|
-
return `${
|
|
3173
|
+
return `${I.isLocalhost(), ""}${this.url}`;
|
|
3168
3174
|
}
|
|
3169
3175
|
static add(e, t) {
|
|
3170
3176
|
this.icons[this.getName(e)] = t;
|
|
3171
3177
|
}
|
|
3172
3178
|
static addLoad(e) {
|
|
3173
|
-
this.icons[this.getName(e)] =
|
|
3179
|
+
this.icons[this.getName(e)] = mt;
|
|
3174
3180
|
}
|
|
3175
3181
|
static addGlobal(e, t) {
|
|
3176
3182
|
this.icons[this.getName(e)] = `${this.getUrlGlobal()}${t}`;
|
|
@@ -3192,22 +3198,22 @@ var lt = class {
|
|
|
3192
3198
|
return (n = (r = (i = this.icons) == null ? void 0 : i[this.getName(e)]) == null ? (a = this.icons) == null ? void 0 : a[e] : r) == null ? `${e.replace(/^@/, t || this.url)}.svg` : n;
|
|
3193
3199
|
}
|
|
3194
3200
|
static wait() {
|
|
3195
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
3201
|
+
return new Promise((e) => setTimeout(() => e(), pt));
|
|
3196
3202
|
}
|
|
3197
3203
|
};
|
|
3198
|
-
T(
|
|
3204
|
+
T(ht, "icons", {}), T(ht, "url", "/icons/");
|
|
3199
3205
|
//#endregion
|
|
3200
3206
|
//#region src/functions/getElementItem.ts
|
|
3201
|
-
function
|
|
3207
|
+
function gt(e, t, n) {
|
|
3202
3208
|
var r, i;
|
|
3203
|
-
return (r = (i =
|
|
3209
|
+
return (r = (i = j(e)) == null ? void 0 : i[t]) == null ? n : r;
|
|
3204
3210
|
}
|
|
3205
3211
|
//#endregion
|
|
3206
3212
|
//#region src/functions/setElementItem.ts
|
|
3207
|
-
function
|
|
3208
|
-
let a =
|
|
3213
|
+
function _t(e, n, i) {
|
|
3214
|
+
let a = j(e);
|
|
3209
3215
|
if (a) {
|
|
3210
|
-
let e =
|
|
3216
|
+
let e = gt(a, n);
|
|
3211
3217
|
if (t(e) && t(i)) r(i, (t, n) => {
|
|
3212
3218
|
e[n] = S(t);
|
|
3213
3219
|
});
|
|
@@ -3220,31 +3226,31 @@ function gt(e, n, i) {
|
|
|
3220
3226
|
}
|
|
3221
3227
|
//#endregion
|
|
3222
3228
|
//#region src/functions/createElement.ts
|
|
3223
|
-
function
|
|
3229
|
+
function U(e, t = "div", i, a) {
|
|
3224
3230
|
if (!s()) return;
|
|
3225
3231
|
let o = document.createElement(t);
|
|
3226
3232
|
return typeof i == "function" ? i(o) : n(i) && r(i, (e, t) => {
|
|
3227
|
-
|
|
3233
|
+
_t(o, t, e);
|
|
3228
3234
|
}), e == null || e.insertBefore(o, a == null ? null : a), o;
|
|
3229
3235
|
}
|
|
3230
3236
|
//#endregion
|
|
3231
3237
|
//#region src/functions/encodeAttribute.ts
|
|
3232
|
-
var
|
|
3238
|
+
var vt = {
|
|
3233
3239
|
"&": "&",
|
|
3234
3240
|
"<": "<",
|
|
3235
3241
|
">": ">",
|
|
3236
3242
|
"\"": """,
|
|
3237
3243
|
"'": "'"
|
|
3238
3244
|
};
|
|
3239
|
-
function
|
|
3245
|
+
function W(e) {
|
|
3240
3246
|
return String(e).replace(/[&<>"']/g, (e) => {
|
|
3241
3247
|
var t;
|
|
3242
|
-
return (t =
|
|
3248
|
+
return (t = vt == null ? void 0 : vt[e]) == null ? e : t;
|
|
3243
3249
|
});
|
|
3244
3250
|
}
|
|
3245
3251
|
//#endregion
|
|
3246
3252
|
//#region src/classes/MetaManager.ts
|
|
3247
|
-
var
|
|
3253
|
+
var G = class {
|
|
3248
3254
|
constructor(e, t = !1) {
|
|
3249
3255
|
T(this, "listMeta", void 0), T(this, "isProperty", void 0), T(this, "items", {}), this.listMeta = e, this.isProperty = t, this.update();
|
|
3250
3256
|
}
|
|
@@ -3286,13 +3292,13 @@ var K = class {
|
|
|
3286
3292
|
let r = this.findMetaElement(e);
|
|
3287
3293
|
if (r) return r.content = n, this;
|
|
3288
3294
|
let i = { content: n };
|
|
3289
|
-
return this.isProperty ? i.property = e : i.name = e,
|
|
3295
|
+
return this.isProperty ? i.property = e : i.name = e, U(document.head, "meta", i), this;
|
|
3290
3296
|
}
|
|
3291
3297
|
toHtmlString(e) {
|
|
3292
3298
|
var t;
|
|
3293
3299
|
let n = (t = this.items[e]) == null ? "" : t;
|
|
3294
3300
|
if (e === "title") return "";
|
|
3295
|
-
let r =
|
|
3301
|
+
let r = W(n);
|
|
3296
3302
|
return r ? `<meta ${this.getAttributeName()}="${e}" content="${r}">` : "";
|
|
3297
3303
|
}
|
|
3298
3304
|
toHtmlTitle(e) {
|
|
@@ -3304,121 +3310,121 @@ var K = class {
|
|
|
3304
3310
|
this.items[e] = (t = (n = this.findMetaElement(e)) == null ? void 0 : n.content) == null ? "" : t;
|
|
3305
3311
|
}), this;
|
|
3306
3312
|
}
|
|
3307
|
-
},
|
|
3313
|
+
}, K = /* @__PURE__ */ function(e) {
|
|
3308
3314
|
return e.title = "title", e.description = "description", e.keywords = "keywords", e.canonical = "canonical", e.robots = "robots", e.author = "author", e;
|
|
3309
|
-
}({}),
|
|
3315
|
+
}({}), yt = /* @__PURE__ */ function(e) {
|
|
3310
3316
|
return e.indexFollow = "index, follow", e.noIndexFollow = "noindex, follow", e.indexNoFollow = "index, nofollow", e.noIndexNoFollow = "noindex, nofollow", e.noArchive = "noarchive", e.noSnippet = "nosnippet", e.noImageIndex = "noimageindex", e.images = "images", e.noTranslate = "notranslate", e.noPreview = "nopreview", e.textOnly = "textonly", e.noIndexSubpages = "noindex, noarchive", e.none = "none", e;
|
|
3311
|
-
}({}),
|
|
3317
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
3312
3318
|
return e.title = "og:title", e.type = "og:type", e.url = "og:url", e.image = "og:image", e.description = "og:description", e.locale = "og:locale", e.siteName = "og:site_name", e.localeAlternate = "og:locale:alternate", e.imageUrl = "og:image:url", e.imageSecureUrl = "og:image:secure_url", e.imageType = "og:image:type", e.imageWidth = "og:image:width", e.imageHeight = "og:image:height", e.imageAlt = "og:image:alt", e.video = "og:video", e.videoUrl = "og:video:url", e.videoSecureUrl = "og:video:secure_url", e.videoType = "og:video:type", e.videoWidth = "og:video:width", e.videoHeight = "og:video:height", e.audio = "og:audio", e.audioSecureUrl = "og:audio:secure_url", e.audioType = "og:audio:type", e.articlePublishedTime = "article:published_time", e.articleModifiedTime = "article:modified_time", e.articleExpirationTime = "article:expiration_time", e.articleAuthor = "article:author", e.articleSection = "article:section", e.articleTag = "article:tag", e.bookAuthor = "book:author", e.bookIsbn = "book:isbn", e.bookReleaseDate = "book:release_date", e.bookTag = "book:tag", e.musicDuration = "music:duration", e.musicAlbum = "music:album", e.musicAlbumDisc = "music:album:disc", e.musicAlbumTrack = "music:album:track", e.musicMusician = "music:musician", e.musicSong = "music:song", e.musicSongDisc = "music:song:disc", e.musicSongTrack = "music:song:track", e.musicReleaseDate = "music:release_date", e.musicCreator = "music:creator", e.videoActor = "video:actor", e.videoActorRole = "video:actor:role", e.videoDirector = "video:director", e.videoWriter = "video:writer", e.videoDuration = "video:duration", e.videoReleaseDate = "video:release_date", e.videoTag = "video:tag", e.videoSeries = "video:series", e.profileFirstName = "profile:first_name", e.profileLastName = "profile:last_name", e.profileUsername = "profile:username", e.profileGender = "profile:gender", e.productBrand = "product:brand", e.productAvailability = "product:availability", e.productCondition = "product:condition", e.productPriceAmount = "product:price:amount", e.productPriceCurrency = "product:price:currency", e.productRetailerItemId = "product:retailer_item_id", e.productCategory = "product:category", e.productEan = "product:ean", e.productIsbn = "product:isbn", e.productMfrPartNo = "product:mfr_part_no", e.productUpc = "product:upc", e.productWeightValue = "product:weight:value", e.productWeightUnits = "product:weight:units", e.productColor = "product:color", e.productMaterial = "product:material", e.productPattern = "product:pattern", e.productAgeGroup = "product:age_group", e.productGender = "product:gender", e;
|
|
3313
|
-
}({}), yt = /* @__PURE__ */ function(e) {
|
|
3314
|
-
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3315
3319
|
}({}), bt = /* @__PURE__ */ function(e) {
|
|
3316
|
-
return e.
|
|
3320
|
+
return e.website = "website", e.article = "article", e.video = "video.other", e.videoTvShow = "video.tv_show", e.videoEpisode = "video.episode", e.videoMovie = "video.movie", e.musicAlbum = "music.album", e.musicPlaylist = "music.playlist", e.musicSong = "music.song", e.musicRadioStation = "music.radio_station", e.app = "app", e.product = "product", e.business = "business.business", e.place = "place", e.event = "event", e.profile = "profile", e.book = "book", e;
|
|
3317
3321
|
}({}), xt = /* @__PURE__ */ function(e) {
|
|
3318
|
-
return e.
|
|
3322
|
+
return e.inStock = "in stock", e.outOfStock = "out of stock", e.preorder = "preorder", e.backorder = "backorder", e.discontinued = "discontinued", e.pending = "pending", e;
|
|
3319
3323
|
}({}), St = /* @__PURE__ */ function(e) {
|
|
3320
|
-
return e.
|
|
3324
|
+
return e.new = "new", e.used = "used", e.refurbished = "refurbished", e;
|
|
3321
3325
|
}({}), Ct = /* @__PURE__ */ function(e) {
|
|
3326
|
+
return e.newborn = "newborn", e.infant = "infant", e.toddler = "toddler", e.kids = "kids", e.adult = "adult", e;
|
|
3327
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
3322
3328
|
return e.female = "female", e.male = "male", e.unisex = "unisex", e;
|
|
3323
|
-
}({}),
|
|
3329
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
3324
3330
|
return e.card = "twitter:card", e.site = "twitter:site", e.creator = "twitter:creator", e.url = "twitter:url", e.title = "twitter:title", e.description = "twitter:description", e.image = "twitter:image", e.imageAlt = "twitter:image:alt", e.imageSrc = "twitter:image:src", e.imageWidth = "twitter:image:width", e.imageHeight = "twitter:image:height", e.label1 = "twitter:label1", e.data1 = "twitter:data1", e.label2 = "twitter:label2", e.data2 = "twitter:data2", e.appNameIphone = "twitter:app:name:iphone", e.appIdIphone = "twitter:app:id:iphone", e.appUrlIphone = "twitter:app:url:iphone", e.appNameIpad = "twitter:app:name:ipad", e.appIdIpad = "twitter:app:id:ipad", e.appUrlIpad = "twitter:app:url:ipad", e.appNameGooglePlay = "twitter:app:name:googleplay", e.appIdGooglePlay = "twitter:app:id:googleplay", e.appUrlGooglePlay = "twitter:app:url:googleplay", e.player = "twitter:player", e.playerWidth = "twitter:player:width", e.playerHeight = "twitter:player:height", e.playerStream = "twitter:player:stream", e.playerStreamContentType = "twitter:player:stream:content_type", e;
|
|
3325
|
-
}({}),
|
|
3331
|
+
}({}), Tt = /* @__PURE__ */ function(e) {
|
|
3326
3332
|
return e.summary = "summary", e.summaryLargeImage = "summary_large_image", e.app = "app", e.player = "player", e.product = "product", e.gallery = "gallery", e.photo = "photo", e.leadGeneration = "lead_generation", e.audio = "audio", e.poll = "poll", e;
|
|
3327
|
-
}({}),
|
|
3333
|
+
}({}), Et = class extends G {
|
|
3328
3334
|
constructor() {
|
|
3329
|
-
super(Object.values(
|
|
3335
|
+
super(Object.values(q), !0);
|
|
3330
3336
|
}
|
|
3331
3337
|
getTitle() {
|
|
3332
|
-
return this.get(
|
|
3338
|
+
return this.get(q.title);
|
|
3333
3339
|
}
|
|
3334
3340
|
getType() {
|
|
3335
|
-
return this.get(
|
|
3341
|
+
return this.get(q.type);
|
|
3336
3342
|
}
|
|
3337
3343
|
getUrl() {
|
|
3338
|
-
return this.get(
|
|
3344
|
+
return this.get(q.url);
|
|
3339
3345
|
}
|
|
3340
3346
|
getImage() {
|
|
3341
|
-
return this.get(
|
|
3347
|
+
return this.get(q.image);
|
|
3342
3348
|
}
|
|
3343
3349
|
getDescription() {
|
|
3344
|
-
return this.get(
|
|
3350
|
+
return this.get(q.description);
|
|
3345
3351
|
}
|
|
3346
3352
|
getLocale() {
|
|
3347
|
-
return this.get(
|
|
3353
|
+
return this.get(q.locale);
|
|
3348
3354
|
}
|
|
3349
3355
|
getSiteName() {
|
|
3350
|
-
return this.get(
|
|
3356
|
+
return this.get(q.siteName);
|
|
3351
3357
|
}
|
|
3352
3358
|
setTitle(e) {
|
|
3353
|
-
return this.set(
|
|
3359
|
+
return this.set(q.title, e);
|
|
3354
3360
|
}
|
|
3355
3361
|
setType(e) {
|
|
3356
|
-
return this.set(
|
|
3362
|
+
return this.set(q.type, e);
|
|
3357
3363
|
}
|
|
3358
3364
|
setUrl(e) {
|
|
3359
|
-
return this.set(
|
|
3365
|
+
return this.set(q.url, e);
|
|
3360
3366
|
}
|
|
3361
3367
|
setImage(e) {
|
|
3362
|
-
return this.set(
|
|
3368
|
+
return this.set(q.image, e);
|
|
3363
3369
|
}
|
|
3364
3370
|
setDescription(e) {
|
|
3365
|
-
return this.set(
|
|
3371
|
+
return this.set(q.description, e);
|
|
3366
3372
|
}
|
|
3367
3373
|
setLocale(e) {
|
|
3368
|
-
return this.set(
|
|
3374
|
+
return this.set(q.locale, e);
|
|
3369
3375
|
}
|
|
3370
3376
|
setSiteName(e) {
|
|
3371
|
-
return this.set(
|
|
3377
|
+
return this.set(q.siteName, e);
|
|
3372
3378
|
}
|
|
3373
|
-
},
|
|
3379
|
+
}, Dt = class extends G {
|
|
3374
3380
|
constructor() {
|
|
3375
|
-
super(Object.values(
|
|
3381
|
+
super(Object.values(J));
|
|
3376
3382
|
}
|
|
3377
3383
|
getCard() {
|
|
3378
|
-
return this.get(
|
|
3384
|
+
return this.get(J.card);
|
|
3379
3385
|
}
|
|
3380
3386
|
getSite() {
|
|
3381
|
-
return this.get(
|
|
3387
|
+
return this.get(J.site);
|
|
3382
3388
|
}
|
|
3383
3389
|
getCreator() {
|
|
3384
|
-
return this.get(
|
|
3390
|
+
return this.get(J.creator);
|
|
3385
3391
|
}
|
|
3386
3392
|
getUrl() {
|
|
3387
|
-
return this.get(
|
|
3393
|
+
return this.get(J.url);
|
|
3388
3394
|
}
|
|
3389
3395
|
getTitle() {
|
|
3390
|
-
return this.get(
|
|
3396
|
+
return this.get(J.title);
|
|
3391
3397
|
}
|
|
3392
3398
|
getDescription() {
|
|
3393
|
-
return this.get(
|
|
3399
|
+
return this.get(J.description);
|
|
3394
3400
|
}
|
|
3395
3401
|
getImage() {
|
|
3396
|
-
return this.get(
|
|
3402
|
+
return this.get(J.image);
|
|
3397
3403
|
}
|
|
3398
3404
|
setCard(e) {
|
|
3399
|
-
return this.set(
|
|
3405
|
+
return this.set(J.card, e), this;
|
|
3400
3406
|
}
|
|
3401
3407
|
setSite(e) {
|
|
3402
|
-
return this.set(
|
|
3408
|
+
return this.set(J.site, e), this;
|
|
3403
3409
|
}
|
|
3404
3410
|
setCreator(e) {
|
|
3405
|
-
return this.set(
|
|
3411
|
+
return this.set(J.creator, e), this;
|
|
3406
3412
|
}
|
|
3407
3413
|
setUrl(e) {
|
|
3408
|
-
return this.set(
|
|
3414
|
+
return this.set(J.url, e), this;
|
|
3409
3415
|
}
|
|
3410
3416
|
setTitle(e) {
|
|
3411
|
-
return this.set(
|
|
3417
|
+
return this.set(J.title, e), this;
|
|
3412
3418
|
}
|
|
3413
3419
|
setDescription(e) {
|
|
3414
|
-
return this.set(
|
|
3420
|
+
return this.set(J.description, e), this;
|
|
3415
3421
|
}
|
|
3416
3422
|
setImage(e) {
|
|
3417
|
-
return this.set(
|
|
3423
|
+
return this.set(J.image, e), this;
|
|
3418
3424
|
}
|
|
3419
|
-
},
|
|
3425
|
+
}, Ot = class extends G {
|
|
3420
3426
|
constructor() {
|
|
3421
|
-
super(Object.values(
|
|
3427
|
+
super(Object.values(K)), T(this, "suffix", void 0), T(this, "og", void 0), T(this, "twitter", void 0), this.og = new Et(), this.twitter = new Dt();
|
|
3422
3428
|
}
|
|
3423
3429
|
getOg() {
|
|
3424
3430
|
return this.og;
|
|
@@ -3427,26 +3433,26 @@ var K = class {
|
|
|
3427
3433
|
return this.twitter;
|
|
3428
3434
|
}
|
|
3429
3435
|
getTitle() {
|
|
3430
|
-
let e = this.get(
|
|
3436
|
+
let e = this.get(K.title);
|
|
3431
3437
|
return !l(e) && s() && (e = document.title), e.replace(this.getSuffix(), "").trim();
|
|
3432
3438
|
}
|
|
3433
3439
|
getKeywords() {
|
|
3434
|
-
return this.get(
|
|
3440
|
+
return this.get(K.keywords);
|
|
3435
3441
|
}
|
|
3436
3442
|
getDescription() {
|
|
3437
|
-
return this.get(
|
|
3443
|
+
return this.get(K.description);
|
|
3438
3444
|
}
|
|
3439
3445
|
getImage() {
|
|
3440
3446
|
return this.og.getImage();
|
|
3441
3447
|
}
|
|
3442
3448
|
getCanonical() {
|
|
3443
|
-
return this.get(
|
|
3449
|
+
return this.get(K.canonical);
|
|
3444
3450
|
}
|
|
3445
3451
|
getRobots() {
|
|
3446
|
-
return this.get(
|
|
3452
|
+
return this.get(K.robots);
|
|
3447
3453
|
}
|
|
3448
3454
|
getAuthor() {
|
|
3449
|
-
return this.get(
|
|
3455
|
+
return this.get(K.author);
|
|
3450
3456
|
}
|
|
3451
3457
|
getSiteName() {
|
|
3452
3458
|
return this.og.getSiteName();
|
|
@@ -3456,25 +3462,25 @@ var K = class {
|
|
|
3456
3462
|
}
|
|
3457
3463
|
setTitle(e) {
|
|
3458
3464
|
let t = l(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
3459
|
-
return s() && (document.title = t), this.set(
|
|
3465
|
+
return s() && (document.title = t), this.set(K.title, t), this.og.setTitle(t), this.twitter.setTitle(t), this;
|
|
3460
3466
|
}
|
|
3461
3467
|
setKeywords(e) {
|
|
3462
|
-
return this.set(
|
|
3468
|
+
return this.set(K.keywords, M(e).join(", ")), this;
|
|
3463
3469
|
}
|
|
3464
3470
|
setDescription(e) {
|
|
3465
|
-
return this.set(
|
|
3471
|
+
return this.set(K.description, e), this;
|
|
3466
3472
|
}
|
|
3467
3473
|
setImage(e) {
|
|
3468
3474
|
return this.og.setImage(e), this.twitter.setImage(e), this;
|
|
3469
3475
|
}
|
|
3470
3476
|
setCanonical(e) {
|
|
3471
|
-
return this.set(
|
|
3477
|
+
return this.set(K.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
|
|
3472
3478
|
}
|
|
3473
3479
|
setRobots(e) {
|
|
3474
|
-
return this.set(
|
|
3480
|
+
return this.set(K.robots, e), this;
|
|
3475
3481
|
}
|
|
3476
3482
|
setAuthor(e) {
|
|
3477
|
-
return this.set(
|
|
3483
|
+
return this.set(K.author, e), this;
|
|
3478
3484
|
}
|
|
3479
3485
|
setSiteName(e) {
|
|
3480
3486
|
return this.og.setSiteName(e), this.twitter.setSite(e), this;
|
|
@@ -3489,14 +3495,14 @@ var K = class {
|
|
|
3489
3495
|
return `${super.html()}${this.og.html()}${this.twitter.html()}`;
|
|
3490
3496
|
}
|
|
3491
3497
|
htmlTitle() {
|
|
3492
|
-
return this.toHtmlTitle(this.get(
|
|
3498
|
+
return this.toHtmlTitle(this.get(K.title));
|
|
3493
3499
|
}
|
|
3494
3500
|
getSuffix() {
|
|
3495
3501
|
return l(this.suffix) ? ` - ${this.suffix}` : "";
|
|
3496
3502
|
}
|
|
3497
|
-
},
|
|
3503
|
+
}, kt = class {
|
|
3498
3504
|
static getItem() {
|
|
3499
|
-
return
|
|
3505
|
+
return D.get("__ui:meta-instance__", () => new Ot());
|
|
3500
3506
|
}
|
|
3501
3507
|
static getOg() {
|
|
3502
3508
|
return this.getItem().getOg();
|
|
@@ -3567,7 +3573,7 @@ var K = class {
|
|
|
3567
3573
|
static htmlTitle() {
|
|
3568
3574
|
return this.getItem().htmlTitle();
|
|
3569
3575
|
}
|
|
3570
|
-
},
|
|
3576
|
+
}, At = class {
|
|
3571
3577
|
constructor(e, t = 320, n = !1) {
|
|
3572
3578
|
T(this, "callback", void 0), T(this, "delay", void 0), T(this, "timerId", void 0), T(this, "startTime", void 0), T(this, "remaining", void 0), T(this, "completed", !1), this.callback = e, this.delay = t, n || this.resume();
|
|
3573
3579
|
}
|
|
@@ -3605,7 +3611,7 @@ var K = class {
|
|
|
3605
3611
|
stop() {
|
|
3606
3612
|
return this.timerId && (clearTimeout(this.timerId), this.timerId = void 0), this;
|
|
3607
3613
|
}
|
|
3608
|
-
},
|
|
3614
|
+
}, jt = class {
|
|
3609
3615
|
static async is() {
|
|
3610
3616
|
let e = await this.get();
|
|
3611
3617
|
return e !== -1 && e <= 8;
|
|
@@ -3621,14 +3627,14 @@ var K = class {
|
|
|
3621
3627
|
return t;
|
|
3622
3628
|
}
|
|
3623
3629
|
static getStorage() {
|
|
3624
|
-
return new
|
|
3630
|
+
return new O("__ui:scrollbar__", !0);
|
|
3625
3631
|
}
|
|
3626
3632
|
static getCalculate() {
|
|
3627
3633
|
return this.calculate;
|
|
3628
3634
|
}
|
|
3629
3635
|
static createElement() {
|
|
3630
|
-
return
|
|
3631
|
-
e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%",
|
|
3636
|
+
return U(document.body, "div", (e) => {
|
|
3637
|
+
e.style.height = "24px", e.style.overflowY = "scroll", e.style.position = "fixed", e.style.width = "100%", U(e, "div", (e) => {
|
|
3632
3638
|
e.style.height = "100px";
|
|
3633
3639
|
});
|
|
3634
3640
|
});
|
|
@@ -3643,18 +3649,18 @@ var K = class {
|
|
|
3643
3649
|
});
|
|
3644
3650
|
}
|
|
3645
3651
|
};
|
|
3646
|
-
T(
|
|
3652
|
+
T(jt, "calculate", !1);
|
|
3647
3653
|
//#endregion
|
|
3648
3654
|
//#region src/functions/escapeExp.ts
|
|
3649
|
-
function
|
|
3655
|
+
function Y(e) {
|
|
3650
3656
|
return String(e).replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
3651
3657
|
}
|
|
3652
3658
|
//#endregion
|
|
3653
3659
|
//#region src/functions/getSeparatingSearchExp.ts
|
|
3654
|
-
function
|
|
3660
|
+
function X(e, t = 128) {
|
|
3655
3661
|
if (e instanceof RegExp) return e;
|
|
3656
3662
|
if (!e || e.trim().length === 0 || e.length > t) return /^/;
|
|
3657
|
-
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(
|
|
3663
|
+
let n = String(e).replace(/\s+/g, " ").trim().split(" ").map(Y).join("|");
|
|
3658
3664
|
return RegExp(`(${n})`, "ig");
|
|
3659
3665
|
}
|
|
3660
3666
|
//#endregion
|
|
@@ -3663,10 +3669,10 @@ var Mt = `___HIGHLIGHT_START_${f(1e5, 999999)}___`, Nt = `___HIGHLIGHT_END_${f(1
|
|
|
3663
3669
|
function Ft(e, t, n = "sys-highlight-match", r = !1) {
|
|
3664
3670
|
let i = a(e);
|
|
3665
3671
|
if (l(i) && l(t)) {
|
|
3666
|
-
let e = i.replace(
|
|
3667
|
-
return r && (e =
|
|
3672
|
+
let e = i.replace(X(t), `${Mt}$1${Nt}`);
|
|
3673
|
+
return r && (e = W(e)), e.replace(Pt, (e) => e === Mt ? `<span class="${n}">` : "</span>");
|
|
3668
3674
|
}
|
|
3669
|
-
return r ?
|
|
3675
|
+
return r ? W(i) : i;
|
|
3670
3676
|
}
|
|
3671
3677
|
//#endregion
|
|
3672
3678
|
//#region src/classes/SearchListData.ts
|
|
@@ -3709,7 +3715,7 @@ var It = class {
|
|
|
3709
3715
|
toFormatItem(e, t) {
|
|
3710
3716
|
let n = {};
|
|
3711
3717
|
return this.columns && this.columns.forEach((r) => {
|
|
3712
|
-
let i = this.getColumnName(r), a =
|
|
3718
|
+
let i = this.getColumnName(r), a = V(e, r);
|
|
3713
3719
|
n[i] = l(a) && t ? this.addTag(a) : C(a);
|
|
3714
3720
|
}), {
|
|
3715
3721
|
...e,
|
|
@@ -3729,7 +3735,7 @@ var It = class {
|
|
|
3729
3735
|
for (let t of this.list) {
|
|
3730
3736
|
let n = "";
|
|
3731
3737
|
if (this.columns) for (let e of this.columns) {
|
|
3732
|
-
let r =
|
|
3738
|
+
let r = V(t, e);
|
|
3733
3739
|
l(r) && (n += ` ${C(r)}`);
|
|
3734
3740
|
}
|
|
3735
3741
|
e.push({
|
|
@@ -3766,7 +3772,7 @@ var It = class {
|
|
|
3766
3772
|
//#endregion
|
|
3767
3773
|
//#region src/functions/getExp.ts
|
|
3768
3774
|
function Rt(e, t = "ig", n = ":value") {
|
|
3769
|
-
let r =
|
|
3775
|
+
let r = Y(e);
|
|
3770
3776
|
return new RegExp(n.replace(/:value/g, r), t);
|
|
3771
3777
|
}
|
|
3772
3778
|
//#endregion
|
|
@@ -3780,7 +3786,7 @@ function Bt(e, t = 128) {
|
|
|
3780
3786
|
if (!d(e) || e.trim().length === 0 || e.length > t) return /^/;
|
|
3781
3787
|
let n = [];
|
|
3782
3788
|
return a(e).split(" ").forEach((e) => {
|
|
3783
|
-
let t =
|
|
3789
|
+
let t = Y(e).trim();
|
|
3784
3790
|
l(t) && n.push(`(?=.*?${t})`);
|
|
3785
3791
|
}), RegExp(`^${n.join("")}`, "i");
|
|
3786
3792
|
}
|
|
@@ -3877,7 +3883,7 @@ var Vt = class {
|
|
|
3877
3883
|
let e = this.data.getList();
|
|
3878
3884
|
return e ? r(e, this.callbackToNone) : [];
|
|
3879
3885
|
}
|
|
3880
|
-
}, Wt = () =>
|
|
3886
|
+
}, Wt = () => D.get("__ui:storage-callback__", () => ({})), Gt = class e {
|
|
3881
3887
|
static getInstance(t, n = "main") {
|
|
3882
3888
|
return new e(t, n);
|
|
3883
3889
|
}
|
|
@@ -3910,7 +3916,7 @@ var Vt = class {
|
|
|
3910
3916
|
}
|
|
3911
3917
|
async run(e) {
|
|
3912
3918
|
this.loading = !1;
|
|
3913
|
-
for (let { callback: t, isOnce: n } of this.callbacks) await
|
|
3919
|
+
for (let { callback: t, isOnce: n } of this.callbacks) await Je(t, e), n && this.removeCallback(t);
|
|
3914
3920
|
return this;
|
|
3915
3921
|
}
|
|
3916
3922
|
}, Kt = [
|
|
@@ -3957,9 +3963,9 @@ var Vt = class {
|
|
|
3957
3963
|
})), r;
|
|
3958
3964
|
}, Yt = (e) => {
|
|
3959
3965
|
var t;
|
|
3960
|
-
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(
|
|
3966
|
+
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || !(e == null || (t = e.statusObject) == null) && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(I.getStatus().getStatus()))));
|
|
3961
3967
|
}, Xt = "global", Zt = 160, Qt = class {
|
|
3962
|
-
constructor(e, t = () =>
|
|
3968
|
+
constructor(e, t = () => A.getLanguage(), n = () => A.getLocation()) {
|
|
3963
3969
|
T(this, "language", void 0), T(this, "location", void 0), T(this, "files", {}), T(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
3964
3970
|
}
|
|
3965
3971
|
isFile() {
|
|
@@ -4006,7 +4012,7 @@ var Vt = class {
|
|
|
4006
4012
|
async get(e, t) {
|
|
4007
4013
|
var n;
|
|
4008
4014
|
let r = this.getText(e);
|
|
4009
|
-
return r ? this.replacement(r, t) : (
|
|
4015
|
+
return r ? this.replacement(r, t) : (I.isLocalhost() || await this.add(e), this.replacement((n = this.getText(e)) == null ? e : n));
|
|
4010
4016
|
}
|
|
4011
4017
|
getSync(e, t = !1, n) {
|
|
4012
4018
|
let r = this.getText(e);
|
|
@@ -4047,7 +4053,7 @@ var Vt = class {
|
|
|
4047
4053
|
});
|
|
4048
4054
|
}
|
|
4049
4055
|
async addNormalOrSync(e) {
|
|
4050
|
-
if (l(e)) if (
|
|
4056
|
+
if (l(e)) if (I.isLocalhost()) this.addSync(e);
|
|
4051
4057
|
else {
|
|
4052
4058
|
let t = Object.keys(e);
|
|
4053
4059
|
t.length > 0 && await this.add(t);
|
|
@@ -4093,12 +4099,12 @@ var Vt = class {
|
|
|
4093
4099
|
}
|
|
4094
4100
|
getNamesNone(e) {
|
|
4095
4101
|
let t = [];
|
|
4096
|
-
return
|
|
4102
|
+
return M(e).forEach((e) => {
|
|
4097
4103
|
e !== "__TRANSLATE_START__" && e !== "__TRANSLATE_END__" && !this.hasName(e) && t.push(e);
|
|
4098
4104
|
}), t;
|
|
4099
4105
|
}
|
|
4100
4106
|
async getResponse() {
|
|
4101
|
-
let e = await
|
|
4107
|
+
let e = await I.get({
|
|
4102
4108
|
api: !1,
|
|
4103
4109
|
path: this.url,
|
|
4104
4110
|
request: { [this.propsName]: this.cache },
|
|
@@ -4171,16 +4177,71 @@ var Vt = class {
|
|
|
4171
4177
|
};
|
|
4172
4178
|
T(en, "item", void 0);
|
|
4173
4179
|
//#endregion
|
|
4180
|
+
//#region src/classes/UrlItem.ts
|
|
4181
|
+
var tn = class e {
|
|
4182
|
+
static getInstance() {
|
|
4183
|
+
return D.get("__ui:url-item__", () => new e());
|
|
4184
|
+
}
|
|
4185
|
+
constructor(e) {
|
|
4186
|
+
T(this, "url", void 0), this.set(e);
|
|
4187
|
+
}
|
|
4188
|
+
get href() {
|
|
4189
|
+
return this.url.href;
|
|
4190
|
+
}
|
|
4191
|
+
get protocol() {
|
|
4192
|
+
return this.url.protocol;
|
|
4193
|
+
}
|
|
4194
|
+
get username() {
|
|
4195
|
+
return this.url.username;
|
|
4196
|
+
}
|
|
4197
|
+
get password() {
|
|
4198
|
+
return this.url.password;
|
|
4199
|
+
}
|
|
4200
|
+
get host() {
|
|
4201
|
+
return this.url.host;
|
|
4202
|
+
}
|
|
4203
|
+
get hostname() {
|
|
4204
|
+
return this.url.hostname;
|
|
4205
|
+
}
|
|
4206
|
+
get port() {
|
|
4207
|
+
return this.url.port;
|
|
4208
|
+
}
|
|
4209
|
+
get pathname() {
|
|
4210
|
+
return this.url.pathname;
|
|
4211
|
+
}
|
|
4212
|
+
get search() {
|
|
4213
|
+
return this.url.search;
|
|
4214
|
+
}
|
|
4215
|
+
get searchParams() {
|
|
4216
|
+
return this.url.searchParams;
|
|
4217
|
+
}
|
|
4218
|
+
get hash() {
|
|
4219
|
+
return this.url.hash;
|
|
4220
|
+
}
|
|
4221
|
+
get origin() {
|
|
4222
|
+
return this.url.origin;
|
|
4223
|
+
}
|
|
4224
|
+
set(e) {
|
|
4225
|
+
return e ? e instanceof URL ? this.url = new URL(e.href) : /^[a-z0-9+.-]+:/i.test(e) ? this.url = new URL(e) : s() ? this.url = new URL(e, window.location.origin) : this.url = new URL(e, "http://localhost") : s() ? this.url = new URL(window.location.href) : this.url = new URL("http://localhost"), this;
|
|
4226
|
+
}
|
|
4227
|
+
toString() {
|
|
4228
|
+
return this.url.toString();
|
|
4229
|
+
}
|
|
4230
|
+
toJSON() {
|
|
4231
|
+
return this.url.toJSON();
|
|
4232
|
+
}
|
|
4233
|
+
};
|
|
4234
|
+
//#endregion
|
|
4174
4235
|
//#region src/functions/arrFill.ts
|
|
4175
|
-
function
|
|
4236
|
+
function nn(e, t) {
|
|
4176
4237
|
return Array(t).fill(e);
|
|
4177
4238
|
}
|
|
4178
4239
|
//#endregion
|
|
4179
4240
|
//#region src/functions/blobToBase64.ts
|
|
4180
|
-
var
|
|
4241
|
+
var rn = () => an() !== void 0, an = () => {
|
|
4181
4242
|
var e;
|
|
4182
4243
|
return (e = globalThis) == null ? void 0 : e.Buffer;
|
|
4183
|
-
},
|
|
4244
|
+
}, on = async (e) => new Promise((t, n) => {
|
|
4184
4245
|
if (typeof FileReader < "u") {
|
|
4185
4246
|
let r = new FileReader();
|
|
4186
4247
|
r.onloadend = () => {
|
|
@@ -4191,19 +4252,19 @@ var nn = () => rn() !== void 0, rn = () => {
|
|
|
4191
4252
|
t(r.result.replace(/^data:.*?,/, ""));
|
|
4192
4253
|
}, r.onerror = n, r.readAsDataURL(e);
|
|
4193
4254
|
} else n();
|
|
4194
|
-
}),
|
|
4255
|
+
}), sn = (e) => {
|
|
4195
4256
|
var t;
|
|
4196
4257
|
return ((t = globalThis) == null ? void 0 : t.Buffer).from(e).toString("base64");
|
|
4197
4258
|
};
|
|
4198
|
-
async function
|
|
4199
|
-
let n = s() ? await
|
|
4259
|
+
async function cn(e, t = !1) {
|
|
4260
|
+
let n = s() ? await on(e) : rn() ? sn(await e.arrayBuffer()) : void 0;
|
|
4200
4261
|
if (n) return t ? n : `data:${e.type};base64,${n}`;
|
|
4201
4262
|
}
|
|
4202
4263
|
//#endregion
|
|
4203
4264
|
//#region src/functions/capitalize.ts
|
|
4204
|
-
function
|
|
4265
|
+
function ln(e, t = !1) {
|
|
4205
4266
|
let n = String(e);
|
|
4206
|
-
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(
|
|
4267
|
+
return n.length > 0 ? t ? n.charAt(0).toLocaleUpperCase(A.getLocation()) + n.slice(1) : n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
4207
4268
|
}
|
|
4208
4269
|
//#endregion
|
|
4209
4270
|
//#region src/functions/copyObject.ts
|
|
@@ -4212,12 +4273,12 @@ function Z(e) {
|
|
|
4212
4273
|
}
|
|
4213
4274
|
//#endregion
|
|
4214
4275
|
//#region src/functions/copyObjectLite.ts
|
|
4215
|
-
function
|
|
4276
|
+
function un(e, t) {
|
|
4216
4277
|
return Object.assign({}, e, t);
|
|
4217
4278
|
}
|
|
4218
4279
|
//#endregion
|
|
4219
4280
|
//#region src/functions/domQuerySelector.ts
|
|
4220
|
-
function
|
|
4281
|
+
function dn(e) {
|
|
4221
4282
|
if (s()) {
|
|
4222
4283
|
var t;
|
|
4223
4284
|
return (t = document.querySelector(e)) == null ? void 0 : t;
|
|
@@ -4225,67 +4286,67 @@ function un(e) {
|
|
|
4225
4286
|
}
|
|
4226
4287
|
//#endregion
|
|
4227
4288
|
//#region src/functions/domQuerySelectorAll.ts
|
|
4228
|
-
function
|
|
4289
|
+
function fn(e) {
|
|
4229
4290
|
if (s()) return document.querySelectorAll(e);
|
|
4230
4291
|
}
|
|
4231
4292
|
//#endregion
|
|
4232
4293
|
//#region src/functions/getElementImage.ts
|
|
4233
|
-
function
|
|
4234
|
-
return d(e) ?
|
|
4294
|
+
function pn(e) {
|
|
4295
|
+
return d(e) ? U(void 0, "img", { src: e }) : e;
|
|
4235
4296
|
}
|
|
4236
4297
|
//#endregion
|
|
4237
4298
|
//#region src/functions/resizeImageByMax.ts
|
|
4238
|
-
function
|
|
4299
|
+
function mn(e, t = "auto") {
|
|
4239
4300
|
switch (t) {
|
|
4240
4301
|
case "auto": return e.naturalWidth >= e.naturalHeight;
|
|
4241
4302
|
case "width": return !0;
|
|
4242
4303
|
case "height": return !1;
|
|
4243
4304
|
}
|
|
4244
4305
|
}
|
|
4245
|
-
function
|
|
4246
|
-
let i =
|
|
4306
|
+
function hn(e, t, n = "auto", r) {
|
|
4307
|
+
let i = pn(e);
|
|
4247
4308
|
if (s() && i && i.naturalWidth && i.naturalHeight && (i.naturalWidth > t && (n === "auto" || n === "width") || i.naturalHeight > t && (n === "auto" || n === "height"))) {
|
|
4248
4309
|
var a;
|
|
4249
|
-
let e =
|
|
4310
|
+
let e = mn(i, n), o = (a = document.createElement("canvas")) == null ? void 0 : a.getContext("2d");
|
|
4250
4311
|
if (o) return o.canvas.width = e ? t : i.naturalWidth / i.naturalHeight * t, o.canvas.height = e ? i.naturalHeight / i.naturalWidth * t : t, o.drawImage(i, 0, 0, o.canvas.width, o.canvas.height), o.canvas.toDataURL(r);
|
|
4251
4312
|
}
|
|
4252
4313
|
}
|
|
4253
4314
|
//#endregion
|
|
4254
4315
|
//#region src/functions/ensureMaxSize.ts
|
|
4255
|
-
async function
|
|
4316
|
+
async function gn(e, t = .56, n = "image/jpeg") {
|
|
4256
4317
|
return new Promise((r) => {
|
|
4257
4318
|
if (!s()) {
|
|
4258
4319
|
r("");
|
|
4259
4320
|
return;
|
|
4260
4321
|
}
|
|
4261
|
-
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o =
|
|
4322
|
+
let i = new Blob([e], { type: n }), a = URL.createObjectURL(i), o = pn(a);
|
|
4262
4323
|
o ? (o.onload = () => {
|
|
4263
|
-
let e =
|
|
4324
|
+
let e = hn(o, t * o.naturalWidth, "width", n);
|
|
4264
4325
|
r(e == null ? "" : e), URL.revokeObjectURL(a);
|
|
4265
4326
|
}, o.onerror = () => {
|
|
4266
4327
|
URL.revokeObjectURL(a), r("");
|
|
4267
|
-
}) :
|
|
4328
|
+
}) : cn(i).then((e) => r(String(e == null ? "" : e)));
|
|
4268
4329
|
});
|
|
4269
4330
|
}
|
|
4270
4331
|
//#endregion
|
|
4271
4332
|
//#region src/functions/eventStopPropagation.ts
|
|
4272
|
-
function
|
|
4333
|
+
function _n(e) {
|
|
4273
4334
|
e.preventDefault(), e.stopPropagation();
|
|
4274
4335
|
}
|
|
4275
4336
|
//#endregion
|
|
4276
4337
|
//#region src/functions/frame.ts
|
|
4277
|
-
function
|
|
4338
|
+
function vn(e, t, n) {
|
|
4278
4339
|
let r = () => {
|
|
4279
|
-
e(), s() && t != null && t() ?
|
|
4340
|
+
e(), s() && t != null && t() ? vn(e, t, n) : n == null || n();
|
|
4280
4341
|
};
|
|
4281
4342
|
s() ? requestAnimationFrame(r) : r();
|
|
4282
4343
|
}
|
|
4283
4344
|
//#endregion
|
|
4284
4345
|
//#region src/functions/getArrayHighlightMatch.ts
|
|
4285
|
-
function
|
|
4346
|
+
function yn(e, t) {
|
|
4286
4347
|
let n = a(e);
|
|
4287
4348
|
if (l(n) && l(t)) {
|
|
4288
|
-
let e = [], r =
|
|
4349
|
+
let e = [], r = X(t), i = 0, a;
|
|
4289
4350
|
for (; (a = r.exec(n)) !== null && a.index !== r.lastIndex;) a.index > i && e.push({
|
|
4290
4351
|
text: n.substring(i, a.index),
|
|
4291
4352
|
isMatch: !1
|
|
@@ -4305,8 +4366,8 @@ function vn(e, t) {
|
|
|
4305
4366
|
}
|
|
4306
4367
|
//#endregion
|
|
4307
4368
|
//#region src/functions/getAttributes.ts
|
|
4308
|
-
function
|
|
4309
|
-
let t = {}, n =
|
|
4369
|
+
function bn(e) {
|
|
4370
|
+
let t = {}, n = j(e);
|
|
4310
4371
|
if (n) for (let e of n.attributes) {
|
|
4311
4372
|
var r;
|
|
4312
4373
|
t[e.name] = (r = (e == null ? void 0 : e.value) || (e == null ? void 0 : e.textContent)) == null ? void 0 : r;
|
|
@@ -4315,7 +4376,7 @@ function yn(e) {
|
|
|
4315
4376
|
}
|
|
4316
4377
|
//#endregion
|
|
4317
4378
|
//#region src/functions/getClipboardData.ts
|
|
4318
|
-
async function
|
|
4379
|
+
async function xn(e) {
|
|
4319
4380
|
if (s()) try {
|
|
4320
4381
|
var t, n;
|
|
4321
4382
|
return (t = e == null || (n = e.clipboardData) == null ? void 0 : n.getData("text")) == null ? await navigator.clipboard.readText() || "" : t;
|
|
@@ -4330,35 +4391,35 @@ async function bn(e) {
|
|
|
4330
4391
|
}
|
|
4331
4392
|
//#endregion
|
|
4332
4393
|
//#region src/functions/getCurrentDate.ts
|
|
4333
|
-
function
|
|
4334
|
-
return new
|
|
4394
|
+
function Sn(e = "datetime") {
|
|
4395
|
+
return new it(void 0, e).standard();
|
|
4335
4396
|
}
|
|
4336
4397
|
//#endregion
|
|
4337
4398
|
//#region src/functions/getCurrentTime.ts
|
|
4338
|
-
function
|
|
4399
|
+
function Cn() {
|
|
4339
4400
|
return Date.now();
|
|
4340
4401
|
}
|
|
4341
4402
|
//#endregion
|
|
4342
4403
|
//#region src/functions/getElementId.ts
|
|
4343
|
-
var Q,
|
|
4404
|
+
var Q, wn = () => {
|
|
4344
4405
|
let e = Q == null ? void 0 : Q();
|
|
4345
4406
|
if (e) return String(e);
|
|
4346
|
-
let t =
|
|
4407
|
+
let t = D.get("__ui:getElementId__", () => ({ id: 1e5 }));
|
|
4347
4408
|
return `id-${t.id++}`;
|
|
4348
4409
|
};
|
|
4349
|
-
function
|
|
4410
|
+
function Tn(e, t) {
|
|
4350
4411
|
if (e) {
|
|
4351
|
-
let n =
|
|
4352
|
-
if (n) return l(n.id) || n.setAttribute("id",
|
|
4412
|
+
let n = j(e);
|
|
4413
|
+
if (n) return l(n.id) || n.setAttribute("id", wn()), t ? `#${n.id}${t}`.trim() : n.id;
|
|
4353
4414
|
}
|
|
4354
|
-
return
|
|
4415
|
+
return wn();
|
|
4355
4416
|
}
|
|
4356
|
-
function
|
|
4417
|
+
function En(e) {
|
|
4357
4418
|
Q || (Q = e);
|
|
4358
4419
|
}
|
|
4359
4420
|
//#endregion
|
|
4360
4421
|
//#region src/functions/getFirst.ts
|
|
4361
|
-
function
|
|
4422
|
+
function Dn(e) {
|
|
4362
4423
|
if (i(e)) return e == null ? void 0 : e[0];
|
|
4363
4424
|
if (t(e)) {
|
|
4364
4425
|
var n;
|
|
@@ -4368,18 +4429,18 @@ function En(e) {
|
|
|
4368
4429
|
}
|
|
4369
4430
|
//#endregion
|
|
4370
4431
|
//#region src/functions/getKey.ts
|
|
4371
|
-
function
|
|
4432
|
+
function On(e) {
|
|
4372
4433
|
var t, n, r;
|
|
4373
4434
|
return (t = (n = e == null ? void 0 : e.key) == null ? e == null ? void 0 : e.code : n) == null ? e == null || (r = e.keyCode) == null ? void 0 : r.toString() : t;
|
|
4374
4435
|
}
|
|
4375
4436
|
//#endregion
|
|
4376
4437
|
//#region src/functions/getLength.ts
|
|
4377
|
-
function
|
|
4438
|
+
function kn(e) {
|
|
4378
4439
|
return e == null ? 0 : typeof e == "string" || Array.isArray(e) ? e.length : e instanceof Map || e instanceof Set ? e.size : t(e) ? Object.keys(e).length : 0;
|
|
4379
4440
|
}
|
|
4380
4441
|
//#endregion
|
|
4381
4442
|
//#region src/functions/getLengthOfAllArray.ts
|
|
4382
|
-
function
|
|
4443
|
+
function An(e) {
|
|
4383
4444
|
return r(e, (e) => {
|
|
4384
4445
|
var t;
|
|
4385
4446
|
return (t = e == null ? void 0 : e.length) == null ? 0 : t;
|
|
@@ -4387,41 +4448,41 @@ function kn(e) {
|
|
|
4387
4448
|
}
|
|
4388
4449
|
//#endregion
|
|
4389
4450
|
//#region src/functions/getMaxLengthAllArray.ts
|
|
4390
|
-
function
|
|
4451
|
+
function jn(e) {
|
|
4391
4452
|
if (!l(e)) return 0;
|
|
4392
|
-
let t =
|
|
4453
|
+
let t = An(e);
|
|
4393
4454
|
return t.length > 1e4 ? t.reduce((e, t) => Math.max(e, t)) : Math.max(...t);
|
|
4394
4455
|
}
|
|
4395
4456
|
//#endregion
|
|
4396
4457
|
//#region src/functions/getMinLengthAllArray.ts
|
|
4397
|
-
function
|
|
4458
|
+
function Mn(e) {
|
|
4398
4459
|
if (!l(e)) return 0;
|
|
4399
|
-
let t =
|
|
4460
|
+
let t = An(e);
|
|
4400
4461
|
return t.length > 1e4 ? t.reduce((e, t) => Math.min(e, t)) : Math.min(...t);
|
|
4401
4462
|
}
|
|
4402
4463
|
//#endregion
|
|
4403
4464
|
//#region src/functions/getMouseClientX.ts
|
|
4404
|
-
function
|
|
4465
|
+
function Nn(e) {
|
|
4405
4466
|
var t, n;
|
|
4406
4467
|
return (e == null ? void 0 : e.clientX) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientX) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientX) || 0;
|
|
4407
4468
|
}
|
|
4408
4469
|
//#endregion
|
|
4409
4470
|
//#region src/functions/getMouseClientY.ts
|
|
4410
|
-
function
|
|
4471
|
+
function Pn(e) {
|
|
4411
4472
|
var t, n;
|
|
4412
4473
|
return (e == null ? void 0 : e.clientY) || (e == null || (t = e.targetTouches) == null || (t = t[0]) == null ? void 0 : t.clientY) || (e == null || (n = e.touches) == null || (n = n[0]) == null ? void 0 : n.clientY) || 0;
|
|
4413
4474
|
}
|
|
4414
4475
|
//#endregion
|
|
4415
4476
|
//#region src/functions/getMouseClient.ts
|
|
4416
|
-
function
|
|
4477
|
+
function Fn(e) {
|
|
4417
4478
|
return {
|
|
4418
|
-
x:
|
|
4419
|
-
y:
|
|
4479
|
+
x: Nn(e),
|
|
4480
|
+
y: Pn(e)
|
|
4420
4481
|
};
|
|
4421
4482
|
}
|
|
4422
4483
|
//#endregion
|
|
4423
4484
|
//#region src/functions/getObjectByKeys.ts
|
|
4424
|
-
function
|
|
4485
|
+
function In(e, t) {
|
|
4425
4486
|
let r = {};
|
|
4426
4487
|
return n(e) && t.forEach((t) => {
|
|
4427
4488
|
t in e && e[t] !== void 0 && (r[t] = e[t]);
|
|
@@ -4429,7 +4490,7 @@ function Fn(e, t) {
|
|
|
4429
4490
|
}
|
|
4430
4491
|
//#endregion
|
|
4431
4492
|
//#region src/functions/getObjectNoUndefined.ts
|
|
4432
|
-
function
|
|
4493
|
+
function Ln(e, t = void 0) {
|
|
4433
4494
|
let n = {};
|
|
4434
4495
|
return r(e, (e, r) => {
|
|
4435
4496
|
e !== t && (n[r] = e);
|
|
@@ -4437,42 +4498,42 @@ function In(e, t = void 0) {
|
|
|
4437
4498
|
}
|
|
4438
4499
|
//#endregion
|
|
4439
4500
|
//#region src/functions/getObjectOrNone.ts
|
|
4440
|
-
function
|
|
4501
|
+
function Rn(e) {
|
|
4441
4502
|
return n(e) ? e : {};
|
|
4442
4503
|
}
|
|
4443
4504
|
//#endregion
|
|
4444
4505
|
//#region src/functions/getOnlyText.ts
|
|
4445
|
-
function
|
|
4506
|
+
function zn(e) {
|
|
4446
4507
|
return C(e).replace(/[^\p{L}\p{N}\s]+/gu, "").trim();
|
|
4447
4508
|
}
|
|
4448
4509
|
//#endregion
|
|
4449
4510
|
//#region src/functions/strFill.ts
|
|
4450
|
-
function
|
|
4511
|
+
function Bn(e, t) {
|
|
4451
4512
|
return String(e).repeat(t);
|
|
4452
4513
|
}
|
|
4453
4514
|
//#endregion
|
|
4454
4515
|
//#region src/functions/getRandomText.ts
|
|
4455
|
-
function
|
|
4516
|
+
function Vn(e, t, n = "#", r = 2, i = 12) {
|
|
4456
4517
|
let a = f(e, t), o = [];
|
|
4457
|
-
for (let e = 0; e < a; e++) o.push(
|
|
4518
|
+
for (let e = 0; e < a; e++) o.push(Bn(n, f(r, i)));
|
|
4458
4519
|
return o.join(" ");
|
|
4459
4520
|
}
|
|
4460
4521
|
//#endregion
|
|
4461
4522
|
//#region src/functions/getStepPercent.ts
|
|
4462
|
-
function
|
|
4523
|
+
function Hn(e, t) {
|
|
4463
4524
|
let n = e == null ? 0 : e;
|
|
4464
4525
|
return t > n ? 100 / (t - n) : 0;
|
|
4465
4526
|
}
|
|
4466
4527
|
//#endregion
|
|
4467
4528
|
//#region src/functions/getStepValue.ts
|
|
4468
|
-
function
|
|
4529
|
+
function Un(e, t) {
|
|
4469
4530
|
let n = e == null ? 0 : e;
|
|
4470
4531
|
return t > n ? (t - n) / 100 : 0;
|
|
4471
4532
|
}
|
|
4472
4533
|
//#endregion
|
|
4473
4534
|
//#region src/functions/goScroll.ts
|
|
4474
|
-
var
|
|
4475
|
-
function
|
|
4535
|
+
var Wn = 0;
|
|
4536
|
+
function Gn(e, t, n) {
|
|
4476
4537
|
if (!s()) return;
|
|
4477
4538
|
let r = t == null ? void 0 : t.closest(e);
|
|
4478
4539
|
if (t && r && r.scrollHeight !== r.offsetHeight) {
|
|
@@ -4480,12 +4541,12 @@ function Wn(e, t, n) {
|
|
|
4480
4541
|
if (n) {
|
|
4481
4542
|
let a = n.getBoundingClientRect();
|
|
4482
4543
|
r.scrollTop = t.offsetTop - (a.top - e.top) - (a.height / 2 - i.height / 2), r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = t.offsetTop + t.offsetHeight - r.offsetHeight);
|
|
4483
|
-
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top -
|
|
4544
|
+
} else r.scrollTop > t.offsetTop ? r.scrollTop = i.top - e.top - Wn : r.scrollTop + r.offsetHeight < t.offsetTop + t.offsetHeight && (r.scrollTop = i.top - e.top + i.height - e.height + Wn);
|
|
4484
4545
|
}
|
|
4485
4546
|
}
|
|
4486
4547
|
//#endregion
|
|
4487
4548
|
//#region src/functions/goScrollSmooth.ts
|
|
4488
|
-
function
|
|
4549
|
+
function Kn(e, t, n = 0) {
|
|
4489
4550
|
if (!s()) return;
|
|
4490
4551
|
let r = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4491
4552
|
if ("scrollIntoView" in e && !n) {
|
|
@@ -4507,7 +4568,7 @@ function Gn(e, t, n = 0) {
|
|
|
4507
4568
|
}
|
|
4508
4569
|
//#endregion
|
|
4509
4570
|
//#region src/functions/goScrollTo.ts
|
|
4510
|
-
function
|
|
4571
|
+
function qn(e, t, n = "smooth") {
|
|
4511
4572
|
if (!s() || !e || !t) return;
|
|
4512
4573
|
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
4513
4574
|
e.scrollBy({
|
|
@@ -4518,13 +4579,13 @@ function Kn(e, t, n = "smooth") {
|
|
|
4518
4579
|
}
|
|
4519
4580
|
//#endregion
|
|
4520
4581
|
//#region src/functions/isShare.ts
|
|
4521
|
-
function
|
|
4582
|
+
function Jn() {
|
|
4522
4583
|
return s() && typeof navigator < "u" && !!navigator.share;
|
|
4523
4584
|
}
|
|
4524
4585
|
//#endregion
|
|
4525
4586
|
//#region src/functions/handleShare.ts
|
|
4526
|
-
async function
|
|
4527
|
-
if (
|
|
4587
|
+
async function Yn(e) {
|
|
4588
|
+
if (Jn() && navigator.canShare && navigator.canShare(e)) try {
|
|
4528
4589
|
return await navigator.share(e), !0;
|
|
4529
4590
|
} catch (e) {
|
|
4530
4591
|
E.on({
|
|
@@ -4537,20 +4598,20 @@ async function Jn(e) {
|
|
|
4537
4598
|
}
|
|
4538
4599
|
//#endregion
|
|
4539
4600
|
//#region src/functions/inArray.ts
|
|
4540
|
-
function
|
|
4601
|
+
function Xn(e, t) {
|
|
4541
4602
|
return e.includes(t);
|
|
4542
4603
|
}
|
|
4543
4604
|
//#endregion
|
|
4544
4605
|
//#region src/functions/initScrollbarOffset.ts
|
|
4545
|
-
async function
|
|
4606
|
+
async function Zn() {
|
|
4546
4607
|
if (s()) {
|
|
4547
|
-
let e = await
|
|
4608
|
+
let e = await jt.get();
|
|
4548
4609
|
document.body.style.setProperty("--sys-scrollbar-offset", `${e}px`);
|
|
4549
4610
|
}
|
|
4550
4611
|
}
|
|
4551
4612
|
//#endregion
|
|
4552
4613
|
//#region src/functions/intersectKey.ts
|
|
4553
|
-
function
|
|
4614
|
+
function Qn(e, n) {
|
|
4554
4615
|
let i = {};
|
|
4555
4616
|
return t(e) && t(n) && r(e, (e, t) => {
|
|
4556
4617
|
t in n && (i[t] = e);
|
|
@@ -4558,7 +4619,7 @@ function Zn(e, n) {
|
|
|
4558
4619
|
}
|
|
4559
4620
|
//#endregion
|
|
4560
4621
|
//#region src/functions/isDifferent.ts
|
|
4561
|
-
function
|
|
4622
|
+
function $n(e, t) {
|
|
4562
4623
|
let n = Object.keys(e).length !== Object.keys(t).length;
|
|
4563
4624
|
return n || r(e, (e, r) => {
|
|
4564
4625
|
e !== (t == null ? void 0 : t[r]) && (n = !0);
|
|
@@ -4566,25 +4627,25 @@ function Qn(e, t) {
|
|
|
4566
4627
|
}
|
|
4567
4628
|
//#endregion
|
|
4568
4629
|
//#region src/functions/isElementVisible.ts
|
|
4569
|
-
function
|
|
4630
|
+
function er(e) {
|
|
4570
4631
|
if (!s()) return !1;
|
|
4571
|
-
let t =
|
|
4632
|
+
let t = j(e);
|
|
4572
4633
|
if (!t || "isConnected" in t && t.isConnected === !1) return !1;
|
|
4573
4634
|
let n = window.getComputedStyle(t);
|
|
4574
4635
|
return n.display !== "none" && n.visibility !== "hidden" && n.opacity !== "0" && t.offsetWidth !== 0 && t.offsetHeight !== 0;
|
|
4575
4636
|
}
|
|
4576
4637
|
//#endregion
|
|
4577
4638
|
//#region src/functions/isInput.ts
|
|
4578
|
-
var
|
|
4639
|
+
var tr = (e) => {
|
|
4579
4640
|
if (e instanceof HTMLElement) {
|
|
4580
4641
|
let t = e.tagName.toLowerCase();
|
|
4581
4642
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4582
4643
|
}
|
|
4583
4644
|
return !1;
|
|
4584
|
-
},
|
|
4645
|
+
}, nr = (e, t) => e.code === "Space" || e.code === "Enter" || e.key === " " || e.key === "Spacebar" || e.key === "Enter" || e.keyCode === 13 || e.keyCode === 32 ? t === void 0 ? !tr(e.target) : !t : !1;
|
|
4585
4646
|
//#endregion
|
|
4586
4647
|
//#region src/functions/isFloat.ts
|
|
4587
|
-
function
|
|
4648
|
+
function rr(e) {
|
|
4588
4649
|
switch (typeof e) {
|
|
4589
4650
|
case "number": return !0;
|
|
4590
4651
|
case "string": return /^-?\d+(\.\d+)?$/.test(e);
|
|
@@ -4593,21 +4654,21 @@ function nr(e) {
|
|
|
4593
4654
|
}
|
|
4594
4655
|
//#endregion
|
|
4595
4656
|
//#region src/functions/isIntegerBetween.ts
|
|
4596
|
-
function
|
|
4657
|
+
function ir(e, t) {
|
|
4597
4658
|
let n = Math.floor(t);
|
|
4598
4659
|
return e >= n && e < n + 1;
|
|
4599
4660
|
}
|
|
4600
4661
|
//#endregion
|
|
4601
4662
|
//#region src/functions/isSelectedByList.ts
|
|
4602
|
-
function
|
|
4663
|
+
function ar(e, t) {
|
|
4603
4664
|
return Array.isArray(e) ? e.every((e) => b(e, t)) : b(e, t);
|
|
4604
4665
|
}
|
|
4605
4666
|
//#endregion
|
|
4606
4667
|
//#region src/functions/isTab.ts
|
|
4607
|
-
var
|
|
4668
|
+
var or = (e) => e.key === "Tab" || e.code === "Tab" || e.keyCode === 9;
|
|
4608
4669
|
//#endregion
|
|
4609
4670
|
//#region src/functions/removeCommonPrefix.ts
|
|
4610
|
-
function
|
|
4671
|
+
function sr(e, t) {
|
|
4611
4672
|
if (e.startsWith(t)) return e.slice(t.length).trim();
|
|
4612
4673
|
let n = 0;
|
|
4613
4674
|
for (; e[n] === t[n] && n < e.length && n < t.length;) n++;
|
|
@@ -4615,13 +4676,13 @@ function or(e, t) {
|
|
|
4615
4676
|
}
|
|
4616
4677
|
//#endregion
|
|
4617
4678
|
//#region src/functions/replaceComponentName.ts
|
|
4618
|
-
var
|
|
4679
|
+
var cr = (e, t, n) => {
|
|
4619
4680
|
var r;
|
|
4620
4681
|
return e == null || (r = e.replace(RegExp(`<${t}`, "ig"), `<${n}`)) == null || (r = r.replace(RegExp(`</${t}`, "ig"), `</${n}`)) == null ? void 0 : r.trim();
|
|
4621
4682
|
};
|
|
4622
4683
|
//#endregion
|
|
4623
4684
|
//#region src/functions/uniqueArray.ts
|
|
4624
|
-
function
|
|
4685
|
+
function lr(e) {
|
|
4625
4686
|
return [...new Set(e)];
|
|
4626
4687
|
}
|
|
4627
4688
|
//#endregion
|
|
@@ -4630,12 +4691,12 @@ function $(e, n, i = !0) {
|
|
|
4630
4691
|
let a = Z(e);
|
|
4631
4692
|
return t(e) && t(n) && r(n, (n, r) => {
|
|
4632
4693
|
let o = e == null ? void 0 : e[r];
|
|
4633
|
-
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(
|
|
4694
|
+
t(o) && t(n) ? i && Array.isArray(o) && Array.isArray(n) ? a[r] = Z(lr([...o, ...n])) : a[r] = $(Array.isArray(o) ? { ...o } : o, n, i) : a[r] = t(n) ? Z(n) : n;
|
|
4634
4695
|
}), a;
|
|
4635
4696
|
}
|
|
4636
4697
|
//#endregion
|
|
4637
4698
|
//#region src/functions/replaceTemplate.ts
|
|
4638
|
-
function
|
|
4699
|
+
function ur(e, t) {
|
|
4639
4700
|
let n = e;
|
|
4640
4701
|
return r(t, (e, t) => {
|
|
4641
4702
|
n = n.replace(Rt(`[${t}]`), S(e));
|
|
@@ -4643,7 +4704,7 @@ function lr(e, t) {
|
|
|
4643
4704
|
}
|
|
4644
4705
|
//#endregion
|
|
4645
4706
|
//#region src/functions/secondToTime.ts
|
|
4646
|
-
function
|
|
4707
|
+
function dr(e, t) {
|
|
4647
4708
|
let n = y(e);
|
|
4648
4709
|
if (n > 0) {
|
|
4649
4710
|
let e = String(Math.floor(n / 60)).padStart(2, "0"), r = String(n % 60).padStart(2, "0");
|
|
@@ -4653,7 +4714,7 @@ function ur(e, t) {
|
|
|
4653
4714
|
}
|
|
4654
4715
|
//#endregion
|
|
4655
4716
|
//#region src/functions/setValues.ts
|
|
4656
|
-
function
|
|
4717
|
+
function fr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, notEmpty: o = !1 }) {
|
|
4657
4718
|
if (n) {
|
|
4658
4719
|
if (i(e)) {
|
|
4659
4720
|
let n = e.indexOf(t), i = [...e];
|
|
@@ -4665,7 +4726,7 @@ function dr(e, t, { multiple: n = !1, maxlength: r = 0, alwaysChange: a = !0, no
|
|
|
4665
4726
|
}
|
|
4666
4727
|
//#endregion
|
|
4667
4728
|
//#region src/functions/splice.ts
|
|
4668
|
-
function
|
|
4729
|
+
function pr(e, n, i) {
|
|
4669
4730
|
if (t(e) && t(n)) {
|
|
4670
4731
|
if (i) {
|
|
4671
4732
|
let a = {}, o = !1;
|
|
@@ -4679,34 +4740,34 @@ function fr(e, n, i) {
|
|
|
4679
4740
|
}
|
|
4680
4741
|
//#endregion
|
|
4681
4742
|
//#region src/functions/toCamelCaseFirst.ts
|
|
4682
|
-
function
|
|
4683
|
-
return
|
|
4743
|
+
function mr(e) {
|
|
4744
|
+
return at(e).replace(/^([a-z])/, (e) => `${e.toUpperCase()}`);
|
|
4684
4745
|
}
|
|
4685
4746
|
//#endregion
|
|
4686
4747
|
//#region src/functions/toKebabCase.ts
|
|
4687
|
-
function
|
|
4748
|
+
function hr(e) {
|
|
4688
4749
|
return e.toString().trim().replace(/[^\w-. ]+/g, "").replace(/[ .]+/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (e) => `${e.toLowerCase()}`).replace(/^[A-Z]/, (e) => e.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[A-Z]/g, (e) => e.toLowerCase());
|
|
4689
4750
|
}
|
|
4690
4751
|
//#endregion
|
|
4691
4752
|
//#region src/functions/toNumberByMax.ts
|
|
4692
|
-
function
|
|
4753
|
+
function gr(e, t, n, r) {
|
|
4693
4754
|
let i = y(e), a = y(t);
|
|
4694
|
-
return t && a < i ? `${
|
|
4755
|
+
return t && a < i ? `${_r(a, n, r)}+` : _r(i, n, r);
|
|
4695
4756
|
}
|
|
4696
|
-
var
|
|
4757
|
+
var _r = (e, t, n) => t ? new R(n).number(e) : e;
|
|
4697
4758
|
//#endregion
|
|
4698
4759
|
//#region src/functions/toPercent.ts
|
|
4699
|
-
function
|
|
4760
|
+
function vr(e, t) {
|
|
4700
4761
|
return e === 0 ? t : 1 / e * t;
|
|
4701
4762
|
}
|
|
4702
4763
|
//#endregion
|
|
4703
4764
|
//#region src/functions/toPercentBy100.ts
|
|
4704
|
-
function
|
|
4705
|
-
return
|
|
4765
|
+
function yr(e, t) {
|
|
4766
|
+
return vr(e, t) * 100;
|
|
4706
4767
|
}
|
|
4707
4768
|
//#endregion
|
|
4708
4769
|
//#region src/functions/uint8ArrayToBase64.ts
|
|
4709
|
-
function
|
|
4770
|
+
function br(e) {
|
|
4710
4771
|
let t = "";
|
|
4711
4772
|
for (let n of e) t += String.fromCharCode(n);
|
|
4712
4773
|
if (s()) return window.btoa(t);
|
|
@@ -4718,7 +4779,7 @@ function yr(e) {
|
|
|
4718
4779
|
}
|
|
4719
4780
|
//#endregion
|
|
4720
4781
|
//#region src/functions/writeClipboardData.ts
|
|
4721
|
-
async function
|
|
4782
|
+
async function xr(e) {
|
|
4722
4783
|
if (s()) try {
|
|
4723
4784
|
await navigator.clipboard.writeText(e);
|
|
4724
4785
|
} catch (n) {
|
|
@@ -4727,4 +4788,4 @@ async function br(e) {
|
|
|
4727
4788
|
}
|
|
4728
4789
|
}
|
|
4729
4790
|
//#endregion
|
|
4730
|
-
export {
|
|
4791
|
+
export { I as Api, P as ApiCache, ze as ApiDataReturn, Be as ApiDefault, Ue as ApiError, Ve as ApiErrorItem, He as ApiErrorStorage, We as ApiHeaders, Ke as ApiHydration, Ze as ApiInstance, F as ApiMethodItem, qe as ApiPreparation, Xe as ApiResponse, Le as ApiStatus, Qe as BroadcastMessage, tt as Cache, et as CacheItem, nt as CacheStatic, Te as Cookie, Se as CookieBlock, xe as CookieBlockInstance, k as CookieStorage, O as DataStorage, it as Datetime, E as ErrorCenter, ce as ErrorCenterHandler, le as ErrorCenterInstance, Me as EventItem, ot as Formatters, H as FormattersType, st as GEO_FLAG_ICON_NAME, A as Geo, ct as GeoFlag, Oe as GeoInstance, R as GeoIntl, lt as GeoPhone, ut as Global, ft as Hash, dt as HashInstance, ht as Icons, N as Loading, Pe as LoadingInstance, Ot as Meta, G as MetaManager, Et as MetaOg, Ct as MetaOpenGraphAge, xt as MetaOpenGraphAvailability, St as MetaOpenGraphCondition, wt as MetaOpenGraphGender, q as MetaOpenGraphTag, bt as MetaOpenGraphType, yt as MetaRobots, kt as MetaStatic, K as MetaTag, Dt as MetaTwitter, Tt as MetaTwitterCard, J as MetaTwitterTag, At as ResumableTimer, jt as ScrollbarWidth, Ut as SearchList, It as SearchListData, Lt as SearchListItem, Vt as SearchListMatcher, Ht as SearchListOptions, D as ServerStorage, Gt as StorageCallback, Xt as TRANSLATE_GLOBAL_PREFIX, Zt as TRANSLATE_TIME_OUT, en as Translate, Qt as TranslateFile, $t as TranslateInstance, Ee as UI_GEO_COOKIE_KEY, tn as UrlItem, Ft as addTagHighlightMatch, C as anyToString, Jt as applyTemplate, nn as arrFill, cn as blobToBase64, ln as capitalize, Z as copyObject, un as copyObjectLite, U as createElement, dn as domQuerySelector, fn as domQuerySelectorAll, W as encodeAttribute, pe as encodeLiteAttribute, gn as ensureMaxSize, Y as escapeExp, _n as eventStopPropagation, S as executeFunction, Je as executePromise, r as forEach, vn as frame, yn as getArrayHighlightMatch, bn as getAttributes, xn as getClipboardData, rt as getColumn, Sn as getCurrentDate, Cn as getCurrentTime, j as getElement, Tn as getElementId, pn as getElementImage, gt as getElementItem, Ae as getElementOrWindow, me as getElementSafeScript, zt as getExactSearchExp, Rt as getExp, Dn as getFirst, he as getHydrationData, V as getItemByPath, On as getKey, kn as getLength, An as getLengthOfAllArray, jn as getMaxLengthAllArray, Mn as getMinLengthAllArray, Fn as getMouseClient, Nn as getMouseClientX, Pn as getMouseClientY, In as getObjectByKeys, Ln as getObjectNoUndefined, Rn as getObjectOrNone, zn as getOnlyText, Vn as getRandomText, o as getRequestString, Bt as getSearchExp, X as getSeparatingSearchExp, Hn as getStepPercent, Un as getStepValue, Gn as goScroll, Kn as goScrollSmooth, qn as goScrollTo, Yn as handleShare, Xn as inArray, En as initGetElementId, Zn as initScrollbarOffset, Qn as intersectKey, Yt as isApiSuccess, i as isArray, $n as isDifferent, ie as isDomData, s as isDomRuntime, er as isElementVisible, nr as isEnter, l as isFilled, rr as isFloat, x as isFunction, je as isInDom, tr as isInput, ir as isIntegerBetween, c as isNull, p as isNumber, t as isObject, n as isObjectNotArray, u as isOnLine, b as isSelected, ar as isSelectedByList, Jn as isShare, d as isString, or as isTab, ke as isWindow, f as random, sr as removeCommonPrefix, cr as replaceComponentName, $ as replaceRecursive, ur as replaceTemplate, hn as resizeImageByMax, dr as secondToTime, _t as setElementItem, fr as setValues, ee as sleep, pr as splice, Bn as strFill, ae as strSplit, M as toArray, at as toCamelCase, mr as toCamelCaseFirst, L as toDate, hr as toKebabCase, y as toNumber, gr as toNumberByMax, vr as toPercent, yr as toPercentBy100, a as toString, de as transformation, br as uint8ArrayToBase64, lr as uniqueArray, xr as writeClipboardData };
|