myquizbot-react 1.0.0

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.
@@ -0,0 +1,2253 @@
1
+ import Nt, { useState as Y, useEffect as rt, useRef as Ct } from "react";
2
+ var pe = { exports: {} }, oe = {};
3
+ var De;
4
+ function Pt() {
5
+ if (De) return oe;
6
+ De = 1;
7
+ var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
8
+ function r(n, s, i) {
9
+ var o = null;
10
+ if (i !== void 0 && (o = "" + i), s.key !== void 0 && (o = "" + s.key), "key" in s) {
11
+ i = {};
12
+ for (var c in s)
13
+ c !== "key" && (i[c] = s[c]);
14
+ } else i = s;
15
+ return s = i.ref, {
16
+ $$typeof: e,
17
+ type: n,
18
+ key: o,
19
+ ref: s !== void 0 ? s : null,
20
+ props: i
21
+ };
22
+ }
23
+ return oe.Fragment = t, oe.jsx = r, oe.jsxs = r, oe;
24
+ }
25
+ var ie = {};
26
+ var qe;
27
+ function jt() {
28
+ return qe || (qe = 1, process.env.NODE_ENV !== "production" && (function() {
29
+ function e(l) {
30
+ if (l == null) return null;
31
+ if (typeof l == "function")
32
+ return l.$$typeof === D ? null : l.displayName || l.name || null;
33
+ if (typeof l == "string") return l;
34
+ switch (l) {
35
+ case m:
36
+ return "Fragment";
37
+ case j:
38
+ return "Profiler";
39
+ case R:
40
+ return "StrictMode";
41
+ case $:
42
+ return "Suspense";
43
+ case k:
44
+ return "SuspenseList";
45
+ case P:
46
+ return "Activity";
47
+ }
48
+ if (typeof l == "object")
49
+ switch (typeof l.tag == "number" && console.error(
50
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
51
+ ), l.$$typeof) {
52
+ case b:
53
+ return "Portal";
54
+ case C:
55
+ return l.displayName || "Context";
56
+ case x:
57
+ return (l._context.displayName || "Context") + ".Consumer";
58
+ case _:
59
+ var w = l.render;
60
+ return l = l.displayName, l || (l = w.displayName || w.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
61
+ case W:
62
+ return w = l.displayName || null, w !== null ? w : e(l.type) || "Memo";
63
+ case B:
64
+ w = l._payload, l = l._init;
65
+ try {
66
+ return e(l(w));
67
+ } catch {
68
+ }
69
+ }
70
+ return null;
71
+ }
72
+ function t(l) {
73
+ return "" + l;
74
+ }
75
+ function r(l) {
76
+ try {
77
+ t(l);
78
+ var w = !1;
79
+ } catch {
80
+ w = !0;
81
+ }
82
+ if (w) {
83
+ w = console;
84
+ var S = w.error, A = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
85
+ return S.call(
86
+ w,
87
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
88
+ A
89
+ ), t(l);
90
+ }
91
+ }
92
+ function n(l) {
93
+ if (l === m) return "<>";
94
+ if (typeof l == "object" && l !== null && l.$$typeof === B)
95
+ return "<...>";
96
+ try {
97
+ var w = e(l);
98
+ return w ? "<" + w + ">" : "<...>";
99
+ } catch {
100
+ return "<...>";
101
+ }
102
+ }
103
+ function s() {
104
+ var l = F.A;
105
+ return l === null ? null : l.getOwner();
106
+ }
107
+ function i() {
108
+ return Error("react-stack-top-frame");
109
+ }
110
+ function o(l) {
111
+ if (z.call(l, "key")) {
112
+ var w = Object.getOwnPropertyDescriptor(l, "key").get;
113
+ if (w && w.isReactWarning) return !1;
114
+ }
115
+ return l.key !== void 0;
116
+ }
117
+ function c(l, w) {
118
+ function S() {
119
+ q || (q = !0, console.error(
120
+ "%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)",
121
+ w
122
+ ));
123
+ }
124
+ S.isReactWarning = !0, Object.defineProperty(l, "key", {
125
+ get: S,
126
+ configurable: !0
127
+ });
128
+ }
129
+ function p() {
130
+ var l = e(this.type);
131
+ return ne[l] || (ne[l] = !0, console.error(
132
+ "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."
133
+ )), l = this.props.ref, l !== void 0 ? l : null;
134
+ }
135
+ function f(l, w, S, A, V, Oe) {
136
+ var N = S.ref;
137
+ return l = {
138
+ $$typeof: d,
139
+ type: l,
140
+ key: w,
141
+ props: S,
142
+ _owner: A
143
+ }, (N !== void 0 ? N : null) !== null ? Object.defineProperty(l, "ref", {
144
+ enumerable: !1,
145
+ get: p
146
+ }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
147
+ configurable: !1,
148
+ enumerable: !1,
149
+ writable: !0,
150
+ value: 0
151
+ }), Object.defineProperty(l, "_debugInfo", {
152
+ configurable: !1,
153
+ enumerable: !1,
154
+ writable: !0,
155
+ value: null
156
+ }), Object.defineProperty(l, "_debugStack", {
157
+ configurable: !1,
158
+ enumerable: !1,
159
+ writable: !0,
160
+ value: V
161
+ }), Object.defineProperty(l, "_debugTask", {
162
+ configurable: !1,
163
+ enumerable: !1,
164
+ writable: !0,
165
+ value: Oe
166
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
167
+ }
168
+ function u(l, w, S, A, V, Oe) {
169
+ var N = w.children;
170
+ if (N !== void 0)
171
+ if (A)
172
+ if (J(N)) {
173
+ for (A = 0; A < N.length; A++)
174
+ h(N[A]);
175
+ Object.freeze && Object.freeze(N);
176
+ } else
177
+ console.error(
178
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
179
+ );
180
+ else h(N);
181
+ if (z.call(w, "key")) {
182
+ N = e(l);
183
+ var Z = Object.keys(w).filter(function(_t) {
184
+ return _t !== "key";
185
+ });
186
+ A = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", de[N + A] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ `A props object containing a "key" prop is being spread into JSX:
188
+ let props = %s;
189
+ <%s {...props} />
190
+ React keys must be passed directly to JSX without using spread:
191
+ let props = %s;
192
+ <%s key={someKey} {...props} />`,
193
+ A,
194
+ N,
195
+ Z,
196
+ N
197
+ ), de[N + A] = !0);
198
+ }
199
+ if (N = null, S !== void 0 && (r(S), N = "" + S), o(w) && (r(w.key), N = "" + w.key), "key" in w) {
200
+ S = {};
201
+ for (var Ae in w)
202
+ Ae !== "key" && (S[Ae] = w[Ae]);
203
+ } else S = w;
204
+ return N && c(
205
+ S,
206
+ typeof l == "function" ? l.displayName || l.name || "Unknown" : l
207
+ ), f(
208
+ l,
209
+ N,
210
+ S,
211
+ s(),
212
+ V,
213
+ Oe
214
+ );
215
+ }
216
+ function h(l) {
217
+ E(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === B && (l._payload.status === "fulfilled" ? E(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
218
+ }
219
+ function E(l) {
220
+ return typeof l == "object" && l !== null && l.$$typeof === d;
221
+ }
222
+ var T = Nt, d = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.portal"), m = /* @__PURE__ */ Symbol.for("react.fragment"), R = /* @__PURE__ */ Symbol.for("react.strict_mode"), j = /* @__PURE__ */ Symbol.for("react.profiler"), x = /* @__PURE__ */ Symbol.for("react.consumer"), C = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), $ = /* @__PURE__ */ Symbol.for("react.suspense"), k = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), B = /* @__PURE__ */ Symbol.for("react.lazy"), P = /* @__PURE__ */ Symbol.for("react.activity"), D = /* @__PURE__ */ Symbol.for("react.client.reference"), F = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, J = Array.isArray, G = console.createTask ? console.createTask : function() {
223
+ return null;
224
+ };
225
+ T = {
226
+ react_stack_bottom_frame: function(l) {
227
+ return l();
228
+ }
229
+ };
230
+ var q, ne = {}, I = T.react_stack_bottom_frame.bind(
231
+ T,
232
+ i
233
+ )(), se = G(n(i)), de = {};
234
+ ie.Fragment = m, ie.jsx = function(l, w, S) {
235
+ var A = 1e4 > F.recentlyCreatedOwnerStacks++;
236
+ return u(
237
+ l,
238
+ w,
239
+ S,
240
+ !1,
241
+ A ? Error("react-stack-top-frame") : I,
242
+ A ? G(n(l)) : se
243
+ );
244
+ }, ie.jsxs = function(l, w, S) {
245
+ var A = 1e4 > F.recentlyCreatedOwnerStacks++;
246
+ return u(
247
+ l,
248
+ w,
249
+ S,
250
+ !0,
251
+ A ? Error("react-stack-top-frame") : I,
252
+ A ? G(n(l)) : se
253
+ );
254
+ };
255
+ })()), ie;
256
+ }
257
+ var Be;
258
+ function kt() {
259
+ return Be || (Be = 1, process.env.NODE_ENV === "production" ? pe.exports = Pt() : pe.exports = jt()), pe.exports;
260
+ }
261
+ var g = kt();
262
+ function nt(e, t) {
263
+ return function() {
264
+ return e.apply(t, arguments);
265
+ };
266
+ }
267
+ const { toString: Ft } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator: Ee, toStringTag: st } = Symbol, ge = /* @__PURE__ */ ((e) => (t) => {
268
+ const r = Ft.call(t);
269
+ return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
270
+ })(/* @__PURE__ */ Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) => ge(t) === e), Re = (e) => (t) => typeof t === e, { isArray: te } = Array, ee = Re("undefined");
271
+ function ce(e) {
272
+ return e !== null && !ee(e) && e.constructor !== null && !ee(e.constructor) && U(e.constructor.isBuffer) && e.constructor.isBuffer(e);
273
+ }
274
+ const ot = M("ArrayBuffer");
275
+ function vt(e) {
276
+ let t;
277
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ot(e.buffer), t;
278
+ }
279
+ const Ut = Re("string"), U = Re("function"), it = Re("number"), le = (e) => e !== null && typeof e == "object", Lt = (e) => e === !0 || e === !1, me = (e) => {
280
+ if (ge(e) !== "object")
281
+ return !1;
282
+ const t = Fe(e);
283
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(Ee in e);
284
+ }, Dt = (e) => {
285
+ if (!le(e) || ce(e))
286
+ return !1;
287
+ try {
288
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
289
+ } catch {
290
+ return !1;
291
+ }
292
+ }, qt = M("Date"), Bt = M("File"), zt = M("Blob"), $t = M("FileList"), It = (e) => le(e) && U(e.pipe), Mt = (e) => {
293
+ let t;
294
+ return e && (typeof FormData == "function" && e instanceof FormData || U(e.append) && ((t = ge(e)) === "formdata" || // detect form-data instance
295
+ t === "object" && U(e.toString) && e.toString() === "[object FormData]"));
296
+ }, Ht = M("URLSearchParams"), [Jt, Wt, Vt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(M), Kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
297
+ function ue(e, t, { allOwnKeys: r = !1 } = {}) {
298
+ if (e === null || typeof e > "u")
299
+ return;
300
+ let n, s;
301
+ if (typeof e != "object" && (e = [e]), te(e))
302
+ for (n = 0, s = e.length; n < s; n++)
303
+ t.call(null, e[n], n, e);
304
+ else {
305
+ if (ce(e))
306
+ return;
307
+ const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
308
+ let c;
309
+ for (n = 0; n < o; n++)
310
+ c = i[n], t.call(null, e[c], c, e);
311
+ }
312
+ }
313
+ function at(e, t) {
314
+ if (ce(e))
315
+ return null;
316
+ t = t.toLowerCase();
317
+ const r = Object.keys(e);
318
+ let n = r.length, s;
319
+ for (; n-- > 0; )
320
+ if (s = r[n], t === s.toLowerCase())
321
+ return s;
322
+ return null;
323
+ }
324
+ const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ct = (e) => !ee(e) && e !== K;
325
+ function Ce() {
326
+ const { caseless: e, skipUndefined: t } = ct(this) && this || {}, r = {}, n = (s, i) => {
327
+ const o = e && at(r, i) || i;
328
+ me(r[o]) && me(s) ? r[o] = Ce(r[o], s) : me(s) ? r[o] = Ce({}, s) : te(s) ? r[o] = s.slice() : (!t || !ee(s)) && (r[o] = s);
329
+ };
330
+ for (let s = 0, i = arguments.length; s < i; s++)
331
+ arguments[s] && ue(arguments[s], n);
332
+ return r;
333
+ }
334
+ const Xt = (e, t, r, { allOwnKeys: n } = {}) => (ue(t, (s, i) => {
335
+ r && U(s) ? e[i] = nt(s, r) : e[i] = s;
336
+ }, { allOwnKeys: n }), e), Qt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Gt = (e, t, r, n) => {
337
+ e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
338
+ value: t.prototype
339
+ }), r && Object.assign(e.prototype, r);
340
+ }, Zt = (e, t, r, n) => {
341
+ let s, i, o;
342
+ const c = {};
343
+ if (t = t || {}, e == null) return t;
344
+ do {
345
+ for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
346
+ o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
347
+ e = r !== !1 && Fe(e);
348
+ } while (e && (!r || r(e, t)) && e !== Object.prototype);
349
+ return t;
350
+ }, er = (e, t, r) => {
351
+ e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
352
+ const n = e.indexOf(t, r);
353
+ return n !== -1 && n === r;
354
+ }, tr = (e) => {
355
+ if (!e) return null;
356
+ if (te(e)) return e;
357
+ let t = e.length;
358
+ if (!it(t)) return null;
359
+ const r = new Array(t);
360
+ for (; t-- > 0; )
361
+ r[t] = e[t];
362
+ return r;
363
+ }, rr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Fe(Uint8Array)), nr = (e, t) => {
364
+ const n = (e && e[Ee]).call(e);
365
+ let s;
366
+ for (; (s = n.next()) && !s.done; ) {
367
+ const i = s.value;
368
+ t.call(e, i[0], i[1]);
369
+ }
370
+ }, sr = (e, t) => {
371
+ let r;
372
+ const n = [];
373
+ for (; (r = e.exec(t)) !== null; )
374
+ n.push(r);
375
+ return n;
376
+ }, or = M("HTMLFormElement"), ir = (e) => e.toLowerCase().replace(
377
+ /[-_\s]([a-z\d])(\w*)/g,
378
+ function(r, n, s) {
379
+ return n.toUpperCase() + s;
380
+ }
381
+ ), ze = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), ar = M("RegExp"), lt = (e, t) => {
382
+ const r = Object.getOwnPropertyDescriptors(e), n = {};
383
+ ue(r, (s, i) => {
384
+ let o;
385
+ (o = t(s, i, e)) !== !1 && (n[i] = o || s);
386
+ }), Object.defineProperties(e, n);
387
+ }, cr = (e) => {
388
+ lt(e, (t, r) => {
389
+ if (U(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
390
+ return !1;
391
+ const n = e[r];
392
+ if (U(n)) {
393
+ if (t.enumerable = !1, "writable" in t) {
394
+ t.writable = !1;
395
+ return;
396
+ }
397
+ t.set || (t.set = () => {
398
+ throw Error("Can not rewrite read-only method '" + r + "'");
399
+ });
400
+ }
401
+ });
402
+ }, lr = (e, t) => {
403
+ const r = {}, n = (s) => {
404
+ s.forEach((i) => {
405
+ r[i] = !0;
406
+ });
407
+ };
408
+ return te(e) ? n(e) : n(String(e).split(t)), r;
409
+ }, ur = () => {
410
+ }, fr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
411
+ function dr(e) {
412
+ return !!(e && U(e.append) && e[st] === "FormData" && e[Ee]);
413
+ }
414
+ const pr = (e) => {
415
+ const t = new Array(10), r = (n, s) => {
416
+ if (le(n)) {
417
+ if (t.indexOf(n) >= 0)
418
+ return;
419
+ if (ce(n))
420
+ return n;
421
+ if (!("toJSON" in n)) {
422
+ t[s] = n;
423
+ const i = te(n) ? [] : {};
424
+ return ue(n, (o, c) => {
425
+ const p = r(o, s + 1);
426
+ !ee(p) && (i[c] = p);
427
+ }), t[s] = void 0, i;
428
+ }
429
+ }
430
+ return n;
431
+ };
432
+ return r(e, 0);
433
+ }, hr = M("AsyncFunction"), mr = (e) => e && (le(e) || U(e)) && U(e.then) && U(e.catch), ut = ((e, t) => e ? setImmediate : t ? ((r, n) => (K.addEventListener("message", ({ source: s, data: i }) => {
434
+ s === K && i === r && n.length && n.shift()();
435
+ }, !1), (s) => {
436
+ n.push(s), K.postMessage(r, "*");
437
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
438
+ typeof setImmediate == "function",
439
+ U(K.postMessage)
440
+ ), br = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || ut, wr = (e) => e != null && U(e[Ee]), a = {
441
+ isArray: te,
442
+ isArrayBuffer: ot,
443
+ isBuffer: ce,
444
+ isFormData: Mt,
445
+ isArrayBufferView: vt,
446
+ isString: Ut,
447
+ isNumber: it,
448
+ isBoolean: Lt,
449
+ isObject: le,
450
+ isPlainObject: me,
451
+ isEmptyObject: Dt,
452
+ isReadableStream: Jt,
453
+ isRequest: Wt,
454
+ isResponse: Vt,
455
+ isHeaders: Yt,
456
+ isUndefined: ee,
457
+ isDate: qt,
458
+ isFile: Bt,
459
+ isBlob: zt,
460
+ isRegExp: ar,
461
+ isFunction: U,
462
+ isStream: It,
463
+ isURLSearchParams: Ht,
464
+ isTypedArray: rr,
465
+ isFileList: $t,
466
+ forEach: ue,
467
+ merge: Ce,
468
+ extend: Xt,
469
+ trim: Kt,
470
+ stripBOM: Qt,
471
+ inherits: Gt,
472
+ toFlatObject: Zt,
473
+ kindOf: ge,
474
+ kindOfTest: M,
475
+ endsWith: er,
476
+ toArray: tr,
477
+ forEachEntry: nr,
478
+ matchAll: sr,
479
+ isHTMLForm: or,
480
+ hasOwnProperty: ze,
481
+ hasOwnProp: ze,
482
+ // an alias to avoid ESLint no-prototype-builtins detection
483
+ reduceDescriptors: lt,
484
+ freezeMethods: cr,
485
+ toObjectSet: lr,
486
+ toCamelCase: ir,
487
+ noop: ur,
488
+ toFiniteNumber: fr,
489
+ findKey: at,
490
+ global: K,
491
+ isContextDefined: ct,
492
+ isSpecCompliantForm: dr,
493
+ toJSONObject: pr,
494
+ isAsyncFn: hr,
495
+ isThenable: mr,
496
+ setImmediate: ut,
497
+ asap: br,
498
+ isIterable: wr
499
+ };
500
+ function y(e, t, r, n, s) {
501
+ 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), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
502
+ }
503
+ a.inherits(y, Error, {
504
+ toJSON: function() {
505
+ return {
506
+ // Standard
507
+ message: this.message,
508
+ name: this.name,
509
+ // Microsoft
510
+ description: this.description,
511
+ number: this.number,
512
+ // Mozilla
513
+ fileName: this.fileName,
514
+ lineNumber: this.lineNumber,
515
+ columnNumber: this.columnNumber,
516
+ stack: this.stack,
517
+ // Axios
518
+ config: a.toJSONObject(this.config),
519
+ code: this.code,
520
+ status: this.status
521
+ };
522
+ }
523
+ });
524
+ const ft = y.prototype, dt = {};
525
+ [
526
+ "ERR_BAD_OPTION_VALUE",
527
+ "ERR_BAD_OPTION",
528
+ "ECONNABORTED",
529
+ "ETIMEDOUT",
530
+ "ERR_NETWORK",
531
+ "ERR_FR_TOO_MANY_REDIRECTS",
532
+ "ERR_DEPRECATED",
533
+ "ERR_BAD_RESPONSE",
534
+ "ERR_BAD_REQUEST",
535
+ "ERR_CANCELED",
536
+ "ERR_NOT_SUPPORT",
537
+ "ERR_INVALID_URL"
538
+ // eslint-disable-next-line func-names
539
+ ].forEach((e) => {
540
+ dt[e] = { value: e };
541
+ });
542
+ Object.defineProperties(y, dt);
543
+ Object.defineProperty(ft, "isAxiosError", { value: !0 });
544
+ y.from = (e, t, r, n, s, i) => {
545
+ const o = Object.create(ft);
546
+ a.toFlatObject(e, o, function(u) {
547
+ return u !== Error.prototype;
548
+ }, (f) => f !== "isAxiosError");
549
+ const c = e && e.message ? e.message : "Error", p = t == null && e ? e.code : t;
550
+ return y.call(o, c, p, r, n, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
551
+ };
552
+ const yr = null;
553
+ function Pe(e) {
554
+ return a.isPlainObject(e) || a.isArray(e);
555
+ }
556
+ function pt(e) {
557
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
558
+ }
559
+ function $e(e, t, r) {
560
+ return e ? e.concat(t).map(function(s, i) {
561
+ return s = pt(s), !r && i ? "[" + s + "]" : s;
562
+ }).join(r ? "." : "") : t;
563
+ }
564
+ function Er(e) {
565
+ return a.isArray(e) && !e.some(Pe);
566
+ }
567
+ const gr = a.toFlatObject(a, {}, null, function(t) {
568
+ return /^is[A-Z]/.test(t);
569
+ });
570
+ function Se(e, t, r) {
571
+ if (!a.isObject(e))
572
+ throw new TypeError("target must be an object");
573
+ t = t || new FormData(), r = a.toFlatObject(r, {
574
+ metaTokens: !0,
575
+ dots: !1,
576
+ indexes: !1
577
+ }, !1, function(b, m) {
578
+ return !a.isUndefined(m[b]);
579
+ });
580
+ const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, p = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
581
+ if (!a.isFunction(s))
582
+ throw new TypeError("visitor must be a function");
583
+ function f(d) {
584
+ if (d === null) return "";
585
+ if (a.isDate(d))
586
+ return d.toISOString();
587
+ if (a.isBoolean(d))
588
+ return d.toString();
589
+ if (!p && a.isBlob(d))
590
+ throw new y("Blob is not supported. Use a Buffer instead.");
591
+ return a.isArrayBuffer(d) || a.isTypedArray(d) ? p && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
592
+ }
593
+ function u(d, b, m) {
594
+ let R = d;
595
+ if (d && !m && typeof d == "object") {
596
+ if (a.endsWith(b, "{}"))
597
+ b = n ? b : b.slice(0, -2), d = JSON.stringify(d);
598
+ else if (a.isArray(d) && Er(d) || (a.isFileList(d) || a.endsWith(b, "[]")) && (R = a.toArray(d)))
599
+ return b = pt(b), R.forEach(function(x, C) {
600
+ !(a.isUndefined(x) || x === null) && t.append(
601
+ // eslint-disable-next-line no-nested-ternary
602
+ o === !0 ? $e([b], C, i) : o === null ? b : b + "[]",
603
+ f(x)
604
+ );
605
+ }), !1;
606
+ }
607
+ return Pe(d) ? !0 : (t.append($e(m, b, i), f(d)), !1);
608
+ }
609
+ const h = [], E = Object.assign(gr, {
610
+ defaultVisitor: u,
611
+ convertValue: f,
612
+ isVisitable: Pe
613
+ });
614
+ function T(d, b) {
615
+ if (!a.isUndefined(d)) {
616
+ if (h.indexOf(d) !== -1)
617
+ throw Error("Circular reference detected in " + b.join("."));
618
+ h.push(d), a.forEach(d, function(R, j) {
619
+ (!(a.isUndefined(R) || R === null) && s.call(
620
+ t,
621
+ R,
622
+ a.isString(j) ? j.trim() : j,
623
+ b,
624
+ E
625
+ )) === !0 && T(R, b ? b.concat(j) : [j]);
626
+ }), h.pop();
627
+ }
628
+ }
629
+ if (!a.isObject(e))
630
+ throw new TypeError("data must be an object");
631
+ return T(e), t;
632
+ }
633
+ function Ie(e) {
634
+ const t = {
635
+ "!": "%21",
636
+ "'": "%27",
637
+ "(": "%28",
638
+ ")": "%29",
639
+ "~": "%7E",
640
+ "%20": "+",
641
+ "%00": "\0"
642
+ };
643
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
644
+ return t[n];
645
+ });
646
+ }
647
+ function ve(e, t) {
648
+ this._pairs = [], e && Se(e, this, t);
649
+ }
650
+ const ht = ve.prototype;
651
+ ht.append = function(t, r) {
652
+ this._pairs.push([t, r]);
653
+ };
654
+ ht.toString = function(t) {
655
+ const r = t ? function(n) {
656
+ return t.call(this, n, Ie);
657
+ } : Ie;
658
+ return this._pairs.map(function(s) {
659
+ return r(s[0]) + "=" + r(s[1]);
660
+ }, "").join("&");
661
+ };
662
+ function Rr(e) {
663
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
664
+ }
665
+ function mt(e, t, r) {
666
+ if (!t)
667
+ return e;
668
+ const n = r && r.encode || Rr;
669
+ a.isFunction(r) && (r = {
670
+ serialize: r
671
+ });
672
+ const s = r && r.serialize;
673
+ let i;
674
+ if (s ? i = s(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new ve(t, r).toString(n), i) {
675
+ const o = e.indexOf("#");
676
+ o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
677
+ }
678
+ return e;
679
+ }
680
+ class Me {
681
+ constructor() {
682
+ this.handlers = [];
683
+ }
684
+ /**
685
+ * Add a new interceptor to the stack
686
+ *
687
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
688
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
689
+ *
690
+ * @return {Number} An ID used to remove interceptor later
691
+ */
692
+ use(t, r, n) {
693
+ return this.handlers.push({
694
+ fulfilled: t,
695
+ rejected: r,
696
+ synchronous: n ? n.synchronous : !1,
697
+ runWhen: n ? n.runWhen : null
698
+ }), this.handlers.length - 1;
699
+ }
700
+ /**
701
+ * Remove an interceptor from the stack
702
+ *
703
+ * @param {Number} id The ID that was returned by `use`
704
+ *
705
+ * @returns {void}
706
+ */
707
+ eject(t) {
708
+ this.handlers[t] && (this.handlers[t] = null);
709
+ }
710
+ /**
711
+ * Clear all interceptors from the stack
712
+ *
713
+ * @returns {void}
714
+ */
715
+ clear() {
716
+ this.handlers && (this.handlers = []);
717
+ }
718
+ /**
719
+ * Iterate over all the registered interceptors
720
+ *
721
+ * This method is particularly useful for skipping over any
722
+ * interceptors that may have become `null` calling `eject`.
723
+ *
724
+ * @param {Function} fn The function to call for each interceptor
725
+ *
726
+ * @returns {void}
727
+ */
728
+ forEach(t) {
729
+ a.forEach(this.handlers, function(n) {
730
+ n !== null && t(n);
731
+ });
732
+ }
733
+ }
734
+ const bt = {
735
+ silentJSONParsing: !0,
736
+ forcedJSONParsing: !0,
737
+ clarifyTimeoutError: !1
738
+ }, Sr = typeof URLSearchParams < "u" ? URLSearchParams : ve, Tr = typeof FormData < "u" ? FormData : null, Or = typeof Blob < "u" ? Blob : null, Ar = {
739
+ isBrowser: !0,
740
+ classes: {
741
+ URLSearchParams: Sr,
742
+ FormData: Tr,
743
+ Blob: Or
744
+ },
745
+ protocols: ["http", "https", "file", "blob", "url", "data"]
746
+ }, Ue = typeof window < "u" && typeof document < "u", je = typeof navigator == "object" && navigator || void 0, xr = Ue && (!je || ["ReactNative", "NativeScript", "NS"].indexOf(je.product) < 0), _r = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
747
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Nr = Ue && window.location.href || "http://localhost", Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
748
+ __proto__: null,
749
+ hasBrowserEnv: Ue,
750
+ hasStandardBrowserEnv: xr,
751
+ hasStandardBrowserWebWorkerEnv: _r,
752
+ navigator: je,
753
+ origin: Nr
754
+ }, Symbol.toStringTag, { value: "Module" })), v = {
755
+ ...Cr,
756
+ ...Ar
757
+ };
758
+ function Pr(e, t) {
759
+ return Se(e, new v.classes.URLSearchParams(), {
760
+ visitor: function(r, n, s, i) {
761
+ return v.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
762
+ },
763
+ ...t
764
+ });
765
+ }
766
+ function jr(e) {
767
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
768
+ }
769
+ function kr(e) {
770
+ const t = {}, r = Object.keys(e);
771
+ let n;
772
+ const s = r.length;
773
+ let i;
774
+ for (n = 0; n < s; n++)
775
+ i = r[n], t[i] = e[i];
776
+ return t;
777
+ }
778
+ function wt(e) {
779
+ function t(r, n, s, i) {
780
+ let o = r[i++];
781
+ if (o === "__proto__") return !0;
782
+ const c = Number.isFinite(+o), p = i >= r.length;
783
+ return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = kr(s[o])), !c);
784
+ }
785
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
786
+ const r = {};
787
+ return a.forEachEntry(e, (n, s) => {
788
+ t(jr(n), s, r, 0);
789
+ }), r;
790
+ }
791
+ return null;
792
+ }
793
+ function Fr(e, t, r) {
794
+ if (a.isString(e))
795
+ try {
796
+ return (t || JSON.parse)(e), a.trim(e);
797
+ } catch (n) {
798
+ if (n.name !== "SyntaxError")
799
+ throw n;
800
+ }
801
+ return (r || JSON.stringify)(e);
802
+ }
803
+ const fe = {
804
+ transitional: bt,
805
+ adapter: ["xhr", "http", "fetch"],
806
+ transformRequest: [function(t, r) {
807
+ const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(t);
808
+ if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
809
+ return s ? JSON.stringify(wt(t)) : t;
810
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
811
+ return t;
812
+ if (a.isArrayBufferView(t))
813
+ return t.buffer;
814
+ if (a.isURLSearchParams(t))
815
+ return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
816
+ let c;
817
+ if (i) {
818
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
819
+ return Pr(t, this.formSerializer).toString();
820
+ if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
821
+ const p = this.env && this.env.FormData;
822
+ return Se(
823
+ c ? { "files[]": t } : t,
824
+ p && new p(),
825
+ this.formSerializer
826
+ );
827
+ }
828
+ }
829
+ return i || s ? (r.setContentType("application/json", !1), Fr(t)) : t;
830
+ }],
831
+ transformResponse: [function(t) {
832
+ const r = this.transitional || fe.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
833
+ if (a.isResponse(t) || a.isReadableStream(t))
834
+ return t;
835
+ if (t && a.isString(t) && (n && !this.responseType || s)) {
836
+ const o = !(r && r.silentJSONParsing) && s;
837
+ try {
838
+ return JSON.parse(t, this.parseReviver);
839
+ } catch (c) {
840
+ if (o)
841
+ throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
842
+ }
843
+ }
844
+ return t;
845
+ }],
846
+ /**
847
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
848
+ * timeout is not created.
849
+ */
850
+ timeout: 0,
851
+ xsrfCookieName: "XSRF-TOKEN",
852
+ xsrfHeaderName: "X-XSRF-TOKEN",
853
+ maxContentLength: -1,
854
+ maxBodyLength: -1,
855
+ env: {
856
+ FormData: v.classes.FormData,
857
+ Blob: v.classes.Blob
858
+ },
859
+ validateStatus: function(t) {
860
+ return t >= 200 && t < 300;
861
+ },
862
+ headers: {
863
+ common: {
864
+ Accept: "application/json, text/plain, */*",
865
+ "Content-Type": void 0
866
+ }
867
+ }
868
+ };
869
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
870
+ fe.headers[e] = {};
871
+ });
872
+ const vr = a.toObjectSet([
873
+ "age",
874
+ "authorization",
875
+ "content-length",
876
+ "content-type",
877
+ "etag",
878
+ "expires",
879
+ "from",
880
+ "host",
881
+ "if-modified-since",
882
+ "if-unmodified-since",
883
+ "last-modified",
884
+ "location",
885
+ "max-forwards",
886
+ "proxy-authorization",
887
+ "referer",
888
+ "retry-after",
889
+ "user-agent"
890
+ ]), Ur = (e) => {
891
+ const t = {};
892
+ let r, n, s;
893
+ return e && e.split(`
894
+ `).forEach(function(o) {
895
+ s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && vr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
896
+ }), t;
897
+ }, He = /* @__PURE__ */ Symbol("internals");
898
+ function ae(e) {
899
+ return e && String(e).trim().toLowerCase();
900
+ }
901
+ function be(e) {
902
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(be) : String(e);
903
+ }
904
+ function Lr(e) {
905
+ const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
906
+ let n;
907
+ for (; n = r.exec(e); )
908
+ t[n[1]] = n[2];
909
+ return t;
910
+ }
911
+ const Dr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
912
+ function xe(e, t, r, n, s) {
913
+ if (a.isFunction(n))
914
+ return n.call(this, t, r);
915
+ if (s && (t = r), !!a.isString(t)) {
916
+ if (a.isString(n))
917
+ return t.indexOf(n) !== -1;
918
+ if (a.isRegExp(n))
919
+ return n.test(t);
920
+ }
921
+ }
922
+ function qr(e) {
923
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
924
+ }
925
+ function Br(e, t) {
926
+ const r = a.toCamelCase(" " + t);
927
+ ["get", "set", "has"].forEach((n) => {
928
+ Object.defineProperty(e, n + r, {
929
+ value: function(s, i, o) {
930
+ return this[n].call(this, t, s, i, o);
931
+ },
932
+ configurable: !0
933
+ });
934
+ });
935
+ }
936
+ let L = class {
937
+ constructor(t) {
938
+ t && this.set(t);
939
+ }
940
+ set(t, r, n) {
941
+ const s = this;
942
+ function i(c, p, f) {
943
+ const u = ae(p);
944
+ if (!u)
945
+ throw new Error("header name must be a non-empty string");
946
+ const h = a.findKey(s, u);
947
+ (!h || s[h] === void 0 || f === !0 || f === void 0 && s[h] !== !1) && (s[h || p] = be(c));
948
+ }
949
+ const o = (c, p) => a.forEach(c, (f, u) => i(f, u, p));
950
+ if (a.isPlainObject(t) || t instanceof this.constructor)
951
+ o(t, r);
952
+ else if (a.isString(t) && (t = t.trim()) && !Dr(t))
953
+ o(Ur(t), r);
954
+ else if (a.isObject(t) && a.isIterable(t)) {
955
+ let c = {}, p, f;
956
+ for (const u of t) {
957
+ if (!a.isArray(u))
958
+ throw TypeError("Object iterator must return a key-value pair");
959
+ c[f = u[0]] = (p = c[f]) ? a.isArray(p) ? [...p, u[1]] : [p, u[1]] : u[1];
960
+ }
961
+ o(c, r);
962
+ } else
963
+ t != null && i(r, t, n);
964
+ return this;
965
+ }
966
+ get(t, r) {
967
+ if (t = ae(t), t) {
968
+ const n = a.findKey(this, t);
969
+ if (n) {
970
+ const s = this[n];
971
+ if (!r)
972
+ return s;
973
+ if (r === !0)
974
+ return Lr(s);
975
+ if (a.isFunction(r))
976
+ return r.call(this, s, n);
977
+ if (a.isRegExp(r))
978
+ return r.exec(s);
979
+ throw new TypeError("parser must be boolean|regexp|function");
980
+ }
981
+ }
982
+ }
983
+ has(t, r) {
984
+ if (t = ae(t), t) {
985
+ const n = a.findKey(this, t);
986
+ return !!(n && this[n] !== void 0 && (!r || xe(this, this[n], n, r)));
987
+ }
988
+ return !1;
989
+ }
990
+ delete(t, r) {
991
+ const n = this;
992
+ let s = !1;
993
+ function i(o) {
994
+ if (o = ae(o), o) {
995
+ const c = a.findKey(n, o);
996
+ c && (!r || xe(n, n[c], c, r)) && (delete n[c], s = !0);
997
+ }
998
+ }
999
+ return a.isArray(t) ? t.forEach(i) : i(t), s;
1000
+ }
1001
+ clear(t) {
1002
+ const r = Object.keys(this);
1003
+ let n = r.length, s = !1;
1004
+ for (; n--; ) {
1005
+ const i = r[n];
1006
+ (!t || xe(this, this[i], i, t, !0)) && (delete this[i], s = !0);
1007
+ }
1008
+ return s;
1009
+ }
1010
+ normalize(t) {
1011
+ const r = this, n = {};
1012
+ return a.forEach(this, (s, i) => {
1013
+ const o = a.findKey(n, i);
1014
+ if (o) {
1015
+ r[o] = be(s), delete r[i];
1016
+ return;
1017
+ }
1018
+ const c = t ? qr(i) : String(i).trim();
1019
+ c !== i && delete r[i], r[c] = be(s), n[c] = !0;
1020
+ }), this;
1021
+ }
1022
+ concat(...t) {
1023
+ return this.constructor.concat(this, ...t);
1024
+ }
1025
+ toJSON(t) {
1026
+ const r = /* @__PURE__ */ Object.create(null);
1027
+ return a.forEach(this, (n, s) => {
1028
+ n != null && n !== !1 && (r[s] = t && a.isArray(n) ? n.join(", ") : n);
1029
+ }), r;
1030
+ }
1031
+ [Symbol.iterator]() {
1032
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1033
+ }
1034
+ toString() {
1035
+ return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
1036
+ `);
1037
+ }
1038
+ getSetCookie() {
1039
+ return this.get("set-cookie") || [];
1040
+ }
1041
+ get [Symbol.toStringTag]() {
1042
+ return "AxiosHeaders";
1043
+ }
1044
+ static from(t) {
1045
+ return t instanceof this ? t : new this(t);
1046
+ }
1047
+ static concat(t, ...r) {
1048
+ const n = new this(t);
1049
+ return r.forEach((s) => n.set(s)), n;
1050
+ }
1051
+ static accessor(t) {
1052
+ const n = (this[He] = this[He] = {
1053
+ accessors: {}
1054
+ }).accessors, s = this.prototype;
1055
+ function i(o) {
1056
+ const c = ae(o);
1057
+ n[c] || (Br(s, o), n[c] = !0);
1058
+ }
1059
+ return a.isArray(t) ? t.forEach(i) : i(t), this;
1060
+ }
1061
+ };
1062
+ L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1063
+ a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
1064
+ let r = t[0].toUpperCase() + t.slice(1);
1065
+ return {
1066
+ get: () => e,
1067
+ set(n) {
1068
+ this[r] = n;
1069
+ }
1070
+ };
1071
+ });
1072
+ a.freezeMethods(L);
1073
+ function _e(e, t) {
1074
+ const r = this || fe, n = t || r, s = L.from(n.headers);
1075
+ let i = n.data;
1076
+ return a.forEach(e, function(c) {
1077
+ i = c.call(r, i, s.normalize(), t ? t.status : void 0);
1078
+ }), s.normalize(), i;
1079
+ }
1080
+ function yt(e) {
1081
+ return !!(e && e.__CANCEL__);
1082
+ }
1083
+ function re(e, t, r) {
1084
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, r), this.name = "CanceledError";
1085
+ }
1086
+ a.inherits(re, y, {
1087
+ __CANCEL__: !0
1088
+ });
1089
+ function Et(e, t, r) {
1090
+ const n = r.config.validateStatus;
1091
+ !r.status || !n || n(r.status) ? e(r) : t(new y(
1092
+ "Request failed with status code " + r.status,
1093
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1094
+ r.config,
1095
+ r.request,
1096
+ r
1097
+ ));
1098
+ }
1099
+ function zr(e) {
1100
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1101
+ return t && t[1] || "";
1102
+ }
1103
+ function $r(e, t) {
1104
+ e = e || 10;
1105
+ const r = new Array(e), n = new Array(e);
1106
+ let s = 0, i = 0, o;
1107
+ return t = t !== void 0 ? t : 1e3, function(p) {
1108
+ const f = Date.now(), u = n[i];
1109
+ o || (o = f), r[s] = p, n[s] = f;
1110
+ let h = i, E = 0;
1111
+ for (; h !== s; )
1112
+ E += r[h++], h = h % e;
1113
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), f - o < t)
1114
+ return;
1115
+ const T = u && f - u;
1116
+ return T ? Math.round(E * 1e3 / T) : void 0;
1117
+ };
1118
+ }
1119
+ function Ir(e, t) {
1120
+ let r = 0, n = 1e3 / t, s, i;
1121
+ const o = (f, u = Date.now()) => {
1122
+ r = u, s = null, i && (clearTimeout(i), i = null), e(...f);
1123
+ };
1124
+ return [(...f) => {
1125
+ const u = Date.now(), h = u - r;
1126
+ h >= n ? o(f, u) : (s = f, i || (i = setTimeout(() => {
1127
+ i = null, o(s);
1128
+ }, n - h)));
1129
+ }, () => s && o(s)];
1130
+ }
1131
+ const ye = (e, t, r = 3) => {
1132
+ let n = 0;
1133
+ const s = $r(50, 250);
1134
+ return Ir((i) => {
1135
+ const o = i.loaded, c = i.lengthComputable ? i.total : void 0, p = o - n, f = s(p), u = o <= c;
1136
+ n = o;
1137
+ const h = {
1138
+ loaded: o,
1139
+ total: c,
1140
+ progress: c ? o / c : void 0,
1141
+ bytes: p,
1142
+ rate: f || void 0,
1143
+ estimated: f && c && u ? (c - o) / f : void 0,
1144
+ event: i,
1145
+ lengthComputable: c != null,
1146
+ [t ? "download" : "upload"]: !0
1147
+ };
1148
+ e(h);
1149
+ }, r);
1150
+ }, Je = (e, t) => {
1151
+ const r = e != null;
1152
+ return [(n) => t[0]({
1153
+ lengthComputable: r,
1154
+ total: e,
1155
+ loaded: n
1156
+ }), t[1]];
1157
+ }, We = (e) => (...t) => a.asap(() => e(...t)), Mr = v.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, v.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
1158
+ new URL(v.origin),
1159
+ v.navigator && /(msie|trident)/i.test(v.navigator.userAgent)
1160
+ ) : () => !0, Hr = v.hasStandardBrowserEnv ? (
1161
+ // Standard browser envs support document.cookie
1162
+ {
1163
+ write(e, t, r, n, s, i, o) {
1164
+ if (typeof document > "u") return;
1165
+ const c = [`${e}=${encodeURIComponent(t)}`];
1166
+ a.isNumber(r) && c.push(`expires=${new Date(r).toUTCString()}`), a.isString(n) && c.push(`path=${n}`), a.isString(s) && c.push(`domain=${s}`), i === !0 && c.push("secure"), a.isString(o) && c.push(`SameSite=${o}`), document.cookie = c.join("; ");
1167
+ },
1168
+ read(e) {
1169
+ if (typeof document > "u") return null;
1170
+ const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
1171
+ return t ? decodeURIComponent(t[1]) : null;
1172
+ },
1173
+ remove(e) {
1174
+ this.write(e, "", Date.now() - 864e5, "/");
1175
+ }
1176
+ }
1177
+ ) : (
1178
+ // Non-standard browser env (web workers, react-native) lack needed support.
1179
+ {
1180
+ write() {
1181
+ },
1182
+ read() {
1183
+ return null;
1184
+ },
1185
+ remove() {
1186
+ }
1187
+ }
1188
+ );
1189
+ function Jr(e) {
1190
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1191
+ }
1192
+ function Wr(e, t) {
1193
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1194
+ }
1195
+ function gt(e, t, r) {
1196
+ let n = !Jr(t);
1197
+ return e && (n || r == !1) ? Wr(e, t) : t;
1198
+ }
1199
+ const Ve = (e) => e instanceof L ? { ...e } : e;
1200
+ function Q(e, t) {
1201
+ t = t || {};
1202
+ const r = {};
1203
+ function n(f, u, h, E) {
1204
+ return a.isPlainObject(f) && a.isPlainObject(u) ? a.merge.call({ caseless: E }, f, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
1205
+ }
1206
+ function s(f, u, h, E) {
1207
+ if (a.isUndefined(u)) {
1208
+ if (!a.isUndefined(f))
1209
+ return n(void 0, f, h, E);
1210
+ } else return n(f, u, h, E);
1211
+ }
1212
+ function i(f, u) {
1213
+ if (!a.isUndefined(u))
1214
+ return n(void 0, u);
1215
+ }
1216
+ function o(f, u) {
1217
+ if (a.isUndefined(u)) {
1218
+ if (!a.isUndefined(f))
1219
+ return n(void 0, f);
1220
+ } else return n(void 0, u);
1221
+ }
1222
+ function c(f, u, h) {
1223
+ if (h in t)
1224
+ return n(f, u);
1225
+ if (h in e)
1226
+ return n(void 0, f);
1227
+ }
1228
+ const p = {
1229
+ url: i,
1230
+ method: i,
1231
+ data: i,
1232
+ baseURL: o,
1233
+ transformRequest: o,
1234
+ transformResponse: o,
1235
+ paramsSerializer: o,
1236
+ timeout: o,
1237
+ timeoutMessage: o,
1238
+ withCredentials: o,
1239
+ withXSRFToken: o,
1240
+ adapter: o,
1241
+ responseType: o,
1242
+ xsrfCookieName: o,
1243
+ xsrfHeaderName: o,
1244
+ onUploadProgress: o,
1245
+ onDownloadProgress: o,
1246
+ decompress: o,
1247
+ maxContentLength: o,
1248
+ maxBodyLength: o,
1249
+ beforeRedirect: o,
1250
+ transport: o,
1251
+ httpAgent: o,
1252
+ httpsAgent: o,
1253
+ cancelToken: o,
1254
+ socketPath: o,
1255
+ responseEncoding: o,
1256
+ validateStatus: c,
1257
+ headers: (f, u, h) => s(Ve(f), Ve(u), h, !0)
1258
+ };
1259
+ return a.forEach(Object.keys({ ...e, ...t }), function(u) {
1260
+ const h = p[u] || s, E = h(e[u], t[u], u);
1261
+ a.isUndefined(E) && h !== c || (r[u] = E);
1262
+ }), r;
1263
+ }
1264
+ const Rt = (e) => {
1265
+ const t = Q({}, e);
1266
+ let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
1267
+ if (t.headers = o = L.from(o), t.url = mt(gt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
1268
+ "Authorization",
1269
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1270
+ ), a.isFormData(r)) {
1271
+ if (v.hasStandardBrowserEnv || v.hasStandardBrowserWebWorkerEnv)
1272
+ o.setContentType(void 0);
1273
+ else if (a.isFunction(r.getHeaders)) {
1274
+ const p = r.getHeaders(), f = ["content-type", "content-length"];
1275
+ Object.entries(p).forEach(([u, h]) => {
1276
+ f.includes(u.toLowerCase()) && o.set(u, h);
1277
+ });
1278
+ }
1279
+ }
1280
+ if (v.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && Mr(t.url))) {
1281
+ const p = s && i && Hr.read(i);
1282
+ p && o.set(s, p);
1283
+ }
1284
+ return t;
1285
+ }, Vr = typeof XMLHttpRequest < "u", Yr = Vr && function(e) {
1286
+ return new Promise(function(r, n) {
1287
+ const s = Rt(e);
1288
+ let i = s.data;
1289
+ const o = L.from(s.headers).normalize();
1290
+ let { responseType: c, onUploadProgress: p, onDownloadProgress: f } = s, u, h, E, T, d;
1291
+ function b() {
1292
+ T && T(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1293
+ }
1294
+ let m = new XMLHttpRequest();
1295
+ m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
1296
+ function R() {
1297
+ if (!m)
1298
+ return;
1299
+ const x = L.from(
1300
+ "getAllResponseHeaders" in m && m.getAllResponseHeaders()
1301
+ ), _ = {
1302
+ data: !c || c === "text" || c === "json" ? m.responseText : m.response,
1303
+ status: m.status,
1304
+ statusText: m.statusText,
1305
+ headers: x,
1306
+ config: e,
1307
+ request: m
1308
+ };
1309
+ Et(function(k) {
1310
+ r(k), b();
1311
+ }, function(k) {
1312
+ n(k), b();
1313
+ }, _), m = null;
1314
+ }
1315
+ "onloadend" in m ? m.onloadend = R : m.onreadystatechange = function() {
1316
+ !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(R);
1317
+ }, m.onabort = function() {
1318
+ m && (n(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
1319
+ }, m.onerror = function(C) {
1320
+ const _ = C && C.message ? C.message : "Network Error", $ = new y(_, y.ERR_NETWORK, e, m);
1321
+ $.event = C || null, n($), m = null;
1322
+ }, m.ontimeout = function() {
1323
+ let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1324
+ const _ = s.transitional || bt;
1325
+ s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(new y(
1326
+ C,
1327
+ _.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1328
+ e,
1329
+ m
1330
+ )), m = null;
1331
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in m && a.forEach(o.toJSON(), function(C, _) {
1332
+ m.setRequestHeader(_, C);
1333
+ }), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), f && ([E, d] = ye(f, !0), m.addEventListener("progress", E)), p && m.upload && ([h, T] = ye(p), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (x) => {
1334
+ m && (n(!x || x.type ? new re(null, e, m) : x), m.abort(), m = null);
1335
+ }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1336
+ const j = zr(s.url);
1337
+ if (j && v.protocols.indexOf(j) === -1) {
1338
+ n(new y("Unsupported protocol " + j + ":", y.ERR_BAD_REQUEST, e));
1339
+ return;
1340
+ }
1341
+ m.send(i || null);
1342
+ });
1343
+ }, Kr = (e, t) => {
1344
+ const { length: r } = e = e ? e.filter(Boolean) : [];
1345
+ if (t || r) {
1346
+ let n = new AbortController(), s;
1347
+ const i = function(f) {
1348
+ if (!s) {
1349
+ s = !0, c();
1350
+ const u = f instanceof Error ? f : this.reason;
1351
+ n.abort(u instanceof y ? u : new re(u instanceof Error ? u.message : u));
1352
+ }
1353
+ };
1354
+ let o = t && setTimeout(() => {
1355
+ o = null, i(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1356
+ }, t);
1357
+ const c = () => {
1358
+ e && (o && clearTimeout(o), o = null, e.forEach((f) => {
1359
+ f.unsubscribe ? f.unsubscribe(i) : f.removeEventListener("abort", i);
1360
+ }), e = null);
1361
+ };
1362
+ e.forEach((f) => f.addEventListener("abort", i));
1363
+ const { signal: p } = n;
1364
+ return p.unsubscribe = () => a.asap(c), p;
1365
+ }
1366
+ }, Xr = function* (e, t) {
1367
+ let r = e.byteLength;
1368
+ if (r < t) {
1369
+ yield e;
1370
+ return;
1371
+ }
1372
+ let n = 0, s;
1373
+ for (; n < r; )
1374
+ s = n + t, yield e.slice(n, s), n = s;
1375
+ }, Qr = async function* (e, t) {
1376
+ for await (const r of Gr(e))
1377
+ yield* Xr(r, t);
1378
+ }, Gr = async function* (e) {
1379
+ if (e[Symbol.asyncIterator]) {
1380
+ yield* e;
1381
+ return;
1382
+ }
1383
+ const t = e.getReader();
1384
+ try {
1385
+ for (; ; ) {
1386
+ const { done: r, value: n } = await t.read();
1387
+ if (r)
1388
+ break;
1389
+ yield n;
1390
+ }
1391
+ } finally {
1392
+ await t.cancel();
1393
+ }
1394
+ }, Ye = (e, t, r, n) => {
1395
+ const s = Qr(e, t);
1396
+ let i = 0, o, c = (p) => {
1397
+ o || (o = !0, n && n(p));
1398
+ };
1399
+ return new ReadableStream({
1400
+ async pull(p) {
1401
+ try {
1402
+ const { done: f, value: u } = await s.next();
1403
+ if (f) {
1404
+ c(), p.close();
1405
+ return;
1406
+ }
1407
+ let h = u.byteLength;
1408
+ if (r) {
1409
+ let E = i += h;
1410
+ r(E);
1411
+ }
1412
+ p.enqueue(new Uint8Array(u));
1413
+ } catch (f) {
1414
+ throw c(f), f;
1415
+ }
1416
+ },
1417
+ cancel(p) {
1418
+ return c(p), s.return();
1419
+ }
1420
+ }, {
1421
+ highWaterMark: 2
1422
+ });
1423
+ }, Ke = 64 * 1024, { isFunction: he } = a, Zr = (({ Request: e, Response: t }) => ({
1424
+ Request: e,
1425
+ Response: t
1426
+ }))(a.global), {
1427
+ ReadableStream: Xe,
1428
+ TextEncoder: Qe
1429
+ } = a.global, Ge = (e, ...t) => {
1430
+ try {
1431
+ return !!e(...t);
1432
+ } catch {
1433
+ return !1;
1434
+ }
1435
+ }, en = (e) => {
1436
+ e = a.merge.call({
1437
+ skipUndefined: !0
1438
+ }, Zr, e);
1439
+ const { fetch: t, Request: r, Response: n } = e, s = t ? he(t) : typeof fetch == "function", i = he(r), o = he(n);
1440
+ if (!s)
1441
+ return !1;
1442
+ const c = s && he(Xe), p = s && (typeof Qe == "function" ? /* @__PURE__ */ ((d) => (b) => d.encode(b))(new Qe()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), f = i && c && Ge(() => {
1443
+ let d = !1;
1444
+ const b = new r(v.origin, {
1445
+ body: new Xe(),
1446
+ method: "POST",
1447
+ get duplex() {
1448
+ return d = !0, "half";
1449
+ }
1450
+ }).headers.has("Content-Type");
1451
+ return d && !b;
1452
+ }), u = o && c && Ge(() => a.isReadableStream(new n("").body)), h = {
1453
+ stream: u && ((d) => d.body)
1454
+ };
1455
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1456
+ !h[d] && (h[d] = (b, m) => {
1457
+ let R = b && b[d];
1458
+ if (R)
1459
+ return R.call(b);
1460
+ throw new y(`Response type '${d}' is not supported`, y.ERR_NOT_SUPPORT, m);
1461
+ });
1462
+ });
1463
+ const E = async (d) => {
1464
+ if (d == null)
1465
+ return 0;
1466
+ if (a.isBlob(d))
1467
+ return d.size;
1468
+ if (a.isSpecCompliantForm(d))
1469
+ return (await new r(v.origin, {
1470
+ method: "POST",
1471
+ body: d
1472
+ }).arrayBuffer()).byteLength;
1473
+ if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
1474
+ return d.byteLength;
1475
+ if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
1476
+ return (await p(d)).byteLength;
1477
+ }, T = async (d, b) => {
1478
+ const m = a.toFiniteNumber(d.getContentLength());
1479
+ return m ?? E(b);
1480
+ };
1481
+ return async (d) => {
1482
+ let {
1483
+ url: b,
1484
+ method: m,
1485
+ data: R,
1486
+ signal: j,
1487
+ cancelToken: x,
1488
+ timeout: C,
1489
+ onDownloadProgress: _,
1490
+ onUploadProgress: $,
1491
+ responseType: k,
1492
+ headers: W,
1493
+ withCredentials: B = "same-origin",
1494
+ fetchOptions: P
1495
+ } = Rt(d), D = t || fetch;
1496
+ k = k ? (k + "").toLowerCase() : "text";
1497
+ let F = Kr([j, x && x.toAbortSignal()], C), z = null;
1498
+ const J = F && F.unsubscribe && (() => {
1499
+ F.unsubscribe();
1500
+ });
1501
+ let G;
1502
+ try {
1503
+ if ($ && f && m !== "get" && m !== "head" && (G = await T(W, R)) !== 0) {
1504
+ let l = new r(b, {
1505
+ method: "POST",
1506
+ body: R,
1507
+ duplex: "half"
1508
+ }), w;
1509
+ if (a.isFormData(R) && (w = l.headers.get("content-type")) && W.setContentType(w), l.body) {
1510
+ const [S, A] = Je(
1511
+ G,
1512
+ ye(We($))
1513
+ );
1514
+ R = Ye(l.body, Ke, S, A);
1515
+ }
1516
+ }
1517
+ a.isString(B) || (B = B ? "include" : "omit");
1518
+ const q = i && "credentials" in r.prototype, ne = {
1519
+ ...P,
1520
+ signal: F,
1521
+ method: m.toUpperCase(),
1522
+ headers: W.normalize().toJSON(),
1523
+ body: R,
1524
+ duplex: "half",
1525
+ credentials: q ? B : void 0
1526
+ };
1527
+ z = i && new r(b, ne);
1528
+ let I = await (i ? D(z, P) : D(b, ne));
1529
+ const se = u && (k === "stream" || k === "response");
1530
+ if (u && (_ || se && J)) {
1531
+ const l = {};
1532
+ ["status", "statusText", "headers"].forEach((V) => {
1533
+ l[V] = I[V];
1534
+ });
1535
+ const w = a.toFiniteNumber(I.headers.get("content-length")), [S, A] = _ && Je(
1536
+ w,
1537
+ ye(We(_), !0)
1538
+ ) || [];
1539
+ I = new n(
1540
+ Ye(I.body, Ke, S, () => {
1541
+ A && A(), J && J();
1542
+ }),
1543
+ l
1544
+ );
1545
+ }
1546
+ k = k || "text";
1547
+ let de = await h[a.findKey(h, k) || "text"](I, d);
1548
+ return !se && J && J(), await new Promise((l, w) => {
1549
+ Et(l, w, {
1550
+ data: de,
1551
+ headers: L.from(I.headers),
1552
+ status: I.status,
1553
+ statusText: I.statusText,
1554
+ config: d,
1555
+ request: z
1556
+ });
1557
+ });
1558
+ } catch (q) {
1559
+ throw J && J(), q && q.name === "TypeError" && /Load failed|fetch/i.test(q.message) ? Object.assign(
1560
+ new y("Network Error", y.ERR_NETWORK, d, z),
1561
+ {
1562
+ cause: q.cause || q
1563
+ }
1564
+ ) : y.from(q, q && q.code, d, z);
1565
+ }
1566
+ };
1567
+ }, tn = /* @__PURE__ */ new Map(), St = (e) => {
1568
+ let t = e && e.env || {};
1569
+ const { fetch: r, Request: n, Response: s } = t, i = [
1570
+ n,
1571
+ s,
1572
+ r
1573
+ ];
1574
+ let o = i.length, c = o, p, f, u = tn;
1575
+ for (; c--; )
1576
+ p = i[c], f = u.get(p), f === void 0 && u.set(p, f = c ? /* @__PURE__ */ new Map() : en(t)), u = f;
1577
+ return f;
1578
+ };
1579
+ St();
1580
+ const Le = {
1581
+ http: yr,
1582
+ xhr: Yr,
1583
+ fetch: {
1584
+ get: St
1585
+ }
1586
+ };
1587
+ a.forEach(Le, (e, t) => {
1588
+ if (e) {
1589
+ try {
1590
+ Object.defineProperty(e, "name", { value: t });
1591
+ } catch {
1592
+ }
1593
+ Object.defineProperty(e, "adapterName", { value: t });
1594
+ }
1595
+ });
1596
+ const Ze = (e) => `- ${e}`, rn = (e) => a.isFunction(e) || e === null || e === !1;
1597
+ function nn(e, t) {
1598
+ e = a.isArray(e) ? e : [e];
1599
+ const { length: r } = e;
1600
+ let n, s;
1601
+ const i = {};
1602
+ for (let o = 0; o < r; o++) {
1603
+ n = e[o];
1604
+ let c;
1605
+ if (s = n, !rn(n) && (s = Le[(c = String(n)).toLowerCase()], s === void 0))
1606
+ throw new y(`Unknown adapter '${c}'`);
1607
+ if (s && (a.isFunction(s) || (s = s.get(t))))
1608
+ break;
1609
+ i[c || "#" + o] = s;
1610
+ }
1611
+ if (!s) {
1612
+ const o = Object.entries(i).map(
1613
+ ([p, f]) => `adapter ${p} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1614
+ );
1615
+ let c = r ? o.length > 1 ? `since :
1616
+ ` + o.map(Ze).join(`
1617
+ `) : " " + Ze(o[0]) : "as no adapter specified";
1618
+ throw new y(
1619
+ "There is no suitable adapter to dispatch the request " + c,
1620
+ "ERR_NOT_SUPPORT"
1621
+ );
1622
+ }
1623
+ return s;
1624
+ }
1625
+ const Tt = {
1626
+ /**
1627
+ * Resolve an adapter from a list of adapter names or functions.
1628
+ * @type {Function}
1629
+ */
1630
+ getAdapter: nn,
1631
+ /**
1632
+ * Exposes all known adapters
1633
+ * @type {Object<string, Function|Object>}
1634
+ */
1635
+ adapters: Le
1636
+ };
1637
+ function Ne(e) {
1638
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1639
+ throw new re(null, e);
1640
+ }
1641
+ function et(e) {
1642
+ return Ne(e), e.headers = L.from(e.headers), e.data = _e.call(
1643
+ e,
1644
+ e.transformRequest
1645
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter || fe.adapter, e)(e).then(function(n) {
1646
+ return Ne(e), n.data = _e.call(
1647
+ e,
1648
+ e.transformResponse,
1649
+ n
1650
+ ), n.headers = L.from(n.headers), n;
1651
+ }, function(n) {
1652
+ return yt(n) || (Ne(e), n && n.response && (n.response.data = _e.call(
1653
+ e,
1654
+ e.transformResponse,
1655
+ n.response
1656
+ ), n.response.headers = L.from(n.response.headers))), Promise.reject(n);
1657
+ });
1658
+ }
1659
+ const Ot = "1.13.2", Te = {};
1660
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1661
+ Te[e] = function(n) {
1662
+ return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1663
+ };
1664
+ });
1665
+ const tt = {};
1666
+ Te.transitional = function(t, r, n) {
1667
+ function s(i, o) {
1668
+ return "[Axios v" + Ot + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
1669
+ }
1670
+ return (i, o, c) => {
1671
+ if (t === !1)
1672
+ throw new y(
1673
+ s(o, " has been removed" + (r ? " in " + r : "")),
1674
+ y.ERR_DEPRECATED
1675
+ );
1676
+ return r && !tt[o] && (tt[o] = !0, console.warn(
1677
+ s(
1678
+ o,
1679
+ " has been deprecated since v" + r + " and will be removed in the near future"
1680
+ )
1681
+ )), t ? t(i, o, c) : !0;
1682
+ };
1683
+ };
1684
+ Te.spelling = function(t) {
1685
+ return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
1686
+ };
1687
+ function sn(e, t, r) {
1688
+ if (typeof e != "object")
1689
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1690
+ const n = Object.keys(e);
1691
+ let s = n.length;
1692
+ for (; s-- > 0; ) {
1693
+ const i = n[s], o = t[i];
1694
+ if (o) {
1695
+ const c = e[i], p = c === void 0 || o(c, i, e);
1696
+ if (p !== !0)
1697
+ throw new y("option " + i + " must be " + p, y.ERR_BAD_OPTION_VALUE);
1698
+ continue;
1699
+ }
1700
+ if (r !== !0)
1701
+ throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
1702
+ }
1703
+ }
1704
+ const we = {
1705
+ assertOptions: sn,
1706
+ validators: Te
1707
+ }, H = we.validators;
1708
+ let X = class {
1709
+ constructor(t) {
1710
+ this.defaults = t || {}, this.interceptors = {
1711
+ request: new Me(),
1712
+ response: new Me()
1713
+ };
1714
+ }
1715
+ /**
1716
+ * Dispatch a request
1717
+ *
1718
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1719
+ * @param {?Object} config
1720
+ *
1721
+ * @returns {Promise} The Promise to be fulfilled
1722
+ */
1723
+ async request(t, r) {
1724
+ try {
1725
+ return await this._request(t, r);
1726
+ } catch (n) {
1727
+ if (n instanceof Error) {
1728
+ let s = {};
1729
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1730
+ const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1731
+ try {
1732
+ n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
1733
+ ` + i) : n.stack = i;
1734
+ } catch {
1735
+ }
1736
+ }
1737
+ throw n;
1738
+ }
1739
+ }
1740
+ _request(t, r) {
1741
+ typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = Q(this.defaults, r);
1742
+ const { transitional: n, paramsSerializer: s, headers: i } = r;
1743
+ n !== void 0 && we.assertOptions(n, {
1744
+ silentJSONParsing: H.transitional(H.boolean),
1745
+ forcedJSONParsing: H.transitional(H.boolean),
1746
+ clarifyTimeoutError: H.transitional(H.boolean)
1747
+ }, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
1748
+ serialize: s
1749
+ } : we.assertOptions(s, {
1750
+ encode: H.function,
1751
+ serialize: H.function
1752
+ }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), we.assertOptions(r, {
1753
+ baseUrl: H.spelling("baseURL"),
1754
+ withXsrfToken: H.spelling("withXSRFToken")
1755
+ }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
1756
+ let o = i && a.merge(
1757
+ i.common,
1758
+ i[r.method]
1759
+ );
1760
+ i && a.forEach(
1761
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1762
+ (d) => {
1763
+ delete i[d];
1764
+ }
1765
+ ), r.headers = L.concat(o, i);
1766
+ const c = [];
1767
+ let p = !0;
1768
+ this.interceptors.request.forEach(function(b) {
1769
+ typeof b.runWhen == "function" && b.runWhen(r) === !1 || (p = p && b.synchronous, c.unshift(b.fulfilled, b.rejected));
1770
+ });
1771
+ const f = [];
1772
+ this.interceptors.response.forEach(function(b) {
1773
+ f.push(b.fulfilled, b.rejected);
1774
+ });
1775
+ let u, h = 0, E;
1776
+ if (!p) {
1777
+ const d = [et.bind(this), void 0];
1778
+ for (d.unshift(...c), d.push(...f), E = d.length, u = Promise.resolve(r); h < E; )
1779
+ u = u.then(d[h++], d[h++]);
1780
+ return u;
1781
+ }
1782
+ E = c.length;
1783
+ let T = r;
1784
+ for (; h < E; ) {
1785
+ const d = c[h++], b = c[h++];
1786
+ try {
1787
+ T = d(T);
1788
+ } catch (m) {
1789
+ b.call(this, m);
1790
+ break;
1791
+ }
1792
+ }
1793
+ try {
1794
+ u = et.call(this, T);
1795
+ } catch (d) {
1796
+ return Promise.reject(d);
1797
+ }
1798
+ for (h = 0, E = f.length; h < E; )
1799
+ u = u.then(f[h++], f[h++]);
1800
+ return u;
1801
+ }
1802
+ getUri(t) {
1803
+ t = Q(this.defaults, t);
1804
+ const r = gt(t.baseURL, t.url, t.allowAbsoluteUrls);
1805
+ return mt(r, t.params, t.paramsSerializer);
1806
+ }
1807
+ };
1808
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1809
+ X.prototype[t] = function(r, n) {
1810
+ return this.request(Q(n || {}, {
1811
+ method: t,
1812
+ url: r,
1813
+ data: (n || {}).data
1814
+ }));
1815
+ };
1816
+ });
1817
+ a.forEach(["post", "put", "patch"], function(t) {
1818
+ function r(n) {
1819
+ return function(i, o, c) {
1820
+ return this.request(Q(c || {}, {
1821
+ method: t,
1822
+ headers: n ? {
1823
+ "Content-Type": "multipart/form-data"
1824
+ } : {},
1825
+ url: i,
1826
+ data: o
1827
+ }));
1828
+ };
1829
+ }
1830
+ X.prototype[t] = r(), X.prototype[t + "Form"] = r(!0);
1831
+ });
1832
+ let on = class At {
1833
+ constructor(t) {
1834
+ if (typeof t != "function")
1835
+ throw new TypeError("executor must be a function.");
1836
+ let r;
1837
+ this.promise = new Promise(function(i) {
1838
+ r = i;
1839
+ });
1840
+ const n = this;
1841
+ this.promise.then((s) => {
1842
+ if (!n._listeners) return;
1843
+ let i = n._listeners.length;
1844
+ for (; i-- > 0; )
1845
+ n._listeners[i](s);
1846
+ n._listeners = null;
1847
+ }), this.promise.then = (s) => {
1848
+ let i;
1849
+ const o = new Promise((c) => {
1850
+ n.subscribe(c), i = c;
1851
+ }).then(s);
1852
+ return o.cancel = function() {
1853
+ n.unsubscribe(i);
1854
+ }, o;
1855
+ }, t(function(i, o, c) {
1856
+ n.reason || (n.reason = new re(i, o, c), r(n.reason));
1857
+ });
1858
+ }
1859
+ /**
1860
+ * Throws a `CanceledError` if cancellation has been requested.
1861
+ */
1862
+ throwIfRequested() {
1863
+ if (this.reason)
1864
+ throw this.reason;
1865
+ }
1866
+ /**
1867
+ * Subscribe to the cancel signal
1868
+ */
1869
+ subscribe(t) {
1870
+ if (this.reason) {
1871
+ t(this.reason);
1872
+ return;
1873
+ }
1874
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1875
+ }
1876
+ /**
1877
+ * Unsubscribe from the cancel signal
1878
+ */
1879
+ unsubscribe(t) {
1880
+ if (!this._listeners)
1881
+ return;
1882
+ const r = this._listeners.indexOf(t);
1883
+ r !== -1 && this._listeners.splice(r, 1);
1884
+ }
1885
+ toAbortSignal() {
1886
+ const t = new AbortController(), r = (n) => {
1887
+ t.abort(n);
1888
+ };
1889
+ return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
1890
+ }
1891
+ /**
1892
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1893
+ * cancels the `CancelToken`.
1894
+ */
1895
+ static source() {
1896
+ let t;
1897
+ return {
1898
+ token: new At(function(s) {
1899
+ t = s;
1900
+ }),
1901
+ cancel: t
1902
+ };
1903
+ }
1904
+ };
1905
+ function an(e) {
1906
+ return function(r) {
1907
+ return e.apply(null, r);
1908
+ };
1909
+ }
1910
+ function cn(e) {
1911
+ return a.isObject(e) && e.isAxiosError === !0;
1912
+ }
1913
+ const ke = {
1914
+ Continue: 100,
1915
+ SwitchingProtocols: 101,
1916
+ Processing: 102,
1917
+ EarlyHints: 103,
1918
+ Ok: 200,
1919
+ Created: 201,
1920
+ Accepted: 202,
1921
+ NonAuthoritativeInformation: 203,
1922
+ NoContent: 204,
1923
+ ResetContent: 205,
1924
+ PartialContent: 206,
1925
+ MultiStatus: 207,
1926
+ AlreadyReported: 208,
1927
+ ImUsed: 226,
1928
+ MultipleChoices: 300,
1929
+ MovedPermanently: 301,
1930
+ Found: 302,
1931
+ SeeOther: 303,
1932
+ NotModified: 304,
1933
+ UseProxy: 305,
1934
+ Unused: 306,
1935
+ TemporaryRedirect: 307,
1936
+ PermanentRedirect: 308,
1937
+ BadRequest: 400,
1938
+ Unauthorized: 401,
1939
+ PaymentRequired: 402,
1940
+ Forbidden: 403,
1941
+ NotFound: 404,
1942
+ MethodNotAllowed: 405,
1943
+ NotAcceptable: 406,
1944
+ ProxyAuthenticationRequired: 407,
1945
+ RequestTimeout: 408,
1946
+ Conflict: 409,
1947
+ Gone: 410,
1948
+ LengthRequired: 411,
1949
+ PreconditionFailed: 412,
1950
+ PayloadTooLarge: 413,
1951
+ UriTooLong: 414,
1952
+ UnsupportedMediaType: 415,
1953
+ RangeNotSatisfiable: 416,
1954
+ ExpectationFailed: 417,
1955
+ ImATeapot: 418,
1956
+ MisdirectedRequest: 421,
1957
+ UnprocessableEntity: 422,
1958
+ Locked: 423,
1959
+ FailedDependency: 424,
1960
+ TooEarly: 425,
1961
+ UpgradeRequired: 426,
1962
+ PreconditionRequired: 428,
1963
+ TooManyRequests: 429,
1964
+ RequestHeaderFieldsTooLarge: 431,
1965
+ UnavailableForLegalReasons: 451,
1966
+ InternalServerError: 500,
1967
+ NotImplemented: 501,
1968
+ BadGateway: 502,
1969
+ ServiceUnavailable: 503,
1970
+ GatewayTimeout: 504,
1971
+ HttpVersionNotSupported: 505,
1972
+ VariantAlsoNegotiates: 506,
1973
+ InsufficientStorage: 507,
1974
+ LoopDetected: 508,
1975
+ NotExtended: 510,
1976
+ NetworkAuthenticationRequired: 511,
1977
+ WebServerIsDown: 521,
1978
+ ConnectionTimedOut: 522,
1979
+ OriginIsUnreachable: 523,
1980
+ TimeoutOccurred: 524,
1981
+ SslHandshakeFailed: 525,
1982
+ InvalidSslCertificate: 526
1983
+ };
1984
+ Object.entries(ke).forEach(([e, t]) => {
1985
+ ke[t] = e;
1986
+ });
1987
+ function xt(e) {
1988
+ const t = new X(e), r = nt(X.prototype.request, t);
1989
+ return a.extend(r, X.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
1990
+ return xt(Q(e, s));
1991
+ }, r;
1992
+ }
1993
+ const O = xt(fe);
1994
+ O.Axios = X;
1995
+ O.CanceledError = re;
1996
+ O.CancelToken = on;
1997
+ O.isCancel = yt;
1998
+ O.VERSION = Ot;
1999
+ O.toFormData = Se;
2000
+ O.AxiosError = y;
2001
+ O.Cancel = O.CanceledError;
2002
+ O.all = function(t) {
2003
+ return Promise.all(t);
2004
+ };
2005
+ O.spread = an;
2006
+ O.isAxiosError = cn;
2007
+ O.mergeConfig = Q;
2008
+ O.AxiosHeaders = L;
2009
+ O.formToJSON = (e) => wt(a.isHTMLForm(e) ? new FormData(e) : e);
2010
+ O.getAdapter = Tt.getAdapter;
2011
+ O.HttpStatusCode = ke;
2012
+ O.default = O;
2013
+ const {
2014
+ Axios: hn,
2015
+ AxiosError: mn,
2016
+ CanceledError: bn,
2017
+ isCancel: wn,
2018
+ CancelToken: yn,
2019
+ VERSION: En,
2020
+ all: gn,
2021
+ Cancel: Rn,
2022
+ isAxiosError: Sn,
2023
+ spread: Tn,
2024
+ toFormData: On,
2025
+ AxiosHeaders: An,
2026
+ HttpStatusCode: xn,
2027
+ formToJSON: _n,
2028
+ getAdapter: Nn,
2029
+ mergeConfig: Cn
2030
+ } = O;
2031
+ class ln {
2032
+ client;
2033
+ constructor(t) {
2034
+ this.client = O.create({
2035
+ baseURL: t || void 0 || "http://localhost:5003",
2036
+ headers: {
2037
+ "Content-Type": "application/json"
2038
+ }
2039
+ });
2040
+ }
2041
+ setApiKey(t) {
2042
+ this.client.defaults.headers.common.Authorization = `Bearer ${t}`;
2043
+ }
2044
+ async getQuiz(t) {
2045
+ try {
2046
+ return (await this.client.get(`/quiz/${t}`)).data;
2047
+ } catch (r) {
2048
+ throw O.isAxiosError(r) ? new Error(`Failed to fetch quiz: ${r.response?.data?.message || r.message}`) : r;
2049
+ }
2050
+ }
2051
+ async submitAnswer(t, r, n) {
2052
+ try {
2053
+ await this.client.post(`/quiz/session/${t}/answer`, {
2054
+ questionId: r,
2055
+ answer: n
2056
+ });
2057
+ } catch (s) {
2058
+ throw O.isAxiosError(s) ? new Error(`Failed to submit answer: ${s.response?.data?.message || s.message}`) : s;
2059
+ }
2060
+ }
2061
+ async createSession(t) {
2062
+ try {
2063
+ return (await this.client.post("/quiz/session", { quizId: t })).data;
2064
+ } catch (r) {
2065
+ throw O.isAxiosError(r) ? new Error(`Failed to create session: ${r.response?.data?.message || r.message}`) : r;
2066
+ }
2067
+ }
2068
+ async completeSession(t) {
2069
+ try {
2070
+ await this.client.post(`/quiz/session/${t}/complete`);
2071
+ } catch (r) {
2072
+ throw O.isAxiosError(r) ? new Error(`Failed to complete session: ${r.response?.data?.message || r.message}`) : r;
2073
+ }
2074
+ }
2075
+ }
2076
+ const un = ({ nodes: e, onAnswer: t, onProgress: r, onComplete: n }) => {
2077
+ const [s, i] = Y(0), [o, c] = Y({});
2078
+ rt(() => {
2079
+ r({
2080
+ currentStep: s + 1,
2081
+ totalSteps: e.length,
2082
+ percentage: (s + 1) / e.length * 100
2083
+ });
2084
+ }, [s, e.length, r]);
2085
+ const p = (h) => {
2086
+ const E = e[s], T = {
2087
+ ...o,
2088
+ [E.id]: h
2089
+ };
2090
+ c(T), t({
2091
+ questionId: E.id,
2092
+ answer: h,
2093
+ timestamp: Date.now()
2094
+ }), s < e.length - 1 ? i(s + 1) : n();
2095
+ }, f = () => {
2096
+ s > 0 && i(s - 1);
2097
+ };
2098
+ if (e.length === 0)
2099
+ return /* @__PURE__ */ g.jsx("div", { className: "quiz-steps-empty", children: "No questions available" });
2100
+ const u = e[s];
2101
+ return /* @__PURE__ */ g.jsxs("div", { className: "quiz-steps-container", children: [
2102
+ /* @__PURE__ */ g.jsx("div", { className: "quiz-steps-progress", children: /* @__PURE__ */ g.jsx(
2103
+ "div",
2104
+ {
2105
+ className: "quiz-steps-progress-bar",
2106
+ style: { width: `${(s + 1) / e.length * 100}%` }
2107
+ }
2108
+ ) }),
2109
+ /* @__PURE__ */ g.jsxs("div", { className: "quiz-steps-content", children: [
2110
+ /* @__PURE__ */ g.jsx("div", { className: "quiz-steps-header", children: /* @__PURE__ */ g.jsxs("span", { className: "quiz-steps-counter", children: [
2111
+ "Question ",
2112
+ s + 1,
2113
+ " of ",
2114
+ e.length
2115
+ ] }) }),
2116
+ /* @__PURE__ */ g.jsxs("div", { className: "quiz-steps-question", children: [
2117
+ /* @__PURE__ */ g.jsx("h2", { children: u.data.label || u.data.content }),
2118
+ u.data.content && u.data.label && /* @__PURE__ */ g.jsx("p", { children: u.data.content })
2119
+ ] }),
2120
+ /* @__PURE__ */ g.jsxs("div", { className: "quiz-steps-options", children: [
2121
+ u.type === "multipleChoice" && u.data.options?.map((h, E) => /* @__PURE__ */ g.jsx(
2122
+ "button",
2123
+ {
2124
+ className: "quiz-steps-option",
2125
+ onClick: () => p(h.value || h),
2126
+ children: h.label || h
2127
+ },
2128
+ E
2129
+ )),
2130
+ u.type === "text" && /* @__PURE__ */ g.jsxs("div", { className: "quiz-steps-text-input", children: [
2131
+ /* @__PURE__ */ g.jsx(
2132
+ "input",
2133
+ {
2134
+ type: "text",
2135
+ placeholder: "Type your answer...",
2136
+ onKeyPress: (h) => {
2137
+ h.key === "Enter" && p(h.target.value);
2138
+ }
2139
+ }
2140
+ ),
2141
+ /* @__PURE__ */ g.jsx("button", { onClick: (h) => {
2142
+ const E = h.currentTarget.previousElementSibling;
2143
+ p(E.value);
2144
+ }, children: "Submit" })
2145
+ ] })
2146
+ ] }),
2147
+ /* @__PURE__ */ g.jsx("div", { className: "quiz-steps-navigation", children: s > 0 && /* @__PURE__ */ g.jsx("button", { className: "quiz-steps-nav-button", onClick: f, children: "Previous" }) })
2148
+ ] })
2149
+ ] });
2150
+ }, Pn = ({
2151
+ quizId: e,
2152
+ apiKey: t,
2153
+ mode: r = "steps",
2154
+ baseUrl: n,
2155
+ onStart: s,
2156
+ onAnswer: i,
2157
+ onProgress: o,
2158
+ onComplete: c,
2159
+ onError: p,
2160
+ className: f,
2161
+ style: u
2162
+ }) => {
2163
+ const [h, E] = Y(null), [T, d] = Y(!0), [b, m] = Y(null), [R, j] = Y(null), [x, C] = Y({}), _ = Ct(null);
2164
+ rt(() => {
2165
+ _.current = new ln(n), _.current.setApiKey(t), (async () => {
2166
+ try {
2167
+ d(!0), m(null);
2168
+ const D = await _.current.getQuiz(e);
2169
+ E(D);
2170
+ const F = await _.current.createSession(e);
2171
+ if (j(F.sessionId), s) {
2172
+ const z = {
2173
+ quizId: e,
2174
+ timestamp: Date.now()
2175
+ };
2176
+ s(z);
2177
+ }
2178
+ d(!1);
2179
+ } catch (D) {
2180
+ const F = D instanceof Error ? D.message : "Failed to load quiz";
2181
+ if (m(F), d(!1), p) {
2182
+ const z = {
2183
+ error: D instanceof Error ? D : new Error(F),
2184
+ message: F,
2185
+ timestamp: Date.now()
2186
+ };
2187
+ p(z);
2188
+ }
2189
+ }
2190
+ })();
2191
+ }, [e, t, n, s, p]);
2192
+ const $ = async (P) => {
2193
+ const D = {
2194
+ ...x,
2195
+ [P.questionId]: P.answer
2196
+ };
2197
+ if (C(D), R && _.current)
2198
+ try {
2199
+ await _.current.submitAnswer(R, P.questionId, P.answer);
2200
+ } catch (F) {
2201
+ console.error("Failed to submit answer:", F);
2202
+ }
2203
+ i && i(P);
2204
+ }, k = (P) => {
2205
+ o && o(P);
2206
+ }, W = async () => {
2207
+ if (R && _.current)
2208
+ try {
2209
+ await _.current.completeSession(R);
2210
+ } catch (P) {
2211
+ console.error("Failed to complete session:", P);
2212
+ }
2213
+ if (c) {
2214
+ const P = {
2215
+ quizId: e,
2216
+ answers: x,
2217
+ timestamp: Date.now(),
2218
+ sessionId: R || void 0
2219
+ };
2220
+ c(P);
2221
+ }
2222
+ };
2223
+ if (T)
2224
+ return /* @__PURE__ */ g.jsxs("div", { className: `quiz-container quiz-loading ${f || ""}`, style: u, children: [
2225
+ /* @__PURE__ */ g.jsx("div", { className: "quiz-spinner" }),
2226
+ /* @__PURE__ */ g.jsx("p", { children: "Loading quiz..." })
2227
+ ] });
2228
+ if (b)
2229
+ return /* @__PURE__ */ g.jsxs("div", { className: `quiz-container quiz-error ${f || ""}`, style: u, children: [
2230
+ /* @__PURE__ */ g.jsx("div", { className: "quiz-error-icon", children: "⚠️" }),
2231
+ /* @__PURE__ */ g.jsx("h3", { children: "Failed to Load Quiz" }),
2232
+ /* @__PURE__ */ g.jsx("p", { children: b })
2233
+ ] });
2234
+ if (!h)
2235
+ return null;
2236
+ const B = r || h.renderMode || "steps";
2237
+ return /* @__PURE__ */ g.jsxs("div", { className: `quiz-container ${f || ""}`, style: u, children: [
2238
+ B === "steps" && /* @__PURE__ */ g.jsx(
2239
+ un,
2240
+ {
2241
+ nodes: h.nodes,
2242
+ onAnswer: $,
2243
+ onProgress: k,
2244
+ onComplete: W
2245
+ }
2246
+ ),
2247
+ B === "single" && /* @__PURE__ */ g.jsx("div", { className: "quiz-single-mode", children: /* @__PURE__ */ g.jsx("p", { children: "Single mode not yet implemented" }) }),
2248
+ B === "flow" && /* @__PURE__ */ g.jsx("div", { className: "quiz-flow-mode", children: /* @__PURE__ */ g.jsx("p", { children: "Flow mode not yet implemented" }) })
2249
+ ] });
2250
+ };
2251
+ export {
2252
+ Pn as Quiz
2253
+ };