@dxtmisha/functional-basic 0.8.4 → 0.8.5
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 +24 -43
- package/dist/library.js +714 -761
- package/package.json +2 -2
package/dist/library.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
1
|
var Wt = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var c = (
|
|
4
|
-
import { geo as
|
|
5
|
-
function C(
|
|
6
|
-
return t ? Object.assign({},
|
|
2
|
+
var jt = (i, t, e) => t in i ? Wt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var c = (i, t, e) => jt(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { geo as Ut } from "@dxtmisha/media";
|
|
5
|
+
function C(i, t) {
|
|
6
|
+
return t ? Object.assign({}, i, t) : Object.assign({}, i);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return !!(
|
|
8
|
+
function f(i) {
|
|
9
|
+
return !!(i && typeof i == "object");
|
|
10
10
|
}
|
|
11
|
-
function g(
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
([r, o]) =>
|
|
16
|
-
), e ?
|
|
11
|
+
function g(i, t, e) {
|
|
12
|
+
if (f(i)) {
|
|
13
|
+
const s = [];
|
|
14
|
+
return i instanceof Map ? i.forEach((r, o) => s.push(t(r, o, i))) : Array.isArray(i) ? i.forEach((r, o) => s.push(t(r, o, i))) : Object.entries(i).forEach(
|
|
15
|
+
([r, o]) => s.push(t(o, r, i))
|
|
16
|
+
), e ? s : s.filter((r) => r !== void 0);
|
|
17
17
|
}
|
|
18
18
|
return [];
|
|
19
19
|
}
|
|
20
|
-
function It(
|
|
20
|
+
function It(i, t = "=", e = "&") {
|
|
21
21
|
return g(
|
|
22
|
-
|
|
23
|
-
(
|
|
22
|
+
i,
|
|
23
|
+
(s, r) => `${r}${t}${encodeURIComponent(String(s).trim())}`
|
|
24
24
|
).sort().join(e);
|
|
25
25
|
}
|
|
26
|
-
function at(
|
|
27
|
-
return Array.isArray(
|
|
26
|
+
function at(i) {
|
|
27
|
+
return Array.isArray(i);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function J(i) {
|
|
30
|
+
return i == null;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
if (
|
|
34
|
-
if (t &&
|
|
32
|
+
function v(i, t) {
|
|
33
|
+
if (i) {
|
|
34
|
+
if (t && i === "0")
|
|
35
35
|
return !0;
|
|
36
|
-
switch (typeof
|
|
36
|
+
switch (typeof i) {
|
|
37
37
|
case "bigint":
|
|
38
38
|
case "number":
|
|
39
|
-
return
|
|
39
|
+
return i !== 0;
|
|
40
40
|
case "boolean":
|
|
41
|
-
return
|
|
41
|
+
return i;
|
|
42
42
|
case "function":
|
|
43
43
|
case "symbol":
|
|
44
44
|
return !0;
|
|
45
45
|
case "object":
|
|
46
|
-
return Array.isArray(
|
|
46
|
+
return Array.isArray(i) ? i.length > 0 : Object.values(i).some((e) => !J(e));
|
|
47
47
|
case "string":
|
|
48
|
-
return !["", "undefined", "null", "0", "false", "[]"].includes(
|
|
48
|
+
return !["", "undefined", "null", "0", "false", "[]"].includes(i);
|
|
49
49
|
case "undefined":
|
|
50
50
|
return !1;
|
|
51
51
|
default:
|
|
52
|
-
return !!
|
|
52
|
+
return !!i;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
return !1;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
57
|
+
function A(i) {
|
|
58
|
+
return f(i) && !Array.isArray(i);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return typeof
|
|
60
|
+
function x(i) {
|
|
61
|
+
return typeof i == "string";
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return JSON.parse(JSON.stringify(
|
|
63
|
+
function U(i) {
|
|
64
|
+
return JSON.parse(JSON.stringify(i));
|
|
65
65
|
}
|
|
66
66
|
function l() {
|
|
67
67
|
return typeof window != "undefined" && !!window.document;
|
|
68
68
|
}
|
|
69
|
-
function dt(
|
|
70
|
-
switch (typeof
|
|
69
|
+
function dt(i) {
|
|
70
|
+
switch (typeof i) {
|
|
71
71
|
case "number":
|
|
72
72
|
return !0;
|
|
73
73
|
case "string":
|
|
74
|
-
return !!
|
|
74
|
+
return !!i.match(/^-?[0-9]+(\.[0-9]+)?$/);
|
|
75
75
|
default:
|
|
76
76
|
return !1;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function k(
|
|
80
|
-
if (typeof
|
|
81
|
-
return
|
|
82
|
-
if (!
|
|
79
|
+
function k(i) {
|
|
80
|
+
if (typeof i == "number")
|
|
81
|
+
return i;
|
|
82
|
+
if (!i)
|
|
83
83
|
return 0;
|
|
84
|
-
let t =
|
|
84
|
+
let t = i.replace(/[^\d., ]+/ig, "");
|
|
85
85
|
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);
|
|
86
86
|
}
|
|
87
|
-
function rt(
|
|
88
|
-
return
|
|
87
|
+
function rt(i, t) {
|
|
88
|
+
return J(i) ? !1 : Array.isArray(t) ? t.includes(i) : dt(i) && dt(t) ? k(i) === k(t) : i === t;
|
|
89
89
|
}
|
|
90
|
-
function ct(
|
|
91
|
-
return
|
|
90
|
+
function ct(i) {
|
|
91
|
+
return i instanceof Function || typeof i == "function";
|
|
92
92
|
}
|
|
93
|
-
function B(
|
|
94
|
-
return ct(
|
|
93
|
+
function B(i) {
|
|
94
|
+
return ct(i) ? i() : i;
|
|
95
95
|
}
|
|
96
96
|
function nt() {
|
|
97
97
|
return location.href.startsWith("data:");
|
|
98
98
|
}
|
|
99
99
|
const tt = {};
|
|
100
100
|
let gt = "ui-storage";
|
|
101
|
-
class
|
|
101
|
+
class T {
|
|
102
102
|
/**
|
|
103
103
|
* Constructor
|
|
104
104
|
* @param name value name/ название значения
|
|
@@ -108,10 +108,10 @@ class G {
|
|
|
108
108
|
c(this, "value");
|
|
109
109
|
c(this, "age");
|
|
110
110
|
this.name = t, this.isSession = e;
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return tt[
|
|
114
|
-
this.make(), tt[
|
|
111
|
+
const s = `${e ? "session" : "storage"}#${t}`;
|
|
112
|
+
if (s in tt)
|
|
113
|
+
return tt[s];
|
|
114
|
+
this.make(), tt[s] = this;
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Changing the prefix in key names. Should be called at the beginning of the code.
|
|
@@ -155,7 +155,7 @@ class G {
|
|
|
155
155
|
*/
|
|
156
156
|
remove() {
|
|
157
157
|
var t;
|
|
158
|
-
return (t = this.getMethod()) == null || t.removeItem(this.getIndex()), this;
|
|
158
|
+
return this.value = void 0, this.age = void 0, (t = this.getMethod()) == null || t.removeItem(this.getIndex()), this;
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
161
|
* Clearing all data from storage.
|
|
@@ -172,7 +172,7 @@ class G {
|
|
|
172
172
|
* @param cache cache time/ время кэширования
|
|
173
173
|
*/
|
|
174
174
|
isCache(t) {
|
|
175
|
-
return
|
|
175
|
+
return J(t) || this.age && this.age + t * 1e3 >= (/* @__PURE__ */ new Date()).getTime();
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
178
|
* Returns an object for working with storage.
|
|
@@ -205,8 +205,8 @@ class G {
|
|
|
205
205
|
if (t)
|
|
206
206
|
try {
|
|
207
207
|
return JSON.parse(t);
|
|
208
|
-
} catch (
|
|
209
|
-
console.error("DataStorage",
|
|
208
|
+
} catch (s) {
|
|
209
|
+
console.error("DataStorage", s);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
@@ -284,7 +284,7 @@ const Ht = "geo-code", b = class b {
|
|
|
284
284
|
* Возвращает полный список стран.
|
|
285
285
|
*/
|
|
286
286
|
static getList() {
|
|
287
|
-
return
|
|
287
|
+
return Ut;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* Returns the data about the country by its full code.
|
|
@@ -295,7 +295,7 @@ const Ht = "geo-code", b = class b {
|
|
|
295
295
|
*/
|
|
296
296
|
static getByCode(t) {
|
|
297
297
|
let e;
|
|
298
|
-
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(
|
|
298
|
+
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(U(e != null ? e : this.getList()[0]));
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
* Returns the full data by language and country.
|
|
@@ -319,8 +319,8 @@ const Ht = "geo-code", b = class b {
|
|
|
319
319
|
*/
|
|
320
320
|
static getByCountry(t) {
|
|
321
321
|
return this.getList().find((e) => {
|
|
322
|
-
var
|
|
323
|
-
return e.country === t || ((
|
|
322
|
+
var s;
|
|
323
|
+
return e.country === t || ((s = e == null ? void 0 : e.countryAlternative) == null ? void 0 : s.find((r) => r === t));
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
@@ -331,8 +331,8 @@ const Ht = "geo-code", b = class b {
|
|
|
331
331
|
*/
|
|
332
332
|
static getByLanguage(t) {
|
|
333
333
|
return this.getList().find((e) => {
|
|
334
|
-
var
|
|
335
|
-
return e.language === t || ((
|
|
334
|
+
var s;
|
|
335
|
+
return e.language === t || ((s = e == null ? void 0 : e.languageAlternative) == null ? void 0 : s.find((r) => r === t));
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
338
|
/**
|
|
@@ -441,25 +441,25 @@ const Ht = "geo-code", b = class b {
|
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
};
|
|
444
|
-
c(b, "storage", new
|
|
445
|
-
let
|
|
446
|
-
function
|
|
447
|
-
return l() &&
|
|
444
|
+
c(b, "storage", new T(Ht)), c(b, "location"), c(b, "item"), c(b, "language"), c(b, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), b.location = b.findLocation(), b.language = b.findLanguage(b.location), b.item = b.getByCode(b.location);
|
|
445
|
+
let p = b;
|
|
446
|
+
function Ft(i) {
|
|
447
|
+
return l() && i === window;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function N(i) {
|
|
450
450
|
var t;
|
|
451
451
|
if (l())
|
|
452
|
-
return
|
|
452
|
+
return Ft(i) ? document.body : x(i) ? (t = document.querySelector(i)) != null ? t : void 0 : i;
|
|
453
453
|
}
|
|
454
|
-
function ft(
|
|
455
|
-
return
|
|
454
|
+
function ft(i) {
|
|
455
|
+
return Ft(i) ? i : N(i);
|
|
456
456
|
}
|
|
457
|
-
function zt(
|
|
457
|
+
function zt(i) {
|
|
458
458
|
var t;
|
|
459
|
-
return !!((t =
|
|
459
|
+
return !!((t = N(i)) != null && t.closest("html"));
|
|
460
460
|
}
|
|
461
|
-
function
|
|
462
|
-
return Array.isArray(
|
|
461
|
+
function z(i) {
|
|
462
|
+
return Array.isArray(i) ? i : [i];
|
|
463
463
|
}
|
|
464
464
|
class mt {
|
|
465
465
|
/**
|
|
@@ -473,7 +473,7 @@ class mt {
|
|
|
473
473
|
* @param detail an event-dependent value associated with the event/ зависимое от события
|
|
474
474
|
* значение, связанное с событием
|
|
475
475
|
*/
|
|
476
|
-
constructor(t, e = ["click"],
|
|
476
|
+
constructor(t, e = ["click"], s, r, o) {
|
|
477
477
|
/**
|
|
478
478
|
* Element.
|
|
479
479
|
*
|
|
@@ -502,8 +502,8 @@ class mt {
|
|
|
502
502
|
* Это должен быть объект, реализующий интерфейс EventListener или просто функция JavaScript.
|
|
503
503
|
*/
|
|
504
504
|
c(this, "listenerRecent", (t) => {
|
|
505
|
-
var e,
|
|
506
|
-
zt(this.elementControl) ? ((e = this.listener) == null || e.call(this.element, t, this.detail),
|
|
505
|
+
var e, s;
|
|
506
|
+
zt(this.elementControl) ? ((e = this.listener) == null || e.call(this.element, t, this.detail), f(this.options) && ((s = this.options) != null && s.once) && this.stop()) : this.stop();
|
|
507
507
|
});
|
|
508
508
|
/**
|
|
509
509
|
* Event states.
|
|
@@ -512,7 +512,7 @@ class mt {
|
|
|
512
512
|
*/
|
|
513
513
|
c(this, "activity", !1);
|
|
514
514
|
c(this, "activityItems", []);
|
|
515
|
-
this.listener =
|
|
515
|
+
this.listener = s, this.options = r, this.detail = o, this.element = ft(t), this.elementControl = N(t), this.type = z(e);
|
|
516
516
|
}
|
|
517
517
|
/**
|
|
518
518
|
* Checks whether event listening is currently enabled.
|
|
@@ -533,7 +533,7 @@ class mt {
|
|
|
533
533
|
*/
|
|
534
534
|
setElement(t) {
|
|
535
535
|
const e = ft(t);
|
|
536
|
-
return this.elementControlEdit || (this.elementControl =
|
|
536
|
+
return this.elementControlEdit || (this.elementControl = N(t)), this.element = e, this.reset(), this;
|
|
537
537
|
}
|
|
538
538
|
/**
|
|
539
539
|
* Modifies the object that receives the notification.
|
|
@@ -542,7 +542,7 @@ class mt {
|
|
|
542
542
|
* @param elementSelector element/ элемент
|
|
543
543
|
*/
|
|
544
544
|
setElementControl(t) {
|
|
545
|
-
return this.elementControl =
|
|
545
|
+
return this.elementControl = N(t), this.elementControlEdit = !J(this.elementControl), this.elementControlEdit || (this.elementControl = N(this.element)), this;
|
|
546
546
|
}
|
|
547
547
|
/**
|
|
548
548
|
* Changes the type of the handled event.
|
|
@@ -551,7 +551,7 @@ class mt {
|
|
|
551
551
|
* @param type type/ тип
|
|
552
552
|
*/
|
|
553
553
|
setType(t) {
|
|
554
|
-
return this.type =
|
|
554
|
+
return this.type = z(t), this.reset(), this;
|
|
555
555
|
}
|
|
556
556
|
/**
|
|
557
557
|
* Modifies the object that receives the notification.
|
|
@@ -592,8 +592,8 @@ class mt {
|
|
|
592
592
|
dispatch(t = this.detail) {
|
|
593
593
|
return this.type.forEach(
|
|
594
594
|
(e) => {
|
|
595
|
-
var
|
|
596
|
-
return (
|
|
595
|
+
var s;
|
|
596
|
+
return (s = this.element) == null ? void 0 : s.dispatchEvent(new CustomEvent(e, { detail: t }));
|
|
597
597
|
}
|
|
598
598
|
), this;
|
|
599
599
|
}
|
|
@@ -619,10 +619,10 @@ class mt {
|
|
|
619
619
|
return this.activity && (this.activity = !1, this.activityItems.forEach(({
|
|
620
620
|
element: t,
|
|
621
621
|
type: e,
|
|
622
|
-
listener:
|
|
622
|
+
listener: s,
|
|
623
623
|
observer: r
|
|
624
624
|
}) => {
|
|
625
|
-
r ? r.disconnect() :
|
|
625
|
+
r ? r.disconnect() : s ? t == null || t.removeEventListener(e, s) : t == null || t.removeEventListener(e, this.listenerRecent);
|
|
626
626
|
})), this;
|
|
627
627
|
}
|
|
628
628
|
/**
|
|
@@ -676,9 +676,9 @@ class mt {
|
|
|
676
676
|
makeScroll() {
|
|
677
677
|
if (this.element) {
|
|
678
678
|
let t = !1;
|
|
679
|
-
const e = (
|
|
679
|
+
const e = (s) => {
|
|
680
680
|
t || (t = !0, requestAnimationFrame(() => {
|
|
681
|
-
this.listenerRecent(
|
|
681
|
+
this.listenerRecent(s), t = !1;
|
|
682
682
|
}));
|
|
683
683
|
};
|
|
684
684
|
return this.element.addEventListener("scroll", e, this.options), this.element.addEventListener("resize", e, this.options), this.activityItems.push(
|
|
@@ -697,7 +697,7 @@ class mt {
|
|
|
697
697
|
return !1;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
const yt = "ui-loading",
|
|
700
|
+
const yt = "ui-loading", K = class K {
|
|
701
701
|
/**
|
|
702
702
|
* Check if the loader is active now.
|
|
703
703
|
*
|
|
@@ -744,8 +744,8 @@ const yt = "ui-loading", Y = class Y {
|
|
|
744
744
|
(t = this.event) == null || t.dispatch({ loading: this.is() });
|
|
745
745
|
}
|
|
746
746
|
};
|
|
747
|
-
c(
|
|
748
|
-
let I =
|
|
747
|
+
c(K, "value", 0), c(K, "event"), l() && (K.event = new mt(window, yt));
|
|
748
|
+
let I = K;
|
|
749
749
|
class Zt {
|
|
750
750
|
constructor() {
|
|
751
751
|
/** Default headers/ Заголовки по умолчанию */
|
|
@@ -760,11 +760,11 @@ class Zt {
|
|
|
760
760
|
*/
|
|
761
761
|
get(t, e = "application/json;charset=UTF-8") {
|
|
762
762
|
if (t !== null) {
|
|
763
|
-
const
|
|
763
|
+
const s = C(
|
|
764
764
|
this.headers,
|
|
765
765
|
t
|
|
766
766
|
);
|
|
767
|
-
return
|
|
767
|
+
return v(e) && (s["Content-Type"] = e), s;
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
/**
|
|
@@ -773,10 +773,10 @@ class Zt {
|
|
|
773
773
|
* Изменяет данные заголовка по умолчанию.
|
|
774
774
|
*/
|
|
775
775
|
set(t) {
|
|
776
|
-
return
|
|
776
|
+
return A(t) && (this.headers = t), this;
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
var L = /* @__PURE__ */ ((
|
|
779
|
+
var L = /* @__PURE__ */ ((i) => (i.get = "GET", i.post = "POST", i.put = "PUT", i.delete = "DELETE", i))(L || {});
|
|
780
780
|
class Vt {
|
|
781
781
|
constructor() {
|
|
782
782
|
/** Default request data/ Данные запроса по умолчанию */
|
|
@@ -809,7 +809,7 @@ class Vt {
|
|
|
809
809
|
if (e) {
|
|
810
810
|
if (t instanceof FormData)
|
|
811
811
|
this.addByFormData(t, e);
|
|
812
|
-
else if (
|
|
812
|
+
else if (A(t))
|
|
813
813
|
return C(e, t);
|
|
814
814
|
}
|
|
815
815
|
return t;
|
|
@@ -830,8 +830,8 @@ class Vt {
|
|
|
830
830
|
* @param value default values/ значения по умолчанию
|
|
831
831
|
*/
|
|
832
832
|
addByFormData(t, e) {
|
|
833
|
-
for (const
|
|
834
|
-
t.has(
|
|
833
|
+
for (const s in e)
|
|
834
|
+
t.has(s) || t.set(s, e[s]);
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
class $t {
|
|
@@ -938,7 +938,7 @@ class $t {
|
|
|
938
938
|
* @param response response data/ данные ответа
|
|
939
939
|
*/
|
|
940
940
|
setLastResponse(t) {
|
|
941
|
-
return t &&
|
|
941
|
+
return t && A(t) && ("message" in t && this.setLastMessage(String(t.message)), "status" in t && this.setLastStatus(String(t.status))), this.set({ lastResponse: t }), this;
|
|
942
942
|
}
|
|
943
943
|
/**
|
|
944
944
|
* Sets the last status.
|
|
@@ -969,12 +969,12 @@ class $t {
|
|
|
969
969
|
this.value || (this.value = {}), this.value[t] = e;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
async function Kt(
|
|
973
|
-
const t = B(
|
|
972
|
+
async function Kt(i) {
|
|
973
|
+
const t = B(i);
|
|
974
974
|
return t instanceof Promise ? await t : t;
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
return Math.floor(Math.random() * (t -
|
|
976
|
+
function q(i, t) {
|
|
977
|
+
return Math.floor(Math.random() * (t - i + 1) + i);
|
|
978
978
|
}
|
|
979
979
|
const pt = "d-response-loading";
|
|
980
980
|
class Yt {
|
|
@@ -1002,8 +1002,8 @@ class Yt {
|
|
|
1002
1002
|
* @param request data for the request/ данные для запроса
|
|
1003
1003
|
* @param devMode is it developer mode/ является ли режим разработчика
|
|
1004
1004
|
*/
|
|
1005
|
-
get(t = "", e,
|
|
1006
|
-
return this.response.find((o) => !this.isDisable(o) && this.isPath(o, t) && e === o.method && this.isFirst(o, r) && this.isResponse(o,
|
|
1005
|
+
get(t = "", e, s, r) {
|
|
1006
|
+
return this.response.find((o) => !this.isDisable(o) && this.isPath(o, t) && e === o.method && this.isFirst(o, r) && this.isResponse(o, s) ? (this.isDevMode(r) && console.warn(`Response type: ${o.path}`), this.first.push(o), !0) : !1);
|
|
1007
1007
|
}
|
|
1008
1008
|
/**
|
|
1009
1009
|
* Returns a list of data about the emulator.
|
|
@@ -1020,7 +1020,7 @@ class Yt {
|
|
|
1020
1020
|
* @param response data for caching/ данные для кеширования
|
|
1021
1021
|
*/
|
|
1022
1022
|
add(t) {
|
|
1023
|
-
return this.response.push(...
|
|
1023
|
+
return this.response.push(...z(t)), this;
|
|
1024
1024
|
}
|
|
1025
1025
|
/**
|
|
1026
1026
|
* Sets developer mode.
|
|
@@ -1038,12 +1038,12 @@ class Yt {
|
|
|
1038
1038
|
async emulator(t) {
|
|
1039
1039
|
const {
|
|
1040
1040
|
path: e = "",
|
|
1041
|
-
method:
|
|
1042
|
-
global: r =
|
|
1041
|
+
method: s = L.get,
|
|
1042
|
+
global: r = s === L.get,
|
|
1043
1043
|
devMode: o = !1
|
|
1044
1044
|
} = t;
|
|
1045
1045
|
if (r || this.isDevMode(o)) {
|
|
1046
|
-
const a = this.requestDefault.request(t.request), u = this.get(e,
|
|
1046
|
+
const a = this.requestDefault.request(t.request), u = this.get(e, s, a, o);
|
|
1047
1047
|
if (u) {
|
|
1048
1048
|
const h = await this.fetch(u, a);
|
|
1049
1049
|
return this.isDevMode(o) && console.warn("Response data:", e, a, h), h;
|
|
@@ -1096,8 +1096,8 @@ class Yt {
|
|
|
1096
1096
|
* @param request request data/ данные запроса
|
|
1097
1097
|
*/
|
|
1098
1098
|
isResponse(t, e) {
|
|
1099
|
-
const
|
|
1100
|
-
return e ===
|
|
1099
|
+
const s = this.requestDefault.request(t == null ? void 0 : t.request);
|
|
1100
|
+
return e === s || s === "*any" || v(e) && v(s) && A(e) && A(s) && !(e instanceof FormData) && !(s instanceof FormData) && Object.values(e).length === Object.values(s).length && Object.entries(s).reduce(
|
|
1101
1101
|
(r, [o, a]) => r && (a === (e == null ? void 0 : e[o]) || a === "*any"),
|
|
1102
1102
|
!0
|
|
1103
1103
|
);
|
|
@@ -1110,13 +1110,13 @@ class Yt {
|
|
|
1110
1110
|
* @param request data for the request/ данные для запроса
|
|
1111
1111
|
*/
|
|
1112
1112
|
fetch(t, e) {
|
|
1113
|
-
return this.startResponseLoading(), new Promise((
|
|
1113
|
+
return this.startResponseLoading(), new Promise((s) => {
|
|
1114
1114
|
Kt(
|
|
1115
1115
|
ct(t.response) ? t.response(e) : t.response
|
|
1116
1116
|
).then((r) => {
|
|
1117
1117
|
t != null && t.lag ? (I.show(), setTimeout(() => {
|
|
1118
|
-
this.stopResponseLoading(),
|
|
1119
|
-
},
|
|
1118
|
+
this.stopResponseLoading(), s(r), I.hide();
|
|
1119
|
+
}, q(0, 2e3))) : (this.stopResponseLoading(), s(r));
|
|
1120
1120
|
});
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
@@ -1167,9 +1167,9 @@ class qt {
|
|
|
1167
1167
|
* @param query data received in the request/ данные, полученные в запросе
|
|
1168
1168
|
* @param apiFetch request options/ опции запроса
|
|
1169
1169
|
*/
|
|
1170
|
-
async makeEnd(t, e,
|
|
1170
|
+
async makeEnd(t, e, s) {
|
|
1171
1171
|
let r = {};
|
|
1172
|
-
return t && this.callbackEnd && (r = await this.callbackEnd(e,
|
|
1172
|
+
return t && this.callbackEnd && (r = await this.callbackEnd(e, s)), r;
|
|
1173
1173
|
}
|
|
1174
1174
|
/**
|
|
1175
1175
|
* The function is modified for a call before the request.
|
|
@@ -1210,11 +1210,11 @@ class qt {
|
|
|
1210
1210
|
* @param apiFetch request options/ опции запроса
|
|
1211
1211
|
*/
|
|
1212
1212
|
async end(t, e) {
|
|
1213
|
-
let
|
|
1214
|
-
return this.callbackEnd && (
|
|
1213
|
+
let s = {};
|
|
1214
|
+
return this.callbackEnd && (s = await this.callbackEnd(t, e)), s;
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
const
|
|
1217
|
+
const w = class w {
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Is the server local.
|
|
1220
1220
|
*
|
|
@@ -1247,7 +1247,7 @@ const v = class v {
|
|
|
1247
1247
|
* @param api adding a path to the site’s API/ добавление пути к API сайта
|
|
1248
1248
|
*/
|
|
1249
1249
|
static getUrl(t, e = !0) {
|
|
1250
|
-
return `${e ? this.url : ""}${t}`.replace("{locale}",
|
|
1250
|
+
return `${e ? this.url : ""}${t}`.replace("{locale}", p.getLocation()).replace("{country}", p.getCountry()).replace("{language}", p.getLanguage());
|
|
1251
1251
|
}
|
|
1252
1252
|
/**
|
|
1253
1253
|
* Getting data for the body.
|
|
@@ -1259,8 +1259,8 @@ const v = class v {
|
|
|
1259
1259
|
static getBody(t = {}, e = L.get) {
|
|
1260
1260
|
if (t instanceof FormData)
|
|
1261
1261
|
return t;
|
|
1262
|
-
if (e !== L.get &&
|
|
1263
|
-
return
|
|
1262
|
+
if (e !== L.get && v(t))
|
|
1263
|
+
return x(t) ? t : JSON.stringify(t);
|
|
1264
1264
|
}
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Getting data for the body of the get method.
|
|
@@ -1270,10 +1270,10 @@ const v = class v {
|
|
|
1270
1270
|
* @param path path to request/ путь к запрос
|
|
1271
1271
|
* @param method method for request/ метод запрос
|
|
1272
1272
|
*/
|
|
1273
|
-
static getBodyForGet(t, e = "",
|
|
1274
|
-
if (
|
|
1273
|
+
static getBodyForGet(t, e = "", s = L.get) {
|
|
1274
|
+
if (s === L.get) {
|
|
1275
1275
|
const r = e.match(/\?/) ? "&" : "?", o = typeof t == "object" ? It(t) : t;
|
|
1276
|
-
if (
|
|
1276
|
+
if (v(o))
|
|
1277
1277
|
return `${r}${o}`;
|
|
1278
1278
|
}
|
|
1279
1279
|
return "";
|
|
@@ -1284,7 +1284,7 @@ const v = class v {
|
|
|
1284
1284
|
* Изменяет данные заголовка по умолчанию.
|
|
1285
1285
|
*/
|
|
1286
1286
|
static setHeaders(t) {
|
|
1287
|
-
return this.headers.set(t),
|
|
1287
|
+
return this.headers.set(t), w;
|
|
1288
1288
|
}
|
|
1289
1289
|
/**
|
|
1290
1290
|
* Modifies the default request data.
|
|
@@ -1292,7 +1292,7 @@ const v = class v {
|
|
|
1292
1292
|
* Изменяет данные запроса по умолчанию.
|
|
1293
1293
|
*/
|
|
1294
1294
|
static setRequestDefault(t) {
|
|
1295
|
-
return this.requestDefault.set(t),
|
|
1295
|
+
return this.requestDefault.set(t), w;
|
|
1296
1296
|
}
|
|
1297
1297
|
/**
|
|
1298
1298
|
* Change the base path to the script.
|
|
@@ -1301,7 +1301,7 @@ const v = class v {
|
|
|
1301
1301
|
* @param url path to the script/ путь к скрипту
|
|
1302
1302
|
*/
|
|
1303
1303
|
static setUrl(t) {
|
|
1304
|
-
return this.url = t,
|
|
1304
|
+
return this.url = t, w;
|
|
1305
1305
|
}
|
|
1306
1306
|
/**
|
|
1307
1307
|
* The function is modified for a call before the request.
|
|
@@ -1310,7 +1310,7 @@ const v = class v {
|
|
|
1310
1310
|
* @param callback function for call/ функция для вызова
|
|
1311
1311
|
*/
|
|
1312
1312
|
static setPreparation(t) {
|
|
1313
|
-
return this.preparation.set(t),
|
|
1313
|
+
return this.preparation.set(t), w;
|
|
1314
1314
|
}
|
|
1315
1315
|
/**
|
|
1316
1316
|
* Modify the function after the request.
|
|
@@ -1319,7 +1319,7 @@ const v = class v {
|
|
|
1319
1319
|
* @param callback function for call/ функция для вызова
|
|
1320
1320
|
*/
|
|
1321
1321
|
static setEnd(t) {
|
|
1322
|
-
return this.preparation.setEnd(t),
|
|
1322
|
+
return this.preparation.setEnd(t), w;
|
|
1323
1323
|
}
|
|
1324
1324
|
/**
|
|
1325
1325
|
* To execute a request.
|
|
@@ -1328,7 +1328,7 @@ const v = class v {
|
|
|
1328
1328
|
* @param pathRequest query string or list of parameters/ строка запроса или список параметров
|
|
1329
1329
|
*/
|
|
1330
1330
|
static async request(t) {
|
|
1331
|
-
return
|
|
1331
|
+
return x(t) ? await this.fetch({
|
|
1332
1332
|
path: t
|
|
1333
1333
|
}) : await this.fetch(t);
|
|
1334
1334
|
}
|
|
@@ -1385,7 +1385,7 @@ const v = class v {
|
|
|
1385
1385
|
static async fetch(t) {
|
|
1386
1386
|
const {
|
|
1387
1387
|
toData: e = !0,
|
|
1388
|
-
hideError:
|
|
1388
|
+
hideError: s = !1,
|
|
1389
1389
|
queryReturn: r = void 0,
|
|
1390
1390
|
globalPreparation: o = !0,
|
|
1391
1391
|
globalEnd: a = !0
|
|
@@ -1393,23 +1393,23 @@ const v = class v {
|
|
|
1393
1393
|
if (u)
|
|
1394
1394
|
return u;
|
|
1395
1395
|
const h = new $t();
|
|
1396
|
-
let
|
|
1396
|
+
let m;
|
|
1397
1397
|
I.show();
|
|
1398
1398
|
try {
|
|
1399
1399
|
await this.preparation.make(o, t);
|
|
1400
|
-
const d = await this.makeQuery(t),
|
|
1401
|
-
if (h.setStatus(d.status, d.statusText), this.status.setStatus(d.status, d.statusText),
|
|
1400
|
+
const d = await this.makeQuery(t), S = await this.preparation.makeEnd(a, d, t);
|
|
1401
|
+
if (h.setStatus(d.status, d.statusText), this.status.setStatus(d.status, d.statusText), S != null && S.reset)
|
|
1402
1402
|
return I.hide(), await this.fetch(t);
|
|
1403
|
-
|
|
1403
|
+
m = await this.readData(
|
|
1404
1404
|
d,
|
|
1405
1405
|
r,
|
|
1406
|
-
|
|
1406
|
+
S
|
|
1407
1407
|
);
|
|
1408
1408
|
} catch (d) {
|
|
1409
|
-
throw
|
|
1409
|
+
throw s || console.error("Api: ", d), h.setError(String(d)), this.status.setError(String(d)), I.hide(), d;
|
|
1410
1410
|
}
|
|
1411
|
-
return I.hide(), h.setLastResponse(
|
|
1412
|
-
this.makeData(
|
|
1411
|
+
return I.hide(), h.setLastResponse(m), this.status.setLastResponse(m), this.makeStatus(
|
|
1412
|
+
this.makeData(m, e),
|
|
1413
1413
|
h
|
|
1414
1414
|
);
|
|
1415
1415
|
}
|
|
@@ -1421,9 +1421,9 @@ const v = class v {
|
|
|
1421
1421
|
* @param queryReturn custom function for reading data/ кастомная функция для чтения данных
|
|
1422
1422
|
* @param end finalization data/ данные финализации
|
|
1423
1423
|
*/
|
|
1424
|
-
static async readData(t, e,
|
|
1424
|
+
static async readData(t, e, s) {
|
|
1425
1425
|
var r;
|
|
1426
|
-
return e ? await e(t) : "data" in
|
|
1426
|
+
return e ? await e(t) : "data" in s ? s.data : ((r = t.headers.get("Content-Type")) != null ? r : "").match("application/json") ? await t.json() : { data: await t.text() };
|
|
1427
1427
|
}
|
|
1428
1428
|
/**
|
|
1429
1429
|
* Executing the request.
|
|
@@ -1433,19 +1433,19 @@ const v = class v {
|
|
|
1433
1433
|
*/
|
|
1434
1434
|
static async makeQuery(t) {
|
|
1435
1435
|
const e = this.requestDefault.request(t.request), {
|
|
1436
|
-
api:
|
|
1436
|
+
api: s = !0,
|
|
1437
1437
|
path: r = "",
|
|
1438
1438
|
pathFull: o = void 0,
|
|
1439
1439
|
method: a = L.get,
|
|
1440
1440
|
headers: u = {},
|
|
1441
1441
|
type: h = "application/json;charset=UTF-8",
|
|
1442
|
-
init:
|
|
1442
|
+
init: m = {},
|
|
1443
1443
|
controller: d = void 0
|
|
1444
|
-
} = t,
|
|
1444
|
+
} = t, S = o != null ? o : this.getUrl(r, s), G = `${S}${this.getBodyForGet(e, S, a)}`, Q = this.headers.get(u, h), Z = C(m, {
|
|
1445
1445
|
method: a,
|
|
1446
1446
|
body: this.getBody(e, a)
|
|
1447
1447
|
});
|
|
1448
|
-
return
|
|
1448
|
+
return Q && (Z.headers = Q), d && (Z.signal = d.signal), await fetch(G, Z);
|
|
1449
1449
|
}
|
|
1450
1450
|
/**
|
|
1451
1451
|
* Transforms data if needed.
|
|
@@ -1455,12 +1455,12 @@ const v = class v {
|
|
|
1455
1455
|
* @param toData is it necessary to process the data/ нужно ли обрабатывать данные
|
|
1456
1456
|
*/
|
|
1457
1457
|
static makeData(t, e) {
|
|
1458
|
-
if (!e || !t || !
|
|
1458
|
+
if (!e || !t || !A(t) || !("data" in t))
|
|
1459
1459
|
return t;
|
|
1460
1460
|
if (t.data !== null && typeof t.data != "object" || at(t.data))
|
|
1461
1461
|
return t.data;
|
|
1462
|
-
const
|
|
1463
|
-
return "success" in t && !("success" in
|
|
1462
|
+
const s = C(t.data);
|
|
1463
|
+
return "success" in t && !("success" in s) && (s.success = t.success), "status" in t && !("status" in s) && (s.status = t.status), "message" in t && !("message" in s) && (s.message = t.message), s;
|
|
1464
1464
|
}
|
|
1465
1465
|
/**
|
|
1466
1466
|
* Appends the status object to the response data if possible.
|
|
@@ -1470,21 +1470,22 @@ const v = class v {
|
|
|
1470
1470
|
* @param status status object/ объект статуса
|
|
1471
1471
|
*/
|
|
1472
1472
|
static makeStatus(t, e) {
|
|
1473
|
-
return t &&
|
|
1473
|
+
return t && A(t) ? {
|
|
1474
1474
|
...t,
|
|
1475
1475
|
statusObject: e.get()
|
|
1476
1476
|
} : t;
|
|
1477
1477
|
}
|
|
1478
1478
|
};
|
|
1479
|
-
c(
|
|
1480
|
-
let
|
|
1479
|
+
c(w, "url", "/api/"), c(w, "headers", new Zt()), c(w, "requestDefault", new Vt()), c(w, "status", new $t()), c(w, "response", new Yt(w.requestDefault)), c(w, "preparation", new qt());
|
|
1480
|
+
let H = w;
|
|
1481
1481
|
class Ee {
|
|
1482
1482
|
/**
|
|
1483
1483
|
* Constructor
|
|
1484
1484
|
* @param name channel name/ название канала
|
|
1485
1485
|
* @param callback callback on message received/ колбэк на получение сообщения
|
|
1486
|
+
* @param callbackError callback on message error/ колбэк на ошибку сообщения
|
|
1486
1487
|
*/
|
|
1487
|
-
constructor(t, e) {
|
|
1488
|
+
constructor(t, e, s) {
|
|
1488
1489
|
c(this, "channel");
|
|
1489
1490
|
/**
|
|
1490
1491
|
* Update state on message received.
|
|
@@ -1496,13 +1497,32 @@ class Ee {
|
|
|
1496
1497
|
var e;
|
|
1497
1498
|
return (e = this.callback) == null || e.call(this, t), this;
|
|
1498
1499
|
});
|
|
1499
|
-
|
|
1500
|
+
/**
|
|
1501
|
+
* Update error state on message error.
|
|
1502
|
+
*
|
|
1503
|
+
* Обновление состояния ошибки при получении ошибки сообщения.
|
|
1504
|
+
* @param event message error event/ событие ошибки сообщения
|
|
1505
|
+
*/
|
|
1506
|
+
c(this, "updateError", (t) => {
|
|
1507
|
+
var e;
|
|
1508
|
+
return (e = this.callbackError) == null || e.call(this, t), this;
|
|
1509
|
+
});
|
|
1510
|
+
if (this.callback = e, this.callbackError = s, l())
|
|
1500
1511
|
try {
|
|
1501
|
-
this.channel = new BroadcastChannel(`${Jt()}__${t}`), this.channel.onmessage = this.update;
|
|
1502
|
-
} catch (
|
|
1503
|
-
console.error(`BroadcastMessage ${t}:`,
|
|
1512
|
+
this.channel = new BroadcastChannel(`${Jt()}__${t}`), this.channel.onmessage = this.update, this.channel.onmessageerror = this.updateError;
|
|
1513
|
+
} catch (r) {
|
|
1514
|
+
console.error(`BroadcastMessage ${t}:`, r);
|
|
1504
1515
|
}
|
|
1505
1516
|
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Get the channel.
|
|
1519
|
+
*
|
|
1520
|
+
* Получить канал.
|
|
1521
|
+
* @returns channel/ канал
|
|
1522
|
+
*/
|
|
1523
|
+
getChannel() {
|
|
1524
|
+
return this.channel;
|
|
1525
|
+
}
|
|
1506
1526
|
/**
|
|
1507
1527
|
* Send a message to the channel.
|
|
1508
1528
|
*
|
|
@@ -1522,8 +1542,17 @@ class Ee {
|
|
|
1522
1542
|
setCallback(t) {
|
|
1523
1543
|
return this.callback = t, this;
|
|
1524
1544
|
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Set the callback function to be called when a message error occurs.
|
|
1547
|
+
*
|
|
1548
|
+
* Установить функцию колбэка, которая будет вызвана при возникновении ошибки сообщения.
|
|
1549
|
+
* @param callbackError callback function/ функция колбэка
|
|
1550
|
+
*/
|
|
1551
|
+
setCallbackError(t) {
|
|
1552
|
+
return this.callbackError = t, this;
|
|
1553
|
+
}
|
|
1525
1554
|
}
|
|
1526
|
-
const Jt = () => new
|
|
1555
|
+
const Jt = () => new T("__broadcast-name").get(() => `name_${q(1e6, 9999999)}`);
|
|
1527
1556
|
class Mt {
|
|
1528
1557
|
/**
|
|
1529
1558
|
* Constructor
|
|
@@ -1584,7 +1613,7 @@ class Mt {
|
|
|
1584
1613
|
* @param comparison additional data for comparison/ дополнительные данные для сравнения
|
|
1585
1614
|
*/
|
|
1586
1615
|
isUpdate(t) {
|
|
1587
|
-
return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e,
|
|
1616
|
+
return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
|
|
1588
1617
|
}
|
|
1589
1618
|
}
|
|
1590
1619
|
class Qt {
|
|
@@ -1599,8 +1628,8 @@ class Qt {
|
|
|
1599
1628
|
* @param callback function for the cache/ функция для кэша
|
|
1600
1629
|
* @param comparison additional data for comparison/ дополнительные данные для сравнения
|
|
1601
1630
|
*/
|
|
1602
|
-
get(t, e,
|
|
1603
|
-
return this.getCacheItem(t, e).getCache(
|
|
1631
|
+
get(t, e, s) {
|
|
1632
|
+
return this.getCacheItem(t, e).getCache(s != null ? s : []);
|
|
1604
1633
|
}
|
|
1605
1634
|
/**
|
|
1606
1635
|
* Getting data for the cache, and if there is no cache, it performs a function to save the cache (Async).
|
|
@@ -1610,8 +1639,8 @@ class Qt {
|
|
|
1610
1639
|
* @param callback function for the cache/ функция для кэша
|
|
1611
1640
|
* @param comparison additional data for comparison/ дополнительные данные для сравнения
|
|
1612
1641
|
*/
|
|
1613
|
-
async getAsync(t, e,
|
|
1614
|
-
return await this.getCacheItem(t, e).getCacheAsync(
|
|
1642
|
+
async getAsync(t, e, s) {
|
|
1643
|
+
return await this.getCacheItem(t, e).getCacheAsync(s != null ? s : []);
|
|
1615
1644
|
}
|
|
1616
1645
|
/**
|
|
1617
1646
|
* Returns an instance of the object for working with the cache element.
|
|
@@ -1624,7 +1653,7 @@ class Qt {
|
|
|
1624
1653
|
return t in this.cache || (this.cache[t] = new Mt(e)), this.cache[t];
|
|
1625
1654
|
}
|
|
1626
1655
|
}
|
|
1627
|
-
const
|
|
1656
|
+
const O = class O {
|
|
1628
1657
|
/**
|
|
1629
1658
|
* Getting data for the cache, and if there is no cache, it performs a function to save the cache.
|
|
1630
1659
|
*
|
|
@@ -1633,15 +1662,15 @@ const T = class T {
|
|
|
1633
1662
|
* @param callback function for the cache/ функция для кэша
|
|
1634
1663
|
* @param comparison additional data for comparison/ дополнительные данные для сравнения
|
|
1635
1664
|
*/
|
|
1636
|
-
static get(t, e,
|
|
1637
|
-
return this.cache.get(t, e,
|
|
1665
|
+
static get(t, e, s) {
|
|
1666
|
+
return this.cache.get(t, e, s);
|
|
1638
1667
|
}
|
|
1639
1668
|
};
|
|
1640
|
-
c(
|
|
1641
|
-
let
|
|
1642
|
-
function
|
|
1643
|
-
if (typeof
|
|
1644
|
-
const e =
|
|
1669
|
+
c(O, "cache"), O.cache = new Qt();
|
|
1670
|
+
let bt = O;
|
|
1671
|
+
function Rt(i, t = !1) {
|
|
1672
|
+
if (typeof i == "string") {
|
|
1673
|
+
const e = i.trim();
|
|
1645
1674
|
switch (e) {
|
|
1646
1675
|
case "undefined":
|
|
1647
1676
|
return;
|
|
@@ -1655,8 +1684,8 @@ function Ft(s, t = !1) {
|
|
|
1655
1684
|
if (/^[{[]/.exec(e))
|
|
1656
1685
|
try {
|
|
1657
1686
|
return JSON.parse(e);
|
|
1658
|
-
} catch (
|
|
1659
|
-
console.error("transformation: JSON error",
|
|
1687
|
+
} catch (s) {
|
|
1688
|
+
console.error("transformation: JSON error", s);
|
|
1660
1689
|
}
|
|
1661
1690
|
else {
|
|
1662
1691
|
if (/^[0-9]+\.[0-9.]+$/.exec(e))
|
|
@@ -1668,10 +1697,10 @@ function Ft(s, t = !1) {
|
|
|
1668
1697
|
}
|
|
1669
1698
|
}
|
|
1670
1699
|
}
|
|
1671
|
-
return
|
|
1700
|
+
return i;
|
|
1672
1701
|
}
|
|
1673
1702
|
const Xt = "cookie-block";
|
|
1674
|
-
class
|
|
1703
|
+
class xt {
|
|
1675
1704
|
/**
|
|
1676
1705
|
* Obtaining status.
|
|
1677
1706
|
*
|
|
@@ -1691,14 +1720,14 @@ class Rt {
|
|
|
1691
1720
|
this.storage.set(t);
|
|
1692
1721
|
}
|
|
1693
1722
|
}
|
|
1694
|
-
c(
|
|
1695
|
-
const
|
|
1723
|
+
c(xt, "storage", new T(Xt));
|
|
1724
|
+
const X = {}, lt = class lt {
|
|
1696
1725
|
constructor(t) {
|
|
1697
1726
|
c(this, "value");
|
|
1698
1727
|
c(this, "options", {});
|
|
1699
1728
|
if (this.name = t, t in et)
|
|
1700
1729
|
return et[t];
|
|
1701
|
-
this.value =
|
|
1730
|
+
this.value = X == null ? void 0 : X[t], et[t] = this;
|
|
1702
1731
|
}
|
|
1703
1732
|
/**
|
|
1704
1733
|
* Get data or update if none.
|
|
@@ -1743,13 +1772,13 @@ const _ = {}, lt = class lt {
|
|
|
1743
1772
|
* Обновление данных cookie.
|
|
1744
1773
|
*/
|
|
1745
1774
|
update() {
|
|
1746
|
-
var t, e,
|
|
1747
|
-
if (l() && !nt() && !
|
|
1775
|
+
var t, e, s, r, o;
|
|
1776
|
+
if (l() && !nt() && !xt.get()) {
|
|
1748
1777
|
const a = String((t = this.value) != null ? t : "");
|
|
1749
1778
|
document.cookie = [
|
|
1750
1779
|
`${encodeURIComponent(this.name)}=${encodeURIComponent(a)}`,
|
|
1751
1780
|
`max-age=${a === "" ? "-1" : this.getAge()}`,
|
|
1752
|
-
`SameSite=${(
|
|
1781
|
+
`SameSite=${(s = (e = this.options) == null ? void 0 : e.sameSite) != null ? s : "strict"}`,
|
|
1753
1782
|
...(o = (r = this.options) == null ? void 0 : r.arguments) != null ? o : []
|
|
1754
1783
|
].join("; ");
|
|
1755
1784
|
}
|
|
@@ -1761,43 +1790,43 @@ const _ = {}, lt = class lt {
|
|
|
1761
1790
|
*/
|
|
1762
1791
|
static updateData() {
|
|
1763
1792
|
for (const t of document.cookie.split(";")) {
|
|
1764
|
-
const [e,
|
|
1765
|
-
e &&
|
|
1793
|
+
const [e, s] = t.trim().split("=");
|
|
1794
|
+
e && v(s) && (X[e] = Rt(s));
|
|
1766
1795
|
}
|
|
1767
1796
|
}
|
|
1768
1797
|
};
|
|
1769
1798
|
l() && !nt() && lt.updateData();
|
|
1770
|
-
let
|
|
1799
|
+
let wt = lt;
|
|
1771
1800
|
const et = {};
|
|
1772
|
-
function F(
|
|
1773
|
-
var r, o, a, u, h,
|
|
1774
|
-
if (
|
|
1775
|
-
return
|
|
1776
|
-
if (
|
|
1801
|
+
function F(i) {
|
|
1802
|
+
var r, o, a, u, h, m, d, S;
|
|
1803
|
+
if (i instanceof Date)
|
|
1804
|
+
return i;
|
|
1805
|
+
if (J(i))
|
|
1777
1806
|
return /* @__PURE__ */ new Date();
|
|
1778
|
-
if (typeof
|
|
1779
|
-
return new Date(
|
|
1780
|
-
let t =
|
|
1781
|
-
|
|
1782
|
-
const
|
|
1783
|
-
return /* @__PURE__ */ new Date(`${
|
|
1807
|
+
if (typeof i == "number")
|
|
1808
|
+
return new Date(i);
|
|
1809
|
+
let t = i, e = p.getTimezoneFormat().trim();
|
|
1810
|
+
i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (G, Q, Z) => (t = Q, e = Z.trim(), G));
|
|
1811
|
+
const s = (S = (d = (m = (h = (u = (a = (o = (r = /^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) != null ? r : /^\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 ? m : /^\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 ? S : t.replace(" ", "T");
|
|
1812
|
+
return /* @__PURE__ */ new Date(`${s.trim()}${e}`);
|
|
1784
1813
|
}
|
|
1785
|
-
function _t(
|
|
1786
|
-
return g(
|
|
1814
|
+
function _t(i, t) {
|
|
1815
|
+
return g(i, (e) => e == null ? void 0 : e[t], !0);
|
|
1787
1816
|
}
|
|
1788
|
-
class
|
|
1817
|
+
class M {
|
|
1789
1818
|
/**
|
|
1790
1819
|
* Constructor
|
|
1791
1820
|
* @param code country code, full form language-country or one of them/
|
|
1792
1821
|
* код страны, полный вид язык-страна или один из них
|
|
1793
1822
|
*/
|
|
1794
|
-
constructor(t =
|
|
1823
|
+
constructor(t = p.getLocation()) {
|
|
1795
1824
|
c(this, "geo");
|
|
1796
|
-
this.geo =
|
|
1825
|
+
this.geo = p.find(t);
|
|
1797
1826
|
const e = this.getLocation();
|
|
1798
|
-
if (e in
|
|
1799
|
-
return
|
|
1800
|
-
|
|
1827
|
+
if (e in it)
|
|
1828
|
+
return it[e];
|
|
1829
|
+
it[e] = this;
|
|
1801
1830
|
}
|
|
1802
1831
|
/**
|
|
1803
1832
|
* Returns an instance of the class according to the specified country code.
|
|
@@ -1806,8 +1835,8 @@ class Q {
|
|
|
1806
1835
|
* @param code country code, full form language-country or one of them/
|
|
1807
1836
|
* код страны, полный вид язык-страна или один из них
|
|
1808
1837
|
*/
|
|
1809
|
-
static getInstance(t =
|
|
1810
|
-
return new
|
|
1838
|
+
static getInstance(t = p.getLocation()) {
|
|
1839
|
+
return new M(t);
|
|
1811
1840
|
}
|
|
1812
1841
|
/**
|
|
1813
1842
|
* Returns country code and language.
|
|
@@ -1835,13 +1864,13 @@ class Q {
|
|
|
1835
1864
|
*/
|
|
1836
1865
|
display(t, e) {
|
|
1837
1866
|
var o;
|
|
1838
|
-
let
|
|
1839
|
-
e && (typeof e == "string" ?
|
|
1840
|
-
...
|
|
1867
|
+
let s = { type: "language" }, r;
|
|
1868
|
+
e && (typeof e == "string" ? s.type = e : s = {
|
|
1869
|
+
...s,
|
|
1841
1870
|
...e
|
|
1842
1871
|
});
|
|
1843
1872
|
try {
|
|
1844
|
-
l() && (t ? r = new Intl.DisplayNames(this.getLocation(),
|
|
1873
|
+
l() && (t ? r = new Intl.DisplayNames(this.getLocation(), s).of(t) : s.type === "language" ? r = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.language) : s.type === "region" && (r = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.country)));
|
|
1845
1874
|
} catch (a) {
|
|
1846
1875
|
console.error("display: ", a);
|
|
1847
1876
|
}
|
|
@@ -1855,11 +1884,11 @@ class Q {
|
|
|
1855
1884
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
1856
1885
|
*/
|
|
1857
1886
|
languageName(t, e) {
|
|
1858
|
-
const
|
|
1887
|
+
const s = {
|
|
1859
1888
|
type: "language",
|
|
1860
1889
|
style: e
|
|
1861
1890
|
};
|
|
1862
|
-
return this.display(
|
|
1891
|
+
return this.display(p.getByCode(t).language, s);
|
|
1863
1892
|
}
|
|
1864
1893
|
/**
|
|
1865
1894
|
* Get display names of region.
|
|
@@ -1869,11 +1898,11 @@ class Q {
|
|
|
1869
1898
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
1870
1899
|
*/
|
|
1871
1900
|
countryName(t, e) {
|
|
1872
|
-
const
|
|
1901
|
+
const s = {
|
|
1873
1902
|
type: "region",
|
|
1874
1903
|
style: e
|
|
1875
1904
|
};
|
|
1876
|
-
return this.display(t,
|
|
1905
|
+
return this.display(t, s);
|
|
1877
1906
|
}
|
|
1878
1907
|
/**
|
|
1879
1908
|
* The method returns a string containing the full name in a specific format.
|
|
@@ -1884,19 +1913,19 @@ class Q {
|
|
|
1884
1913
|
* @param surname surname middle name (optional)/ отчество
|
|
1885
1914
|
* @param short shorten the names/ сократить названия
|
|
1886
1915
|
*/
|
|
1887
|
-
fullName(t, e,
|
|
1916
|
+
fullName(t, e, s, r) {
|
|
1888
1917
|
var u, h;
|
|
1889
1918
|
const o = (h = (u = this.geo) == null ? void 0 : u.nameFormat) != null ? h : "fl";
|
|
1890
1919
|
let a;
|
|
1891
1920
|
switch (o) {
|
|
1892
1921
|
case "fsl":
|
|
1893
|
-
a = `${e}${
|
|
1922
|
+
a = `${e}${s ? ` ${s}` : ""} ${t}`;
|
|
1894
1923
|
break;
|
|
1895
1924
|
case "lf":
|
|
1896
1925
|
a = `${t} ${e}`;
|
|
1897
1926
|
break;
|
|
1898
1927
|
case "lsf":
|
|
1899
|
-
a = `${t}${
|
|
1928
|
+
a = `${t}${s ? ` ${s}` : ""} ${e}`;
|
|
1900
1929
|
break;
|
|
1901
1930
|
default:
|
|
1902
1931
|
a = `${e} ${t}`;
|
|
@@ -1913,8 +1942,8 @@ class Q {
|
|
|
1913
1942
|
* или всеми свойствами
|
|
1914
1943
|
*/
|
|
1915
1944
|
number(t, e) {
|
|
1916
|
-
var
|
|
1917
|
-
return ((r = (
|
|
1945
|
+
var s, r;
|
|
1946
|
+
return ((r = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : r.call(s, k(t))) || t.toString();
|
|
1918
1947
|
}
|
|
1919
1948
|
/**
|
|
1920
1949
|
* Decimal point symbol.
|
|
@@ -1922,8 +1951,8 @@ class Q {
|
|
|
1922
1951
|
* Символ десятичной точки.
|
|
1923
1952
|
*/
|
|
1924
1953
|
decimal() {
|
|
1925
|
-
var t, e,
|
|
1926
|
-
return ((o = (r = (
|
|
1954
|
+
var t, e, s, r, o;
|
|
1955
|
+
return ((o = (r = (s = (e = (t = this.numberObject()) == null ? void 0 : t.formatToParts) == null ? void 0 : e.call(t, 1.2)) == null ? void 0 : s.find) == null ? void 0 : r.call(s, (a) => a.type === "decimal")) == null ? void 0 : o.value) || ".";
|
|
1927
1956
|
}
|
|
1928
1957
|
/**
|
|
1929
1958
|
* Currency formatting.
|
|
@@ -1934,13 +1963,13 @@ class Q {
|
|
|
1934
1963
|
* валюта для использования в форматировании валюты
|
|
1935
1964
|
* @param numberOnly do not display the currency symbol/ не выводить значок валюты
|
|
1936
1965
|
*/
|
|
1937
|
-
currency(t, e,
|
|
1966
|
+
currency(t, e, s = !1) {
|
|
1938
1967
|
const r = {
|
|
1939
1968
|
style: "currency",
|
|
1940
1969
|
currencyDisplay: "symbol",
|
|
1941
1970
|
...typeof e == "string" ? { currency: e } : e || {}
|
|
1942
1971
|
}, o = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...a) => (r.currency = String(a[2]).toUpperCase(), String(a[1])));
|
|
1943
|
-
if (
|
|
1972
|
+
if (s) {
|
|
1944
1973
|
const a = this.numberObject(r);
|
|
1945
1974
|
return a ? _t(
|
|
1946
1975
|
a.formatToParts(k(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
|
|
@@ -1967,12 +1996,12 @@ class Q {
|
|
|
1967
1996
|
* как отобразить валюту в формате валюты
|
|
1968
1997
|
*/
|
|
1969
1998
|
currencySymbol(t, e = "symbol") {
|
|
1970
|
-
var
|
|
1971
|
-
return ((u = (a = (o = (r = (
|
|
1999
|
+
var s, r, o, a, u;
|
|
2000
|
+
return ((u = (a = (o = (r = (s = this.numberObject({
|
|
1972
2001
|
style: "currency",
|
|
1973
2002
|
currencyDisplay: e,
|
|
1974
2003
|
currency: t
|
|
1975
|
-
})) == null ? void 0 :
|
|
2004
|
+
})) == null ? void 0 : s.formatToParts) == null ? void 0 : r.call(s, 100)) == null ? void 0 : o.find) == null ? void 0 : a.call(o, (h) => h.type === "currency")) == null ? void 0 : u.value) || t;
|
|
1976
2005
|
}
|
|
1977
2006
|
/**
|
|
1978
2007
|
* Unit formatting.
|
|
@@ -1984,11 +2013,11 @@ class Q {
|
|
|
1984
2013
|
* в форматировании блока
|
|
1985
2014
|
*/
|
|
1986
2015
|
unit(t, e) {
|
|
1987
|
-
const
|
|
2016
|
+
const s = {
|
|
1988
2017
|
style: "unit",
|
|
1989
2018
|
...typeof e == "string" ? { unit: e } : e || {}
|
|
1990
|
-
}, r = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...o) => (
|
|
1991
|
-
return this.number(r,
|
|
2019
|
+
}, r = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...o) => (s.unit = String(o[2]).toLowerCase(), String(o[1])));
|
|
2020
|
+
return this.number(r, s);
|
|
1992
2021
|
}
|
|
1993
2022
|
/**
|
|
1994
2023
|
* Возвращает отформатированный размер файла
|
|
@@ -1997,19 +2026,19 @@ class Q {
|
|
|
1997
2026
|
* в форматировании блока
|
|
1998
2027
|
*/
|
|
1999
2028
|
sizeFile(t, e = "byte") {
|
|
2000
|
-
const
|
|
2001
|
-
if (
|
|
2029
|
+
const s = k(t);
|
|
2030
|
+
if (s > 1024 && x(e))
|
|
2002
2031
|
switch (e) {
|
|
2003
2032
|
case "byte":
|
|
2004
|
-
return this.sizeFile(
|
|
2033
|
+
return this.sizeFile(s / 1024, "kilobyte");
|
|
2005
2034
|
case "kilobyte":
|
|
2006
|
-
return this.sizeFile(
|
|
2035
|
+
return this.sizeFile(s / 1024, "megabyte");
|
|
2007
2036
|
case "megabyte":
|
|
2008
|
-
return this.sizeFile(
|
|
2037
|
+
return this.sizeFile(s / 1024, "gigabyte");
|
|
2009
2038
|
case "gigabyte":
|
|
2010
|
-
return this.sizeFile(
|
|
2039
|
+
return this.sizeFile(s / 1024, "terabyte");
|
|
2011
2040
|
case "terabyte":
|
|
2012
|
-
return this.sizeFile(
|
|
2041
|
+
return this.sizeFile(s / 1024, "petabyte");
|
|
2013
2042
|
}
|
|
2014
2043
|
return this.unit(t, e);
|
|
2015
2044
|
}
|
|
@@ -2045,15 +2074,15 @@ class Q {
|
|
|
2045
2074
|
* @param options Property for PluralRules/ свойство для PluralRules
|
|
2046
2075
|
* @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
2047
2076
|
*/
|
|
2048
|
-
plural(t, e,
|
|
2077
|
+
plural(t, e, s, r) {
|
|
2049
2078
|
var u;
|
|
2050
2079
|
const o = k(t), a = e.split("|");
|
|
2051
2080
|
if (a.length > 1)
|
|
2052
2081
|
try {
|
|
2053
2082
|
if (l()) {
|
|
2054
|
-
const
|
|
2083
|
+
const m = new Intl.PluralRules(this.getLocation(), s).select(o);
|
|
2055
2084
|
let d;
|
|
2056
|
-
switch (
|
|
2085
|
+
switch (m) {
|
|
2057
2086
|
case "zero":
|
|
2058
2087
|
d = a[a.length - 1];
|
|
2059
2088
|
break;
|
|
@@ -2089,9 +2118,9 @@ class Q {
|
|
|
2089
2118
|
* @param styleOptions the representation of the month/ представление месяца
|
|
2090
2119
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
2091
2120
|
*/
|
|
2092
|
-
date(t, e,
|
|
2093
|
-
const o = F(t), a = typeof
|
|
2094
|
-
return r && (u.hour12 = !1), a || Object.assign(u,
|
|
2121
|
+
date(t, e, s, r) {
|
|
2122
|
+
const o = F(t), a = typeof s == "string", u = this.dateOptions(e, a ? s : "short");
|
|
2123
|
+
return r && (u.hour12 = !1), a || Object.assign(u, s), o.toLocaleString(this.getLocation(), u);
|
|
2095
2124
|
}
|
|
2096
2125
|
/**
|
|
2097
2126
|
* Enables language-sensitive relative time formatting.
|
|
@@ -2102,8 +2131,8 @@ class Q {
|
|
|
2102
2131
|
* длина интернационализированного сообщения
|
|
2103
2132
|
* @param todayValue current day/ текущий день
|
|
2104
2133
|
*/
|
|
2105
|
-
relative(t, e,
|
|
2106
|
-
const r = F(t), o =
|
|
2134
|
+
relative(t, e, s) {
|
|
2135
|
+
const r = F(t), o = s || /* @__PURE__ */ new Date(), a = {
|
|
2107
2136
|
numeric: "auto",
|
|
2108
2137
|
...typeof e == "string" ? { style: e } : e || {}
|
|
2109
2138
|
};
|
|
@@ -2128,12 +2157,12 @@ class Q {
|
|
|
2128
2157
|
* @param type type of data format/ тип формата data
|
|
2129
2158
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
2130
2159
|
*/
|
|
2131
|
-
relativeLimit(t, e,
|
|
2132
|
-
const h = F(t),
|
|
2133
|
-
return d.setDate(
|
|
2160
|
+
relativeLimit(t, e, s, r, o, a, u) {
|
|
2161
|
+
const h = F(t), m = s || /* @__PURE__ */ new Date(), d = new Date(m), S = new Date(m);
|
|
2162
|
+
return d.setDate(m.getDate() - e), S.setDate(m.getDate() + e), h >= d && h <= S ? this.relative(
|
|
2134
2163
|
h,
|
|
2135
2164
|
r,
|
|
2136
|
-
|
|
2165
|
+
m
|
|
2137
2166
|
) : this.date(
|
|
2138
2167
|
h,
|
|
2139
2168
|
a,
|
|
@@ -2147,10 +2176,10 @@ class Q {
|
|
|
2147
2176
|
* @param unit time unit/ единица времени
|
|
2148
2177
|
* @param styleOptions additional option or formatting style/ дополнительная опция или стиль форматирования
|
|
2149
2178
|
*/
|
|
2150
|
-
relativeByValue(t, e,
|
|
2179
|
+
relativeByValue(t, e, s) {
|
|
2151
2180
|
const r = {
|
|
2152
2181
|
numeric: "auto",
|
|
2153
|
-
...typeof
|
|
2182
|
+
...typeof s == "string" ? { style: s } : s || {}
|
|
2154
2183
|
};
|
|
2155
2184
|
try {
|
|
2156
2185
|
if (l())
|
|
@@ -2170,8 +2199,8 @@ class Q {
|
|
|
2170
2199
|
try {
|
|
2171
2200
|
if (l())
|
|
2172
2201
|
return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(F(t));
|
|
2173
|
-
} catch (
|
|
2174
|
-
console.error("month: ",
|
|
2202
|
+
} catch (s) {
|
|
2203
|
+
console.error("month: ", s);
|
|
2175
2204
|
}
|
|
2176
2205
|
return "";
|
|
2177
2206
|
}
|
|
@@ -2188,15 +2217,15 @@ class Q {
|
|
|
2188
2217
|
}];
|
|
2189
2218
|
try {
|
|
2190
2219
|
if (l()) {
|
|
2191
|
-
const
|
|
2220
|
+
const s = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { month: t || "long" });
|
|
2192
2221
|
for (let o = 0; o < 12; o++)
|
|
2193
|
-
|
|
2194
|
-
label: r.format(
|
|
2222
|
+
s.setMonth(o), e.push({
|
|
2223
|
+
label: r.format(s).replace(/^./, (a) => a.toUpperCase()),
|
|
2195
2224
|
value: o + 1
|
|
2196
2225
|
});
|
|
2197
2226
|
}
|
|
2198
|
-
} catch (
|
|
2199
|
-
console.error("months: ",
|
|
2227
|
+
} catch (s) {
|
|
2228
|
+
console.error("months: ", s);
|
|
2200
2229
|
}
|
|
2201
2230
|
return e;
|
|
2202
2231
|
}
|
|
@@ -2211,8 +2240,8 @@ class Q {
|
|
|
2211
2240
|
try {
|
|
2212
2241
|
if (l())
|
|
2213
2242
|
return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(F(t));
|
|
2214
|
-
} catch (
|
|
2215
|
-
console.error("weekday: ",
|
|
2243
|
+
} catch (s) {
|
|
2244
|
+
console.error("weekday: ", s);
|
|
2216
2245
|
}
|
|
2217
2246
|
return "";
|
|
2218
2247
|
}
|
|
@@ -2229,16 +2258,16 @@ class Q {
|
|
|
2229
2258
|
}];
|
|
2230
2259
|
try {
|
|
2231
2260
|
if (l()) {
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2261
|
+
const s = /* @__PURE__ */ new Date(), r = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), o = s.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
|
|
2262
|
+
s.setDate(s.getDate() - o);
|
|
2234
2263
|
for (let a = 0; a < 7; a++)
|
|
2235
2264
|
e.push({
|
|
2236
|
-
label: r.format(
|
|
2237
|
-
value:
|
|
2238
|
-
}),
|
|
2265
|
+
label: r.format(s).replace(/^./, (u) => u.toUpperCase()),
|
|
2266
|
+
value: s.getDay()
|
|
2267
|
+
}), s.setDate(s.getDate() + 1);
|
|
2239
2268
|
}
|
|
2240
|
-
} catch (
|
|
2241
|
-
console.error("weekdays: ",
|
|
2269
|
+
} catch (s) {
|
|
2270
|
+
console.error("weekdays: ", s);
|
|
2242
2271
|
}
|
|
2243
2272
|
return e;
|
|
2244
2273
|
}
|
|
@@ -2258,10 +2287,10 @@ class Q {
|
|
|
2258
2287
|
* @param data an array with data/ массив с данными
|
|
2259
2288
|
* @param compareFn a function for sorting/ функция для сортировки
|
|
2260
2289
|
*/
|
|
2261
|
-
sort(t, e = (
|
|
2290
|
+
sort(t, e = (s, r) => [s, r]) {
|
|
2262
2291
|
if (l()) {
|
|
2263
|
-
const
|
|
2264
|
-
return t.sort((r, o) =>
|
|
2292
|
+
const s = new Intl.Collator(this.getLocation());
|
|
2293
|
+
return t.sort((r, o) => s.compare(...e(r, o)));
|
|
2265
2294
|
}
|
|
2266
2295
|
return t;
|
|
2267
2296
|
}
|
|
@@ -2288,11 +2317,11 @@ class Q {
|
|
|
2288
2317
|
* @param display the representation of the month/ представление месяца
|
|
2289
2318
|
*/
|
|
2290
2319
|
dateOptions(t, e = "short") {
|
|
2291
|
-
const
|
|
2292
|
-
return ["full", "datetime", "date", void 0, "year-month", "year"].indexOf(t) !== -1 && (
|
|
2320
|
+
const s = {};
|
|
2321
|
+
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;
|
|
2293
2322
|
}
|
|
2294
2323
|
}
|
|
2295
|
-
const
|
|
2324
|
+
const it = {};
|
|
2296
2325
|
class ut {
|
|
2297
2326
|
/**
|
|
2298
2327
|
* Constructor
|
|
@@ -2300,11 +2329,11 @@ class ut {
|
|
|
2300
2329
|
* @param type type of date format for output/ тип формата даты вывода
|
|
2301
2330
|
* @param code country and language code/ код страны и языка
|
|
2302
2331
|
*/
|
|
2303
|
-
constructor(t, e = "date",
|
|
2332
|
+
constructor(t, e = "date", s = p.getLocation()) {
|
|
2304
2333
|
c(this, "date");
|
|
2305
2334
|
c(this, "hour24", !1);
|
|
2306
2335
|
c(this, "watch");
|
|
2307
|
-
this.type = e, this.code =
|
|
2336
|
+
this.type = e, this.code = s, this.date = F(t);
|
|
2308
2337
|
}
|
|
2309
2338
|
/**
|
|
2310
2339
|
* Returns an object for working with formatting.
|
|
@@ -2312,7 +2341,7 @@ class ut {
|
|
|
2312
2341
|
* Возвращает объект для работы с форматированием.
|
|
2313
2342
|
*/
|
|
2314
2343
|
getIntl() {
|
|
2315
|
-
return new
|
|
2344
|
+
return new M(this.code);
|
|
2316
2345
|
}
|
|
2317
2346
|
/**
|
|
2318
2347
|
* Returns a Date object.
|
|
@@ -2368,10 +2397,10 @@ class ut {
|
|
|
2368
2397
|
const e = this.getTimeZoneOffset();
|
|
2369
2398
|
if (t === "minute")
|
|
2370
2399
|
return e.toString();
|
|
2371
|
-
const
|
|
2400
|
+
const s = e / 60 * -1;
|
|
2372
2401
|
if (t === "hour")
|
|
2373
|
-
return this.getIntl().number(Math.trunc(
|
|
2374
|
-
const r = this.toTimeZoneHourFormat(
|
|
2402
|
+
return this.getIntl().number(Math.trunc(s), { signDisplay: "always" });
|
|
2403
|
+
const r = this.toTimeZoneHourFormat(s), o = s.toString().match(/.\d+/) ? "30" : "00";
|
|
2375
2404
|
return t === "RFC" ? `${r}${o}` : `${r}:${o}`;
|
|
2376
2405
|
}
|
|
2377
2406
|
/**
|
|
@@ -2517,13 +2546,13 @@ class ut {
|
|
|
2517
2546
|
* @param timeZone add time zone/ добавить временную зону
|
|
2518
2547
|
*/
|
|
2519
2548
|
standard(t = !0) {
|
|
2520
|
-
const e = new ut(this.date, this.type, "en-GB"),
|
|
2549
|
+
const e = new ut(this.date, this.type, "en-GB"), s = [];
|
|
2521
2550
|
let r;
|
|
2522
2551
|
return e.setHour24(!0), this.type === "hour-minute" ? r = e.locale(this.type, {
|
|
2523
2552
|
year: "numeric",
|
|
2524
2553
|
month: "2-digit",
|
|
2525
2554
|
hour12: !1
|
|
2526
|
-
}) : (["full", "datetime", "date", "year-month", "year", "month", "day"].indexOf(this.type) !== -1 && (
|
|
2555
|
+
}) : (["full", "datetime", "date", "year-month", "year", "month", "day"].indexOf(this.type) !== -1 && (s.push(e.localeYear()), s.push(e.localeMonth("2-digit"))), ["full", "datetime", "date", "year", "month", "day"].indexOf(this.type) !== -1 && s.push(e.localeDay("2-digit")), ["full", "datetime", "time", "hour", "minute", "second"].indexOf(this.type) !== -1 && (r = e.locale("time"))), `${s.join("-")}${r ? `T${r}${t ? e.getTimeZone() : ""}` : ""}`;
|
|
2527
2556
|
}
|
|
2528
2557
|
/**
|
|
2529
2558
|
* Change the date completely.
|
|
@@ -2956,87 +2985,12 @@ class ut {
|
|
|
2956
2985
|
), this;
|
|
2957
2986
|
}
|
|
2958
2987
|
}
|
|
2959
|
-
class
|
|
2960
|
-
/**
|
|
2961
|
-
* Constructor
|
|
2962
|
-
* @param element HTML element to capture/ HTML элемент для захвата
|
|
2963
|
-
*/
|
|
2964
|
-
constructor(t) {
|
|
2965
|
-
this.element = t;
|
|
2966
|
-
}
|
|
2967
|
-
/**
|
|
2968
|
-
* Takes a screenshot of the element.
|
|
2969
|
-
*
|
|
2970
|
-
* Делает скриншот элемента.
|
|
2971
|
-
*/
|
|
2972
|
-
take() {
|
|
2973
|
-
return new Promise((t, e) => {
|
|
2974
|
-
const {
|
|
2975
|
-
width: i,
|
|
2976
|
-
height: r
|
|
2977
|
-
} = this.element.getBoundingClientRect();
|
|
2978
|
-
if (i === 0 || r === 0)
|
|
2979
|
-
return e(new Error("Element has no dimensions"));
|
|
2980
|
-
const o = document.createElement("canvas"), a = o.getContext("2d");
|
|
2981
|
-
if (!a)
|
|
2982
|
-
return e(new Error("Could not get canvas context"));
|
|
2983
|
-
const u = window.devicePixelRatio || 1;
|
|
2984
|
-
o.width = i * u, o.height = r * u, o.style.width = `${i}px`, o.style.height = `${r}px`, a.scale(u, u);
|
|
2985
|
-
const h = this.getStyles(), f = this.element.outerHTML, d = `
|
|
2986
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${r}">
|
|
2987
|
-
<foreignObject x="0" y="0" width="100%" height="100%">
|
|
2988
|
-
<style>${h}</style>
|
|
2989
|
-
<div xmlns="http://www.w3.org/1999/xhtml">${f}</div>
|
|
2990
|
-
</foreignObject>
|
|
2991
|
-
</svg>
|
|
2992
|
-
`, y = new Image(), W = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(d)));
|
|
2993
|
-
y.onload = () => {
|
|
2994
|
-
a.drawImage(y, 0, 0, i, r), t(o.toDataURL("image/png"));
|
|
2995
|
-
}, y.onerror = (x) => {
|
|
2996
|
-
console.error("Screenshot failed", {
|
|
2997
|
-
error: x,
|
|
2998
|
-
svg: d
|
|
2999
|
-
}), e(new Error("Failed to load SVG image for screenshot. See console for details."));
|
|
3000
|
-
}, y.src = W;
|
|
3001
|
-
});
|
|
3002
|
-
}
|
|
3003
|
-
/**
|
|
3004
|
-
* Takes a screenshot and downloads it.
|
|
3005
|
-
*
|
|
3006
|
-
* Делает скриншот и скачивает его.
|
|
3007
|
-
* @param filename name of the file to download/ имя файла для скачивания
|
|
3008
|
-
*/
|
|
3009
|
-
async download(t = "screenshot.png") {
|
|
3010
|
-
const e = await this.take(), i = document.createElement("a");
|
|
3011
|
-
i.href = e, i.download = t, document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
3012
|
-
}
|
|
3013
|
-
/**
|
|
3014
|
-
* Gathers all CSS styles from the document's stylesheets.
|
|
3015
|
-
*
|
|
3016
|
-
* Собирает все стили CSS из таблиц стилей документа.
|
|
3017
|
-
*/
|
|
3018
|
-
getStyles() {
|
|
3019
|
-
let t = "";
|
|
3020
|
-
try {
|
|
3021
|
-
for (const e of Array.from(document.styleSheets))
|
|
3022
|
-
try {
|
|
3023
|
-
for (const i of Array.from(e.cssRules))
|
|
3024
|
-
t += i.cssText;
|
|
3025
|
-
} catch (i) {
|
|
3026
|
-
console.warn("Could not read CSS rules from a stylesheet due to CORS.", i);
|
|
3027
|
-
}
|
|
3028
|
-
} catch (e) {
|
|
3029
|
-
console.error("Could not access stylesheets.", e);
|
|
3030
|
-
}
|
|
3031
|
-
return t;
|
|
3032
|
-
}
|
|
3033
|
-
}
|
|
3034
|
-
const n = "f", j = class j {
|
|
2988
|
+
const n = "f", W = class W {
|
|
3035
2989
|
/**
|
|
3036
2990
|
* Constructor
|
|
3037
2991
|
* @param code country and language code/ код страны и языка
|
|
3038
2992
|
*/
|
|
3039
|
-
constructor(t =
|
|
2993
|
+
constructor(t = p.getLocation()) {
|
|
3040
2994
|
this.code = t;
|
|
3041
2995
|
}
|
|
3042
2996
|
/**
|
|
@@ -3046,15 +3000,15 @@ const n = "f", j = class j {
|
|
|
3046
3000
|
* @param code country code/ код страны
|
|
3047
3001
|
*/
|
|
3048
3002
|
get(t = this.code) {
|
|
3049
|
-
var
|
|
3050
|
-
const e =
|
|
3003
|
+
var s;
|
|
3004
|
+
const e = p.find(t);
|
|
3051
3005
|
if (e) {
|
|
3052
3006
|
const r = this.getCountry(e);
|
|
3053
3007
|
return {
|
|
3054
3008
|
language: this.getLanguage(e),
|
|
3055
3009
|
country: r,
|
|
3056
3010
|
standard: e.standard,
|
|
3057
|
-
icon: (
|
|
3011
|
+
icon: (s = W.flags) == null ? void 0 : s[e.country],
|
|
3058
3012
|
label: r,
|
|
3059
3013
|
value: e.country
|
|
3060
3014
|
};
|
|
@@ -3087,12 +3041,12 @@ const n = "f", j = class j {
|
|
|
3087
3041
|
*/
|
|
3088
3042
|
getNational(t) {
|
|
3089
3043
|
return g(this.getList(t), (e) => {
|
|
3090
|
-
const
|
|
3044
|
+
const s = new W(e.standard).get(e.standard);
|
|
3091
3045
|
return {
|
|
3092
3046
|
...e,
|
|
3093
|
-
description:
|
|
3094
|
-
nationalLanguage:
|
|
3095
|
-
nationalCountry:
|
|
3047
|
+
description: s == null ? void 0 : s.country,
|
|
3048
|
+
nationalLanguage: s == null ? void 0 : s.language,
|
|
3049
|
+
nationalCountry: s == null ? void 0 : s.country
|
|
3096
3050
|
};
|
|
3097
3051
|
});
|
|
3098
3052
|
}
|
|
@@ -3111,7 +3065,7 @@ const n = "f", j = class j {
|
|
|
3111
3065
|
* Возвращает специальный объект для работы с форматированием.
|
|
3112
3066
|
*/
|
|
3113
3067
|
getLocation() {
|
|
3114
|
-
return new
|
|
3068
|
+
return new M(this.code);
|
|
3115
3069
|
}
|
|
3116
3070
|
/**
|
|
3117
3071
|
* Returns a list of countries to retrieve data from.
|
|
@@ -3120,7 +3074,7 @@ const n = "f", j = class j {
|
|
|
3120
3074
|
* @param codes country code/ код страны
|
|
3121
3075
|
*/
|
|
3122
3076
|
getCodes(t) {
|
|
3123
|
-
return t != null ? t : Object.keys(
|
|
3077
|
+
return t != null ? t : Object.keys(W.flags);
|
|
3124
3078
|
}
|
|
3125
3079
|
/**
|
|
3126
3080
|
* Getting the name of the language.
|
|
@@ -3141,7 +3095,7 @@ const n = "f", j = class j {
|
|
|
3141
3095
|
return this.getLocation().countryName(t.country);
|
|
3142
3096
|
}
|
|
3143
3097
|
};
|
|
3144
|
-
c(
|
|
3098
|
+
c(W, "flags", {
|
|
3145
3099
|
AD: `${n}-ad`,
|
|
3146
3100
|
AE: `${n}-ae`,
|
|
3147
3101
|
AF: `${n}-af`,
|
|
@@ -3384,8 +3338,8 @@ c(j, "flags", {
|
|
|
3384
3338
|
ZM: `${n}-zm`,
|
|
3385
3339
|
ZW: `${n}-zw`
|
|
3386
3340
|
});
|
|
3387
|
-
let vt =
|
|
3388
|
-
const
|
|
3341
|
+
let vt = W;
|
|
3342
|
+
const j = class j {
|
|
3389
3343
|
/**
|
|
3390
3344
|
* Getting an object with information about the phone code and country.
|
|
3391
3345
|
*
|
|
@@ -3402,12 +3356,12 @@ const H = class H {
|
|
|
3402
3356
|
* @param phone phone number/ номер телефон
|
|
3403
3357
|
*/
|
|
3404
3358
|
static getByPhone(t) {
|
|
3405
|
-
let e = this.map,
|
|
3359
|
+
let e = this.map, s, r = "";
|
|
3406
3360
|
return this.toNumber(t).forEach((o) => {
|
|
3407
3361
|
var a;
|
|
3408
|
-
r === "" && o in e ? (
|
|
3362
|
+
r === "" && o in e ? (s = e[o], e = (a = s == null ? void 0 : s.next) != null ? a : {}) : r += o;
|
|
3409
3363
|
}), {
|
|
3410
|
-
item:
|
|
3364
|
+
item: s,
|
|
3411
3365
|
phone: r
|
|
3412
3366
|
};
|
|
3413
3367
|
}
|
|
@@ -3418,10 +3372,10 @@ const H = class H {
|
|
|
3418
3372
|
* @param code country and language code/ код страны и языка
|
|
3419
3373
|
*/
|
|
3420
3374
|
static getByCode(t) {
|
|
3421
|
-
var
|
|
3375
|
+
var s;
|
|
3422
3376
|
const e = this.get(t);
|
|
3423
3377
|
if (e)
|
|
3424
|
-
return (
|
|
3378
|
+
return (s = this.getByPhone(e.phone.toString())) == null ? void 0 : s.item;
|
|
3425
3379
|
}
|
|
3426
3380
|
/**
|
|
3427
3381
|
* We get an array from a list of all phone numbers.
|
|
@@ -3447,11 +3401,11 @@ const H = class H {
|
|
|
3447
3401
|
* @param masks a mask to transform a phone number/ маска для преобразования номер телефон
|
|
3448
3402
|
*/
|
|
3449
3403
|
static toMask(t, e) {
|
|
3450
|
-
if (
|
|
3451
|
-
const
|
|
3404
|
+
if (v(t) && Array.isArray(e) && e.length > 0) {
|
|
3405
|
+
const s = this.removeZero(t), r = s.length;
|
|
3452
3406
|
for (const o of e)
|
|
3453
3407
|
if (this.getUnnecessaryLength(o) === r)
|
|
3454
|
-
return this.toStandard(
|
|
3408
|
+
return this.toStandard(s, o);
|
|
3455
3409
|
}
|
|
3456
3410
|
}
|
|
3457
3411
|
/**
|
|
@@ -3495,16 +3449,16 @@ const H = class H {
|
|
|
3495
3449
|
* Формирование списка для карты.
|
|
3496
3450
|
*/
|
|
3497
3451
|
static makeList() {
|
|
3498
|
-
const t = g(
|
|
3452
|
+
const t = g(p.getList(), (e) => {
|
|
3499
3453
|
if (e != null && e.phoneMask)
|
|
3500
3454
|
return {
|
|
3501
3455
|
phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
|
|
3502
3456
|
within: (e == null ? void 0 : e.phoneWithin) || 0,
|
|
3503
|
-
mask:
|
|
3457
|
+
mask: z(e.phoneMask),
|
|
3504
3458
|
value: e.country
|
|
3505
3459
|
};
|
|
3506
3460
|
});
|
|
3507
|
-
this.list = t.sort((e,
|
|
3461
|
+
this.list = t.sort((e, s) => e.phone - s.phone);
|
|
3508
3462
|
}
|
|
3509
3463
|
/**
|
|
3510
3464
|
* Creating a map for search.
|
|
@@ -3514,17 +3468,17 @@ const H = class H {
|
|
|
3514
3468
|
static makeMap() {
|
|
3515
3469
|
this.list.forEach((t) => {
|
|
3516
3470
|
t.mask.forEach((e) => {
|
|
3517
|
-
let
|
|
3471
|
+
let s = this.map, r;
|
|
3518
3472
|
if (this.toNumber(e).forEach((o) => {
|
|
3519
3473
|
var a;
|
|
3520
|
-
o in
|
|
3474
|
+
o in s || (s[o] = {
|
|
3521
3475
|
items: [],
|
|
3522
3476
|
info: void 0,
|
|
3523
3477
|
value: void 0,
|
|
3524
3478
|
mask: [],
|
|
3525
3479
|
maskFull: [],
|
|
3526
3480
|
next: {}
|
|
3527
|
-
}), r =
|
|
3481
|
+
}), r = s[o], s = (a = r == null ? void 0 : r.next) != null ? a : {};
|
|
3528
3482
|
}), r) {
|
|
3529
3483
|
r.value === void 0 && (r.info = t, r.value = t.value);
|
|
3530
3484
|
const o = this.toWithin(e, t.within);
|
|
@@ -3550,8 +3504,8 @@ const H = class H {
|
|
|
3550
3504
|
* @param mask a mask to transform a phone number/ маска для преобразования номер телефон
|
|
3551
3505
|
*/
|
|
3552
3506
|
static toStandard(t, e) {
|
|
3553
|
-
let
|
|
3554
|
-
return e.replace(/\*/ig, () => String(t[
|
|
3507
|
+
let s = 0;
|
|
3508
|
+
return e.replace(/\*/ig, () => String(t[s++]));
|
|
3555
3509
|
}
|
|
3556
3510
|
/**
|
|
3557
3511
|
* Replaces the first character with the internal country code
|
|
@@ -3564,9 +3518,9 @@ const H = class H {
|
|
|
3564
3518
|
return t.replace(/\*/, this.getWithinSymbol(e));
|
|
3565
3519
|
}
|
|
3566
3520
|
};
|
|
3567
|
-
c(
|
|
3568
|
-
let St =
|
|
3569
|
-
class
|
|
3521
|
+
c(j, "list", []), c(j, "map", {}), j.makeList(), j.makeMap();
|
|
3522
|
+
let St = j, P;
|
|
3523
|
+
class Be {
|
|
3570
3524
|
/**
|
|
3571
3525
|
* Returns the value by its name.
|
|
3572
3526
|
*
|
|
@@ -3574,7 +3528,7 @@ class Ie {
|
|
|
3574
3528
|
* @param name property name/ название свойства
|
|
3575
3529
|
*/
|
|
3576
3530
|
static get(t) {
|
|
3577
|
-
return
|
|
3531
|
+
return P && (P == null ? void 0 : P[t]);
|
|
3578
3532
|
}
|
|
3579
3533
|
/**
|
|
3580
3534
|
* Adds data, this method works only once.
|
|
@@ -3583,7 +3537,7 @@ class Ie {
|
|
|
3583
3537
|
* @param data global data/ глобальные данные
|
|
3584
3538
|
*/
|
|
3585
3539
|
static add(t) {
|
|
3586
|
-
|
|
3540
|
+
P === void 0 && (P = C(t));
|
|
3587
3541
|
}
|
|
3588
3542
|
}
|
|
3589
3543
|
const R = class R {
|
|
@@ -3606,8 +3560,8 @@ const R = class R {
|
|
|
3606
3560
|
*/
|
|
3607
3561
|
static set(t, e) {
|
|
3608
3562
|
var r;
|
|
3609
|
-
const
|
|
3610
|
-
|
|
3563
|
+
const s = B(e);
|
|
3564
|
+
s !== ((r = this.hash) == null ? void 0 : r[t]) && (this.hash[t] = s, this.update());
|
|
3611
3565
|
}
|
|
3612
3566
|
/**
|
|
3613
3567
|
* Adding an event when data is changed.
|
|
@@ -3617,8 +3571,8 @@ const R = class R {
|
|
|
3617
3571
|
* @param callback the function is called when the data is changed/ функция вызывается при изменении данных
|
|
3618
3572
|
*/
|
|
3619
3573
|
static addWatch(t, e) {
|
|
3620
|
-
var
|
|
3621
|
-
t in this.watch ? (
|
|
3574
|
+
var s;
|
|
3575
|
+
t in this.watch ? (s = this.watch[t]) == null || s.push(e) : this.watch[t] = [e];
|
|
3622
3576
|
}
|
|
3623
3577
|
/**
|
|
3624
3578
|
* Update hash variable from URL string.
|
|
@@ -3640,7 +3594,7 @@ const R = class R {
|
|
|
3640
3594
|
const t = {};
|
|
3641
3595
|
return location.hash.replace(
|
|
3642
3596
|
/([\w-]+)[:=]([^;]+)/ig,
|
|
3643
|
-
(...e) => (t[String(e[1])] =
|
|
3597
|
+
(...e) => (t[String(e[1])] = Rt(e[2]), "")
|
|
3644
3598
|
), t;
|
|
3645
3599
|
}
|
|
3646
3600
|
/**
|
|
@@ -3660,15 +3614,15 @@ const R = class R {
|
|
|
3660
3614
|
* @param location fresh data/ свежий данные
|
|
3661
3615
|
*/
|
|
3662
3616
|
static makeWatch(t) {
|
|
3663
|
-
g(this.watch, (e,
|
|
3617
|
+
g(this.watch, (e, s) => {
|
|
3664
3618
|
var r;
|
|
3665
|
-
((r = this.hash) == null ? void 0 : r[
|
|
3619
|
+
((r = this.hash) == null ? void 0 : r[s]) !== (t == null ? void 0 : t[s]) && e.forEach((o) => o(t[s]));
|
|
3666
3620
|
});
|
|
3667
3621
|
}
|
|
3668
3622
|
};
|
|
3669
3623
|
c(R, "hash", {}), c(R, "watch", {}), c(R, "block", !1), l() && (R.reload(), addEventListener("hashchange", () => R.reload()));
|
|
3670
3624
|
let Dt = R;
|
|
3671
|
-
const
|
|
3625
|
+
const st = "__UI_ICON", Lt = 320, Ct = "--LOAD--", Y = class Y {
|
|
3672
3626
|
/**
|
|
3673
3627
|
* Checks if the given icon is in the list of connected icons.
|
|
3674
3628
|
*
|
|
@@ -3688,10 +3642,10 @@ const it = "__UI_ICON", Lt = 320, Ct = "--LOAD--", q = class q {
|
|
|
3688
3642
|
* @param wait waiting time for picture loading/
|
|
3689
3643
|
* время ожидания загрузки картинки
|
|
3690
3644
|
*/
|
|
3691
|
-
static async get(t, e = "",
|
|
3645
|
+
static async get(t, e = "", s = 1e3 * 60 * 3) {
|
|
3692
3646
|
var o, a, u, h;
|
|
3693
3647
|
const r = (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`;
|
|
3694
|
-
return typeof r == "string" ? r === Ct &&
|
|
3648
|
+
return typeof r == "string" ? r === Ct && s > 0 ? (await this.wait(), this.get(t, e, s - Lt)) : r : ct(r) ? await r() : await r;
|
|
3695
3649
|
}
|
|
3696
3650
|
/**
|
|
3697
3651
|
* Returns a list of names of all registered icons.
|
|
@@ -3707,7 +3661,7 @@ const it = "__UI_ICON", Lt = 320, Ct = "--LOAD--", q = class q {
|
|
|
3707
3661
|
* Возвращает глобальную ссылку.
|
|
3708
3662
|
*/
|
|
3709
3663
|
static getUrlGlobal() {
|
|
3710
|
-
return `${
|
|
3664
|
+
return `${H.isLocalhost(), ""}${this.url}`;
|
|
3711
3665
|
}
|
|
3712
3666
|
/**
|
|
3713
3667
|
* Adding custom icons.
|
|
@@ -3745,7 +3699,7 @@ const it = "__UI_ICON", Lt = 320, Ct = "--LOAD--", q = class q {
|
|
|
3745
3699
|
* @param list list of icons/ список иконки
|
|
3746
3700
|
*/
|
|
3747
3701
|
static addByList(t) {
|
|
3748
|
-
g(t, (e,
|
|
3702
|
+
g(t, (e, s) => this.add(s, e));
|
|
3749
3703
|
}
|
|
3750
3704
|
/**
|
|
3751
3705
|
* Changes the file path.
|
|
@@ -3774,37 +3728,37 @@ const it = "__UI_ICON", Lt = 320, Ct = "--LOAD--", q = class q {
|
|
|
3774
3728
|
return new Promise((t) => setTimeout(() => t(), Lt));
|
|
3775
3729
|
}
|
|
3776
3730
|
};
|
|
3777
|
-
c(
|
|
3778
|
-
let kt =
|
|
3779
|
-
function Ot(
|
|
3780
|
-
var
|
|
3781
|
-
return (r = (
|
|
3731
|
+
c(Y, "icons", {}), c(Y, "url", "/icons/"), l() && (st in window || (window[st] = {}), Y.icons = window[st]);
|
|
3732
|
+
let kt = Y;
|
|
3733
|
+
function Ot(i, t, e) {
|
|
3734
|
+
var s, r;
|
|
3735
|
+
return (r = (s = N(i)) == null ? void 0 : s[t]) != null ? r : e;
|
|
3782
3736
|
}
|
|
3783
|
-
function Tt(
|
|
3784
|
-
const
|
|
3785
|
-
if (
|
|
3786
|
-
const r = Ot(
|
|
3787
|
-
if (
|
|
3737
|
+
function Tt(i, t, e) {
|
|
3738
|
+
const s = N(i);
|
|
3739
|
+
if (s) {
|
|
3740
|
+
const r = Ot(s, t);
|
|
3741
|
+
if (f(r) && f(e))
|
|
3788
3742
|
g(e, (o, a) => {
|
|
3789
3743
|
r[a] = B(o);
|
|
3790
3744
|
});
|
|
3791
3745
|
else {
|
|
3792
3746
|
const o = B(e);
|
|
3793
|
-
!(t in
|
|
3747
|
+
!(t in s) && typeof o == "string" ? s.setAttribute(t.toString(), o) : s[t] = B(e);
|
|
3794
3748
|
}
|
|
3795
3749
|
}
|
|
3796
|
-
return
|
|
3750
|
+
return s;
|
|
3797
3751
|
}
|
|
3798
|
-
function
|
|
3752
|
+
function _(i, t = "div", e, s) {
|
|
3799
3753
|
if (!l())
|
|
3800
3754
|
return;
|
|
3801
3755
|
const r = document.createElement(t);
|
|
3802
|
-
return typeof e == "function" ? e(r) :
|
|
3756
|
+
return typeof e == "function" ? e(r) : A(e) && g(e, (o, a) => {
|
|
3803
3757
|
Tt(r, a, o);
|
|
3804
|
-
}),
|
|
3758
|
+
}), i == null || i.insertBefore(r, s != null ? s : null), r;
|
|
3805
3759
|
}
|
|
3806
|
-
function Gt(
|
|
3807
|
-
return
|
|
3760
|
+
function Gt(i) {
|
|
3761
|
+
return i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").trim();
|
|
3808
3762
|
}
|
|
3809
3763
|
class ht {
|
|
3810
3764
|
/**
|
|
@@ -3874,7 +3828,7 @@ class ht {
|
|
|
3874
3828
|
setByList(t) {
|
|
3875
3829
|
return g(
|
|
3876
3830
|
t,
|
|
3877
|
-
(e,
|
|
3831
|
+
(e, s) => this.set(s, String(e))
|
|
3878
3832
|
), this;
|
|
3879
3833
|
}
|
|
3880
3834
|
/**
|
|
@@ -3915,12 +3869,12 @@ class ht {
|
|
|
3915
3869
|
*/
|
|
3916
3870
|
setMeta(t) {
|
|
3917
3871
|
var r;
|
|
3918
|
-
const e = this.findMetaElement(t),
|
|
3872
|
+
const e = this.findMetaElement(t), s = (r = this.items[t]) != null ? r : "";
|
|
3919
3873
|
if (e)
|
|
3920
|
-
e.content =
|
|
3874
|
+
e.content = s;
|
|
3921
3875
|
else if (l()) {
|
|
3922
|
-
const o = { content:
|
|
3923
|
-
this.isProperty ? o.property = t : o.name = t,
|
|
3876
|
+
const o = { content: s };
|
|
3877
|
+
this.isProperty ? o.property = t : o.name = t, _(document.head, "meta", o);
|
|
3924
3878
|
}
|
|
3925
3879
|
return this;
|
|
3926
3880
|
}
|
|
@@ -3931,8 +3885,8 @@ class ht {
|
|
|
3931
3885
|
* @param name meta tag name / имя мета-тега
|
|
3932
3886
|
*/
|
|
3933
3887
|
toHtmlString(t) {
|
|
3934
|
-
var
|
|
3935
|
-
const e = Gt((
|
|
3888
|
+
var s;
|
|
3889
|
+
const e = Gt((s = this.items[t]) != null ? s : "");
|
|
3936
3890
|
return e ? `<meta ${this.getAttributeName()}="${t}" content="${e}">` : "";
|
|
3937
3891
|
}
|
|
3938
3892
|
/**
|
|
@@ -3942,15 +3896,15 @@ class ht {
|
|
|
3942
3896
|
*/
|
|
3943
3897
|
update() {
|
|
3944
3898
|
return this.listMeta.forEach((t) => {
|
|
3945
|
-
var e,
|
|
3946
|
-
this.items[t] = (
|
|
3899
|
+
var e, s;
|
|
3900
|
+
this.items[t] = (s = (e = this.findMetaElement(t)) == null ? void 0 : e.content) != null ? s : "";
|
|
3947
3901
|
}), this;
|
|
3948
3902
|
}
|
|
3949
3903
|
}
|
|
3950
|
-
var D = /* @__PURE__ */ ((
|
|
3904
|
+
var D = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(D || {}), 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 || {});
|
|
3951
3905
|
class ae extends ht {
|
|
3952
3906
|
constructor() {
|
|
3953
|
-
super(Object.values(
|
|
3907
|
+
super(Object.values(y), !0);
|
|
3954
3908
|
}
|
|
3955
3909
|
/**
|
|
3956
3910
|
* Gets the Open Graph title.
|
|
@@ -3958,7 +3912,7 @@ class ae extends ht {
|
|
|
3958
3912
|
* Получает заголовок Open Graph.
|
|
3959
3913
|
*/
|
|
3960
3914
|
getTitle() {
|
|
3961
|
-
return this.get(
|
|
3915
|
+
return this.get(y.title);
|
|
3962
3916
|
}
|
|
3963
3917
|
/**
|
|
3964
3918
|
* Gets the Open Graph type.
|
|
@@ -3966,7 +3920,7 @@ class ae extends ht {
|
|
|
3966
3920
|
* Получает тип Open Graph.
|
|
3967
3921
|
*/
|
|
3968
3922
|
getType() {
|
|
3969
|
-
return this.get(
|
|
3923
|
+
return this.get(y.type);
|
|
3970
3924
|
}
|
|
3971
3925
|
/**
|
|
3972
3926
|
* Gets the Open Graph URL.
|
|
@@ -3974,7 +3928,7 @@ class ae extends ht {
|
|
|
3974
3928
|
* Получает URL Open Graph.
|
|
3975
3929
|
*/
|
|
3976
3930
|
getUrl() {
|
|
3977
|
-
return this.get(
|
|
3931
|
+
return this.get(y.url);
|
|
3978
3932
|
}
|
|
3979
3933
|
/**
|
|
3980
3934
|
* Gets the Open Graph image URL.
|
|
@@ -3982,7 +3936,7 @@ class ae extends ht {
|
|
|
3982
3936
|
* Получает URL изображения Open Graph.
|
|
3983
3937
|
*/
|
|
3984
3938
|
getImage() {
|
|
3985
|
-
return this.get(
|
|
3939
|
+
return this.get(y.image);
|
|
3986
3940
|
}
|
|
3987
3941
|
/**
|
|
3988
3942
|
* Gets the Open Graph description.
|
|
@@ -3990,7 +3944,7 @@ class ae extends ht {
|
|
|
3990
3944
|
* Получает описание Open Graph.
|
|
3991
3945
|
*/
|
|
3992
3946
|
getDescription() {
|
|
3993
|
-
return this.get(
|
|
3947
|
+
return this.get(y.description);
|
|
3994
3948
|
}
|
|
3995
3949
|
/**
|
|
3996
3950
|
* Gets the Open Graph locale.
|
|
@@ -3998,7 +3952,7 @@ class ae extends ht {
|
|
|
3998
3952
|
* Получает локаль Open Graph.
|
|
3999
3953
|
*/
|
|
4000
3954
|
getLocale() {
|
|
4001
|
-
return this.get(
|
|
3955
|
+
return this.get(y.locale);
|
|
4002
3956
|
}
|
|
4003
3957
|
/**
|
|
4004
3958
|
* Gets the Open Graph site name.
|
|
@@ -4006,7 +3960,7 @@ class ae extends ht {
|
|
|
4006
3960
|
* Получает название сайта Open Graph.
|
|
4007
3961
|
*/
|
|
4008
3962
|
getSiteName() {
|
|
4009
|
-
return this.get(
|
|
3963
|
+
return this.get(y.siteName);
|
|
4010
3964
|
}
|
|
4011
3965
|
/**
|
|
4012
3966
|
* Sets the Open Graph title.
|
|
@@ -4015,7 +3969,7 @@ class ae extends ht {
|
|
|
4015
3969
|
* @param title title / заголовок
|
|
4016
3970
|
*/
|
|
4017
3971
|
setTitle(t) {
|
|
4018
|
-
return this.set(
|
|
3972
|
+
return this.set(y.title, t);
|
|
4019
3973
|
}
|
|
4020
3974
|
/**
|
|
4021
3975
|
* Sets the Open Graph type.
|
|
@@ -4024,7 +3978,7 @@ class ae extends ht {
|
|
|
4024
3978
|
* @param type type / тип
|
|
4025
3979
|
*/
|
|
4026
3980
|
setType(t) {
|
|
4027
|
-
return this.set(
|
|
3981
|
+
return this.set(y.type, t);
|
|
4028
3982
|
}
|
|
4029
3983
|
/**
|
|
4030
3984
|
* Sets the Open Graph URL.
|
|
@@ -4033,7 +3987,7 @@ class ae extends ht {
|
|
|
4033
3987
|
* @param url URL / URL
|
|
4034
3988
|
*/
|
|
4035
3989
|
setUrl(t) {
|
|
4036
|
-
return this.set(
|
|
3990
|
+
return this.set(y.url, t);
|
|
4037
3991
|
}
|
|
4038
3992
|
/**
|
|
4039
3993
|
* Sets the Open Graph image URL.
|
|
@@ -4042,7 +3996,7 @@ class ae extends ht {
|
|
|
4042
3996
|
* @param url image URL / URL изображения
|
|
4043
3997
|
*/
|
|
4044
3998
|
setImage(t) {
|
|
4045
|
-
return this.set(
|
|
3999
|
+
return this.set(y.image, t);
|
|
4046
4000
|
}
|
|
4047
4001
|
/**
|
|
4048
4002
|
* Sets the Open Graph description.
|
|
@@ -4051,7 +4005,7 @@ class ae extends ht {
|
|
|
4051
4005
|
* @param description description / описание
|
|
4052
4006
|
*/
|
|
4053
4007
|
setDescription(t) {
|
|
4054
|
-
return this.set(
|
|
4008
|
+
return this.set(y.description, t);
|
|
4055
4009
|
}
|
|
4056
4010
|
/**
|
|
4057
4011
|
* Sets the Open Graph locale.
|
|
@@ -4060,7 +4014,7 @@ class ae extends ht {
|
|
|
4060
4014
|
* @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
|
|
4061
4015
|
*/
|
|
4062
4016
|
setLocale(t) {
|
|
4063
|
-
return this.set(
|
|
4017
|
+
return this.set(y.locale, t);
|
|
4064
4018
|
}
|
|
4065
4019
|
/**
|
|
4066
4020
|
* Sets the Open Graph site name.
|
|
@@ -4069,12 +4023,12 @@ class ae extends ht {
|
|
|
4069
4023
|
* @param siteName site name / название сайта
|
|
4070
4024
|
*/
|
|
4071
4025
|
setSiteName(t) {
|
|
4072
|
-
return this.set(
|
|
4026
|
+
return this.set(y.siteName, t);
|
|
4073
4027
|
}
|
|
4074
4028
|
}
|
|
4075
4029
|
class ce extends ht {
|
|
4076
4030
|
constructor() {
|
|
4077
|
-
super(Object.values(
|
|
4031
|
+
super(Object.values($));
|
|
4078
4032
|
}
|
|
4079
4033
|
/**
|
|
4080
4034
|
* Gets the Twitter Card type.
|
|
@@ -4082,7 +4036,7 @@ class ce extends ht {
|
|
|
4082
4036
|
* Получает тип Twitter Card.
|
|
4083
4037
|
*/
|
|
4084
4038
|
getCard() {
|
|
4085
|
-
return this.get(
|
|
4039
|
+
return this.get($.card);
|
|
4086
4040
|
}
|
|
4087
4041
|
/**
|
|
4088
4042
|
* Gets the website or brand @username.
|
|
@@ -4090,7 +4044,7 @@ class ce extends ht {
|
|
|
4090
4044
|
* Получает аккаунт сайта или бренда (@username).
|
|
4091
4045
|
*/
|
|
4092
4046
|
getSite() {
|
|
4093
|
-
return this.get(
|
|
4047
|
+
return this.get($.site);
|
|
4094
4048
|
}
|
|
4095
4049
|
/**
|
|
4096
4050
|
* Gets the content creator @username.
|
|
@@ -4098,7 +4052,7 @@ class ce extends ht {
|
|
|
4098
4052
|
* Получает автора контента (@username).
|
|
4099
4053
|
*/
|
|
4100
4054
|
getCreator() {
|
|
4101
|
-
return this.get(
|
|
4055
|
+
return this.get($.creator);
|
|
4102
4056
|
}
|
|
4103
4057
|
/**
|
|
4104
4058
|
* Gets the page URL.
|
|
@@ -4106,7 +4060,7 @@ class ce extends ht {
|
|
|
4106
4060
|
* Получает URL страницы.
|
|
4107
4061
|
*/
|
|
4108
4062
|
getUrl() {
|
|
4109
|
-
return this.get(
|
|
4063
|
+
return this.get($.url);
|
|
4110
4064
|
}
|
|
4111
4065
|
/**
|
|
4112
4066
|
* Gets the card title.
|
|
@@ -4114,7 +4068,7 @@ class ce extends ht {
|
|
|
4114
4068
|
* Получает заголовок карточки.
|
|
4115
4069
|
*/
|
|
4116
4070
|
getTitle() {
|
|
4117
|
-
return this.get(
|
|
4071
|
+
return this.get($.title);
|
|
4118
4072
|
}
|
|
4119
4073
|
/**
|
|
4120
4074
|
* Gets the card description.
|
|
@@ -4122,7 +4076,7 @@ class ce extends ht {
|
|
|
4122
4076
|
* Получает описание карточки.
|
|
4123
4077
|
*/
|
|
4124
4078
|
getDescription() {
|
|
4125
|
-
return this.get(
|
|
4079
|
+
return this.get($.description);
|
|
4126
4080
|
}
|
|
4127
4081
|
/**
|
|
4128
4082
|
* Gets the card image URL.
|
|
@@ -4130,7 +4084,7 @@ class ce extends ht {
|
|
|
4130
4084
|
* Получает URL изображения карточки.
|
|
4131
4085
|
*/
|
|
4132
4086
|
getImage() {
|
|
4133
|
-
return this.get(
|
|
4087
|
+
return this.get($.image);
|
|
4134
4088
|
}
|
|
4135
4089
|
/**
|
|
4136
4090
|
* Sets the Twitter Card type.
|
|
@@ -4139,7 +4093,7 @@ class ce extends ht {
|
|
|
4139
4093
|
* @param card card type / тип карточки
|
|
4140
4094
|
*/
|
|
4141
4095
|
setCard(t) {
|
|
4142
|
-
return this.set(
|
|
4096
|
+
return this.set($.card, t), this;
|
|
4143
4097
|
}
|
|
4144
4098
|
/**
|
|
4145
4099
|
* Sets the website or brand @username.
|
|
@@ -4148,7 +4102,7 @@ class ce extends ht {
|
|
|
4148
4102
|
* @param site @username / аккаунт
|
|
4149
4103
|
*/
|
|
4150
4104
|
setSite(t) {
|
|
4151
|
-
return this.set(
|
|
4105
|
+
return this.set($.site, t), this;
|
|
4152
4106
|
}
|
|
4153
4107
|
/**
|
|
4154
4108
|
* Sets the content creator @username.
|
|
@@ -4157,7 +4111,7 @@ class ce extends ht {
|
|
|
4157
4111
|
* @param creator @username / аккаунт автора
|
|
4158
4112
|
*/
|
|
4159
4113
|
setCreator(t) {
|
|
4160
|
-
return this.set(
|
|
4114
|
+
return this.set($.creator, t), this;
|
|
4161
4115
|
}
|
|
4162
4116
|
/**
|
|
4163
4117
|
* Sets the page URL.
|
|
@@ -4166,7 +4120,7 @@ class ce extends ht {
|
|
|
4166
4120
|
* @param url URL / URL
|
|
4167
4121
|
*/
|
|
4168
4122
|
setUrl(t) {
|
|
4169
|
-
return this.set(
|
|
4123
|
+
return this.set($.url, t), this;
|
|
4170
4124
|
}
|
|
4171
4125
|
/**
|
|
4172
4126
|
* Sets the card title.
|
|
@@ -4175,7 +4129,7 @@ class ce extends ht {
|
|
|
4175
4129
|
* @param title title / заголовок
|
|
4176
4130
|
*/
|
|
4177
4131
|
setTitle(t) {
|
|
4178
|
-
return this.set(
|
|
4132
|
+
return this.set($.title, t), this;
|
|
4179
4133
|
}
|
|
4180
4134
|
/**
|
|
4181
4135
|
* Sets the card description.
|
|
@@ -4184,7 +4138,7 @@ class ce extends ht {
|
|
|
4184
4138
|
* @param description description / описание
|
|
4185
4139
|
*/
|
|
4186
4140
|
setDescription(t) {
|
|
4187
|
-
return this.set(
|
|
4141
|
+
return this.set($.description, t), this;
|
|
4188
4142
|
}
|
|
4189
4143
|
/**
|
|
4190
4144
|
* Sets the card image URL.
|
|
@@ -4193,10 +4147,10 @@ class ce extends ht {
|
|
|
4193
4147
|
* @param image image URL / URL изображения
|
|
4194
4148
|
*/
|
|
4195
4149
|
setImage(t) {
|
|
4196
|
-
return this.set(
|
|
4150
|
+
return this.set($.image, t), this;
|
|
4197
4151
|
}
|
|
4198
4152
|
}
|
|
4199
|
-
class
|
|
4153
|
+
class Ie extends ht {
|
|
4200
4154
|
/**
|
|
4201
4155
|
* Creates an instance of Meta with integrated Open Graph and Twitter Card support.
|
|
4202
4156
|
*
|
|
@@ -4305,8 +4259,8 @@ class xe extends ht {
|
|
|
4305
4259
|
*/
|
|
4306
4260
|
setTitle(e) {
|
|
4307
4261
|
if (l()) {
|
|
4308
|
-
const
|
|
4309
|
-
document.title =
|
|
4262
|
+
const s = v(e) ? `${e}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
4263
|
+
document.title = s, this.og.setTitle(s), this.twitter.setTitle(s);
|
|
4310
4264
|
}
|
|
4311
4265
|
return this;
|
|
4312
4266
|
}
|
|
@@ -4317,7 +4271,7 @@ class xe extends ht {
|
|
|
4317
4271
|
* @param keywords keywords as string or array / ключевые слова в виде строки или массива
|
|
4318
4272
|
*/
|
|
4319
4273
|
setKeywords(e) {
|
|
4320
|
-
return this.set(D.keywords,
|
|
4274
|
+
return this.set(D.keywords, z(e).join(", ")), this;
|
|
4321
4275
|
}
|
|
4322
4276
|
/**
|
|
4323
4277
|
* Sets the description meta tag.
|
|
@@ -4405,7 +4359,7 @@ class xe extends ht {
|
|
|
4405
4359
|
* Получает отформатированный суффикс с разделителем.
|
|
4406
4360
|
*/
|
|
4407
4361
|
getSuffix() {
|
|
4408
|
-
return
|
|
4362
|
+
return v(this.suffix) ? ` - ${this.suffix}` : "";
|
|
4409
4363
|
}
|
|
4410
4364
|
}
|
|
4411
4365
|
class ot {
|
|
@@ -4427,8 +4381,8 @@ class ot {
|
|
|
4427
4381
|
var e;
|
|
4428
4382
|
const t = (e = this.storage.get()) != null ? e : -1;
|
|
4429
4383
|
if (!this.calculate && t === -1) {
|
|
4430
|
-
const
|
|
4431
|
-
return this.storage.set(
|
|
4384
|
+
const s = await this.init();
|
|
4385
|
+
return this.storage.set(s), s;
|
|
4432
4386
|
}
|
|
4433
4387
|
return t;
|
|
4434
4388
|
}
|
|
@@ -4438,8 +4392,8 @@ class ot {
|
|
|
4438
4392
|
* Создает элементы для проверки ширины скролла.
|
|
4439
4393
|
*/
|
|
4440
4394
|
static createElement() {
|
|
4441
|
-
return
|
|
4442
|
-
t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%",
|
|
4395
|
+
return _(document.body, "div", (t) => {
|
|
4396
|
+
t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", _(t, "div", (e) => {
|
|
4443
4397
|
e.style.height = "100px";
|
|
4444
4398
|
});
|
|
4445
4399
|
});
|
|
@@ -4459,7 +4413,7 @@ class ot {
|
|
|
4459
4413
|
});
|
|
4460
4414
|
}
|
|
4461
4415
|
}
|
|
4462
|
-
c(ot, "storage", new
|
|
4416
|
+
c(ot, "storage", new T("scrollbar", !0)), c(ot, "calculate", !1);
|
|
4463
4417
|
const ue = [
|
|
4464
4418
|
"d",
|
|
4465
4419
|
"e",
|
|
@@ -4480,19 +4434,19 @@ const ue = [
|
|
|
4480
4434
|
"t",
|
|
4481
4435
|
"u",
|
|
4482
4436
|
"v"
|
|
4483
|
-
], he = (
|
|
4484
|
-
let e = String(
|
|
4485
|
-
if (
|
|
4486
|
-
let
|
|
4437
|
+
], he = (i, t = {}) => {
|
|
4438
|
+
let e = String(i);
|
|
4439
|
+
if (i.match(/%[a-z]/)) {
|
|
4440
|
+
let s = 0;
|
|
4487
4441
|
g(t, (r) => {
|
|
4488
|
-
e = e.replace(new RegExp(`%${ue[
|
|
4442
|
+
e = e.replace(new RegExp(`%${ue[s++]}`, "g"), String(r));
|
|
4489
4443
|
});
|
|
4490
4444
|
}
|
|
4491
|
-
return
|
|
4445
|
+
return A(t) && g(t, (s, r) => {
|
|
4492
4446
|
e = e.replace(
|
|
4493
4447
|
new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})(.*?)(?:\\[|\\{)\\/${r}(?:\\]|\\})`, "g"),
|
|
4494
|
-
(o, a) => String(
|
|
4495
|
-
).replace(new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})`, "g"), String(
|
|
4448
|
+
(o, a) => String(s).replace(/(?:\[|\{)content(?:\]|\})/g, a)
|
|
4449
|
+
).replace(new RegExp(`(?:\\[|\\{)${r}(?:\\]|\\})`, "g"), String(s));
|
|
4496
4450
|
}), e;
|
|
4497
4451
|
}, le = "global", E = class E {
|
|
4498
4452
|
/**
|
|
@@ -4504,8 +4458,8 @@ const ue = [
|
|
|
4504
4458
|
*/
|
|
4505
4459
|
static async get(t, e) {
|
|
4506
4460
|
var r;
|
|
4507
|
-
const
|
|
4508
|
-
return
|
|
4461
|
+
const s = this.getText(t);
|
|
4462
|
+
return s ? this.replacement(s, e) : (H.isLocalhost() || await this.add(t), this.replacement((r = this.getText(t)) != null ? r : t));
|
|
4509
4463
|
}
|
|
4510
4464
|
/**
|
|
4511
4465
|
* Getting the translation text by its code (Sync).
|
|
@@ -4517,9 +4471,9 @@ const ue = [
|
|
|
4517
4471
|
* @param replacement If set, replaces the text with the specified values/
|
|
4518
4472
|
* если установлено, заменяет текст на указанные значения
|
|
4519
4473
|
*/
|
|
4520
|
-
static getSync(t, e = !1,
|
|
4474
|
+
static getSync(t, e = !1, s) {
|
|
4521
4475
|
const r = this.getText(t);
|
|
4522
|
-
return r ? this.replacement(r,
|
|
4476
|
+
return r ? this.replacement(r, s) : e ? " " : t;
|
|
4523
4477
|
}
|
|
4524
4478
|
/**
|
|
4525
4479
|
* Getting a list of translations by an array of text codes.
|
|
@@ -4529,12 +4483,12 @@ const ue = [
|
|
|
4529
4483
|
*/
|
|
4530
4484
|
static getList(t) {
|
|
4531
4485
|
return new Promise((e) => {
|
|
4532
|
-
const
|
|
4486
|
+
const s = {};
|
|
4533
4487
|
let r = 0;
|
|
4534
4488
|
for (const o of t) {
|
|
4535
4489
|
const a = Array.isArray(o) ? o[0] : o, u = Array.isArray(o) ? o.slice(1) : void 0;
|
|
4536
4490
|
this.get(a, u).then((h) => {
|
|
4537
|
-
|
|
4491
|
+
s[a] = h, ++r >= t.length && e(s);
|
|
4538
4492
|
});
|
|
4539
4493
|
}
|
|
4540
4494
|
});
|
|
@@ -4548,12 +4502,12 @@ const ue = [
|
|
|
4548
4502
|
* если установлено false, возвращает пустую строку, если нет текста
|
|
4549
4503
|
*/
|
|
4550
4504
|
static getListSync(t, e = !1) {
|
|
4551
|
-
const
|
|
4505
|
+
const s = {};
|
|
4552
4506
|
for (const r of t) {
|
|
4553
4507
|
const o = Array.isArray(r) ? r[0] : r, a = Array.isArray(r) ? r.slice(1) : void 0;
|
|
4554
|
-
|
|
4508
|
+
s[o] = this.getSync(o, e, a);
|
|
4555
4509
|
}
|
|
4556
|
-
return
|
|
4510
|
+
return s;
|
|
4557
4511
|
}
|
|
4558
4512
|
/**
|
|
4559
4513
|
* Added a list of translated texts.
|
|
@@ -4577,8 +4531,8 @@ const ue = [
|
|
|
4577
4531
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
4578
4532
|
*/
|
|
4579
4533
|
static addSync(t) {
|
|
4580
|
-
g(t, (e,
|
|
4581
|
-
|
|
4534
|
+
g(t, (e, s) => {
|
|
4535
|
+
x(e) && v(e) && (this.data[this.getName(s)] = e);
|
|
4582
4536
|
});
|
|
4583
4537
|
}
|
|
4584
4538
|
/**
|
|
@@ -4588,8 +4542,8 @@ const ue = [
|
|
|
4588
4542
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
4589
4543
|
*/
|
|
4590
4544
|
static async addNormalOrSync(t) {
|
|
4591
|
-
if (
|
|
4592
|
-
if (
|
|
4545
|
+
if (v(t))
|
|
4546
|
+
if (H.isLocalhost())
|
|
4593
4547
|
this.addSync(t);
|
|
4594
4548
|
else {
|
|
4595
4549
|
const e = Object.keys(t);
|
|
@@ -4605,8 +4559,8 @@ const ue = [
|
|
|
4605
4559
|
static addSyncByLocation(t) {
|
|
4606
4560
|
g(
|
|
4607
4561
|
t,
|
|
4608
|
-
(e,
|
|
4609
|
-
const a = `${
|
|
4562
|
+
(e, s) => g(e, (r, o) => {
|
|
4563
|
+
const a = `${s}-${o}`;
|
|
4610
4564
|
a in this.data || (this.data[a] = r);
|
|
4611
4565
|
})
|
|
4612
4566
|
);
|
|
@@ -4642,9 +4596,9 @@ const ue = [
|
|
|
4642
4596
|
const e = this.getName(t);
|
|
4643
4597
|
if (e in this.data)
|
|
4644
4598
|
return this.data[e];
|
|
4645
|
-
const
|
|
4646
|
-
if (
|
|
4647
|
-
return this.data[
|
|
4599
|
+
const s = this.getNameByLanguage(t);
|
|
4600
|
+
if (s in this.data)
|
|
4601
|
+
return this.data[s];
|
|
4648
4602
|
const r = this.getNameByGlobal(t);
|
|
4649
4603
|
if (r in this.data)
|
|
4650
4604
|
return this.data[r];
|
|
@@ -4656,7 +4610,7 @@ const ue = [
|
|
|
4656
4610
|
* @param name code name/ название кода
|
|
4657
4611
|
*/
|
|
4658
4612
|
static getName(t) {
|
|
4659
|
-
return `${
|
|
4613
|
+
return `${p.getLocation()}-${t}`;
|
|
4660
4614
|
}
|
|
4661
4615
|
/**
|
|
4662
4616
|
* Getting the title for translation by language.
|
|
@@ -4665,7 +4619,7 @@ const ue = [
|
|
|
4665
4619
|
* @param name code name/ название кода
|
|
4666
4620
|
*/
|
|
4667
4621
|
static getNameByLanguage(t) {
|
|
4668
|
-
return `${
|
|
4622
|
+
return `${p.getLanguage()}-${t}`;
|
|
4669
4623
|
}
|
|
4670
4624
|
/**
|
|
4671
4625
|
* Getting the title for translation globally.
|
|
@@ -4684,8 +4638,8 @@ const ue = [
|
|
|
4684
4638
|
*/
|
|
4685
4639
|
static getNamesNone(t) {
|
|
4686
4640
|
const e = [];
|
|
4687
|
-
return
|
|
4688
|
-
|
|
4641
|
+
return z(t).forEach((s) => {
|
|
4642
|
+
s !== "__TRANSLATE_START__" && s !== "__TRANSLATE_END__" && !(this.getName(s) in this.data) && e.push(s);
|
|
4689
4643
|
}), e;
|
|
4690
4644
|
}
|
|
4691
4645
|
/**
|
|
@@ -4694,7 +4648,7 @@ const ue = [
|
|
|
4694
4648
|
* Получение списка переводов с сервера.
|
|
4695
4649
|
*/
|
|
4696
4650
|
static async getResponse() {
|
|
4697
|
-
const t = await
|
|
4651
|
+
const t = await H.get({
|
|
4698
4652
|
api: !1,
|
|
4699
4653
|
path: this.url,
|
|
4700
4654
|
request: {
|
|
@@ -4723,363 +4677,363 @@ const ue = [
|
|
|
4723
4677
|
static async make() {
|
|
4724
4678
|
const t = await this.getResponse();
|
|
4725
4679
|
this.cache.forEach((e) => {
|
|
4726
|
-
var
|
|
4727
|
-
this.data[this.getName(e)] = (
|
|
4680
|
+
var s;
|
|
4681
|
+
this.data[this.getName(e)] = (s = t == null ? void 0 : t[e]) != null ? s : "";
|
|
4728
4682
|
}), this.cache = [];
|
|
4729
4683
|
}
|
|
4730
4684
|
};
|
|
4731
4685
|
c(E, "url", "/api/translate"), c(E, "propsName", "list"), c(E, "data", {}), c(E, "cache", []), c(E, "resolveList", []), c(E, "timeout");
|
|
4732
|
-
let
|
|
4733
|
-
function de(
|
|
4686
|
+
let Nt = E;
|
|
4687
|
+
function de(i) {
|
|
4734
4688
|
var t;
|
|
4735
|
-
return
|
|
4689
|
+
return x(i) ? i.trim() : at(i) && i.findIndex((e) => f(e)) === -1 ? i.join(",") : f(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : (t = i == null ? void 0 : i.toString()) != null ? t : "";
|
|
4736
4690
|
}
|
|
4737
|
-
function ge(
|
|
4738
|
-
return Array(t).fill(
|
|
4691
|
+
function ge(i, t) {
|
|
4692
|
+
return Array(t).fill(i);
|
|
4739
4693
|
}
|
|
4740
|
-
function Fe(
|
|
4694
|
+
function Fe(i) {
|
|
4741
4695
|
return new Promise((t, e) => {
|
|
4742
|
-
const
|
|
4743
|
-
|
|
4696
|
+
const s = new FileReader();
|
|
4697
|
+
s.onloadend = () => t(s.result), s.onerror = e, s.readAsDataURL(i);
|
|
4744
4698
|
});
|
|
4745
4699
|
}
|
|
4746
|
-
function Re(
|
|
4700
|
+
function Re(i) {
|
|
4747
4701
|
var t;
|
|
4748
4702
|
if (l())
|
|
4749
|
-
return (t = document.querySelector(
|
|
4703
|
+
return (t = document.querySelector(i)) != null ? t : void 0;
|
|
4750
4704
|
}
|
|
4751
|
-
function
|
|
4705
|
+
function xe(i) {
|
|
4752
4706
|
if (l())
|
|
4753
|
-
return document.querySelectorAll(
|
|
4707
|
+
return document.querySelectorAll(i);
|
|
4754
4708
|
}
|
|
4755
|
-
function
|
|
4756
|
-
|
|
4709
|
+
function Pe(i) {
|
|
4710
|
+
i.preventDefault(), i.stopPropagation();
|
|
4757
4711
|
}
|
|
4758
|
-
function fe(
|
|
4759
|
-
const
|
|
4760
|
-
|
|
4712
|
+
function fe(i, t, e) {
|
|
4713
|
+
const s = () => {
|
|
4714
|
+
i(), t != null && t() ? fe(i, t, e) : e == null || e();
|
|
4761
4715
|
};
|
|
4762
|
-
l() ? requestAnimationFrame(
|
|
4716
|
+
l() ? requestAnimationFrame(s) : s();
|
|
4763
4717
|
}
|
|
4764
|
-
function
|
|
4765
|
-
var
|
|
4766
|
-
const t = {}, e =
|
|
4718
|
+
function We(i) {
|
|
4719
|
+
var s;
|
|
4720
|
+
const t = {}, e = N(i);
|
|
4767
4721
|
if (e)
|
|
4768
4722
|
for (const r of e.attributes)
|
|
4769
|
-
t[r.name] = (
|
|
4723
|
+
t[r.name] = (s = (r == null ? void 0 : r.value) || (r == null ? void 0 : r.textContent)) != null ? s : void 0;
|
|
4770
4724
|
return t;
|
|
4771
4725
|
}
|
|
4772
|
-
async function je(
|
|
4726
|
+
async function je(i) {
|
|
4773
4727
|
var t, e;
|
|
4774
|
-
return (e = (t =
|
|
4728
|
+
return (e = (t = i == null ? void 0 : i.clipboardData) == null ? void 0 : t.getData("text")) != null ? e : await navigator.clipboard.readText() || "";
|
|
4775
4729
|
}
|
|
4776
|
-
function
|
|
4777
|
-
return new ut(void 0,
|
|
4730
|
+
function Ue(i = "datetime") {
|
|
4731
|
+
return new ut(void 0, i).standard();
|
|
4778
4732
|
}
|
|
4779
|
-
let
|
|
4780
|
-
function
|
|
4781
|
-
const e =
|
|
4782
|
-
return e ? (
|
|
4733
|
+
let At = q(1e5, 9e5);
|
|
4734
|
+
function He(i, t) {
|
|
4735
|
+
const e = N(i);
|
|
4736
|
+
return e ? (v(e.id) || e.setAttribute("id", `id-${At++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${At++}`;
|
|
4783
4737
|
}
|
|
4784
|
-
function me(
|
|
4785
|
-
return
|
|
4738
|
+
function me(i) {
|
|
4739
|
+
return x(i) ? _(
|
|
4786
4740
|
void 0,
|
|
4787
4741
|
"img",
|
|
4788
|
-
{ src:
|
|
4789
|
-
) :
|
|
4742
|
+
{ src: i }
|
|
4743
|
+
) : i;
|
|
4790
4744
|
}
|
|
4791
|
-
function ye(
|
|
4792
|
-
const
|
|
4793
|
-
return new RegExp(e.replace(/:value/g,
|
|
4745
|
+
function ye(i, t = "ig", e = ":value") {
|
|
4746
|
+
const s = i.replace(/([[\]\\^$.?*+(){}/|])/g, "\\$1");
|
|
4747
|
+
return new RegExp(e.replace(/:value/g, s), t);
|
|
4794
4748
|
}
|
|
4795
|
-
function $e(
|
|
4796
|
-
const
|
|
4749
|
+
function $e(i, t, e) {
|
|
4750
|
+
const s = de(i);
|
|
4797
4751
|
if (!e || e <= 0)
|
|
4798
|
-
return
|
|
4799
|
-
const r =
|
|
4752
|
+
return s.split(t);
|
|
4753
|
+
const r = s.split(t, e), o = s.split(t);
|
|
4800
4754
|
return r.length === o.length ? r : (r.pop(), [
|
|
4801
4755
|
...r,
|
|
4802
4756
|
o.slice(e - 1).join(t)
|
|
4803
4757
|
]);
|
|
4804
4758
|
}
|
|
4805
|
-
function pe(
|
|
4759
|
+
function pe(i, t) {
|
|
4806
4760
|
var r;
|
|
4807
|
-
if (!
|
|
4761
|
+
if (!v(t))
|
|
4808
4762
|
return;
|
|
4809
|
-
const e = $e(t, ".", 2),
|
|
4810
|
-
return
|
|
4763
|
+
const e = $e(t, ".", 2), s = e[0];
|
|
4764
|
+
return s && (i != null && i[s]) && f(i[s]) && (e != null && e[1]) ? pe(i[s], e[1]) : (r = v(s) && (i == null ? void 0 : i[s])) != null ? r : void 0;
|
|
4811
4765
|
}
|
|
4812
|
-
function
|
|
4813
|
-
var t, e,
|
|
4814
|
-
return (
|
|
4766
|
+
function ze(i) {
|
|
4767
|
+
var t, e, s;
|
|
4768
|
+
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();
|
|
4815
4769
|
}
|
|
4816
|
-
function Pt(
|
|
4817
|
-
return g(
|
|
4770
|
+
function Pt(i) {
|
|
4771
|
+
return g(i, (t) => t.length);
|
|
4818
4772
|
}
|
|
4819
|
-
function
|
|
4820
|
-
return Math.max(...Pt(
|
|
4773
|
+
function Ze(i) {
|
|
4774
|
+
return Math.max(...Pt(i));
|
|
4821
4775
|
}
|
|
4822
|
-
function
|
|
4823
|
-
return Math.min(...Pt(
|
|
4776
|
+
function Ve(i) {
|
|
4777
|
+
return Math.min(...Pt(i));
|
|
4824
4778
|
}
|
|
4825
|
-
function
|
|
4826
|
-
var t, e,
|
|
4827
|
-
return (
|
|
4779
|
+
function be(i) {
|
|
4780
|
+
var t, e, s, r;
|
|
4781
|
+
return (i == null ? void 0 : i.clientX) || ((e = (t = i == null ? void 0 : i.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientX) || ((r = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : r.clientX) || 0;
|
|
4828
4782
|
}
|
|
4829
|
-
function
|
|
4830
|
-
var t, e,
|
|
4831
|
-
return (
|
|
4783
|
+
function we(i) {
|
|
4784
|
+
var t, e, s, r;
|
|
4785
|
+
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) || ((r = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : r.clientY) || 0;
|
|
4832
4786
|
}
|
|
4833
|
-
function
|
|
4787
|
+
function Ke(i) {
|
|
4834
4788
|
return {
|
|
4835
|
-
x:
|
|
4836
|
-
y:
|
|
4789
|
+
x: be(i),
|
|
4790
|
+
y: we(i)
|
|
4837
4791
|
};
|
|
4838
4792
|
}
|
|
4839
|
-
function
|
|
4793
|
+
function Ye(i, t) {
|
|
4840
4794
|
const e = {};
|
|
4841
|
-
return t.forEach((
|
|
4842
|
-
|
|
4795
|
+
return t.forEach((s) => {
|
|
4796
|
+
s in i && i[s] !== void 0 && (e[s] = i[s]);
|
|
4843
4797
|
}), e;
|
|
4844
4798
|
}
|
|
4845
|
-
function
|
|
4799
|
+
function qe(i, t = void 0) {
|
|
4846
4800
|
const e = {};
|
|
4847
|
-
return g(
|
|
4848
|
-
|
|
4801
|
+
return g(i, (s, r) => {
|
|
4802
|
+
s !== t && (e[r] = s);
|
|
4849
4803
|
}), e;
|
|
4850
4804
|
}
|
|
4851
|
-
function
|
|
4852
|
-
return
|
|
4805
|
+
function Je(i) {
|
|
4806
|
+
return A(i) ? i : {};
|
|
4853
4807
|
}
|
|
4854
|
-
function ve(
|
|
4855
|
-
return ge(
|
|
4808
|
+
function ve(i, t) {
|
|
4809
|
+
return ge(i, t).join("");
|
|
4856
4810
|
}
|
|
4857
|
-
function
|
|
4858
|
-
const o =
|
|
4811
|
+
function Me(i, t, e = "#", s = 2, r = 12) {
|
|
4812
|
+
const o = q(i, t), a = [];
|
|
4859
4813
|
for (let u = 0; u < o; u++)
|
|
4860
|
-
a.push(ve(e,
|
|
4814
|
+
a.push(ve(e, q(s, r)));
|
|
4861
4815
|
return a.join(" ");
|
|
4862
4816
|
}
|
|
4863
|
-
function
|
|
4864
|
-
const e =
|
|
4817
|
+
function Qe(i, t) {
|
|
4818
|
+
const e = i != null ? i : 0;
|
|
4865
4819
|
return t > e ? 100 / (t - e) : 0;
|
|
4866
4820
|
}
|
|
4867
|
-
function
|
|
4868
|
-
const e =
|
|
4821
|
+
function Xe(i, t) {
|
|
4822
|
+
const e = i != null ? i : 0;
|
|
4869
4823
|
return t > e ? (t - e) / 100 : 0;
|
|
4870
4824
|
}
|
|
4871
4825
|
const Et = 0;
|
|
4872
|
-
function
|
|
4873
|
-
const
|
|
4874
|
-
if (t &&
|
|
4875
|
-
const r =
|
|
4826
|
+
function _e(i, t, e) {
|
|
4827
|
+
const s = t == null ? void 0 : t.closest(i);
|
|
4828
|
+
if (t && s && s.scrollHeight !== s.offsetHeight) {
|
|
4829
|
+
const r = s.getBoundingClientRect(), o = t.getBoundingClientRect();
|
|
4876
4830
|
if (e) {
|
|
4877
4831
|
const a = e.getBoundingClientRect();
|
|
4878
|
-
|
|
4879
|
-
} else
|
|
4832
|
+
s.scrollTop = t.offsetTop - (a.top - r.top) - (a.height / 2 - o.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
|
|
4833
|
+
} else s.scrollTop > t.offsetTop ? s.scrollTop = o.top - r.top - Et : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = o.top - r.top + o.height - r.height + Et);
|
|
4880
4834
|
}
|
|
4881
4835
|
}
|
|
4882
|
-
function
|
|
4836
|
+
function Oe(i, t, e = 0) {
|
|
4883
4837
|
if (!l())
|
|
4884
4838
|
return;
|
|
4885
|
-
const
|
|
4886
|
-
if ("scrollIntoView" in
|
|
4887
|
-
|
|
4888
|
-
behavior:
|
|
4839
|
+
const s = (t == null ? void 0 : t.behavior) || "smooth";
|
|
4840
|
+
if ("scrollIntoView" in i && !e) {
|
|
4841
|
+
i.scrollIntoView({
|
|
4842
|
+
behavior: s,
|
|
4889
4843
|
block: (t == null ? void 0 : t.block) || "start",
|
|
4890
4844
|
inline: (t == null ? void 0 : t.inline) || "start"
|
|
4891
4845
|
});
|
|
4892
4846
|
return;
|
|
4893
4847
|
}
|
|
4894
|
-
if ("getBoundingClientRect" in
|
|
4895
|
-
const r = ((window == null ? void 0 : window.scrollY) || window.pageYOffset) +
|
|
4848
|
+
if ("getBoundingClientRect" in i && "scrollTo" in window) {
|
|
4849
|
+
const r = ((window == null ? void 0 : window.scrollY) || window.pageYOffset) + i.getBoundingClientRect().top - e;
|
|
4896
4850
|
window.scrollTo({
|
|
4897
4851
|
top: r,
|
|
4898
|
-
behavior:
|
|
4852
|
+
behavior: s
|
|
4899
4853
|
});
|
|
4900
4854
|
}
|
|
4901
4855
|
}
|
|
4902
|
-
function
|
|
4903
|
-
if (!l() || !
|
|
4856
|
+
function Te(i, t, e = "smooth") {
|
|
4857
|
+
if (!l() || !i || !t)
|
|
4904
4858
|
return;
|
|
4905
|
-
const
|
|
4906
|
-
|
|
4907
|
-
top: r.top -
|
|
4908
|
-
left: r.left -
|
|
4859
|
+
const s = i.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
4860
|
+
i.scrollBy({
|
|
4861
|
+
top: r.top - s.top,
|
|
4862
|
+
left: r.left - s.left,
|
|
4909
4863
|
behavior: e
|
|
4910
4864
|
});
|
|
4911
4865
|
}
|
|
4912
|
-
function
|
|
4913
|
-
return
|
|
4866
|
+
function Ge(i, t) {
|
|
4867
|
+
return i.indexOf(t) !== -1;
|
|
4914
4868
|
}
|
|
4915
|
-
async function
|
|
4869
|
+
async function ti() {
|
|
4916
4870
|
if (l()) {
|
|
4917
|
-
const
|
|
4918
|
-
document.body.style.setProperty("--sys-scrollbar-offset", `${
|
|
4871
|
+
const i = await ot.get();
|
|
4872
|
+
document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
|
|
4919
4873
|
}
|
|
4920
4874
|
}
|
|
4921
|
-
function
|
|
4875
|
+
function ei(i, t) {
|
|
4922
4876
|
const e = {};
|
|
4923
|
-
return
|
|
4924
|
-
r in t && (e[r] =
|
|
4877
|
+
return f(i) && f(t) && g(i, (s, r) => {
|
|
4878
|
+
r in t && (e[r] = s);
|
|
4925
4879
|
}), e;
|
|
4926
4880
|
}
|
|
4927
|
-
function
|
|
4928
|
-
let e = Object.keys(
|
|
4929
|
-
return e || g(
|
|
4930
|
-
|
|
4881
|
+
function ii(i, t) {
|
|
4882
|
+
let e = Object.keys(i).length !== Object.keys(t).length;
|
|
4883
|
+
return e || g(i, (s, r) => {
|
|
4884
|
+
s !== (t == null ? void 0 : t[r]) && (e = !0);
|
|
4931
4885
|
}), e;
|
|
4932
4886
|
}
|
|
4933
|
-
const Se = (
|
|
4934
|
-
if (
|
|
4935
|
-
const t =
|
|
4936
|
-
return !!(t === "input" || t === "textarea" || t === "select" ||
|
|
4887
|
+
const Se = (i) => {
|
|
4888
|
+
if (i instanceof HTMLElement) {
|
|
4889
|
+
const t = i.tagName.toLowerCase();
|
|
4890
|
+
return !!(t === "input" || t === "textarea" || t === "select" || i.isContentEditable || i.getAttribute("contenteditable") === "true");
|
|
4937
4891
|
}
|
|
4938
4892
|
return !1;
|
|
4939
|
-
},
|
|
4940
|
-
function
|
|
4941
|
-
switch (typeof
|
|
4893
|
+
}, si = (i, t) => i.code === "Space" || i.code === "Enter" || i.key === " " || i.key === "Spacebar" || i.key === "Enter" || i.keyCode === 13 || i.keyCode === 32 ? t !== void 0 ? !t : !Se(i.target) : !1;
|
|
4894
|
+
function ri(i) {
|
|
4895
|
+
switch (typeof i) {
|
|
4942
4896
|
case "number":
|
|
4943
4897
|
return !0;
|
|
4944
4898
|
case "string":
|
|
4945
|
-
return !!
|
|
4899
|
+
return !!i.match(/^([0-9]+|[0-9]+\.[0-9]+)$/);
|
|
4946
4900
|
default:
|
|
4947
4901
|
return !1;
|
|
4948
4902
|
}
|
|
4949
4903
|
}
|
|
4950
|
-
function
|
|
4904
|
+
function ni(i, t) {
|
|
4951
4905
|
const e = Math.floor(t);
|
|
4952
|
-
return
|
|
4906
|
+
return i >= e && i < e + 1;
|
|
4953
4907
|
}
|
|
4954
|
-
function
|
|
4955
|
-
return Array.isArray(
|
|
4908
|
+
function oi(i, t) {
|
|
4909
|
+
return Array.isArray(i) ? i.every((e) => rt(e, t)) : rt(i, t);
|
|
4956
4910
|
}
|
|
4957
|
-
function
|
|
4958
|
-
if (
|
|
4959
|
-
return
|
|
4911
|
+
function ai(i, t) {
|
|
4912
|
+
if (i.startsWith(t))
|
|
4913
|
+
return i.slice(t.length).trim();
|
|
4960
4914
|
let e = 0;
|
|
4961
|
-
for (;
|
|
4915
|
+
for (; i[e] === t[e] && e < i.length && e < t.length; )
|
|
4962
4916
|
e++;
|
|
4963
|
-
return
|
|
4917
|
+
return i.slice(e).trim();
|
|
4964
4918
|
}
|
|
4965
|
-
const
|
|
4966
|
-
var
|
|
4967
|
-
return (r = (
|
|
4919
|
+
const ci = (i, t, e) => {
|
|
4920
|
+
var s, r;
|
|
4921
|
+
return (r = (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 : r.trim();
|
|
4968
4922
|
};
|
|
4969
|
-
function De(
|
|
4970
|
-
return [...new Set(
|
|
4923
|
+
function De(i) {
|
|
4924
|
+
return [...new Set(i)];
|
|
4971
4925
|
}
|
|
4972
|
-
function
|
|
4973
|
-
const
|
|
4974
|
-
return
|
|
4926
|
+
function V(i, t, e = !0) {
|
|
4927
|
+
const s = U(i);
|
|
4928
|
+
return f(i) && f(t) && g(
|
|
4975
4929
|
t,
|
|
4976
4930
|
(r, o) => {
|
|
4977
|
-
const a =
|
|
4978
|
-
|
|
4931
|
+
const a = i == null ? void 0 : i[o];
|
|
4932
|
+
f(a) && f(r) ? e && Array.isArray(a) && Array.isArray(r) ? s[o] = U(De([...a, ...r])) : s[o] = V(
|
|
4979
4933
|
Array.isArray(a) ? { ...a } : a,
|
|
4980
4934
|
r,
|
|
4981
4935
|
e
|
|
4982
|
-
) :
|
|
4936
|
+
) : s[o] = f(r) ? U(r) : r;
|
|
4983
4937
|
}
|
|
4984
|
-
),
|
|
4938
|
+
), s;
|
|
4985
4939
|
}
|
|
4986
|
-
function
|
|
4987
|
-
let e =
|
|
4988
|
-
return g(t, (
|
|
4989
|
-
e = e.replace(ye(`[${r}]`), B(
|
|
4940
|
+
function ui(i, t) {
|
|
4941
|
+
let e = i;
|
|
4942
|
+
return g(t, (s, r) => {
|
|
4943
|
+
e = e.replace(ye(`[${r}]`), B(s));
|
|
4990
4944
|
}), e;
|
|
4991
4945
|
}
|
|
4992
|
-
function Le(
|
|
4946
|
+
function Le(i, t = "auto") {
|
|
4993
4947
|
switch (t) {
|
|
4994
4948
|
case "auto":
|
|
4995
|
-
return
|
|
4949
|
+
return i.naturalWidth >= i.naturalHeight;
|
|
4996
4950
|
case "width":
|
|
4997
4951
|
return !0;
|
|
4998
4952
|
case "height":
|
|
4999
4953
|
return !1;
|
|
5000
4954
|
}
|
|
5001
4955
|
}
|
|
5002
|
-
function
|
|
4956
|
+
function hi(i, t, e = "auto", s) {
|
|
5003
4957
|
var o;
|
|
5004
|
-
const r = me(
|
|
4958
|
+
const r = me(i);
|
|
5005
4959
|
if (r && (r.naturalWidth > t && (e === "auto" || e === "width") || r.naturalHeight > t && (e === "auto" || e === "height"))) {
|
|
5006
4960
|
const a = Le(r, e), u = (o = document.createElement("canvas")) == null ? void 0 : o.getContext("2d");
|
|
5007
4961
|
if (u)
|
|
5008
|
-
return u.canvas.width = a ? t : r.naturalWidth / r.naturalHeight * t, u.canvas.height = a ? r.naturalHeight / r.naturalWidth * t : t, u.drawImage(r, 0, 0, u.canvas.width, u.canvas.height), u.canvas.toDataURL(
|
|
4962
|
+
return u.canvas.width = a ? t : r.naturalWidth / r.naturalHeight * t, u.canvas.height = a ? r.naturalHeight / r.naturalWidth * t : t, u.drawImage(r, 0, 0, u.canvas.width, u.canvas.height), u.canvas.toDataURL(s);
|
|
5009
4963
|
}
|
|
5010
4964
|
}
|
|
5011
|
-
function
|
|
5012
|
-
const t = k(
|
|
4965
|
+
function li(i) {
|
|
4966
|
+
const t = k(i);
|
|
5013
4967
|
if (t > 0) {
|
|
5014
|
-
const e = String(Math.floor(t / 60)).padStart(2, "0"),
|
|
5015
|
-
return `${e}:${
|
|
4968
|
+
const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
|
|
4969
|
+
return `${e}:${s}`;
|
|
5016
4970
|
}
|
|
5017
4971
|
return "00:00";
|
|
5018
4972
|
}
|
|
5019
|
-
function
|
|
4973
|
+
function di(i, t, {
|
|
5020
4974
|
multiple: e = !1,
|
|
5021
|
-
maxlength:
|
|
4975
|
+
maxlength: s = 0,
|
|
5022
4976
|
alwaysChange: r = !0,
|
|
5023
4977
|
notEmpty: o = !1
|
|
5024
4978
|
}) {
|
|
5025
4979
|
if (e) {
|
|
5026
|
-
if (at(
|
|
5027
|
-
const a =
|
|
5028
|
-
return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!
|
|
4980
|
+
if (at(i)) {
|
|
4981
|
+
const a = i.indexOf(t), u = [...i];
|
|
4982
|
+
return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!s || i.length < s) && u.push(t), u;
|
|
5029
4983
|
}
|
|
5030
|
-
return
|
|
4984
|
+
return i === t ? [] : i ? [i, t] : [t];
|
|
5031
4985
|
}
|
|
5032
|
-
return r ||
|
|
4986
|
+
return r || i !== t ? t : i;
|
|
5033
4987
|
}
|
|
5034
|
-
function
|
|
5035
|
-
if (
|
|
4988
|
+
function gi(i, t, e) {
|
|
4989
|
+
if (f(i) && f(t)) {
|
|
5036
4990
|
if (e) {
|
|
5037
|
-
let
|
|
5038
|
-
return g(
|
|
5039
|
-
!r && (e === a || e === o) ? (r = !0,
|
|
5040
|
-
}), r ?
|
|
4991
|
+
let s = {}, r = !1;
|
|
4992
|
+
return g(i, (o, a) => {
|
|
4993
|
+
!r && (e === a || e === o) ? (r = !0, s = V(s, t)) : r ? s = V(s, { [a]: o }) : s[a] = f(o) ? U(o) : o;
|
|
4994
|
+
}), r ? s : V(i, t);
|
|
5041
4995
|
}
|
|
5042
|
-
if (
|
|
5043
|
-
return
|
|
4996
|
+
if (f(t))
|
|
4997
|
+
return V(i, t);
|
|
5044
4998
|
}
|
|
5045
|
-
return
|
|
4999
|
+
return U(i);
|
|
5046
5000
|
}
|
|
5047
|
-
function Ce(
|
|
5048
|
-
return
|
|
5001
|
+
function Ce(i) {
|
|
5002
|
+
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()}`);
|
|
5049
5003
|
}
|
|
5050
|
-
function
|
|
5051
|
-
return Ce(
|
|
5004
|
+
function fi(i) {
|
|
5005
|
+
return Ce(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
|
|
5052
5006
|
}
|
|
5053
|
-
function
|
|
5054
|
-
return
|
|
5007
|
+
function mi(i) {
|
|
5008
|
+
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());
|
|
5055
5009
|
}
|
|
5056
|
-
function
|
|
5057
|
-
const r = k(
|
|
5058
|
-
return t && o < r ? `${Bt(o, e,
|
|
5010
|
+
function yi(i, t, e, s) {
|
|
5011
|
+
const r = k(i), o = k(t);
|
|
5012
|
+
return t && o < r ? `${Bt(o, e, s)}+` : Bt(r, e, s);
|
|
5059
5013
|
}
|
|
5060
|
-
const Bt = (
|
|
5061
|
-
function ke(
|
|
5062
|
-
return 1 /
|
|
5014
|
+
const Bt = (i, t, e) => t ? new M(e).number(i) : i;
|
|
5015
|
+
function ke(i, t) {
|
|
5016
|
+
return 1 / i * t;
|
|
5063
5017
|
}
|
|
5064
|
-
function
|
|
5065
|
-
return ke(
|
|
5018
|
+
function $i(i, t) {
|
|
5019
|
+
return ke(i, t) * 100;
|
|
5066
5020
|
}
|
|
5067
|
-
function
|
|
5021
|
+
function pi(i) {
|
|
5068
5022
|
let t = "";
|
|
5069
|
-
for (const e of
|
|
5023
|
+
for (const e of i)
|
|
5070
5024
|
t += String.fromCharCode(e);
|
|
5071
|
-
return l() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(
|
|
5025
|
+
return l() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(i).toString("base64") : "";
|
|
5072
5026
|
}
|
|
5073
|
-
async function
|
|
5027
|
+
async function bi(i) {
|
|
5074
5028
|
if (l())
|
|
5075
5029
|
try {
|
|
5076
|
-
await navigator.clipboard.writeText(
|
|
5030
|
+
await navigator.clipboard.writeText(i);
|
|
5077
5031
|
} catch (t) {
|
|
5078
|
-
document == null || document.execCommand(
|
|
5032
|
+
document == null || document.execCommand(i);
|
|
5079
5033
|
}
|
|
5080
5034
|
}
|
|
5081
5035
|
export {
|
|
5082
|
-
|
|
5036
|
+
H as Api,
|
|
5083
5037
|
Vt as ApiDefault,
|
|
5084
5038
|
Zt as ApiHeaders,
|
|
5085
5039
|
L as ApiMethodItem,
|
|
@@ -5089,127 +5043,126 @@ export {
|
|
|
5089
5043
|
Ee as BroadcastMessage,
|
|
5090
5044
|
Qt as Cache,
|
|
5091
5045
|
Mt as CacheItem,
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5046
|
+
bt as CacheStatic,
|
|
5047
|
+
wt as Cookie,
|
|
5048
|
+
xt as CookieBlock,
|
|
5049
|
+
T as DataStorage,
|
|
5096
5050
|
ut as Datetime,
|
|
5097
|
-
Be as ElementScreenshot,
|
|
5098
5051
|
mt as EventItem,
|
|
5099
5052
|
n as GEO_FLAG_ICON_NAME,
|
|
5100
|
-
|
|
5053
|
+
p as Geo,
|
|
5101
5054
|
vt as GeoFlag,
|
|
5102
|
-
|
|
5055
|
+
M as GeoIntl,
|
|
5103
5056
|
St as GeoPhone,
|
|
5104
|
-
|
|
5057
|
+
Be as Global,
|
|
5105
5058
|
Dt as Hash,
|
|
5106
5059
|
kt as Icons,
|
|
5107
5060
|
I as Loading,
|
|
5108
|
-
|
|
5061
|
+
Ie as Meta,
|
|
5109
5062
|
ht as MetaManager,
|
|
5110
5063
|
ae as MetaOg,
|
|
5111
5064
|
re as MetaOpenGraphAge,
|
|
5112
|
-
|
|
5113
|
-
|
|
5065
|
+
ie as MetaOpenGraphAvailability,
|
|
5066
|
+
se as MetaOpenGraphCondition,
|
|
5114
5067
|
ne as MetaOpenGraphGender,
|
|
5115
|
-
|
|
5068
|
+
y as MetaOpenGraphTag,
|
|
5116
5069
|
ee as MetaOpenGraphType,
|
|
5117
5070
|
te as MetaRobots,
|
|
5118
5071
|
D as MetaTag,
|
|
5119
5072
|
ce as MetaTwitter,
|
|
5120
5073
|
oe as MetaTwitterCard,
|
|
5121
|
-
|
|
5074
|
+
$ as MetaTwitterTag,
|
|
5122
5075
|
ot as ScrollbarWidth,
|
|
5123
5076
|
le as TRANSLATE_GLOBAL_PREFIX,
|
|
5124
|
-
|
|
5077
|
+
Nt as Translate,
|
|
5125
5078
|
de as anyToString,
|
|
5126
5079
|
he as applyTemplate,
|
|
5127
5080
|
ge as arrFill,
|
|
5128
5081
|
Fe as blobToBase64,
|
|
5129
|
-
|
|
5082
|
+
U as copyObject,
|
|
5130
5083
|
C as copyObjectLite,
|
|
5131
|
-
|
|
5084
|
+
_ as createElement,
|
|
5132
5085
|
Re as domQuerySelector,
|
|
5133
|
-
|
|
5086
|
+
xe as domQuerySelectorAll,
|
|
5134
5087
|
Gt as encodeAttribute,
|
|
5135
|
-
|
|
5088
|
+
Pe as eventStopPropagation,
|
|
5136
5089
|
B as executeFunction,
|
|
5137
5090
|
Kt as executePromise,
|
|
5138
5091
|
g as forEach,
|
|
5139
5092
|
fe as frame,
|
|
5140
|
-
|
|
5093
|
+
We as getAttributes,
|
|
5141
5094
|
je as getClipboardData,
|
|
5142
5095
|
_t as getColumn,
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5096
|
+
Ue as getCurrentDate,
|
|
5097
|
+
N as getElement,
|
|
5098
|
+
He as getElementId,
|
|
5146
5099
|
me as getElementImage,
|
|
5147
5100
|
Ot as getElementItem,
|
|
5148
5101
|
ft as getElementOrWindow,
|
|
5149
5102
|
ye as getExp,
|
|
5150
5103
|
pe as getItemByPath,
|
|
5151
|
-
|
|
5104
|
+
ze as getKey,
|
|
5152
5105
|
Pt as getLengthOfAllArray,
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5106
|
+
Ze as getMaxLengthAllArray,
|
|
5107
|
+
Ve as getMinLengthAllArray,
|
|
5108
|
+
Ke as getMouseClient,
|
|
5109
|
+
be as getMouseClientX,
|
|
5110
|
+
we as getMouseClientY,
|
|
5111
|
+
Ye as getObjectByKeys,
|
|
5112
|
+
qe as getObjectNoUndefined,
|
|
5113
|
+
Je as getObjectOrNone,
|
|
5114
|
+
Me as getRandomText,
|
|
5162
5115
|
It as getRequestString,
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5116
|
+
Qe as getStepPercent,
|
|
5117
|
+
Xe as getStepValue,
|
|
5118
|
+
_e as goScroll,
|
|
5119
|
+
Oe as goScrollSmooth,
|
|
5120
|
+
Te as goScrollTo,
|
|
5121
|
+
Ge as inArray,
|
|
5122
|
+
ti as initScrollbarOffset,
|
|
5123
|
+
ei as intersectKey,
|
|
5171
5124
|
at as isArray,
|
|
5172
|
-
|
|
5125
|
+
ii as isDifferent,
|
|
5173
5126
|
nt as isDomData,
|
|
5174
5127
|
l as isDomRuntime,
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5128
|
+
si as isEnter,
|
|
5129
|
+
v as isFilled,
|
|
5130
|
+
ri as isFloat,
|
|
5178
5131
|
ct as isFunction,
|
|
5179
5132
|
zt as isInDom,
|
|
5180
5133
|
Se as isInput,
|
|
5181
|
-
|
|
5182
|
-
|
|
5134
|
+
ni as isIntegerBetween,
|
|
5135
|
+
J as isNull,
|
|
5183
5136
|
dt as isNumber,
|
|
5184
|
-
|
|
5185
|
-
|
|
5137
|
+
f as isObject,
|
|
5138
|
+
A as isObjectNotArray,
|
|
5186
5139
|
rt as isSelected,
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5140
|
+
oi as isSelectedByList,
|
|
5141
|
+
x as isString,
|
|
5142
|
+
Ft as isWindow,
|
|
5143
|
+
q as random,
|
|
5144
|
+
ai as removeCommonPrefix,
|
|
5145
|
+
ci as replaceComponentName,
|
|
5146
|
+
V as replaceRecursive,
|
|
5147
|
+
ui as replaceTemplate,
|
|
5148
|
+
hi as resizeImageByMax,
|
|
5149
|
+
li as secondToTime,
|
|
5197
5150
|
Tt as setElementItem,
|
|
5198
|
-
|
|
5199
|
-
|
|
5151
|
+
di as setValues,
|
|
5152
|
+
gi as splice,
|
|
5200
5153
|
ve as strFill,
|
|
5201
5154
|
$e as strSplit,
|
|
5202
|
-
|
|
5155
|
+
z as toArray,
|
|
5203
5156
|
Ce as toCamelCase,
|
|
5204
|
-
|
|
5157
|
+
fi as toCamelCaseFirst,
|
|
5205
5158
|
F as toDate,
|
|
5206
|
-
|
|
5159
|
+
mi as toKebabCase,
|
|
5207
5160
|
k as toNumber,
|
|
5208
|
-
|
|
5161
|
+
yi as toNumberByMax,
|
|
5209
5162
|
ke as toPercent,
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5163
|
+
$i as toPercentBy100,
|
|
5164
|
+
Rt as transformation,
|
|
5165
|
+
pi as uint8ArrayToBase64,
|
|
5213
5166
|
De as uniqueArray,
|
|
5214
|
-
|
|
5167
|
+
bi as writeClipboardData
|
|
5215
5168
|
};
|