@articles-media/articles-dev-box 1.0.2 → 1.0.3
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/README.md +6 -6
- package/dist/articles-dev-box.css +1 -0
- package/dist/articles-dev-box.js +3341 -0
- package/dist/articles-dev-box.umd.cjs +11 -0
- package/package.json +9 -5
- package/index.js +0 -16
- package/src/components/Ads/Ad.jsx +0 -629
- package/src/components/Ads/ArticlesAd.jsx +0 -76
- package/src/components/Games/GameScoreboard.jsx +0 -188
- package/src/components/Games/ReturnToLauncherButton.jsx +0 -55
- package/src/components/UI/Button.js +0 -61
- package/src/hooks/Ads/useAd.js +0 -55
- package/src/hooks/Ads/useAds.js +0 -54
- package/src/hooks/Games/useGameScoreboard.js +0 -59
- package/src/styles/components/Ad.scss +0 -223
- package/src/styles/components/GameScoreboard.scss +0 -37
- package/src/styles/global.scss +0 -98
- package/src/styles/variables.scss +0 -3
|
@@ -0,0 +1,3341 @@
|
|
|
1
|
+
import * as Oe from "react";
|
|
2
|
+
import Ae, { forwardRef as ar, useEffect as fe, createContext as cr, useLayoutEffect as lr, useContext as ur, useMemo as On, useRef as Ee, useCallback as st, useDebugValue as fr, memo as dr, useState as se } from "react";
|
|
3
|
+
function pr(e) {
|
|
4
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5
|
+
}
|
|
6
|
+
var $e = { exports: {} }, De = {};
|
|
7
|
+
var $t;
|
|
8
|
+
function hr() {
|
|
9
|
+
if ($t) return De;
|
|
10
|
+
$t = 1;
|
|
11
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
12
|
+
function n(r, s, o) {
|
|
13
|
+
var i = null;
|
|
14
|
+
if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
15
|
+
o = {};
|
|
16
|
+
for (var a in s)
|
|
17
|
+
a !== "key" && (o[a] = s[a]);
|
|
18
|
+
} else o = s;
|
|
19
|
+
return s = o.ref, {
|
|
20
|
+
$$typeof: e,
|
|
21
|
+
type: r,
|
|
22
|
+
key: i,
|
|
23
|
+
ref: s !== void 0 ? s : null,
|
|
24
|
+
props: o
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return De.Fragment = t, De.jsx = n, De.jsxs = n, De;
|
|
28
|
+
}
|
|
29
|
+
var Pe = {};
|
|
30
|
+
var Vt;
|
|
31
|
+
function mr() {
|
|
32
|
+
return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
33
|
+
function e(d) {
|
|
34
|
+
if (d == null) return null;
|
|
35
|
+
if (typeof d == "function")
|
|
36
|
+
return d.$$typeof === V ? null : d.displayName || d.name || null;
|
|
37
|
+
if (typeof d == "string") return d;
|
|
38
|
+
switch (d) {
|
|
39
|
+
case b:
|
|
40
|
+
return "Fragment";
|
|
41
|
+
case w:
|
|
42
|
+
return "Profiler";
|
|
43
|
+
case R:
|
|
44
|
+
return "StrictMode";
|
|
45
|
+
case k:
|
|
46
|
+
return "Suspense";
|
|
47
|
+
case D:
|
|
48
|
+
return "SuspenseList";
|
|
49
|
+
case Z:
|
|
50
|
+
return "Activity";
|
|
51
|
+
}
|
|
52
|
+
if (typeof d == "object")
|
|
53
|
+
switch (typeof d.tag == "number" && console.error(
|
|
54
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
55
|
+
), d.$$typeof) {
|
|
56
|
+
case m:
|
|
57
|
+
return "Portal";
|
|
58
|
+
case j:
|
|
59
|
+
return d.displayName || "Context";
|
|
60
|
+
case v:
|
|
61
|
+
return (d._context.displayName || "Context") + ".Consumer";
|
|
62
|
+
case x:
|
|
63
|
+
var S = d.render;
|
|
64
|
+
return d = d.displayName, d || (d = S.displayName || S.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
65
|
+
case O:
|
|
66
|
+
return S = d.displayName || null, S !== null ? S : e(d.type) || "Memo";
|
|
67
|
+
case A:
|
|
68
|
+
S = d._payload, d = d._init;
|
|
69
|
+
try {
|
|
70
|
+
return e(d(S));
|
|
71
|
+
} catch {
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
function t(d) {
|
|
77
|
+
return "" + d;
|
|
78
|
+
}
|
|
79
|
+
function n(d) {
|
|
80
|
+
try {
|
|
81
|
+
t(d);
|
|
82
|
+
var S = !1;
|
|
83
|
+
} catch {
|
|
84
|
+
S = !0;
|
|
85
|
+
}
|
|
86
|
+
if (S) {
|
|
87
|
+
S = console;
|
|
88
|
+
var T = S.error, P = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
89
|
+
return T.call(
|
|
90
|
+
S,
|
|
91
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
92
|
+
P
|
|
93
|
+
), t(d);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function r(d) {
|
|
97
|
+
if (d === b) return "<>";
|
|
98
|
+
if (typeof d == "object" && d !== null && d.$$typeof === A)
|
|
99
|
+
return "<...>";
|
|
100
|
+
try {
|
|
101
|
+
var S = e(d);
|
|
102
|
+
return S ? "<" + S + ">" : "<...>";
|
|
103
|
+
} catch {
|
|
104
|
+
return "<...>";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function s() {
|
|
108
|
+
var d = q.A;
|
|
109
|
+
return d === null ? null : d.getOwner();
|
|
110
|
+
}
|
|
111
|
+
function o() {
|
|
112
|
+
return Error("react-stack-top-frame");
|
|
113
|
+
}
|
|
114
|
+
function i(d) {
|
|
115
|
+
if (L.call(d, "key")) {
|
|
116
|
+
var S = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
117
|
+
if (S && S.isReactWarning) return !1;
|
|
118
|
+
}
|
|
119
|
+
return d.key !== void 0;
|
|
120
|
+
}
|
|
121
|
+
function a(d, S) {
|
|
122
|
+
function T() {
|
|
123
|
+
H || (H = !0, console.error(
|
|
124
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
125
|
+
S
|
|
126
|
+
));
|
|
127
|
+
}
|
|
128
|
+
T.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
129
|
+
get: T,
|
|
130
|
+
configurable: !0
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function p() {
|
|
134
|
+
var d = e(this.type);
|
|
135
|
+
return pe[d] || (pe[d] = !0, console.error(
|
|
136
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
137
|
+
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
138
|
+
}
|
|
139
|
+
function f(d, S, T, P, ne, he) {
|
|
140
|
+
var F = T.ref;
|
|
141
|
+
return d = {
|
|
142
|
+
$$typeof: l,
|
|
143
|
+
type: d,
|
|
144
|
+
key: S,
|
|
145
|
+
props: T,
|
|
146
|
+
_owner: P
|
|
147
|
+
}, (F !== void 0 ? F : null) !== null ? Object.defineProperty(d, "ref", {
|
|
148
|
+
enumerable: !1,
|
|
149
|
+
get: p
|
|
150
|
+
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
151
|
+
configurable: !1,
|
|
152
|
+
enumerable: !1,
|
|
153
|
+
writable: !0,
|
|
154
|
+
value: 0
|
|
155
|
+
}), Object.defineProperty(d, "_debugInfo", {
|
|
156
|
+
configurable: !1,
|
|
157
|
+
enumerable: !1,
|
|
158
|
+
writable: !0,
|
|
159
|
+
value: null
|
|
160
|
+
}), Object.defineProperty(d, "_debugStack", {
|
|
161
|
+
configurable: !1,
|
|
162
|
+
enumerable: !1,
|
|
163
|
+
writable: !0,
|
|
164
|
+
value: ne
|
|
165
|
+
}), Object.defineProperty(d, "_debugTask", {
|
|
166
|
+
configurable: !1,
|
|
167
|
+
enumerable: !1,
|
|
168
|
+
writable: !0,
|
|
169
|
+
value: he
|
|
170
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
171
|
+
}
|
|
172
|
+
function u(d, S, T, P, ne, he) {
|
|
173
|
+
var F = S.children;
|
|
174
|
+
if (F !== void 0)
|
|
175
|
+
if (P)
|
|
176
|
+
if (N(F)) {
|
|
177
|
+
for (P = 0; P < F.length; P++)
|
|
178
|
+
h(F[P]);
|
|
179
|
+
Object.freeze && Object.freeze(F);
|
|
180
|
+
} else
|
|
181
|
+
console.error(
|
|
182
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
183
|
+
);
|
|
184
|
+
else h(F);
|
|
185
|
+
if (L.call(S, "key")) {
|
|
186
|
+
F = e(d);
|
|
187
|
+
var me = Object.keys(S).filter(function(Be) {
|
|
188
|
+
return Be !== "key";
|
|
189
|
+
});
|
|
190
|
+
P = 0 < me.length ? "{key: someKey, " + me.join(": ..., ") + ": ...}" : "{key: someKey}", ye[F + P] || (me = 0 < me.length ? "{" + me.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
191
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
192
|
+
let props = %s;
|
|
193
|
+
<%s {...props} />
|
|
194
|
+
React keys must be passed directly to JSX without using spread:
|
|
195
|
+
let props = %s;
|
|
196
|
+
<%s key={someKey} {...props} />`,
|
|
197
|
+
P,
|
|
198
|
+
F,
|
|
199
|
+
me,
|
|
200
|
+
F
|
|
201
|
+
), ye[F + P] = !0);
|
|
202
|
+
}
|
|
203
|
+
if (F = null, T !== void 0 && (n(T), F = "" + T), i(S) && (n(S.key), F = "" + S.key), "key" in S) {
|
|
204
|
+
T = {};
|
|
205
|
+
for (var Re in S)
|
|
206
|
+
Re !== "key" && (T[Re] = S[Re]);
|
|
207
|
+
} else T = S;
|
|
208
|
+
return F && a(
|
|
209
|
+
T,
|
|
210
|
+
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
211
|
+
), f(
|
|
212
|
+
d,
|
|
213
|
+
F,
|
|
214
|
+
T,
|
|
215
|
+
s(),
|
|
216
|
+
ne,
|
|
217
|
+
he
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
function h(d) {
|
|
221
|
+
E(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === A && (d._payload.status === "fulfilled" ? E(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
222
|
+
}
|
|
223
|
+
function E(d) {
|
|
224
|
+
return typeof d == "object" && d !== null && d.$$typeof === l;
|
|
225
|
+
}
|
|
226
|
+
var g = Ae, l = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), R = /* @__PURE__ */ Symbol.for("react.strict_mode"), w = /* @__PURE__ */ Symbol.for("react.profiler"), v = /* @__PURE__ */ Symbol.for("react.consumer"), j = /* @__PURE__ */ Symbol.for("react.context"), x = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), D = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), A = /* @__PURE__ */ Symbol.for("react.lazy"), Z = /* @__PURE__ */ Symbol.for("react.activity"), V = /* @__PURE__ */ Symbol.for("react.client.reference"), q = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, N = Array.isArray, Q = console.createTask ? console.createTask : function() {
|
|
227
|
+
return null;
|
|
228
|
+
};
|
|
229
|
+
g = {
|
|
230
|
+
react_stack_bottom_frame: function(d) {
|
|
231
|
+
return d();
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
var H, pe = {}, G = g.react_stack_bottom_frame.bind(
|
|
235
|
+
g,
|
|
236
|
+
o
|
|
237
|
+
)(), ee = Q(r(o)), ye = {};
|
|
238
|
+
Pe.Fragment = b, Pe.jsx = function(d, S, T) {
|
|
239
|
+
var P = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
240
|
+
return u(
|
|
241
|
+
d,
|
|
242
|
+
S,
|
|
243
|
+
T,
|
|
244
|
+
!1,
|
|
245
|
+
P ? Error("react-stack-top-frame") : G,
|
|
246
|
+
P ? Q(r(d)) : ee
|
|
247
|
+
);
|
|
248
|
+
}, Pe.jsxs = function(d, S, T) {
|
|
249
|
+
var P = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
250
|
+
return u(
|
|
251
|
+
d,
|
|
252
|
+
S,
|
|
253
|
+
T,
|
|
254
|
+
!0,
|
|
255
|
+
P ? Error("react-stack-top-frame") : G,
|
|
256
|
+
P ? Q(r(d)) : ee
|
|
257
|
+
);
|
|
258
|
+
};
|
|
259
|
+
})()), Pe;
|
|
260
|
+
}
|
|
261
|
+
var qt;
|
|
262
|
+
function br() {
|
|
263
|
+
return qt || (qt = 1, process.env.NODE_ENV === "production" ? $e.exports = hr() : $e.exports = mr()), $e.exports;
|
|
264
|
+
}
|
|
265
|
+
var y = br(), ot = { exports: {} };
|
|
266
|
+
var Ht;
|
|
267
|
+
function yr() {
|
|
268
|
+
return Ht || (Ht = 1, (function(e) {
|
|
269
|
+
(function() {
|
|
270
|
+
var t = {}.hasOwnProperty;
|
|
271
|
+
function n() {
|
|
272
|
+
for (var o = "", i = 0; i < arguments.length; i++) {
|
|
273
|
+
var a = arguments[i];
|
|
274
|
+
a && (o = s(o, r(a)));
|
|
275
|
+
}
|
|
276
|
+
return o;
|
|
277
|
+
}
|
|
278
|
+
function r(o) {
|
|
279
|
+
if (typeof o == "string" || typeof o == "number")
|
|
280
|
+
return o;
|
|
281
|
+
if (typeof o != "object")
|
|
282
|
+
return "";
|
|
283
|
+
if (Array.isArray(o))
|
|
284
|
+
return n.apply(null, o);
|
|
285
|
+
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
|
|
286
|
+
return o.toString();
|
|
287
|
+
var i = "";
|
|
288
|
+
for (var a in o)
|
|
289
|
+
t.call(o, a) && o[a] && (i = s(i, a));
|
|
290
|
+
return i;
|
|
291
|
+
}
|
|
292
|
+
function s(o, i) {
|
|
293
|
+
return i ? o ? o + " " + i : o + i : o;
|
|
294
|
+
}
|
|
295
|
+
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
296
|
+
})();
|
|
297
|
+
})(ot)), ot.exports;
|
|
298
|
+
}
|
|
299
|
+
var Er = yr();
|
|
300
|
+
const gr = /* @__PURE__ */ pr(Er), ve = ar((e, t) => {
|
|
301
|
+
const {
|
|
302
|
+
size: n,
|
|
303
|
+
variant: r,
|
|
304
|
+
style: s,
|
|
305
|
+
// Can just use small instead of size="sm"
|
|
306
|
+
small: o,
|
|
307
|
+
large: i,
|
|
308
|
+
onClick: a,
|
|
309
|
+
className: p,
|
|
310
|
+
disabled: f,
|
|
311
|
+
active: u,
|
|
312
|
+
type: h,
|
|
313
|
+
onMouseDown: E,
|
|
314
|
+
onMouseUp: g,
|
|
315
|
+
onMouseLeave: l,
|
|
316
|
+
onTouchStart: m,
|
|
317
|
+
onTouchEnd: b,
|
|
318
|
+
...R
|
|
319
|
+
} = e;
|
|
320
|
+
return /* @__PURE__ */ y.jsx(
|
|
321
|
+
"button",
|
|
322
|
+
{
|
|
323
|
+
ref: t,
|
|
324
|
+
...h && { type: "submit" },
|
|
325
|
+
disabled: f,
|
|
326
|
+
style: s,
|
|
327
|
+
onMouseDown: E,
|
|
328
|
+
onMouseUp: g,
|
|
329
|
+
onMouseLeave: l,
|
|
330
|
+
onTouchStart: m,
|
|
331
|
+
onTouchEnd: b,
|
|
332
|
+
className: gr(
|
|
333
|
+
`btn ${r ? `btn-${r}` : "btn-articles"}`,
|
|
334
|
+
{
|
|
335
|
+
[p]: p,
|
|
336
|
+
"btn-lg": i,
|
|
337
|
+
"btn-sm": o,
|
|
338
|
+
active: u,
|
|
339
|
+
[`btn-${n}`]: n
|
|
340
|
+
}
|
|
341
|
+
),
|
|
342
|
+
onClick: a,
|
|
343
|
+
children: e.children
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
});
|
|
347
|
+
ve.displayName = "ArticlesButton";
|
|
348
|
+
function Xo() {
|
|
349
|
+
if (typeof window > "u") return null;
|
|
350
|
+
const e = new URLSearchParams(window.location.search), t = Object.fromEntries(e);
|
|
351
|
+
let { launcher_mode: n } = t;
|
|
352
|
+
return n = n === "1", n ? /* @__PURE__ */ y.jsxs(
|
|
353
|
+
ve,
|
|
354
|
+
{
|
|
355
|
+
className: "w-100",
|
|
356
|
+
small: !0,
|
|
357
|
+
style: {
|
|
358
|
+
zIndex: 10,
|
|
359
|
+
position: "relative"
|
|
360
|
+
},
|
|
361
|
+
onClick: () => {
|
|
362
|
+
window.location.href = "https://games.articles.media";
|
|
363
|
+
},
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ y.jsx("i", { className: "fad fa-gamepad" }),
|
|
366
|
+
"Return to Games"
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
) : /* @__PURE__ */ y.jsxs(
|
|
370
|
+
ve,
|
|
371
|
+
{
|
|
372
|
+
className: "w-100",
|
|
373
|
+
small: !0,
|
|
374
|
+
style: {
|
|
375
|
+
zIndex: 10,
|
|
376
|
+
position: "relative"
|
|
377
|
+
},
|
|
378
|
+
onClick: () => {
|
|
379
|
+
window.location.href = "https://games.articles.media";
|
|
380
|
+
},
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ y.jsx("i", { className: "fad fa-gamepad" }),
|
|
383
|
+
"View our other games"
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
function Zo({
|
|
389
|
+
darkMode: e
|
|
390
|
+
}) {
|
|
391
|
+
return fe(() => {
|
|
392
|
+
}, []), fe(() => {
|
|
393
|
+
const t = document.createElement("script");
|
|
394
|
+
return t.src = "https://accounts.articles.media/js/ad.js", t.async = !0, document.body.appendChild(t), () => {
|
|
395
|
+
document.body.removeChild(t);
|
|
396
|
+
};
|
|
397
|
+
}, []), /* @__PURE__ */ y.jsx("div", { className: "", children: /* @__PURE__ */ y.jsx("div", { className: "articles-media-ad" }) });
|
|
398
|
+
}
|
|
399
|
+
function xn(e, t) {
|
|
400
|
+
return function() {
|
|
401
|
+
return e.apply(t, arguments);
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
const { toString: wr } = Object.prototype, { getPrototypeOf: Ct } = Object, { iterator: Xe, toStringTag: vn } = Symbol, Ze = /* @__PURE__ */ ((e) => (t) => {
|
|
405
|
+
const n = wr.call(t);
|
|
406
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
407
|
+
})(/* @__PURE__ */ Object.create(null)), oe = (e) => (e = e.toLowerCase(), (t) => Ze(t) === e), Qe = (e) => (t) => typeof t === e, { isArray: Ne } = Array, Te = Qe("undefined");
|
|
408
|
+
function ke(e) {
|
|
409
|
+
return e !== null && !Te(e) && e.constructor !== null && !Te(e.constructor) && Y(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
410
|
+
}
|
|
411
|
+
const Tn = oe("ArrayBuffer");
|
|
412
|
+
function Sr(e) {
|
|
413
|
+
let t;
|
|
414
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Tn(e.buffer), t;
|
|
415
|
+
}
|
|
416
|
+
const Rr = Qe("string"), Y = Qe("function"), An = Qe("number"), Fe = (e) => e !== null && typeof e == "object", _r = (e) => e === !0 || e === !1, Je = (e) => {
|
|
417
|
+
if (Ze(e) !== "object")
|
|
418
|
+
return !1;
|
|
419
|
+
const t = Ct(e);
|
|
420
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(vn in e) && !(Xe in e);
|
|
421
|
+
}, Or = (e) => {
|
|
422
|
+
if (!Fe(e) || ke(e))
|
|
423
|
+
return !1;
|
|
424
|
+
try {
|
|
425
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
426
|
+
} catch {
|
|
427
|
+
return !1;
|
|
428
|
+
}
|
|
429
|
+
}, xr = oe("Date"), vr = oe("File"), Tr = oe("Blob"), Ar = oe("FileList"), Nr = (e) => Fe(e) && Y(e.pipe), Cr = (e) => {
|
|
430
|
+
let t;
|
|
431
|
+
return e && (typeof FormData == "function" && e instanceof FormData || Y(e.append) && ((t = Ze(e)) === "formdata" || // detect form-data instance
|
|
432
|
+
t === "object" && Y(e.toString) && e.toString() === "[object FormData]"));
|
|
433
|
+
}, jr = oe("URLSearchParams"), [Dr, Pr, Lr, kr] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Fr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
434
|
+
function Ie(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
435
|
+
if (e === null || typeof e > "u")
|
|
436
|
+
return;
|
|
437
|
+
let r, s;
|
|
438
|
+
if (typeof e != "object" && (e = [e]), Ne(e))
|
|
439
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
440
|
+
t.call(null, e[r], r, e);
|
|
441
|
+
else {
|
|
442
|
+
if (ke(e))
|
|
443
|
+
return;
|
|
444
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
445
|
+
let a;
|
|
446
|
+
for (r = 0; r < i; r++)
|
|
447
|
+
a = o[r], t.call(null, e[a], a, e);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
function Nn(e, t) {
|
|
451
|
+
if (ke(e))
|
|
452
|
+
return null;
|
|
453
|
+
t = t.toLowerCase();
|
|
454
|
+
const n = Object.keys(e);
|
|
455
|
+
let r = n.length, s;
|
|
456
|
+
for (; r-- > 0; )
|
|
457
|
+
if (s = n[r], t === s.toLowerCase())
|
|
458
|
+
return s;
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Cn = (e) => !Te(e) && e !== ge;
|
|
462
|
+
function yt() {
|
|
463
|
+
const { caseless: e, skipUndefined: t } = Cn(this) && this || {}, n = {}, r = (s, o) => {
|
|
464
|
+
const i = e && Nn(n, o) || o;
|
|
465
|
+
Je(n[i]) && Je(s) ? n[i] = yt(n[i], s) : Je(s) ? n[i] = yt({}, s) : Ne(s) ? n[i] = s.slice() : (!t || !Te(s)) && (n[i] = s);
|
|
466
|
+
};
|
|
467
|
+
for (let s = 0, o = arguments.length; s < o; s++)
|
|
468
|
+
arguments[s] && Ie(arguments[s], r);
|
|
469
|
+
return n;
|
|
470
|
+
}
|
|
471
|
+
const Ir = (e, t, n, { allOwnKeys: r } = {}) => (Ie(t, (s, o) => {
|
|
472
|
+
n && Y(s) ? e[o] = xn(s, n) : e[o] = s;
|
|
473
|
+
}, { allOwnKeys: r }), e), Ur = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Mr = (e, t, n, r) => {
|
|
474
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
475
|
+
value: t.prototype
|
|
476
|
+
}), n && Object.assign(e.prototype, n);
|
|
477
|
+
}, Br = (e, t, n, r) => {
|
|
478
|
+
let s, o, i;
|
|
479
|
+
const a = {};
|
|
480
|
+
if (t = t || {}, e == null) return t;
|
|
481
|
+
do {
|
|
482
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
483
|
+
i = s[o], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
484
|
+
e = n !== !1 && Ct(e);
|
|
485
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
486
|
+
return t;
|
|
487
|
+
}, $r = (e, t, n) => {
|
|
488
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
489
|
+
const r = e.indexOf(t, n);
|
|
490
|
+
return r !== -1 && r === n;
|
|
491
|
+
}, Vr = (e) => {
|
|
492
|
+
if (!e) return null;
|
|
493
|
+
if (Ne(e)) return e;
|
|
494
|
+
let t = e.length;
|
|
495
|
+
if (!An(t)) return null;
|
|
496
|
+
const n = new Array(t);
|
|
497
|
+
for (; t-- > 0; )
|
|
498
|
+
n[t] = e[t];
|
|
499
|
+
return n;
|
|
500
|
+
}, qr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ct(Uint8Array)), Hr = (e, t) => {
|
|
501
|
+
const r = (e && e[Xe]).call(e);
|
|
502
|
+
let s;
|
|
503
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
504
|
+
const o = s.value;
|
|
505
|
+
t.call(e, o[0], o[1]);
|
|
506
|
+
}
|
|
507
|
+
}, Wr = (e, t) => {
|
|
508
|
+
let n;
|
|
509
|
+
const r = [];
|
|
510
|
+
for (; (n = e.exec(t)) !== null; )
|
|
511
|
+
r.push(n);
|
|
512
|
+
return r;
|
|
513
|
+
}, zr = oe("HTMLFormElement"), Jr = (e) => e.toLowerCase().replace(
|
|
514
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
515
|
+
function(n, r, s) {
|
|
516
|
+
return r.toUpperCase() + s;
|
|
517
|
+
}
|
|
518
|
+
), Wt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Kr = oe("RegExp"), jn = (e, t) => {
|
|
519
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
520
|
+
Ie(n, (s, o) => {
|
|
521
|
+
let i;
|
|
522
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
523
|
+
}), Object.defineProperties(e, r);
|
|
524
|
+
}, Gr = (e) => {
|
|
525
|
+
jn(e, (t, n) => {
|
|
526
|
+
if (Y(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
527
|
+
return !1;
|
|
528
|
+
const r = e[n];
|
|
529
|
+
if (Y(r)) {
|
|
530
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
531
|
+
t.writable = !1;
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
t.set || (t.set = () => {
|
|
535
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}, Yr = (e, t) => {
|
|
540
|
+
const n = {}, r = (s) => {
|
|
541
|
+
s.forEach((o) => {
|
|
542
|
+
n[o] = !0;
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
return Ne(e) ? r(e) : r(String(e).split(t)), n;
|
|
546
|
+
}, Xr = () => {
|
|
547
|
+
}, Zr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
548
|
+
function Qr(e) {
|
|
549
|
+
return !!(e && Y(e.append) && e[vn] === "FormData" && e[Xe]);
|
|
550
|
+
}
|
|
551
|
+
const es = (e) => {
|
|
552
|
+
const t = new Array(10), n = (r, s) => {
|
|
553
|
+
if (Fe(r)) {
|
|
554
|
+
if (t.indexOf(r) >= 0)
|
|
555
|
+
return;
|
|
556
|
+
if (ke(r))
|
|
557
|
+
return r;
|
|
558
|
+
if (!("toJSON" in r)) {
|
|
559
|
+
t[s] = r;
|
|
560
|
+
const o = Ne(r) ? [] : {};
|
|
561
|
+
return Ie(r, (i, a) => {
|
|
562
|
+
const p = n(i, s + 1);
|
|
563
|
+
!Te(p) && (o[a] = p);
|
|
564
|
+
}), t[s] = void 0, o;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return r;
|
|
568
|
+
};
|
|
569
|
+
return n(e, 0);
|
|
570
|
+
}, ts = oe("AsyncFunction"), ns = (e) => e && (Fe(e) || Y(e)) && Y(e.then) && Y(e.catch), Dn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ge.addEventListener("message", ({ source: s, data: o }) => {
|
|
571
|
+
s === ge && o === n && r.length && r.shift()();
|
|
572
|
+
}, !1), (s) => {
|
|
573
|
+
r.push(s), ge.postMessage(n, "*");
|
|
574
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
575
|
+
typeof setImmediate == "function",
|
|
576
|
+
Y(ge.postMessage)
|
|
577
|
+
), rs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ge) : typeof process < "u" && process.nextTick || Dn, ss = (e) => e != null && Y(e[Xe]), c = {
|
|
578
|
+
isArray: Ne,
|
|
579
|
+
isArrayBuffer: Tn,
|
|
580
|
+
isBuffer: ke,
|
|
581
|
+
isFormData: Cr,
|
|
582
|
+
isArrayBufferView: Sr,
|
|
583
|
+
isString: Rr,
|
|
584
|
+
isNumber: An,
|
|
585
|
+
isBoolean: _r,
|
|
586
|
+
isObject: Fe,
|
|
587
|
+
isPlainObject: Je,
|
|
588
|
+
isEmptyObject: Or,
|
|
589
|
+
isReadableStream: Dr,
|
|
590
|
+
isRequest: Pr,
|
|
591
|
+
isResponse: Lr,
|
|
592
|
+
isHeaders: kr,
|
|
593
|
+
isUndefined: Te,
|
|
594
|
+
isDate: xr,
|
|
595
|
+
isFile: vr,
|
|
596
|
+
isBlob: Tr,
|
|
597
|
+
isRegExp: Kr,
|
|
598
|
+
isFunction: Y,
|
|
599
|
+
isStream: Nr,
|
|
600
|
+
isURLSearchParams: jr,
|
|
601
|
+
isTypedArray: qr,
|
|
602
|
+
isFileList: Ar,
|
|
603
|
+
forEach: Ie,
|
|
604
|
+
merge: yt,
|
|
605
|
+
extend: Ir,
|
|
606
|
+
trim: Fr,
|
|
607
|
+
stripBOM: Ur,
|
|
608
|
+
inherits: Mr,
|
|
609
|
+
toFlatObject: Br,
|
|
610
|
+
kindOf: Ze,
|
|
611
|
+
kindOfTest: oe,
|
|
612
|
+
endsWith: $r,
|
|
613
|
+
toArray: Vr,
|
|
614
|
+
forEachEntry: Hr,
|
|
615
|
+
matchAll: Wr,
|
|
616
|
+
isHTMLForm: zr,
|
|
617
|
+
hasOwnProperty: Wt,
|
|
618
|
+
hasOwnProp: Wt,
|
|
619
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
620
|
+
reduceDescriptors: jn,
|
|
621
|
+
freezeMethods: Gr,
|
|
622
|
+
toObjectSet: Yr,
|
|
623
|
+
toCamelCase: Jr,
|
|
624
|
+
noop: Xr,
|
|
625
|
+
toFiniteNumber: Zr,
|
|
626
|
+
findKey: Nn,
|
|
627
|
+
global: ge,
|
|
628
|
+
isContextDefined: Cn,
|
|
629
|
+
isSpecCompliantForm: Qr,
|
|
630
|
+
toJSONObject: es,
|
|
631
|
+
isAsyncFn: ts,
|
|
632
|
+
isThenable: ns,
|
|
633
|
+
setImmediate: Dn,
|
|
634
|
+
asap: rs,
|
|
635
|
+
isIterable: ss
|
|
636
|
+
};
|
|
637
|
+
function _(e, t, n, r, s) {
|
|
638
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
639
|
+
}
|
|
640
|
+
c.inherits(_, Error, {
|
|
641
|
+
toJSON: function() {
|
|
642
|
+
return {
|
|
643
|
+
// Standard
|
|
644
|
+
message: this.message,
|
|
645
|
+
name: this.name,
|
|
646
|
+
// Microsoft
|
|
647
|
+
description: this.description,
|
|
648
|
+
number: this.number,
|
|
649
|
+
// Mozilla
|
|
650
|
+
fileName: this.fileName,
|
|
651
|
+
lineNumber: this.lineNumber,
|
|
652
|
+
columnNumber: this.columnNumber,
|
|
653
|
+
stack: this.stack,
|
|
654
|
+
// Axios
|
|
655
|
+
config: c.toJSONObject(this.config),
|
|
656
|
+
code: this.code,
|
|
657
|
+
status: this.status
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
const Pn = _.prototype, Ln = {};
|
|
662
|
+
[
|
|
663
|
+
"ERR_BAD_OPTION_VALUE",
|
|
664
|
+
"ERR_BAD_OPTION",
|
|
665
|
+
"ECONNABORTED",
|
|
666
|
+
"ETIMEDOUT",
|
|
667
|
+
"ERR_NETWORK",
|
|
668
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
669
|
+
"ERR_DEPRECATED",
|
|
670
|
+
"ERR_BAD_RESPONSE",
|
|
671
|
+
"ERR_BAD_REQUEST",
|
|
672
|
+
"ERR_CANCELED",
|
|
673
|
+
"ERR_NOT_SUPPORT",
|
|
674
|
+
"ERR_INVALID_URL"
|
|
675
|
+
// eslint-disable-next-line func-names
|
|
676
|
+
].forEach((e) => {
|
|
677
|
+
Ln[e] = { value: e };
|
|
678
|
+
});
|
|
679
|
+
Object.defineProperties(_, Ln);
|
|
680
|
+
Object.defineProperty(Pn, "isAxiosError", { value: !0 });
|
|
681
|
+
_.from = (e, t, n, r, s, o) => {
|
|
682
|
+
const i = Object.create(Pn);
|
|
683
|
+
c.toFlatObject(e, i, function(u) {
|
|
684
|
+
return u !== Error.prototype;
|
|
685
|
+
}, (f) => f !== "isAxiosError");
|
|
686
|
+
const a = e && e.message ? e.message : "Error", p = t == null && e ? e.code : t;
|
|
687
|
+
return _.call(i, a, p, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
|
|
688
|
+
};
|
|
689
|
+
const os = null;
|
|
690
|
+
function Et(e) {
|
|
691
|
+
return c.isPlainObject(e) || c.isArray(e);
|
|
692
|
+
}
|
|
693
|
+
function kn(e) {
|
|
694
|
+
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
695
|
+
}
|
|
696
|
+
function zt(e, t, n) {
|
|
697
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
698
|
+
return s = kn(s), !n && o ? "[" + s + "]" : s;
|
|
699
|
+
}).join(n ? "." : "") : t;
|
|
700
|
+
}
|
|
701
|
+
function is(e) {
|
|
702
|
+
return c.isArray(e) && !e.some(Et);
|
|
703
|
+
}
|
|
704
|
+
const as = c.toFlatObject(c, {}, null, function(t) {
|
|
705
|
+
return /^is[A-Z]/.test(t);
|
|
706
|
+
});
|
|
707
|
+
function et(e, t, n) {
|
|
708
|
+
if (!c.isObject(e))
|
|
709
|
+
throw new TypeError("target must be an object");
|
|
710
|
+
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
711
|
+
metaTokens: !0,
|
|
712
|
+
dots: !1,
|
|
713
|
+
indexes: !1
|
|
714
|
+
}, !1, function(m, b) {
|
|
715
|
+
return !c.isUndefined(b[m]);
|
|
716
|
+
});
|
|
717
|
+
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
718
|
+
if (!c.isFunction(s))
|
|
719
|
+
throw new TypeError("visitor must be a function");
|
|
720
|
+
function f(l) {
|
|
721
|
+
if (l === null) return "";
|
|
722
|
+
if (c.isDate(l))
|
|
723
|
+
return l.toISOString();
|
|
724
|
+
if (c.isBoolean(l))
|
|
725
|
+
return l.toString();
|
|
726
|
+
if (!p && c.isBlob(l))
|
|
727
|
+
throw new _("Blob is not supported. Use a Buffer instead.");
|
|
728
|
+
return c.isArrayBuffer(l) || c.isTypedArray(l) ? p && typeof Blob == "function" ? new Blob([l]) : Buffer.from(l) : l;
|
|
729
|
+
}
|
|
730
|
+
function u(l, m, b) {
|
|
731
|
+
let R = l;
|
|
732
|
+
if (l && !b && typeof l == "object") {
|
|
733
|
+
if (c.endsWith(m, "{}"))
|
|
734
|
+
m = r ? m : m.slice(0, -2), l = JSON.stringify(l);
|
|
735
|
+
else if (c.isArray(l) && is(l) || (c.isFileList(l) || c.endsWith(m, "[]")) && (R = c.toArray(l)))
|
|
736
|
+
return m = kn(m), R.forEach(function(v, j) {
|
|
737
|
+
!(c.isUndefined(v) || v === null) && t.append(
|
|
738
|
+
// eslint-disable-next-line no-nested-ternary
|
|
739
|
+
i === !0 ? zt([m], j, o) : i === null ? m : m + "[]",
|
|
740
|
+
f(v)
|
|
741
|
+
);
|
|
742
|
+
}), !1;
|
|
743
|
+
}
|
|
744
|
+
return Et(l) ? !0 : (t.append(zt(b, m, o), f(l)), !1);
|
|
745
|
+
}
|
|
746
|
+
const h = [], E = Object.assign(as, {
|
|
747
|
+
defaultVisitor: u,
|
|
748
|
+
convertValue: f,
|
|
749
|
+
isVisitable: Et
|
|
750
|
+
});
|
|
751
|
+
function g(l, m) {
|
|
752
|
+
if (!c.isUndefined(l)) {
|
|
753
|
+
if (h.indexOf(l) !== -1)
|
|
754
|
+
throw Error("Circular reference detected in " + m.join("."));
|
|
755
|
+
h.push(l), c.forEach(l, function(R, w) {
|
|
756
|
+
(!(c.isUndefined(R) || R === null) && s.call(
|
|
757
|
+
t,
|
|
758
|
+
R,
|
|
759
|
+
c.isString(w) ? w.trim() : w,
|
|
760
|
+
m,
|
|
761
|
+
E
|
|
762
|
+
)) === !0 && g(R, m ? m.concat(w) : [w]);
|
|
763
|
+
}), h.pop();
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
if (!c.isObject(e))
|
|
767
|
+
throw new TypeError("data must be an object");
|
|
768
|
+
return g(e), t;
|
|
769
|
+
}
|
|
770
|
+
function Jt(e) {
|
|
771
|
+
const t = {
|
|
772
|
+
"!": "%21",
|
|
773
|
+
"'": "%27",
|
|
774
|
+
"(": "%28",
|
|
775
|
+
")": "%29",
|
|
776
|
+
"~": "%7E",
|
|
777
|
+
"%20": "+",
|
|
778
|
+
"%00": "\0"
|
|
779
|
+
};
|
|
780
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
781
|
+
return t[r];
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
function jt(e, t) {
|
|
785
|
+
this._pairs = [], e && et(e, this, t);
|
|
786
|
+
}
|
|
787
|
+
const Fn = jt.prototype;
|
|
788
|
+
Fn.append = function(t, n) {
|
|
789
|
+
this._pairs.push([t, n]);
|
|
790
|
+
};
|
|
791
|
+
Fn.toString = function(t) {
|
|
792
|
+
const n = t ? function(r) {
|
|
793
|
+
return t.call(this, r, Jt);
|
|
794
|
+
} : Jt;
|
|
795
|
+
return this._pairs.map(function(s) {
|
|
796
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
797
|
+
}, "").join("&");
|
|
798
|
+
};
|
|
799
|
+
function cs(e) {
|
|
800
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
801
|
+
}
|
|
802
|
+
function In(e, t, n) {
|
|
803
|
+
if (!t)
|
|
804
|
+
return e;
|
|
805
|
+
const r = n && n.encode || cs;
|
|
806
|
+
c.isFunction(n) && (n = {
|
|
807
|
+
serialize: n
|
|
808
|
+
});
|
|
809
|
+
const s = n && n.serialize;
|
|
810
|
+
let o;
|
|
811
|
+
if (s ? o = s(t, n) : o = c.isURLSearchParams(t) ? t.toString() : new jt(t, n).toString(r), o) {
|
|
812
|
+
const i = e.indexOf("#");
|
|
813
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
814
|
+
}
|
|
815
|
+
return e;
|
|
816
|
+
}
|
|
817
|
+
class Kt {
|
|
818
|
+
constructor() {
|
|
819
|
+
this.handlers = [];
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Add a new interceptor to the stack
|
|
823
|
+
*
|
|
824
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
825
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
826
|
+
*
|
|
827
|
+
* @return {Number} An ID used to remove interceptor later
|
|
828
|
+
*/
|
|
829
|
+
use(t, n, r) {
|
|
830
|
+
return this.handlers.push({
|
|
831
|
+
fulfilled: t,
|
|
832
|
+
rejected: n,
|
|
833
|
+
synchronous: r ? r.synchronous : !1,
|
|
834
|
+
runWhen: r ? r.runWhen : null
|
|
835
|
+
}), this.handlers.length - 1;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Remove an interceptor from the stack
|
|
839
|
+
*
|
|
840
|
+
* @param {Number} id The ID that was returned by `use`
|
|
841
|
+
*
|
|
842
|
+
* @returns {void}
|
|
843
|
+
*/
|
|
844
|
+
eject(t) {
|
|
845
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* Clear all interceptors from the stack
|
|
849
|
+
*
|
|
850
|
+
* @returns {void}
|
|
851
|
+
*/
|
|
852
|
+
clear() {
|
|
853
|
+
this.handlers && (this.handlers = []);
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Iterate over all the registered interceptors
|
|
857
|
+
*
|
|
858
|
+
* This method is particularly useful for skipping over any
|
|
859
|
+
* interceptors that may have become `null` calling `eject`.
|
|
860
|
+
*
|
|
861
|
+
* @param {Function} fn The function to call for each interceptor
|
|
862
|
+
*
|
|
863
|
+
* @returns {void}
|
|
864
|
+
*/
|
|
865
|
+
forEach(t) {
|
|
866
|
+
c.forEach(this.handlers, function(r) {
|
|
867
|
+
r !== null && t(r);
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
const Un = {
|
|
872
|
+
silentJSONParsing: !0,
|
|
873
|
+
forcedJSONParsing: !0,
|
|
874
|
+
clarifyTimeoutError: !1
|
|
875
|
+
}, ls = typeof URLSearchParams < "u" ? URLSearchParams : jt, us = typeof FormData < "u" ? FormData : null, fs = typeof Blob < "u" ? Blob : null, ds = {
|
|
876
|
+
isBrowser: !0,
|
|
877
|
+
classes: {
|
|
878
|
+
URLSearchParams: ls,
|
|
879
|
+
FormData: us,
|
|
880
|
+
Blob: fs
|
|
881
|
+
},
|
|
882
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
883
|
+
}, Dt = typeof window < "u" && typeof document < "u", gt = typeof navigator == "object" && navigator || void 0, ps = Dt && (!gt || ["ReactNative", "NativeScript", "NS"].indexOf(gt.product) < 0), hs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
884
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ms = Dt && window.location.href || "http://localhost", bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
885
|
+
__proto__: null,
|
|
886
|
+
hasBrowserEnv: Dt,
|
|
887
|
+
hasStandardBrowserEnv: ps,
|
|
888
|
+
hasStandardBrowserWebWorkerEnv: hs,
|
|
889
|
+
navigator: gt,
|
|
890
|
+
origin: ms
|
|
891
|
+
}, Symbol.toStringTag, { value: "Module" })), J = {
|
|
892
|
+
...bs,
|
|
893
|
+
...ds
|
|
894
|
+
};
|
|
895
|
+
function ys(e, t) {
|
|
896
|
+
return et(e, new J.classes.URLSearchParams(), {
|
|
897
|
+
visitor: function(n, r, s, o) {
|
|
898
|
+
return J.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
899
|
+
},
|
|
900
|
+
...t
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
function Es(e) {
|
|
904
|
+
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
905
|
+
}
|
|
906
|
+
function gs(e) {
|
|
907
|
+
const t = {}, n = Object.keys(e);
|
|
908
|
+
let r;
|
|
909
|
+
const s = n.length;
|
|
910
|
+
let o;
|
|
911
|
+
for (r = 0; r < s; r++)
|
|
912
|
+
o = n[r], t[o] = e[o];
|
|
913
|
+
return t;
|
|
914
|
+
}
|
|
915
|
+
function Mn(e) {
|
|
916
|
+
function t(n, r, s, o) {
|
|
917
|
+
let i = n[o++];
|
|
918
|
+
if (i === "__proto__") return !0;
|
|
919
|
+
const a = Number.isFinite(+i), p = o >= n.length;
|
|
920
|
+
return i = !i && c.isArray(s) ? s.length : i, p ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = gs(s[i])), !a);
|
|
921
|
+
}
|
|
922
|
+
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
923
|
+
const n = {};
|
|
924
|
+
return c.forEachEntry(e, (r, s) => {
|
|
925
|
+
t(Es(r), s, n, 0);
|
|
926
|
+
}), n;
|
|
927
|
+
}
|
|
928
|
+
return null;
|
|
929
|
+
}
|
|
930
|
+
function ws(e, t, n) {
|
|
931
|
+
if (c.isString(e))
|
|
932
|
+
try {
|
|
933
|
+
return (t || JSON.parse)(e), c.trim(e);
|
|
934
|
+
} catch (r) {
|
|
935
|
+
if (r.name !== "SyntaxError")
|
|
936
|
+
throw r;
|
|
937
|
+
}
|
|
938
|
+
return (n || JSON.stringify)(e);
|
|
939
|
+
}
|
|
940
|
+
const Ue = {
|
|
941
|
+
transitional: Un,
|
|
942
|
+
adapter: ["xhr", "http", "fetch"],
|
|
943
|
+
transformRequest: [function(t, n) {
|
|
944
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
|
|
945
|
+
if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
946
|
+
return s ? JSON.stringify(Mn(t)) : t;
|
|
947
|
+
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
948
|
+
return t;
|
|
949
|
+
if (c.isArrayBufferView(t))
|
|
950
|
+
return t.buffer;
|
|
951
|
+
if (c.isURLSearchParams(t))
|
|
952
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
953
|
+
let a;
|
|
954
|
+
if (o) {
|
|
955
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
956
|
+
return ys(t, this.formSerializer).toString();
|
|
957
|
+
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
958
|
+
const p = this.env && this.env.FormData;
|
|
959
|
+
return et(
|
|
960
|
+
a ? { "files[]": t } : t,
|
|
961
|
+
p && new p(),
|
|
962
|
+
this.formSerializer
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
return o || s ? (n.setContentType("application/json", !1), ws(t)) : t;
|
|
967
|
+
}],
|
|
968
|
+
transformResponse: [function(t) {
|
|
969
|
+
const n = this.transitional || Ue.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
970
|
+
if (c.isResponse(t) || c.isReadableStream(t))
|
|
971
|
+
return t;
|
|
972
|
+
if (t && c.isString(t) && (r && !this.responseType || s)) {
|
|
973
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
974
|
+
try {
|
|
975
|
+
return JSON.parse(t, this.parseReviver);
|
|
976
|
+
} catch (a) {
|
|
977
|
+
if (i)
|
|
978
|
+
throw a.name === "SyntaxError" ? _.from(a, _.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
return t;
|
|
982
|
+
}],
|
|
983
|
+
/**
|
|
984
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
985
|
+
* timeout is not created.
|
|
986
|
+
*/
|
|
987
|
+
timeout: 0,
|
|
988
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
989
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
990
|
+
maxContentLength: -1,
|
|
991
|
+
maxBodyLength: -1,
|
|
992
|
+
env: {
|
|
993
|
+
FormData: J.classes.FormData,
|
|
994
|
+
Blob: J.classes.Blob
|
|
995
|
+
},
|
|
996
|
+
validateStatus: function(t) {
|
|
997
|
+
return t >= 200 && t < 300;
|
|
998
|
+
},
|
|
999
|
+
headers: {
|
|
1000
|
+
common: {
|
|
1001
|
+
Accept: "application/json, text/plain, */*",
|
|
1002
|
+
"Content-Type": void 0
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1007
|
+
Ue.headers[e] = {};
|
|
1008
|
+
});
|
|
1009
|
+
const Ss = c.toObjectSet([
|
|
1010
|
+
"age",
|
|
1011
|
+
"authorization",
|
|
1012
|
+
"content-length",
|
|
1013
|
+
"content-type",
|
|
1014
|
+
"etag",
|
|
1015
|
+
"expires",
|
|
1016
|
+
"from",
|
|
1017
|
+
"host",
|
|
1018
|
+
"if-modified-since",
|
|
1019
|
+
"if-unmodified-since",
|
|
1020
|
+
"last-modified",
|
|
1021
|
+
"location",
|
|
1022
|
+
"max-forwards",
|
|
1023
|
+
"proxy-authorization",
|
|
1024
|
+
"referer",
|
|
1025
|
+
"retry-after",
|
|
1026
|
+
"user-agent"
|
|
1027
|
+
]), Rs = (e) => {
|
|
1028
|
+
const t = {};
|
|
1029
|
+
let n, r, s;
|
|
1030
|
+
return e && e.split(`
|
|
1031
|
+
`).forEach(function(i) {
|
|
1032
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Ss[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1033
|
+
}), t;
|
|
1034
|
+
}, Gt = /* @__PURE__ */ Symbol("internals");
|
|
1035
|
+
function Le(e) {
|
|
1036
|
+
return e && String(e).trim().toLowerCase();
|
|
1037
|
+
}
|
|
1038
|
+
function Ke(e) {
|
|
1039
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(Ke) : String(e);
|
|
1040
|
+
}
|
|
1041
|
+
function _s(e) {
|
|
1042
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1043
|
+
let r;
|
|
1044
|
+
for (; r = n.exec(e); )
|
|
1045
|
+
t[r[1]] = r[2];
|
|
1046
|
+
return t;
|
|
1047
|
+
}
|
|
1048
|
+
const Os = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1049
|
+
function it(e, t, n, r, s) {
|
|
1050
|
+
if (c.isFunction(r))
|
|
1051
|
+
return r.call(this, t, n);
|
|
1052
|
+
if (s && (t = n), !!c.isString(t)) {
|
|
1053
|
+
if (c.isString(r))
|
|
1054
|
+
return t.indexOf(r) !== -1;
|
|
1055
|
+
if (c.isRegExp(r))
|
|
1056
|
+
return r.test(t);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
function xs(e) {
|
|
1060
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1061
|
+
}
|
|
1062
|
+
function vs(e, t) {
|
|
1063
|
+
const n = c.toCamelCase(" " + t);
|
|
1064
|
+
["get", "set", "has"].forEach((r) => {
|
|
1065
|
+
Object.defineProperty(e, r + n, {
|
|
1066
|
+
value: function(s, o, i) {
|
|
1067
|
+
return this[r].call(this, t, s, o, i);
|
|
1068
|
+
},
|
|
1069
|
+
configurable: !0
|
|
1070
|
+
});
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
let X = class {
|
|
1074
|
+
constructor(t) {
|
|
1075
|
+
t && this.set(t);
|
|
1076
|
+
}
|
|
1077
|
+
set(t, n, r) {
|
|
1078
|
+
const s = this;
|
|
1079
|
+
function o(a, p, f) {
|
|
1080
|
+
const u = Le(p);
|
|
1081
|
+
if (!u)
|
|
1082
|
+
throw new Error("header name must be a non-empty string");
|
|
1083
|
+
const h = c.findKey(s, u);
|
|
1084
|
+
(!h || s[h] === void 0 || f === !0 || f === void 0 && s[h] !== !1) && (s[h || p] = Ke(a));
|
|
1085
|
+
}
|
|
1086
|
+
const i = (a, p) => c.forEach(a, (f, u) => o(f, u, p));
|
|
1087
|
+
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
1088
|
+
i(t, n);
|
|
1089
|
+
else if (c.isString(t) && (t = t.trim()) && !Os(t))
|
|
1090
|
+
i(Rs(t), n);
|
|
1091
|
+
else if (c.isObject(t) && c.isIterable(t)) {
|
|
1092
|
+
let a = {}, p, f;
|
|
1093
|
+
for (const u of t) {
|
|
1094
|
+
if (!c.isArray(u))
|
|
1095
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
1096
|
+
a[f = u[0]] = (p = a[f]) ? c.isArray(p) ? [...p, u[1]] : [p, u[1]] : u[1];
|
|
1097
|
+
}
|
|
1098
|
+
i(a, n);
|
|
1099
|
+
} else
|
|
1100
|
+
t != null && o(n, t, r);
|
|
1101
|
+
return this;
|
|
1102
|
+
}
|
|
1103
|
+
get(t, n) {
|
|
1104
|
+
if (t = Le(t), t) {
|
|
1105
|
+
const r = c.findKey(this, t);
|
|
1106
|
+
if (r) {
|
|
1107
|
+
const s = this[r];
|
|
1108
|
+
if (!n)
|
|
1109
|
+
return s;
|
|
1110
|
+
if (n === !0)
|
|
1111
|
+
return _s(s);
|
|
1112
|
+
if (c.isFunction(n))
|
|
1113
|
+
return n.call(this, s, r);
|
|
1114
|
+
if (c.isRegExp(n))
|
|
1115
|
+
return n.exec(s);
|
|
1116
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
has(t, n) {
|
|
1121
|
+
if (t = Le(t), t) {
|
|
1122
|
+
const r = c.findKey(this, t);
|
|
1123
|
+
return !!(r && this[r] !== void 0 && (!n || it(this, this[r], r, n)));
|
|
1124
|
+
}
|
|
1125
|
+
return !1;
|
|
1126
|
+
}
|
|
1127
|
+
delete(t, n) {
|
|
1128
|
+
const r = this;
|
|
1129
|
+
let s = !1;
|
|
1130
|
+
function o(i) {
|
|
1131
|
+
if (i = Le(i), i) {
|
|
1132
|
+
const a = c.findKey(r, i);
|
|
1133
|
+
a && (!n || it(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
return c.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1137
|
+
}
|
|
1138
|
+
clear(t) {
|
|
1139
|
+
const n = Object.keys(this);
|
|
1140
|
+
let r = n.length, s = !1;
|
|
1141
|
+
for (; r--; ) {
|
|
1142
|
+
const o = n[r];
|
|
1143
|
+
(!t || it(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1144
|
+
}
|
|
1145
|
+
return s;
|
|
1146
|
+
}
|
|
1147
|
+
normalize(t) {
|
|
1148
|
+
const n = this, r = {};
|
|
1149
|
+
return c.forEach(this, (s, o) => {
|
|
1150
|
+
const i = c.findKey(r, o);
|
|
1151
|
+
if (i) {
|
|
1152
|
+
n[i] = Ke(s), delete n[o];
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
const a = t ? xs(o) : String(o).trim();
|
|
1156
|
+
a !== o && delete n[o], n[a] = Ke(s), r[a] = !0;
|
|
1157
|
+
}), this;
|
|
1158
|
+
}
|
|
1159
|
+
concat(...t) {
|
|
1160
|
+
return this.constructor.concat(this, ...t);
|
|
1161
|
+
}
|
|
1162
|
+
toJSON(t) {
|
|
1163
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1164
|
+
return c.forEach(this, (r, s) => {
|
|
1165
|
+
r != null && r !== !1 && (n[s] = t && c.isArray(r) ? r.join(", ") : r);
|
|
1166
|
+
}), n;
|
|
1167
|
+
}
|
|
1168
|
+
[Symbol.iterator]() {
|
|
1169
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1170
|
+
}
|
|
1171
|
+
toString() {
|
|
1172
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
1173
|
+
`);
|
|
1174
|
+
}
|
|
1175
|
+
getSetCookie() {
|
|
1176
|
+
return this.get("set-cookie") || [];
|
|
1177
|
+
}
|
|
1178
|
+
get [Symbol.toStringTag]() {
|
|
1179
|
+
return "AxiosHeaders";
|
|
1180
|
+
}
|
|
1181
|
+
static from(t) {
|
|
1182
|
+
return t instanceof this ? t : new this(t);
|
|
1183
|
+
}
|
|
1184
|
+
static concat(t, ...n) {
|
|
1185
|
+
const r = new this(t);
|
|
1186
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1187
|
+
}
|
|
1188
|
+
static accessor(t) {
|
|
1189
|
+
const r = (this[Gt] = this[Gt] = {
|
|
1190
|
+
accessors: {}
|
|
1191
|
+
}).accessors, s = this.prototype;
|
|
1192
|
+
function o(i) {
|
|
1193
|
+
const a = Le(i);
|
|
1194
|
+
r[a] || (vs(s, i), r[a] = !0);
|
|
1195
|
+
}
|
|
1196
|
+
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
X.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1200
|
+
c.reduceDescriptors(X.prototype, ({ value: e }, t) => {
|
|
1201
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1202
|
+
return {
|
|
1203
|
+
get: () => e,
|
|
1204
|
+
set(r) {
|
|
1205
|
+
this[n] = r;
|
|
1206
|
+
}
|
|
1207
|
+
};
|
|
1208
|
+
});
|
|
1209
|
+
c.freezeMethods(X);
|
|
1210
|
+
function at(e, t) {
|
|
1211
|
+
const n = this || Ue, r = t || n, s = X.from(r.headers);
|
|
1212
|
+
let o = r.data;
|
|
1213
|
+
return c.forEach(e, function(a) {
|
|
1214
|
+
o = a.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1215
|
+
}), s.normalize(), o;
|
|
1216
|
+
}
|
|
1217
|
+
function Bn(e) {
|
|
1218
|
+
return !!(e && e.__CANCEL__);
|
|
1219
|
+
}
|
|
1220
|
+
function Ce(e, t, n) {
|
|
1221
|
+
_.call(this, e ?? "canceled", _.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1222
|
+
}
|
|
1223
|
+
c.inherits(Ce, _, {
|
|
1224
|
+
__CANCEL__: !0
|
|
1225
|
+
});
|
|
1226
|
+
function $n(e, t, n) {
|
|
1227
|
+
const r = n.config.validateStatus;
|
|
1228
|
+
!n.status || !r || r(n.status) ? e(n) : t(new _(
|
|
1229
|
+
"Request failed with status code " + n.status,
|
|
1230
|
+
[_.ERR_BAD_REQUEST, _.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1231
|
+
n.config,
|
|
1232
|
+
n.request,
|
|
1233
|
+
n
|
|
1234
|
+
));
|
|
1235
|
+
}
|
|
1236
|
+
function Ts(e) {
|
|
1237
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1238
|
+
return t && t[1] || "";
|
|
1239
|
+
}
|
|
1240
|
+
function As(e, t) {
|
|
1241
|
+
e = e || 10;
|
|
1242
|
+
const n = new Array(e), r = new Array(e);
|
|
1243
|
+
let s = 0, o = 0, i;
|
|
1244
|
+
return t = t !== void 0 ? t : 1e3, function(p) {
|
|
1245
|
+
const f = Date.now(), u = r[o];
|
|
1246
|
+
i || (i = f), n[s] = p, r[s] = f;
|
|
1247
|
+
let h = o, E = 0;
|
|
1248
|
+
for (; h !== s; )
|
|
1249
|
+
E += n[h++], h = h % e;
|
|
1250
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)
|
|
1251
|
+
return;
|
|
1252
|
+
const g = u && f - u;
|
|
1253
|
+
return g ? Math.round(E * 1e3 / g) : void 0;
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
function Ns(e, t) {
|
|
1257
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
1258
|
+
const i = (f, u = Date.now()) => {
|
|
1259
|
+
n = u, s = null, o && (clearTimeout(o), o = null), e(...f);
|
|
1260
|
+
};
|
|
1261
|
+
return [(...f) => {
|
|
1262
|
+
const u = Date.now(), h = u - n;
|
|
1263
|
+
h >= r ? i(f, u) : (s = f, o || (o = setTimeout(() => {
|
|
1264
|
+
o = null, i(s);
|
|
1265
|
+
}, r - h)));
|
|
1266
|
+
}, () => s && i(s)];
|
|
1267
|
+
}
|
|
1268
|
+
const Ye = (e, t, n = 3) => {
|
|
1269
|
+
let r = 0;
|
|
1270
|
+
const s = As(50, 250);
|
|
1271
|
+
return Ns((o) => {
|
|
1272
|
+
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, p = i - r, f = s(p), u = i <= a;
|
|
1273
|
+
r = i;
|
|
1274
|
+
const h = {
|
|
1275
|
+
loaded: i,
|
|
1276
|
+
total: a,
|
|
1277
|
+
progress: a ? i / a : void 0,
|
|
1278
|
+
bytes: p,
|
|
1279
|
+
rate: f || void 0,
|
|
1280
|
+
estimated: f && a && u ? (a - i) / f : void 0,
|
|
1281
|
+
event: o,
|
|
1282
|
+
lengthComputable: a != null,
|
|
1283
|
+
[t ? "download" : "upload"]: !0
|
|
1284
|
+
};
|
|
1285
|
+
e(h);
|
|
1286
|
+
}, n);
|
|
1287
|
+
}, Yt = (e, t) => {
|
|
1288
|
+
const n = e != null;
|
|
1289
|
+
return [(r) => t[0]({
|
|
1290
|
+
lengthComputable: n,
|
|
1291
|
+
total: e,
|
|
1292
|
+
loaded: r
|
|
1293
|
+
}), t[1]];
|
|
1294
|
+
}, Xt = (e) => (...t) => c.asap(() => e(...t)), Cs = J.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, J.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1295
|
+
new URL(J.origin),
|
|
1296
|
+
J.navigator && /(msie|trident)/i.test(J.navigator.userAgent)
|
|
1297
|
+
) : () => !0, js = J.hasStandardBrowserEnv ? (
|
|
1298
|
+
// Standard browser envs support document.cookie
|
|
1299
|
+
{
|
|
1300
|
+
write(e, t, n, r, s, o, i) {
|
|
1301
|
+
if (typeof document > "u") return;
|
|
1302
|
+
const a = [`${e}=${encodeURIComponent(t)}`];
|
|
1303
|
+
c.isNumber(n) && a.push(`expires=${new Date(n).toUTCString()}`), c.isString(r) && a.push(`path=${r}`), c.isString(s) && a.push(`domain=${s}`), o === !0 && a.push("secure"), c.isString(i) && a.push(`SameSite=${i}`), document.cookie = a.join("; ");
|
|
1304
|
+
},
|
|
1305
|
+
read(e) {
|
|
1306
|
+
if (typeof document > "u") return null;
|
|
1307
|
+
const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
|
|
1308
|
+
return t ? decodeURIComponent(t[1]) : null;
|
|
1309
|
+
},
|
|
1310
|
+
remove(e) {
|
|
1311
|
+
this.write(e, "", Date.now() - 864e5, "/");
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
) : (
|
|
1315
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1316
|
+
{
|
|
1317
|
+
write() {
|
|
1318
|
+
},
|
|
1319
|
+
read() {
|
|
1320
|
+
return null;
|
|
1321
|
+
},
|
|
1322
|
+
remove() {
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
);
|
|
1326
|
+
function Ds(e) {
|
|
1327
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1328
|
+
}
|
|
1329
|
+
function Ps(e, t) {
|
|
1330
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1331
|
+
}
|
|
1332
|
+
function Vn(e, t, n) {
|
|
1333
|
+
let r = !Ds(t);
|
|
1334
|
+
return e && (r || n == !1) ? Ps(e, t) : t;
|
|
1335
|
+
}
|
|
1336
|
+
const Zt = (e) => e instanceof X ? { ...e } : e;
|
|
1337
|
+
function Se(e, t) {
|
|
1338
|
+
t = t || {};
|
|
1339
|
+
const n = {};
|
|
1340
|
+
function r(f, u, h, E) {
|
|
1341
|
+
return c.isPlainObject(f) && c.isPlainObject(u) ? c.merge.call({ caseless: E }, f, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
|
|
1342
|
+
}
|
|
1343
|
+
function s(f, u, h, E) {
|
|
1344
|
+
if (c.isUndefined(u)) {
|
|
1345
|
+
if (!c.isUndefined(f))
|
|
1346
|
+
return r(void 0, f, h, E);
|
|
1347
|
+
} else return r(f, u, h, E);
|
|
1348
|
+
}
|
|
1349
|
+
function o(f, u) {
|
|
1350
|
+
if (!c.isUndefined(u))
|
|
1351
|
+
return r(void 0, u);
|
|
1352
|
+
}
|
|
1353
|
+
function i(f, u) {
|
|
1354
|
+
if (c.isUndefined(u)) {
|
|
1355
|
+
if (!c.isUndefined(f))
|
|
1356
|
+
return r(void 0, f);
|
|
1357
|
+
} else return r(void 0, u);
|
|
1358
|
+
}
|
|
1359
|
+
function a(f, u, h) {
|
|
1360
|
+
if (h in t)
|
|
1361
|
+
return r(f, u);
|
|
1362
|
+
if (h in e)
|
|
1363
|
+
return r(void 0, f);
|
|
1364
|
+
}
|
|
1365
|
+
const p = {
|
|
1366
|
+
url: o,
|
|
1367
|
+
method: o,
|
|
1368
|
+
data: o,
|
|
1369
|
+
baseURL: i,
|
|
1370
|
+
transformRequest: i,
|
|
1371
|
+
transformResponse: i,
|
|
1372
|
+
paramsSerializer: i,
|
|
1373
|
+
timeout: i,
|
|
1374
|
+
timeoutMessage: i,
|
|
1375
|
+
withCredentials: i,
|
|
1376
|
+
withXSRFToken: i,
|
|
1377
|
+
adapter: i,
|
|
1378
|
+
responseType: i,
|
|
1379
|
+
xsrfCookieName: i,
|
|
1380
|
+
xsrfHeaderName: i,
|
|
1381
|
+
onUploadProgress: i,
|
|
1382
|
+
onDownloadProgress: i,
|
|
1383
|
+
decompress: i,
|
|
1384
|
+
maxContentLength: i,
|
|
1385
|
+
maxBodyLength: i,
|
|
1386
|
+
beforeRedirect: i,
|
|
1387
|
+
transport: i,
|
|
1388
|
+
httpAgent: i,
|
|
1389
|
+
httpsAgent: i,
|
|
1390
|
+
cancelToken: i,
|
|
1391
|
+
socketPath: i,
|
|
1392
|
+
responseEncoding: i,
|
|
1393
|
+
validateStatus: a,
|
|
1394
|
+
headers: (f, u, h) => s(Zt(f), Zt(u), h, !0)
|
|
1395
|
+
};
|
|
1396
|
+
return c.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1397
|
+
const h = p[u] || s, E = h(e[u], t[u], u);
|
|
1398
|
+
c.isUndefined(E) && h !== a || (n[u] = E);
|
|
1399
|
+
}), n;
|
|
1400
|
+
}
|
|
1401
|
+
const qn = (e) => {
|
|
1402
|
+
const t = Se({}, e);
|
|
1403
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = t;
|
|
1404
|
+
if (t.headers = i = X.from(i), t.url = In(Vn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1405
|
+
"Authorization",
|
|
1406
|
+
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1407
|
+
), c.isFormData(n)) {
|
|
1408
|
+
if (J.hasStandardBrowserEnv || J.hasStandardBrowserWebWorkerEnv)
|
|
1409
|
+
i.setContentType(void 0);
|
|
1410
|
+
else if (c.isFunction(n.getHeaders)) {
|
|
1411
|
+
const p = n.getHeaders(), f = ["content-type", "content-length"];
|
|
1412
|
+
Object.entries(p).forEach(([u, h]) => {
|
|
1413
|
+
f.includes(u.toLowerCase()) && i.set(u, h);
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
if (J.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Cs(t.url))) {
|
|
1418
|
+
const p = s && o && js.read(o);
|
|
1419
|
+
p && i.set(s, p);
|
|
1420
|
+
}
|
|
1421
|
+
return t;
|
|
1422
|
+
}, Ls = typeof XMLHttpRequest < "u", ks = Ls && function(e) {
|
|
1423
|
+
return new Promise(function(n, r) {
|
|
1424
|
+
const s = qn(e);
|
|
1425
|
+
let o = s.data;
|
|
1426
|
+
const i = X.from(s.headers).normalize();
|
|
1427
|
+
let { responseType: a, onUploadProgress: p, onDownloadProgress: f } = s, u, h, E, g, l;
|
|
1428
|
+
function m() {
|
|
1429
|
+
g && g(), l && l(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1430
|
+
}
|
|
1431
|
+
let b = new XMLHttpRequest();
|
|
1432
|
+
b.open(s.method.toUpperCase(), s.url, !0), b.timeout = s.timeout;
|
|
1433
|
+
function R() {
|
|
1434
|
+
if (!b)
|
|
1435
|
+
return;
|
|
1436
|
+
const v = X.from(
|
|
1437
|
+
"getAllResponseHeaders" in b && b.getAllResponseHeaders()
|
|
1438
|
+
), x = {
|
|
1439
|
+
data: !a || a === "text" || a === "json" ? b.responseText : b.response,
|
|
1440
|
+
status: b.status,
|
|
1441
|
+
statusText: b.statusText,
|
|
1442
|
+
headers: v,
|
|
1443
|
+
config: e,
|
|
1444
|
+
request: b
|
|
1445
|
+
};
|
|
1446
|
+
$n(function(D) {
|
|
1447
|
+
n(D), m();
|
|
1448
|
+
}, function(D) {
|
|
1449
|
+
r(D), m();
|
|
1450
|
+
}, x), b = null;
|
|
1451
|
+
}
|
|
1452
|
+
"onloadend" in b ? b.onloadend = R : b.onreadystatechange = function() {
|
|
1453
|
+
!b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.indexOf("file:") === 0) || setTimeout(R);
|
|
1454
|
+
}, b.onabort = function() {
|
|
1455
|
+
b && (r(new _("Request aborted", _.ECONNABORTED, e, b)), b = null);
|
|
1456
|
+
}, b.onerror = function(j) {
|
|
1457
|
+
const x = j && j.message ? j.message : "Network Error", k = new _(x, _.ERR_NETWORK, e, b);
|
|
1458
|
+
k.event = j || null, r(k), b = null;
|
|
1459
|
+
}, b.ontimeout = function() {
|
|
1460
|
+
let j = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1461
|
+
const x = s.transitional || Un;
|
|
1462
|
+
s.timeoutErrorMessage && (j = s.timeoutErrorMessage), r(new _(
|
|
1463
|
+
j,
|
|
1464
|
+
x.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
|
|
1465
|
+
e,
|
|
1466
|
+
b
|
|
1467
|
+
)), b = null;
|
|
1468
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in b && c.forEach(i.toJSON(), function(j, x) {
|
|
1469
|
+
b.setRequestHeader(x, j);
|
|
1470
|
+
}), c.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), a && a !== "json" && (b.responseType = s.responseType), f && ([E, l] = Ye(f, !0), b.addEventListener("progress", E)), p && b.upload && ([h, g] = Ye(p), b.upload.addEventListener("progress", h), b.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (v) => {
|
|
1471
|
+
b && (r(!v || v.type ? new Ce(null, e, b) : v), b.abort(), b = null);
|
|
1472
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1473
|
+
const w = Ts(s.url);
|
|
1474
|
+
if (w && J.protocols.indexOf(w) === -1) {
|
|
1475
|
+
r(new _("Unsupported protocol " + w + ":", _.ERR_BAD_REQUEST, e));
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
b.send(o || null);
|
|
1479
|
+
});
|
|
1480
|
+
}, Fs = (e, t) => {
|
|
1481
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1482
|
+
if (t || n) {
|
|
1483
|
+
let r = new AbortController(), s;
|
|
1484
|
+
const o = function(f) {
|
|
1485
|
+
if (!s) {
|
|
1486
|
+
s = !0, a();
|
|
1487
|
+
const u = f instanceof Error ? f : this.reason;
|
|
1488
|
+
r.abort(u instanceof _ ? u : new Ce(u instanceof Error ? u.message : u));
|
|
1489
|
+
}
|
|
1490
|
+
};
|
|
1491
|
+
let i = t && setTimeout(() => {
|
|
1492
|
+
i = null, o(new _(`timeout ${t} of ms exceeded`, _.ETIMEDOUT));
|
|
1493
|
+
}, t);
|
|
1494
|
+
const a = () => {
|
|
1495
|
+
e && (i && clearTimeout(i), i = null, e.forEach((f) => {
|
|
1496
|
+
f.unsubscribe ? f.unsubscribe(o) : f.removeEventListener("abort", o);
|
|
1497
|
+
}), e = null);
|
|
1498
|
+
};
|
|
1499
|
+
e.forEach((f) => f.addEventListener("abort", o));
|
|
1500
|
+
const { signal: p } = r;
|
|
1501
|
+
return p.unsubscribe = () => c.asap(a), p;
|
|
1502
|
+
}
|
|
1503
|
+
}, Is = function* (e, t) {
|
|
1504
|
+
let n = e.byteLength;
|
|
1505
|
+
if (n < t) {
|
|
1506
|
+
yield e;
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1509
|
+
let r = 0, s;
|
|
1510
|
+
for (; r < n; )
|
|
1511
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1512
|
+
}, Us = async function* (e, t) {
|
|
1513
|
+
for await (const n of Ms(e))
|
|
1514
|
+
yield* Is(n, t);
|
|
1515
|
+
}, Ms = async function* (e) {
|
|
1516
|
+
if (e[Symbol.asyncIterator]) {
|
|
1517
|
+
yield* e;
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
const t = e.getReader();
|
|
1521
|
+
try {
|
|
1522
|
+
for (; ; ) {
|
|
1523
|
+
const { done: n, value: r } = await t.read();
|
|
1524
|
+
if (n)
|
|
1525
|
+
break;
|
|
1526
|
+
yield r;
|
|
1527
|
+
}
|
|
1528
|
+
} finally {
|
|
1529
|
+
await t.cancel();
|
|
1530
|
+
}
|
|
1531
|
+
}, Qt = (e, t, n, r) => {
|
|
1532
|
+
const s = Us(e, t);
|
|
1533
|
+
let o = 0, i, a = (p) => {
|
|
1534
|
+
i || (i = !0, r && r(p));
|
|
1535
|
+
};
|
|
1536
|
+
return new ReadableStream({
|
|
1537
|
+
async pull(p) {
|
|
1538
|
+
try {
|
|
1539
|
+
const { done: f, value: u } = await s.next();
|
|
1540
|
+
if (f) {
|
|
1541
|
+
a(), p.close();
|
|
1542
|
+
return;
|
|
1543
|
+
}
|
|
1544
|
+
let h = u.byteLength;
|
|
1545
|
+
if (n) {
|
|
1546
|
+
let E = o += h;
|
|
1547
|
+
n(E);
|
|
1548
|
+
}
|
|
1549
|
+
p.enqueue(new Uint8Array(u));
|
|
1550
|
+
} catch (f) {
|
|
1551
|
+
throw a(f), f;
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
cancel(p) {
|
|
1555
|
+
return a(p), s.return();
|
|
1556
|
+
}
|
|
1557
|
+
}, {
|
|
1558
|
+
highWaterMark: 2
|
|
1559
|
+
});
|
|
1560
|
+
}, en = 64 * 1024, { isFunction: Ve } = c, Bs = (({ Request: e, Response: t }) => ({
|
|
1561
|
+
Request: e,
|
|
1562
|
+
Response: t
|
|
1563
|
+
}))(c.global), {
|
|
1564
|
+
ReadableStream: tn,
|
|
1565
|
+
TextEncoder: nn
|
|
1566
|
+
} = c.global, rn = (e, ...t) => {
|
|
1567
|
+
try {
|
|
1568
|
+
return !!e(...t);
|
|
1569
|
+
} catch {
|
|
1570
|
+
return !1;
|
|
1571
|
+
}
|
|
1572
|
+
}, $s = (e) => {
|
|
1573
|
+
e = c.merge.call({
|
|
1574
|
+
skipUndefined: !0
|
|
1575
|
+
}, Bs, e);
|
|
1576
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? Ve(t) : typeof fetch == "function", o = Ve(n), i = Ve(r);
|
|
1577
|
+
if (!s)
|
|
1578
|
+
return !1;
|
|
1579
|
+
const a = s && Ve(tn), p = s && (typeof nn == "function" ? /* @__PURE__ */ ((l) => (m) => l.encode(m))(new nn()) : async (l) => new Uint8Array(await new n(l).arrayBuffer())), f = o && a && rn(() => {
|
|
1580
|
+
let l = !1;
|
|
1581
|
+
const m = new n(J.origin, {
|
|
1582
|
+
body: new tn(),
|
|
1583
|
+
method: "POST",
|
|
1584
|
+
get duplex() {
|
|
1585
|
+
return l = !0, "half";
|
|
1586
|
+
}
|
|
1587
|
+
}).headers.has("Content-Type");
|
|
1588
|
+
return l && !m;
|
|
1589
|
+
}), u = i && a && rn(() => c.isReadableStream(new r("").body)), h = {
|
|
1590
|
+
stream: u && ((l) => l.body)
|
|
1591
|
+
};
|
|
1592
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((l) => {
|
|
1593
|
+
!h[l] && (h[l] = (m, b) => {
|
|
1594
|
+
let R = m && m[l];
|
|
1595
|
+
if (R)
|
|
1596
|
+
return R.call(m);
|
|
1597
|
+
throw new _(`Response type '${l}' is not supported`, _.ERR_NOT_SUPPORT, b);
|
|
1598
|
+
});
|
|
1599
|
+
});
|
|
1600
|
+
const E = async (l) => {
|
|
1601
|
+
if (l == null)
|
|
1602
|
+
return 0;
|
|
1603
|
+
if (c.isBlob(l))
|
|
1604
|
+
return l.size;
|
|
1605
|
+
if (c.isSpecCompliantForm(l))
|
|
1606
|
+
return (await new n(J.origin, {
|
|
1607
|
+
method: "POST",
|
|
1608
|
+
body: l
|
|
1609
|
+
}).arrayBuffer()).byteLength;
|
|
1610
|
+
if (c.isArrayBufferView(l) || c.isArrayBuffer(l))
|
|
1611
|
+
return l.byteLength;
|
|
1612
|
+
if (c.isURLSearchParams(l) && (l = l + ""), c.isString(l))
|
|
1613
|
+
return (await p(l)).byteLength;
|
|
1614
|
+
}, g = async (l, m) => {
|
|
1615
|
+
const b = c.toFiniteNumber(l.getContentLength());
|
|
1616
|
+
return b ?? E(m);
|
|
1617
|
+
};
|
|
1618
|
+
return async (l) => {
|
|
1619
|
+
let {
|
|
1620
|
+
url: m,
|
|
1621
|
+
method: b,
|
|
1622
|
+
data: R,
|
|
1623
|
+
signal: w,
|
|
1624
|
+
cancelToken: v,
|
|
1625
|
+
timeout: j,
|
|
1626
|
+
onDownloadProgress: x,
|
|
1627
|
+
onUploadProgress: k,
|
|
1628
|
+
responseType: D,
|
|
1629
|
+
headers: O,
|
|
1630
|
+
withCredentials: A = "same-origin",
|
|
1631
|
+
fetchOptions: Z
|
|
1632
|
+
} = qn(l), V = t || fetch;
|
|
1633
|
+
D = D ? (D + "").toLowerCase() : "text";
|
|
1634
|
+
let q = Fs([w, v && v.toAbortSignal()], j), L = null;
|
|
1635
|
+
const N = q && q.unsubscribe && (() => {
|
|
1636
|
+
q.unsubscribe();
|
|
1637
|
+
});
|
|
1638
|
+
let Q;
|
|
1639
|
+
try {
|
|
1640
|
+
if (k && f && b !== "get" && b !== "head" && (Q = await g(O, R)) !== 0) {
|
|
1641
|
+
let d = new n(m, {
|
|
1642
|
+
method: "POST",
|
|
1643
|
+
body: R,
|
|
1644
|
+
duplex: "half"
|
|
1645
|
+
}), S;
|
|
1646
|
+
if (c.isFormData(R) && (S = d.headers.get("content-type")) && O.setContentType(S), d.body) {
|
|
1647
|
+
const [T, P] = Yt(
|
|
1648
|
+
Q,
|
|
1649
|
+
Ye(Xt(k))
|
|
1650
|
+
);
|
|
1651
|
+
R = Qt(d.body, en, T, P);
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
c.isString(A) || (A = A ? "include" : "omit");
|
|
1655
|
+
const H = o && "credentials" in n.prototype, pe = {
|
|
1656
|
+
...Z,
|
|
1657
|
+
signal: q,
|
|
1658
|
+
method: b.toUpperCase(),
|
|
1659
|
+
headers: O.normalize().toJSON(),
|
|
1660
|
+
body: R,
|
|
1661
|
+
duplex: "half",
|
|
1662
|
+
credentials: H ? A : void 0
|
|
1663
|
+
};
|
|
1664
|
+
L = o && new n(m, pe);
|
|
1665
|
+
let G = await (o ? V(L, Z) : V(m, pe));
|
|
1666
|
+
const ee = u && (D === "stream" || D === "response");
|
|
1667
|
+
if (u && (x || ee && N)) {
|
|
1668
|
+
const d = {};
|
|
1669
|
+
["status", "statusText", "headers"].forEach((ne) => {
|
|
1670
|
+
d[ne] = G[ne];
|
|
1671
|
+
});
|
|
1672
|
+
const S = c.toFiniteNumber(G.headers.get("content-length")), [T, P] = x && Yt(
|
|
1673
|
+
S,
|
|
1674
|
+
Ye(Xt(x), !0)
|
|
1675
|
+
) || [];
|
|
1676
|
+
G = new r(
|
|
1677
|
+
Qt(G.body, en, T, () => {
|
|
1678
|
+
P && P(), N && N();
|
|
1679
|
+
}),
|
|
1680
|
+
d
|
|
1681
|
+
);
|
|
1682
|
+
}
|
|
1683
|
+
D = D || "text";
|
|
1684
|
+
let ye = await h[c.findKey(h, D) || "text"](G, l);
|
|
1685
|
+
return !ee && N && N(), await new Promise((d, S) => {
|
|
1686
|
+
$n(d, S, {
|
|
1687
|
+
data: ye,
|
|
1688
|
+
headers: X.from(G.headers),
|
|
1689
|
+
status: G.status,
|
|
1690
|
+
statusText: G.statusText,
|
|
1691
|
+
config: l,
|
|
1692
|
+
request: L
|
|
1693
|
+
});
|
|
1694
|
+
});
|
|
1695
|
+
} catch (H) {
|
|
1696
|
+
throw N && N(), H && H.name === "TypeError" && /Load failed|fetch/i.test(H.message) ? Object.assign(
|
|
1697
|
+
new _("Network Error", _.ERR_NETWORK, l, L),
|
|
1698
|
+
{
|
|
1699
|
+
cause: H.cause || H
|
|
1700
|
+
}
|
|
1701
|
+
) : _.from(H, H && H.code, l, L);
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
}, Vs = /* @__PURE__ */ new Map(), Hn = (e) => {
|
|
1705
|
+
let t = e && e.env || {};
|
|
1706
|
+
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1707
|
+
r,
|
|
1708
|
+
s,
|
|
1709
|
+
n
|
|
1710
|
+
];
|
|
1711
|
+
let i = o.length, a = i, p, f, u = Vs;
|
|
1712
|
+
for (; a--; )
|
|
1713
|
+
p = o[a], f = u.get(p), f === void 0 && u.set(p, f = a ? /* @__PURE__ */ new Map() : $s(t)), u = f;
|
|
1714
|
+
return f;
|
|
1715
|
+
};
|
|
1716
|
+
Hn();
|
|
1717
|
+
const Pt = {
|
|
1718
|
+
http: os,
|
|
1719
|
+
xhr: ks,
|
|
1720
|
+
fetch: {
|
|
1721
|
+
get: Hn
|
|
1722
|
+
}
|
|
1723
|
+
};
|
|
1724
|
+
c.forEach(Pt, (e, t) => {
|
|
1725
|
+
if (e) {
|
|
1726
|
+
try {
|
|
1727
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1728
|
+
} catch {
|
|
1729
|
+
}
|
|
1730
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1731
|
+
}
|
|
1732
|
+
});
|
|
1733
|
+
const sn = (e) => `- ${e}`, qs = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1734
|
+
function Hs(e, t) {
|
|
1735
|
+
e = c.isArray(e) ? e : [e];
|
|
1736
|
+
const { length: n } = e;
|
|
1737
|
+
let r, s;
|
|
1738
|
+
const o = {};
|
|
1739
|
+
for (let i = 0; i < n; i++) {
|
|
1740
|
+
r = e[i];
|
|
1741
|
+
let a;
|
|
1742
|
+
if (s = r, !qs(r) && (s = Pt[(a = String(r)).toLowerCase()], s === void 0))
|
|
1743
|
+
throw new _(`Unknown adapter '${a}'`);
|
|
1744
|
+
if (s && (c.isFunction(s) || (s = s.get(t))))
|
|
1745
|
+
break;
|
|
1746
|
+
o[a || "#" + i] = s;
|
|
1747
|
+
}
|
|
1748
|
+
if (!s) {
|
|
1749
|
+
const i = Object.entries(o).map(
|
|
1750
|
+
([p, f]) => `adapter ${p} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1751
|
+
);
|
|
1752
|
+
let a = n ? i.length > 1 ? `since :
|
|
1753
|
+
` + i.map(sn).join(`
|
|
1754
|
+
`) : " " + sn(i[0]) : "as no adapter specified";
|
|
1755
|
+
throw new _(
|
|
1756
|
+
"There is no suitable adapter to dispatch the request " + a,
|
|
1757
|
+
"ERR_NOT_SUPPORT"
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
return s;
|
|
1761
|
+
}
|
|
1762
|
+
const Wn = {
|
|
1763
|
+
/**
|
|
1764
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
1765
|
+
* @type {Function}
|
|
1766
|
+
*/
|
|
1767
|
+
getAdapter: Hs,
|
|
1768
|
+
/**
|
|
1769
|
+
* Exposes all known adapters
|
|
1770
|
+
* @type {Object<string, Function|Object>}
|
|
1771
|
+
*/
|
|
1772
|
+
adapters: Pt
|
|
1773
|
+
};
|
|
1774
|
+
function ct(e) {
|
|
1775
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1776
|
+
throw new Ce(null, e);
|
|
1777
|
+
}
|
|
1778
|
+
function on(e) {
|
|
1779
|
+
return ct(e), e.headers = X.from(e.headers), e.data = at.call(
|
|
1780
|
+
e,
|
|
1781
|
+
e.transformRequest
|
|
1782
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Wn.getAdapter(e.adapter || Ue.adapter, e)(e).then(function(r) {
|
|
1783
|
+
return ct(e), r.data = at.call(
|
|
1784
|
+
e,
|
|
1785
|
+
e.transformResponse,
|
|
1786
|
+
r
|
|
1787
|
+
), r.headers = X.from(r.headers), r;
|
|
1788
|
+
}, function(r) {
|
|
1789
|
+
return Bn(r) || (ct(e), r && r.response && (r.response.data = at.call(
|
|
1790
|
+
e,
|
|
1791
|
+
e.transformResponse,
|
|
1792
|
+
r.response
|
|
1793
|
+
), r.response.headers = X.from(r.response.headers))), Promise.reject(r);
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
const zn = "1.13.2", tt = {};
|
|
1797
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1798
|
+
tt[e] = function(r) {
|
|
1799
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1800
|
+
};
|
|
1801
|
+
});
|
|
1802
|
+
const an = {};
|
|
1803
|
+
tt.transitional = function(t, n, r) {
|
|
1804
|
+
function s(o, i) {
|
|
1805
|
+
return "[Axios v" + zn + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1806
|
+
}
|
|
1807
|
+
return (o, i, a) => {
|
|
1808
|
+
if (t === !1)
|
|
1809
|
+
throw new _(
|
|
1810
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1811
|
+
_.ERR_DEPRECATED
|
|
1812
|
+
);
|
|
1813
|
+
return n && !an[i] && (an[i] = !0, console.warn(
|
|
1814
|
+
s(
|
|
1815
|
+
i,
|
|
1816
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1817
|
+
)
|
|
1818
|
+
)), t ? t(o, i, a) : !0;
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
tt.spelling = function(t) {
|
|
1822
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1823
|
+
};
|
|
1824
|
+
function Ws(e, t, n) {
|
|
1825
|
+
if (typeof e != "object")
|
|
1826
|
+
throw new _("options must be an object", _.ERR_BAD_OPTION_VALUE);
|
|
1827
|
+
const r = Object.keys(e);
|
|
1828
|
+
let s = r.length;
|
|
1829
|
+
for (; s-- > 0; ) {
|
|
1830
|
+
const o = r[s], i = t[o];
|
|
1831
|
+
if (i) {
|
|
1832
|
+
const a = e[o], p = a === void 0 || i(a, o, e);
|
|
1833
|
+
if (p !== !0)
|
|
1834
|
+
throw new _("option " + o + " must be " + p, _.ERR_BAD_OPTION_VALUE);
|
|
1835
|
+
continue;
|
|
1836
|
+
}
|
|
1837
|
+
if (n !== !0)
|
|
1838
|
+
throw new _("Unknown option " + o, _.ERR_BAD_OPTION);
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
const Ge = {
|
|
1842
|
+
assertOptions: Ws,
|
|
1843
|
+
validators: tt
|
|
1844
|
+
}, ie = Ge.validators;
|
|
1845
|
+
let we = class {
|
|
1846
|
+
constructor(t) {
|
|
1847
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1848
|
+
request: new Kt(),
|
|
1849
|
+
response: new Kt()
|
|
1850
|
+
};
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Dispatch a request
|
|
1854
|
+
*
|
|
1855
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1856
|
+
* @param {?Object} config
|
|
1857
|
+
*
|
|
1858
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1859
|
+
*/
|
|
1860
|
+
async request(t, n) {
|
|
1861
|
+
try {
|
|
1862
|
+
return await this._request(t, n);
|
|
1863
|
+
} catch (r) {
|
|
1864
|
+
if (r instanceof Error) {
|
|
1865
|
+
let s = {};
|
|
1866
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1867
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1868
|
+
try {
|
|
1869
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1870
|
+
` + o) : r.stack = o;
|
|
1871
|
+
} catch {
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
throw r;
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
_request(t, n) {
|
|
1878
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Se(this.defaults, n);
|
|
1879
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1880
|
+
r !== void 0 && Ge.assertOptions(r, {
|
|
1881
|
+
silentJSONParsing: ie.transitional(ie.boolean),
|
|
1882
|
+
forcedJSONParsing: ie.transitional(ie.boolean),
|
|
1883
|
+
clarifyTimeoutError: ie.transitional(ie.boolean)
|
|
1884
|
+
}, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
|
|
1885
|
+
serialize: s
|
|
1886
|
+
} : Ge.assertOptions(s, {
|
|
1887
|
+
encode: ie.function,
|
|
1888
|
+
serialize: ie.function
|
|
1889
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ge.assertOptions(n, {
|
|
1890
|
+
baseUrl: ie.spelling("baseURL"),
|
|
1891
|
+
withXsrfToken: ie.spelling("withXSRFToken")
|
|
1892
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1893
|
+
let i = o && c.merge(
|
|
1894
|
+
o.common,
|
|
1895
|
+
o[n.method]
|
|
1896
|
+
);
|
|
1897
|
+
o && c.forEach(
|
|
1898
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1899
|
+
(l) => {
|
|
1900
|
+
delete o[l];
|
|
1901
|
+
}
|
|
1902
|
+
), n.headers = X.concat(i, o);
|
|
1903
|
+
const a = [];
|
|
1904
|
+
let p = !0;
|
|
1905
|
+
this.interceptors.request.forEach(function(m) {
|
|
1906
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (p = p && m.synchronous, a.unshift(m.fulfilled, m.rejected));
|
|
1907
|
+
});
|
|
1908
|
+
const f = [];
|
|
1909
|
+
this.interceptors.response.forEach(function(m) {
|
|
1910
|
+
f.push(m.fulfilled, m.rejected);
|
|
1911
|
+
});
|
|
1912
|
+
let u, h = 0, E;
|
|
1913
|
+
if (!p) {
|
|
1914
|
+
const l = [on.bind(this), void 0];
|
|
1915
|
+
for (l.unshift(...a), l.push(...f), E = l.length, u = Promise.resolve(n); h < E; )
|
|
1916
|
+
u = u.then(l[h++], l[h++]);
|
|
1917
|
+
return u;
|
|
1918
|
+
}
|
|
1919
|
+
E = a.length;
|
|
1920
|
+
let g = n;
|
|
1921
|
+
for (; h < E; ) {
|
|
1922
|
+
const l = a[h++], m = a[h++];
|
|
1923
|
+
try {
|
|
1924
|
+
g = l(g);
|
|
1925
|
+
} catch (b) {
|
|
1926
|
+
m.call(this, b);
|
|
1927
|
+
break;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
try {
|
|
1931
|
+
u = on.call(this, g);
|
|
1932
|
+
} catch (l) {
|
|
1933
|
+
return Promise.reject(l);
|
|
1934
|
+
}
|
|
1935
|
+
for (h = 0, E = f.length; h < E; )
|
|
1936
|
+
u = u.then(f[h++], f[h++]);
|
|
1937
|
+
return u;
|
|
1938
|
+
}
|
|
1939
|
+
getUri(t) {
|
|
1940
|
+
t = Se(this.defaults, t);
|
|
1941
|
+
const n = Vn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1942
|
+
return In(n, t.params, t.paramsSerializer);
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1946
|
+
we.prototype[t] = function(n, r) {
|
|
1947
|
+
return this.request(Se(r || {}, {
|
|
1948
|
+
method: t,
|
|
1949
|
+
url: n,
|
|
1950
|
+
data: (r || {}).data
|
|
1951
|
+
}));
|
|
1952
|
+
};
|
|
1953
|
+
});
|
|
1954
|
+
c.forEach(["post", "put", "patch"], function(t) {
|
|
1955
|
+
function n(r) {
|
|
1956
|
+
return function(o, i, a) {
|
|
1957
|
+
return this.request(Se(a || {}, {
|
|
1958
|
+
method: t,
|
|
1959
|
+
headers: r ? {
|
|
1960
|
+
"Content-Type": "multipart/form-data"
|
|
1961
|
+
} : {},
|
|
1962
|
+
url: o,
|
|
1963
|
+
data: i
|
|
1964
|
+
}));
|
|
1965
|
+
};
|
|
1966
|
+
}
|
|
1967
|
+
we.prototype[t] = n(), we.prototype[t + "Form"] = n(!0);
|
|
1968
|
+
});
|
|
1969
|
+
let zs = class Jn {
|
|
1970
|
+
constructor(t) {
|
|
1971
|
+
if (typeof t != "function")
|
|
1972
|
+
throw new TypeError("executor must be a function.");
|
|
1973
|
+
let n;
|
|
1974
|
+
this.promise = new Promise(function(o) {
|
|
1975
|
+
n = o;
|
|
1976
|
+
});
|
|
1977
|
+
const r = this;
|
|
1978
|
+
this.promise.then((s) => {
|
|
1979
|
+
if (!r._listeners) return;
|
|
1980
|
+
let o = r._listeners.length;
|
|
1981
|
+
for (; o-- > 0; )
|
|
1982
|
+
r._listeners[o](s);
|
|
1983
|
+
r._listeners = null;
|
|
1984
|
+
}), this.promise.then = (s) => {
|
|
1985
|
+
let o;
|
|
1986
|
+
const i = new Promise((a) => {
|
|
1987
|
+
r.subscribe(a), o = a;
|
|
1988
|
+
}).then(s);
|
|
1989
|
+
return i.cancel = function() {
|
|
1990
|
+
r.unsubscribe(o);
|
|
1991
|
+
}, i;
|
|
1992
|
+
}, t(function(o, i, a) {
|
|
1993
|
+
r.reason || (r.reason = new Ce(o, i, a), n(r.reason));
|
|
1994
|
+
});
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1998
|
+
*/
|
|
1999
|
+
throwIfRequested() {
|
|
2000
|
+
if (this.reason)
|
|
2001
|
+
throw this.reason;
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* Subscribe to the cancel signal
|
|
2005
|
+
*/
|
|
2006
|
+
subscribe(t) {
|
|
2007
|
+
if (this.reason) {
|
|
2008
|
+
t(this.reason);
|
|
2009
|
+
return;
|
|
2010
|
+
}
|
|
2011
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* Unsubscribe from the cancel signal
|
|
2015
|
+
*/
|
|
2016
|
+
unsubscribe(t) {
|
|
2017
|
+
if (!this._listeners)
|
|
2018
|
+
return;
|
|
2019
|
+
const n = this._listeners.indexOf(t);
|
|
2020
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2021
|
+
}
|
|
2022
|
+
toAbortSignal() {
|
|
2023
|
+
const t = new AbortController(), n = (r) => {
|
|
2024
|
+
t.abort(r);
|
|
2025
|
+
};
|
|
2026
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2027
|
+
}
|
|
2028
|
+
/**
|
|
2029
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2030
|
+
* cancels the `CancelToken`.
|
|
2031
|
+
*/
|
|
2032
|
+
static source() {
|
|
2033
|
+
let t;
|
|
2034
|
+
return {
|
|
2035
|
+
token: new Jn(function(s) {
|
|
2036
|
+
t = s;
|
|
2037
|
+
}),
|
|
2038
|
+
cancel: t
|
|
2039
|
+
};
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
function Js(e) {
|
|
2043
|
+
return function(n) {
|
|
2044
|
+
return e.apply(null, n);
|
|
2045
|
+
};
|
|
2046
|
+
}
|
|
2047
|
+
function Ks(e) {
|
|
2048
|
+
return c.isObject(e) && e.isAxiosError === !0;
|
|
2049
|
+
}
|
|
2050
|
+
const wt = {
|
|
2051
|
+
Continue: 100,
|
|
2052
|
+
SwitchingProtocols: 101,
|
|
2053
|
+
Processing: 102,
|
|
2054
|
+
EarlyHints: 103,
|
|
2055
|
+
Ok: 200,
|
|
2056
|
+
Created: 201,
|
|
2057
|
+
Accepted: 202,
|
|
2058
|
+
NonAuthoritativeInformation: 203,
|
|
2059
|
+
NoContent: 204,
|
|
2060
|
+
ResetContent: 205,
|
|
2061
|
+
PartialContent: 206,
|
|
2062
|
+
MultiStatus: 207,
|
|
2063
|
+
AlreadyReported: 208,
|
|
2064
|
+
ImUsed: 226,
|
|
2065
|
+
MultipleChoices: 300,
|
|
2066
|
+
MovedPermanently: 301,
|
|
2067
|
+
Found: 302,
|
|
2068
|
+
SeeOther: 303,
|
|
2069
|
+
NotModified: 304,
|
|
2070
|
+
UseProxy: 305,
|
|
2071
|
+
Unused: 306,
|
|
2072
|
+
TemporaryRedirect: 307,
|
|
2073
|
+
PermanentRedirect: 308,
|
|
2074
|
+
BadRequest: 400,
|
|
2075
|
+
Unauthorized: 401,
|
|
2076
|
+
PaymentRequired: 402,
|
|
2077
|
+
Forbidden: 403,
|
|
2078
|
+
NotFound: 404,
|
|
2079
|
+
MethodNotAllowed: 405,
|
|
2080
|
+
NotAcceptable: 406,
|
|
2081
|
+
ProxyAuthenticationRequired: 407,
|
|
2082
|
+
RequestTimeout: 408,
|
|
2083
|
+
Conflict: 409,
|
|
2084
|
+
Gone: 410,
|
|
2085
|
+
LengthRequired: 411,
|
|
2086
|
+
PreconditionFailed: 412,
|
|
2087
|
+
PayloadTooLarge: 413,
|
|
2088
|
+
UriTooLong: 414,
|
|
2089
|
+
UnsupportedMediaType: 415,
|
|
2090
|
+
RangeNotSatisfiable: 416,
|
|
2091
|
+
ExpectationFailed: 417,
|
|
2092
|
+
ImATeapot: 418,
|
|
2093
|
+
MisdirectedRequest: 421,
|
|
2094
|
+
UnprocessableEntity: 422,
|
|
2095
|
+
Locked: 423,
|
|
2096
|
+
FailedDependency: 424,
|
|
2097
|
+
TooEarly: 425,
|
|
2098
|
+
UpgradeRequired: 426,
|
|
2099
|
+
PreconditionRequired: 428,
|
|
2100
|
+
TooManyRequests: 429,
|
|
2101
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
2102
|
+
UnavailableForLegalReasons: 451,
|
|
2103
|
+
InternalServerError: 500,
|
|
2104
|
+
NotImplemented: 501,
|
|
2105
|
+
BadGateway: 502,
|
|
2106
|
+
ServiceUnavailable: 503,
|
|
2107
|
+
GatewayTimeout: 504,
|
|
2108
|
+
HttpVersionNotSupported: 505,
|
|
2109
|
+
VariantAlsoNegotiates: 506,
|
|
2110
|
+
InsufficientStorage: 507,
|
|
2111
|
+
LoopDetected: 508,
|
|
2112
|
+
NotExtended: 510,
|
|
2113
|
+
NetworkAuthenticationRequired: 511,
|
|
2114
|
+
WebServerIsDown: 521,
|
|
2115
|
+
ConnectionTimedOut: 522,
|
|
2116
|
+
OriginIsUnreachable: 523,
|
|
2117
|
+
TimeoutOccurred: 524,
|
|
2118
|
+
SslHandshakeFailed: 525,
|
|
2119
|
+
InvalidSslCertificate: 526
|
|
2120
|
+
};
|
|
2121
|
+
Object.entries(wt).forEach(([e, t]) => {
|
|
2122
|
+
wt[t] = e;
|
|
2123
|
+
});
|
|
2124
|
+
function Kn(e) {
|
|
2125
|
+
const t = new we(e), n = xn(we.prototype.request, t);
|
|
2126
|
+
return c.extend(n, we.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2127
|
+
return Kn(Se(e, s));
|
|
2128
|
+
}, n;
|
|
2129
|
+
}
|
|
2130
|
+
const I = Kn(Ue);
|
|
2131
|
+
I.Axios = we;
|
|
2132
|
+
I.CanceledError = Ce;
|
|
2133
|
+
I.CancelToken = zs;
|
|
2134
|
+
I.isCancel = Bn;
|
|
2135
|
+
I.VERSION = zn;
|
|
2136
|
+
I.toFormData = et;
|
|
2137
|
+
I.AxiosError = _;
|
|
2138
|
+
I.Cancel = I.CanceledError;
|
|
2139
|
+
I.all = function(t) {
|
|
2140
|
+
return Promise.all(t);
|
|
2141
|
+
};
|
|
2142
|
+
I.spread = Js;
|
|
2143
|
+
I.isAxiosError = Ks;
|
|
2144
|
+
I.mergeConfig = Se;
|
|
2145
|
+
I.AxiosHeaders = X;
|
|
2146
|
+
I.formToJSON = (e) => Mn(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
2147
|
+
I.getAdapter = Wn.getAdapter;
|
|
2148
|
+
I.HttpStatusCode = wt;
|
|
2149
|
+
I.default = I;
|
|
2150
|
+
const {
|
|
2151
|
+
Axios: ti,
|
|
2152
|
+
AxiosError: ni,
|
|
2153
|
+
CanceledError: ri,
|
|
2154
|
+
isCancel: si,
|
|
2155
|
+
CancelToken: oi,
|
|
2156
|
+
VERSION: ii,
|
|
2157
|
+
all: ai,
|
|
2158
|
+
Cancel: ci,
|
|
2159
|
+
isAxiosError: li,
|
|
2160
|
+
spread: ui,
|
|
2161
|
+
toFormData: fi,
|
|
2162
|
+
AxiosHeaders: di,
|
|
2163
|
+
HttpStatusCode: pi,
|
|
2164
|
+
formToJSON: hi,
|
|
2165
|
+
getAdapter: mi,
|
|
2166
|
+
mergeConfig: bi
|
|
2167
|
+
} = I;
|
|
2168
|
+
var St = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new WeakMap(), cn = 0, Gs;
|
|
2169
|
+
function Ys(e) {
|
|
2170
|
+
return e ? (qe.has(e) || (cn += 1, qe.set(e, cn.toString())), qe.get(e)) : "0";
|
|
2171
|
+
}
|
|
2172
|
+
function Xs(e) {
|
|
2173
|
+
return Object.keys(e).sort().filter(
|
|
2174
|
+
(t) => e[t] !== void 0
|
|
2175
|
+
).map((t) => `${t}_${t === "root" ? Ys(e.root) : e[t]}`).toString();
|
|
2176
|
+
}
|
|
2177
|
+
function Zs(e) {
|
|
2178
|
+
const t = Xs(e);
|
|
2179
|
+
let n = St.get(t);
|
|
2180
|
+
if (!n) {
|
|
2181
|
+
const r = /* @__PURE__ */ new Map();
|
|
2182
|
+
let s;
|
|
2183
|
+
const o = new IntersectionObserver((i) => {
|
|
2184
|
+
i.forEach((a) => {
|
|
2185
|
+
var p;
|
|
2186
|
+
const f = a.isIntersecting && s.some((u) => a.intersectionRatio >= u);
|
|
2187
|
+
e.trackVisibility && typeof a.isVisible > "u" && (a.isVisible = f), (p = r.get(a.target)) == null || p.forEach((u) => {
|
|
2188
|
+
u(f, a);
|
|
2189
|
+
});
|
|
2190
|
+
});
|
|
2191
|
+
}, e);
|
|
2192
|
+
s = o.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), n = {
|
|
2193
|
+
id: t,
|
|
2194
|
+
observer: o,
|
|
2195
|
+
elements: r
|
|
2196
|
+
}, St.set(t, n);
|
|
2197
|
+
}
|
|
2198
|
+
return n;
|
|
2199
|
+
}
|
|
2200
|
+
function Qs(e, t, n = {}, r = Gs) {
|
|
2201
|
+
if (typeof window.IntersectionObserver > "u" && r !== void 0) {
|
|
2202
|
+
const p = e.getBoundingClientRect();
|
|
2203
|
+
return t(r, {
|
|
2204
|
+
isIntersecting: r,
|
|
2205
|
+
target: e,
|
|
2206
|
+
intersectionRatio: typeof n.threshold == "number" ? n.threshold : 0,
|
|
2207
|
+
time: 0,
|
|
2208
|
+
boundingClientRect: p,
|
|
2209
|
+
intersectionRect: p,
|
|
2210
|
+
rootBounds: p
|
|
2211
|
+
}), () => {
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2214
|
+
const { id: s, observer: o, elements: i } = Zs(n), a = i.get(e) || [];
|
|
2215
|
+
return i.has(e) || i.set(e, a), a.push(t), o.observe(e), function() {
|
|
2216
|
+
a.splice(a.indexOf(t), 1), a.length === 0 && (i.delete(e), o.unobserve(e)), i.size === 0 && (o.disconnect(), St.delete(s));
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
function eo({
|
|
2220
|
+
threshold: e,
|
|
2221
|
+
delay: t,
|
|
2222
|
+
trackVisibility: n,
|
|
2223
|
+
rootMargin: r,
|
|
2224
|
+
root: s,
|
|
2225
|
+
triggerOnce: o,
|
|
2226
|
+
skip: i,
|
|
2227
|
+
initialInView: a,
|
|
2228
|
+
fallbackInView: p,
|
|
2229
|
+
onChange: f
|
|
2230
|
+
} = {}) {
|
|
2231
|
+
var u;
|
|
2232
|
+
const [h, E] = Oe.useState(null), g = Oe.useRef(f), l = Oe.useRef(a), [m, b] = Oe.useState({
|
|
2233
|
+
inView: !!a,
|
|
2234
|
+
entry: void 0
|
|
2235
|
+
});
|
|
2236
|
+
g.current = f, Oe.useEffect(
|
|
2237
|
+
() => {
|
|
2238
|
+
if (l.current === void 0 && (l.current = a), i || !h) return;
|
|
2239
|
+
let j;
|
|
2240
|
+
return j = Qs(
|
|
2241
|
+
h,
|
|
2242
|
+
(x, k) => {
|
|
2243
|
+
const D = l.current;
|
|
2244
|
+
l.current = x, !(D === void 0 && !x) && (b({
|
|
2245
|
+
inView: x,
|
|
2246
|
+
entry: k
|
|
2247
|
+
}), g.current && g.current(x, k), k.isIntersecting && o && j && (j(), j = void 0));
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
root: s,
|
|
2251
|
+
rootMargin: r,
|
|
2252
|
+
threshold: e,
|
|
2253
|
+
// @ts-expect-error
|
|
2254
|
+
trackVisibility: n,
|
|
2255
|
+
delay: t
|
|
2256
|
+
},
|
|
2257
|
+
p
|
|
2258
|
+
), () => {
|
|
2259
|
+
j && j();
|
|
2260
|
+
};
|
|
2261
|
+
},
|
|
2262
|
+
// We break the rule here, because we aren't including the actual `threshold` variable
|
|
2263
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2264
|
+
[
|
|
2265
|
+
// If the threshold is an array, convert it to a string, so it won't change between renders.
|
|
2266
|
+
Array.isArray(e) ? e.toString() : e,
|
|
2267
|
+
h,
|
|
2268
|
+
s,
|
|
2269
|
+
r,
|
|
2270
|
+
o,
|
|
2271
|
+
i,
|
|
2272
|
+
n,
|
|
2273
|
+
p,
|
|
2274
|
+
t
|
|
2275
|
+
]
|
|
2276
|
+
);
|
|
2277
|
+
const R = (u = m.entry) == null ? void 0 : u.target, w = Oe.useRef(void 0);
|
|
2278
|
+
!h && R && !o && !i && w.current !== R && (w.current = R, b({
|
|
2279
|
+
inView: !!a,
|
|
2280
|
+
entry: void 0
|
|
2281
|
+
}), l.current = a);
|
|
2282
|
+
const v = [E, m.inView, m.entry];
|
|
2283
|
+
return v.ref = v[0], v.inView = v[1], v.entry = v[2], v;
|
|
2284
|
+
}
|
|
2285
|
+
var He = { exports: {} }, lt = {};
|
|
2286
|
+
var ln;
|
|
2287
|
+
function to() {
|
|
2288
|
+
if (ln) return lt;
|
|
2289
|
+
ln = 1;
|
|
2290
|
+
var e = Ae;
|
|
2291
|
+
function t(h, E) {
|
|
2292
|
+
return h === E && (h !== 0 || 1 / h === 1 / E) || h !== h && E !== E;
|
|
2293
|
+
}
|
|
2294
|
+
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, s = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
|
|
2295
|
+
function a(h, E) {
|
|
2296
|
+
var g = E(), l = r({ inst: { value: g, getSnapshot: E } }), m = l[0].inst, b = l[1];
|
|
2297
|
+
return o(
|
|
2298
|
+
function() {
|
|
2299
|
+
m.value = g, m.getSnapshot = E, p(m) && b({ inst: m });
|
|
2300
|
+
},
|
|
2301
|
+
[h, g, E]
|
|
2302
|
+
), s(
|
|
2303
|
+
function() {
|
|
2304
|
+
return p(m) && b({ inst: m }), h(function() {
|
|
2305
|
+
p(m) && b({ inst: m });
|
|
2306
|
+
});
|
|
2307
|
+
},
|
|
2308
|
+
[h]
|
|
2309
|
+
), i(g), g;
|
|
2310
|
+
}
|
|
2311
|
+
function p(h) {
|
|
2312
|
+
var E = h.getSnapshot;
|
|
2313
|
+
h = h.value;
|
|
2314
|
+
try {
|
|
2315
|
+
var g = E();
|
|
2316
|
+
return !n(h, g);
|
|
2317
|
+
} catch {
|
|
2318
|
+
return !0;
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
function f(h, E) {
|
|
2322
|
+
return E();
|
|
2323
|
+
}
|
|
2324
|
+
var u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : a;
|
|
2325
|
+
return lt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u, lt;
|
|
2326
|
+
}
|
|
2327
|
+
var ut = {};
|
|
2328
|
+
var un;
|
|
2329
|
+
function no() {
|
|
2330
|
+
return un || (un = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
2331
|
+
function e(g, l) {
|
|
2332
|
+
return g === l && (g !== 0 || 1 / g === 1 / l) || g !== g && l !== l;
|
|
2333
|
+
}
|
|
2334
|
+
function t(g, l) {
|
|
2335
|
+
u || s.startTransition === void 0 || (u = !0, console.error(
|
|
2336
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
2337
|
+
));
|
|
2338
|
+
var m = l();
|
|
2339
|
+
if (!h) {
|
|
2340
|
+
var b = l();
|
|
2341
|
+
o(m, b) || (console.error(
|
|
2342
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
2343
|
+
), h = !0);
|
|
2344
|
+
}
|
|
2345
|
+
b = i({
|
|
2346
|
+
inst: { value: m, getSnapshot: l }
|
|
2347
|
+
});
|
|
2348
|
+
var R = b[0].inst, w = b[1];
|
|
2349
|
+
return p(
|
|
2350
|
+
function() {
|
|
2351
|
+
R.value = m, R.getSnapshot = l, n(R) && w({ inst: R });
|
|
2352
|
+
},
|
|
2353
|
+
[g, m, l]
|
|
2354
|
+
), a(
|
|
2355
|
+
function() {
|
|
2356
|
+
return n(R) && w({ inst: R }), g(function() {
|
|
2357
|
+
n(R) && w({ inst: R });
|
|
2358
|
+
});
|
|
2359
|
+
},
|
|
2360
|
+
[g]
|
|
2361
|
+
), f(m), m;
|
|
2362
|
+
}
|
|
2363
|
+
function n(g) {
|
|
2364
|
+
var l = g.getSnapshot;
|
|
2365
|
+
g = g.value;
|
|
2366
|
+
try {
|
|
2367
|
+
var m = l();
|
|
2368
|
+
return !o(g, m);
|
|
2369
|
+
} catch {
|
|
2370
|
+
return !0;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
function r(g, l) {
|
|
2374
|
+
return l();
|
|
2375
|
+
}
|
|
2376
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
2377
|
+
var s = Ae, o = typeof Object.is == "function" ? Object.is : e, i = s.useState, a = s.useEffect, p = s.useLayoutEffect, f = s.useDebugValue, u = !1, h = !1, E = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
2378
|
+
ut.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : E, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2379
|
+
})()), ut;
|
|
2380
|
+
}
|
|
2381
|
+
var fn;
|
|
2382
|
+
function ro() {
|
|
2383
|
+
return fn || (fn = 1, process.env.NODE_ENV === "production" ? He.exports = to() : He.exports = no()), He.exports;
|
|
2384
|
+
}
|
|
2385
|
+
var dn = ro();
|
|
2386
|
+
const Gn = 0, Yn = 1, Xn = 2, pn = 3;
|
|
2387
|
+
var hn = Object.prototype.hasOwnProperty;
|
|
2388
|
+
function Rt(e, t) {
|
|
2389
|
+
var n, r;
|
|
2390
|
+
if (e === t) return !0;
|
|
2391
|
+
if (e && t && (n = e.constructor) === t.constructor) {
|
|
2392
|
+
if (n === Date) return e.getTime() === t.getTime();
|
|
2393
|
+
if (n === RegExp) return e.toString() === t.toString();
|
|
2394
|
+
if (n === Array) {
|
|
2395
|
+
if ((r = e.length) === t.length)
|
|
2396
|
+
for (; r-- && Rt(e[r], t[r]); ) ;
|
|
2397
|
+
return r === -1;
|
|
2398
|
+
}
|
|
2399
|
+
if (!n || typeof e == "object") {
|
|
2400
|
+
r = 0;
|
|
2401
|
+
for (n in e)
|
|
2402
|
+
if (hn.call(e, n) && ++r && !hn.call(t, n) || !(n in t) || !Rt(e[n], t[n])) return !1;
|
|
2403
|
+
return Object.keys(t).length === r;
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
return e !== e && t !== t;
|
|
2407
|
+
}
|
|
2408
|
+
const ue = /* @__PURE__ */ new WeakMap(), de = () => {
|
|
2409
|
+
}, z = (
|
|
2410
|
+
/*#__NOINLINE__*/
|
|
2411
|
+
de()
|
|
2412
|
+
), _t = Object, C = (e) => e === z, ae = (e) => typeof e == "function", be = (e, t) => ({
|
|
2413
|
+
...e,
|
|
2414
|
+
...t
|
|
2415
|
+
}), Zn = (e) => ae(e.then), ft = {}, We = {}, Lt = "undefined", Me = typeof window != Lt, Ot = typeof document != Lt, so = Me && "Deno" in window, oo = () => Me && typeof window.requestAnimationFrame != Lt, Qn = (e, t) => {
|
|
2416
|
+
const n = ue.get(e);
|
|
2417
|
+
return [
|
|
2418
|
+
// Getter
|
|
2419
|
+
() => !C(t) && e.get(t) || ft,
|
|
2420
|
+
// Setter
|
|
2421
|
+
(r) => {
|
|
2422
|
+
if (!C(t)) {
|
|
2423
|
+
const s = e.get(t);
|
|
2424
|
+
t in We || (We[t] = s), n[5](t, be(s, r), s || ft);
|
|
2425
|
+
}
|
|
2426
|
+
},
|
|
2427
|
+
// Subscriber
|
|
2428
|
+
n[6],
|
|
2429
|
+
// Get server cache snapshot
|
|
2430
|
+
() => !C(t) && t in We ? We[t] : !C(t) && e.get(t) || ft
|
|
2431
|
+
];
|
|
2432
|
+
};
|
|
2433
|
+
let xt = !0;
|
|
2434
|
+
const io = () => xt, [vt, Tt] = Me && window.addEventListener ? [
|
|
2435
|
+
window.addEventListener.bind(window),
|
|
2436
|
+
window.removeEventListener.bind(window)
|
|
2437
|
+
] : [
|
|
2438
|
+
de,
|
|
2439
|
+
de
|
|
2440
|
+
], ao = () => {
|
|
2441
|
+
const e = Ot && document.visibilityState;
|
|
2442
|
+
return C(e) || e !== "hidden";
|
|
2443
|
+
}, co = (e) => (Ot && document.addEventListener("visibilitychange", e), vt("focus", e), () => {
|
|
2444
|
+
Ot && document.removeEventListener("visibilitychange", e), Tt("focus", e);
|
|
2445
|
+
}), lo = (e) => {
|
|
2446
|
+
const t = () => {
|
|
2447
|
+
xt = !0, e();
|
|
2448
|
+
}, n = () => {
|
|
2449
|
+
xt = !1;
|
|
2450
|
+
};
|
|
2451
|
+
return vt("online", t), vt("offline", n), () => {
|
|
2452
|
+
Tt("online", t), Tt("offline", n);
|
|
2453
|
+
};
|
|
2454
|
+
}, uo = {
|
|
2455
|
+
isOnline: io,
|
|
2456
|
+
isVisible: ao
|
|
2457
|
+
}, fo = {
|
|
2458
|
+
initFocus: co,
|
|
2459
|
+
initReconnect: lo
|
|
2460
|
+
}, mn = !Ae.useId, xe = !Me || so, po = (e) => oo() ? window.requestAnimationFrame(e) : setTimeout(e, 1), dt = xe ? fe : lr, pt = typeof navigator < "u" && navigator.connection, bn = !xe && pt && ([
|
|
2461
|
+
"slow-2g",
|
|
2462
|
+
"2g"
|
|
2463
|
+
].includes(pt.effectiveType) || pt.saveData), ze = /* @__PURE__ */ new WeakMap(), ho = (e) => _t.prototype.toString.call(e), ht = (e, t) => e === `[object ${t}]`;
|
|
2464
|
+
let mo = 0;
|
|
2465
|
+
const At = (e) => {
|
|
2466
|
+
const t = typeof e, n = ho(e), r = ht(n, "Date"), s = ht(n, "RegExp"), o = ht(n, "Object");
|
|
2467
|
+
let i, a;
|
|
2468
|
+
if (_t(e) === e && !r && !s) {
|
|
2469
|
+
if (i = ze.get(e), i) return i;
|
|
2470
|
+
if (i = ++mo + "~", ze.set(e, i), Array.isArray(e)) {
|
|
2471
|
+
for (i = "@", a = 0; a < e.length; a++)
|
|
2472
|
+
i += At(e[a]) + ",";
|
|
2473
|
+
ze.set(e, i);
|
|
2474
|
+
}
|
|
2475
|
+
if (o) {
|
|
2476
|
+
i = "#";
|
|
2477
|
+
const p = _t.keys(e).sort();
|
|
2478
|
+
for (; !C(a = p.pop()); )
|
|
2479
|
+
C(e[a]) || (i += a + ":" + At(e[a]) + ",");
|
|
2480
|
+
ze.set(e, i);
|
|
2481
|
+
}
|
|
2482
|
+
} else
|
|
2483
|
+
i = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
|
|
2484
|
+
return i;
|
|
2485
|
+
}, kt = (e) => {
|
|
2486
|
+
if (ae(e))
|
|
2487
|
+
try {
|
|
2488
|
+
e = e();
|
|
2489
|
+
} catch {
|
|
2490
|
+
e = "";
|
|
2491
|
+
}
|
|
2492
|
+
const t = e;
|
|
2493
|
+
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? At(e) : "", [
|
|
2494
|
+
e,
|
|
2495
|
+
t
|
|
2496
|
+
];
|
|
2497
|
+
};
|
|
2498
|
+
let bo = 0;
|
|
2499
|
+
const Nt = () => ++bo;
|
|
2500
|
+
async function er(...e) {
|
|
2501
|
+
const [t, n, r, s] = e, o = be({
|
|
2502
|
+
populateCache: !0,
|
|
2503
|
+
throwOnError: !0
|
|
2504
|
+
}, typeof s == "boolean" ? {
|
|
2505
|
+
revalidate: s
|
|
2506
|
+
} : s || {});
|
|
2507
|
+
let i = o.populateCache;
|
|
2508
|
+
const a = o.rollbackOnError;
|
|
2509
|
+
let p = o.optimisticData;
|
|
2510
|
+
const f = (E) => typeof a == "function" ? a(E) : a !== !1, u = o.throwOnError;
|
|
2511
|
+
if (ae(n)) {
|
|
2512
|
+
const E = n, g = [], l = t.keys();
|
|
2513
|
+
for (const m of l)
|
|
2514
|
+
// Skip the special useSWRInfinite and useSWRSubscription keys.
|
|
2515
|
+
!/^\$(inf|sub)\$/.test(m) && E(t.get(m)._k) && g.push(m);
|
|
2516
|
+
return Promise.all(g.map(h));
|
|
2517
|
+
}
|
|
2518
|
+
return h(n);
|
|
2519
|
+
async function h(E) {
|
|
2520
|
+
const [g] = kt(E);
|
|
2521
|
+
if (!g) return;
|
|
2522
|
+
const [l, m] = Qn(t, g), [b, R, w, v] = ue.get(t), j = () => {
|
|
2523
|
+
const N = b[g];
|
|
2524
|
+
return (ae(o.revalidate) ? o.revalidate(l().data, E) : o.revalidate !== !1) && (delete w[g], delete v[g], N && N[0]) ? N[0](Xn).then(() => l().data) : l().data;
|
|
2525
|
+
};
|
|
2526
|
+
if (e.length < 3)
|
|
2527
|
+
return j();
|
|
2528
|
+
let x = r, k, D = !1;
|
|
2529
|
+
const O = Nt();
|
|
2530
|
+
R[g] = [
|
|
2531
|
+
O,
|
|
2532
|
+
0
|
|
2533
|
+
];
|
|
2534
|
+
const A = !C(p), Z = l(), V = Z.data, q = Z._c, L = C(q) ? V : q;
|
|
2535
|
+
if (A && (p = ae(p) ? p(L, V) : p, m({
|
|
2536
|
+
data: p,
|
|
2537
|
+
_c: L
|
|
2538
|
+
})), ae(x))
|
|
2539
|
+
try {
|
|
2540
|
+
x = x(L);
|
|
2541
|
+
} catch (N) {
|
|
2542
|
+
k = N, D = !0;
|
|
2543
|
+
}
|
|
2544
|
+
if (x && Zn(x))
|
|
2545
|
+
if (x = await x.catch((N) => {
|
|
2546
|
+
k = N, D = !0;
|
|
2547
|
+
}), O !== R[g][0]) {
|
|
2548
|
+
if (D) throw k;
|
|
2549
|
+
return x;
|
|
2550
|
+
} else D && A && f(k) && (i = !0, m({
|
|
2551
|
+
data: L,
|
|
2552
|
+
_c: z
|
|
2553
|
+
}));
|
|
2554
|
+
if (i && !D)
|
|
2555
|
+
if (ae(i)) {
|
|
2556
|
+
const N = i(x, L);
|
|
2557
|
+
m({
|
|
2558
|
+
data: N,
|
|
2559
|
+
error: z,
|
|
2560
|
+
_c: z
|
|
2561
|
+
});
|
|
2562
|
+
} else
|
|
2563
|
+
m({
|
|
2564
|
+
data: x,
|
|
2565
|
+
error: z,
|
|
2566
|
+
_c: z
|
|
2567
|
+
});
|
|
2568
|
+
if (R[g][1] = Nt(), Promise.resolve(j()).then(() => {
|
|
2569
|
+
m({
|
|
2570
|
+
_c: z
|
|
2571
|
+
});
|
|
2572
|
+
}), D) {
|
|
2573
|
+
if (u) throw k;
|
|
2574
|
+
return;
|
|
2575
|
+
}
|
|
2576
|
+
return x;
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
const yn = (e, t) => {
|
|
2580
|
+
for (const n in e)
|
|
2581
|
+
e[n][0] && e[n][0](t);
|
|
2582
|
+
}, yo = (e, t) => {
|
|
2583
|
+
if (!ue.has(e)) {
|
|
2584
|
+
const n = be(fo, t), r = /* @__PURE__ */ Object.create(null), s = er.bind(z, e);
|
|
2585
|
+
let o = de;
|
|
2586
|
+
const i = /* @__PURE__ */ Object.create(null), a = (u, h) => {
|
|
2587
|
+
const E = i[u] || [];
|
|
2588
|
+
return i[u] = E, E.push(h), () => E.splice(E.indexOf(h), 1);
|
|
2589
|
+
}, p = (u, h, E) => {
|
|
2590
|
+
e.set(u, h);
|
|
2591
|
+
const g = i[u];
|
|
2592
|
+
if (g)
|
|
2593
|
+
for (const l of g)
|
|
2594
|
+
l(h, E);
|
|
2595
|
+
}, f = () => {
|
|
2596
|
+
if (!ue.has(e) && (ue.set(e, [
|
|
2597
|
+
r,
|
|
2598
|
+
/* @__PURE__ */ Object.create(null),
|
|
2599
|
+
/* @__PURE__ */ Object.create(null),
|
|
2600
|
+
/* @__PURE__ */ Object.create(null),
|
|
2601
|
+
s,
|
|
2602
|
+
p,
|
|
2603
|
+
a
|
|
2604
|
+
]), !xe)) {
|
|
2605
|
+
const u = n.initFocus(setTimeout.bind(z, yn.bind(z, r, Gn))), h = n.initReconnect(setTimeout.bind(z, yn.bind(z, r, Yn)));
|
|
2606
|
+
o = () => {
|
|
2607
|
+
u && u(), h && h(), ue.delete(e);
|
|
2608
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
};
|
|
2611
|
+
return f(), [
|
|
2612
|
+
e,
|
|
2613
|
+
s,
|
|
2614
|
+
f,
|
|
2615
|
+
o
|
|
2616
|
+
];
|
|
2617
|
+
}
|
|
2618
|
+
return [
|
|
2619
|
+
e,
|
|
2620
|
+
ue.get(e)[4]
|
|
2621
|
+
];
|
|
2622
|
+
}, Eo = (e, t, n, r, s) => {
|
|
2623
|
+
const o = n.errorRetryCount, i = s.retryCount, a = ~~((Math.random() + 0.5) * (1 << (i < 8 ? i : 8))) * n.errorRetryInterval;
|
|
2624
|
+
!C(o) && i > o || setTimeout(r, a, s);
|
|
2625
|
+
}, go = Rt, [tr, wo] = yo(/* @__PURE__ */ new Map()), So = be(
|
|
2626
|
+
{
|
|
2627
|
+
// events
|
|
2628
|
+
onLoadingSlow: de,
|
|
2629
|
+
onSuccess: de,
|
|
2630
|
+
onError: de,
|
|
2631
|
+
onErrorRetry: Eo,
|
|
2632
|
+
onDiscarded: de,
|
|
2633
|
+
// switches
|
|
2634
|
+
revalidateOnFocus: !0,
|
|
2635
|
+
revalidateOnReconnect: !0,
|
|
2636
|
+
revalidateIfStale: !0,
|
|
2637
|
+
shouldRetryOnError: !0,
|
|
2638
|
+
// timeouts
|
|
2639
|
+
errorRetryInterval: bn ? 1e4 : 5e3,
|
|
2640
|
+
focusThrottleInterval: 5 * 1e3,
|
|
2641
|
+
dedupingInterval: 2 * 1e3,
|
|
2642
|
+
loadingTimeout: bn ? 5e3 : 3e3,
|
|
2643
|
+
// providers
|
|
2644
|
+
compare: go,
|
|
2645
|
+
isPaused: () => !1,
|
|
2646
|
+
cache: tr,
|
|
2647
|
+
mutate: wo,
|
|
2648
|
+
fallback: {}
|
|
2649
|
+
},
|
|
2650
|
+
// use web preset by default
|
|
2651
|
+
uo
|
|
2652
|
+
), Ro = (e, t) => {
|
|
2653
|
+
const n = be(e, t);
|
|
2654
|
+
if (t) {
|
|
2655
|
+
const { use: r, fallback: s } = e, { use: o, fallback: i } = t;
|
|
2656
|
+
r && o && (n.use = r.concat(o)), s && i && (n.fallback = be(s, i));
|
|
2657
|
+
}
|
|
2658
|
+
return n;
|
|
2659
|
+
}, _o = cr({}), Oo = "$inf$", nr = Me && window.__SWR_DEVTOOLS_USE__, xo = nr ? window.__SWR_DEVTOOLS_USE__ : [], vo = () => {
|
|
2660
|
+
nr && (window.__SWR_DEVTOOLS_REACT__ = Ae);
|
|
2661
|
+
}, To = (e) => ae(e[1]) ? [
|
|
2662
|
+
e[0],
|
|
2663
|
+
e[1],
|
|
2664
|
+
e[2] || {}
|
|
2665
|
+
] : [
|
|
2666
|
+
e[0],
|
|
2667
|
+
null,
|
|
2668
|
+
(e[1] === null ? e[2] : e[1]) || {}
|
|
2669
|
+
], Ao = () => {
|
|
2670
|
+
const e = ur(_o);
|
|
2671
|
+
return On(() => be(So, e), [
|
|
2672
|
+
e
|
|
2673
|
+
]);
|
|
2674
|
+
}, No = (e) => (t, n, r) => e(t, n && ((...o) => {
|
|
2675
|
+
const [i] = kt(t), [, , , a] = ue.get(tr);
|
|
2676
|
+
if (i.startsWith(Oo))
|
|
2677
|
+
return n(...o);
|
|
2678
|
+
const p = a[i];
|
|
2679
|
+
return C(p) ? n(...o) : (delete a[i], p);
|
|
2680
|
+
}), r), Co = xo.concat(No), jo = (e) => function(...n) {
|
|
2681
|
+
const r = Ao(), [s, o, i] = To(n), a = Ro(r, i);
|
|
2682
|
+
let p = e;
|
|
2683
|
+
const { use: f } = a, u = (f || []).concat(Co);
|
|
2684
|
+
for (let h = u.length; h--; )
|
|
2685
|
+
p = u[h](p);
|
|
2686
|
+
return p(s, o || a.fetcher || null, a);
|
|
2687
|
+
}, Do = (e, t, n) => {
|
|
2688
|
+
const r = t[e] || (t[e] = []);
|
|
2689
|
+
return r.push(n), () => {
|
|
2690
|
+
const s = r.indexOf(n);
|
|
2691
|
+
s >= 0 && (r[s] = r[r.length - 1], r.pop());
|
|
2692
|
+
};
|
|
2693
|
+
};
|
|
2694
|
+
vo();
|
|
2695
|
+
const mt = Ae.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
|
2696
|
+
// and emitting an error.
|
|
2697
|
+
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
|
2698
|
+
// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
|
|
2699
|
+
((e) => {
|
|
2700
|
+
switch (e.status) {
|
|
2701
|
+
case "pending":
|
|
2702
|
+
throw e;
|
|
2703
|
+
case "fulfilled":
|
|
2704
|
+
return e.value;
|
|
2705
|
+
case "rejected":
|
|
2706
|
+
throw e.reason;
|
|
2707
|
+
default:
|
|
2708
|
+
throw e.status = "pending", e.then((t) => {
|
|
2709
|
+
e.status = "fulfilled", e.value = t;
|
|
2710
|
+
}, (t) => {
|
|
2711
|
+
e.status = "rejected", e.reason = t;
|
|
2712
|
+
}), e;
|
|
2713
|
+
}
|
|
2714
|
+
}), bt = {
|
|
2715
|
+
dedupe: !0
|
|
2716
|
+
}, En = Promise.resolve(z), Po = (e, t, n) => {
|
|
2717
|
+
const { cache: r, compare: s, suspense: o, fallbackData: i, revalidateOnMount: a, revalidateIfStale: p, refreshInterval: f, refreshWhenHidden: u, refreshWhenOffline: h, keepPreviousData: E, strictServerPrefetchWarning: g } = n, [l, m, b, R] = ue.get(r), [w, v] = kt(e), j = Ee(!1), x = Ee(!1), k = Ee(w), D = Ee(t), O = Ee(n), A = () => O.current, Z = () => A().isVisible() && A().isOnline(), [V, q, L, N] = Qn(r, w), Q = Ee({}).current, H = C(i) ? C(n.fallback) ? z : n.fallback[w] : i, pe = (U, M) => {
|
|
2718
|
+
for (const $ in Q) {
|
|
2719
|
+
const B = $;
|
|
2720
|
+
if (B === "data") {
|
|
2721
|
+
if (!s(U[B], M[B]) && (!C(U[B]) || !s(he, M[B])))
|
|
2722
|
+
return !1;
|
|
2723
|
+
} else if (M[B] !== U[B])
|
|
2724
|
+
return !1;
|
|
2725
|
+
}
|
|
2726
|
+
return !0;
|
|
2727
|
+
}, G = On(() => {
|
|
2728
|
+
const U = !w || !t ? !1 : C(a) ? A().isPaused() || o ? !1 : p !== !1 : a, M = (K) => {
|
|
2729
|
+
const ce = be(K);
|
|
2730
|
+
return delete ce._k, U ? {
|
|
2731
|
+
isValidating: !0,
|
|
2732
|
+
isLoading: !0,
|
|
2733
|
+
...ce
|
|
2734
|
+
} : ce;
|
|
2735
|
+
}, $ = V(), B = N(), re = M($), _e = $ === B ? re : M(B);
|
|
2736
|
+
let W = re;
|
|
2737
|
+
return [
|
|
2738
|
+
() => {
|
|
2739
|
+
const K = M(V());
|
|
2740
|
+
return pe(K, W) ? (W.data = K.data, W.isLoading = K.isLoading, W.isValidating = K.isValidating, W.error = K.error, W) : (W = K, K);
|
|
2741
|
+
},
|
|
2742
|
+
() => _e
|
|
2743
|
+
];
|
|
2744
|
+
}, [
|
|
2745
|
+
r,
|
|
2746
|
+
w
|
|
2747
|
+
]), ee = dn.useSyncExternalStore(st(
|
|
2748
|
+
(U) => L(w, (M, $) => {
|
|
2749
|
+
pe($, M) || U();
|
|
2750
|
+
}),
|
|
2751
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2752
|
+
[
|
|
2753
|
+
r,
|
|
2754
|
+
w
|
|
2755
|
+
]
|
|
2756
|
+
), G[0], G[1]), ye = !j.current, d = l[w] && l[w].length > 0, S = ee.data, T = C(S) ? H && Zn(H) ? mt(H) : H : S, P = ee.error, ne = Ee(T), he = E ? C(S) ? C(ne.current) ? T : ne.current : S : T, F = w && C(T), me = !xe && // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2757
|
+
dn.useSyncExternalStore(() => de, () => !1, () => !0);
|
|
2758
|
+
g && me && !o && F && console.warn(`Missing pre-initiated data for serialized key "${w}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);
|
|
2759
|
+
const Re = d && !C(P) ? !1 : ye && !C(a) ? a : A().isPaused() ? !1 : o ? C(T) ? !1 : p : C(T) || p, Be = !!(w && t && ye && Re), sr = C(ee.isValidating) ? Be : ee.isValidating, or = C(ee.isLoading) ? Be : ee.isLoading, je = st(
|
|
2760
|
+
async (U) => {
|
|
2761
|
+
const M = D.current;
|
|
2762
|
+
if (!w || !M || x.current || A().isPaused())
|
|
2763
|
+
return !1;
|
|
2764
|
+
let $, B, re = !0;
|
|
2765
|
+
const _e = U || {}, W = !b[w] || !_e.dedupe, K = () => mn ? !x.current && w === k.current && j.current : w === k.current, ce = {
|
|
2766
|
+
isValidating: !1,
|
|
2767
|
+
isLoading: !1
|
|
2768
|
+
}, Ut = () => {
|
|
2769
|
+
q(ce);
|
|
2770
|
+
}, Mt = () => {
|
|
2771
|
+
const te = b[w];
|
|
2772
|
+
te && te[1] === B && delete b[w];
|
|
2773
|
+
}, Bt = {
|
|
2774
|
+
isValidating: !0
|
|
2775
|
+
};
|
|
2776
|
+
C(V().data) && (Bt.isLoading = !0);
|
|
2777
|
+
try {
|
|
2778
|
+
if (W && (q(Bt), n.loadingTimeout && C(V().data) && setTimeout(() => {
|
|
2779
|
+
re && K() && A().onLoadingSlow(w, n);
|
|
2780
|
+
}, n.loadingTimeout), b[w] = [
|
|
2781
|
+
M(v),
|
|
2782
|
+
Nt()
|
|
2783
|
+
]), [$, B] = b[w], $ = await $, W && setTimeout(Mt, n.dedupingInterval), !b[w] || b[w][1] !== B)
|
|
2784
|
+
return W && K() && A().onDiscarded(w), !1;
|
|
2785
|
+
ce.error = z;
|
|
2786
|
+
const te = m[w];
|
|
2787
|
+
if (!C(te) && // case 1
|
|
2788
|
+
(B <= te[0] || // case 2
|
|
2789
|
+
B <= te[1] || // case 3
|
|
2790
|
+
te[1] === 0))
|
|
2791
|
+
return Ut(), W && K() && A().onDiscarded(w), !1;
|
|
2792
|
+
const le = V().data;
|
|
2793
|
+
ce.data = s(le, $) ? le : $, W && K() && A().onSuccess($, w, n);
|
|
2794
|
+
} catch (te) {
|
|
2795
|
+
Mt();
|
|
2796
|
+
const le = A(), { shouldRetryOnError: nt } = le;
|
|
2797
|
+
le.isPaused() || (ce.error = te, W && K() && (le.onError(te, w, le), (nt === !0 || ae(nt) && nt(te)) && (!A().revalidateOnFocus || !A().revalidateOnReconnect || Z()) && le.onErrorRetry(te, w, le, (ir) => {
|
|
2798
|
+
const rt = l[w];
|
|
2799
|
+
rt && rt[0] && rt[0](pn, ir);
|
|
2800
|
+
}, {
|
|
2801
|
+
retryCount: (_e.retryCount || 0) + 1,
|
|
2802
|
+
dedupe: !0
|
|
2803
|
+
})));
|
|
2804
|
+
}
|
|
2805
|
+
return re = !1, Ut(), !0;
|
|
2806
|
+
},
|
|
2807
|
+
// `setState` is immutable, and `eventsCallback`, `fnArg`, and
|
|
2808
|
+
// `keyValidating` are depending on `key`, so we can exclude them from
|
|
2809
|
+
// the deps array.
|
|
2810
|
+
//
|
|
2811
|
+
// FIXME:
|
|
2812
|
+
// `fn` and `config` might be changed during the lifecycle,
|
|
2813
|
+
// but they might be changed every render like this.
|
|
2814
|
+
// `useSWR('key', () => fetch('/api/'), { suspense: true })`
|
|
2815
|
+
// So we omit the values from the deps array
|
|
2816
|
+
// even though it might cause unexpected behaviors.
|
|
2817
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2818
|
+
[
|
|
2819
|
+
w,
|
|
2820
|
+
r
|
|
2821
|
+
]
|
|
2822
|
+
), It = st(
|
|
2823
|
+
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
2824
|
+
(...U) => er(r, k.current, ...U),
|
|
2825
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2826
|
+
[]
|
|
2827
|
+
);
|
|
2828
|
+
if (dt(() => {
|
|
2829
|
+
D.current = t, O.current = n, C(S) || (ne.current = S);
|
|
2830
|
+
}), dt(() => {
|
|
2831
|
+
if (!w) return;
|
|
2832
|
+
const U = je.bind(z, bt);
|
|
2833
|
+
let M = 0;
|
|
2834
|
+
A().revalidateOnFocus && (M = Date.now() + A().focusThrottleInterval);
|
|
2835
|
+
const B = Do(w, l, (re, _e = {}) => {
|
|
2836
|
+
if (re == Gn) {
|
|
2837
|
+
const W = Date.now();
|
|
2838
|
+
A().revalidateOnFocus && W > M && Z() && (M = W + A().focusThrottleInterval, U());
|
|
2839
|
+
} else if (re == Yn)
|
|
2840
|
+
A().revalidateOnReconnect && Z() && U();
|
|
2841
|
+
else {
|
|
2842
|
+
if (re == Xn)
|
|
2843
|
+
return je();
|
|
2844
|
+
if (re == pn)
|
|
2845
|
+
return je(_e);
|
|
2846
|
+
}
|
|
2847
|
+
});
|
|
2848
|
+
return x.current = !1, k.current = w, j.current = !0, q({
|
|
2849
|
+
_k: v
|
|
2850
|
+
}), Re && (b[w] || (C(T) || xe ? U() : po(U))), () => {
|
|
2851
|
+
x.current = !0, B();
|
|
2852
|
+
};
|
|
2853
|
+
}, [
|
|
2854
|
+
w
|
|
2855
|
+
]), dt(() => {
|
|
2856
|
+
let U;
|
|
2857
|
+
function M() {
|
|
2858
|
+
const B = ae(f) ? f(V().data) : f;
|
|
2859
|
+
B && U !== -1 && (U = setTimeout($, B));
|
|
2860
|
+
}
|
|
2861
|
+
function $() {
|
|
2862
|
+
!V().error && (u || A().isVisible()) && (h || A().isOnline()) ? je(bt).then(M) : M();
|
|
2863
|
+
}
|
|
2864
|
+
return M(), () => {
|
|
2865
|
+
U && (clearTimeout(U), U = -1);
|
|
2866
|
+
};
|
|
2867
|
+
}, [
|
|
2868
|
+
f,
|
|
2869
|
+
u,
|
|
2870
|
+
h,
|
|
2871
|
+
w
|
|
2872
|
+
]), fr(he), o) {
|
|
2873
|
+
if (!mn && xe && F)
|
|
2874
|
+
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
2875
|
+
F && (D.current = t, O.current = n, x.current = !1);
|
|
2876
|
+
const U = R[w], M = !C(U) && F ? It(U) : En;
|
|
2877
|
+
if (mt(M), !C(P) && F)
|
|
2878
|
+
throw P;
|
|
2879
|
+
const $ = F ? je(bt) : En;
|
|
2880
|
+
!C(he) && F && ($.status = "fulfilled", $.value = !0), mt($);
|
|
2881
|
+
}
|
|
2882
|
+
return {
|
|
2883
|
+
mutate: It,
|
|
2884
|
+
get data() {
|
|
2885
|
+
return Q.data = !0, he;
|
|
2886
|
+
},
|
|
2887
|
+
get error() {
|
|
2888
|
+
return Q.error = !0, P;
|
|
2889
|
+
},
|
|
2890
|
+
get isValidating() {
|
|
2891
|
+
return Q.isValidating = !0, sr;
|
|
2892
|
+
},
|
|
2893
|
+
get isLoading() {
|
|
2894
|
+
return Q.isLoading = !0, or;
|
|
2895
|
+
}
|
|
2896
|
+
};
|
|
2897
|
+
}, Ft = jo(Po), Lo = async (e) => {
|
|
2898
|
+
if (process.env.NODE_ENV === "development")
|
|
2899
|
+
try {
|
|
2900
|
+
return (await I.get(`http://localhost:3001/api/ads/${e.ad_id}`, {
|
|
2901
|
+
params: {
|
|
2902
|
+
ad_id: e.ad_id
|
|
2903
|
+
}
|
|
2904
|
+
})).data.result;
|
|
2905
|
+
} catch {
|
|
2906
|
+
}
|
|
2907
|
+
return I.get(e.url, {
|
|
2908
|
+
params: {
|
|
2909
|
+
ad_id: e.ad_id
|
|
2910
|
+
}
|
|
2911
|
+
}).then((t) => t.data.result);
|
|
2912
|
+
}, ko = 60, Fo = {
|
|
2913
|
+
dedupingInterval: 1e3 * 60 * ko
|
|
2914
|
+
// keepPreviousData: true,
|
|
2915
|
+
// fallbackData: []
|
|
2916
|
+
}, Io = (e) => {
|
|
2917
|
+
const { data: t, error: n, isLoading: r, mutate: s } = Ft(
|
|
2918
|
+
e ? {
|
|
2919
|
+
url: `https://articles.media/api/ads/${e}`,
|
|
2920
|
+
ad_id: e
|
|
2921
|
+
} : null,
|
|
2922
|
+
Lo,
|
|
2923
|
+
Fo
|
|
2924
|
+
);
|
|
2925
|
+
return {
|
|
2926
|
+
data: t,
|
|
2927
|
+
error: n,
|
|
2928
|
+
isLoading: r,
|
|
2929
|
+
mutate: s
|
|
2930
|
+
};
|
|
2931
|
+
}, rr = 6e4, gn = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
2932
|
+
function Uo(e, t) {
|
|
2933
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && gn in e ? e[gn](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
2934
|
+
}
|
|
2935
|
+
function wn(e, t) {
|
|
2936
|
+
return Uo(e, e);
|
|
2937
|
+
}
|
|
2938
|
+
function Mo(e) {
|
|
2939
|
+
return (t) => {
|
|
2940
|
+
const r = (e ? Math[e] : Math.trunc)(t);
|
|
2941
|
+
return r === 0 ? 0 : r;
|
|
2942
|
+
};
|
|
2943
|
+
}
|
|
2944
|
+
function Bo(e, t) {
|
|
2945
|
+
return +wn(e) - +wn(t);
|
|
2946
|
+
}
|
|
2947
|
+
function Sn(e, t, n) {
|
|
2948
|
+
const r = Bo(e, t) / rr;
|
|
2949
|
+
return Mo(n?.roundingMethod)(r);
|
|
2950
|
+
}
|
|
2951
|
+
function Rn(e) {
|
|
2952
|
+
return Math.trunc(e * rr);
|
|
2953
|
+
}
|
|
2954
|
+
const $o = async (e) => {
|
|
2955
|
+
if (process.env.NODE_ENV === "development")
|
|
2956
|
+
try {
|
|
2957
|
+
return (await I.get("http://localhost:3001/api/ads", {
|
|
2958
|
+
params: {
|
|
2959
|
+
// ad_id: data.ad_id
|
|
2960
|
+
}
|
|
2961
|
+
})).data;
|
|
2962
|
+
} catch {
|
|
2963
|
+
}
|
|
2964
|
+
return I.get(e.url, {
|
|
2965
|
+
params: {
|
|
2966
|
+
// ad_id: data.ad_id
|
|
2967
|
+
}
|
|
2968
|
+
}).then((t) => t.data);
|
|
2969
|
+
}, _n = 60, Vo = {
|
|
2970
|
+
dedupingInterval: Rn(_n),
|
|
2971
|
+
focusThrottleInterval: Rn(_n)
|
|
2972
|
+
// keepPreviousData: true,
|
|
2973
|
+
// fallbackData: []
|
|
2974
|
+
}, qo = (e) => {
|
|
2975
|
+
const { data: t, error: n, isLoading: r, mutate: s } = Ft(
|
|
2976
|
+
{
|
|
2977
|
+
url: "https://articles.media/api/ads"
|
|
2978
|
+
// ad_id
|
|
2979
|
+
},
|
|
2980
|
+
$o,
|
|
2981
|
+
Vo
|
|
2982
|
+
);
|
|
2983
|
+
return {
|
|
2984
|
+
data: t,
|
|
2985
|
+
error: n,
|
|
2986
|
+
isLoading: r,
|
|
2987
|
+
mutate: s
|
|
2988
|
+
};
|
|
2989
|
+
};
|
|
2990
|
+
function Ho(e, t) {
|
|
2991
|
+
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
2992
|
+
}
|
|
2993
|
+
function Wo(e) {
|
|
2994
|
+
const n = [], {
|
|
2995
|
+
data: r
|
|
2996
|
+
} = qo();
|
|
2997
|
+
let { previewMode: s } = e, o = e.previewData || {};
|
|
2998
|
+
const [i, a] = se(null), [p, f] = se(null), [u, h] = se(null), [E, g] = se(null), [l, m] = se(0), [b, R] = se(!1), [w, v] = se(!1), [j, x] = se(/* @__PURE__ */ new Date()), [k, D] = se([]), { data: O } = Io(i);
|
|
2999
|
+
fe(() => {
|
|
3000
|
+
r && r?.length > 0 && !i && (console.log("Ad Mounted or reduxAds changed"), a(e.ad_id || r[Ho(0, r?.length - 1)]?._id));
|
|
3001
|
+
}, [r]), fe(() => {
|
|
3002
|
+
}, [O]), fe(() => {
|
|
3003
|
+
O?.populated_promos && l >= 0 && g(O?.populated_promos[l]);
|
|
3004
|
+
}, [l, O]);
|
|
3005
|
+
function A() {
|
|
3006
|
+
v(!w);
|
|
3007
|
+
}
|
|
3008
|
+
const { ref: Z, inView: V } = eo({
|
|
3009
|
+
/* Optional options */
|
|
3010
|
+
threshold: 0,
|
|
3011
|
+
triggerOnce: !0
|
|
3012
|
+
});
|
|
3013
|
+
function q(L) {
|
|
3014
|
+
if (s && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), k.find((N) => N == L)) {
|
|
3015
|
+
console.log("Already logged this event");
|
|
3016
|
+
return;
|
|
3017
|
+
}
|
|
3018
|
+
I.get("/api/ads/event", {
|
|
3019
|
+
params: {
|
|
3020
|
+
ad_id: O?._id,
|
|
3021
|
+
event: L
|
|
3022
|
+
}
|
|
3023
|
+
}).then(function(N) {
|
|
3024
|
+
D([...k, L]), console.log(N.data);
|
|
3025
|
+
}).catch(function(N) {
|
|
3026
|
+
console.log(N);
|
|
3027
|
+
});
|
|
3028
|
+
}
|
|
3029
|
+
return fe(() => {
|
|
3030
|
+
if (!s && (console.log("inView", V), V && i)) {
|
|
3031
|
+
let L = [
|
|
3032
|
+
{
|
|
3033
|
+
ad_id: i,
|
|
3034
|
+
date: (/* @__PURE__ */ new Date()).toString()
|
|
3035
|
+
},
|
|
3036
|
+
...n.filter((N) => {
|
|
3037
|
+
if (console.log(
|
|
3038
|
+
Sn(/* @__PURE__ */ new Date(), new Date(N.date))
|
|
3039
|
+
), Sn(/* @__PURE__ */ new Date(), new Date(N.date)) > 5) {
|
|
3040
|
+
console.log("adsViewed - Remove Old Ad View Object");
|
|
3041
|
+
return;
|
|
3042
|
+
} else
|
|
3043
|
+
return console.log("adsViewed - Keep Ad View Object"), N;
|
|
3044
|
+
})
|
|
3045
|
+
];
|
|
3046
|
+
console.log("unexpiredRecentViews", L);
|
|
3047
|
+
}
|
|
3048
|
+
}, [V, i]), /* @__PURE__ */ y.jsxs(
|
|
3049
|
+
"div",
|
|
3050
|
+
{
|
|
3051
|
+
ref: Z,
|
|
3052
|
+
className: "ad-wrap",
|
|
3053
|
+
style: {
|
|
3054
|
+
"--articles-ad-background-color": o.background_color || O?.background_color,
|
|
3055
|
+
"--articles-ad-font-color": o.font_color || O?.font_color,
|
|
3056
|
+
"--articles-ad-border-color": o.border_color || O?.border_color
|
|
3057
|
+
},
|
|
3058
|
+
children: [
|
|
3059
|
+
/* @__PURE__ */ y.jsx(
|
|
3060
|
+
"div",
|
|
3061
|
+
{
|
|
3062
|
+
className: "ad",
|
|
3063
|
+
children: /* @__PURE__ */ y.jsxs(
|
|
3064
|
+
"div",
|
|
3065
|
+
{
|
|
3066
|
+
className: "main-panel",
|
|
3067
|
+
children: [
|
|
3068
|
+
/* @__PURE__ */ y.jsx("div", { className: "ad-warning flex-header", children: /* @__PURE__ */ y.jsxs("div", { className: "", children: [
|
|
3069
|
+
O?.city && "Local",
|
|
3070
|
+
" Advertisement"
|
|
3071
|
+
] }) }),
|
|
3072
|
+
/* @__PURE__ */ y.jsxs("div", { className: "content-wrap", children: [
|
|
3073
|
+
/* @__PURE__ */ y.jsxs("div", { className: "photo-banner", children: [
|
|
3074
|
+
/* @__PURE__ */ y.jsx("div", { className: "logo", children: (o.logo?.location || O?.logo?.location) && /* @__PURE__ */ y.jsx(
|
|
3075
|
+
"img",
|
|
3076
|
+
{
|
|
3077
|
+
src: o?.logo?.key ? `${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}` : `${process.env.NEXT_PUBLIC_CDN}${O?.logo?.key}`,
|
|
3078
|
+
alt: ""
|
|
3079
|
+
}
|
|
3080
|
+
) }),
|
|
3081
|
+
/* @__PURE__ */ y.jsx("div", { className: "icon d-none", children: /* @__PURE__ */ y.jsx("i", { className: "fas fa-mug-hot" }) }),
|
|
3082
|
+
/* @__PURE__ */ y.jsx(
|
|
3083
|
+
"img",
|
|
3084
|
+
{
|
|
3085
|
+
className: "photo",
|
|
3086
|
+
src: o?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${o.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${O?.background?.key}`,
|
|
3087
|
+
alt: ""
|
|
3088
|
+
}
|
|
3089
|
+
)
|
|
3090
|
+
] }),
|
|
3091
|
+
/* @__PURE__ */ y.jsxs("div", { className: "details-wrap", children: [
|
|
3092
|
+
/* @__PURE__ */ y.jsxs("div", { className: "detail-title", children: [
|
|
3093
|
+
/* @__PURE__ */ y.jsx("div", { className: "detail", children: /* @__PURE__ */ y.jsx("span", { className: "h4", children: o?.business || O?.business }) }),
|
|
3094
|
+
/* @__PURE__ */ y.jsxs("div", { className: "flex flex-column d-none", children: [
|
|
3095
|
+
/* @__PURE__ */ y.jsxs("div", { className: "detail", children: [
|
|
3096
|
+
/* @__PURE__ */ y.jsx("span", { className: "icon", children: /* @__PURE__ */ y.jsx("i", { className: "fas fa-search-location" }) }),
|
|
3097
|
+
/* @__PURE__ */ y.jsxs("span", { children: [
|
|
3098
|
+
O?.city,
|
|
3099
|
+
", ",
|
|
3100
|
+
O?.state
|
|
3101
|
+
] })
|
|
3102
|
+
] }),
|
|
3103
|
+
/* @__PURE__ */ y.jsxs("div", { className: "detail", children: [
|
|
3104
|
+
/* @__PURE__ */ y.jsx("span", { className: "icon", children: /* @__PURE__ */ y.jsx("i", { className: "fas fa-clock me-2" }) }),
|
|
3105
|
+
/* @__PURE__ */ y.jsx("span", { children: "6:30AM–8PM" })
|
|
3106
|
+
] })
|
|
3107
|
+
] })
|
|
3108
|
+
] }),
|
|
3109
|
+
O?.city && /* @__PURE__ */ y.jsx("div", { className: "details mb-3 d-none" }),
|
|
3110
|
+
/* @__PURE__ */ y.jsx("div", { className: "short-description", children: o?.description || O?.description })
|
|
3111
|
+
] })
|
|
3112
|
+
] }),
|
|
3113
|
+
(!1)?.roles?.isDev && O?.populated_promos?.length > 0 && /* @__PURE__ */ y.jsxs("div", { children: [
|
|
3114
|
+
E && /* @__PURE__ */ y.jsx("div", { className: "promos-wrap", children: E && /* @__PURE__ */ y.jsxs(
|
|
3115
|
+
"div",
|
|
3116
|
+
{
|
|
3117
|
+
className: "promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",
|
|
3118
|
+
children: [
|
|
3119
|
+
/* @__PURE__ */ y.jsxs("div", { className: "", children: [
|
|
3120
|
+
/* @__PURE__ */ y.jsx("div", { children: E.title }),
|
|
3121
|
+
/* @__PURE__ */ y.jsx("div", { className: "small", children: /* @__PURE__ */ y.jsx("div", { className: "small", children: E.details }) })
|
|
3122
|
+
] }),
|
|
3123
|
+
/* @__PURE__ */ y.jsx(
|
|
3124
|
+
ve,
|
|
3125
|
+
{
|
|
3126
|
+
className: "px-3",
|
|
3127
|
+
small: !0,
|
|
3128
|
+
onClick: () => {
|
|
3129
|
+
console.log("Load Save Modal"), R(!0);
|
|
3130
|
+
},
|
|
3131
|
+
children: "Save"
|
|
3132
|
+
}
|
|
3133
|
+
)
|
|
3134
|
+
]
|
|
3135
|
+
},
|
|
3136
|
+
E._id
|
|
3137
|
+
) }),
|
|
3138
|
+
/* @__PURE__ */ y.jsxs("div", { className: "d-flex justify-content-between", children: [
|
|
3139
|
+
/* @__PURE__ */ y.jsxs("div", { className: "px-2", children: [
|
|
3140
|
+
O?.populated_promos?.length,
|
|
3141
|
+
" Promos Active"
|
|
3142
|
+
] }),
|
|
3143
|
+
/* @__PURE__ */ y.jsxs("div", { className: "controls", children: [
|
|
3144
|
+
/* @__PURE__ */ y.jsx(
|
|
3145
|
+
"i",
|
|
3146
|
+
{
|
|
3147
|
+
className: "fad fa-arrow-circle-left",
|
|
3148
|
+
type: "button",
|
|
3149
|
+
onClick: () => {
|
|
3150
|
+
l == 0 ? m(O?.populated_promos?.length - 1) : m((L) => L - 1);
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
),
|
|
3154
|
+
O?.populated_promos?.map(
|
|
3155
|
+
(L, N) => /* @__PURE__ */ y.jsx(
|
|
3156
|
+
"i",
|
|
3157
|
+
{
|
|
3158
|
+
className: `fa-square ${N == l ? "fad" : "fas"}`
|
|
3159
|
+
},
|
|
3160
|
+
L._id
|
|
3161
|
+
)
|
|
3162
|
+
),
|
|
3163
|
+
/* @__PURE__ */ y.jsx(
|
|
3164
|
+
"i",
|
|
3165
|
+
{
|
|
3166
|
+
className: "fad fa-arrow-circle-right",
|
|
3167
|
+
type: "button",
|
|
3168
|
+
onClick: () => {
|
|
3169
|
+
l == O?.populated_promos?.length - 1 ? m(0) : m((L) => L + 1);
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
)
|
|
3173
|
+
] })
|
|
3174
|
+
] })
|
|
3175
|
+
] }),
|
|
3176
|
+
/* @__PURE__ */ y.jsx("hr", { style: { borderColor: "white" }, className: "mt-auto mb-0" }),
|
|
3177
|
+
/* @__PURE__ */ y.jsxs("div", { className: "action-wrap d-flex justify-content-lg-between px-3 py-2", children: [
|
|
3178
|
+
/* @__PURE__ */ y.jsx(
|
|
3179
|
+
"div",
|
|
3180
|
+
{
|
|
3181
|
+
onClick: () => {
|
|
3182
|
+
A(), q("Details");
|
|
3183
|
+
},
|
|
3184
|
+
className: "action flex-grow-1 flex-shrink-0",
|
|
3185
|
+
children: "Details"
|
|
3186
|
+
}
|
|
3187
|
+
),
|
|
3188
|
+
/* @__PURE__ */ y.jsx("span", { className: "px-4" }),
|
|
3189
|
+
/* @__PURE__ */ y.jsx(
|
|
3190
|
+
"a",
|
|
3191
|
+
{
|
|
3192
|
+
className: "action flex-grow-1 flex-shrink-0",
|
|
3193
|
+
href: O?.website,
|
|
3194
|
+
target: "_blank",
|
|
3195
|
+
rel: "noreferrer",
|
|
3196
|
+
onClick: () => q("Website"),
|
|
3197
|
+
children: /* @__PURE__ */ y.jsx("div", { children: "Website" })
|
|
3198
|
+
}
|
|
3199
|
+
)
|
|
3200
|
+
] })
|
|
3201
|
+
]
|
|
3202
|
+
}
|
|
3203
|
+
)
|
|
3204
|
+
}
|
|
3205
|
+
),
|
|
3206
|
+
!s && /* @__PURE__ */ y.jsx(
|
|
3207
|
+
"div",
|
|
3208
|
+
{
|
|
3209
|
+
className: "advertise-with-us p-1",
|
|
3210
|
+
style: {
|
|
3211
|
+
// ...(props.previewData ? props.previewData.background_color : ad?.background_color),
|
|
3212
|
+
backgroundColor: o.background_color || O?.background_color,
|
|
3213
|
+
color: o.font_color || O?.font_color,
|
|
3214
|
+
borderColor: o.border_color || O?.border_color
|
|
3215
|
+
},
|
|
3216
|
+
children: /* @__PURE__ */ y.jsxs(
|
|
3217
|
+
"div",
|
|
3218
|
+
{
|
|
3219
|
+
className: "small d-block w-100 text-center",
|
|
3220
|
+
children: [
|
|
3221
|
+
/* @__PURE__ */ y.jsx("i", { className: "fas fa-share me-1" }),
|
|
3222
|
+
"Advertise with Articles Media!"
|
|
3223
|
+
]
|
|
3224
|
+
}
|
|
3225
|
+
)
|
|
3226
|
+
}
|
|
3227
|
+
)
|
|
3228
|
+
]
|
|
3229
|
+
}
|
|
3230
|
+
);
|
|
3231
|
+
}
|
|
3232
|
+
const yi = dr(Wo), zo = async (e) => {
|
|
3233
|
+
if (process.env.NODE_ENV === "development")
|
|
3234
|
+
try {
|
|
3235
|
+
return (await I.get("http://localhost:3001/api/community/games/scoreboard", {
|
|
3236
|
+
params: {
|
|
3237
|
+
game: e.game
|
|
3238
|
+
}
|
|
3239
|
+
})).data;
|
|
3240
|
+
} catch {
|
|
3241
|
+
}
|
|
3242
|
+
return I.get(e.url, {
|
|
3243
|
+
params: {
|
|
3244
|
+
game: e.game
|
|
3245
|
+
}
|
|
3246
|
+
}).then((t) => t.data);
|
|
3247
|
+
}, Jo = {
|
|
3248
|
+
dedupingInterval: 1e3 * 60 * 30,
|
|
3249
|
+
refreshInterval: 0,
|
|
3250
|
+
revalidateOnFocus: !1,
|
|
3251
|
+
revalidateIfStale: !1,
|
|
3252
|
+
shouldRetryOnError: !1
|
|
3253
|
+
// fallbackData: []
|
|
3254
|
+
}, Ko = (e) => {
|
|
3255
|
+
const { data: t, error: n, isLoading: r, isValidating: s, mutate: o } = Ft(
|
|
3256
|
+
e?.game ? {
|
|
3257
|
+
// url: "/api/community/games/scoreboard",
|
|
3258
|
+
url: "https://articles.media/api/community/games/scoreboard",
|
|
3259
|
+
game: e.game
|
|
3260
|
+
} : null,
|
|
3261
|
+
zo,
|
|
3262
|
+
Jo
|
|
3263
|
+
);
|
|
3264
|
+
return {
|
|
3265
|
+
data: t,
|
|
3266
|
+
error: n,
|
|
3267
|
+
isLoading: r,
|
|
3268
|
+
isValidating: s,
|
|
3269
|
+
mutate: o
|
|
3270
|
+
};
|
|
3271
|
+
};
|
|
3272
|
+
function Ei({ game: e, reloadScoreboard: t, setReloadScoreboard: n }) {
|
|
3273
|
+
const [r, s] = se(!1), [o, i] = se(!1), {
|
|
3274
|
+
data: a,
|
|
3275
|
+
mutate: p
|
|
3276
|
+
} = Ko({
|
|
3277
|
+
game: e
|
|
3278
|
+
});
|
|
3279
|
+
return fe(() => {
|
|
3280
|
+
}, []), fe(() => {
|
|
3281
|
+
t && (n(!1), p());
|
|
3282
|
+
}, [t]), /* @__PURE__ */ y.jsx("div", { className: "scoreboard", children: /* @__PURE__ */ y.jsxs("div", { className: "card card-articles card-sm mb-3 mb-lg-0", children: [
|
|
3283
|
+
/* @__PURE__ */ y.jsxs("div", { className: "card-header d-flex justify-content-between align-items-center", children: [
|
|
3284
|
+
/* @__PURE__ */ y.jsxs("span", { children: [
|
|
3285
|
+
e,
|
|
3286
|
+
" Scoreboard"
|
|
3287
|
+
] }),
|
|
3288
|
+
/* @__PURE__ */ y.jsx(
|
|
3289
|
+
ve,
|
|
3290
|
+
{
|
|
3291
|
+
onClick: () => {
|
|
3292
|
+
p();
|
|
3293
|
+
},
|
|
3294
|
+
small: !0,
|
|
3295
|
+
children: /* @__PURE__ */ y.jsx("i", { className: "fad fa-redo me-0" })
|
|
3296
|
+
}
|
|
3297
|
+
)
|
|
3298
|
+
] }),
|
|
3299
|
+
/* @__PURE__ */ y.jsxs("div", { className: "card-body p-0", children: [
|
|
3300
|
+
(a?.length || 0) == 0 && /* @__PURE__ */ y.jsx("div", { className: "small p-2", children: "No scores yet" }),
|
|
3301
|
+
a?.map(
|
|
3302
|
+
(f, u) => /* @__PURE__ */ y.jsxs("div", { className: "result d-flex flex-column justify-content-between border-bottom p-2", children: [
|
|
3303
|
+
/* @__PURE__ */ y.jsxs("div", { className: "d-flex justify-content-between lh-sm", children: [
|
|
3304
|
+
/* @__PURE__ */ y.jsxs("div", { className: "d-flex", children: [
|
|
3305
|
+
/* @__PURE__ */ y.jsx("h5", { className: "mb-0 me-3", children: u + 1 }),
|
|
3306
|
+
/* @__PURE__ */ y.jsx("div", { className: "lh-sm" })
|
|
3307
|
+
] }),
|
|
3308
|
+
/* @__PURE__ */ y.jsx("div", { children: /* @__PURE__ */ y.jsx("h5", { className: "mb-0", children: f.score || f.total }) })
|
|
3309
|
+
] }),
|
|
3310
|
+
f.last_play && f.public_last_play && /* @__PURE__ */ y.jsxs("small", { className: "mt-1", style: { fontSize: "0.75rem" }, children: [
|
|
3311
|
+
"Played: ",
|
|
3312
|
+
format(new Date(f.last_play), "MM/d/yy hh:mmaa")
|
|
3313
|
+
] })
|
|
3314
|
+
] }, f._id)
|
|
3315
|
+
)
|
|
3316
|
+
] }),
|
|
3317
|
+
/* @__PURE__ */ y.jsxs("div", { className: "card-footer d-flex justify-content-between align-items-center", children: [
|
|
3318
|
+
/* @__PURE__ */ y.jsx("div", { className: "small", children: "Play to get on the board!" }),
|
|
3319
|
+
/* @__PURE__ */ y.jsx(
|
|
3320
|
+
ve,
|
|
3321
|
+
{
|
|
3322
|
+
small: !0,
|
|
3323
|
+
onClick: () => {
|
|
3324
|
+
s(!0);
|
|
3325
|
+
},
|
|
3326
|
+
children: /* @__PURE__ */ y.jsx("i", { className: "fad fa-cog me-0" })
|
|
3327
|
+
}
|
|
3328
|
+
)
|
|
3329
|
+
] })
|
|
3330
|
+
] }) });
|
|
3331
|
+
}
|
|
3332
|
+
function gi() {
|
|
3333
|
+
return "Hello, world!";
|
|
3334
|
+
}
|
|
3335
|
+
export {
|
|
3336
|
+
yi as Ad,
|
|
3337
|
+
Zo as ArticlesAd,
|
|
3338
|
+
Ei as GameScoreboard,
|
|
3339
|
+
Xo as ReturnToLauncherButton,
|
|
3340
|
+
gi as helloWorld
|
|
3341
|
+
};
|