rc-lib-ui 1.2.12 → 1.2.14
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/NetworkAndSocket/Socket/components/hooks/useNetworkStatus/useNetworkStatus.d.ts +0 -2
- package/dist/browser-DJTk47DY.js +12 -0
- package/dist/control-cards.js +26 -25
- package/dist/dashboard.js +178 -196
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useShowPanel.d.ts +12 -0
- package/dist/hooks.js +35 -0
- package/dist/{index-W5Yj75IK.js → index-80JSxasr.js} +884 -751
- package/dist/index-B7GqTJat.js +23 -0
- package/dist/socket.js +6 -5
- package/package.json +7 -3
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
function valid(t) {
|
|
3
|
-
return uuidPattern.test(t);
|
|
4
|
-
}
|
|
5
|
-
function uuid4() {
|
|
6
|
-
var t = URL.createObjectURL(new Blob()), e = t.toString();
|
|
7
|
-
return URL.revokeObjectURL(t), e.split(/[:\/]/g).pop().toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
uuid4.valid = valid;
|
|
10
|
-
var v = Object.defineProperty, M = (t, e, r) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, c = (t, e, r) => (M(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
1
|
+
var k = Object.defineProperty, M = (t, e, r) => e in t ? k(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, c = (t, e, r) => (M(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
11
2
|
const h = class {
|
|
12
3
|
static isBrightAndVivid(e) {
|
|
13
|
-
const [r,
|
|
14
|
-
return
|
|
4
|
+
const [r, n, o] = this.hexToRgb(e), s = this.rgbaToHsla(r, n, o, 1);
|
|
5
|
+
return s.l >= this.MIN_LIGHTNESS && s.s >= this.MIN_SATURATION;
|
|
15
6
|
}
|
|
16
7
|
};
|
|
17
8
|
c(h, "componentToHex", (t) => {
|
|
@@ -30,8 +21,8 @@ c(h, "componentToHex", (t) => {
|
|
|
30
21
|
*/
|
|
31
22
|
c(h, "rgbToHsv", (t, e, r) => {
|
|
32
23
|
t /= 255, e /= 255, r /= 255;
|
|
33
|
-
const
|
|
34
|
-
return [60 * (
|
|
24
|
+
const n = Math.max(t, e, r), o = n - Math.min(t, e, r), s = o && (n === t ? (e - r) / o : n == e ? 2 + (r - t) / o : 4 + (t - e) / o);
|
|
25
|
+
return [60 * (s < 0 ? s + 6 : s), n && o / n, n];
|
|
35
26
|
}), /**
|
|
36
27
|
* @param h [0, 360]
|
|
37
28
|
* @param s [0, 1]
|
|
@@ -39,21 +30,21 @@ c(h, "rgbToHsv", (t, e, r) => {
|
|
|
39
30
|
* @returns r, g, b in [0, 255]
|
|
40
31
|
*/
|
|
41
32
|
c(h, "hsvToRgb", (t, e, r) => {
|
|
42
|
-
const
|
|
43
|
-
return [
|
|
33
|
+
const n = (o, s = (o + t / 60) % 6) => Math.round((r - r * e * Math.max(Math.min(s, 4 - s, 1), 0)) * 255);
|
|
34
|
+
return [n(5), n(3), n(1)];
|
|
44
35
|
}), /**
|
|
45
36
|
* @returns h [0, 360], s [0, 100], l [0, 100], a [0, 1]
|
|
46
37
|
*/
|
|
47
|
-
c(h, "rgbaToHsla", (t, e, r,
|
|
38
|
+
c(h, "rgbaToHsla", (t, e, r, n = 1) => {
|
|
48
39
|
t /= 255, e /= 255, r /= 255;
|
|
49
|
-
const
|
|
40
|
+
const o = Math.max(t, e, r), s = Math.min(t, e, r);
|
|
50
41
|
let i = 0, a;
|
|
51
|
-
const l = (
|
|
52
|
-
if (
|
|
42
|
+
const l = (o + s) / 2;
|
|
43
|
+
if (o === s)
|
|
53
44
|
i = a = 0;
|
|
54
45
|
else {
|
|
55
|
-
const u =
|
|
56
|
-
switch (a = l > 0.5 ? u / (2 -
|
|
46
|
+
const u = o - s;
|
|
47
|
+
switch (a = l > 0.5 ? u / (2 - o - s) : u / (o + s), o) {
|
|
57
48
|
case t:
|
|
58
49
|
i = (e - r) / u + (e < r ? 6 : 0);
|
|
59
50
|
break;
|
|
@@ -70,7 +61,7 @@ c(h, "rgbaToHsla", (t, e, r, s = 1) => {
|
|
|
70
61
|
h: i * 360,
|
|
71
62
|
s: a * 100,
|
|
72
63
|
l: l * 100,
|
|
73
|
-
a:
|
|
64
|
+
a: n
|
|
74
65
|
};
|
|
75
66
|
}), /**
|
|
76
67
|
* Converts an HSL color value to RGB. Conversion formula
|
|
@@ -81,92 +72,92 @@ c(h, "rgbaToHsla", (t, e, r, s = 1) => {
|
|
|
81
72
|
* @param {number} l The lightness [0, 1]
|
|
82
73
|
* @return {Array} The RGB representation [0, 255]
|
|
83
74
|
*/
|
|
84
|
-
c(h, "hslaToRgba", (t, e, r,
|
|
75
|
+
c(h, "hslaToRgba", (t, e, r, n) => {
|
|
85
76
|
t /= 360, e /= 100, r /= 100;
|
|
86
|
-
let
|
|
77
|
+
let o, s, i;
|
|
87
78
|
if (e === 0)
|
|
88
|
-
|
|
79
|
+
o = s = i = r;
|
|
89
80
|
else {
|
|
90
|
-
const a = function(d,
|
|
91
|
-
return b < 0 && (b += 1), b > 1 && (b -= 1), b < 0.16666666666666666 ? d + (
|
|
81
|
+
const a = function(d, g, b) {
|
|
82
|
+
return b < 0 && (b += 1), b > 1 && (b -= 1), b < 0.16666666666666666 ? d + (g - d) * 6 * b : b < 0.5 ? g : b < 0.6666666666666666 ? d + (g - d) * (0.6666666666666666 - b) * 6 : d;
|
|
92
83
|
}, l = r < 0.5 ? r * (1 + e) : r + e - r * e, u = 2 * r - l;
|
|
93
|
-
|
|
84
|
+
o = a(u, l, t + 1 / 3), s = a(u, l, t), i = a(u, l, t - 1 / 3);
|
|
94
85
|
}
|
|
95
|
-
return [
|
|
86
|
+
return [o, s, i, n].map((a) => Math.round(a * 255));
|
|
96
87
|
}), c(h, "hslaStringToRgba", (t) => {
|
|
97
|
-
const e = t.slice(5, -1).split(", "), r = Number(e.pop()),
|
|
98
|
-
return h.hslaToRgba(
|
|
88
|
+
const e = t.slice(5, -1).split(", "), r = Number(e.pop()), n = e.map((o) => o.endsWith("%") ? +o.slice(0, -1) : +o);
|
|
89
|
+
return h.hslaToRgba(n[0], n[1], n[2], r);
|
|
99
90
|
}), c(h, "hexaToRgba", (t, e) => {
|
|
100
|
-
const r = [],
|
|
101
|
-
if (t.length === 5 +
|
|
102
|
-
for (let
|
|
103
|
-
r.push(parseInt(t[
|
|
104
|
-
else if (t.length === 4 +
|
|
105
|
-
for (let
|
|
106
|
-
r.push(parseInt(t[
|
|
91
|
+
const r = [], n = t[0] === "#" ? 1 : 0;
|
|
92
|
+
if (t.length === 5 + n && (t = (n ? "#" : "") + "0" + t.slice(n)), t.length === 3 + n)
|
|
93
|
+
for (let o = n; o < t.length; ++o)
|
|
94
|
+
r.push(parseInt(t[o] + t[o], 16));
|
|
95
|
+
else if (t.length === 4 + n) {
|
|
96
|
+
for (let o = n; o < t.length - 1; ++o)
|
|
97
|
+
r.push(parseInt(t[o] + t[o], 16));
|
|
107
98
|
r.push(parseInt(t[t.length - 1], 16));
|
|
108
99
|
} else
|
|
109
|
-
for (let
|
|
110
|
-
r.push(parseInt(t.slice(
|
|
100
|
+
for (let o = n; o < t.length; o += 2)
|
|
101
|
+
r.push(parseInt(t.slice(o, o + 2), 16));
|
|
111
102
|
return e && r.length === 4 && (r[3] = Math.round(r[3] / 255 * 100) / 100), r;
|
|
112
103
|
}), c(h, "hexaToHsla", (t) => {
|
|
113
104
|
const e = h.hexaToRgba(t);
|
|
114
105
|
return h.rgbaToHsla(e[0], e[1], e[2], e[3]);
|
|
115
106
|
}), c(h, "hexToRgb", (t) => h.hexaToRgba(t.slice(0, 7))), c(h, "rgbaToHexa", (t) => {
|
|
116
|
-
const e = [...t], r = e.pop(),
|
|
117
|
-
return "#" + e.map((
|
|
107
|
+
const e = [...t], r = e.pop(), n = Math.round(Math.min(Math.max(r ?? 1, 0), 1) * 255);
|
|
108
|
+
return "#" + e.map((o) => ("0" + o.toString(16)).slice(-2)).join("") + n.toString(16);
|
|
118
109
|
}), c(h, "hslaStringToHexa", (t) => h.rgbaToHexa(h.hslaStringToRgba(t))), c(h, "hslaStringToHex", (t) => h.hslaStringToHexa(t).slice(0, -2)), /**
|
|
119
110
|
* @param weight [0, 1]
|
|
120
111
|
*/
|
|
121
112
|
c(h, "mixColors", (t, e, r) => {
|
|
122
|
-
const
|
|
123
|
-
for (let
|
|
124
|
-
const
|
|
125
|
-
|
|
113
|
+
const n = new Array(3);
|
|
114
|
+
for (let o = 0; o < 3; ++o) {
|
|
115
|
+
const s = t[o], i = e[o];
|
|
116
|
+
n[o] = Math.floor(i + (s - i) * r);
|
|
126
117
|
}
|
|
127
|
-
return
|
|
118
|
+
return n;
|
|
128
119
|
}), c(h, "getRgbByTypeBrightness", (t) => ({
|
|
129
120
|
BT601: [0.299, 0.587, 0.114],
|
|
130
121
|
BT709: [0.2126, 0.7152, 0.0722],
|
|
131
122
|
BT2020: [0.2627, 0.678, 0.0593]
|
|
132
|
-
})[t]), c(h, "getAverageColor", (t, e) => t.map((r,
|
|
133
|
-
const
|
|
134
|
-
return
|
|
135
|
-
}), c(h, "changeColorAccent", (t, e, r,
|
|
136
|
-
const
|
|
137
|
-
if (Math.min(Math.abs(
|
|
123
|
+
})[t]), c(h, "getAverageColor", (t, e) => t.map((r, n) => Math.round((r + e[n]) / 2))), c(h, "getAccentColor", (t, e, r) => {
|
|
124
|
+
const n = h.rgbToHsv(...e), o = h.rgbToHsv(...r), s = Math.min(1.5 * n[1] / t[1], 1);
|
|
125
|
+
return n[0] = Math.min(360, o[0] - n[0] + t[0]), n[1] = Math.min(1, o[1] * t[1] / n[1]), n[2] = Math.min(1, (o[2] / n[2] + s - 1) * t[2] / s), n[2] < 0.3 ? r : h.hsvToRgb(...n);
|
|
126
|
+
}), c(h, "changeColorAccent", (t, e, r, n) => {
|
|
127
|
+
const o = h.rgbToHsv(...r);
|
|
128
|
+
if (Math.min(Math.abs(o[0] - t[0]), Math.abs(o[0] - t[0] - 360)) > 30)
|
|
138
129
|
return r;
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
let i = h.hsvToRgb(...
|
|
130
|
+
const s = t[1] ? Math.min(1.5 * o[1] / t[1], 1) : 0;
|
|
131
|
+
o[0] = Math.min(360, o[0] + e[0] - t[0]), o[1] = t[1] ? Math.min(1, o[1] * e[1] / t[1]) : 0, o[2] = t[2] ? Math.min(1, o[2] * (1 - s + s * e[2] / t[2])) : 0;
|
|
132
|
+
let i = h.hsvToRgb(...o);
|
|
142
133
|
const a = h.calculateBrightness(r), l = h.calculateBrightness(i);
|
|
143
|
-
if (
|
|
134
|
+
if (n ? a > l : a < l) {
|
|
144
135
|
const u = 0.4 * a / l + 0.6;
|
|
145
136
|
i = h.changeBrightness(i, u);
|
|
146
137
|
}
|
|
147
138
|
return i;
|
|
148
139
|
}), c(h, "changeBrightness", (t, e) => t.map((r) => h.clamp(Math.round(r * e), 0, 255))), c(h, "hexBrightness", (t, e) => {
|
|
149
|
-
const r = h.hexToRgb(t),
|
|
150
|
-
return h.rgbToHex(
|
|
140
|
+
const r = h.hexToRgb(t), n = h.changeBrightness(r, e), [o, s, i] = n;
|
|
141
|
+
return h.rgbToHex(o, s, i);
|
|
151
142
|
}), c(h, "getHexColorFromTelegramColor", (t) => {
|
|
152
143
|
const e = (t < 0 ? 16777215 + t : t).toString(16);
|
|
153
144
|
return "#" + (e.length >= 6 ? e : "0".repeat(6 - e.length) + e);
|
|
154
145
|
}), c(h, "getRgbColorFromTelegramColor", (t) => h.hexToRgb(h.getHexColorFromTelegramColor(t))), c(h, "rgbaToRgb", (t, e) => {
|
|
155
146
|
const r = t[3];
|
|
156
|
-
return t.slice(0, 3).map((
|
|
147
|
+
return t.slice(0, 3).map((n, o) => h.clamp(Math.round((r * (n / 255) + r * (e[o] / 255)) * 255), 0, 255));
|
|
157
148
|
}), c(h, "calculateBrightness", (t, e = "BT709") => {
|
|
158
|
-
const [r,
|
|
159
|
-
return
|
|
149
|
+
const [r, n, o] = t, s = h.getRgbByTypeBrightness(e);
|
|
150
|
+
return s[0] * r / 255 + s[1] * n / 255 + s[2] * o / 255;
|
|
160
151
|
}), c(h, "getTextColor", (t) => t > 0.5 ? [0, 0, 0] : [255, 255, 255]), c(h, "MIN_SATURATION", 50), c(h, "MIN_LIGHTNESS", 44), c(h, "calculateOpacity", (t, e) => {
|
|
161
|
-
const r = t > 0.5 ? 0 : 1,
|
|
162
|
-
return +Math.max(0.5, Math.min(0.64,
|
|
152
|
+
const r = t > 0.5 ? 0 : 1, n = (t - r + e) / e;
|
|
153
|
+
return +Math.max(0.5, Math.min(0.64, n)).toFixed(2);
|
|
163
154
|
}), c(h, "increaseSaturation", (t, e = 1.3) => {
|
|
164
155
|
if (typeof t == "string") {
|
|
165
|
-
const r = h.hexToRgb(t), [
|
|
156
|
+
const r = h.hexToRgb(t), [n, o, s] = h.rgbToHsv(...r), i = Math.min(1, o * e), a = h.hsvToRgb(n, i, s);
|
|
166
157
|
return h.rgbToHex(...a);
|
|
167
158
|
} else {
|
|
168
|
-
const [r,
|
|
169
|
-
return h.hsvToRgb(r,
|
|
159
|
+
const [r, n, o] = h.rgbToHsv(t[0], t[1], t[2]), s = Math.min(1, n * e);
|
|
160
|
+
return h.hsvToRgb(r, s, o);
|
|
170
161
|
}
|
|
171
162
|
}), c(h, "clamp", (t, e, r) => Math.min(r, Math.max(e, t))), c(h, "isHex", (t) => {
|
|
172
163
|
if (typeof t != "string")
|
|
@@ -190,18 +181,18 @@ c(h, "mixColors", (t, e, r) => {
|
|
|
190
181
|
}), c(h, "generateRGB", () => Array.from({ length: 3 }, () => Math.floor(Math.random() * 128 + 128))), c(h, "brightColor", (t = 1.3) => {
|
|
191
182
|
let e = 0, r;
|
|
192
183
|
do {
|
|
193
|
-
const [
|
|
194
|
-
if (r = `#${
|
|
184
|
+
const [n, o, s] = h.generateRGB();
|
|
185
|
+
if (r = `#${n.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}${s.toString(16).padStart(2, "0")}`, r = h.increaseSaturation(r, t), e++, e > 100)
|
|
195
186
|
break;
|
|
196
187
|
} while (!h.isBrightAndVivid(r));
|
|
197
188
|
return r;
|
|
198
189
|
}), c(h, "hslToHex", (t, e, r) => {
|
|
199
|
-
const
|
|
200
|
-
return h.rgbToHex(
|
|
190
|
+
const n = h.hslaToRgba(t, e, r, 1), [o, s, i] = n.slice(0, 3);
|
|
191
|
+
return h.rgbToHex(o, s, i);
|
|
201
192
|
}), c(h, "generatePleasantColor", (t = {}) => {
|
|
202
|
-
const { baseColor: e, saturation: r = 50, lightness:
|
|
193
|
+
const { baseColor: e, saturation: r = 50, lightness: n = 50, hueShift: o = 0, randomize: s = !1 } = t;
|
|
203
194
|
let i, a, l;
|
|
204
|
-
return e ? (i = (h.hexaToHsla(e).h +
|
|
195
|
+
return e ? (i = (h.hexaToHsla(e).h + o) % 360, s ? (a = Math.max(30, Math.min(90, r + (Math.random() * 40 - 20))), l = Math.max(40, Math.min(80, n + (Math.random() * 30 - 15)))) : (a = r, l = n)) : (i = Math.floor(Math.random() * 360), a = r + Math.random() * 20, l = n + Math.random() * 20), (i >= 20 && i <= 50 || i >= 60 && i <= 140) && (i = (i + 100) % 360), n < 100 && (a = Math.max(a, 15), l > 95 && (l = 95 - Math.random() * 10), a < 20 && l > 90 && (i = (i + 180) % 360, a = Math.max(25, a))), h.hslToHex(i, a, l);
|
|
205
196
|
}), c(h, "generate", {
|
|
206
197
|
rgb: h.generateRGB,
|
|
207
198
|
hex: h.generateHex,
|
|
@@ -214,31 +205,31 @@ let Color = h;
|
|
|
214
205
|
const itemsMonths = ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], itemsWeek = ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"], _DateProcessing = class {
|
|
215
206
|
};
|
|
216
207
|
c(_DateProcessing, "getActiveColorClassInDiffDate", (t, e, r) => {
|
|
217
|
-
let
|
|
218
|
-
return t && e && _DateProcessing.hasDateLessPeriod(t, e) && (
|
|
208
|
+
let n = "";
|
|
209
|
+
return t && e && _DateProcessing.hasDateLessPeriod(t, e) && (n = r), n;
|
|
219
210
|
}), c(_DateProcessing, "getClassByDifferenceDay", (t, e) => {
|
|
220
|
-
let r = "",
|
|
221
|
-
for (let
|
|
222
|
-
let
|
|
211
|
+
let r = "", n = e.sort((o, s) => o.diffDay - s.diffDay);
|
|
212
|
+
for (let o = 0; o < n.length; o++) {
|
|
213
|
+
let s = n[o];
|
|
223
214
|
const i = _DateProcessing.getDifferenceDates(t, _DateProcessing.getCurrentDate());
|
|
224
|
-
if (
|
|
225
|
-
r =
|
|
215
|
+
if (s.diffDay < i) {
|
|
216
|
+
r = s.className;
|
|
226
217
|
break;
|
|
227
218
|
}
|
|
228
219
|
}
|
|
229
220
|
return r;
|
|
230
221
|
}), c(_DateProcessing, "getMinMaxDate", (t, e, r) => {
|
|
231
|
-
let
|
|
232
|
-
return /^\d{2}\.\d{2}\.\d{4}$/.test(t) || /^\d{2}\.\d{2}$/.test(t) ? (!e && !r ? (
|
|
222
|
+
let n = { minDate: "", maxDate: "", minMaxMonth: "" };
|
|
223
|
+
return /^\d{2}\.\d{2}\.\d{4}$/.test(t) || /^\d{2}\.\d{2}$/.test(t) ? (!e && !r ? (n.minDate = t, n.maxDate = t) : e ? r ? e && r && (n.minDate = _DateProcessing.hasDateLessPeriod(t, e, { dateMinMax: "<=" }) ? t : e, n.maxDate = _DateProcessing.hasDateLessPeriod(t, r, { dateMinMax: ">=" }) ? t : r) : (n.minDate = _DateProcessing.hasDateLessPeriod(t, e, { dateMinMax: "<=" }) ? t : e, n.maxDate = t) : (n.minDate = t, n.maxDate = _DateProcessing.hasDateLessPeriod(t, r, { dateMinMax: ">=" }) ? t : r), { ...n, ..._DateProcessing.minMaxMountStr(n) }) : (console.error('функция getMinMaxDate >> формат дат не соответствует формату: "дд.мм.гггг"'), { minDate: e, maxDate: r, ..._DateProcessing.minMaxMountStr(n) });
|
|
233
224
|
}), c(_DateProcessing, "splitDateFromTime", (t) => t.split(t.includes("T") ? "T" : " ")), c(_DateProcessing, "getCorrectDateAndTime", (t) => {
|
|
234
|
-
let e = t.match(/\D/), r,
|
|
235
|
-
e && e[0] === ":" ? [r,
|
|
236
|
-
let
|
|
237
|
-
return
|
|
225
|
+
let e = t.match(/\D/), r, n;
|
|
226
|
+
e && e[0] === ":" ? [r, n] = _DateProcessing.splitDateFromTime(t) : [n, r] = _DateProcessing.splitDateFromTime(t), n = _DateProcessing.correctionDateAndRemoveYear(n, { isYear: !0 });
|
|
227
|
+
let o = r.split(":");
|
|
228
|
+
return o.length === 3 && (o.length = 2, r = o.join(":")), [n, r];
|
|
238
229
|
}), c(_DateProcessing, "reverseDate", (t) => t.split("-").reverse().join("-")), c(_DateProcessing, "correctionDataISO8601", (t) => {
|
|
239
230
|
let e = "";
|
|
240
231
|
if (_DateProcessing.isDateDMY(t)) {
|
|
241
|
-
let [r,
|
|
232
|
+
let [r, n] = _DateProcessing.splitDateFromTime(t);
|
|
242
233
|
e = r.split(".").reverse().join("-");
|
|
243
234
|
} else if (_DateProcessing.isDateISO8601(t))
|
|
244
235
|
e = t;
|
|
@@ -248,13 +239,13 @@ c(_DateProcessing, "getActiveColorClassInDiffDate", (t, e, r) => {
|
|
|
248
239
|
}), c(_DateProcessing, "isDateDMY", (t) => /^\d{2}\.\d{2}\.\d{4}$/.test(t) || /^\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2}$/.test(t)), c(_DateProcessing, "isDateISO8601", (t) => /^\d{4}-\d{2}-\d{2}$/.test(t) || /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/.test(t)), c(_DateProcessing, "correctionDateAndRemoveYear", (t, e) => {
|
|
249
240
|
const r = !!(e != null && e.isYear);
|
|
250
241
|
t = _DateProcessing.correctionDataISO8601(t);
|
|
251
|
-
let
|
|
252
|
-
return r || (
|
|
242
|
+
let n = t.split("-").reverse(), o = n;
|
|
243
|
+
return r || (o = n.slice(0, 2)), o.join(".");
|
|
253
244
|
}), c(_DateProcessing, "correctionDateWithOutCurrentYear", (t, e) => {
|
|
254
245
|
const r = !!(e != null && e.shortYear);
|
|
255
246
|
t = _DateProcessing.correctionDataISO8601(t);
|
|
256
|
-
const
|
|
257
|
-
return
|
|
247
|
+
const n = +_DateProcessing.getChunkFromDate(t, "year") == +_DateProcessing.getChunkFromDate(_DateProcessing.getCurrentDate(), "year");
|
|
248
|
+
return n ? _DateProcessing.correctionDateAndRemoveYear(t, { isYear: !n }) : r ? _DateProcessing.correctionShortYear(t) : _DateProcessing.correctionDateAndRemoveYear(t, { isYear: !0 });
|
|
258
249
|
}), c(_DateProcessing, "correctionShortYear", (t) => {
|
|
259
250
|
const e = _DateProcessing.splitDateFromTime(t)[0].split("-").reverse(), r = e.splice(-1);
|
|
260
251
|
return `${e.join(".")}.${r[0].slice(2)}`;
|
|
@@ -263,12 +254,12 @@ c(_DateProcessing, "getActiveColorClassInDiffDate", (t, e, r) => {
|
|
|
263
254
|
date = _DateProcessing.correctionDataISO8601(date), period = _DateProcessing.correctionDataISO8601(period);
|
|
264
255
|
const str = `${Math.floor(Number(new Date(date)))} ${dateMinMax} ${Math.floor(Number(new Date(period)))}`, result = eval(str);
|
|
265
256
|
return result;
|
|
266
|
-
}), c(_DateProcessing, "hasDateLessPeriods", (t, e, r,
|
|
267
|
-
one: _DateProcessing.hasDateLessPeriod(t, r,
|
|
268
|
-
two: _DateProcessing.hasDateLessPeriod(e, r,
|
|
257
|
+
}), c(_DateProcessing, "hasDateLessPeriods", (t, e, r, n) => ({
|
|
258
|
+
one: _DateProcessing.hasDateLessPeriod(t, r, n),
|
|
259
|
+
two: _DateProcessing.hasDateLessPeriod(e, r, n)
|
|
269
260
|
})), c(_DateProcessing, "getDifferenceDates", (t, e) => {
|
|
270
|
-
const r = new Date(_DateProcessing.correctionDataISO8601(t)),
|
|
271
|
-
return Math.round(
|
|
261
|
+
const r = new Date(_DateProcessing.correctionDataISO8601(t)), n = new Date(_DateProcessing.correctionDataISO8601(e)), o = 1e3 * 60 * 60 * 24, s = n.getTime() - r.getTime();
|
|
262
|
+
return Math.round(s / o);
|
|
272
263
|
}), /**
|
|
273
264
|
* @param {string} startISODateTime - Начальная дата и время в ISO формате или формате 'YYYY-MM-DD HH:mm:ss'
|
|
274
265
|
* Пример: '2024-01-15T11:20:00' или '2024-01-15 11:20:00'
|
|
@@ -280,32 +271,32 @@ c(_DateProcessing, "getActiveColorClassInDiffDate", (t, e, r) => {
|
|
|
280
271
|
* getTimeDifference('2024-01-15T11:20:00', '2024-02-16T11:27:36');
|
|
281
272
|
*/
|
|
282
273
|
c(_DateProcessing, "calculateTimeDifference", (t, e) => {
|
|
283
|
-
const r = new Date(t),
|
|
274
|
+
const r = new Date(t), n = new Date(e) - r, o = Math.floor(n / 1e3), s = Math.floor(o / (3600 * 24)), i = Math.floor(o % (3600 * 24) / 3600), a = Math.floor(o % 3600 / 60), l = o % 60;
|
|
284
275
|
return {
|
|
285
|
-
totalSeconds:
|
|
286
|
-
formatted: `${
|
|
276
|
+
totalSeconds: o,
|
|
277
|
+
formatted: `${s} дней ${i.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`,
|
|
287
278
|
formattedShort: `${i.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`,
|
|
288
|
-
days:
|
|
279
|
+
days: s,
|
|
289
280
|
hours: i,
|
|
290
281
|
minutes: a,
|
|
291
282
|
seconds: l
|
|
292
283
|
};
|
|
293
284
|
}), c(_DateProcessing, "hasDateLessInNumber", (t, e, r) => {
|
|
294
|
-
const
|
|
295
|
-
return r <=
|
|
285
|
+
const n = _DateProcessing.getDifferenceDates(t, e);
|
|
286
|
+
return r <= n;
|
|
296
287
|
}), c(_DateProcessing, "correctionCurrentYear", (t, e) => {
|
|
297
|
-
const r = /* @__PURE__ */ new Date(),
|
|
298
|
-
return t.map((
|
|
288
|
+
const r = /* @__PURE__ */ new Date(), n = e || r.getFullYear();
|
|
289
|
+
return t.map((o) => _DateProcessing.hasDateLessPeriod(`${e}-${o}`, r.toJSON().split("T")[0], { dateMinMax: ">" }) ? `${n - 1}-${o}` : `${e}-${o}`);
|
|
299
290
|
}), c(_DateProcessing, "getChunkFromDate", (t, e, r) => {
|
|
300
291
|
t = _DateProcessing.correctionDataISO8601(t);
|
|
301
|
-
const
|
|
292
|
+
const n = t.split("-");
|
|
302
293
|
switch (e) {
|
|
303
294
|
case "day":
|
|
304
|
-
return r != null && r.isBeforeZero ?
|
|
295
|
+
return r != null && r.isBeforeZero ? n[2] : String(parseInt(n[2]));
|
|
305
296
|
case "month":
|
|
306
|
-
return r != null && r.isBeforeZero ?
|
|
297
|
+
return r != null && r.isBeforeZero ? n[1] : String(parseInt(n[1]));
|
|
307
298
|
case "year":
|
|
308
|
-
return
|
|
299
|
+
return n[0];
|
|
309
300
|
}
|
|
310
301
|
}), c(_DateProcessing, "getNameMonthByNumber", (t) => t > 0 && t < 13 ? itemsMonths[Number(t) - 1] : itemsMonths[0]), c(_DateProcessing, "minMaxMountStr", (t) => ({
|
|
311
302
|
minMaxMonth: _DateProcessing.getNameMonthByNumber(Number(_DateProcessing.getChunkFromDate(t.minDate, "month", { isBeforeZero: !1 }))) + " - " + _DateProcessing.getNameMonthByNumber(Number(_DateProcessing.getChunkFromDate(t.maxDate, "month", { isBeforeZero: !1 })))
|
|
@@ -314,8 +305,8 @@ c(_DateProcessing, "calculateTimeDifference", (t, e) => {
|
|
|
314
305
|
const r = new Date(e).getDay();
|
|
315
306
|
return isNaN(r) ? null : itemsWeek[r];
|
|
316
307
|
}), c(_DateProcessing, "cropSecond", (t) => t.replace(/:\w+$/, "")), c(_DateProcessing, "getRenderDate", (t, e) => {
|
|
317
|
-
const r = !!(e != null && e.withOutCurrentYear),
|
|
318
|
-
switch (_DateProcessing.getDifferenceDates(t,
|
|
308
|
+
const r = !!(e != null && e.withOutCurrentYear), n = _DateProcessing.getCurrentDate();
|
|
309
|
+
switch (_DateProcessing.getDifferenceDates(t, n)) {
|
|
319
310
|
case 0:
|
|
320
311
|
return "Сегодня";
|
|
321
312
|
case 1:
|
|
@@ -335,12 +326,12 @@ c(_DateProcessing, "calculateTimeDifference", (t, e) => {
|
|
|
335
326
|
* @returns example: '2023-02-02'
|
|
336
327
|
*/
|
|
337
328
|
c(_DateProcessing, "getDateDeviation", (t, e) => {
|
|
338
|
-
const r = _DateProcessing.correctionDataISO8601(t),
|
|
339
|
-
return i &&
|
|
329
|
+
const r = _DateProcessing.correctionDataISO8601(t), n = new Date(r), { day: o, month: s, year: i } = e;
|
|
330
|
+
return i && n.setFullYear(n.getFullYear() + i), s && n.setMonth(n.getMonth() + s), o && n.setDate(n.getDate() + o), n.toISOString().slice(0, 10);
|
|
340
331
|
});
|
|
341
|
-
const $ = class
|
|
332
|
+
const $ = class I {
|
|
342
333
|
static getDataApplication(e) {
|
|
343
|
-
const { applications: r } =
|
|
334
|
+
const { applications: r } = I;
|
|
344
335
|
return r[e] ? r[e] : r.pdf;
|
|
345
336
|
}
|
|
346
337
|
};
|
|
@@ -350,8 +341,8 @@ c($, "startSrt", "data:application/"), c($, "applications", {
|
|
|
350
341
|
pdf: `${$.startSrt}pdf;`,
|
|
351
342
|
csv: `${$.startSrt}vnd.ms-excel;`
|
|
352
343
|
}), c($, "download", (t) => {
|
|
353
|
-
const { format: e, name: r, base64:
|
|
354
|
-
|
|
344
|
+
const { format: e, name: r, base64: n } = t, o = `${$.getDataApplication(e)}base64,${n}`, s = document.createElement("a"), i = `${r}.${e}`;
|
|
345
|
+
s.href = o, s.download = i, s.click();
|
|
355
346
|
});
|
|
356
347
|
class NetworkInformation {
|
|
357
348
|
constructor(e) {
|
|
@@ -362,8 +353,8 @@ class NetworkInformation {
|
|
|
362
353
|
return e ? "cordova" : "pc";
|
|
363
354
|
}
|
|
364
355
|
run(e) {
|
|
365
|
-
const r = this.getSystem(),
|
|
366
|
-
|
|
356
|
+
const r = this.getSystem(), n = this.listNetworkInformation.find((o) => o.getControls().system === r);
|
|
357
|
+
n ? n.getControls().addWatchers(e) : console.error("NetworkInformation не активен на данной платформе");
|
|
367
358
|
}
|
|
368
359
|
stop() {
|
|
369
360
|
this.listNetworkInformation.forEach((e) => {
|
|
@@ -401,57 +392,57 @@ const isString = typeOfTest("string"), isFunction = typeOfTest("function"), isNu
|
|
|
401
392
|
function forEach(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
402
393
|
if (t === null || typeof t > "u")
|
|
403
394
|
return;
|
|
404
|
-
let
|
|
395
|
+
let n, o;
|
|
405
396
|
if (typeof t != "object" && (t = [t]), isArray(t))
|
|
406
|
-
for (
|
|
407
|
-
e.call(null, t[
|
|
397
|
+
for (n = 0, o = t.length; n < o; n++)
|
|
398
|
+
e.call(null, t[n], n, t);
|
|
408
399
|
else {
|
|
409
|
-
const
|
|
400
|
+
const s = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = s.length;
|
|
410
401
|
let a;
|
|
411
|
-
for (
|
|
412
|
-
a =
|
|
402
|
+
for (n = 0; n < i; n++)
|
|
403
|
+
a = s[n], e.call(null, t[a], a, t);
|
|
413
404
|
}
|
|
414
405
|
}
|
|
415
406
|
function findKey(t, e) {
|
|
416
407
|
e = e.toLowerCase();
|
|
417
408
|
const r = Object.keys(t);
|
|
418
|
-
let
|
|
419
|
-
for (;
|
|
420
|
-
if (
|
|
421
|
-
return
|
|
409
|
+
let n = r.length, o;
|
|
410
|
+
for (; n-- > 0; )
|
|
411
|
+
if (o = r[n], e === o.toLowerCase())
|
|
412
|
+
return o;
|
|
422
413
|
return null;
|
|
423
414
|
}
|
|
424
415
|
const _global = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, isContextDefined = (t) => !isUndefined(t) && t !== _global;
|
|
425
416
|
function merge() {
|
|
426
|
-
const { caseless: t } = isContextDefined(this) && this || {}, e = {}, r = (
|
|
427
|
-
const
|
|
428
|
-
isPlainObject(e[
|
|
417
|
+
const { caseless: t } = isContextDefined(this) && this || {}, e = {}, r = (n, o) => {
|
|
418
|
+
const s = t && findKey(e, o) || o;
|
|
419
|
+
isPlainObject(e[s]) && isPlainObject(n) ? e[s] = merge(e[s], n) : isPlainObject(n) ? e[s] = merge({}, n) : isArray(n) ? e[s] = n.slice() : e[s] = n;
|
|
429
420
|
};
|
|
430
|
-
for (let
|
|
431
|
-
arguments[
|
|
421
|
+
for (let n = 0, o = arguments.length; n < o; n++)
|
|
422
|
+
arguments[n] && forEach(arguments[n], r);
|
|
432
423
|
return e;
|
|
433
424
|
}
|
|
434
|
-
const extend = (t, e, r, { allOwnKeys:
|
|
435
|
-
r && isFunction(
|
|
436
|
-
}, { allOwnKeys:
|
|
437
|
-
t.prototype = Object.create(e.prototype,
|
|
425
|
+
const extend = (t, e, r, { allOwnKeys: n } = {}) => (forEach(e, (o, s) => {
|
|
426
|
+
r && isFunction(o) ? t[s] = bind(o, r) : t[s] = o;
|
|
427
|
+
}, { allOwnKeys: n }), t), stripBOM = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), inherits = (t, e, r, n) => {
|
|
428
|
+
t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
438
429
|
value: e.prototype
|
|
439
430
|
}), r && Object.assign(t.prototype, r);
|
|
440
|
-
}, toFlatObject = (t, e, r,
|
|
441
|
-
let
|
|
431
|
+
}, toFlatObject = (t, e, r, n) => {
|
|
432
|
+
let o, s, i;
|
|
442
433
|
const a = {};
|
|
443
434
|
if (e = e || {}, t == null)
|
|
444
435
|
return e;
|
|
445
436
|
do {
|
|
446
|
-
for (
|
|
447
|
-
i =
|
|
437
|
+
for (o = Object.getOwnPropertyNames(t), s = o.length; s-- > 0; )
|
|
438
|
+
i = o[s], (!n || n(i, t, e)) && !a[i] && (e[i] = t[i], a[i] = !0);
|
|
448
439
|
t = r !== !1 && getPrototypeOf(t);
|
|
449
440
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
450
441
|
return e;
|
|
451
442
|
}, endsWith = (t, e, r) => {
|
|
452
443
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
453
|
-
const
|
|
454
|
-
return
|
|
444
|
+
const n = t.indexOf(e, r);
|
|
445
|
+
return n !== -1 && n === r;
|
|
455
446
|
}, toArray = (t) => {
|
|
456
447
|
if (!t)
|
|
457
448
|
return null;
|
|
@@ -466,34 +457,34 @@ const extend = (t, e, r, { allOwnKeys: s } = {}) => (forEach(e, (n, o) => {
|
|
|
466
457
|
return r;
|
|
467
458
|
}, isTypedArray = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && getPrototypeOf(Uint8Array)), forEachEntry = (t, e) => {
|
|
468
459
|
const r = (t && t[Symbol.iterator]).call(t);
|
|
469
|
-
let
|
|
470
|
-
for (; (
|
|
471
|
-
const
|
|
472
|
-
e.call(t,
|
|
460
|
+
let n;
|
|
461
|
+
for (; (n = r.next()) && !n.done; ) {
|
|
462
|
+
const o = n.value;
|
|
463
|
+
e.call(t, o[0], o[1]);
|
|
473
464
|
}
|
|
474
465
|
}, matchAll = (t, e) => {
|
|
475
466
|
let r;
|
|
476
|
-
const
|
|
467
|
+
const n = [];
|
|
477
468
|
for (; (r = t.exec(e)) !== null; )
|
|
478
|
-
|
|
479
|
-
return
|
|
469
|
+
n.push(r);
|
|
470
|
+
return n;
|
|
480
471
|
}, isHTMLForm = kindOfTest("HTMLFormElement"), toCamelCase = (t) => t.toLowerCase().replace(
|
|
481
472
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
482
|
-
function(e, r,
|
|
483
|
-
return r.toUpperCase() +
|
|
473
|
+
function(e, r, n) {
|
|
474
|
+
return r.toUpperCase() + n;
|
|
484
475
|
}
|
|
485
476
|
), hasOwnProperty = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), isRegExp = kindOfTest("RegExp"), reduceDescriptors = (t, e) => {
|
|
486
|
-
const r = Object.getOwnPropertyDescriptors(t),
|
|
487
|
-
forEach(r, (
|
|
477
|
+
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
478
|
+
forEach(r, (o, s) => {
|
|
488
479
|
let i;
|
|
489
|
-
(i = e(
|
|
490
|
-
}), Object.defineProperties(t,
|
|
480
|
+
(i = e(o, s, t)) !== !1 && (n[s] = i || o);
|
|
481
|
+
}), Object.defineProperties(t, n);
|
|
491
482
|
}, freezeMethods = (t) => {
|
|
492
483
|
reduceDescriptors(t, (e, r) => {
|
|
493
484
|
if (isFunction(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
494
485
|
return !1;
|
|
495
|
-
const
|
|
496
|
-
if (isFunction(
|
|
486
|
+
const n = t[r];
|
|
487
|
+
if (isFunction(n)) {
|
|
497
488
|
if (e.enumerable = !1, "writable" in e) {
|
|
498
489
|
e.writable = !1;
|
|
499
490
|
return;
|
|
@@ -504,12 +495,12 @@ const extend = (t, e, r, { allOwnKeys: s } = {}) => (forEach(e, (n, o) => {
|
|
|
504
495
|
}
|
|
505
496
|
});
|
|
506
497
|
}, toObjectSet = (t, e) => {
|
|
507
|
-
const r = {},
|
|
508
|
-
|
|
509
|
-
r[
|
|
498
|
+
const r = {}, n = (o) => {
|
|
499
|
+
o.forEach((s) => {
|
|
500
|
+
r[s] = !0;
|
|
510
501
|
});
|
|
511
502
|
};
|
|
512
|
-
return isArray(t) ?
|
|
503
|
+
return isArray(t) ? n(t) : n(String(t).split(e)), r;
|
|
513
504
|
}, noop = () => {
|
|
514
505
|
}, toFiniteNumber = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, ALPHA = "abcdefghijklmnopqrstuvwxyz", DIGIT = "0123456789", ALPHABET = {
|
|
515
506
|
DIGIT,
|
|
@@ -517,35 +508,35 @@ const extend = (t, e, r, { allOwnKeys: s } = {}) => (forEach(e, (n, o) => {
|
|
|
517
508
|
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
518
509
|
}, generateString = (t = 16, e = ALPHABET.ALPHA_DIGIT) => {
|
|
519
510
|
let r = "";
|
|
520
|
-
const { length:
|
|
511
|
+
const { length: n } = e;
|
|
521
512
|
for (; t--; )
|
|
522
|
-
r += e[Math.random() *
|
|
513
|
+
r += e[Math.random() * n | 0];
|
|
523
514
|
return r;
|
|
524
515
|
};
|
|
525
516
|
function isSpecCompliantForm(t) {
|
|
526
517
|
return !!(t && isFunction(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
527
518
|
}
|
|
528
519
|
const toJSONObject = (t) => {
|
|
529
|
-
const e = new Array(10), r = (
|
|
530
|
-
if (isObject(
|
|
531
|
-
if (e.indexOf(
|
|
520
|
+
const e = new Array(10), r = (n, o) => {
|
|
521
|
+
if (isObject(n)) {
|
|
522
|
+
if (e.indexOf(n) >= 0)
|
|
532
523
|
return;
|
|
533
|
-
if (!("toJSON" in
|
|
534
|
-
e[
|
|
535
|
-
const
|
|
536
|
-
return forEach(
|
|
537
|
-
const l = r(i,
|
|
538
|
-
!isUndefined(l) && (
|
|
539
|
-
}), e[
|
|
524
|
+
if (!("toJSON" in n)) {
|
|
525
|
+
e[o] = n;
|
|
526
|
+
const s = isArray(n) ? [] : {};
|
|
527
|
+
return forEach(n, (i, a) => {
|
|
528
|
+
const l = r(i, o + 1);
|
|
529
|
+
!isUndefined(l) && (s[a] = l);
|
|
530
|
+
}), e[o] = void 0, s;
|
|
540
531
|
}
|
|
541
532
|
}
|
|
542
|
-
return
|
|
533
|
+
return n;
|
|
543
534
|
};
|
|
544
535
|
return r(t, 0);
|
|
545
|
-
}, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (t) => t && (isObject(t) || isFunction(t)) && isFunction(t.then) && isFunction(t.catch), _setImmediate = ((t, e) => t ? setImmediate : e ? ((r,
|
|
546
|
-
|
|
547
|
-
}, !1), (
|
|
548
|
-
|
|
536
|
+
}, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (t) => t && (isObject(t) || isFunction(t)) && isFunction(t.then) && isFunction(t.catch), _setImmediate = ((t, e) => t ? setImmediate : e ? ((r, n) => (_global.addEventListener("message", ({ source: o, data: s }) => {
|
|
537
|
+
o === _global && s === r && n.length && n.shift()();
|
|
538
|
+
}, !1), (o) => {
|
|
539
|
+
n.push(o), _global.postMessage(r, "*");
|
|
549
540
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
550
541
|
typeof setImmediate == "function",
|
|
551
542
|
isFunction(_global.postMessage)
|
|
@@ -609,8 +600,8 @@ const toJSONObject = (t) => {
|
|
|
609
600
|
setImmediate: _setImmediate,
|
|
610
601
|
asap
|
|
611
602
|
};
|
|
612
|
-
function AxiosError(t, e, r,
|
|
613
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r),
|
|
603
|
+
function AxiosError(t, e, r, n, o) {
|
|
604
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
614
605
|
}
|
|
615
606
|
utils$1.inherits(AxiosError, Error, {
|
|
616
607
|
toJSON: function t() {
|
|
@@ -653,11 +644,11 @@ const prototype$1 = AxiosError.prototype, descriptors = {};
|
|
|
653
644
|
});
|
|
654
645
|
Object.defineProperties(AxiosError, descriptors);
|
|
655
646
|
Object.defineProperty(prototype$1, "isAxiosError", { value: !0 });
|
|
656
|
-
AxiosError.from = (t, e, r,
|
|
647
|
+
AxiosError.from = (t, e, r, n, o, s) => {
|
|
657
648
|
const i = Object.create(prototype$1);
|
|
658
649
|
return utils$1.toFlatObject(t, i, function(a) {
|
|
659
650
|
return a !== Error.prototype;
|
|
660
|
-
}, (a) => a !== "isAxiosError"), AxiosError.call(i, t.message, e, r,
|
|
651
|
+
}, (a) => a !== "isAxiosError"), AxiosError.call(i, t.message, e, r, n, o), i.cause = t, i.name = t.name, s && Object.assign(i, s), i;
|
|
661
652
|
};
|
|
662
653
|
const httpAdapter = null;
|
|
663
654
|
function isVisitable(t) {
|
|
@@ -667,8 +658,8 @@ function removeBrackets(t) {
|
|
|
667
658
|
return utils$1.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
668
659
|
}
|
|
669
660
|
function renderKey(t, e, r) {
|
|
670
|
-
return t ? t.concat(e).map(function(
|
|
671
|
-
return
|
|
661
|
+
return t ? t.concat(e).map(function(n, o) {
|
|
662
|
+
return n = removeBrackets(n), !r && o ? "[" + n + "]" : n;
|
|
672
663
|
}).join(r ? "." : "") : e;
|
|
673
664
|
}
|
|
674
665
|
function isFlatArray(t) {
|
|
@@ -684,54 +675,54 @@ function toFormData(t, e, r) {
|
|
|
684
675
|
metaTokens: !0,
|
|
685
676
|
dots: !1,
|
|
686
677
|
indexes: !1
|
|
687
|
-
}, !1, function(
|
|
688
|
-
return !utils$1.isUndefined(
|
|
678
|
+
}, !1, function(m, p) {
|
|
679
|
+
return !utils$1.isUndefined(p[m]);
|
|
689
680
|
});
|
|
690
|
-
const
|
|
691
|
-
if (!utils$1.isFunction(
|
|
681
|
+
const n = r.metaTokens, o = r.visitor || u, s = r.dots, i = r.indexes, a = (r.Blob || typeof Blob < "u" && Blob) && utils$1.isSpecCompliantForm(e);
|
|
682
|
+
if (!utils$1.isFunction(o))
|
|
692
683
|
throw new TypeError("visitor must be a function");
|
|
693
|
-
function l(
|
|
694
|
-
if (
|
|
684
|
+
function l(m) {
|
|
685
|
+
if (m === null)
|
|
695
686
|
return "";
|
|
696
|
-
if (utils$1.isDate(
|
|
697
|
-
return
|
|
698
|
-
if (!a && utils$1.isBlob(
|
|
687
|
+
if (utils$1.isDate(m))
|
|
688
|
+
return m.toISOString();
|
|
689
|
+
if (!a && utils$1.isBlob(m))
|
|
699
690
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
700
|
-
return utils$1.isArrayBuffer(
|
|
701
|
-
}
|
|
702
|
-
function u(
|
|
703
|
-
let
|
|
704
|
-
if (
|
|
705
|
-
if (utils$1.endsWith(
|
|
706
|
-
|
|
707
|
-
else if (utils$1.isArray(
|
|
708
|
-
return
|
|
709
|
-
!(utils$1.isUndefined(
|
|
691
|
+
return utils$1.isArrayBuffer(m) || utils$1.isTypedArray(m) ? a && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
692
|
+
}
|
|
693
|
+
function u(m, p, f) {
|
|
694
|
+
let w = m;
|
|
695
|
+
if (m && !f && typeof m == "object") {
|
|
696
|
+
if (utils$1.endsWith(p, "{}"))
|
|
697
|
+
p = n ? p : p.slice(0, -2), m = JSON.stringify(m);
|
|
698
|
+
else if (utils$1.isArray(m) && isFlatArray(m) || (utils$1.isFileList(m) || utils$1.endsWith(p, "[]")) && (w = utils$1.toArray(m)))
|
|
699
|
+
return p = removeBrackets(p), w.forEach(function(v, S) {
|
|
700
|
+
!(utils$1.isUndefined(v) || v === null) && e.append(
|
|
710
701
|
// eslint-disable-next-line no-nested-ternary
|
|
711
|
-
i === !0 ? renderKey([
|
|
712
|
-
l(
|
|
702
|
+
i === !0 ? renderKey([p], S, s) : i === null ? p : p + "[]",
|
|
703
|
+
l(v)
|
|
713
704
|
);
|
|
714
705
|
}), !1;
|
|
715
706
|
}
|
|
716
|
-
return isVisitable(
|
|
707
|
+
return isVisitable(m) ? !0 : (e.append(renderKey(f, p, s), l(m)), !1);
|
|
717
708
|
}
|
|
718
|
-
const d = [],
|
|
709
|
+
const d = [], g = Object.assign(predicates, {
|
|
719
710
|
defaultVisitor: u,
|
|
720
711
|
convertValue: l,
|
|
721
712
|
isVisitable
|
|
722
713
|
});
|
|
723
|
-
function b(
|
|
724
|
-
if (!utils$1.isUndefined(
|
|
725
|
-
if (d.indexOf(
|
|
726
|
-
throw Error("Circular reference detected in " +
|
|
727
|
-
d.push(
|
|
728
|
-
(!(utils$1.isUndefined(f) || f === null) &&
|
|
714
|
+
function b(m, p) {
|
|
715
|
+
if (!utils$1.isUndefined(m)) {
|
|
716
|
+
if (d.indexOf(m) !== -1)
|
|
717
|
+
throw Error("Circular reference detected in " + p.join("."));
|
|
718
|
+
d.push(m), utils$1.forEach(m, function(f, w) {
|
|
719
|
+
(!(utils$1.isUndefined(f) || f === null) && o.call(
|
|
729
720
|
e,
|
|
730
721
|
f,
|
|
731
|
-
utils$1.isString(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
)) === !0 && b(f,
|
|
722
|
+
utils$1.isString(w) ? w.trim() : w,
|
|
723
|
+
p,
|
|
724
|
+
g
|
|
725
|
+
)) === !0 && b(f, p ? p.concat(w) : [w]);
|
|
735
726
|
}), d.pop();
|
|
736
727
|
}
|
|
737
728
|
}
|
|
@@ -761,11 +752,11 @@ prototype.append = function t(e, r) {
|
|
|
761
752
|
this._pairs.push([e, r]);
|
|
762
753
|
};
|
|
763
754
|
prototype.toString = function t(e) {
|
|
764
|
-
const r = e ? function(
|
|
765
|
-
return e.call(this,
|
|
755
|
+
const r = e ? function(n) {
|
|
756
|
+
return e.call(this, n, encode$1);
|
|
766
757
|
} : encode$1;
|
|
767
|
-
return this._pairs.map(function(
|
|
768
|
-
return r(
|
|
758
|
+
return this._pairs.map(function(n) {
|
|
759
|
+
return r(n[0]) + "=" + r(n[1]);
|
|
769
760
|
}, "").join("&");
|
|
770
761
|
};
|
|
771
762
|
function encode(t) {
|
|
@@ -774,11 +765,11 @@ function encode(t) {
|
|
|
774
765
|
function buildURL(t, e, r) {
|
|
775
766
|
if (!e)
|
|
776
767
|
return t;
|
|
777
|
-
const
|
|
778
|
-
let
|
|
779
|
-
if (
|
|
768
|
+
const n = r && r.encode || encode, o = r && r.serialize;
|
|
769
|
+
let s;
|
|
770
|
+
if (o ? s = o(e, r) : s = utils$1.isURLSearchParams(e) ? e.toString() : new AxiosURLSearchParams(e, r).toString(n), s) {
|
|
780
771
|
const i = t.indexOf("#");
|
|
781
|
-
i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") +
|
|
772
|
+
i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + s;
|
|
782
773
|
}
|
|
783
774
|
return t;
|
|
784
775
|
}
|
|
@@ -794,12 +785,12 @@ class InterceptorManager {
|
|
|
794
785
|
*
|
|
795
786
|
* @return {Number} An ID used to remove interceptor later
|
|
796
787
|
*/
|
|
797
|
-
use(e, r,
|
|
788
|
+
use(e, r, n) {
|
|
798
789
|
return this.handlers.push({
|
|
799
790
|
fulfilled: e,
|
|
800
791
|
rejected: r,
|
|
801
|
-
synchronous:
|
|
802
|
-
runWhen:
|
|
792
|
+
synchronous: n ? n.synchronous : !1,
|
|
793
|
+
runWhen: n ? n.runWhen : null
|
|
803
794
|
}), this.handlers.length - 1;
|
|
804
795
|
}
|
|
805
796
|
/**
|
|
@@ -862,8 +853,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", or
|
|
|
862
853
|
};
|
|
863
854
|
function toURLEncodedForm(t, e) {
|
|
864
855
|
return toFormData(t, new platform.classes.URLSearchParams(), Object.assign({
|
|
865
|
-
visitor: function(r,
|
|
866
|
-
return platform.isNode && utils$1.isBuffer(r) ? (this.append(
|
|
856
|
+
visitor: function(r, n, o, s) {
|
|
857
|
+
return platform.isNode && utils$1.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
867
858
|
}
|
|
868
859
|
}, e));
|
|
869
860
|
}
|
|
@@ -872,25 +863,25 @@ function parsePropPath(t) {
|
|
|
872
863
|
}
|
|
873
864
|
function arrayToObject(t) {
|
|
874
865
|
const e = {}, r = Object.keys(t);
|
|
866
|
+
let n;
|
|
867
|
+
const o = r.length;
|
|
875
868
|
let s;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
for (s = 0; s < n; s++)
|
|
879
|
-
o = r[s], e[o] = t[o];
|
|
869
|
+
for (n = 0; n < o; n++)
|
|
870
|
+
s = r[n], e[s] = t[s];
|
|
880
871
|
return e;
|
|
881
872
|
}
|
|
882
873
|
function formDataToJSON(t) {
|
|
883
|
-
function e(r,
|
|
884
|
-
let i = r[
|
|
874
|
+
function e(r, n, o, s) {
|
|
875
|
+
let i = r[s++];
|
|
885
876
|
if (i === "__proto__")
|
|
886
877
|
return !0;
|
|
887
|
-
const a = Number.isFinite(+i), l =
|
|
888
|
-
return i = !i && utils$1.isArray(
|
|
878
|
+
const a = Number.isFinite(+i), l = s >= r.length;
|
|
879
|
+
return i = !i && utils$1.isArray(o) ? o.length : i, l ? (utils$1.hasOwnProp(o, i) ? o[i] = [o[i], n] : o[i] = n, !a) : ((!o[i] || !utils$1.isObject(o[i])) && (o[i] = []), e(r, n, o[i], s) && utils$1.isArray(o[i]) && (o[i] = arrayToObject(o[i])), !a);
|
|
889
880
|
}
|
|
890
881
|
if (utils$1.isFormData(t) && utils$1.isFunction(t.entries)) {
|
|
891
882
|
const r = {};
|
|
892
|
-
return utils$1.forEachEntry(t, (
|
|
893
|
-
e(parsePropPath(
|
|
883
|
+
return utils$1.forEachEntry(t, (n, o) => {
|
|
884
|
+
e(parsePropPath(n), o, r, 0);
|
|
894
885
|
}), r;
|
|
895
886
|
}
|
|
896
887
|
return null;
|
|
@@ -899,9 +890,9 @@ function stringifySafely(t, e, r) {
|
|
|
899
890
|
if (utils$1.isString(t))
|
|
900
891
|
try {
|
|
901
892
|
return (e || JSON.parse)(t), utils$1.trim(t);
|
|
902
|
-
} catch (
|
|
903
|
-
if (
|
|
904
|
-
throw
|
|
893
|
+
} catch (n) {
|
|
894
|
+
if (n.name !== "SyntaxError")
|
|
895
|
+
throw n;
|
|
905
896
|
}
|
|
906
897
|
return (0, JSON.stringify)(t);
|
|
907
898
|
}
|
|
@@ -909,9 +900,9 @@ const defaults = {
|
|
|
909
900
|
transitional: transitionalDefaults,
|
|
910
901
|
adapter: ["xhr", "http", "fetch"],
|
|
911
902
|
transformRequest: [function t(e, r) {
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
return
|
|
903
|
+
const n = r.getContentType() || "", o = n.indexOf("application/json") > -1, s = utils$1.isObject(e);
|
|
904
|
+
if (s && utils$1.isHTMLForm(e) && (e = new FormData(e)), utils$1.isFormData(e))
|
|
905
|
+
return o ? JSON.stringify(formDataToJSON(e)) : e;
|
|
915
906
|
if (utils$1.isArrayBuffer(e) || utils$1.isBuffer(e) || utils$1.isStream(e) || utils$1.isFile(e) || utils$1.isBlob(e) || utils$1.isReadableStream(e))
|
|
916
907
|
return e;
|
|
917
908
|
if (utils$1.isArrayBufferView(e))
|
|
@@ -919,10 +910,10 @@ const defaults = {
|
|
|
919
910
|
if (utils$1.isURLSearchParams(e))
|
|
920
911
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
921
912
|
let i;
|
|
922
|
-
if (
|
|
923
|
-
if (
|
|
913
|
+
if (s) {
|
|
914
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
924
915
|
return toURLEncodedForm(e, this.formSerializer).toString();
|
|
925
|
-
if ((i = utils$1.isFileList(e)) ||
|
|
916
|
+
if ((i = utils$1.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
926
917
|
const a = this.env && this.env.FormData;
|
|
927
918
|
return toFormData(
|
|
928
919
|
i ? { "files[]": e } : e,
|
|
@@ -931,18 +922,18 @@ const defaults = {
|
|
|
931
922
|
);
|
|
932
923
|
}
|
|
933
924
|
}
|
|
934
|
-
return
|
|
925
|
+
return s || o ? (r.setContentType("application/json", !1), stringifySafely(e)) : e;
|
|
935
926
|
}],
|
|
936
927
|
transformResponse: [function t(e) {
|
|
937
|
-
const r = this.transitional || defaults.transitional,
|
|
928
|
+
const r = this.transitional || defaults.transitional, n = r && r.forcedJSONParsing, o = this.responseType === "json";
|
|
938
929
|
if (utils$1.isResponse(e) || utils$1.isReadableStream(e))
|
|
939
930
|
return e;
|
|
940
|
-
if (e && utils$1.isString(e) && (
|
|
941
|
-
const
|
|
931
|
+
if (e && utils$1.isString(e) && (n && !this.responseType || o)) {
|
|
932
|
+
const s = !(r && r.silentJSONParsing) && o;
|
|
942
933
|
try {
|
|
943
934
|
return JSON.parse(e);
|
|
944
935
|
} catch (i) {
|
|
945
|
-
if (
|
|
936
|
+
if (s)
|
|
946
937
|
throw i.name === "SyntaxError" ? AxiosError.from(i, AxiosError.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
947
938
|
}
|
|
948
939
|
}
|
|
@@ -994,10 +985,10 @@ const defaults$1 = defaults, ignoreDuplicateOf = utils$1.toObjectSet([
|
|
|
994
985
|
"user-agent"
|
|
995
986
|
]), parseHeaders = (t) => {
|
|
996
987
|
const e = {};
|
|
997
|
-
let r,
|
|
988
|
+
let r, n, o;
|
|
998
989
|
return t && t.split(`
|
|
999
|
-
`).forEach(function(
|
|
1000
|
-
|
|
990
|
+
`).forEach(function(s) {
|
|
991
|
+
o = s.indexOf(":"), r = s.substring(0, o).trim().toLowerCase(), n = s.substring(o + 1).trim(), !(!r || e[r] && ignoreDuplicateOf[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
1001
992
|
}), e;
|
|
1002
993
|
}, $internals = Symbol("internals");
|
|
1003
994
|
function normalizeHeader(t) {
|
|
@@ -1008,31 +999,31 @@ function normalizeValue(t) {
|
|
|
1008
999
|
}
|
|
1009
1000
|
function parseTokens(t) {
|
|
1010
1001
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1011
|
-
let
|
|
1012
|
-
for (;
|
|
1013
|
-
e[
|
|
1002
|
+
let n;
|
|
1003
|
+
for (; n = r.exec(t); )
|
|
1004
|
+
e[n[1]] = n[2];
|
|
1014
1005
|
return e;
|
|
1015
1006
|
}
|
|
1016
1007
|
const isValidHeaderName = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1017
|
-
function matchHeaderValue(t, e, r,
|
|
1018
|
-
if (utils$1.isFunction(
|
|
1019
|
-
return
|
|
1020
|
-
if (
|
|
1021
|
-
if (utils$1.isString(
|
|
1022
|
-
return e.indexOf(
|
|
1023
|
-
if (utils$1.isRegExp(
|
|
1024
|
-
return
|
|
1008
|
+
function matchHeaderValue(t, e, r, n, o) {
|
|
1009
|
+
if (utils$1.isFunction(n))
|
|
1010
|
+
return n.call(this, e, r);
|
|
1011
|
+
if (o && (e = r), !!utils$1.isString(e)) {
|
|
1012
|
+
if (utils$1.isString(n))
|
|
1013
|
+
return e.indexOf(n) !== -1;
|
|
1014
|
+
if (utils$1.isRegExp(n))
|
|
1015
|
+
return n.test(e);
|
|
1025
1016
|
}
|
|
1026
1017
|
}
|
|
1027
1018
|
function formatHeader(t) {
|
|
1028
|
-
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r,
|
|
1019
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
1029
1020
|
}
|
|
1030
1021
|
function buildAccessors(t, e) {
|
|
1031
1022
|
const r = utils$1.toCamelCase(" " + e);
|
|
1032
|
-
["get", "set", "has"].forEach((
|
|
1033
|
-
Object.defineProperty(t,
|
|
1034
|
-
value: function(
|
|
1035
|
-
return this[
|
|
1023
|
+
["get", "set", "has"].forEach((n) => {
|
|
1024
|
+
Object.defineProperty(t, n + r, {
|
|
1025
|
+
value: function(o, s, i) {
|
|
1026
|
+
return this[n].call(this, e, o, s, i);
|
|
1036
1027
|
},
|
|
1037
1028
|
configurable: !0
|
|
1038
1029
|
});
|
|
@@ -1042,81 +1033,81 @@ class AxiosHeaders {
|
|
|
1042
1033
|
constructor(e) {
|
|
1043
1034
|
e && this.set(e);
|
|
1044
1035
|
}
|
|
1045
|
-
set(e, r,
|
|
1046
|
-
const
|
|
1047
|
-
function
|
|
1036
|
+
set(e, r, n) {
|
|
1037
|
+
const o = this;
|
|
1038
|
+
function s(a, l, u) {
|
|
1048
1039
|
const d = normalizeHeader(l);
|
|
1049
1040
|
if (!d)
|
|
1050
1041
|
throw new Error("header name must be a non-empty string");
|
|
1051
|
-
const
|
|
1052
|
-
(!
|
|
1042
|
+
const g = utils$1.findKey(o, d);
|
|
1043
|
+
(!g || o[g] === void 0 || u === !0 || u === void 0 && o[g] !== !1) && (o[g || l] = normalizeValue(a));
|
|
1053
1044
|
}
|
|
1054
|
-
const i = (a, l) => utils$1.forEach(a, (u, d) =>
|
|
1045
|
+
const i = (a, l) => utils$1.forEach(a, (u, d) => s(u, d, l));
|
|
1055
1046
|
if (utils$1.isPlainObject(e) || e instanceof this.constructor)
|
|
1056
1047
|
i(e, r);
|
|
1057
1048
|
else if (utils$1.isString(e) && (e = e.trim()) && !isValidHeaderName(e))
|
|
1058
1049
|
i(parseHeaders(e), r);
|
|
1059
1050
|
else if (utils$1.isHeaders(e))
|
|
1060
1051
|
for (const [a, l] of e.entries())
|
|
1061
|
-
|
|
1052
|
+
s(l, a, n);
|
|
1062
1053
|
else
|
|
1063
|
-
e != null &&
|
|
1054
|
+
e != null && s(r, e, n);
|
|
1064
1055
|
return this;
|
|
1065
1056
|
}
|
|
1066
1057
|
get(e, r) {
|
|
1067
1058
|
if (e = normalizeHeader(e), e) {
|
|
1068
|
-
const
|
|
1069
|
-
if (
|
|
1070
|
-
const
|
|
1059
|
+
const n = utils$1.findKey(this, e);
|
|
1060
|
+
if (n) {
|
|
1061
|
+
const o = this[n];
|
|
1071
1062
|
if (!r)
|
|
1072
|
-
return
|
|
1063
|
+
return o;
|
|
1073
1064
|
if (r === !0)
|
|
1074
|
-
return parseTokens(
|
|
1065
|
+
return parseTokens(o);
|
|
1075
1066
|
if (utils$1.isFunction(r))
|
|
1076
|
-
return r.call(this,
|
|
1067
|
+
return r.call(this, o, n);
|
|
1077
1068
|
if (utils$1.isRegExp(r))
|
|
1078
|
-
return r.exec(
|
|
1069
|
+
return r.exec(o);
|
|
1079
1070
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1080
1071
|
}
|
|
1081
1072
|
}
|
|
1082
1073
|
}
|
|
1083
1074
|
has(e, r) {
|
|
1084
1075
|
if (e = normalizeHeader(e), e) {
|
|
1085
|
-
const
|
|
1086
|
-
return !!(
|
|
1076
|
+
const n = utils$1.findKey(this, e);
|
|
1077
|
+
return !!(n && this[n] !== void 0 && (!r || matchHeaderValue(this, this[n], n, r)));
|
|
1087
1078
|
}
|
|
1088
1079
|
return !1;
|
|
1089
1080
|
}
|
|
1090
1081
|
delete(e, r) {
|
|
1091
|
-
const
|
|
1092
|
-
let
|
|
1093
|
-
function
|
|
1082
|
+
const n = this;
|
|
1083
|
+
let o = !1;
|
|
1084
|
+
function s(i) {
|
|
1094
1085
|
if (i = normalizeHeader(i), i) {
|
|
1095
|
-
const a = utils$1.findKey(
|
|
1096
|
-
a && (!r || matchHeaderValue(
|
|
1086
|
+
const a = utils$1.findKey(n, i);
|
|
1087
|
+
a && (!r || matchHeaderValue(n, n[a], a, r)) && (delete n[a], o = !0);
|
|
1097
1088
|
}
|
|
1098
1089
|
}
|
|
1099
|
-
return utils$1.isArray(e) ? e.forEach(
|
|
1090
|
+
return utils$1.isArray(e) ? e.forEach(s) : s(e), o;
|
|
1100
1091
|
}
|
|
1101
1092
|
clear(e) {
|
|
1102
1093
|
const r = Object.keys(this);
|
|
1103
|
-
let
|
|
1104
|
-
for (;
|
|
1105
|
-
const
|
|
1106
|
-
(!e || matchHeaderValue(this, this[
|
|
1094
|
+
let n = r.length, o = !1;
|
|
1095
|
+
for (; n--; ) {
|
|
1096
|
+
const s = r[n];
|
|
1097
|
+
(!e || matchHeaderValue(this, this[s], s, e, !0)) && (delete this[s], o = !0);
|
|
1107
1098
|
}
|
|
1108
|
-
return
|
|
1099
|
+
return o;
|
|
1109
1100
|
}
|
|
1110
1101
|
normalize(e) {
|
|
1111
|
-
const r = this,
|
|
1112
|
-
return utils$1.forEach(this, (
|
|
1113
|
-
const i = utils$1.findKey(
|
|
1102
|
+
const r = this, n = {};
|
|
1103
|
+
return utils$1.forEach(this, (o, s) => {
|
|
1104
|
+
const i = utils$1.findKey(n, s);
|
|
1114
1105
|
if (i) {
|
|
1115
|
-
r[i] = normalizeValue(
|
|
1106
|
+
r[i] = normalizeValue(o), delete r[s];
|
|
1116
1107
|
return;
|
|
1117
1108
|
}
|
|
1118
|
-
const a = e ? formatHeader(
|
|
1119
|
-
a !==
|
|
1109
|
+
const a = e ? formatHeader(s) : String(s).trim();
|
|
1110
|
+
a !== s && delete r[s], r[a] = normalizeValue(o), n[a] = !0;
|
|
1120
1111
|
}), this;
|
|
1121
1112
|
}
|
|
1122
1113
|
concat(...e) {
|
|
@@ -1124,8 +1115,8 @@ class AxiosHeaders {
|
|
|
1124
1115
|
}
|
|
1125
1116
|
toJSON(e) {
|
|
1126
1117
|
const r = /* @__PURE__ */ Object.create(null);
|
|
1127
|
-
return utils$1.forEach(this, (
|
|
1128
|
-
|
|
1118
|
+
return utils$1.forEach(this, (n, o) => {
|
|
1119
|
+
n != null && n !== !1 && (r[o] = e && utils$1.isArray(n) ? n.join(", ") : n);
|
|
1129
1120
|
}), r;
|
|
1130
1121
|
}
|
|
1131
1122
|
[Symbol.iterator]() {
|
|
@@ -1142,18 +1133,18 @@ class AxiosHeaders {
|
|
|
1142
1133
|
return e instanceof this ? e : new this(e);
|
|
1143
1134
|
}
|
|
1144
1135
|
static concat(e, ...r) {
|
|
1145
|
-
const
|
|
1146
|
-
return r.forEach((
|
|
1136
|
+
const n = new this(e);
|
|
1137
|
+
return r.forEach((o) => n.set(o)), n;
|
|
1147
1138
|
}
|
|
1148
1139
|
static accessor(e) {
|
|
1149
1140
|
const r = (this[$internals] = this[$internals] = {
|
|
1150
1141
|
accessors: {}
|
|
1151
|
-
}).accessors,
|
|
1152
|
-
function
|
|
1153
|
-
const i = normalizeHeader(
|
|
1154
|
-
r[i] || (buildAccessors(
|
|
1142
|
+
}).accessors, n = this.prototype;
|
|
1143
|
+
function o(s) {
|
|
1144
|
+
const i = normalizeHeader(s);
|
|
1145
|
+
r[i] || (buildAccessors(n, s), r[i] = !0);
|
|
1155
1146
|
}
|
|
1156
|
-
return utils$1.isArray(e) ? e.forEach(
|
|
1147
|
+
return utils$1.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1157
1148
|
}
|
|
1158
1149
|
}
|
|
1159
1150
|
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -1161,19 +1152,19 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value: t }, e) => {
|
|
|
1161
1152
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
1162
1153
|
return {
|
|
1163
1154
|
get: () => t,
|
|
1164
|
-
set(
|
|
1165
|
-
this[r] =
|
|
1155
|
+
set(n) {
|
|
1156
|
+
this[r] = n;
|
|
1166
1157
|
}
|
|
1167
1158
|
};
|
|
1168
1159
|
});
|
|
1169
1160
|
utils$1.freezeMethods(AxiosHeaders);
|
|
1170
1161
|
const AxiosHeaders$1 = AxiosHeaders;
|
|
1171
1162
|
function transformData(t, e) {
|
|
1172
|
-
const r = this || defaults$1,
|
|
1173
|
-
let
|
|
1163
|
+
const r = this || defaults$1, n = e || r, o = AxiosHeaders$1.from(n.headers);
|
|
1164
|
+
let s = n.data;
|
|
1174
1165
|
return utils$1.forEach(t, function(i) {
|
|
1175
|
-
|
|
1176
|
-
}),
|
|
1166
|
+
s = i.call(r, s, o.normalize(), e ? e.status : void 0);
|
|
1167
|
+
}), o.normalize(), s;
|
|
1177
1168
|
}
|
|
1178
1169
|
function isCancel(t) {
|
|
1179
1170
|
return !!(t && t.__CANCEL__);
|
|
@@ -1185,8 +1176,8 @@ utils$1.inherits(CanceledError, AxiosError, {
|
|
|
1185
1176
|
__CANCEL__: !0
|
|
1186
1177
|
});
|
|
1187
1178
|
function settle(t, e, r) {
|
|
1188
|
-
const
|
|
1189
|
-
!r.status || !
|
|
1179
|
+
const n = r.config.validateStatus;
|
|
1180
|
+
!r.status || !n || n(r.status) ? t(r) : e(new AxiosError(
|
|
1190
1181
|
"Request failed with status code " + r.status,
|
|
1191
1182
|
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1192
1183
|
r.config,
|
|
@@ -1200,66 +1191,66 @@ function parseProtocol(t) {
|
|
|
1200
1191
|
}
|
|
1201
1192
|
function speedometer(t, e) {
|
|
1202
1193
|
t = t || 10;
|
|
1203
|
-
const r = new Array(t),
|
|
1204
|
-
let
|
|
1194
|
+
const r = new Array(t), n = new Array(t);
|
|
1195
|
+
let o = 0, s = 0, i;
|
|
1205
1196
|
return e = e !== void 0 ? e : 1e3, function(a) {
|
|
1206
|
-
const l = Date.now(), u = s
|
|
1207
|
-
i || (i = l), r[
|
|
1208
|
-
let d =
|
|
1209
|
-
for (; d !==
|
|
1210
|
-
|
|
1211
|
-
if (
|
|
1197
|
+
const l = Date.now(), u = n[s];
|
|
1198
|
+
i || (i = l), r[o] = a, n[o] = l;
|
|
1199
|
+
let d = s, g = 0;
|
|
1200
|
+
for (; d !== o; )
|
|
1201
|
+
g += r[d++], d = d % t;
|
|
1202
|
+
if (o = (o + 1) % t, o === s && (s = (s + 1) % t), l - i < e)
|
|
1212
1203
|
return;
|
|
1213
1204
|
const b = u && l - u;
|
|
1214
|
-
return b ? Math.round(
|
|
1205
|
+
return b ? Math.round(g * 1e3 / b) : void 0;
|
|
1215
1206
|
};
|
|
1216
1207
|
}
|
|
1217
1208
|
function throttle(t, e) {
|
|
1218
|
-
let r = 0,
|
|
1209
|
+
let r = 0, n = 1e3 / e, o, s;
|
|
1219
1210
|
const i = (a, l = Date.now()) => {
|
|
1220
|
-
r = l,
|
|
1211
|
+
r = l, o = null, s && (clearTimeout(s), s = null), t.apply(null, a);
|
|
1221
1212
|
};
|
|
1222
1213
|
return [(...a) => {
|
|
1223
1214
|
const l = Date.now(), u = l - r;
|
|
1224
|
-
u >=
|
|
1225
|
-
|
|
1226
|
-
},
|
|
1227
|
-
}, () =>
|
|
1215
|
+
u >= n ? i(a, l) : (o = a, s || (s = setTimeout(() => {
|
|
1216
|
+
s = null, i(o);
|
|
1217
|
+
}, n - u)));
|
|
1218
|
+
}, () => o && i(o)];
|
|
1228
1219
|
}
|
|
1229
1220
|
const progressEventReducer = (t, e, r = 3) => {
|
|
1230
|
-
let
|
|
1231
|
-
const
|
|
1232
|
-
return throttle((
|
|
1233
|
-
const i =
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1221
|
+
let n = 0;
|
|
1222
|
+
const o = speedometer(50, 250);
|
|
1223
|
+
return throttle((s) => {
|
|
1224
|
+
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, l = i - n, u = o(l), d = i <= a;
|
|
1225
|
+
n = i;
|
|
1226
|
+
const g = {
|
|
1236
1227
|
loaded: i,
|
|
1237
1228
|
total: a,
|
|
1238
1229
|
progress: a ? i / a : void 0,
|
|
1239
1230
|
bytes: l,
|
|
1240
1231
|
rate: u || void 0,
|
|
1241
1232
|
estimated: u && a && d ? (a - i) / u : void 0,
|
|
1242
|
-
event:
|
|
1233
|
+
event: s,
|
|
1243
1234
|
lengthComputable: a != null,
|
|
1244
1235
|
[e ? "download" : "upload"]: !0
|
|
1245
1236
|
};
|
|
1246
|
-
t(
|
|
1237
|
+
t(g);
|
|
1247
1238
|
}, r);
|
|
1248
1239
|
}, progressEventDecorator = (t, e) => {
|
|
1249
1240
|
const r = t != null;
|
|
1250
|
-
return [(
|
|
1241
|
+
return [(n) => e[0]({
|
|
1251
1242
|
lengthComputable: r,
|
|
1252
1243
|
total: t,
|
|
1253
|
-
loaded:
|
|
1244
|
+
loaded: n
|
|
1254
1245
|
}), e[1]];
|
|
1255
1246
|
}, asyncDecorator = (t) => (...e) => utils$1.asap(() => t(...e)), isURLSameOrigin = platform.hasStandardBrowserEnv ? (
|
|
1256
1247
|
// Standard browser envs have full support of the APIs needed to test
|
|
1257
1248
|
// whether the request URL is of the same origin as current location.
|
|
1258
1249
|
function t() {
|
|
1259
1250
|
const e = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent), r = document.createElement("a");
|
|
1260
|
-
let
|
|
1261
|
-
function
|
|
1262
|
-
let i =
|
|
1251
|
+
let n;
|
|
1252
|
+
function o(s) {
|
|
1253
|
+
let i = s;
|
|
1263
1254
|
return e && (r.setAttribute("href", i), i = r.href), r.setAttribute("href", i), {
|
|
1264
1255
|
href: r.href,
|
|
1265
1256
|
protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
|
|
@@ -1271,9 +1262,9 @@ const progressEventReducer = (t, e, r = 3) => {
|
|
|
1271
1262
|
pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
|
|
1272
1263
|
};
|
|
1273
1264
|
}
|
|
1274
|
-
return
|
|
1275
|
-
const i = utils$1.isString(
|
|
1276
|
-
return i.protocol ===
|
|
1265
|
+
return n = o(window.location.href), function(s) {
|
|
1266
|
+
const i = utils$1.isString(s) ? o(s) : s;
|
|
1267
|
+
return i.protocol === n.protocol && i.host === n.host;
|
|
1277
1268
|
};
|
|
1278
1269
|
}()
|
|
1279
1270
|
) : (
|
|
@@ -1286,9 +1277,9 @@ const progressEventReducer = (t, e, r = 3) => {
|
|
|
1286
1277
|
), cookies = platform.hasStandardBrowserEnv ? (
|
|
1287
1278
|
// Standard browser envs support document.cookie
|
|
1288
1279
|
{
|
|
1289
|
-
write(t, e, r,
|
|
1280
|
+
write(t, e, r, n, o, s) {
|
|
1290
1281
|
const i = [t + "=" + encodeURIComponent(e)];
|
|
1291
|
-
utils$1.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), utils$1.isString(
|
|
1282
|
+
utils$1.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), utils$1.isString(n) && i.push("path=" + n), utils$1.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
1292
1283
|
},
|
|
1293
1284
|
read(t) {
|
|
1294
1285
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -1323,37 +1314,37 @@ const headersToObject = (t) => t instanceof AxiosHeaders$1 ? { ...t } : t;
|
|
|
1323
1314
|
function mergeConfig(t, e) {
|
|
1324
1315
|
e = e || {};
|
|
1325
1316
|
const r = {};
|
|
1326
|
-
function
|
|
1327
|
-
return utils$1.isPlainObject(u) && utils$1.isPlainObject(d) ? utils$1.merge.call({ caseless:
|
|
1317
|
+
function n(u, d, g) {
|
|
1318
|
+
return utils$1.isPlainObject(u) && utils$1.isPlainObject(d) ? utils$1.merge.call({ caseless: g }, u, d) : utils$1.isPlainObject(d) ? utils$1.merge({}, d) : utils$1.isArray(d) ? d.slice() : d;
|
|
1328
1319
|
}
|
|
1329
|
-
function
|
|
1320
|
+
function o(u, d, g) {
|
|
1330
1321
|
if (utils$1.isUndefined(d)) {
|
|
1331
1322
|
if (!utils$1.isUndefined(u))
|
|
1332
|
-
return
|
|
1323
|
+
return n(void 0, u, g);
|
|
1333
1324
|
} else
|
|
1334
|
-
return
|
|
1325
|
+
return n(u, d, g);
|
|
1335
1326
|
}
|
|
1336
|
-
function
|
|
1327
|
+
function s(u, d) {
|
|
1337
1328
|
if (!utils$1.isUndefined(d))
|
|
1338
|
-
return
|
|
1329
|
+
return n(void 0, d);
|
|
1339
1330
|
}
|
|
1340
1331
|
function i(u, d) {
|
|
1341
1332
|
if (utils$1.isUndefined(d)) {
|
|
1342
1333
|
if (!utils$1.isUndefined(u))
|
|
1343
|
-
return
|
|
1334
|
+
return n(void 0, u);
|
|
1344
1335
|
} else
|
|
1345
|
-
return
|
|
1336
|
+
return n(void 0, d);
|
|
1346
1337
|
}
|
|
1347
|
-
function a(u, d,
|
|
1348
|
-
if (
|
|
1349
|
-
return
|
|
1350
|
-
if (
|
|
1351
|
-
return
|
|
1338
|
+
function a(u, d, g) {
|
|
1339
|
+
if (g in e)
|
|
1340
|
+
return n(u, d);
|
|
1341
|
+
if (g in t)
|
|
1342
|
+
return n(void 0, u);
|
|
1352
1343
|
}
|
|
1353
1344
|
const l = {
|
|
1354
|
-
url:
|
|
1355
|
-
method:
|
|
1356
|
-
data:
|
|
1345
|
+
url: s,
|
|
1346
|
+
method: s,
|
|
1347
|
+
data: s,
|
|
1357
1348
|
baseURL: i,
|
|
1358
1349
|
transformRequest: i,
|
|
1359
1350
|
transformResponse: i,
|
|
@@ -1379,16 +1370,16 @@ function mergeConfig(t, e) {
|
|
|
1379
1370
|
socketPath: i,
|
|
1380
1371
|
responseEncoding: i,
|
|
1381
1372
|
validateStatus: a,
|
|
1382
|
-
headers: (u, d) =>
|
|
1373
|
+
headers: (u, d) => o(headersToObject(u), headersToObject(d), !0)
|
|
1383
1374
|
};
|
|
1384
1375
|
return utils$1.forEach(Object.keys(Object.assign({}, t, e)), function(u) {
|
|
1385
|
-
const d = l[u] ||
|
|
1386
|
-
utils$1.isUndefined(
|
|
1376
|
+
const d = l[u] || o, g = d(t[u], e[u], u);
|
|
1377
|
+
utils$1.isUndefined(g) && d !== a || (r[u] = g);
|
|
1387
1378
|
}), r;
|
|
1388
1379
|
}
|
|
1389
1380
|
const resolveConfig = (t) => {
|
|
1390
1381
|
const e = mergeConfig({}, t);
|
|
1391
|
-
let { data: r, withXSRFToken:
|
|
1382
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = e;
|
|
1392
1383
|
e.headers = i = AxiosHeaders$1.from(i), e.url = buildURL(buildFullPath(e.baseURL, e.url), t.params, t.paramsSerializer), a && i.set(
|
|
1393
1384
|
"Authorization",
|
|
1394
1385
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
@@ -1398,93 +1389,93 @@ const resolveConfig = (t) => {
|
|
|
1398
1389
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv)
|
|
1399
1390
|
i.setContentType(void 0);
|
|
1400
1391
|
else if ((l = i.getContentType()) !== !1) {
|
|
1401
|
-
const [u, ...d] = l ? l.split(";").map((
|
|
1392
|
+
const [u, ...d] = l ? l.split(";").map((g) => g.trim()).filter(Boolean) : [];
|
|
1402
1393
|
i.setContentType([u || "multipart/form-data", ...d].join("; "));
|
|
1403
1394
|
}
|
|
1404
1395
|
}
|
|
1405
|
-
if (platform.hasStandardBrowserEnv && (
|
|
1406
|
-
const u =
|
|
1407
|
-
u && i.set(
|
|
1396
|
+
if (platform.hasStandardBrowserEnv && (n && utils$1.isFunction(n) && (n = n(e)), n || n !== !1 && isURLSameOrigin(e.url))) {
|
|
1397
|
+
const u = o && s && cookies.read(s);
|
|
1398
|
+
u && i.set(o, u);
|
|
1408
1399
|
}
|
|
1409
1400
|
return e;
|
|
1410
1401
|
}, isXHRAdapterSupported = typeof XMLHttpRequest < "u", xhrAdapter = isXHRAdapterSupported && function(t) {
|
|
1411
1402
|
return new Promise(function(e, r) {
|
|
1412
|
-
const
|
|
1413
|
-
let
|
|
1414
|
-
const
|
|
1415
|
-
let { responseType: i, onUploadProgress: a, onDownloadProgress: l } =
|
|
1416
|
-
function
|
|
1417
|
-
b && b(),
|
|
1403
|
+
const n = resolveConfig(t);
|
|
1404
|
+
let o = n.data;
|
|
1405
|
+
const s = AxiosHeaders$1.from(n.headers).normalize();
|
|
1406
|
+
let { responseType: i, onUploadProgress: a, onDownloadProgress: l } = n, u, d, g, b, m;
|
|
1407
|
+
function p() {
|
|
1408
|
+
b && b(), m && m(), n.cancelToken && n.cancelToken.unsubscribe(u), n.signal && n.signal.removeEventListener("abort", u);
|
|
1418
1409
|
}
|
|
1419
1410
|
let f = new XMLHttpRequest();
|
|
1420
|
-
f.open(
|
|
1421
|
-
function
|
|
1411
|
+
f.open(n.method.toUpperCase(), n.url, !0), f.timeout = n.timeout;
|
|
1412
|
+
function w() {
|
|
1422
1413
|
if (!f)
|
|
1423
1414
|
return;
|
|
1424
|
-
const
|
|
1415
|
+
const S = AxiosHeaders$1.from(
|
|
1425
1416
|
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1426
|
-
),
|
|
1417
|
+
), A = {
|
|
1427
1418
|
data: !i || i === "text" || i === "json" ? f.responseText : f.response,
|
|
1428
1419
|
status: f.status,
|
|
1429
1420
|
statusText: f.statusText,
|
|
1430
|
-
headers:
|
|
1421
|
+
headers: S,
|
|
1431
1422
|
config: t,
|
|
1432
1423
|
request: f
|
|
1433
1424
|
};
|
|
1434
|
-
settle(function(
|
|
1435
|
-
e(
|
|
1436
|
-
}, function(
|
|
1437
|
-
r(
|
|
1438
|
-
},
|
|
1425
|
+
settle(function(R) {
|
|
1426
|
+
e(R), p();
|
|
1427
|
+
}, function(R) {
|
|
1428
|
+
r(R), p();
|
|
1429
|
+
}, A), f = null;
|
|
1439
1430
|
}
|
|
1440
|
-
"onloadend" in f ? f.onloadend =
|
|
1441
|
-
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1431
|
+
"onloadend" in f ? f.onloadend = w : f.onreadystatechange = function() {
|
|
1432
|
+
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1442
1433
|
}, f.onabort = function() {
|
|
1443
1434
|
f && (r(new AxiosError("Request aborted", AxiosError.ECONNABORTED, t, f)), f = null);
|
|
1444
1435
|
}, f.onerror = function() {
|
|
1445
1436
|
r(new AxiosError("Network Error", AxiosError.ERR_NETWORK, t, f)), f = null;
|
|
1446
1437
|
}, f.ontimeout = function() {
|
|
1447
|
-
let
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1438
|
+
let S = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
1439
|
+
const A = n.transitional || transitionalDefaults;
|
|
1440
|
+
n.timeoutErrorMessage && (S = n.timeoutErrorMessage), r(new AxiosError(
|
|
1441
|
+
S,
|
|
1442
|
+
A.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
1452
1443
|
t,
|
|
1453
1444
|
f
|
|
1454
1445
|
)), f = null;
|
|
1455
|
-
},
|
|
1456
|
-
f.setRequestHeader(
|
|
1457
|
-
}), utils$1.isUndefined(
|
|
1458
|
-
f && (r(!
|
|
1459
|
-
},
|
|
1460
|
-
const
|
|
1461
|
-
if (
|
|
1462
|
-
r(new AxiosError("Unsupported protocol " +
|
|
1446
|
+
}, o === void 0 && s.setContentType(null), "setRequestHeader" in f && utils$1.forEach(s.toJSON(), function(S, A) {
|
|
1447
|
+
f.setRequestHeader(A, S);
|
|
1448
|
+
}), utils$1.isUndefined(n.withCredentials) || (f.withCredentials = !!n.withCredentials), i && i !== "json" && (f.responseType = n.responseType), l && ([g, m] = progressEventReducer(l, !0), f.addEventListener("progress", g)), a && f.upload && ([d, b] = progressEventReducer(a), f.upload.addEventListener("progress", d), f.upload.addEventListener("loadend", b)), (n.cancelToken || n.signal) && (u = (S) => {
|
|
1449
|
+
f && (r(!S || S.type ? new CanceledError(null, t, f) : S), f.abort(), f = null);
|
|
1450
|
+
}, n.cancelToken && n.cancelToken.subscribe(u), n.signal && (n.signal.aborted ? u() : n.signal.addEventListener("abort", u)));
|
|
1451
|
+
const v = parseProtocol(n.url);
|
|
1452
|
+
if (v && platform.protocols.indexOf(v) === -1) {
|
|
1453
|
+
r(new AxiosError("Unsupported protocol " + v + ":", AxiosError.ERR_BAD_REQUEST, t));
|
|
1463
1454
|
return;
|
|
1464
1455
|
}
|
|
1465
|
-
f.send(
|
|
1456
|
+
f.send(o || null);
|
|
1466
1457
|
});
|
|
1467
1458
|
}, composeSignals = (t, e) => {
|
|
1468
1459
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1469
1460
|
if (e || r) {
|
|
1470
|
-
let
|
|
1471
|
-
const
|
|
1472
|
-
if (!
|
|
1473
|
-
|
|
1461
|
+
let n = new AbortController(), o;
|
|
1462
|
+
const s = function(u) {
|
|
1463
|
+
if (!o) {
|
|
1464
|
+
o = !0, a();
|
|
1474
1465
|
const d = u instanceof Error ? u : this.reason;
|
|
1475
|
-
|
|
1466
|
+
n.abort(d instanceof AxiosError ? d : new CanceledError(d instanceof Error ? d.message : d));
|
|
1476
1467
|
}
|
|
1477
1468
|
};
|
|
1478
1469
|
let i = e && setTimeout(() => {
|
|
1479
|
-
i = null,
|
|
1470
|
+
i = null, s(new AxiosError(`timeout ${e} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
1480
1471
|
}, e);
|
|
1481
1472
|
const a = () => {
|
|
1482
1473
|
t && (i && clearTimeout(i), i = null, t.forEach((u) => {
|
|
1483
|
-
u.unsubscribe ? u.unsubscribe(
|
|
1474
|
+
u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
|
|
1484
1475
|
}), t = null);
|
|
1485
1476
|
};
|
|
1486
|
-
t.forEach((u) => u.addEventListener("abort",
|
|
1487
|
-
const { signal: l } =
|
|
1477
|
+
t.forEach((u) => u.addEventListener("abort", s));
|
|
1478
|
+
const { signal: l } = n;
|
|
1488
1479
|
return l.unsubscribe = () => utils$1.asap(a), l;
|
|
1489
1480
|
}
|
|
1490
1481
|
}, composeSignals$1 = composeSignals, streamChunk = function* (t, e) {
|
|
@@ -1493,9 +1484,9 @@ const resolveConfig = (t) => {
|
|
|
1493
1484
|
yield t;
|
|
1494
1485
|
return;
|
|
1495
1486
|
}
|
|
1496
|
-
let
|
|
1497
|
-
for (;
|
|
1498
|
-
|
|
1487
|
+
let n = 0, o;
|
|
1488
|
+
for (; n < r; )
|
|
1489
|
+
o = n + e, yield t.slice(n, o), n = o;
|
|
1499
1490
|
}, readBytes = async function* (t, e) {
|
|
1500
1491
|
for await (const r of readStream(t))
|
|
1501
1492
|
yield* streamChunk(r, e);
|
|
@@ -1507,30 +1498,30 @@ const resolveConfig = (t) => {
|
|
|
1507
1498
|
const e = t.getReader();
|
|
1508
1499
|
try {
|
|
1509
1500
|
for (; ; ) {
|
|
1510
|
-
const { done: r, value:
|
|
1501
|
+
const { done: r, value: n } = await e.read();
|
|
1511
1502
|
if (r)
|
|
1512
1503
|
break;
|
|
1513
|
-
yield
|
|
1504
|
+
yield n;
|
|
1514
1505
|
}
|
|
1515
1506
|
} finally {
|
|
1516
1507
|
await e.cancel();
|
|
1517
1508
|
}
|
|
1518
|
-
}, trackStream = (t, e, r,
|
|
1519
|
-
const
|
|
1520
|
-
let
|
|
1521
|
-
i || (i = !0,
|
|
1509
|
+
}, trackStream = (t, e, r, n) => {
|
|
1510
|
+
const o = readBytes(t, e);
|
|
1511
|
+
let s = 0, i, a = (l) => {
|
|
1512
|
+
i || (i = !0, n && n(l));
|
|
1522
1513
|
};
|
|
1523
1514
|
return new ReadableStream({
|
|
1524
1515
|
async pull(l) {
|
|
1525
1516
|
try {
|
|
1526
|
-
const { done: u, value: d } = await
|
|
1517
|
+
const { done: u, value: d } = await o.next();
|
|
1527
1518
|
if (u) {
|
|
1528
1519
|
a(), l.close();
|
|
1529
1520
|
return;
|
|
1530
1521
|
}
|
|
1531
|
-
let
|
|
1522
|
+
let g = d.byteLength;
|
|
1532
1523
|
if (r) {
|
|
1533
|
-
let b =
|
|
1524
|
+
let b = s += g;
|
|
1534
1525
|
r(b);
|
|
1535
1526
|
}
|
|
1536
1527
|
l.enqueue(new Uint8Array(d));
|
|
@@ -1539,7 +1530,7 @@ const resolveConfig = (t) => {
|
|
|
1539
1530
|
}
|
|
1540
1531
|
},
|
|
1541
1532
|
cancel(l) {
|
|
1542
|
-
return a(l),
|
|
1533
|
+
return a(l), o.return();
|
|
1543
1534
|
}
|
|
1544
1535
|
}, {
|
|
1545
1536
|
highWaterMark: 2
|
|
@@ -1565,8 +1556,8 @@ const resolveConfig = (t) => {
|
|
|
1565
1556
|
};
|
|
1566
1557
|
isFetchSupported && ((t) => {
|
|
1567
1558
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1568
|
-
!resolvers[e] && (resolvers[e] = utils$1.isFunction(t[e]) ? (r) => r[e]() : (r,
|
|
1569
|
-
throw new AxiosError(`Response type '${e}' is not supported`, AxiosError.ERR_NOT_SUPPORT,
|
|
1559
|
+
!resolvers[e] && (resolvers[e] = utils$1.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
|
|
1560
|
+
throw new AxiosError(`Response type '${e}' is not supported`, AxiosError.ERR_NOT_SUPPORT, n);
|
|
1570
1561
|
});
|
|
1571
1562
|
});
|
|
1572
1563
|
})(new Response());
|
|
@@ -1588,86 +1579,86 @@ const getBodyLength = async (t) => {
|
|
|
1588
1579
|
let {
|
|
1589
1580
|
url: e,
|
|
1590
1581
|
method: r,
|
|
1591
|
-
data:
|
|
1592
|
-
signal:
|
|
1593
|
-
cancelToken:
|
|
1582
|
+
data: n,
|
|
1583
|
+
signal: o,
|
|
1584
|
+
cancelToken: s,
|
|
1594
1585
|
timeout: i,
|
|
1595
1586
|
onDownloadProgress: a,
|
|
1596
1587
|
onUploadProgress: l,
|
|
1597
1588
|
responseType: u,
|
|
1598
1589
|
headers: d,
|
|
1599
|
-
withCredentials:
|
|
1590
|
+
withCredentials: g = "same-origin",
|
|
1600
1591
|
fetchOptions: b
|
|
1601
1592
|
} = resolveConfig(t);
|
|
1602
1593
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1603
|
-
let
|
|
1604
|
-
const f =
|
|
1605
|
-
|
|
1594
|
+
let m = composeSignals$1([o, s && s.toAbortSignal()], i), p;
|
|
1595
|
+
const f = m && m.unsubscribe && (() => {
|
|
1596
|
+
m.unsubscribe();
|
|
1606
1597
|
});
|
|
1607
|
-
let
|
|
1598
|
+
let w;
|
|
1608
1599
|
try {
|
|
1609
|
-
if (l && supportsRequestStream && r !== "get" && r !== "head" && (
|
|
1610
|
-
let
|
|
1600
|
+
if (l && supportsRequestStream && r !== "get" && r !== "head" && (w = await resolveBodyLength(d, n)) !== 0) {
|
|
1601
|
+
let D = new Request(e, {
|
|
1611
1602
|
method: "POST",
|
|
1612
|
-
body:
|
|
1603
|
+
body: n,
|
|
1613
1604
|
duplex: "half"
|
|
1614
1605
|
}), C;
|
|
1615
|
-
if (utils$1.isFormData(
|
|
1616
|
-
const [
|
|
1617
|
-
|
|
1606
|
+
if (utils$1.isFormData(n) && (C = D.headers.get("content-type")) && d.setContentType(C), D.body) {
|
|
1607
|
+
const [O, N] = progressEventDecorator(
|
|
1608
|
+
w,
|
|
1618
1609
|
progressEventReducer(asyncDecorator(l))
|
|
1619
1610
|
);
|
|
1620
|
-
|
|
1611
|
+
n = trackStream(D.body, DEFAULT_CHUNK_SIZE, O, N);
|
|
1621
1612
|
}
|
|
1622
1613
|
}
|
|
1623
|
-
utils$1.isString(
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1614
|
+
utils$1.isString(g) || (g = g ? "include" : "omit");
|
|
1615
|
+
const v = "credentials" in Request.prototype;
|
|
1616
|
+
p = new Request(e, {
|
|
1626
1617
|
...b,
|
|
1627
|
-
signal:
|
|
1618
|
+
signal: m,
|
|
1628
1619
|
method: r.toUpperCase(),
|
|
1629
1620
|
headers: d.normalize().toJSON(),
|
|
1630
|
-
body:
|
|
1621
|
+
body: n,
|
|
1631
1622
|
duplex: "half",
|
|
1632
|
-
credentials:
|
|
1623
|
+
credentials: v ? g : void 0
|
|
1633
1624
|
});
|
|
1634
|
-
let
|
|
1635
|
-
const
|
|
1636
|
-
if (supportsResponseStream && (a ||
|
|
1637
|
-
const
|
|
1638
|
-
["status", "statusText", "headers"].forEach((
|
|
1639
|
-
|
|
1625
|
+
let S = await fetch(p);
|
|
1626
|
+
const A = supportsResponseStream && (u === "stream" || u === "response");
|
|
1627
|
+
if (supportsResponseStream && (a || A && f)) {
|
|
1628
|
+
const D = {};
|
|
1629
|
+
["status", "statusText", "headers"].forEach((_) => {
|
|
1630
|
+
D[_] = S[_];
|
|
1640
1631
|
});
|
|
1641
|
-
const C = utils$1.toFiniteNumber(
|
|
1632
|
+
const C = utils$1.toFiniteNumber(S.headers.get("content-length")), [O, N] = a && progressEventDecorator(
|
|
1642
1633
|
C,
|
|
1643
1634
|
progressEventReducer(asyncDecorator(a), !0)
|
|
1644
1635
|
) || [];
|
|
1645
|
-
|
|
1646
|
-
trackStream(
|
|
1647
|
-
|
|
1636
|
+
S = new Response(
|
|
1637
|
+
trackStream(S.body, DEFAULT_CHUNK_SIZE, O, () => {
|
|
1638
|
+
N && N(), f && f();
|
|
1648
1639
|
}),
|
|
1649
|
-
|
|
1640
|
+
D
|
|
1650
1641
|
);
|
|
1651
1642
|
}
|
|
1652
1643
|
u = u || "text";
|
|
1653
|
-
let
|
|
1654
|
-
return !
|
|
1655
|
-
settle(
|
|
1656
|
-
data:
|
|
1657
|
-
headers: AxiosHeaders$1.from(
|
|
1658
|
-
status:
|
|
1659
|
-
statusText:
|
|
1644
|
+
let R = await resolvers[utils$1.findKey(resolvers, u) || "text"](S, t);
|
|
1645
|
+
return !A && f && f(), await new Promise((D, C) => {
|
|
1646
|
+
settle(D, C, {
|
|
1647
|
+
data: R,
|
|
1648
|
+
headers: AxiosHeaders$1.from(S.headers),
|
|
1649
|
+
status: S.status,
|
|
1650
|
+
statusText: S.statusText,
|
|
1660
1651
|
config: t,
|
|
1661
|
-
request:
|
|
1652
|
+
request: p
|
|
1662
1653
|
});
|
|
1663
1654
|
});
|
|
1664
|
-
} catch (
|
|
1665
|
-
throw f && f(),
|
|
1666
|
-
new AxiosError("Network Error", AxiosError.ERR_NETWORK, t,
|
|
1655
|
+
} catch (v) {
|
|
1656
|
+
throw f && f(), v && v.name === "TypeError" && /fetch/i.test(v.message) ? Object.assign(
|
|
1657
|
+
new AxiosError("Network Error", AxiosError.ERR_NETWORK, t, p),
|
|
1667
1658
|
{
|
|
1668
|
-
cause:
|
|
1659
|
+
cause: v.cause || v
|
|
1669
1660
|
}
|
|
1670
|
-
) : AxiosError.from(
|
|
1661
|
+
) : AxiosError.from(v, v && v.code, t, p);
|
|
1671
1662
|
}
|
|
1672
1663
|
}), knownAdapters = {
|
|
1673
1664
|
http: httpAdapter,
|
|
@@ -1687,30 +1678,30 @@ const renderReason = (t) => `- ${t}`, isResolvedHandle = (t) => utils$1.isFuncti
|
|
|
1687
1678
|
getAdapter: (t) => {
|
|
1688
1679
|
t = utils$1.isArray(t) ? t : [t];
|
|
1689
1680
|
const { length: e } = t;
|
|
1690
|
-
let r,
|
|
1691
|
-
const
|
|
1692
|
-
for (let
|
|
1693
|
-
r = t[
|
|
1681
|
+
let r, n;
|
|
1682
|
+
const o = {};
|
|
1683
|
+
for (let s = 0; s < e; s++) {
|
|
1684
|
+
r = t[s];
|
|
1694
1685
|
let i;
|
|
1695
|
-
if (
|
|
1686
|
+
if (n = r, !isResolvedHandle(r) && (n = knownAdapters[(i = String(r)).toLowerCase()], n === void 0))
|
|
1696
1687
|
throw new AxiosError(`Unknown adapter '${i}'`);
|
|
1697
|
-
if (
|
|
1688
|
+
if (n)
|
|
1698
1689
|
break;
|
|
1699
|
-
|
|
1690
|
+
o[i || "#" + s] = n;
|
|
1700
1691
|
}
|
|
1701
|
-
if (!
|
|
1702
|
-
const
|
|
1692
|
+
if (!n) {
|
|
1693
|
+
const s = Object.entries(o).map(
|
|
1703
1694
|
([a, l]) => `adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1704
1695
|
);
|
|
1705
|
-
let i = e ?
|
|
1706
|
-
` +
|
|
1707
|
-
`) : " " + renderReason(
|
|
1696
|
+
let i = e ? s.length > 1 ? `since :
|
|
1697
|
+
` + s.map(renderReason).join(`
|
|
1698
|
+
`) : " " + renderReason(s[0]) : "as no adapter specified";
|
|
1708
1699
|
throw new AxiosError(
|
|
1709
1700
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1710
1701
|
"ERR_NOT_SUPPORT"
|
|
1711
1702
|
);
|
|
1712
1703
|
}
|
|
1713
|
-
return
|
|
1704
|
+
return n;
|
|
1714
1705
|
},
|
|
1715
1706
|
adapters: knownAdapters
|
|
1716
1707
|
};
|
|
@@ -1743,39 +1734,39 @@ const VERSION = "1.7.7", validators$1 = {};
|
|
|
1743
1734
|
};
|
|
1744
1735
|
});
|
|
1745
1736
|
const deprecatedWarnings = {};
|
|
1746
|
-
validators$1.transitional = function t(e, r,
|
|
1747
|
-
function
|
|
1748
|
-
return "[Axios v" + VERSION + "] Transitional option '" +
|
|
1737
|
+
validators$1.transitional = function t(e, r, n) {
|
|
1738
|
+
function o(s, i) {
|
|
1739
|
+
return "[Axios v" + VERSION + "] Transitional option '" + s + "'" + i + (n ? ". " + n : "");
|
|
1749
1740
|
}
|
|
1750
|
-
return (
|
|
1741
|
+
return (s, i, a) => {
|
|
1751
1742
|
if (e === !1)
|
|
1752
1743
|
throw new AxiosError(
|
|
1753
|
-
|
|
1744
|
+
o(i, " has been removed" + (r ? " in " + r : "")),
|
|
1754
1745
|
AxiosError.ERR_DEPRECATED
|
|
1755
1746
|
);
|
|
1756
1747
|
return r && !deprecatedWarnings[i] && (deprecatedWarnings[i] = !0, console.warn(
|
|
1757
|
-
|
|
1748
|
+
o(
|
|
1758
1749
|
i,
|
|
1759
1750
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1760
1751
|
)
|
|
1761
|
-
)), e ? e(
|
|
1752
|
+
)), e ? e(s, i, a) : !0;
|
|
1762
1753
|
};
|
|
1763
1754
|
};
|
|
1764
1755
|
function assertOptions(t, e, r) {
|
|
1765
1756
|
if (typeof t != "object")
|
|
1766
1757
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
1767
|
-
const
|
|
1768
|
-
let
|
|
1769
|
-
for (;
|
|
1770
|
-
const
|
|
1758
|
+
const n = Object.keys(t);
|
|
1759
|
+
let o = n.length;
|
|
1760
|
+
for (; o-- > 0; ) {
|
|
1761
|
+
const s = n[o], i = e[s];
|
|
1771
1762
|
if (i) {
|
|
1772
|
-
const a = t[
|
|
1763
|
+
const a = t[s], l = a === void 0 || i(a, s, t);
|
|
1773
1764
|
if (l !== !0)
|
|
1774
|
-
throw new AxiosError("option " +
|
|
1765
|
+
throw new AxiosError("option " + s + " must be " + l, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
1775
1766
|
continue;
|
|
1776
1767
|
}
|
|
1777
1768
|
if (r !== !0)
|
|
1778
|
-
throw new AxiosError("Unknown option " +
|
|
1769
|
+
throw new AxiosError("Unknown option " + s, AxiosError.ERR_BAD_OPTION);
|
|
1779
1770
|
}
|
|
1780
1771
|
}
|
|
1781
1772
|
const validator = {
|
|
@@ -1800,77 +1791,77 @@ class Axios {
|
|
|
1800
1791
|
async request(e, r) {
|
|
1801
1792
|
try {
|
|
1802
1793
|
return await this._request(e, r);
|
|
1803
|
-
} catch (
|
|
1804
|
-
if (
|
|
1805
|
-
let
|
|
1806
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1807
|
-
const
|
|
1794
|
+
} catch (n) {
|
|
1795
|
+
if (n instanceof Error) {
|
|
1796
|
+
let o;
|
|
1797
|
+
Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error();
|
|
1798
|
+
const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1808
1799
|
try {
|
|
1809
|
-
|
|
1810
|
-
` +
|
|
1800
|
+
n.stack ? s && !String(n.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1801
|
+
` + s) : n.stack = s;
|
|
1811
1802
|
} catch {
|
|
1812
1803
|
}
|
|
1813
1804
|
}
|
|
1814
|
-
throw
|
|
1805
|
+
throw n;
|
|
1815
1806
|
}
|
|
1816
1807
|
}
|
|
1817
1808
|
_request(e, r) {
|
|
1818
1809
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = mergeConfig(this.defaults, r);
|
|
1819
|
-
const { transitional:
|
|
1820
|
-
|
|
1810
|
+
const { transitional: n, paramsSerializer: o, headers: s } = r;
|
|
1811
|
+
n !== void 0 && validator.assertOptions(n, {
|
|
1821
1812
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
1822
1813
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
1823
1814
|
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
1824
|
-
}, !1),
|
|
1825
|
-
serialize:
|
|
1826
|
-
} : validator.assertOptions(
|
|
1815
|
+
}, !1), o != null && (utils$1.isFunction(o) ? r.paramsSerializer = {
|
|
1816
|
+
serialize: o
|
|
1817
|
+
} : validator.assertOptions(o, {
|
|
1827
1818
|
encode: validators.function,
|
|
1828
1819
|
serialize: validators.function
|
|
1829
1820
|
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1830
|
-
let i =
|
|
1831
|
-
|
|
1832
|
-
|
|
1821
|
+
let i = s && utils$1.merge(
|
|
1822
|
+
s.common,
|
|
1823
|
+
s[r.method]
|
|
1833
1824
|
);
|
|
1834
|
-
|
|
1825
|
+
s && utils$1.forEach(
|
|
1835
1826
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1836
|
-
(
|
|
1837
|
-
delete
|
|
1827
|
+
(p) => {
|
|
1828
|
+
delete s[p];
|
|
1838
1829
|
}
|
|
1839
|
-
), r.headers = AxiosHeaders$1.concat(i,
|
|
1830
|
+
), r.headers = AxiosHeaders$1.concat(i, s);
|
|
1840
1831
|
const a = [];
|
|
1841
1832
|
let l = !0;
|
|
1842
|
-
this.interceptors.request.forEach(function(
|
|
1843
|
-
typeof
|
|
1833
|
+
this.interceptors.request.forEach(function(p) {
|
|
1834
|
+
typeof p.runWhen == "function" && p.runWhen(r) === !1 || (l = l && p.synchronous, a.unshift(p.fulfilled, p.rejected));
|
|
1844
1835
|
});
|
|
1845
1836
|
const u = [];
|
|
1846
|
-
this.interceptors.response.forEach(function(
|
|
1847
|
-
u.push(
|
|
1837
|
+
this.interceptors.response.forEach(function(p) {
|
|
1838
|
+
u.push(p.fulfilled, p.rejected);
|
|
1848
1839
|
});
|
|
1849
|
-
let d,
|
|
1840
|
+
let d, g = 0, b;
|
|
1850
1841
|
if (!l) {
|
|
1851
|
-
const
|
|
1852
|
-
for (
|
|
1853
|
-
d = d.then(g
|
|
1842
|
+
const p = [dispatchRequest.bind(this), void 0];
|
|
1843
|
+
for (p.unshift.apply(p, a), p.push.apply(p, u), b = p.length, d = Promise.resolve(r); g < b; )
|
|
1844
|
+
d = d.then(p[g++], p[g++]);
|
|
1854
1845
|
return d;
|
|
1855
1846
|
}
|
|
1856
1847
|
b = a.length;
|
|
1857
|
-
let
|
|
1858
|
-
for (
|
|
1859
|
-
const
|
|
1848
|
+
let m = r;
|
|
1849
|
+
for (g = 0; g < b; ) {
|
|
1850
|
+
const p = a[g++], f = a[g++];
|
|
1860
1851
|
try {
|
|
1861
|
-
|
|
1862
|
-
} catch (
|
|
1863
|
-
f.call(this,
|
|
1852
|
+
m = p(m);
|
|
1853
|
+
} catch (w) {
|
|
1854
|
+
f.call(this, w);
|
|
1864
1855
|
break;
|
|
1865
1856
|
}
|
|
1866
1857
|
}
|
|
1867
1858
|
try {
|
|
1868
|
-
d = dispatchRequest.call(this,
|
|
1869
|
-
} catch (
|
|
1870
|
-
return Promise.reject(
|
|
1859
|
+
d = dispatchRequest.call(this, m);
|
|
1860
|
+
} catch (p) {
|
|
1861
|
+
return Promise.reject(p);
|
|
1871
1862
|
}
|
|
1872
|
-
for (
|
|
1873
|
-
d = d.then(u[
|
|
1863
|
+
for (g = 0, b = u.length; g < b; )
|
|
1864
|
+
d = d.then(u[g++], u[g++]);
|
|
1874
1865
|
return d;
|
|
1875
1866
|
}
|
|
1876
1867
|
getUri(e) {
|
|
@@ -1880,24 +1871,24 @@ class Axios {
|
|
|
1880
1871
|
}
|
|
1881
1872
|
}
|
|
1882
1873
|
utils$1.forEach(["delete", "get", "head", "options"], function t(e) {
|
|
1883
|
-
Axios.prototype[e] = function(r,
|
|
1884
|
-
return this.request(mergeConfig(
|
|
1874
|
+
Axios.prototype[e] = function(r, n) {
|
|
1875
|
+
return this.request(mergeConfig(n || {}, {
|
|
1885
1876
|
method: e,
|
|
1886
1877
|
url: r,
|
|
1887
|
-
data: (
|
|
1878
|
+
data: (n || {}).data
|
|
1888
1879
|
}));
|
|
1889
1880
|
};
|
|
1890
1881
|
});
|
|
1891
1882
|
utils$1.forEach(["post", "put", "patch"], function t(e) {
|
|
1892
|
-
function r(
|
|
1893
|
-
return function(
|
|
1883
|
+
function r(n) {
|
|
1884
|
+
return function(o, s, i) {
|
|
1894
1885
|
return this.request(mergeConfig(i || {}, {
|
|
1895
1886
|
method: e,
|
|
1896
|
-
headers:
|
|
1887
|
+
headers: n ? {
|
|
1897
1888
|
"Content-Type": "multipart/form-data"
|
|
1898
1889
|
} : {},
|
|
1899
|
-
url:
|
|
1900
|
-
data:
|
|
1890
|
+
url: o,
|
|
1891
|
+
data: s
|
|
1901
1892
|
}));
|
|
1902
1893
|
};
|
|
1903
1894
|
}
|
|
@@ -1909,27 +1900,27 @@ class CancelToken {
|
|
|
1909
1900
|
if (typeof e != "function")
|
|
1910
1901
|
throw new TypeError("executor must be a function.");
|
|
1911
1902
|
let r;
|
|
1912
|
-
this.promise = new Promise(function(
|
|
1913
|
-
r =
|
|
1903
|
+
this.promise = new Promise(function(o) {
|
|
1904
|
+
r = o;
|
|
1914
1905
|
});
|
|
1915
|
-
const
|
|
1916
|
-
this.promise.then((
|
|
1917
|
-
if (!
|
|
1906
|
+
const n = this;
|
|
1907
|
+
this.promise.then((o) => {
|
|
1908
|
+
if (!n._listeners)
|
|
1918
1909
|
return;
|
|
1919
|
-
let
|
|
1920
|
-
for (;
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}), this.promise.then = (
|
|
1924
|
-
let
|
|
1910
|
+
let s = n._listeners.length;
|
|
1911
|
+
for (; s-- > 0; )
|
|
1912
|
+
n._listeners[s](o);
|
|
1913
|
+
n._listeners = null;
|
|
1914
|
+
}), this.promise.then = (o) => {
|
|
1915
|
+
let s;
|
|
1925
1916
|
const i = new Promise((a) => {
|
|
1926
|
-
|
|
1927
|
-
}).then(
|
|
1917
|
+
n.subscribe(a), s = a;
|
|
1918
|
+
}).then(o);
|
|
1928
1919
|
return i.cancel = function() {
|
|
1929
|
-
|
|
1920
|
+
n.unsubscribe(s);
|
|
1930
1921
|
}, i;
|
|
1931
|
-
}, e(function(
|
|
1932
|
-
|
|
1922
|
+
}, e(function(o, s, i) {
|
|
1923
|
+
n.reason || (n.reason = new CanceledError(o, s, i), r(n.reason));
|
|
1933
1924
|
});
|
|
1934
1925
|
}
|
|
1935
1926
|
/**
|
|
@@ -1959,8 +1950,8 @@ class CancelToken {
|
|
|
1959
1950
|
r !== -1 && this._listeners.splice(r, 1);
|
|
1960
1951
|
}
|
|
1961
1952
|
toAbortSignal() {
|
|
1962
|
-
const e = new AbortController(), r = (
|
|
1963
|
-
e.abort(
|
|
1953
|
+
const e = new AbortController(), r = (n) => {
|
|
1954
|
+
e.abort(n);
|
|
1964
1955
|
};
|
|
1965
1956
|
return this.subscribe(r), e.signal.unsubscribe = () => this.unsubscribe(r), e.signal;
|
|
1966
1957
|
}
|
|
@@ -2058,8 +2049,8 @@ Object.entries(HttpStatusCode).forEach(([t, e]) => {
|
|
|
2058
2049
|
const HttpStatusCode$1 = HttpStatusCode;
|
|
2059
2050
|
function createInstance(t) {
|
|
2060
2051
|
const e = new Axios$1(t), r = bind(Axios$1.prototype.request, e);
|
|
2061
|
-
return utils$1.extend(r, Axios$1.prototype, e, { allOwnKeys: !0 }), utils$1.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(
|
|
2062
|
-
return createInstance(mergeConfig(t,
|
|
2052
|
+
return utils$1.extend(r, Axios$1.prototype, e, { allOwnKeys: !0 }), utils$1.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(n) {
|
|
2053
|
+
return createInstance(mergeConfig(t, n));
|
|
2063
2054
|
}, r;
|
|
2064
2055
|
}
|
|
2065
2056
|
const axios = createInstance(defaults$1);
|
|
@@ -2086,8 +2077,8 @@ axios.default = axios;
|
|
|
2086
2077
|
function assign(t) {
|
|
2087
2078
|
for (var e = 1; e < arguments.length; e++) {
|
|
2088
2079
|
var r = arguments[e];
|
|
2089
|
-
for (var
|
|
2090
|
-
t[
|
|
2080
|
+
for (var n in r)
|
|
2081
|
+
t[n] = r[n];
|
|
2091
2082
|
}
|
|
2092
2083
|
return t;
|
|
2093
2084
|
}
|
|
@@ -2103,47 +2094,47 @@ var defaultConverter = {
|
|
|
2103
2094
|
}
|
|
2104
2095
|
};
|
|
2105
2096
|
function init(t, e) {
|
|
2106
|
-
function r(
|
|
2097
|
+
function r(o, s, i) {
|
|
2107
2098
|
if (!(typeof document > "u")) {
|
|
2108
|
-
i = assign({}, e, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()),
|
|
2099
|
+
i = assign({}, e, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
2109
2100
|
var a = "";
|
|
2110
2101
|
for (var l in i)
|
|
2111
2102
|
i[l] && (a += "; " + l, i[l] !== !0 && (a += "=" + i[l].split(";")[0]));
|
|
2112
|
-
return document.cookie =
|
|
2103
|
+
return document.cookie = o + "=" + t.write(s, o) + a;
|
|
2113
2104
|
}
|
|
2114
2105
|
}
|
|
2115
|
-
function
|
|
2116
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
2117
|
-
for (var
|
|
2118
|
-
var l =
|
|
2106
|
+
function n(o) {
|
|
2107
|
+
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
2108
|
+
for (var s = document.cookie ? document.cookie.split("; ") : [], i = {}, a = 0; a < s.length; a++) {
|
|
2109
|
+
var l = s[a].split("="), u = l.slice(1).join("=");
|
|
2119
2110
|
try {
|
|
2120
2111
|
var d = decodeURIComponent(l[0]);
|
|
2121
|
-
if (i[d] = t.read(u, d),
|
|
2112
|
+
if (i[d] = t.read(u, d), o === d)
|
|
2122
2113
|
break;
|
|
2123
2114
|
} catch {
|
|
2124
2115
|
}
|
|
2125
2116
|
}
|
|
2126
|
-
return
|
|
2117
|
+
return o ? i[o] : i;
|
|
2127
2118
|
}
|
|
2128
2119
|
}
|
|
2129
2120
|
return Object.create(
|
|
2130
2121
|
{
|
|
2131
2122
|
set: r,
|
|
2132
|
-
get:
|
|
2133
|
-
remove: function(
|
|
2123
|
+
get: n,
|
|
2124
|
+
remove: function(o, s) {
|
|
2134
2125
|
r(
|
|
2135
|
-
|
|
2126
|
+
o,
|
|
2136
2127
|
"",
|
|
2137
|
-
assign({},
|
|
2128
|
+
assign({}, s, {
|
|
2138
2129
|
expires: -1
|
|
2139
2130
|
})
|
|
2140
2131
|
);
|
|
2141
2132
|
},
|
|
2142
|
-
withAttributes: function(
|
|
2143
|
-
return init(this.converter, assign({}, this.attributes,
|
|
2133
|
+
withAttributes: function(o) {
|
|
2134
|
+
return init(this.converter, assign({}, this.attributes, o));
|
|
2144
2135
|
},
|
|
2145
|
-
withConverter: function(
|
|
2146
|
-
return init(assign({}, this.converter,
|
|
2136
|
+
withConverter: function(o) {
|
|
2137
|
+
return init(assign({}, this.converter, o), this.attributes);
|
|
2147
2138
|
}
|
|
2148
2139
|
},
|
|
2149
2140
|
{
|
|
@@ -2159,32 +2150,32 @@ class ErrorsHandler {
|
|
|
2159
2150
|
return "message" in e && (r.msg = e.message), "error" in e && (r.msg = e.error), "status" in e && (r.statusCode = e.status), r;
|
|
2160
2151
|
}
|
|
2161
2152
|
getErrorMessageFromData(e, r) {
|
|
2162
|
-
let
|
|
2163
|
-
const
|
|
2164
|
-
for (let [i, a] of
|
|
2165
|
-
if (
|
|
2166
|
-
|
|
2153
|
+
let n = "";
|
|
2154
|
+
const o = ["message", "msg", "error", "Message", "Messages", "Error", "Errors"], s = Object.entries(r);
|
|
2155
|
+
for (let [i, a] of s)
|
|
2156
|
+
if (o.includes(i)) {
|
|
2157
|
+
n = a;
|
|
2167
2158
|
break;
|
|
2168
2159
|
}
|
|
2169
|
-
return
|
|
2160
|
+
return n;
|
|
2170
2161
|
}
|
|
2171
2162
|
gerErrorByStatusCordovaHttp(e, r) {
|
|
2172
|
-
let
|
|
2173
|
-
return [-1, -4].includes(e) ?
|
|
2163
|
+
let n = "";
|
|
2164
|
+
return [-1, -4].includes(e) ? n = "Нет возможности подключиться к серверу" : e === -3 ? n = `Не удается разрешить хост ${r}: Нет адреса, связанного с именем хоста` : e === -6 && (n = "Нет доступа к сети"), e === -8 && console.log("download aborted"), n;
|
|
2174
2165
|
}
|
|
2175
2166
|
}
|
|
2176
2167
|
class SaveRequest {
|
|
2177
2168
|
constructor() {
|
|
2178
2169
|
c(this, "list", []), c(this, "setList", (e) => {
|
|
2179
2170
|
const { list: r } = this;
|
|
2180
|
-
r.some(({ url:
|
|
2171
|
+
r.some(({ url: n }) => e.url === n) || this.list.push(e);
|
|
2181
2172
|
});
|
|
2182
2173
|
}
|
|
2183
2174
|
getList() {
|
|
2184
2175
|
return this.list;
|
|
2185
2176
|
}
|
|
2186
2177
|
removeItem(e) {
|
|
2187
|
-
const r = this.list.filter((
|
|
2178
|
+
const r = this.list.filter((n) => n.url !== e);
|
|
2188
2179
|
this.list = r;
|
|
2189
2180
|
}
|
|
2190
2181
|
getLength() {
|
|
@@ -2192,17 +2183,17 @@ class SaveRequest {
|
|
|
2192
2183
|
}
|
|
2193
2184
|
getIsItem(e) {
|
|
2194
2185
|
const { list: r } = this;
|
|
2195
|
-
return r.some((
|
|
2186
|
+
return r.some((n) => n.url === e);
|
|
2196
2187
|
}
|
|
2197
2188
|
}
|
|
2198
2189
|
const x = class {
|
|
2199
2190
|
};
|
|
2200
|
-
c(x, "events", (t, e, r,
|
|
2191
|
+
c(x, "events", (t, e, r, n = "") => new Promise((o, s) => {
|
|
2201
2192
|
let i = 0;
|
|
2202
2193
|
for (let [a, l] of r)
|
|
2203
|
-
i++, t === "add" ? e.addEventListener(a, l) : e.removeEventListener(a, l), i === r.length &&
|
|
2204
|
-
})), c(x, "sortDataByAlphabet", (t, e) => t.sort((r,
|
|
2205
|
-
t.sort((r,
|
|
2194
|
+
i++, t === "add" ? e.addEventListener(a, l) : e.removeEventListener(a, l), i === r.length && o("");
|
|
2195
|
+
})), c(x, "sortDataByAlphabet", (t, e) => t.sort((r, n) => n[e].trim() < r[e].trim() ? 1 : -1)), c(x, "sortDataByDate", (t, e) => {
|
|
2196
|
+
t.sort((r, n) => x.hasDateLessPeriod(n[e], r[e]) ? 1 : -1);
|
|
2206
2197
|
}), c(x, "sortDataByDateAndTime", (t, e) => {
|
|
2207
2198
|
}), c(x, "splitDateFromTime", (t) => t.split(" ")), c(x, "reverseDate", (t) => {
|
|
2208
2199
|
let [e, r] = x.splitDateFromTime(t);
|
|
@@ -2226,12 +2217,12 @@ c(x, "events", (t, e, r, s = "") => new Promise((n, o) => {
|
|
|
2226
2217
|
if (r && (r == null ? void 0 : r.dateMinMax) === ">")
|
|
2227
2218
|
return Math.floor(Number(new Date(t))) > Math.floor(Number(new Date(e)));
|
|
2228
2219
|
}), c(x, "getEndsWithArr", (t, e) => t.slice(-e)), c(x, "deepMerge", (...t) => {
|
|
2229
|
-
const e = {}, r = (
|
|
2230
|
-
for (const
|
|
2231
|
-
Object.prototype.hasOwnProperty.call(
|
|
2220
|
+
const e = {}, r = (n) => {
|
|
2221
|
+
for (const o in n)
|
|
2222
|
+
Object.prototype.hasOwnProperty.call(n, o) && (Object.prototype.toString.call(n[o]) === "[object Object]" ? e[o] = x.deepMerge(e[o], n[o]) : e[o] = n[o]);
|
|
2232
2223
|
};
|
|
2233
|
-
for (let
|
|
2234
|
-
r(t[
|
|
2224
|
+
for (let n = 0; n < t.length; n++)
|
|
2225
|
+
r(t[n]);
|
|
2235
2226
|
return e;
|
|
2236
2227
|
}), c(x, "isJSON", (t) => {
|
|
2237
2228
|
try {
|
|
@@ -2242,15 +2233,15 @@ c(x, "events", (t, e, r, s = "") => new Promise((n, o) => {
|
|
|
2242
2233
|
return !0;
|
|
2243
2234
|
}), c(x, "filterItems", (t, e) => t.filter((r) => r.name.toLowerCase().includes(e.toLowerCase()))), c(x, "sortByOnline", (t) => {
|
|
2244
2235
|
const e = [], r = [];
|
|
2245
|
-
for (let
|
|
2246
|
-
const i = t[
|
|
2236
|
+
for (let s = 0; t.length > s; s++) {
|
|
2237
|
+
const i = t[s];
|
|
2247
2238
|
i.online ? e.push(i) : r.push(i);
|
|
2248
2239
|
}
|
|
2249
|
-
const
|
|
2250
|
-
return [...
|
|
2240
|
+
const n = x.sortDataByAlphabet(e, "name"), o = x.sortDataByAlphabet(r, "name");
|
|
2241
|
+
return [...n, ...o];
|
|
2251
2242
|
});
|
|
2252
2243
|
let Utils = x;
|
|
2253
|
-
const E = class
|
|
2244
|
+
const E = class L {
|
|
2254
2245
|
constructor() {
|
|
2255
2246
|
c(this, "getDecodingError", () => ({
|
|
2256
2247
|
ERR_BAD_OPTION_VALUE: "Неправильное значение опции",
|
|
@@ -2263,14 +2254,14 @@ const E = class I {
|
|
|
2263
2254
|
}));
|
|
2264
2255
|
}
|
|
2265
2256
|
static setErrorsHandler(e) {
|
|
2266
|
-
|
|
2257
|
+
L.errorsHandler = e;
|
|
2267
2258
|
}
|
|
2268
2259
|
};
|
|
2269
2260
|
c(E, "keyCookie", "AuthCookie"), c(E, "cookieOptions", {}), c(E, "registerRequest", new SaveRequest()), c(E, "registerFailedRequests", new SaveRequest()), c(E, "requestUploadToken", null), c(E, "errorsHandler", new ErrorsHandler()), c(E, "setMethodUploadToken", (t) => {
|
|
2270
2261
|
E.requestUploadToken = t;
|
|
2271
|
-
}), c(E, "requestInServer", (t, e = {}) => new Promise((r,
|
|
2272
|
-
var
|
|
2273
|
-
let
|
|
2262
|
+
}), c(E, "requestInServer", (t, e = {}) => new Promise((r, n) => {
|
|
2263
|
+
var o;
|
|
2264
|
+
let s = { url: t, statusCode: 0, data: {}, res: {} };
|
|
2274
2265
|
const i = {
|
|
2275
2266
|
method: "get",
|
|
2276
2267
|
headers: {
|
|
@@ -2284,74 +2275,74 @@ c(E, "keyCookie", "AuthCookie"), c(E, "cookieOptions", {}), c(E, "registerReques
|
|
|
2284
2275
|
isErr: !0,
|
|
2285
2276
|
request: a,
|
|
2286
2277
|
errExt: { message: u, status: l }
|
|
2287
|
-
}, { cordova:
|
|
2288
|
-
if (
|
|
2289
|
-
const { http: b } =
|
|
2278
|
+
}, { cordova: g } = window;
|
|
2279
|
+
if (g != null && g.cordova && (o = g == null ? void 0 : g.plugin) != null && o.http) {
|
|
2280
|
+
const { http: b } = g == null ? void 0 : g.plugin;
|
|
2290
2281
|
"Content-Type" in (a == null ? void 0 : a.headers) && ((a == null ? void 0 : a.headers["Content-Type"]) === "multipart/form-data" && b.setDataSerializer("urlencoded"), (a == null ? void 0 : a.headers["Content-Type"]) === "application/json" && b.setDataSerializer("json")), b.setRequestTimeout(Number(a.timeout) / 1e3), E.registerRequest.setList({ url: t, options: a }), b.sendRequest(
|
|
2291
2282
|
t,
|
|
2292
2283
|
a,
|
|
2293
|
-
(
|
|
2284
|
+
(m) => {
|
|
2294
2285
|
E.registerFailedRequests.removeItem(t), E.registerRequest.removeItem(t);
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2286
|
+
const p = (m == null ? void 0 : m.headers) && m.headers["set-cookie"], f = m.status, w = Utils.isJSON(m == null ? void 0 : m.data) ? JSON.parse(m == null ? void 0 : m.data) : m == null ? void 0 : m.data;
|
|
2287
|
+
s = { ...s, statusCode: f, data: w, res: m }, f === 200 && p && (E.saveToken(p), s.data = { ...s.data, token: p }), r(s);
|
|
2297
2288
|
},
|
|
2298
|
-
(
|
|
2299
|
-
const
|
|
2300
|
-
headers:
|
|
2301
|
-
status:
|
|
2289
|
+
(m) => {
|
|
2290
|
+
const p = E.errorsHandler.handleError(m), { url: f, status: w, headers: v, error: S, ...A } = m, R = typeof S == "string" ? Utils.isJSON(S.trim()) : !1, D = {
|
|
2291
|
+
headers: v,
|
|
2292
|
+
status: w,
|
|
2302
2293
|
message: ""
|
|
2303
2294
|
};
|
|
2304
|
-
if (
|
|
2305
|
-
const C = JSON.parse(
|
|
2306
|
-
|
|
2295
|
+
if (R) {
|
|
2296
|
+
const C = JSON.parse(S.trim()), O = E.errorsHandler.getErrorMessageFromData(w, C);
|
|
2297
|
+
D.message = O, D.data = C, p.msg = E.errorsHandler.gerErrorByStatusCordovaHttp(w, f);
|
|
2307
2298
|
} else
|
|
2308
|
-
typeof
|
|
2309
|
-
|
|
2299
|
+
typeof S == "string" && (D.message = S);
|
|
2300
|
+
n({ ...d, ...p, errExt: D });
|
|
2310
2301
|
}
|
|
2311
2302
|
);
|
|
2312
2303
|
} else
|
|
2313
2304
|
E.registerRequest.setList({ url: t, options: a }), axios({ url: t, ...a }).then((b) => {
|
|
2314
2305
|
E.registerRequest.removeItem(t);
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2306
|
+
const m = b.status, p = b == null ? void 0 : b.data;
|
|
2307
|
+
s = { ...s, statusCode: m, data: p, res: b }, r(s);
|
|
2317
2308
|
}).catch((b) => {
|
|
2318
|
-
const
|
|
2319
|
-
code:
|
|
2309
|
+
const m = E.errorsHandler.handleError(b), { code: p, config: f, status: w, message: v, response: S, stack: A } = b, R = {
|
|
2310
|
+
code: p,
|
|
2320
2311
|
config: f,
|
|
2321
|
-
status:
|
|
2322
|
-
message:
|
|
2323
|
-
headers:
|
|
2324
|
-
statusText:
|
|
2325
|
-
data:
|
|
2326
|
-
stack:
|
|
2312
|
+
status: w || l,
|
|
2313
|
+
message: v,
|
|
2314
|
+
headers: S == null ? void 0 : S.headers,
|
|
2315
|
+
statusText: S == null ? void 0 : S.statusText,
|
|
2316
|
+
data: S == null ? void 0 : S.data,
|
|
2317
|
+
stack: A
|
|
2327
2318
|
};
|
|
2328
|
-
|
|
2319
|
+
n({ ...d, ...m, errExt: R });
|
|
2329
2320
|
});
|
|
2330
2321
|
})), c(E, "getAuthCookies", () => {
|
|
2331
2322
|
var t;
|
|
2332
2323
|
const { keyCookie: e } = E, { cordova: r } = window;
|
|
2333
2324
|
if ((t = r == null ? void 0 : r.plugin) != null && t.http) {
|
|
2334
|
-
const { http:
|
|
2335
|
-
return
|
|
2325
|
+
const { http: n } = r == null ? void 0 : r.plugin;
|
|
2326
|
+
return n.getCookieString(e);
|
|
2336
2327
|
}
|
|
2337
2328
|
return api.get(e);
|
|
2338
2329
|
}), c(E, "saveToken", (t) => {
|
|
2339
2330
|
var e;
|
|
2340
2331
|
if (t) {
|
|
2341
|
-
const { keyCookie: r, cookieOptions:
|
|
2342
|
-
if ((e =
|
|
2343
|
-
const { http:
|
|
2344
|
-
|
|
2332
|
+
const { keyCookie: r, cookieOptions: n } = E, { cordova: o } = window;
|
|
2333
|
+
if ((e = o == null ? void 0 : o.plugin) != null && e.http) {
|
|
2334
|
+
const { http: s } = o == null ? void 0 : o.plugin;
|
|
2335
|
+
s.setCookie(r, t, n);
|
|
2345
2336
|
return;
|
|
2346
2337
|
}
|
|
2347
|
-
api.set(r, t,
|
|
2338
|
+
api.set(r, t, n);
|
|
2348
2339
|
}
|
|
2349
2340
|
}), c(E, "removeAuthCookie", () => {
|
|
2350
2341
|
var t;
|
|
2351
2342
|
const { keyCookie: e } = E, { cordova: r } = window;
|
|
2352
2343
|
if ((t = r == null ? void 0 : r.plugin) != null && t.http) {
|
|
2353
|
-
const { http:
|
|
2354
|
-
|
|
2344
|
+
const { http: n } = r == null ? void 0 : r.plugin;
|
|
2345
|
+
n.clearCookies();
|
|
2355
2346
|
return;
|
|
2356
2347
|
}
|
|
2357
2348
|
api.remove(e);
|
|
@@ -2364,19 +2355,19 @@ class NetworkInformationAbstract {
|
|
|
2364
2355
|
class NetworkInformationCordova extends NetworkInformationAbstract {
|
|
2365
2356
|
constructor() {
|
|
2366
2357
|
super(...arguments), c(this, "watchers", (e) => {
|
|
2367
|
-
const r = (
|
|
2368
|
-
const
|
|
2369
|
-
e(
|
|
2358
|
+
const r = (n) => {
|
|
2359
|
+
const o = !["none", "unknown"].includes(n);
|
|
2360
|
+
e(o, n);
|
|
2370
2361
|
};
|
|
2371
2362
|
if (navigator != null && navigator.connection && "getInfo" in (navigator == null ? void 0 : navigator.connection)) {
|
|
2372
|
-
const
|
|
2373
|
-
var
|
|
2374
|
-
return (
|
|
2375
|
-
},
|
|
2376
|
-
const
|
|
2377
|
-
r(
|
|
2363
|
+
const n = () => {
|
|
2364
|
+
var s;
|
|
2365
|
+
return (s = navigator == null ? void 0 : navigator.connection) == null ? void 0 : s.type;
|
|
2366
|
+
}, o = () => {
|
|
2367
|
+
const s = n();
|
|
2368
|
+
r(s);
|
|
2378
2369
|
};
|
|
2379
|
-
|
|
2370
|
+
o(), document.addEventListener("offline", o, !1), document.addEventListener("online", o, !1);
|
|
2380
2371
|
} else
|
|
2381
2372
|
console.error("Нету navigator.connection.getInfo");
|
|
2382
2373
|
}), c(this, "getControls", () => ({
|
|
@@ -2403,9 +2394,9 @@ class InternetWatchers {
|
|
|
2403
2394
|
{ event: "online", status: !0, textStatus: "network" },
|
|
2404
2395
|
{ event: "offline", status: !1, textStatus: "none" }
|
|
2405
2396
|
];
|
|
2406
|
-
for (let
|
|
2407
|
-
const
|
|
2408
|
-
this.state.listCloseSignals.push(
|
|
2397
|
+
for (let n = 0; n < r.length; n++) {
|
|
2398
|
+
const o = new AbortController(), { event: s, status: i, textStatus: a } = r[n];
|
|
2399
|
+
this.state.listCloseSignals.push(o), window.addEventListener(s, () => e(i, a), { signal: o.signal });
|
|
2409
2400
|
}
|
|
2410
2401
|
}
|
|
2411
2402
|
}
|
|
@@ -2432,42 +2423,42 @@ class NetworkInformationPC extends NetworkInformationAbstract {
|
|
|
2432
2423
|
}
|
|
2433
2424
|
class EventSubscribers {
|
|
2434
2425
|
constructor(e) {
|
|
2435
|
-
c(this, "subscribersEvents", {}), c(this, "getListNameEvents", () => Object.keys(this.subscribersEvents)), c(this, "getSubscribers", () => this.subscribersEvents), c(this, "subscribe", (r,
|
|
2436
|
-
var
|
|
2437
|
-
(
|
|
2438
|
-
}), c(this, "unsubscribe", (r,
|
|
2439
|
-
var
|
|
2440
|
-
this.subscribersEvents[r] && (this.subscribersEvents[r] = (
|
|
2441
|
-
}), c(this, "publish", (r,
|
|
2442
|
-
var
|
|
2443
|
-
this.subscribersEvents[r] && ((
|
|
2444
|
-
|
|
2426
|
+
c(this, "subscribersEvents", {}), c(this, "getListNameEvents", () => Object.keys(this.subscribersEvents)), c(this, "getSubscribers", () => this.subscribersEvents), c(this, "subscribe", (r, n) => {
|
|
2427
|
+
var o;
|
|
2428
|
+
(o = this.subscribersEvents[r]) == null || o.push(n);
|
|
2429
|
+
}), c(this, "unsubscribe", (r, n) => {
|
|
2430
|
+
var o;
|
|
2431
|
+
this.subscribersEvents[r] && (this.subscribersEvents[r] = (o = this.subscribersEvents[r]) == null ? void 0 : o.filter((s) => s !== n));
|
|
2432
|
+
}), c(this, "publish", (r, n) => {
|
|
2433
|
+
var o;
|
|
2434
|
+
this.subscribersEvents[r] && ((o = this.subscribersEvents[r]) == null || o.forEach((s) => {
|
|
2435
|
+
s(n);
|
|
2445
2436
|
}));
|
|
2446
2437
|
}), c(this, "resetSubscribers", () => {
|
|
2447
2438
|
const r = Object.entries(this.subscribersEvents);
|
|
2448
|
-
for (const [
|
|
2449
|
-
this.subscribersEvents[
|
|
2439
|
+
for (const [n, o] of r)
|
|
2440
|
+
this.subscribersEvents[n] = [];
|
|
2450
2441
|
}), e.forEach((r) => {
|
|
2451
2442
|
this.subscribersEvents[r] = [];
|
|
2452
2443
|
});
|
|
2453
2444
|
}
|
|
2454
2445
|
}
|
|
2455
|
-
const y = class
|
|
2446
|
+
const y = class T {
|
|
2456
2447
|
static setState(e) {
|
|
2457
|
-
|
|
2448
|
+
T.state = { ...T.state, ...e };
|
|
2458
2449
|
}
|
|
2459
2450
|
static getState() {
|
|
2460
|
-
return
|
|
2451
|
+
return T.state;
|
|
2461
2452
|
}
|
|
2462
2453
|
static getIsNetwork() {
|
|
2463
|
-
return
|
|
2454
|
+
return T.state.isNetworkStatus;
|
|
2464
2455
|
}
|
|
2465
2456
|
static request({ keyAction: e, request: r }) {
|
|
2466
|
-
const { url:
|
|
2467
|
-
return new Promise((
|
|
2468
|
-
|
|
2469
|
-
const a =
|
|
2470
|
-
url:
|
|
2457
|
+
const { url: n, ...o } = r;
|
|
2458
|
+
return new Promise((s, i) => {
|
|
2459
|
+
T.getIsInit() || T.init();
|
|
2460
|
+
const a = T.getIsNetwork(), l = {
|
|
2461
|
+
url: n,
|
|
2471
2462
|
keyAction: e,
|
|
2472
2463
|
isErr: !a,
|
|
2473
2464
|
msg: a ? "" : "Нет интернета",
|
|
@@ -2475,8 +2466,8 @@ const y = class R {
|
|
|
2475
2466
|
statusCode: a ? 0 : 520,
|
|
2476
2467
|
isReload: !1
|
|
2477
2468
|
};
|
|
2478
|
-
if (
|
|
2479
|
-
apiRequest.requestInServer(
|
|
2469
|
+
if (T.events.publish("fetch", l), a) {
|
|
2470
|
+
apiRequest.requestInServer(n, o).then((u) => {
|
|
2480
2471
|
const d = {
|
|
2481
2472
|
isReq: !1,
|
|
2482
2473
|
isReload: !0,
|
|
@@ -2485,7 +2476,7 @@ const y = class R {
|
|
|
2485
2476
|
msg: "",
|
|
2486
2477
|
...u
|
|
2487
2478
|
};
|
|
2488
|
-
|
|
2479
|
+
T.events.publish("fetch", d), s(d);
|
|
2489
2480
|
}).catch((u) => {
|
|
2490
2481
|
const d = {
|
|
2491
2482
|
//TODO: Проверить. dataErr не верно возвращает
|
|
@@ -2494,11 +2485,11 @@ const y = class R {
|
|
|
2494
2485
|
keyAction: e,
|
|
2495
2486
|
...u
|
|
2496
2487
|
};
|
|
2497
|
-
|
|
2488
|
+
T.events.publish("fetch", d), i(d);
|
|
2498
2489
|
});
|
|
2499
2490
|
return;
|
|
2500
2491
|
}
|
|
2501
|
-
|
|
2492
|
+
T.events.publish("fetch", l), i(l);
|
|
2502
2493
|
});
|
|
2503
2494
|
}
|
|
2504
2495
|
};
|
|
@@ -2535,12 +2526,18 @@ c(Numbers, "getOnlyTheStringNumbers", (t) => t.split("").filter((e) => !Number.i
|
|
|
2535
2526
|
return Math.floor(Math.random() * t.getTime());
|
|
2536
2527
|
}), c(Numbers, "randomMinMax", (t, e) => Math.floor(Math.random() * (e - t + 1)) + t);
|
|
2537
2528
|
class NetworkStatusTracker {
|
|
2538
|
-
constructor(e) {
|
|
2529
|
+
constructor(e = []) {
|
|
2539
2530
|
c(this, "networkInfo"), c(this, "listUrls", []), c(this, "state", {
|
|
2540
2531
|
isActiveEvents: !1,
|
|
2541
2532
|
isMonitoring: !1,
|
|
2542
|
-
checkIntervalId: null
|
|
2543
|
-
|
|
2533
|
+
checkIntervalId: null,
|
|
2534
|
+
isInitialized: !1
|
|
2535
|
+
}), c(this, "getTypeNetwork", (r) => {
|
|
2536
|
+
if (r === !1)
|
|
2537
|
+
return "none";
|
|
2538
|
+
const n = this.getConnection();
|
|
2539
|
+
return n ? (n == null ? void 0 : n.effectiveType) || (n == null ? void 0 : n.type) || "unknown" : "4g";
|
|
2540
|
+
}), c(this, "controllersEvents", {
|
|
2544
2541
|
online: null,
|
|
2545
2542
|
offline: null,
|
|
2546
2543
|
change: null
|
|
@@ -2548,11 +2545,9 @@ class NetworkStatusTracker {
|
|
|
2548
2545
|
online: null,
|
|
2549
2546
|
offline: null,
|
|
2550
2547
|
change: null
|
|
2551
|
-
}), this.listUrls = e
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
isNetwork: r,
|
|
2555
|
-
typeNetwork: this.getTypeNetwork(this.getConnection(), r)
|
|
2548
|
+
}), this.listUrls = e, this.networkInfo = {
|
|
2549
|
+
isNetwork: !1,
|
|
2550
|
+
typeNetwork: "unknown"
|
|
2556
2551
|
};
|
|
2557
2552
|
}
|
|
2558
2553
|
setState(e) {
|
|
@@ -2563,14 +2558,14 @@ class NetworkStatusTracker {
|
|
|
2563
2558
|
}
|
|
2564
2559
|
getConnection() {
|
|
2565
2560
|
var e;
|
|
2566
|
-
return (e = window
|
|
2561
|
+
return ((e = window.navigator) == null ? void 0 : e.connection) || null;
|
|
2567
2562
|
}
|
|
2568
2563
|
updateState(e, r) {
|
|
2569
|
-
const
|
|
2564
|
+
const n = {
|
|
2570
2565
|
isNetwork: e,
|
|
2571
|
-
typeNetwork: this.getTypeNetwork(
|
|
2566
|
+
typeNetwork: this.getTypeNetwork(e)
|
|
2572
2567
|
};
|
|
2573
|
-
this.networkInfo =
|
|
2568
|
+
this.networkInfo = n, typeof r == "function" && r(n);
|
|
2574
2569
|
}
|
|
2575
2570
|
getControllersEvents() {
|
|
2576
2571
|
return this.controllersEvents;
|
|
@@ -2578,48 +2573,84 @@ class NetworkStatusTracker {
|
|
|
2578
2573
|
setControllersEvents(e) {
|
|
2579
2574
|
this.controllersEvents = { ...this.controllersEvents, ...e };
|
|
2580
2575
|
}
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2576
|
+
async initialize(e, r) {
|
|
2577
|
+
if (!this.state.isInitialized)
|
|
2578
|
+
try {
|
|
2579
|
+
const n = typeof navigator < "u" ? navigator.onLine : !1;
|
|
2580
|
+
this.listUrls.length > 0 ? await this.requestByUrls(e, r) : this.updateState(n, e), this.setState({ isInitialized: !0 });
|
|
2581
|
+
} catch (n) {
|
|
2582
|
+
console.error("NetworkStatusTracker initialization error:", n), this.updateState(!1, e), this.setState({ isInitialized: !0 });
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
async startEvents(e) {
|
|
2586
|
+
return new Promise((r, n) => {
|
|
2587
|
+
const { isActiveEvents: o } = this.getState();
|
|
2588
|
+
o && r(), this.initialize(e).then(() => {
|
|
2589
|
+
var s, i, a;
|
|
2590
|
+
this.setState({ isActiveEvents: !0 });
|
|
2591
|
+
const l = {
|
|
2592
|
+
online: new AbortController(),
|
|
2593
|
+
offline: new AbortController(),
|
|
2594
|
+
change: new AbortController()
|
|
2595
|
+
};
|
|
2596
|
+
this.setControllersEvents(l);
|
|
2597
|
+
const u = this.getConnection();
|
|
2598
|
+
u && u != null && u.addEventListener ? u.addEventListener(
|
|
2599
|
+
"change",
|
|
2600
|
+
(d) => {
|
|
2601
|
+
console.log("NetworkStatusTracker: connection change event");
|
|
2602
|
+
const g = navigator.onLine;
|
|
2603
|
+
this.updateState(g, e);
|
|
2604
|
+
},
|
|
2605
|
+
{ signal: (s = l.change) == null ? void 0 : s.signal }
|
|
2606
|
+
) : (window.addEventListener(
|
|
2607
|
+
"online",
|
|
2608
|
+
() => {
|
|
2609
|
+
this.updateState(!0, e);
|
|
2610
|
+
},
|
|
2611
|
+
{ signal: (i = l.online) == null ? void 0 : i.signal }
|
|
2612
|
+
), window.addEventListener(
|
|
2613
|
+
"offline",
|
|
2614
|
+
() => {
|
|
2615
|
+
this.updateState(!1, e);
|
|
2616
|
+
},
|
|
2617
|
+
{ signal: (a = l.offline) == null ? void 0 : a.signal }
|
|
2618
|
+
)), r();
|
|
2619
|
+
});
|
|
2620
|
+
});
|
|
2602
2621
|
}
|
|
2603
2622
|
stopEvents() {
|
|
2604
2623
|
const { isActiveEvents: e } = this.getState();
|
|
2605
2624
|
if (e) {
|
|
2606
2625
|
this.setState({ isActiveEvents: !1 });
|
|
2607
2626
|
const r = this.getControllersEvents();
|
|
2608
|
-
for (const
|
|
2609
|
-
|
|
2627
|
+
for (const n of Object.values(r))
|
|
2628
|
+
n == null || n.abort();
|
|
2629
|
+
this.setControllersEvents({
|
|
2630
|
+
online: null,
|
|
2631
|
+
offline: null,
|
|
2632
|
+
change: null
|
|
2633
|
+
});
|
|
2610
2634
|
}
|
|
2611
2635
|
}
|
|
2612
2636
|
/*-----------------------------------------------------------------------------*/
|
|
2613
2637
|
async requestByUrls(e, r) {
|
|
2614
|
-
|
|
2615
|
-
|
|
2638
|
+
try {
|
|
2639
|
+
const n = await this.checkConnection(r);
|
|
2640
|
+
this.updateState(n, e);
|
|
2641
|
+
} catch (n) {
|
|
2642
|
+
console.error("NetworkStatusTracker: requestByUrls error:", n), this.updateState(!1, e);
|
|
2643
|
+
}
|
|
2616
2644
|
}
|
|
2617
2645
|
async checkConnection(e = {}) {
|
|
2618
2646
|
for (const r of this.listUrls)
|
|
2619
2647
|
try {
|
|
2620
|
-
const
|
|
2621
|
-
|
|
2622
|
-
|
|
2648
|
+
const n = new AbortController(), o = setTimeout(() => n.abort(), (e == null ? void 0 : e.timeout) || 5e3), s = await window.fetch(r, {
|
|
2649
|
+
method: "HEAD",
|
|
2650
|
+
mode: "no-cors",
|
|
2651
|
+
signal: n.signal
|
|
2652
|
+
});
|
|
2653
|
+
return clearTimeout(o), !0;
|
|
2623
2654
|
} catch {
|
|
2624
2655
|
continue;
|
|
2625
2656
|
}
|
|
@@ -2632,26 +2663,26 @@ class NetworkStatusTracker {
|
|
|
2632
2663
|
this.controllersFetching = { ...this.controllersFetching, ...e };
|
|
2633
2664
|
}
|
|
2634
2665
|
startFetching(e, { interval: r = 5e3 }) {
|
|
2635
|
-
const { isMonitoring:
|
|
2636
|
-
if (
|
|
2666
|
+
const { isMonitoring: n } = this.getState();
|
|
2667
|
+
if (n)
|
|
2637
2668
|
return;
|
|
2638
2669
|
this.setState({ isMonitoring: !0 });
|
|
2639
|
-
const
|
|
2670
|
+
const o = {
|
|
2640
2671
|
online: new AbortController(),
|
|
2641
2672
|
offline: new AbortController(),
|
|
2642
2673
|
change: new AbortController()
|
|
2643
2674
|
};
|
|
2644
|
-
this.setControllersMonitoring(
|
|
2645
|
-
const
|
|
2646
|
-
this.setState({ checkIntervalId:
|
|
2675
|
+
this.setControllersMonitoring(o), this.requestByUrls(e, { timeout: 2e3 });
|
|
2676
|
+
const s = window.setInterval(() => this.requestByUrls(e), r);
|
|
2677
|
+
this.setState({ checkIntervalId: s });
|
|
2647
2678
|
}
|
|
2648
2679
|
stopFetching() {
|
|
2649
2680
|
const { isMonitoring: e, checkIntervalId: r } = this.getState();
|
|
2650
2681
|
if (!e)
|
|
2651
2682
|
return;
|
|
2652
|
-
const
|
|
2653
|
-
for (const
|
|
2654
|
-
|
|
2683
|
+
const n = this.getControllersMonitoring();
|
|
2684
|
+
for (const o of Object.values(n))
|
|
2685
|
+
o == null || o.abort();
|
|
2655
2686
|
r && clearInterval(r), this.setState({ isMonitoring: !1, checkIntervalId: null });
|
|
2656
2687
|
}
|
|
2657
2688
|
/*--------------------------------------------------------------------------------------------------*/
|
|
@@ -2667,9 +2698,111 @@ class NetworkStatusTracker {
|
|
|
2667
2698
|
getCurrentState() {
|
|
2668
2699
|
return this.networkInfo;
|
|
2669
2700
|
}
|
|
2701
|
+
destroy() {
|
|
2702
|
+
this.stopEvents(), this.stopFetching(), this.setState({
|
|
2703
|
+
isActiveEvents: !1,
|
|
2704
|
+
isMonitoring: !1,
|
|
2705
|
+
isInitialized: !1
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2670
2708
|
}
|
|
2709
|
+
class Timer {
|
|
2710
|
+
/**
|
|
2711
|
+
* @param duration - Время в миллисекундах
|
|
2712
|
+
* @param onComplete - Колбэк, вызываемый по истечении времени
|
|
2713
|
+
*/
|
|
2714
|
+
constructor(e, r) {
|
|
2715
|
+
if (c(this, "duration"), c(this, "onComplete"), c(this, "timerId", null), c(this, "startTimeCount", null), c(this, "remainingTime"), c(this, "isPaused", !1), e < 0)
|
|
2716
|
+
throw new Error("Duration cannot be negative");
|
|
2717
|
+
this.duration = e, this.remainingTime = e, this.onComplete = r;
|
|
2718
|
+
}
|
|
2719
|
+
/**
|
|
2720
|
+
* Запускает или возобновляет таймер
|
|
2721
|
+
*/
|
|
2722
|
+
startTime() {
|
|
2723
|
+
this.timerId !== null || this.isPaused || (this.startTimeCount = Date.now(), this.timerId = setTimeout(() => {
|
|
2724
|
+
this.complete();
|
|
2725
|
+
}, this.remainingTime));
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* Ставит таймер на паузу
|
|
2729
|
+
*/
|
|
2730
|
+
pauseTime() {
|
|
2731
|
+
if (!(this.timerId === null || this.isPaused)) {
|
|
2732
|
+
if (clearTimeout(this.timerId), this.timerId = null, this.startTimeCount !== null) {
|
|
2733
|
+
const e = Date.now() - this.startTimeCount;
|
|
2734
|
+
this.remainingTime = Math.max(0, this.remainingTime - e), this.startTimeCount = null;
|
|
2735
|
+
}
|
|
2736
|
+
this.isPaused = !0;
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
/**
|
|
2740
|
+
* Сбрасывает таймер к начальному состоянию
|
|
2741
|
+
*/
|
|
2742
|
+
resetTime() {
|
|
2743
|
+
this.timerId !== null && (clearTimeout(this.timerId), this.timerId = null), this.remainingTime = this.duration, this.startTimeCount = null, this.isPaused = !1;
|
|
2744
|
+
}
|
|
2745
|
+
/**
|
|
2746
|
+
* Завершает таймер и вызывает колбэк
|
|
2747
|
+
*/
|
|
2748
|
+
complete() {
|
|
2749
|
+
this.timerId = null, this.startTimeCount = null, this.remainingTime = this.duration, this.isPaused = !1, this.onComplete();
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* Проверяет, запущен ли таймер
|
|
2753
|
+
*/
|
|
2754
|
+
isRunning() {
|
|
2755
|
+
return this.timerId !== null && !this.isPaused;
|
|
2756
|
+
}
|
|
2757
|
+
/**
|
|
2758
|
+
* Проверяет, находится ли таймер на паузе
|
|
2759
|
+
*/
|
|
2760
|
+
isPausedState() {
|
|
2761
|
+
return this.isPaused;
|
|
2762
|
+
}
|
|
2763
|
+
/**
|
|
2764
|
+
* Возвращает оставшееся время в миллисекундах
|
|
2765
|
+
*/
|
|
2766
|
+
getRemainingTime() {
|
|
2767
|
+
if (this.timerId !== null && this.startTimeCount !== null && !this.isPaused) {
|
|
2768
|
+
const e = Date.now() - this.startTimeCount;
|
|
2769
|
+
return Math.max(0, this.remainingTime - e);
|
|
2770
|
+
}
|
|
2771
|
+
return this.remainingTime;
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
const P = class F {
|
|
2775
|
+
static initEventsPauseResume(e) {
|
|
2776
|
+
if (F.getWebPlatform() == "iOS") {
|
|
2777
|
+
document.addEventListener("active", (r) => {
|
|
2778
|
+
console.log("Событие: active :", r), e("on");
|
|
2779
|
+
}), document.addEventListener("resign", (r) => {
|
|
2780
|
+
console.log("Событие: resign: ", r), e("off");
|
|
2781
|
+
});
|
|
2782
|
+
return;
|
|
2783
|
+
}
|
|
2784
|
+
document.addEventListener("resume", (r) => {
|
|
2785
|
+
console.log("Событие: resume: ", r), e("on");
|
|
2786
|
+
}), document.addEventListener("pause", (r) => {
|
|
2787
|
+
console.log("Событие: pause :", r), e("off");
|
|
2788
|
+
});
|
|
2789
|
+
}
|
|
2790
|
+
};
|
|
2791
|
+
c(P, "getWebPlatform", () => {
|
|
2792
|
+
const t = navigator.userAgent, e = navigator == null ? void 0 : navigator.platform;
|
|
2793
|
+
if (e) {
|
|
2794
|
+
const r = e.toLowerCase();
|
|
2795
|
+
if (r.includes("mac"))
|
|
2796
|
+
return "iOS/Mac";
|
|
2797
|
+
if (r.includes("win"))
|
|
2798
|
+
return "Windows";
|
|
2799
|
+
if (r.includes("linux"))
|
|
2800
|
+
return "Linux";
|
|
2801
|
+
}
|
|
2802
|
+
return /iPhone|iPad|iPod/.test(t) ? "iOS" : /Android/.test(t) ? "Android" : /Windows/.test(t) ? "Windows" : /Mac/.test(t) ? "Mac" : /Linux/.test(t) ? "Linux" : "unknown";
|
|
2803
|
+
});
|
|
2671
2804
|
export {
|
|
2672
2805
|
Color as C,
|
|
2673
2806
|
NetworkStatusTracker as N,
|
|
2674
|
-
|
|
2807
|
+
Timer as T
|
|
2675
2808
|
};
|