@dxtmisha/functional-basic 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.d.ts +4738 -118
- package/dist/library.js +435 -350
- package/package.json +2 -2
- package/dist/classes/Api.d.ts +0 -161
- package/dist/classes/ApiDefault.d.ts +0 -43
- package/dist/classes/ApiHeaders.d.ts +0 -23
- package/dist/classes/ApiPreparation.d.ts +0 -56
- package/dist/classes/ApiResponse.d.ts +0 -111
- package/dist/classes/ApiStatus.d.ts +0 -89
- package/dist/classes/BroadcastMessage.d.ts +0 -36
- package/dist/classes/Cache.d.ts +0 -34
- package/dist/classes/CacheItem.d.ts +0 -55
- package/dist/classes/CacheStatic.d.ts +0 -17
- package/dist/classes/Cookie.d.ts +0 -58
- package/dist/classes/CookieBlock.d.ts +0 -22
- package/dist/classes/DataStorage.d.ts +0 -82
- package/dist/classes/Datetime.d.ts +0 -489
- package/dist/classes/EventItem.d.ts +0 -160
- package/dist/classes/Geo.d.ts +0 -168
- package/dist/classes/GeoFlag.d.ts +0 -79
- package/dist/classes/GeoIntl.d.ts +0 -262
- package/dist/classes/GeoPhone.d.ts +0 -107
- package/dist/classes/Global.d.ts +0 -21
- package/dist/classes/Hash.d.ts +0 -59
- package/dist/classes/Icons.d.ts +0 -90
- package/dist/classes/Loading.d.ts +0 -49
- package/dist/classes/Meta.d.ts +0 -168
- package/dist/classes/MetaManager.d.ts +0 -103
- package/dist/classes/MetaOg.d.ts +0 -101
- package/dist/classes/MetaTwitter.d.ts +0 -101
- package/dist/classes/ScrollbarWidth.d.ts +0 -33
- package/dist/classes/Translate.d.ts +0 -116
- package/dist/functions/anyToString.d.ts +0 -7
- package/dist/functions/applyTemplate.d.ts +0 -10
- package/dist/functions/arrFill.d.ts +0 -8
- package/dist/functions/blobToBase64.d.ts +0 -7
- package/dist/functions/copyObject.d.ts +0 -8
- package/dist/functions/copyObjectLite.d.ts +0 -9
- package/dist/functions/createElement.d.ts +0 -13
- package/dist/functions/domQuerySelector.d.ts +0 -7
- package/dist/functions/domQuerySelectorAll.d.ts +0 -7
- package/dist/functions/encodeAttribute.d.ts +0 -7
- package/dist/functions/eventStopPropagation.d.ts +0 -7
- package/dist/functions/executeFunction.d.ts +0 -8
- package/dist/functions/executePromise.d.ts +0 -7
- package/dist/functions/forEach.d.ts +0 -11
- package/dist/functions/frame.d.ts +0 -16
- package/dist/functions/getAttributes.d.ts +0 -8
- package/dist/functions/getClipboardData.d.ts +0 -11
- package/dist/functions/getColumn.d.ts +0 -10
- package/dist/functions/getCurrentDate.d.ts +0 -8
- package/dist/functions/getElement.d.ts +0 -8
- package/dist/functions/getElementId.d.ts +0 -9
- package/dist/functions/getElementImage.d.ts +0 -7
- package/dist/functions/getElementItem.d.ts +0 -11
- package/dist/functions/getElementOrWindow.d.ts +0 -8
- package/dist/functions/getExp.d.ts +0 -13
- package/dist/functions/getItemByPath.d.ts +0 -8
- package/dist/functions/getKey.d.ts +0 -7
- package/dist/functions/getLengthOfAllArray.d.ts +0 -8
- package/dist/functions/getMaxLengthAllArray.d.ts +0 -8
- package/dist/functions/getMinLengthAllArray.d.ts +0 -8
- package/dist/functions/getMouseClient.d.ts +0 -8
- package/dist/functions/getMouseClientX.d.ts +0 -7
- package/dist/functions/getMouseClientY.d.ts +0 -7
- package/dist/functions/getObjectByKeys.d.ts +0 -8
- package/dist/functions/getObjectNoUndefined.d.ts +0 -8
- package/dist/functions/getObjectOrNone.d.ts +0 -7
- package/dist/functions/getRandomText.d.ts +0 -11
- package/dist/functions/getRequestString.d.ts +0 -9
- package/dist/functions/getStepPercent.d.ts +0 -8
- package/dist/functions/getStepValue.d.ts +0 -8
- package/dist/functions/goScroll.d.ts +0 -10
- package/dist/functions/goScrollSmooth.d.ts +0 -9
- package/dist/functions/inArray.d.ts +0 -8
- package/dist/functions/initScrollbarOffset.d.ts +0 -6
- package/dist/functions/intersectKey.d.ts +0 -8
- package/dist/functions/isArray.d.ts +0 -7
- package/dist/functions/isDifferent.d.ts +0 -9
- package/dist/functions/isDomData.d.ts +0 -6
- package/dist/functions/isDomRuntime.d.ts +0 -10
- package/dist/functions/isFilled.d.ts +0 -9
- package/dist/functions/isFloat.d.ts +0 -7
- package/dist/functions/isFunction.d.ts +0 -8
- package/dist/functions/isInDom.d.ts +0 -8
- package/dist/functions/isIntegerBetween.d.ts +0 -8
- package/dist/functions/isNull.d.ts +0 -8
- package/dist/functions/isNumber.d.ts +0 -7
- package/dist/functions/isObject.d.ts +0 -7
- package/dist/functions/isObjectNotArray.d.ts +0 -7
- package/dist/functions/isSelected.d.ts +0 -8
- package/dist/functions/isSelectedByList.d.ts +0 -8
- package/dist/functions/isString.d.ts +0 -7
- package/dist/functions/isWindow.d.ts +0 -7
- package/dist/functions/random.d.ts +0 -8
- package/dist/functions/removeCommonPrefix.d.ts +0 -8
- package/dist/functions/replaceRecursive.d.ts +0 -10
- package/dist/functions/replaceTemplate.d.ts +0 -9
- package/dist/functions/resizeImageByMax.d.ts +0 -18
- package/dist/functions/secondToTime.d.ts +0 -7
- package/dist/functions/setElementItem.d.ts +0 -10
- package/dist/functions/setValues.d.ts +0 -17
- package/dist/functions/splice.d.ts +0 -12
- package/dist/functions/strFill.d.ts +0 -8
- package/dist/functions/toArray.d.ts +0 -17
- package/dist/functions/toCamelCase.d.ts +0 -7
- package/dist/functions/toCamelCaseFirst.d.ts +0 -7
- package/dist/functions/toDate.d.ts +0 -7
- package/dist/functions/toKebabCase.d.ts +0 -15
- package/dist/functions/toNumber.d.ts +0 -8
- package/dist/functions/toNumberByMax.d.ts +0 -9
- package/dist/functions/toPercent.d.ts +0 -8
- package/dist/functions/toPercentBy100.d.ts +0 -8
- package/dist/functions/transformation.d.ts +0 -21
- package/dist/functions/uint8ArrayToBase64.d.ts +0 -8
- package/dist/functions/uniqueArray.d.ts +0 -7
- package/dist/functions/writeClipboardData.d.ts +0 -7
- package/dist/types/apiTypes.d.ts +0 -116
- package/dist/types/basicTypes.d.ts +0 -126
- package/dist/types/geoTypes.d.ts +0 -86
- package/dist/types/metaTypes.d.ts +0 -584
package/dist/library.js
CHANGED
|
@@ -2,13 +2,13 @@ var Pt = Object.defineProperty;
|
|
|
2
2
|
var Wt = (i, t, e) => t in i ? Pt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
3
|
var c = (i, t, e) => Wt(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { geo as Ut } from "@dxtmisha/media";
|
|
5
|
-
function
|
|
5
|
+
function C(i, t) {
|
|
6
6
|
return t ? Object.assign({}, i, t) : Object.assign({}, i);
|
|
7
7
|
}
|
|
8
8
|
function m(i) {
|
|
9
9
|
return !!(i && typeof i == "object");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function f(i, t) {
|
|
12
12
|
if (m(i)) {
|
|
13
13
|
const e = [];
|
|
14
14
|
return i instanceof Map ? i.forEach((s, n) => e.push(t(s, n, i))) : Array.isArray(i) ? i.forEach((s, n) => e.push(t(s, n, i))) : Object.entries(i).forEach(
|
|
@@ -17,16 +17,16 @@ function g(i, t) {
|
|
|
17
17
|
}
|
|
18
18
|
return [];
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function Et(i, t = "=", e = "&") {
|
|
21
|
+
return f(
|
|
22
22
|
i,
|
|
23
23
|
(s, n) => `${n}${t}${encodeURIComponent(String(s).trim())}`
|
|
24
24
|
).sort().join(e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function M(i) {
|
|
27
27
|
return i == null;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function L(i, t) {
|
|
30
30
|
if (i) {
|
|
31
31
|
if (t && i === "0")
|
|
32
32
|
return !0;
|
|
@@ -40,7 +40,7 @@ function S(i, t) {
|
|
|
40
40
|
case "symbol":
|
|
41
41
|
return !0;
|
|
42
42
|
case "object":
|
|
43
|
-
return Array.isArray(i) ? i.length > 0 : Object.values(i).some((e) => !
|
|
43
|
+
return Array.isArray(i) ? i.length > 0 : Object.values(i).some((e) => !M(e));
|
|
44
44
|
case "string":
|
|
45
45
|
return !["", "undefined", "null", "0", "false", "[]"].includes(i);
|
|
46
46
|
case "undefined":
|
|
@@ -51,19 +51,19 @@ function S(i, t) {
|
|
|
51
51
|
}
|
|
52
52
|
return !1;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function A(i) {
|
|
55
55
|
return m(i) && !Array.isArray(i);
|
|
56
56
|
}
|
|
57
57
|
function R(i) {
|
|
58
58
|
return typeof i == "string";
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function H(i) {
|
|
61
61
|
return JSON.parse(JSON.stringify(i));
|
|
62
62
|
}
|
|
63
63
|
function l() {
|
|
64
64
|
return typeof window != "undefined" && !!window.document;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function lt(i) {
|
|
67
67
|
switch (typeof i) {
|
|
68
68
|
case "number":
|
|
69
69
|
return !0;
|
|
@@ -73,7 +73,7 @@ function ut(i) {
|
|
|
73
73
|
return !1;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function k(i) {
|
|
77
77
|
if (typeof i == "number")
|
|
78
78
|
return i;
|
|
79
79
|
if (!i)
|
|
@@ -81,20 +81,20 @@ function C(i) {
|
|
|
81
81
|
let t = i.replace(/[^\d., ]+/ig, "");
|
|
82
82
|
return t.match(/( [0-9]{3}[ ,.]|[0-9] [0-9])/ig) ? t = t.replace(/ /ig, "").replace(/,/ig, ".") : t.match(/,[0-9]{3}[,.]/ig) ? t = t.replace(/,/ig, "") : t.match(/[.][0-9]{3}[,.]/ig) ? t = t.replace(/[.]/ig, "").replace(/,/ig, ".") : t = t.replace(/,/ig, "."), parseFloat(t);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
84
|
+
function rt(i, t) {
|
|
85
|
+
return M(i) ? !1 : Array.isArray(t) ? t.includes(i) : lt(i) && lt(t) ? k(i) === k(t) : i === t;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function at(i) {
|
|
88
88
|
return i instanceof Function || typeof i == "function";
|
|
89
89
|
}
|
|
90
90
|
function I(i) {
|
|
91
|
-
return
|
|
91
|
+
return at(i) ? i() : i;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function nt() {
|
|
94
94
|
return location.href.startsWith("data:");
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
let
|
|
96
|
+
const tt = {};
|
|
97
|
+
let dt = "ui-storage";
|
|
98
98
|
class T {
|
|
99
99
|
/**
|
|
100
100
|
* Constructor
|
|
@@ -106,9 +106,9 @@ class T {
|
|
|
106
106
|
c(this, "age");
|
|
107
107
|
this.name = t, this.isSession = e;
|
|
108
108
|
const s = `${e ? "session" : "storage"}#${t}`;
|
|
109
|
-
if (s in
|
|
110
|
-
return
|
|
111
|
-
this.make(),
|
|
109
|
+
if (s in tt)
|
|
110
|
+
return tt[s];
|
|
111
|
+
this.make(), tt[s] = this;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* Changing the prefix in key names. Should be called at the beginning of the code.
|
|
@@ -117,7 +117,7 @@ class T {
|
|
|
117
117
|
* @param newPrefix new prefix/ новый префикс
|
|
118
118
|
*/
|
|
119
119
|
static setPrefix(t) {
|
|
120
|
-
|
|
120
|
+
dt = t;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* Getting data from local storage.
|
|
@@ -169,7 +169,7 @@ class T {
|
|
|
169
169
|
* @param cache cache time/ время кэширования
|
|
170
170
|
*/
|
|
171
171
|
isCache(t) {
|
|
172
|
-
return
|
|
172
|
+
return M(t) || this.age && this.age + t * 1e3 >= (/* @__PURE__ */ new Date()).getTime();
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* Returns an object for working with storage.
|
|
@@ -177,7 +177,7 @@ class T {
|
|
|
177
177
|
* Возвращает объект для работы с хранилищем.
|
|
178
178
|
*/
|
|
179
179
|
getMethod() {
|
|
180
|
-
if (l() && !
|
|
180
|
+
if (l() && !nt()) {
|
|
181
181
|
const t = this.isSession ? window == null ? void 0 : window.sessionStorage : window == null ? void 0 : window.localStorage;
|
|
182
182
|
if (t)
|
|
183
183
|
return t;
|
|
@@ -189,7 +189,7 @@ class T {
|
|
|
189
189
|
* Получение имени ключа в хранилище.
|
|
190
190
|
*/
|
|
191
191
|
getIndex() {
|
|
192
|
-
return `${
|
|
192
|
+
return `${dt}__${this.name}`;
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
195
195
|
* Getting data from storage.
|
|
@@ -271,7 +271,7 @@ const jt = "geo-code", p = class p {
|
|
|
271
271
|
* Получение обработанных данных.
|
|
272
272
|
*/
|
|
273
273
|
static getItem() {
|
|
274
|
-
return
|
|
274
|
+
return C(this.item, {
|
|
275
275
|
language: this.language
|
|
276
276
|
});
|
|
277
277
|
}
|
|
@@ -292,7 +292,7 @@ const jt = "geo-code", p = class p {
|
|
|
292
292
|
*/
|
|
293
293
|
static getByCode(t) {
|
|
294
294
|
let e;
|
|
295
|
-
return t && (t.match(/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/) && (e = this.getByCodeFull(t)), !e && t.match(/[A-Z]{2}/) && (e = this.getByCountry(this.toCountry(t))), !e && t.match(/[a-z]{2}/) && (e = this.getByLanguage(this.toLanguage(t)))), this.toFull(
|
|
295
|
+
return t && (t.match(/([A-Z]{2}-[a-z]{2})|([a-z]{2}-[A-Z]{2})/) && (e = this.getByCodeFull(t)), !e && t.match(/[A-Z]{2}/) && (e = this.getByCountry(this.toCountry(t))), !e && t.match(/[a-z]{2}/) && (e = this.getByLanguage(this.toLanguage(t)))), this.toFull(H(e != null ? e : this.getList()[0]));
|
|
296
296
|
}
|
|
297
297
|
/**
|
|
298
298
|
* Returns the full data by language and country.
|
|
@@ -302,7 +302,7 @@ const jt = "geo-code", p = class p {
|
|
|
302
302
|
*/
|
|
303
303
|
static getByCodeFull(t) {
|
|
304
304
|
return this.getList().find(
|
|
305
|
-
(e) =>
|
|
305
|
+
(e) => rt(t, [
|
|
306
306
|
`${e.language}-${e.country}`,
|
|
307
307
|
`${e.country}-${e.language}`
|
|
308
308
|
])
|
|
@@ -432,7 +432,7 @@ const jt = "geo-code", p = class p {
|
|
|
432
432
|
* объект с данными об текущей стране
|
|
433
433
|
*/
|
|
434
434
|
static toFull(t) {
|
|
435
|
-
return
|
|
435
|
+
return C(t, {
|
|
436
436
|
standard: this.toStandard(t),
|
|
437
437
|
firstDay: (t == null ? void 0 : t.firstDay) || "Mo"
|
|
438
438
|
});
|
|
@@ -443,22 +443,22 @@ let w = p;
|
|
|
443
443
|
function It(i) {
|
|
444
444
|
return l() && i === window;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function N(i) {
|
|
447
447
|
var t;
|
|
448
448
|
if (l())
|
|
449
449
|
return It(i) ? document.body : R(i) ? (t = document.querySelector(i)) != null ? t : void 0 : i;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
return It(i) ? i :
|
|
451
|
+
function gt(i) {
|
|
452
|
+
return It(i) ? i : N(i);
|
|
453
453
|
}
|
|
454
454
|
function Ht(i) {
|
|
455
455
|
var t;
|
|
456
|
-
return !!((t =
|
|
456
|
+
return !!((t = N(i)) != null && t.closest("html"));
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Z(i) {
|
|
459
459
|
return Array.isArray(i) ? i : [i];
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class ft {
|
|
462
462
|
/**
|
|
463
463
|
* Classes Constructor
|
|
464
464
|
* @param elementSelector element/ элемент
|
|
@@ -509,7 +509,7 @@ class dt {
|
|
|
509
509
|
*/
|
|
510
510
|
c(this, "activity", !1);
|
|
511
511
|
c(this, "activityItems", []);
|
|
512
|
-
this.listener = s, this.options = n, this.detail = o, this.element =
|
|
512
|
+
this.listener = s, this.options = n, this.detail = o, this.element = gt(t), this.elementControl = N(t), this.type = Z(e);
|
|
513
513
|
}
|
|
514
514
|
/**
|
|
515
515
|
* Checks whether event listening is currently enabled.
|
|
@@ -529,8 +529,8 @@ class dt {
|
|
|
529
529
|
* @param elementSelector element/ элемент
|
|
530
530
|
*/
|
|
531
531
|
setElement(t) {
|
|
532
|
-
const e =
|
|
533
|
-
return this.elementControlEdit || (this.elementControl =
|
|
532
|
+
const e = gt(t);
|
|
533
|
+
return this.elementControlEdit || (this.elementControl = N(t)), this.element = e, this.reset(), this;
|
|
534
534
|
}
|
|
535
535
|
/**
|
|
536
536
|
* Modifies the object that receives the notification.
|
|
@@ -539,7 +539,7 @@ class dt {
|
|
|
539
539
|
* @param elementSelector element/ элемент
|
|
540
540
|
*/
|
|
541
541
|
setElementControl(t) {
|
|
542
|
-
return this.elementControl =
|
|
542
|
+
return this.elementControl = N(t), this.elementControlEdit = !M(this.elementControl), this.elementControlEdit || (this.elementControl = N(this.element)), this;
|
|
543
543
|
}
|
|
544
544
|
/**
|
|
545
545
|
* Changes the type of the handled event.
|
|
@@ -548,7 +548,7 @@ class dt {
|
|
|
548
548
|
* @param type type/ тип
|
|
549
549
|
*/
|
|
550
550
|
setType(t) {
|
|
551
|
-
return this.type =
|
|
551
|
+
return this.type = Z(t), this.reset(), this;
|
|
552
552
|
}
|
|
553
553
|
/**
|
|
554
554
|
* Modifies the object that receives the notification.
|
|
@@ -694,7 +694,7 @@ class dt {
|
|
|
694
694
|
return !1;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
const
|
|
697
|
+
const mt = "ui-loading", Y = class Y {
|
|
698
698
|
/**
|
|
699
699
|
* Check if the loader is active now.
|
|
700
700
|
*
|
|
@@ -729,7 +729,7 @@ const gt = "ui-loading", V = class V {
|
|
|
729
729
|
* @param element element/ элемент
|
|
730
730
|
*/
|
|
731
731
|
static registrationEvent(t, e) {
|
|
732
|
-
l() && new
|
|
732
|
+
l() && new ft(window, mt, t).setElementControl(e).start();
|
|
733
733
|
}
|
|
734
734
|
/**
|
|
735
735
|
* Calls the event listener.
|
|
@@ -741,8 +741,8 @@ const gt = "ui-loading", V = class V {
|
|
|
741
741
|
(t = this.event) == null || t.dispatch({ loading: this.is() });
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
c(
|
|
745
|
-
let x =
|
|
744
|
+
c(Y, "value", 0), c(Y, "event"), l() && (Y.event = new ft(window, mt));
|
|
745
|
+
let x = Y;
|
|
746
746
|
class zt {
|
|
747
747
|
constructor() {
|
|
748
748
|
/** Default headers/ Заголовки по умолчанию */
|
|
@@ -757,11 +757,11 @@ class zt {
|
|
|
757
757
|
*/
|
|
758
758
|
get(t, e = "application/json;charset=UTF-8") {
|
|
759
759
|
if (t !== null) {
|
|
760
|
-
const s =
|
|
760
|
+
const s = C(
|
|
761
761
|
this.headers,
|
|
762
762
|
t
|
|
763
763
|
);
|
|
764
|
-
return
|
|
764
|
+
return L(e) && (s["Content-Type"] = e), s;
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
@@ -770,7 +770,7 @@ class zt {
|
|
|
770
770
|
* Изменяет данные заголовка по умолчанию.
|
|
771
771
|
*/
|
|
772
772
|
set(t) {
|
|
773
|
-
return
|
|
773
|
+
return A(t) && (this.headers = t), this;
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
var D = /* @__PURE__ */ ((i) => (i.get = "GET", i.post = "POST", i.put = "PUT", i.delete = "DELETE", i))(D || {});
|
|
@@ -806,8 +806,8 @@ class Zt {
|
|
|
806
806
|
if (e) {
|
|
807
807
|
if (t instanceof FormData)
|
|
808
808
|
this.addByFormData(t, e);
|
|
809
|
-
else if (
|
|
810
|
-
return
|
|
809
|
+
else if (A(t))
|
|
810
|
+
return C(e, t);
|
|
811
811
|
}
|
|
812
812
|
return t;
|
|
813
813
|
}
|
|
@@ -926,7 +926,7 @@ class Vt {
|
|
|
926
926
|
* @param response response data/ данные ответа
|
|
927
927
|
*/
|
|
928
928
|
setLastResponse(t) {
|
|
929
|
-
return t &&
|
|
929
|
+
return t && A(t) && "message" in t && this.setLastMessage(String(t.message)), this.set({ lastResponse: t }), this;
|
|
930
930
|
}
|
|
931
931
|
/**
|
|
932
932
|
* Sets messages from the last request.
|
|
@@ -952,10 +952,10 @@ async function Kt(i) {
|
|
|
952
952
|
const t = I(i);
|
|
953
953
|
return t instanceof Promise ? await t : t;
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function J(i, t) {
|
|
956
956
|
return Math.floor(Math.random() * (t - i + 1) + i);
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const yt = "d-response-loading";
|
|
959
959
|
class Yt {
|
|
960
960
|
/**
|
|
961
961
|
* Constructor
|
|
@@ -999,7 +999,7 @@ class Yt {
|
|
|
999
999
|
* @param response data for caching/ данные для кеширования
|
|
1000
1000
|
*/
|
|
1001
1001
|
add(t) {
|
|
1002
|
-
return this.response.push(...
|
|
1002
|
+
return this.response.push(...Z(t)), this;
|
|
1003
1003
|
}
|
|
1004
1004
|
/**
|
|
1005
1005
|
* Sets developer mode.
|
|
@@ -1076,7 +1076,7 @@ class Yt {
|
|
|
1076
1076
|
*/
|
|
1077
1077
|
isResponse(t, e) {
|
|
1078
1078
|
const s = this.requestDefault.request(t == null ? void 0 : t.request);
|
|
1079
|
-
return e === s || s === "*any" ||
|
|
1079
|
+
return e === s || s === "*any" || L(e) && L(s) && A(e) && A(s) && !(e instanceof FormData) && !(s instanceof FormData) && Object.values(e).length === Object.values(s).length && Object.entries(s).reduce(
|
|
1080
1080
|
(n, [o, a]) => n && (a === (e == null ? void 0 : e[o]) || a === "*any"),
|
|
1081
1081
|
!0
|
|
1082
1082
|
);
|
|
@@ -1091,11 +1091,11 @@ class Yt {
|
|
|
1091
1091
|
fetch(t, e) {
|
|
1092
1092
|
return this.startResponseLoading(), new Promise((s) => {
|
|
1093
1093
|
Kt(
|
|
1094
|
-
|
|
1094
|
+
at(t.response) ? t.response(e) : t.response
|
|
1095
1095
|
).then((n) => {
|
|
1096
1096
|
t != null && t.lag ? (x.show(), setTimeout(() => {
|
|
1097
1097
|
this.stopResponseLoading(), s(n), x.hide();
|
|
1098
|
-
},
|
|
1098
|
+
}, J(0, 2e3))) : (this.stopResponseLoading(), s(n));
|
|
1099
1099
|
});
|
|
1100
1100
|
});
|
|
1101
1101
|
}
|
|
@@ -1105,7 +1105,7 @@ class Yt {
|
|
|
1105
1105
|
* Включить загрузку для эмуляции запроса.
|
|
1106
1106
|
*/
|
|
1107
1107
|
startResponseLoading() {
|
|
1108
|
-
this.loading && clearTimeout(this.loading), l() && document.body.classList.add(
|
|
1108
|
+
this.loading && clearTimeout(this.loading), l() && document.body.classList.add(yt);
|
|
1109
1109
|
}
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Disable loading for request emulation.
|
|
@@ -1114,7 +1114,7 @@ class Yt {
|
|
|
1114
1114
|
*/
|
|
1115
1115
|
stopResponseLoading() {
|
|
1116
1116
|
this.loading = setTimeout(() => {
|
|
1117
|
-
this.loading = void 0, l() && document.body.classList.remove(
|
|
1117
|
+
this.loading = void 0, l() && document.body.classList.remove(yt);
|
|
1118
1118
|
}, 1200);
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
@@ -1234,7 +1234,7 @@ const b = class b {
|
|
|
1234
1234
|
static getBody(t = {}, e = D.get) {
|
|
1235
1235
|
if (t instanceof FormData)
|
|
1236
1236
|
return t;
|
|
1237
|
-
if (e !== D.get &&
|
|
1237
|
+
if (e !== D.get && L(t))
|
|
1238
1238
|
return R(t) ? t : JSON.stringify(t);
|
|
1239
1239
|
}
|
|
1240
1240
|
/**
|
|
@@ -1247,8 +1247,8 @@ const b = class b {
|
|
|
1247
1247
|
*/
|
|
1248
1248
|
static getBodyForGet(t, e = "", s = D.get) {
|
|
1249
1249
|
if (s === D.get) {
|
|
1250
|
-
const n = e.match(/\?/) ? "&" : "?", o = typeof t == "object" ?
|
|
1251
|
-
if (
|
|
1250
|
+
const n = e.match(/\?/) ? "&" : "?", o = typeof t == "object" ? Et(t) : t;
|
|
1251
|
+
if (L(o))
|
|
1252
1252
|
return `${n}${o}`;
|
|
1253
1253
|
}
|
|
1254
1254
|
return "";
|
|
@@ -1314,7 +1314,7 @@ const b = class b {
|
|
|
1314
1314
|
* @param request list of parameters/ список параметров
|
|
1315
1315
|
*/
|
|
1316
1316
|
static get(t) {
|
|
1317
|
-
return this.request(
|
|
1317
|
+
return this.request(C(t, {
|
|
1318
1318
|
method: D.get
|
|
1319
1319
|
}));
|
|
1320
1320
|
}
|
|
@@ -1325,7 +1325,7 @@ const b = class b {
|
|
|
1325
1325
|
* @param request list of parameters/ список параметров
|
|
1326
1326
|
*/
|
|
1327
1327
|
static post(t) {
|
|
1328
|
-
return this.request(
|
|
1328
|
+
return this.request(C(t, {
|
|
1329
1329
|
method: D.post
|
|
1330
1330
|
}));
|
|
1331
1331
|
}
|
|
@@ -1336,7 +1336,7 @@ const b = class b {
|
|
|
1336
1336
|
* @param request list of parameters/ список параметров
|
|
1337
1337
|
*/
|
|
1338
1338
|
static put(t) {
|
|
1339
|
-
return this.request(
|
|
1339
|
+
return this.request(C(t, {
|
|
1340
1340
|
method: D.put
|
|
1341
1341
|
}));
|
|
1342
1342
|
}
|
|
@@ -1347,7 +1347,7 @@ const b = class b {
|
|
|
1347
1347
|
* @param request list of parameters/ список параметров
|
|
1348
1348
|
*/
|
|
1349
1349
|
static delete(t) {
|
|
1350
|
-
return this.request(
|
|
1350
|
+
return this.request(C(t, {
|
|
1351
1351
|
method: D.delete
|
|
1352
1352
|
}));
|
|
1353
1353
|
}
|
|
@@ -1371,19 +1371,19 @@ const b = class b {
|
|
|
1371
1371
|
x.show();
|
|
1372
1372
|
try {
|
|
1373
1373
|
await this.preparation.make(o);
|
|
1374
|
-
const
|
|
1374
|
+
const g = await this.makeQuery(t), d = await this.preparation.makeEnd(a, g);
|
|
1375
1375
|
if (this.status.setStatus(
|
|
1376
|
-
|
|
1377
|
-
|
|
1376
|
+
g.status,
|
|
1377
|
+
g.statusText
|
|
1378
1378
|
), d != null && d.reset)
|
|
1379
1379
|
return x.hide(), await this.fetch(t);
|
|
1380
1380
|
h = await this.readData(
|
|
1381
|
-
|
|
1381
|
+
g,
|
|
1382
1382
|
n,
|
|
1383
1383
|
d
|
|
1384
1384
|
);
|
|
1385
|
-
} catch (
|
|
1386
|
-
s || console.error("Api: ",
|
|
1385
|
+
} catch (g) {
|
|
1386
|
+
s || console.error("Api: ", g), this.status.setError(String(g));
|
|
1387
1387
|
}
|
|
1388
1388
|
return x.hide(), this.makeData(h, e);
|
|
1389
1389
|
}
|
|
@@ -1413,12 +1413,12 @@ const b = class b {
|
|
|
1413
1413
|
method: a = D.get,
|
|
1414
1414
|
headers: u = {},
|
|
1415
1415
|
type: h = "application/json;charset=UTF-8",
|
|
1416
|
-
init:
|
|
1417
|
-
} = t, d = o != null ? o : this.getUrl(n, s),
|
|
1416
|
+
init: g = {}
|
|
1417
|
+
} = t, d = o != null ? o : this.getUrl(n, s), v = `${d}${this.getBodyForGet(e, d, a)}`, V = this.headers.get(u, h), P = C(g, {
|
|
1418
1418
|
method: a,
|
|
1419
1419
|
body: this.getBody(e, a)
|
|
1420
1420
|
});
|
|
1421
|
-
return
|
|
1421
|
+
return V && (P.headers = V), await fetch(v, P);
|
|
1422
1422
|
}
|
|
1423
1423
|
/**
|
|
1424
1424
|
* Transforms data if needed.
|
|
@@ -1428,9 +1428,9 @@ const b = class b {
|
|
|
1428
1428
|
* @param toData is it necessary to process the data/ нужно ли обрабатывать данные
|
|
1429
1429
|
*/
|
|
1430
1430
|
static makeData(t, e) {
|
|
1431
|
-
if (this.status.setLastResponse(t), t && e &&
|
|
1432
|
-
if (
|
|
1433
|
-
const s =
|
|
1431
|
+
if (this.status.setLastResponse(t), t && e && A(t) && "data" in t) {
|
|
1432
|
+
if (A(t.data)) {
|
|
1433
|
+
const s = C(t.data);
|
|
1434
1434
|
return "success" in t && (s.success = t.success), s;
|
|
1435
1435
|
}
|
|
1436
1436
|
return t.data;
|
|
@@ -1439,7 +1439,7 @@ const b = class b {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
};
|
|
1441
1441
|
c(b, "url", "/api/"), c(b, "headers", new zt()), c(b, "requestDefault", new Zt()), c(b, "status", new Vt()), c(b, "response", new Yt(b.requestDefault)), c(b, "preparation", new qt());
|
|
1442
|
-
let
|
|
1442
|
+
let z = b;
|
|
1443
1443
|
class Ce {
|
|
1444
1444
|
/**
|
|
1445
1445
|
* Constructor
|
|
@@ -1485,8 +1485,8 @@ class Ce {
|
|
|
1485
1485
|
return this.callback = t, this;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
|
-
const Jt = () => new T("__broadcast-name").get(() => `name_${
|
|
1489
|
-
class
|
|
1488
|
+
const Jt = () => new T("__broadcast-name").get(() => `name_${J(1e6, 9999999)}`);
|
|
1489
|
+
class Mt {
|
|
1490
1490
|
/**
|
|
1491
1491
|
* Constructor
|
|
1492
1492
|
* @param callback function for the cache/ функция для кэша
|
|
@@ -1549,7 +1549,7 @@ class Qt {
|
|
|
1549
1549
|
return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
|
-
class
|
|
1552
|
+
class Qt {
|
|
1553
1553
|
constructor() {
|
|
1554
1554
|
c(this, "cache", {});
|
|
1555
1555
|
}
|
|
@@ -1583,7 +1583,7 @@ class Mt {
|
|
|
1583
1583
|
* @param callback function for the cache/ функция для кэша
|
|
1584
1584
|
*/
|
|
1585
1585
|
getCacheItem(t, e) {
|
|
1586
|
-
return t in this.cache || (this.cache[t] = new
|
|
1586
|
+
return t in this.cache || (this.cache[t] = new Mt(e)), this.cache[t];
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
1589
|
const O = class O {
|
|
@@ -1599,9 +1599,9 @@ const O = class O {
|
|
|
1599
1599
|
return this.cache.get(t, e, s);
|
|
1600
1600
|
}
|
|
1601
1601
|
};
|
|
1602
|
-
c(O, "cache"), O.cache = new
|
|
1603
|
-
let
|
|
1604
|
-
function
|
|
1602
|
+
c(O, "cache"), O.cache = new Qt();
|
|
1603
|
+
let $t = O;
|
|
1604
|
+
function Bt(i, t = !1) {
|
|
1605
1605
|
if (typeof i == "string") {
|
|
1606
1606
|
const e = i.trim();
|
|
1607
1607
|
switch (e) {
|
|
@@ -1633,7 +1633,7 @@ function Et(i, t = !1) {
|
|
|
1633
1633
|
return i;
|
|
1634
1634
|
}
|
|
1635
1635
|
const Xt = "cookie-block";
|
|
1636
|
-
class
|
|
1636
|
+
class Ft {
|
|
1637
1637
|
/**
|
|
1638
1638
|
* Obtaining status.
|
|
1639
1639
|
*
|
|
@@ -1653,14 +1653,14 @@ class Bt {
|
|
|
1653
1653
|
this.storage.set(t);
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
|
-
c(
|
|
1657
|
-
const X = {},
|
|
1656
|
+
c(Ft, "storage", new T(Xt));
|
|
1657
|
+
const X = {}, ht = class ht {
|
|
1658
1658
|
constructor(t) {
|
|
1659
1659
|
c(this, "value");
|
|
1660
1660
|
c(this, "options", {});
|
|
1661
|
-
if (this.name = t, t in
|
|
1662
|
-
return
|
|
1663
|
-
this.value = X == null ? void 0 : X[t],
|
|
1661
|
+
if (this.name = t, t in et)
|
|
1662
|
+
return et[t];
|
|
1663
|
+
this.value = X == null ? void 0 : X[t], et[t] = this;
|
|
1664
1664
|
}
|
|
1665
1665
|
/**
|
|
1666
1666
|
* Get data or update if none.
|
|
@@ -1706,7 +1706,7 @@ const X = {}, ct = class ct {
|
|
|
1706
1706
|
*/
|
|
1707
1707
|
update() {
|
|
1708
1708
|
var t, e, s, n, o;
|
|
1709
|
-
if (l() && !
|
|
1709
|
+
if (l() && !nt() && !Ft.get()) {
|
|
1710
1710
|
const a = String((t = this.value) != null ? t : "");
|
|
1711
1711
|
document.cookie = [
|
|
1712
1712
|
`${encodeURIComponent(this.name)}=${encodeURIComponent(a)}`,
|
|
@@ -1724,30 +1724,30 @@ const X = {}, ct = class ct {
|
|
|
1724
1724
|
static updateData() {
|
|
1725
1725
|
for (const t of document.cookie.split(";")) {
|
|
1726
1726
|
const [e, s] = t.trim().split("=");
|
|
1727
|
-
e &&
|
|
1727
|
+
e && L(s) && (X[e] = Bt(s));
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
1730
|
};
|
|
1731
|
-
l() && !
|
|
1732
|
-
let
|
|
1733
|
-
const
|
|
1731
|
+
l() && !nt() && ht.updateData();
|
|
1732
|
+
let pt = ht;
|
|
1733
|
+
const et = {};
|
|
1734
1734
|
function B(i) {
|
|
1735
|
-
var n, o, a, u, h,
|
|
1735
|
+
var n, o, a, u, h, g, d, v;
|
|
1736
1736
|
if (i instanceof Date)
|
|
1737
1737
|
return i;
|
|
1738
|
-
if (
|
|
1738
|
+
if (M(i))
|
|
1739
1739
|
return /* @__PURE__ */ new Date();
|
|
1740
1740
|
if (typeof i == "number")
|
|
1741
1741
|
return new Date(i);
|
|
1742
1742
|
let t = i, e = w.getTimezoneFormat().trim();
|
|
1743
|
-
i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (
|
|
1744
|
-
const s = (
|
|
1743
|
+
i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (V, P, G) => (t = P, e = G.trim(), V));
|
|
1744
|
+
const s = (v = (d = (g = (h = (u = (a = (o = (n = /^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) != null ? n : /^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) != null ? o : /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(t) && t.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6")) != null ? a : /^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) != null ? u : /^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) != null ? h : /^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) != null ? g : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? d : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? v : t.replace(" ", "T");
|
|
1745
1745
|
return /* @__PURE__ */ new Date(`${s.trim()}${e}`);
|
|
1746
1746
|
}
|
|
1747
1747
|
function _t(i, t) {
|
|
1748
|
-
return
|
|
1748
|
+
return f(i, (e) => e == null ? void 0 : e[t]);
|
|
1749
1749
|
}
|
|
1750
|
-
class
|
|
1750
|
+
class Q {
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Constructor
|
|
1753
1753
|
* @param code country code, full form language-country or one of them/
|
|
@@ -1757,9 +1757,9 @@ class J {
|
|
|
1757
1757
|
c(this, "geo");
|
|
1758
1758
|
this.geo = w.find(t);
|
|
1759
1759
|
const e = this.getLocation();
|
|
1760
|
-
if (e in
|
|
1761
|
-
return
|
|
1762
|
-
|
|
1760
|
+
if (e in it)
|
|
1761
|
+
return it[e];
|
|
1762
|
+
it[e] = this;
|
|
1763
1763
|
}
|
|
1764
1764
|
/**
|
|
1765
1765
|
* Returns an instance of the class according to the specified country code.
|
|
@@ -1769,7 +1769,7 @@ class J {
|
|
|
1769
1769
|
* код страны, полный вид язык-страна или один из них
|
|
1770
1770
|
*/
|
|
1771
1771
|
static getInstance(t = w.getLocation()) {
|
|
1772
|
-
return new
|
|
1772
|
+
return new Q(t);
|
|
1773
1773
|
}
|
|
1774
1774
|
/**
|
|
1775
1775
|
* Returns country code and language.
|
|
@@ -1876,7 +1876,7 @@ class J {
|
|
|
1876
1876
|
*/
|
|
1877
1877
|
number(t, e) {
|
|
1878
1878
|
var s, n;
|
|
1879
|
-
return ((n = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : n.call(s,
|
|
1879
|
+
return ((n = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : n.call(s, k(t))) || t.toString();
|
|
1880
1880
|
}
|
|
1881
1881
|
/**
|
|
1882
1882
|
* Decimal point symbol.
|
|
@@ -1905,7 +1905,7 @@ class J {
|
|
|
1905
1905
|
if (s) {
|
|
1906
1906
|
const a = this.numberObject(n);
|
|
1907
1907
|
return a ? _t(
|
|
1908
|
-
a.formatToParts(
|
|
1908
|
+
a.formatToParts(k(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
|
|
1909
1909
|
"value"
|
|
1910
1910
|
).join("") : t.toString();
|
|
1911
1911
|
} else return "currency" in n ? this.number(
|
|
@@ -1959,7 +1959,7 @@ class J {
|
|
|
1959
1959
|
* в форматировании блока
|
|
1960
1960
|
*/
|
|
1961
1961
|
sizeFile(t, e = "byte") {
|
|
1962
|
-
const s =
|
|
1962
|
+
const s = k(t);
|
|
1963
1963
|
if (s > 1024 && R(e))
|
|
1964
1964
|
switch (e) {
|
|
1965
1965
|
case "byte":
|
|
@@ -1997,7 +1997,7 @@ class J {
|
|
|
1997
1997
|
* объект с некоторыми или всеми свойствами
|
|
1998
1998
|
*/
|
|
1999
1999
|
percentBy100(t, e) {
|
|
2000
|
-
return this.percent(
|
|
2000
|
+
return this.percent(k(t) / 100, e);
|
|
2001
2001
|
}
|
|
2002
2002
|
/**
|
|
2003
2003
|
* Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
|
|
@@ -2009,13 +2009,13 @@ class J {
|
|
|
2009
2009
|
*/
|
|
2010
2010
|
plural(t, e, s, n) {
|
|
2011
2011
|
var u;
|
|
2012
|
-
const o =
|
|
2012
|
+
const o = k(t), a = e.split("|");
|
|
2013
2013
|
if (a.length > 1)
|
|
2014
2014
|
try {
|
|
2015
2015
|
if (l()) {
|
|
2016
|
-
const
|
|
2016
|
+
const g = new Intl.PluralRules(this.getLocation(), s).select(o);
|
|
2017
2017
|
let d;
|
|
2018
|
-
switch (
|
|
2018
|
+
switch (g) {
|
|
2019
2019
|
case "zero":
|
|
2020
2020
|
d = a[a.length - 1];
|
|
2021
2021
|
break;
|
|
@@ -2091,11 +2091,11 @@ class J {
|
|
|
2091
2091
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
2092
2092
|
*/
|
|
2093
2093
|
relativeLimit(t, e, s, n, o, a, u) {
|
|
2094
|
-
const h = B(t),
|
|
2095
|
-
return d.setDate(
|
|
2094
|
+
const h = B(t), g = s || /* @__PURE__ */ new Date(), d = new Date(g), v = new Date(g);
|
|
2095
|
+
return d.setDate(g.getDate() - e), v.setDate(g.getDate() + e), h >= d && h <= v ? this.relative(
|
|
2096
2096
|
h,
|
|
2097
2097
|
n,
|
|
2098
|
-
|
|
2098
|
+
g
|
|
2099
2099
|
) : this.date(
|
|
2100
2100
|
h,
|
|
2101
2101
|
a,
|
|
@@ -2116,7 +2116,7 @@ class J {
|
|
|
2116
2116
|
};
|
|
2117
2117
|
try {
|
|
2118
2118
|
if (l())
|
|
2119
|
-
return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(
|
|
2119
|
+
return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(k(t)), e);
|
|
2120
2120
|
} catch (o) {
|
|
2121
2121
|
console.error("relative: ", o);
|
|
2122
2122
|
}
|
|
@@ -2254,8 +2254,8 @@ class J {
|
|
|
2254
2254
|
return ["full", "datetime", "date", void 0, "year-month", "year"].indexOf(t) !== -1 && (s.year = "numeric"), ["full", "datetime", "date", void 0, "year-month", "month", "day-month"].indexOf(t) !== -1 && (s.month = e), ["full", "datetime", "date", void 0, "day", "day-month"].indexOf(t) !== -1 && (s.day = "2-digit"), t !== void 0 && (["full", "datetime", "time", "hour-minute", "hour"].indexOf(t) !== -1 && (s.hour = "2-digit"), ["full", "datetime", "time", "hour-minute", "minute"].indexOf(t) !== -1 && (s.minute = "2-digit"), ["full", "time", "second"].indexOf(t) !== -1 && (s.second = "2-digit")), s;
|
|
2255
2255
|
}
|
|
2256
2256
|
}
|
|
2257
|
-
const
|
|
2258
|
-
class
|
|
2257
|
+
const it = {};
|
|
2258
|
+
class ct {
|
|
2259
2259
|
/**
|
|
2260
2260
|
* Constructor
|
|
2261
2261
|
* @param date date for processing/ дата для обработки
|
|
@@ -2274,7 +2274,7 @@ class ot {
|
|
|
2274
2274
|
* Возвращает объект для работы с форматированием.
|
|
2275
2275
|
*/
|
|
2276
2276
|
getIntl() {
|
|
2277
|
-
return new
|
|
2277
|
+
return new Q(this.code);
|
|
2278
2278
|
}
|
|
2279
2279
|
/**
|
|
2280
2280
|
* Returns a Date object.
|
|
@@ -2479,7 +2479,7 @@ class ot {
|
|
|
2479
2479
|
* @param timeZone add time zone/ добавить временную зону
|
|
2480
2480
|
*/
|
|
2481
2481
|
standard(t = !0) {
|
|
2482
|
-
const e = new
|
|
2482
|
+
const e = new ct(this.date, this.type, "en-GB"), s = [];
|
|
2483
2483
|
let n;
|
|
2484
2484
|
return e.setHour24(!0), this.type === "hour-minute" ? n = e.locale(this.type, {
|
|
2485
2485
|
year: "numeric",
|
|
@@ -2918,7 +2918,82 @@ class ot {
|
|
|
2918
2918
|
), this;
|
|
2919
2919
|
}
|
|
2920
2920
|
}
|
|
2921
|
-
|
|
2921
|
+
class ke {
|
|
2922
|
+
/**
|
|
2923
|
+
* Constructor
|
|
2924
|
+
* @param element HTML element to capture/ HTML элемент для захвата
|
|
2925
|
+
*/
|
|
2926
|
+
constructor(t) {
|
|
2927
|
+
this.element = t;
|
|
2928
|
+
}
|
|
2929
|
+
/**
|
|
2930
|
+
* Takes a screenshot of the element.
|
|
2931
|
+
*
|
|
2932
|
+
* Делает скриншот элемента.
|
|
2933
|
+
*/
|
|
2934
|
+
take() {
|
|
2935
|
+
return new Promise((t, e) => {
|
|
2936
|
+
const {
|
|
2937
|
+
width: s,
|
|
2938
|
+
height: n
|
|
2939
|
+
} = this.element.getBoundingClientRect();
|
|
2940
|
+
if (s === 0 || n === 0)
|
|
2941
|
+
return e(new Error("Element has no dimensions"));
|
|
2942
|
+
const o = document.createElement("canvas"), a = o.getContext("2d");
|
|
2943
|
+
if (!a)
|
|
2944
|
+
return e(new Error("Could not get canvas context"));
|
|
2945
|
+
const u = window.devicePixelRatio || 1;
|
|
2946
|
+
o.width = s * u, o.height = n * u, o.style.width = `${s}px`, o.style.height = `${n}px`, a.scale(u, u);
|
|
2947
|
+
const h = this.getStyles(), g = this.element.outerHTML, d = `
|
|
2948
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${s}" height="${n}">
|
|
2949
|
+
<foreignObject x="0" y="0" width="100%" height="100%">
|
|
2950
|
+
<style>${h}</style>
|
|
2951
|
+
<div xmlns="http://www.w3.org/1999/xhtml">${g}</div>
|
|
2952
|
+
</foreignObject>
|
|
2953
|
+
</svg>
|
|
2954
|
+
`, v = new Image(), P = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(d)));
|
|
2955
|
+
v.onload = () => {
|
|
2956
|
+
a.drawImage(v, 0, 0, s, n), t(o.toDataURL("image/png"));
|
|
2957
|
+
}, v.onerror = (G) => {
|
|
2958
|
+
console.error("Screenshot failed", {
|
|
2959
|
+
error: G,
|
|
2960
|
+
svg: d
|
|
2961
|
+
}), e(new Error("Failed to load SVG image for screenshot. See console for details."));
|
|
2962
|
+
}, v.src = P;
|
|
2963
|
+
});
|
|
2964
|
+
}
|
|
2965
|
+
/**
|
|
2966
|
+
* Takes a screenshot and downloads it.
|
|
2967
|
+
*
|
|
2968
|
+
* Делает скриншот и скачивает его.
|
|
2969
|
+
* @param filename name of the file to download/ имя файла для скачивания
|
|
2970
|
+
*/
|
|
2971
|
+
async download(t = "screenshot.png") {
|
|
2972
|
+
const e = await this.take(), s = document.createElement("a");
|
|
2973
|
+
s.href = e, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s);
|
|
2974
|
+
}
|
|
2975
|
+
/**
|
|
2976
|
+
* Gathers all CSS styles from the document's stylesheets.
|
|
2977
|
+
*
|
|
2978
|
+
* Собирает все стили CSS из таблиц стилей документа.
|
|
2979
|
+
*/
|
|
2980
|
+
getStyles() {
|
|
2981
|
+
let t = "";
|
|
2982
|
+
try {
|
|
2983
|
+
for (const e of Array.from(document.styleSheets))
|
|
2984
|
+
try {
|
|
2985
|
+
for (const s of Array.from(e.cssRules))
|
|
2986
|
+
t += s.cssText;
|
|
2987
|
+
} catch (s) {
|
|
2988
|
+
console.warn("Could not read CSS rules from a stylesheet due to CORS.", s);
|
|
2989
|
+
}
|
|
2990
|
+
} catch (e) {
|
|
2991
|
+
console.error("Could not access stylesheets.", e);
|
|
2992
|
+
}
|
|
2993
|
+
return t;
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
const r = "f", U = class U {
|
|
2922
2997
|
/**
|
|
2923
2998
|
* Constructor
|
|
2924
2999
|
* @param code country and language code/ код страны и языка
|
|
@@ -2941,7 +3016,7 @@ const r = "@flag", W = class W {
|
|
|
2941
3016
|
language: this.getLanguage(e),
|
|
2942
3017
|
country: n,
|
|
2943
3018
|
standard: e.standard,
|
|
2944
|
-
icon: (s =
|
|
3019
|
+
icon: (s = U.flags) == null ? void 0 : s[e.country],
|
|
2945
3020
|
label: n,
|
|
2946
3021
|
value: e.country
|
|
2947
3022
|
};
|
|
@@ -2964,7 +3039,7 @@ const r = "@flag", W = class W {
|
|
|
2964
3039
|
* @param codes country code/ код страны
|
|
2965
3040
|
*/
|
|
2966
3041
|
getList(t) {
|
|
2967
|
-
return
|
|
3042
|
+
return f(this.getCodes(t), (e) => this.get(e));
|
|
2968
3043
|
}
|
|
2969
3044
|
/**
|
|
2970
3045
|
* Getting a list of countries by an array of codes in national language.
|
|
@@ -2973,8 +3048,8 @@ const r = "@flag", W = class W {
|
|
|
2973
3048
|
* @param codes country code/ код страны.
|
|
2974
3049
|
*/
|
|
2975
3050
|
getNational(t) {
|
|
2976
|
-
return
|
|
2977
|
-
const s = new
|
|
3051
|
+
return f(this.getList(t), (e) => {
|
|
3052
|
+
const s = new U(e.standard).get(e.standard);
|
|
2978
3053
|
return {
|
|
2979
3054
|
...e,
|
|
2980
3055
|
description: s == null ? void 0 : s.country,
|
|
@@ -2998,7 +3073,7 @@ const r = "@flag", W = class W {
|
|
|
2998
3073
|
* Возвращает специальный объект для работы с форматированием.
|
|
2999
3074
|
*/
|
|
3000
3075
|
getLocation() {
|
|
3001
|
-
return new
|
|
3076
|
+
return new Q(this.code);
|
|
3002
3077
|
}
|
|
3003
3078
|
/**
|
|
3004
3079
|
* Returns a list of countries to retrieve data from.
|
|
@@ -3007,7 +3082,7 @@ const r = "@flag", W = class W {
|
|
|
3007
3082
|
* @param codes country code/ код страны
|
|
3008
3083
|
*/
|
|
3009
3084
|
getCodes(t) {
|
|
3010
|
-
return t != null ? t : Object.keys(
|
|
3085
|
+
return t != null ? t : Object.keys(U.flags);
|
|
3011
3086
|
}
|
|
3012
3087
|
/**
|
|
3013
3088
|
* Getting the name of the language.
|
|
@@ -3028,7 +3103,7 @@ const r = "@flag", W = class W {
|
|
|
3028
3103
|
return this.getLocation().countryName(t.country);
|
|
3029
3104
|
}
|
|
3030
3105
|
};
|
|
3031
|
-
c(
|
|
3106
|
+
c(U, "flags", {
|
|
3032
3107
|
AD: `${r}-ad`,
|
|
3033
3108
|
AE: `${r}-ae`,
|
|
3034
3109
|
AF: `${r}-af`,
|
|
@@ -3271,8 +3346,8 @@ c(W, "flags", {
|
|
|
3271
3346
|
ZM: `${r}-zm`,
|
|
3272
3347
|
ZW: `${r}-zw`
|
|
3273
3348
|
});
|
|
3274
|
-
let
|
|
3275
|
-
const
|
|
3349
|
+
let wt = U;
|
|
3350
|
+
const j = class j {
|
|
3276
3351
|
/**
|
|
3277
3352
|
* Getting an object with information about the phone code and country.
|
|
3278
3353
|
*
|
|
@@ -3334,7 +3409,7 @@ const U = class U {
|
|
|
3334
3409
|
* @param masks a mask to transform a phone number/ маска для преобразования номер телефон
|
|
3335
3410
|
*/
|
|
3336
3411
|
static toMask(t, e) {
|
|
3337
|
-
if (
|
|
3412
|
+
if (L(t) && Array.isArray(e) && e.length > 0) {
|
|
3338
3413
|
const s = this.removeZero(t), n = s.length;
|
|
3339
3414
|
for (const o of e)
|
|
3340
3415
|
if (this.getUnnecessaryLength(o) === n)
|
|
@@ -3382,12 +3457,12 @@ const U = class U {
|
|
|
3382
3457
|
* Формирование списка для карты.
|
|
3383
3458
|
*/
|
|
3384
3459
|
static makeList() {
|
|
3385
|
-
const t =
|
|
3460
|
+
const t = f(w.getList(), (e) => {
|
|
3386
3461
|
if (e != null && e.phoneMask)
|
|
3387
3462
|
return {
|
|
3388
3463
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
|
|
3389
3464
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3390
|
-
mask:
|
|
3465
|
+
mask: Z(e.phoneMask),
|
|
3391
3466
|
value: e.country
|
|
3392
3467
|
};
|
|
3393
3468
|
});
|
|
@@ -3451,9 +3526,9 @@ const U = class U {
|
|
|
3451
3526
|
return t.replace(/\*/, this.getWithinSymbol(e));
|
|
3452
3527
|
}
|
|
3453
3528
|
};
|
|
3454
|
-
c(
|
|
3455
|
-
let
|
|
3456
|
-
class
|
|
3529
|
+
c(j, "list", []), c(j, "map", {}), j.makeList(), j.makeMap();
|
|
3530
|
+
let bt = j, W;
|
|
3531
|
+
class Ae {
|
|
3457
3532
|
/**
|
|
3458
3533
|
* Returns the value by its name.
|
|
3459
3534
|
*
|
|
@@ -3461,7 +3536,7 @@ class ke {
|
|
|
3461
3536
|
* @param name property name/ название свойства
|
|
3462
3537
|
*/
|
|
3463
3538
|
static get(t) {
|
|
3464
|
-
return
|
|
3539
|
+
return W && (W == null ? void 0 : W[t]);
|
|
3465
3540
|
}
|
|
3466
3541
|
/**
|
|
3467
3542
|
* Adds data, this method works only once.
|
|
@@ -3470,7 +3545,7 @@ class ke {
|
|
|
3470
3545
|
* @param data global data/ глобальные данные
|
|
3471
3546
|
*/
|
|
3472
3547
|
static add(t) {
|
|
3473
|
-
|
|
3548
|
+
W === void 0 && (W = C(t));
|
|
3474
3549
|
}
|
|
3475
3550
|
}
|
|
3476
3551
|
const F = class F {
|
|
@@ -3527,7 +3602,7 @@ const F = class F {
|
|
|
3527
3602
|
const t = {};
|
|
3528
3603
|
return location.hash.replace(
|
|
3529
3604
|
/([\w-]+)[:=]([^;]+)/ig,
|
|
3530
|
-
(...e) => (t[String(e[1])] =
|
|
3605
|
+
(...e) => (t[String(e[1])] = Bt(e[2]), "")
|
|
3531
3606
|
), t;
|
|
3532
3607
|
}
|
|
3533
3608
|
/**
|
|
@@ -3536,7 +3611,7 @@ const F = class F {
|
|
|
3536
3611
|
* Обновление строки хэша в URL.
|
|
3537
3612
|
*/
|
|
3538
3613
|
static update() {
|
|
3539
|
-
this.block = !0, history.replaceState(null, "", `#${
|
|
3614
|
+
this.block = !0, history.replaceState(null, "", `#${Et(this.hash, "=", ";")}`), requestAnimationFrame(() => {
|
|
3540
3615
|
this.block = !1;
|
|
3541
3616
|
});
|
|
3542
3617
|
}
|
|
@@ -3547,15 +3622,15 @@ const F = class F {
|
|
|
3547
3622
|
* @param location fresh data/ свежий данные
|
|
3548
3623
|
*/
|
|
3549
3624
|
static makeWatch(t) {
|
|
3550
|
-
|
|
3625
|
+
f(this.watch, (e, s) => {
|
|
3551
3626
|
var n;
|
|
3552
3627
|
((n = this.hash) == null ? void 0 : n[s]) !== (t == null ? void 0 : t[s]) && e.forEach((o) => o(t[s]));
|
|
3553
3628
|
});
|
|
3554
3629
|
}
|
|
3555
3630
|
};
|
|
3556
3631
|
c(F, "hash", {}), c(F, "watch", {}), c(F, "block", !1), l() && (F.reload(), addEventListener("hashchange", () => F.reload()));
|
|
3557
|
-
let
|
|
3558
|
-
const
|
|
3632
|
+
let vt = F;
|
|
3633
|
+
const st = "__UI_ICON", St = 320, Dt = "--LOAD--", q = class q {
|
|
3559
3634
|
/**
|
|
3560
3635
|
* Checks if the given icon is in the list of connected icons.
|
|
3561
3636
|
*
|
|
@@ -3578,7 +3653,7 @@ const it = "__UI_ICON", bt = 320, vt = "--LOAD--", K = class K {
|
|
|
3578
3653
|
static async get(t, e = "", s = 1e3 * 60 * 3) {
|
|
3579
3654
|
var o, a, u, h;
|
|
3580
3655
|
const n = (h = (u = (o = this.icons) == null ? void 0 : o[this.getName(t)]) != null ? u : (a = this.icons) == null ? void 0 : a[t]) != null ? h : `${t.replace(/^@/, e != null ? e : this.url)}.svg`;
|
|
3581
|
-
return typeof n == "string" ? n ===
|
|
3656
|
+
return typeof n == "string" ? n === Dt && s > 0 ? (await this.wait(), this.get(t, e, s - St)) : n : at(n) ? await n() : await n;
|
|
3582
3657
|
}
|
|
3583
3658
|
/**
|
|
3584
3659
|
* Returns a list of names of all registered icons.
|
|
@@ -3586,7 +3661,7 @@ const it = "__UI_ICON", bt = 320, vt = "--LOAD--", K = class K {
|
|
|
3586
3661
|
* Возвращает список названий всех зарегистрированных иконок.
|
|
3587
3662
|
*/
|
|
3588
3663
|
static getNameList() {
|
|
3589
|
-
return
|
|
3664
|
+
return f(this.icons, (t, e) => e.replace(/^@/, ""));
|
|
3590
3665
|
}
|
|
3591
3666
|
/**
|
|
3592
3667
|
* Returns a global link.
|
|
@@ -3594,7 +3669,7 @@ const it = "__UI_ICON", bt = 320, vt = "--LOAD--", K = class K {
|
|
|
3594
3669
|
* Возвращает глобальную ссылку.
|
|
3595
3670
|
*/
|
|
3596
3671
|
static getUrlGlobal() {
|
|
3597
|
-
return `${
|
|
3672
|
+
return `${z.isLocalhost(), ""}${this.url}`;
|
|
3598
3673
|
}
|
|
3599
3674
|
/**
|
|
3600
3675
|
* Adding custom icons.
|
|
@@ -3613,7 +3688,7 @@ const it = "__UI_ICON", bt = 320, vt = "--LOAD--", K = class K {
|
|
|
3613
3688
|
* @param index icon name/ название иконки
|
|
3614
3689
|
*/
|
|
3615
3690
|
static addLoad(t) {
|
|
3616
|
-
this.icons[this.getName(t)] =
|
|
3691
|
+
this.icons[this.getName(t)] = Dt;
|
|
3617
3692
|
}
|
|
3618
3693
|
/**
|
|
3619
3694
|
* Adding custom global icons.
|
|
@@ -3632,7 +3707,7 @@ const it = "__UI_ICON", bt = 320, vt = "--LOAD--", K = class K {
|
|
|
3632
3707
|
* @param list list of icons/ список иконки
|
|
3633
3708
|
*/
|
|
3634
3709
|
static addByList(t) {
|
|
3635
|
-
|
|
3710
|
+
f(t, (e, s) => this.add(s, e));
|
|
3636
3711
|
}
|
|
3637
3712
|
/**
|
|
3638
3713
|
* Changes the file path.
|
|
@@ -3658,21 +3733,21 @@ const it = "__UI_ICON", bt = 320, vt = "--LOAD--", K = class K {
|
|
|
3658
3733
|
* Задержка выполнения скрипта.
|
|
3659
3734
|
*/
|
|
3660
3735
|
static wait() {
|
|
3661
|
-
return new Promise((t) => setTimeout(() => t(),
|
|
3736
|
+
return new Promise((t) => setTimeout(() => t(), St));
|
|
3662
3737
|
}
|
|
3663
3738
|
};
|
|
3664
|
-
c(
|
|
3665
|
-
let
|
|
3739
|
+
c(q, "icons", {}), c(q, "url", "/icons/"), l() && (st in window || (window[st] = {}), q.icons = window[st]);
|
|
3740
|
+
let Lt = q;
|
|
3666
3741
|
function Ot(i, t, e) {
|
|
3667
3742
|
var s, n;
|
|
3668
|
-
return (n = (s =
|
|
3743
|
+
return (n = (s = N(i)) == null ? void 0 : s[t]) != null ? n : e;
|
|
3669
3744
|
}
|
|
3670
3745
|
function Tt(i, t, e) {
|
|
3671
|
-
const s =
|
|
3746
|
+
const s = N(i);
|
|
3672
3747
|
if (s) {
|
|
3673
3748
|
const n = Ot(s, t);
|
|
3674
3749
|
if (m(n) && m(e))
|
|
3675
|
-
|
|
3750
|
+
f(e, (o, a) => {
|
|
3676
3751
|
n[a] = I(o);
|
|
3677
3752
|
});
|
|
3678
3753
|
else {
|
|
@@ -3686,14 +3761,14 @@ function _(i, t = "div", e, s) {
|
|
|
3686
3761
|
if (!l())
|
|
3687
3762
|
return;
|
|
3688
3763
|
const n = document.createElement(t);
|
|
3689
|
-
return typeof e == "function" ? e(n) :
|
|
3764
|
+
return typeof e == "function" ? e(n) : A(e) && f(e, (o, a) => {
|
|
3690
3765
|
Tt(n, a, o);
|
|
3691
3766
|
}), i == null || i.insertBefore(n, s != null ? s : null), n;
|
|
3692
3767
|
}
|
|
3693
3768
|
function Gt(i) {
|
|
3694
3769
|
return i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").trim();
|
|
3695
3770
|
}
|
|
3696
|
-
class
|
|
3771
|
+
class ut {
|
|
3697
3772
|
/**
|
|
3698
3773
|
* Creates an instance of MetaManager.
|
|
3699
3774
|
*
|
|
@@ -3737,7 +3812,7 @@ class at {
|
|
|
3737
3812
|
* Возвращает все мета-теги в виде HTML-строки.
|
|
3738
3813
|
*/
|
|
3739
3814
|
html() {
|
|
3740
|
-
return
|
|
3815
|
+
return f(
|
|
3741
3816
|
this.listMeta,
|
|
3742
3817
|
(e) => this.toHtmlString(e)
|
|
3743
3818
|
).join("");
|
|
@@ -3759,7 +3834,7 @@ class at {
|
|
|
3759
3834
|
* @param metaList object with meta tag names and content / объект с именами и содержимым мета-тегов
|
|
3760
3835
|
*/
|
|
3761
3836
|
setByList(t) {
|
|
3762
|
-
return
|
|
3837
|
+
return f(
|
|
3763
3838
|
t,
|
|
3764
3839
|
(e, s) => this.set(s, String(e))
|
|
3765
3840
|
), this;
|
|
@@ -3834,8 +3909,8 @@ class at {
|
|
|
3834
3909
|
}), this;
|
|
3835
3910
|
}
|
|
3836
3911
|
}
|
|
3837
|
-
var
|
|
3838
|
-
class ae extends
|
|
3912
|
+
var S = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(S || {}), te = /* @__PURE__ */ ((i) => (i.indexFollow = "index, follow", i.noIndexFollow = "noindex, follow", i.indexNoFollow = "index, nofollow", i.noIndexNoFollow = "noindex, nofollow", i.noArchive = "noarchive", i.noSnippet = "nosnippet", i.noImageIndex = "noimageindex", i.images = "images", i.noTranslate = "notranslate", i.noPreview = "nopreview", i.textOnly = "textonly", i.noIndexSubpages = "noindex, noarchive", i.none = "none", i))(te || {}), y = /* @__PURE__ */ ((i) => (i.title = "og:title", i.type = "og:type", i.url = "og:url", i.image = "og:image", i.description = "og:description", i.locale = "og:locale", i.siteName = "og:site_name", i.localeAlternate = "og:locale:alternate", i.imageUrl = "og:image:url", i.imageSecureUrl = "og:image:secure_url", i.imageType = "og:image:type", i.imageWidth = "og:image:width", i.imageHeight = "og:image:height", i.imageAlt = "og:image:alt", i.video = "og:video", i.videoUrl = "og:video:url", i.videoSecureUrl = "og:video:secure_url", i.videoType = "og:video:type", i.videoWidth = "og:video:width", i.videoHeight = "og:video:height", i.audio = "og:audio", i.audioSecureUrl = "og:audio:secure_url", i.audioType = "og:audio:type", i.articlePublishedTime = "article:published_time", i.articleModifiedTime = "article:modified_time", i.articleExpirationTime = "article:expiration_time", i.articleAuthor = "article:author", i.articleSection = "article:section", i.articleTag = "article:tag", i.bookAuthor = "book:author", i.bookIsbn = "book:isbn", i.bookReleaseDate = "book:release_date", i.bookTag = "book:tag", i.musicDuration = "music:duration", i.musicAlbum = "music:album", i.musicAlbumDisc = "music:album:disc", i.musicAlbumTrack = "music:album:track", i.musicMusician = "music:musician", i.musicSong = "music:song", i.musicSongDisc = "music:song:disc", i.musicSongTrack = "music:song:track", i.musicReleaseDate = "music:release_date", i.musicCreator = "music:creator", i.videoActor = "video:actor", i.videoActorRole = "video:actor:role", i.videoDirector = "video:director", i.videoWriter = "video:writer", i.videoDuration = "video:duration", i.videoReleaseDate = "video:release_date", i.videoTag = "video:tag", i.videoSeries = "video:series", i.profileFirstName = "profile:first_name", i.profileLastName = "profile:last_name", i.profileUsername = "profile:username", i.profileGender = "profile:gender", i.productBrand = "product:brand", i.productAvailability = "product:availability", i.productCondition = "product:condition", i.productPriceAmount = "product:price:amount", i.productPriceCurrency = "product:price:currency", i.productRetailerItemId = "product:retailer_item_id", i.productCategory = "product:category", i.productEan = "product:ean", i.productIsbn = "product:isbn", i.productMfrPartNo = "product:mfr_part_no", i.productUpc = "product:upc", i.productWeightValue = "product:weight:value", i.productWeightUnits = "product:weight:units", i.productColor = "product:color", i.productMaterial = "product:material", i.productPattern = "product:pattern", i.productAgeGroup = "product:age_group", i.productGender = "product:gender", i))(y || {}), ee = /* @__PURE__ */ ((i) => (i.website = "website", i.article = "article", i.video = "video.other", i.videoTvShow = "video.tv_show", i.videoEpisode = "video.episode", i.videoMovie = "video.movie", i.musicAlbum = "music.album", i.musicPlaylist = "music.playlist", i.musicSong = "music.song", i.musicRadioStation = "music.radio_station", i.app = "app", i.product = "product", i.business = "business.business", i.place = "place", i.event = "event", i.profile = "profile", i.book = "book", i))(ee || {}), ie = /* @__PURE__ */ ((i) => (i.inStock = "in stock", i.outOfStock = "out of stock", i.preorder = "preorder", i.backorder = "backorder", i.discontinued = "discontinued", i.pending = "pending", i))(ie || {}), se = /* @__PURE__ */ ((i) => (i.new = "new", i.used = "used", i.refurbished = "refurbished", i))(se || {}), re = /* @__PURE__ */ ((i) => (i.newborn = "newborn", i.infant = "infant", i.toddler = "toddler", i.kids = "kids", i.adult = "adult", i))(re || {}), ne = /* @__PURE__ */ ((i) => (i.female = "female", i.male = "male", i.unisex = "unisex", i))(ne || {}), $ = /* @__PURE__ */ ((i) => (i.card = "twitter:card", i.site = "twitter:site", i.creator = "twitter:creator", i.url = "twitter:url", i.title = "twitter:title", i.description = "twitter:description", i.image = "twitter:image", i.imageAlt = "twitter:image:alt", i.imageSrc = "twitter:image:src", i.imageWidth = "twitter:image:width", i.imageHeight = "twitter:image:height", i.label1 = "twitter:label1", i.data1 = "twitter:data1", i.label2 = "twitter:label2", i.data2 = "twitter:data2", i.appNameIphone = "twitter:app:name:iphone", i.appIdIphone = "twitter:app:id:iphone", i.appUrlIphone = "twitter:app:url:iphone", i.appNameIpad = "twitter:app:name:ipad", i.appIdIpad = "twitter:app:id:ipad", i.appUrlIpad = "twitter:app:url:ipad", i.appNameGooglePlay = "twitter:app:name:googleplay", i.appIdGooglePlay = "twitter:app:id:googleplay", i.appUrlGooglePlay = "twitter:app:url:googleplay", i.player = "twitter:player", i.playerWidth = "twitter:player:width", i.playerHeight = "twitter:player:height", i.playerStream = "twitter:player:stream", i.playerStreamContentType = "twitter:player:stream:content_type", i))($ || {}), oe = /* @__PURE__ */ ((i) => (i.summary = "summary", i.summaryLargeImage = "summary_large_image", i.app = "app", i.player = "player", i.product = "product", i.gallery = "gallery", i.photo = "photo", i.leadGeneration = "lead_generation", i.audio = "audio", i.poll = "poll", i))(oe || {});
|
|
3913
|
+
class ae extends ut {
|
|
3839
3914
|
constructor() {
|
|
3840
3915
|
super(Object.values(y), !0);
|
|
3841
3916
|
}
|
|
@@ -3959,7 +4034,7 @@ class ae extends at {
|
|
|
3959
4034
|
return this.set(y.siteName, t);
|
|
3960
4035
|
}
|
|
3961
4036
|
}
|
|
3962
|
-
class ce extends
|
|
4037
|
+
class ce extends ut {
|
|
3963
4038
|
constructor() {
|
|
3964
4039
|
super(Object.values($));
|
|
3965
4040
|
}
|
|
@@ -4083,14 +4158,14 @@ class ce extends at {
|
|
|
4083
4158
|
return this.set($.image, t), this;
|
|
4084
4159
|
}
|
|
4085
4160
|
}
|
|
4086
|
-
class
|
|
4161
|
+
class Ne extends ut {
|
|
4087
4162
|
/**
|
|
4088
4163
|
* Creates an instance of Meta with integrated Open Graph and Twitter Card support.
|
|
4089
4164
|
*
|
|
4090
4165
|
* Создает экземпляр Meta с интегрированной поддержкой Open Graph и Twitter Card.
|
|
4091
4166
|
*/
|
|
4092
4167
|
constructor() {
|
|
4093
|
-
super(Object.values(
|
|
4168
|
+
super(Object.values(S));
|
|
4094
4169
|
c(this, "suffix");
|
|
4095
4170
|
c(this, "og");
|
|
4096
4171
|
c(this, "twitter");
|
|
@@ -4126,7 +4201,7 @@ class Ae extends at {
|
|
|
4126
4201
|
* Получает мета-тег keywords.
|
|
4127
4202
|
*/
|
|
4128
4203
|
getKeywords() {
|
|
4129
|
-
return this.get(
|
|
4204
|
+
return this.get(S.keywords);
|
|
4130
4205
|
}
|
|
4131
4206
|
/**
|
|
4132
4207
|
* Gets the description meta tag.
|
|
@@ -4134,7 +4209,7 @@ class Ae extends at {
|
|
|
4134
4209
|
* Получает мета-тег description.
|
|
4135
4210
|
*/
|
|
4136
4211
|
getDescription() {
|
|
4137
|
-
return this.get(
|
|
4212
|
+
return this.get(S.description);
|
|
4138
4213
|
}
|
|
4139
4214
|
/**
|
|
4140
4215
|
* Gets the Open Graph image URL.
|
|
@@ -4150,7 +4225,7 @@ class Ae extends at {
|
|
|
4150
4225
|
* Получает канонический URL.
|
|
4151
4226
|
*/
|
|
4152
4227
|
getCanonical() {
|
|
4153
|
-
return this.get(
|
|
4228
|
+
return this.get(S.canonical);
|
|
4154
4229
|
}
|
|
4155
4230
|
/**
|
|
4156
4231
|
* Gets the robots meta tag value.
|
|
@@ -4158,7 +4233,7 @@ class Ae extends at {
|
|
|
4158
4233
|
* Получает значение мета-тега robots.
|
|
4159
4234
|
*/
|
|
4160
4235
|
getRobots() {
|
|
4161
|
-
return this.get(
|
|
4236
|
+
return this.get(S.robots);
|
|
4162
4237
|
}
|
|
4163
4238
|
/**
|
|
4164
4239
|
* Gets the author meta tag.
|
|
@@ -4166,7 +4241,7 @@ class Ae extends at {
|
|
|
4166
4241
|
* Получает мета-тег author.
|
|
4167
4242
|
*/
|
|
4168
4243
|
getAuthor() {
|
|
4169
|
-
return this.get(
|
|
4244
|
+
return this.get(S.author);
|
|
4170
4245
|
}
|
|
4171
4246
|
/**
|
|
4172
4247
|
* Gets the Open Graph site name.
|
|
@@ -4192,7 +4267,7 @@ class Ae extends at {
|
|
|
4192
4267
|
*/
|
|
4193
4268
|
setTitle(e) {
|
|
4194
4269
|
if (l()) {
|
|
4195
|
-
const s =
|
|
4270
|
+
const s = L(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
4196
4271
|
document.title = s, this.og.setTitle(s), this.twitter.setTitle(s);
|
|
4197
4272
|
}
|
|
4198
4273
|
return this;
|
|
@@ -4204,7 +4279,7 @@ class Ae extends at {
|
|
|
4204
4279
|
* @param keywords keywords as string or array / ключевые слова в виде строки или массива
|
|
4205
4280
|
*/
|
|
4206
4281
|
setKeywords(e) {
|
|
4207
|
-
return this.set(
|
|
4282
|
+
return this.set(S.keywords, Z(e).join(", ")), this;
|
|
4208
4283
|
}
|
|
4209
4284
|
/**
|
|
4210
4285
|
* Sets the description meta tag.
|
|
@@ -4213,7 +4288,7 @@ class Ae extends at {
|
|
|
4213
4288
|
* @param description page description / описание страницы
|
|
4214
4289
|
*/
|
|
4215
4290
|
setDescription(e) {
|
|
4216
|
-
return this.set(
|
|
4291
|
+
return this.set(S.description, e), this;
|
|
4217
4292
|
}
|
|
4218
4293
|
/**
|
|
4219
4294
|
* Sets the image for Open Graph and Twitter Card.
|
|
@@ -4231,7 +4306,7 @@ class Ae extends at {
|
|
|
4231
4306
|
* @param canonical canonical URL / канонический URL
|
|
4232
4307
|
*/
|
|
4233
4308
|
setCanonical(e) {
|
|
4234
|
-
return this.set(
|
|
4309
|
+
return this.set(S.canonical, e), this.og.setUrl(e), this.twitter.setUrl(e), this;
|
|
4235
4310
|
}
|
|
4236
4311
|
/**
|
|
4237
4312
|
* Sets the robots meta tag.
|
|
@@ -4240,7 +4315,7 @@ class Ae extends at {
|
|
|
4240
4315
|
* @param robots robots directive / директива robots
|
|
4241
4316
|
*/
|
|
4242
4317
|
setRobots(e) {
|
|
4243
|
-
return this.set(
|
|
4318
|
+
return this.set(S.robots, e), this;
|
|
4244
4319
|
}
|
|
4245
4320
|
/**
|
|
4246
4321
|
* Sets the author meta tag.
|
|
@@ -4249,7 +4324,7 @@ class Ae extends at {
|
|
|
4249
4324
|
* @param author author name / имя автора
|
|
4250
4325
|
*/
|
|
4251
4326
|
setAuthor(e) {
|
|
4252
|
-
return this.set(
|
|
4327
|
+
return this.set(S.author, e), this;
|
|
4253
4328
|
}
|
|
4254
4329
|
/**
|
|
4255
4330
|
* Sets the site name for Open Graph and Twitter Card.
|
|
@@ -4292,10 +4367,10 @@ class Ae extends at {
|
|
|
4292
4367
|
* Получает отформатированный суффикс с разделителем.
|
|
4293
4368
|
*/
|
|
4294
4369
|
getSuffix() {
|
|
4295
|
-
return
|
|
4370
|
+
return L(this.suffix) ? ` - ${this.suffix}` : "";
|
|
4296
4371
|
}
|
|
4297
4372
|
}
|
|
4298
|
-
class
|
|
4373
|
+
class ot {
|
|
4299
4374
|
/**
|
|
4300
4375
|
* Checks whether to enable scroll hiding.
|
|
4301
4376
|
*
|
|
@@ -4346,7 +4421,7 @@ class nt {
|
|
|
4346
4421
|
});
|
|
4347
4422
|
}
|
|
4348
4423
|
}
|
|
4349
|
-
c(
|
|
4424
|
+
c(ot, "storage", new T("scrollbar", !0)), c(ot, "calculate", !1);
|
|
4350
4425
|
const ue = [
|
|
4351
4426
|
"d",
|
|
4352
4427
|
"e",
|
|
@@ -4371,17 +4446,17 @@ const ue = [
|
|
|
4371
4446
|
let e = String(i);
|
|
4372
4447
|
if (i.match(/%[a-z]/)) {
|
|
4373
4448
|
let s = 0;
|
|
4374
|
-
|
|
4449
|
+
f(t, (n) => {
|
|
4375
4450
|
e = e.replace(new RegExp(`%${ue[s++]}`, "g"), String(n));
|
|
4376
4451
|
});
|
|
4377
4452
|
}
|
|
4378
|
-
return
|
|
4453
|
+
return A(t) && f(t, (s, n) => {
|
|
4379
4454
|
e = e.replace(
|
|
4380
4455
|
new RegExp(`\\[${n}\\](.*?)\\[/${n}\\]`, "g"),
|
|
4381
4456
|
(o, a) => String(s).replace(/\[content]/g, a)
|
|
4382
4457
|
).replace(new RegExp(`\\[${n}\\]`, "g"), String(s));
|
|
4383
4458
|
}), e;
|
|
4384
|
-
},
|
|
4459
|
+
}, E = class E {
|
|
4385
4460
|
/**
|
|
4386
4461
|
* Getting the translation text by its code.
|
|
4387
4462
|
*
|
|
@@ -4392,7 +4467,7 @@ const ue = [
|
|
|
4392
4467
|
static async get(t, e) {
|
|
4393
4468
|
var n, o;
|
|
4394
4469
|
const s = this.getName(t);
|
|
4395
|
-
return s in this.data ? this.replacement(this.data[s], e) : (
|
|
4470
|
+
return s in this.data ? this.replacement(this.data[s], e) : (z.isLocalhost() || await this.add(t), this.replacement((o = (n = this.data) == null ? void 0 : n[s]) != null ? o : t));
|
|
4396
4471
|
}
|
|
4397
4472
|
/**
|
|
4398
4473
|
* Getting the translation text by its code (Sync).
|
|
@@ -4464,8 +4539,8 @@ const ue = [
|
|
|
4464
4539
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
4465
4540
|
*/
|
|
4466
4541
|
static addSync(t) {
|
|
4467
|
-
|
|
4468
|
-
R(e) &&
|
|
4542
|
+
f(t, (e, s) => {
|
|
4543
|
+
R(e) && L(e) && (this.data[this.getName(s)] = e);
|
|
4469
4544
|
});
|
|
4470
4545
|
}
|
|
4471
4546
|
/**
|
|
@@ -4475,8 +4550,8 @@ const ue = [
|
|
|
4475
4550
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
4476
4551
|
*/
|
|
4477
4552
|
static async addNormalOrSync(t) {
|
|
4478
|
-
if (
|
|
4479
|
-
if (
|
|
4553
|
+
if (L(t))
|
|
4554
|
+
if (z.isLocalhost())
|
|
4480
4555
|
this.addSync(t);
|
|
4481
4556
|
else {
|
|
4482
4557
|
const e = Object.keys(t);
|
|
@@ -4490,7 +4565,7 @@ const ue = [
|
|
|
4490
4565
|
* @param url path to the script/ путь к скрипту
|
|
4491
4566
|
*/
|
|
4492
4567
|
static setUrl(t) {
|
|
4493
|
-
return this.url = t,
|
|
4568
|
+
return this.url = t, E;
|
|
4494
4569
|
}
|
|
4495
4570
|
static setPropsName(t) {
|
|
4496
4571
|
return this.propsName = t, this;
|
|
@@ -4512,7 +4587,7 @@ const ue = [
|
|
|
4512
4587
|
*/
|
|
4513
4588
|
static getNamesNone(t) {
|
|
4514
4589
|
const e = [];
|
|
4515
|
-
return
|
|
4590
|
+
return Z(t).forEach((s) => {
|
|
4516
4591
|
s !== "__TRANSLATE_START__" && s !== "__TRANSLATE_END__" && !(this.getName(s) in this.data) && e.push(s);
|
|
4517
4592
|
}), e;
|
|
4518
4593
|
}
|
|
@@ -4522,7 +4597,7 @@ const ue = [
|
|
|
4522
4597
|
* Получение списка переводов с сервера.
|
|
4523
4598
|
*/
|
|
4524
4599
|
static async getResponse() {
|
|
4525
|
-
const t = await
|
|
4600
|
+
const t = await z.get({
|
|
4526
4601
|
api: !1,
|
|
4527
4602
|
path: this.url,
|
|
4528
4603
|
request: {
|
|
@@ -4556,14 +4631,14 @@ const ue = [
|
|
|
4556
4631
|
}), this.cache = [];
|
|
4557
4632
|
}
|
|
4558
4633
|
};
|
|
4559
|
-
c(
|
|
4560
|
-
let
|
|
4561
|
-
function
|
|
4634
|
+
c(E, "url", "/api/translate"), c(E, "propsName", "list"), c(E, "data", {}), c(E, "cache", []), c(E, "resolveList", []), c(E, "timeout");
|
|
4635
|
+
let Ct = E;
|
|
4636
|
+
function xt(i) {
|
|
4562
4637
|
return Array.isArray(i);
|
|
4563
4638
|
}
|
|
4564
|
-
function
|
|
4639
|
+
function Ee(i) {
|
|
4565
4640
|
var t;
|
|
4566
|
-
return R(i) ? i.trim() :
|
|
4641
|
+
return R(i) ? i.trim() : xt(i) && i.findIndex((e) => m(e)) === -1 ? i.join(",") : m(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : (t = i == null ? void 0 : i.toString()) != null ? t : "";
|
|
4567
4642
|
}
|
|
4568
4643
|
function le(i, t) {
|
|
4569
4644
|
return Array(t).fill(i);
|
|
@@ -4574,16 +4649,16 @@ function Ie(i) {
|
|
|
4574
4649
|
s.onloadend = () => t(s.result), s.onerror = e, s.readAsDataURL(i);
|
|
4575
4650
|
});
|
|
4576
4651
|
}
|
|
4577
|
-
function
|
|
4652
|
+
function Be(i) {
|
|
4578
4653
|
var t;
|
|
4579
4654
|
if (l())
|
|
4580
4655
|
return (t = document.querySelector(i)) != null ? t : void 0;
|
|
4581
4656
|
}
|
|
4582
|
-
function
|
|
4657
|
+
function Fe(i) {
|
|
4583
4658
|
if (l())
|
|
4584
4659
|
return document.querySelectorAll(i);
|
|
4585
4660
|
}
|
|
4586
|
-
function
|
|
4661
|
+
function xe(i) {
|
|
4587
4662
|
i.preventDefault(), i.stopPropagation();
|
|
4588
4663
|
}
|
|
4589
4664
|
function de(i, t, e) {
|
|
@@ -4592,25 +4667,25 @@ function de(i, t, e) {
|
|
|
4592
4667
|
};
|
|
4593
4668
|
l() ? requestAnimationFrame(s) : s();
|
|
4594
4669
|
}
|
|
4595
|
-
function
|
|
4670
|
+
function Re(i) {
|
|
4596
4671
|
var s;
|
|
4597
|
-
const t = {}, e =
|
|
4672
|
+
const t = {}, e = N(i);
|
|
4598
4673
|
if (e)
|
|
4599
4674
|
for (const n of e.attributes)
|
|
4600
4675
|
t[n.name] = (s = (n == null ? void 0 : n.value) || (n == null ? void 0 : n.textContent)) != null ? s : void 0;
|
|
4601
4676
|
return t;
|
|
4602
4677
|
}
|
|
4603
|
-
async function
|
|
4678
|
+
async function Pe(i) {
|
|
4604
4679
|
var t, e;
|
|
4605
4680
|
return (e = (t = i == null ? void 0 : i.clipboardData) == null ? void 0 : t.getData("text")) != null ? e : await navigator.clipboard.readText() || "";
|
|
4606
4681
|
}
|
|
4607
|
-
function
|
|
4608
|
-
return new
|
|
4682
|
+
function We(i = "datetime") {
|
|
4683
|
+
return new ct(void 0, i).standard();
|
|
4609
4684
|
}
|
|
4610
|
-
let
|
|
4611
|
-
function
|
|
4612
|
-
const e =
|
|
4613
|
-
return e ? (
|
|
4685
|
+
let kt = J(1e5, 9e5);
|
|
4686
|
+
function Ue(i, t) {
|
|
4687
|
+
const e = N(i);
|
|
4688
|
+
return e ? (L(e.id) || e.setAttribute("id", `id-${kt++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${kt++}`;
|
|
4614
4689
|
}
|
|
4615
4690
|
function ge(i) {
|
|
4616
4691
|
return R(i) ? _(
|
|
@@ -4626,20 +4701,20 @@ function fe(i, t = "ig", e = ":value") {
|
|
|
4626
4701
|
function me(i, t) {
|
|
4627
4702
|
var n;
|
|
4628
4703
|
const e = t.split(".", 2), s = e[0];
|
|
4629
|
-
return s && (i != null && i[s]) &&
|
|
4704
|
+
return s && (i != null && i[s]) && A(i[s]) && (e != null && e[1]) ? me(i[s], e[1]) : (n = s && (i == null ? void 0 : i[s])) != null ? n : "";
|
|
4630
4705
|
}
|
|
4631
|
-
function
|
|
4706
|
+
function je(i) {
|
|
4632
4707
|
var t, e, s;
|
|
4633
4708
|
return (s = (t = i == null ? void 0 : i.key) != null ? t : i == null ? void 0 : i.code) != null ? s : (e = i == null ? void 0 : i.keyCode) == null ? void 0 : e.toString();
|
|
4634
4709
|
}
|
|
4635
|
-
function
|
|
4636
|
-
return
|
|
4637
|
-
}
|
|
4638
|
-
function je(i) {
|
|
4639
|
-
return Math.max(...xt(i));
|
|
4710
|
+
function Rt(i) {
|
|
4711
|
+
return f(i, (t) => t.length);
|
|
4640
4712
|
}
|
|
4641
4713
|
function He(i) {
|
|
4642
|
-
return Math.
|
|
4714
|
+
return Math.max(...Rt(i));
|
|
4715
|
+
}
|
|
4716
|
+
function ze(i) {
|
|
4717
|
+
return Math.min(...Rt(i));
|
|
4643
4718
|
}
|
|
4644
4719
|
function ye(i) {
|
|
4645
4720
|
var t, e, s, n;
|
|
@@ -4649,54 +4724,56 @@ function $e(i) {
|
|
|
4649
4724
|
var t, e, s, n;
|
|
4650
4725
|
return (i == null ? void 0 : i.clientY) || ((e = (t = i == null ? void 0 : i.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientY) || ((n = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : n.clientY) || 0;
|
|
4651
4726
|
}
|
|
4652
|
-
function
|
|
4727
|
+
function Ze(i) {
|
|
4653
4728
|
return {
|
|
4654
4729
|
x: ye(i),
|
|
4655
4730
|
y: $e(i)
|
|
4656
4731
|
};
|
|
4657
4732
|
}
|
|
4658
|
-
function
|
|
4733
|
+
function Ve(i, t) {
|
|
4659
4734
|
const e = {};
|
|
4660
4735
|
return t.forEach((s) => {
|
|
4661
4736
|
s in i && i[s] !== void 0 && (e[s] = i[s]);
|
|
4662
4737
|
}), e;
|
|
4663
4738
|
}
|
|
4664
|
-
function
|
|
4739
|
+
function Ke(i, t = void 0) {
|
|
4665
4740
|
const e = {};
|
|
4666
|
-
return
|
|
4741
|
+
return f(i, (s, n) => {
|
|
4667
4742
|
s !== t && (e[n] = s);
|
|
4668
4743
|
}), e;
|
|
4669
4744
|
}
|
|
4670
|
-
function
|
|
4671
|
-
return
|
|
4745
|
+
function Ye(i) {
|
|
4746
|
+
return A(i) ? i : {};
|
|
4672
4747
|
}
|
|
4673
4748
|
function pe(i, t) {
|
|
4674
4749
|
return le(i, t).join("");
|
|
4675
4750
|
}
|
|
4676
|
-
function
|
|
4677
|
-
const o =
|
|
4751
|
+
function qe(i, t, e = "#", s = 2, n = 12) {
|
|
4752
|
+
const o = J(i, t), a = [];
|
|
4678
4753
|
for (let u = 0; u < o; u++)
|
|
4679
|
-
a.push(pe(e,
|
|
4754
|
+
a.push(pe(e, J(s, n)));
|
|
4680
4755
|
return a.join(" ");
|
|
4681
4756
|
}
|
|
4682
|
-
function
|
|
4757
|
+
function Je(i, t) {
|
|
4683
4758
|
const e = i != null ? i : 0;
|
|
4684
4759
|
return t > e ? 100 / (t - e) : 0;
|
|
4685
4760
|
}
|
|
4686
|
-
function
|
|
4761
|
+
function Me(i, t) {
|
|
4687
4762
|
const e = i != null ? i : 0;
|
|
4688
4763
|
return t > e ? (t - e) / 100 : 0;
|
|
4689
4764
|
}
|
|
4690
|
-
const
|
|
4765
|
+
const At = 0;
|
|
4691
4766
|
function Qe(i, t, e) {
|
|
4692
4767
|
const s = t == null ? void 0 : t.closest(i);
|
|
4693
|
-
if (t && s && s.scrollHeight !== s.offsetHeight)
|
|
4768
|
+
if (t && s && s.scrollHeight !== s.offsetHeight) {
|
|
4769
|
+
const n = s.getBoundingClientRect(), o = t.getBoundingClientRect();
|
|
4694
4770
|
if (e) {
|
|
4695
|
-
const
|
|
4696
|
-
s.scrollTop = t.offsetTop - (
|
|
4697
|
-
} else s.scrollTop > t.offsetTop ? s.scrollTop =
|
|
4771
|
+
const a = e.getBoundingClientRect();
|
|
4772
|
+
s.scrollTop = t.offsetTop - (a.top - n.top) - (a.height / 2 - o.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
|
|
4773
|
+
} else s.scrollTop > t.offsetTop ? s.scrollTop = o.top - n.top - At : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = o.top - n.top + o.height - n.height + At);
|
|
4774
|
+
}
|
|
4698
4775
|
}
|
|
4699
|
-
function
|
|
4776
|
+
function Xe(i, t, e = 0) {
|
|
4700
4777
|
if (!l())
|
|
4701
4778
|
return;
|
|
4702
4779
|
const s = (t == null ? void 0 : t.behavior) || "smooth";
|
|
@@ -4716,28 +4793,29 @@ function Me(i, t, e = 0) {
|
|
|
4716
4793
|
});
|
|
4717
4794
|
}
|
|
4718
4795
|
}
|
|
4719
|
-
function
|
|
4796
|
+
function _e(i, t) {
|
|
4720
4797
|
return i.indexOf(t) !== -1;
|
|
4721
4798
|
}
|
|
4722
|
-
async function
|
|
4799
|
+
async function Oe() {
|
|
4723
4800
|
if (l()) {
|
|
4724
|
-
const i = await
|
|
4801
|
+
const i = await ot.get();
|
|
4725
4802
|
document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
|
|
4726
4803
|
}
|
|
4727
4804
|
}
|
|
4728
|
-
function
|
|
4805
|
+
function Te(i, t) {
|
|
4729
4806
|
const e = {};
|
|
4730
|
-
return m(i) && m(t) &&
|
|
4807
|
+
return m(i) && m(t) && f(i, (s, n) => {
|
|
4731
4808
|
n in t && (e[n] = s);
|
|
4732
4809
|
}), e;
|
|
4733
4810
|
}
|
|
4734
|
-
function
|
|
4811
|
+
function Ge(i, t) {
|
|
4735
4812
|
let e = Object.keys(i).length !== Object.keys(t).length;
|
|
4736
|
-
return e ||
|
|
4813
|
+
return e || f(i, (s, n) => {
|
|
4737
4814
|
s !== (t == null ? void 0 : t[n]) && (e = !0);
|
|
4738
4815
|
}), e;
|
|
4739
4816
|
}
|
|
4740
|
-
|
|
4817
|
+
const ti = (i) => i.code === "Space" || i.code === "Enter" || i.key === " " || i.key === "Spacebar" || i.key === "Enter" || i.keyCode === 13 || i.keyCode === 32;
|
|
4818
|
+
function ei(i) {
|
|
4741
4819
|
switch (typeof i) {
|
|
4742
4820
|
case "number":
|
|
4743
4821
|
return !0;
|
|
@@ -4747,14 +4825,14 @@ function Ge(i) {
|
|
|
4747
4825
|
return !1;
|
|
4748
4826
|
}
|
|
4749
4827
|
}
|
|
4750
|
-
function
|
|
4828
|
+
function ii(i, t) {
|
|
4751
4829
|
const e = Math.floor(t);
|
|
4752
4830
|
return i >= e && i < e + 1;
|
|
4753
4831
|
}
|
|
4754
|
-
function
|
|
4755
|
-
return Array.isArray(i) ? i.every((e) =>
|
|
4832
|
+
function si(i, t) {
|
|
4833
|
+
return Array.isArray(i) ? i.every((e) => rt(e, t)) : rt(i, t);
|
|
4756
4834
|
}
|
|
4757
|
-
function
|
|
4835
|
+
function ri(i, t) {
|
|
4758
4836
|
if (i.startsWith(t))
|
|
4759
4837
|
return i.slice(t.length).trim();
|
|
4760
4838
|
let e = 0;
|
|
@@ -4762,26 +4840,30 @@ function ii(i, t) {
|
|
|
4762
4840
|
e++;
|
|
4763
4841
|
return i.slice(e).trim();
|
|
4764
4842
|
}
|
|
4843
|
+
const ni = (i, t, e) => {
|
|
4844
|
+
var s, n;
|
|
4845
|
+
return (n = (s = i == null ? void 0 : i.replace(new RegExp(`<${t}`, "ig"), `<${e}`)) == null ? void 0 : s.replace(new RegExp(`</${t}`, "ig"), `</${e}`)) == null ? void 0 : n.trim();
|
|
4846
|
+
};
|
|
4765
4847
|
function we(i) {
|
|
4766
4848
|
return [...new Set(i)];
|
|
4767
4849
|
}
|
|
4768
|
-
function
|
|
4769
|
-
const s =
|
|
4770
|
-
return m(i) && m(t) &&
|
|
4850
|
+
function K(i, t, e = !0) {
|
|
4851
|
+
const s = H(i);
|
|
4852
|
+
return m(i) && m(t) && f(
|
|
4771
4853
|
t,
|
|
4772
4854
|
(n, o) => {
|
|
4773
4855
|
const a = i == null ? void 0 : i[o];
|
|
4774
|
-
m(a) && m(n) ? e && Array.isArray(a) && Array.isArray(n) ? s[o] =
|
|
4856
|
+
m(a) && m(n) ? e && Array.isArray(a) && Array.isArray(n) ? s[o] = H(we([...a, ...n])) : s[o] = K(
|
|
4775
4857
|
Array.isArray(a) ? { ...a } : a,
|
|
4776
4858
|
n,
|
|
4777
4859
|
e
|
|
4778
|
-
) : s[o] = m(n) ?
|
|
4860
|
+
) : s[o] = m(n) ? H(n) : n;
|
|
4779
4861
|
}
|
|
4780
4862
|
), s;
|
|
4781
4863
|
}
|
|
4782
|
-
function
|
|
4864
|
+
function oi(i, t) {
|
|
4783
4865
|
let e = i;
|
|
4784
|
-
return
|
|
4866
|
+
return f(t, (s, n) => {
|
|
4785
4867
|
e = e.replace(fe(`[${n}]`), I(s));
|
|
4786
4868
|
}), e;
|
|
4787
4869
|
}
|
|
@@ -4795,7 +4877,7 @@ function be(i, t = "auto") {
|
|
|
4795
4877
|
return !1;
|
|
4796
4878
|
}
|
|
4797
4879
|
}
|
|
4798
|
-
function
|
|
4880
|
+
function ai(i, t, e = "auto", s) {
|
|
4799
4881
|
var o;
|
|
4800
4882
|
const n = ge(i);
|
|
4801
4883
|
if (n && (n.naturalWidth > t && (e === "auto" || e === "width") || n.naturalHeight > t && (e === "auto" || e === "height"))) {
|
|
@@ -4804,22 +4886,22 @@ function ri(i, t, e = "auto", s) {
|
|
|
4804
4886
|
return u.canvas.width = a ? t : n.naturalWidth / n.naturalHeight * t, u.canvas.height = a ? n.naturalHeight / n.naturalWidth * t : t, u.drawImage(n, 0, 0, u.canvas.width, u.canvas.height), u.canvas.toDataURL(s);
|
|
4805
4887
|
}
|
|
4806
4888
|
}
|
|
4807
|
-
function
|
|
4808
|
-
const t =
|
|
4889
|
+
function ci(i) {
|
|
4890
|
+
const t = k(i);
|
|
4809
4891
|
if (t > 0) {
|
|
4810
4892
|
const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
|
|
4811
4893
|
return `${e}:${s}`;
|
|
4812
4894
|
}
|
|
4813
4895
|
return "00:00";
|
|
4814
4896
|
}
|
|
4815
|
-
function
|
|
4897
|
+
function ui(i, t, {
|
|
4816
4898
|
multiple: e = !1,
|
|
4817
4899
|
maxlength: s = 0,
|
|
4818
4900
|
alwaysChange: n = !0,
|
|
4819
4901
|
notEmpty: o = !1
|
|
4820
4902
|
}) {
|
|
4821
4903
|
if (e) {
|
|
4822
|
-
if (
|
|
4904
|
+
if (xt(i)) {
|
|
4823
4905
|
const a = i.indexOf(t), u = [...i];
|
|
4824
4906
|
return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!s || i.length < s) && u.push(t), u;
|
|
4825
4907
|
}
|
|
@@ -4827,46 +4909,46 @@ function oi(i, t, {
|
|
|
4827
4909
|
}
|
|
4828
4910
|
return n || i !== t ? t : i;
|
|
4829
4911
|
}
|
|
4830
|
-
function
|
|
4912
|
+
function hi(i, t, e) {
|
|
4831
4913
|
if (m(i) && m(t)) {
|
|
4832
4914
|
if (e) {
|
|
4833
4915
|
let s = {}, n = !1;
|
|
4834
|
-
return
|
|
4835
|
-
!n && (e === a || e === o) ? (n = !0, s =
|
|
4836
|
-
}), n ? s :
|
|
4916
|
+
return f(i, (o, a) => {
|
|
4917
|
+
!n && (e === a || e === o) ? (n = !0, s = K(s, t)) : n ? s = K(s, { [a]: o }) : s[a] = m(o) ? H(o) : o;
|
|
4918
|
+
}), n ? s : K(i, t);
|
|
4837
4919
|
}
|
|
4838
4920
|
if (m(t))
|
|
4839
|
-
return
|
|
4921
|
+
return K(i, t);
|
|
4840
4922
|
}
|
|
4841
|
-
return
|
|
4923
|
+
return H(i);
|
|
4842
4924
|
}
|
|
4843
4925
|
function ve(i) {
|
|
4844
4926
|
return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...t) => `${String(t[1]).toUpperCase()}`).replace(/^([A-Z])/, (t) => `${t.toLowerCase()}`);
|
|
4845
4927
|
}
|
|
4846
|
-
function
|
|
4928
|
+
function li(i) {
|
|
4847
4929
|
return ve(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
|
|
4848
4930
|
}
|
|
4849
|
-
function
|
|
4931
|
+
function di(i) {
|
|
4850
4932
|
return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/^[A-Z]/, (t) => t.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (t) => `-${t.toLowerCase()}`).replace(/[A-Z]/g, (t) => t.toLowerCase());
|
|
4851
4933
|
}
|
|
4852
|
-
function
|
|
4853
|
-
const n =
|
|
4854
|
-
return t && o < n ? `${
|
|
4934
|
+
function gi(i, t, e, s) {
|
|
4935
|
+
const n = k(i), o = k(t);
|
|
4936
|
+
return t && o < n ? `${Nt(o, e, s)}+` : Nt(n, e, s);
|
|
4855
4937
|
}
|
|
4856
|
-
const
|
|
4857
|
-
function
|
|
4938
|
+
const Nt = (i, t, e) => t ? new Q(e).number(i) : i;
|
|
4939
|
+
function Se(i, t) {
|
|
4858
4940
|
return 1 / i * t;
|
|
4859
4941
|
}
|
|
4860
|
-
function
|
|
4861
|
-
return
|
|
4942
|
+
function fi(i, t) {
|
|
4943
|
+
return Se(i, t) * 100;
|
|
4862
4944
|
}
|
|
4863
|
-
function
|
|
4945
|
+
function mi(i) {
|
|
4864
4946
|
let t = "";
|
|
4865
4947
|
for (const e of i)
|
|
4866
4948
|
t += String.fromCharCode(e);
|
|
4867
4949
|
return l() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(i).toString("base64") : "";
|
|
4868
4950
|
}
|
|
4869
|
-
async function
|
|
4951
|
+
async function yi(i) {
|
|
4870
4952
|
if (l())
|
|
4871
4953
|
try {
|
|
4872
4954
|
await navigator.clipboard.writeText(i);
|
|
@@ -4875,7 +4957,7 @@ async function gi(i) {
|
|
|
4875
4957
|
}
|
|
4876
4958
|
}
|
|
4877
4959
|
export {
|
|
4878
|
-
|
|
4960
|
+
z as Api,
|
|
4879
4961
|
Zt as ApiDefault,
|
|
4880
4962
|
zt as ApiHeaders,
|
|
4881
4963
|
D as ApiMethodItem,
|
|
@@ -4883,25 +4965,26 @@ export {
|
|
|
4883
4965
|
Yt as ApiResponse,
|
|
4884
4966
|
Vt as ApiStatus,
|
|
4885
4967
|
Ce as BroadcastMessage,
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4968
|
+
Qt as Cache,
|
|
4969
|
+
Mt as CacheItem,
|
|
4970
|
+
$t as CacheStatic,
|
|
4971
|
+
pt as Cookie,
|
|
4972
|
+
Ft as CookieBlock,
|
|
4891
4973
|
T as DataStorage,
|
|
4892
|
-
|
|
4893
|
-
|
|
4974
|
+
ct as Datetime,
|
|
4975
|
+
ke as ElementScreenshot,
|
|
4976
|
+
ft as EventItem,
|
|
4894
4977
|
r as GEO_FLAG_ICON_NAME,
|
|
4895
4978
|
w as Geo,
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4979
|
+
wt as GeoFlag,
|
|
4980
|
+
Q as GeoIntl,
|
|
4981
|
+
bt as GeoPhone,
|
|
4982
|
+
Ae as Global,
|
|
4983
|
+
vt as Hash,
|
|
4984
|
+
Lt as Icons,
|
|
4902
4985
|
x as Loading,
|
|
4903
|
-
|
|
4904
|
-
|
|
4986
|
+
Ne as Meta,
|
|
4987
|
+
ut as MetaManager,
|
|
4905
4988
|
ae as MetaOg,
|
|
4906
4989
|
re as MetaOpenGraphAge,
|
|
4907
4990
|
ie as MetaOpenGraphAvailability,
|
|
@@ -4910,95 +4993,97 @@ export {
|
|
|
4910
4993
|
y as MetaOpenGraphTag,
|
|
4911
4994
|
ee as MetaOpenGraphType,
|
|
4912
4995
|
te as MetaRobots,
|
|
4913
|
-
|
|
4996
|
+
S as MetaTag,
|
|
4914
4997
|
ce as MetaTwitter,
|
|
4915
4998
|
oe as MetaTwitterCard,
|
|
4916
4999
|
$ as MetaTwitterTag,
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
5000
|
+
ot as ScrollbarWidth,
|
|
5001
|
+
Ct as Translate,
|
|
5002
|
+
Ee as anyToString,
|
|
4920
5003
|
he as applyTemplate,
|
|
4921
5004
|
le as arrFill,
|
|
4922
5005
|
Ie as blobToBase64,
|
|
4923
|
-
|
|
4924
|
-
|
|
5006
|
+
H as copyObject,
|
|
5007
|
+
C as copyObjectLite,
|
|
4925
5008
|
_ as createElement,
|
|
4926
|
-
|
|
4927
|
-
|
|
5009
|
+
Be as domQuerySelector,
|
|
5010
|
+
Fe as domQuerySelectorAll,
|
|
4928
5011
|
Gt as encodeAttribute,
|
|
4929
|
-
|
|
5012
|
+
xe as eventStopPropagation,
|
|
4930
5013
|
I as executeFunction,
|
|
4931
5014
|
Kt as executePromise,
|
|
4932
|
-
|
|
5015
|
+
f as forEach,
|
|
4933
5016
|
de as frame,
|
|
4934
|
-
|
|
4935
|
-
|
|
5017
|
+
Re as getAttributes,
|
|
5018
|
+
Pe as getClipboardData,
|
|
4936
5019
|
_t as getColumn,
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
5020
|
+
We as getCurrentDate,
|
|
5021
|
+
N as getElement,
|
|
5022
|
+
Ue as getElementId,
|
|
4940
5023
|
ge as getElementImage,
|
|
4941
5024
|
Ot as getElementItem,
|
|
4942
|
-
|
|
5025
|
+
gt as getElementOrWindow,
|
|
4943
5026
|
fe as getExp,
|
|
4944
5027
|
me as getItemByPath,
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
5028
|
+
je as getKey,
|
|
5029
|
+
Rt as getLengthOfAllArray,
|
|
5030
|
+
He as getMaxLengthAllArray,
|
|
5031
|
+
ze as getMinLengthAllArray,
|
|
5032
|
+
Ze as getMouseClient,
|
|
4950
5033
|
ye as getMouseClientX,
|
|
4951
5034
|
$e as getMouseClientY,
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
5035
|
+
Ve as getObjectByKeys,
|
|
5036
|
+
Ke as getObjectNoUndefined,
|
|
5037
|
+
Ye as getObjectOrNone,
|
|
5038
|
+
qe as getRandomText,
|
|
5039
|
+
Et as getRequestString,
|
|
5040
|
+
Je as getStepPercent,
|
|
5041
|
+
Me as getStepValue,
|
|
4959
5042
|
Qe as goScroll,
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
5043
|
+
Xe as goScrollSmooth,
|
|
5044
|
+
_e as inArray,
|
|
5045
|
+
Oe as initScrollbarOffset,
|
|
5046
|
+
Te as intersectKey,
|
|
5047
|
+
xt as isArray,
|
|
5048
|
+
Ge as isDifferent,
|
|
5049
|
+
nt as isDomData,
|
|
4967
5050
|
l as isDomRuntime,
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
5051
|
+
ti as isEnter,
|
|
5052
|
+
L as isFilled,
|
|
5053
|
+
ei as isFloat,
|
|
5054
|
+
at as isFunction,
|
|
4971
5055
|
Ht as isInDom,
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
5056
|
+
ii as isIntegerBetween,
|
|
5057
|
+
M as isNull,
|
|
5058
|
+
lt as isNumber,
|
|
4975
5059
|
m as isObject,
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
5060
|
+
A as isObjectNotArray,
|
|
5061
|
+
rt as isSelected,
|
|
5062
|
+
si as isSelectedByList,
|
|
4979
5063
|
R as isString,
|
|
4980
5064
|
It as isWindow,
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
5065
|
+
J as random,
|
|
5066
|
+
ri as removeCommonPrefix,
|
|
5067
|
+
ni as replaceComponentName,
|
|
5068
|
+
K as replaceRecursive,
|
|
5069
|
+
oi as replaceTemplate,
|
|
5070
|
+
ai as resizeImageByMax,
|
|
5071
|
+
ci as secondToTime,
|
|
4987
5072
|
Tt as setElementItem,
|
|
4988
|
-
|
|
4989
|
-
|
|
5073
|
+
ui as setValues,
|
|
5074
|
+
hi as splice,
|
|
4990
5075
|
pe as strFill,
|
|
4991
|
-
|
|
5076
|
+
Z as toArray,
|
|
4992
5077
|
ve as toCamelCase,
|
|
4993
|
-
|
|
5078
|
+
li as toCamelCaseFirst,
|
|
4994
5079
|
B as toDate,
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5080
|
+
di as toKebabCase,
|
|
5081
|
+
k as toNumber,
|
|
5082
|
+
gi as toNumberByMax,
|
|
5083
|
+
Se as toPercent,
|
|
5084
|
+
fi as toPercentBy100,
|
|
5085
|
+
Bt as transformation,
|
|
5086
|
+
mi as uint8ArrayToBase64,
|
|
5002
5087
|
we as uniqueArray,
|
|
5003
|
-
|
|
5088
|
+
yi as writeClipboardData
|
|
5004
5089
|
};
|