authifyer-sdk 1.0.1 → 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.
@@ -1,7 +1,7 @@
1
- var Ft = Object.defineProperty;
2
- var It = (t, e, r) => e in t ? Ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var V = (t, e, r) => It(t, typeof e != "symbol" ? e + "" : e, r);
4
- import Bt, { createContext as Dt, useMemo as qt, useState as F, useEffect as Mt, useContext as Ht } from "react";
1
+ var Bt = Object.defineProperty;
2
+ var Dt = (t, e, r) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var V = (t, e, r) => Dt(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import qt, { createContext as Mt, useMemo as Ht, useState as I, useEffect as $t, useContext as zt } from "react";
5
5
  var be = { exports: {} }, se = {};
6
6
  /**
7
7
  * @license React
@@ -12,10 +12,10 @@ var be = { exports: {} }, se = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var We;
16
- function $t() {
17
- if (We) return se;
18
- We = 1;
15
+ var Ke;
16
+ function Wt() {
17
+ if (Ke) return se;
18
+ Ke = 1;
19
19
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function r(n, s, o) {
21
21
  var i = null;
@@ -44,9 +44,9 @@ var oe = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var Je;
48
- function zt() {
49
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ var Ye;
48
+ function Jt() {
49
+ return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && (function() {
50
50
  function t(l) {
51
51
  if (l == null) return null;
52
52
  if (typeof l == "function")
@@ -74,17 +74,17 @@ function zt() {
74
74
  return "Portal";
75
75
  case C:
76
76
  return l.displayName || "Context";
77
- case O:
77
+ case _:
78
78
  return (l._context.displayName || "Context") + ".Consumer";
79
79
  case U:
80
- var w = l.render;
81
- return l = l.displayName, l || (l = w.displayName || w.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
80
+ var E = l.render;
81
+ return l = l.displayName, l || (l = E.displayName || E.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
82
  case te:
83
- return w = l.displayName || null, w !== null ? w : t(l.type) || "Memo";
83
+ return E = l.displayName || null, E !== null ? E : t(l.type) || "Memo";
84
84
  case $:
85
- w = l._payload, l = l._init;
85
+ E = l._payload, l = l._init;
86
86
  try {
87
- return t(l(w));
87
+ return t(l(E));
88
88
  } catch {
89
89
  }
90
90
  }
@@ -96,15 +96,15 @@ function zt() {
96
96
  function r(l) {
97
97
  try {
98
98
  e(l);
99
- var w = !1;
99
+ var E = !1;
100
100
  } catch {
101
- w = !0;
101
+ E = !0;
102
102
  }
103
- if (w) {
104
- w = console;
105
- var T = w.error, A = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
103
+ if (E) {
104
+ E = console;
105
+ var T = E.error, A = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
106
  return T.call(
107
- w,
107
+ E,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
109
  A
110
110
  ), e(l);
@@ -115,8 +115,8 @@ function zt() {
115
115
  if (typeof l == "object" && l !== null && l.$$typeof === $)
116
116
  return "<...>";
117
117
  try {
118
- var w = t(l);
119
- return w ? "<" + w + ">" : "<...>";
118
+ var E = t(l);
119
+ return E ? "<" + E + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
@@ -130,16 +130,16 @@ function zt() {
130
130
  }
131
131
  function i(l) {
132
132
  if (W.call(l, "key")) {
133
- var w = Object.getOwnPropertyDescriptor(l, "key").get;
134
- if (w && w.isReactWarning) return !1;
133
+ var E = Object.getOwnPropertyDescriptor(l, "key").get;
134
+ if (E && E.isReactWarning) return !1;
135
135
  }
136
136
  return l.key !== void 0;
137
137
  }
138
- function c(l, w) {
138
+ function c(l, E) {
139
139
  function T() {
140
140
  N || (N = !0, console.error(
141
141
  "%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)",
142
- w
142
+ E
143
143
  ));
144
144
  }
145
145
  T.isReactWarning = !0, Object.defineProperty(l, "key", {
@@ -153,15 +153,15 @@ function zt() {
153
153
  "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."
154
154
  )), l = this.props.ref, l !== void 0 ? l : null;
155
155
  }
156
- function d(l, w, T, A, J, Ne) {
157
- var _ = T.ref;
156
+ function d(l, E, T, A, J, Ne) {
157
+ var O = T.ref;
158
158
  return l = {
159
159
  $$typeof: f,
160
160
  type: l,
161
- key: w,
161
+ key: E,
162
162
  props: T,
163
163
  _owner: A
164
- }, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(l, "ref", {
164
+ }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(l, "ref", {
165
165
  enumerable: !1,
166
166
  get: p
167
167
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -186,25 +186,25 @@ function zt() {
186
186
  value: Ne
187
187
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
188
188
  }
189
- function u(l, w, T, A, J, Ne) {
190
- var _ = w.children;
191
- if (_ !== void 0)
189
+ function u(l, E, T, A, J, Ne) {
190
+ var O = E.children;
191
+ if (O !== void 0)
192
192
  if (A)
193
- if (H(_)) {
194
- for (A = 0; A < _.length; A++)
195
- m(_[A]);
196
- Object.freeze && Object.freeze(_);
193
+ if (H(O)) {
194
+ for (A = 0; A < O.length; A++)
195
+ m(O[A]);
196
+ Object.freeze && Object.freeze(O);
197
197
  } else
198
198
  console.error(
199
199
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
200
200
  );
201
- else m(_);
202
- if (W.call(w, "key")) {
203
- _ = t(l);
204
- var Q = Object.keys(w).filter(function(Ut) {
205
- return Ut !== "key";
201
+ else m(O);
202
+ if (W.call(E, "key")) {
203
+ O = t(l);
204
+ var Q = Object.keys(E).filter(function(Ft) {
205
+ return Ft !== "key";
206
206
  });
207
- A = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", ye[_ + A] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ A = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", ye[O + A] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
208
208
  `A props object containing a "key" prop is being spread into JSX:
209
209
  let props = %s;
210
210
  <%s {...props} />
@@ -212,22 +212,22 @@ React keys must be passed directly to JSX without using spread:
212
212
  let props = %s;
213
213
  <%s key={someKey} {...props} />`,
214
214
  A,
215
- _,
215
+ O,
216
216
  Q,
217
- _
218
- ), ye[_ + A] = !0);
217
+ O
218
+ ), ye[O + A] = !0);
219
219
  }
220
- if (_ = null, T !== void 0 && (r(T), _ = "" + T), i(w) && (r(w.key), _ = "" + w.key), "key" in w) {
220
+ if (O = null, T !== void 0 && (r(T), O = "" + T), i(E) && (r(E.key), O = "" + E.key), "key" in E) {
221
221
  T = {};
222
- for (var Ce in w)
223
- Ce !== "key" && (T[Ce] = w[Ce]);
224
- } else T = w;
225
- return _ && c(
222
+ for (var Ce in E)
223
+ Ce !== "key" && (T[Ce] = E[Ce]);
224
+ } else T = E;
225
+ return O && c(
226
226
  T,
227
227
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
228
228
  ), d(
229
229
  l,
230
- _,
230
+ O,
231
231
  T,
232
232
  s(),
233
233
  J,
@@ -235,12 +235,12 @@ React keys must be passed directly to JSX without using spread:
235
235
  );
236
236
  }
237
237
  function m(l) {
238
- E(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === $ && (l._payload.status === "fulfilled" ? E(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
238
+ w(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === $ && (l._payload.status === "fulfilled" ? w(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
239
239
  }
240
- function E(l) {
240
+ function w(l) {
241
241
  return typeof l == "object" && l !== null && l.$$typeof === f;
242
242
  }
243
- var R = Bt, f = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), O = Symbol.for("react.consumer"), C = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), pe = Symbol.for("react.activity"), me = Symbol.for("react.client.reference"), z = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, H = Array.isArray, G = console.createTask ? console.createTask : function() {
243
+ var R = qt, f = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), C = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), pe = Symbol.for("react.activity"), me = Symbol.for("react.client.reference"), z = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, H = Array.isArray, G = console.createTask ? console.createTask : function() {
244
244
  return null;
245
245
  };
246
246
  R = {
@@ -252,21 +252,21 @@ React keys must be passed directly to JSX without using spread:
252
252
  R,
253
253
  o
254
254
  )(), ne = G(n(o)), ye = {};
255
- oe.Fragment = h, oe.jsx = function(l, w, T) {
255
+ oe.Fragment = h, oe.jsx = function(l, E, T) {
256
256
  var A = 1e4 > z.recentlyCreatedOwnerStacks++;
257
257
  return u(
258
258
  l,
259
- w,
259
+ E,
260
260
  T,
261
261
  !1,
262
262
  A ? Error("react-stack-top-frame") : B,
263
263
  A ? G(n(l)) : ne
264
264
  );
265
- }, oe.jsxs = function(l, w, T) {
265
+ }, oe.jsxs = function(l, E, T) {
266
266
  var A = 1e4 > z.recentlyCreatedOwnerStacks++;
267
267
  return u(
268
268
  l,
269
- w,
269
+ E,
270
270
  T,
271
271
  !0,
272
272
  A ? Error("react-stack-top-frame") : B,
@@ -275,34 +275,34 @@ React keys must be passed directly to JSX without using spread:
275
275
  };
276
276
  })()), oe;
277
277
  }
278
- var Ve;
279
- function Wt() {
280
- return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? be.exports = $t() : be.exports = zt()), be.exports;
278
+ var Xe;
279
+ function Vt() {
280
+ return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? be.exports = Wt() : be.exports = Jt()), be.exports;
281
281
  }
282
- var b = Wt();
283
- function dt(t, e) {
282
+ var b = Vt();
283
+ function pt(t, e) {
284
284
  return function() {
285
285
  return t.apply(e, arguments);
286
286
  };
287
287
  }
288
- const { toString: Jt } = Object.prototype, { getPrototypeOf: qe } = Object, { iterator: Te, toStringTag: ht } = Symbol, Ae = /* @__PURE__ */ ((t) => (e) => {
289
- const r = Jt.call(e);
288
+ const { toString: Kt } = Object.prototype, { getPrototypeOf: $e } = Object, { iterator: Te, toStringTag: mt } = Symbol, Ae = /* @__PURE__ */ ((t) => (e) => {
289
+ const r = Kt.call(e);
290
290
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
291
291
  })(/* @__PURE__ */ Object.create(null)), D = (t) => (t = t.toLowerCase(), (e) => Ae(e) === t), xe = (t) => (e) => typeof e === t, { isArray: ee } = Array, Z = xe("undefined");
292
292
  function ce(t) {
293
293
  return t !== null && !Z(t) && t.constructor !== null && !Z(t.constructor) && k(t.constructor.isBuffer) && t.constructor.isBuffer(t);
294
294
  }
295
- const pt = D("ArrayBuffer");
296
- function Vt(t) {
295
+ const yt = D("ArrayBuffer");
296
+ function Yt(t) {
297
297
  let e;
298
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && pt(t.buffer), e;
298
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && yt(t.buffer), e;
299
299
  }
300
- const Kt = xe("string"), k = xe("function"), mt = xe("number"), le = (t) => t !== null && typeof t == "object", Yt = (t) => t === !0 || t === !1, we = (t) => {
300
+ const Xt = xe("string"), k = xe("function"), bt = xe("number"), le = (t) => t !== null && typeof t == "object", Gt = (t) => t === !0 || t === !1, Ee = (t) => {
301
301
  if (Ae(t) !== "object")
302
302
  return !1;
303
- const e = qe(t);
304
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(ht in t) && !(Te in t);
305
- }, Xt = (t) => {
303
+ const e = $e(t);
304
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(mt in t) && !(Te in t);
305
+ }, Qt = (t) => {
306
306
  if (!le(t) || ce(t))
307
307
  return !1;
308
308
  try {
@@ -310,16 +310,16 @@ const Kt = xe("string"), k = xe("function"), mt = xe("number"), le = (t) => t !=
310
310
  } catch {
311
311
  return !1;
312
312
  }
313
- }, Gt = D("Date"), Qt = D("File"), Zt = D("Blob"), er = D("FileList"), tr = (t) => le(t) && k(t.pipe), rr = (t) => {
313
+ }, Zt = D("Date"), er = D("File"), tr = D("Blob"), rr = D("FileList"), nr = (t) => le(t) && k(t.pipe), sr = (t) => {
314
314
  let e;
315
315
  return t && (typeof FormData == "function" && t instanceof FormData || k(t.append) && ((e = Ae(t)) === "formdata" || // detect form-data instance
316
316
  e === "object" && k(t.toString) && t.toString() === "[object FormData]"));
317
- }, nr = D("URLSearchParams"), [sr, or, ir, ar] = [
317
+ }, or = D("URLSearchParams"), [ir, ar, cr, lr] = [
318
318
  "ReadableStream",
319
319
  "Request",
320
320
  "Response",
321
321
  "Headers"
322
- ].map(D), cr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
322
+ ].map(D), ur = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
323
323
  function ue(t, e, { allOwnKeys: r = !1 } = {}) {
324
324
  if (t === null || typeof t > "u")
325
325
  return;
@@ -336,7 +336,7 @@ function ue(t, e, { allOwnKeys: r = !1 } = {}) {
336
336
  c = o[n], e.call(null, t[c], c, t);
337
337
  }
338
338
  }
339
- function yt(t, e) {
339
+ function gt(t, e) {
340
340
  if (ce(t))
341
341
  return null;
342
342
  e = e.toLowerCase();
@@ -347,23 +347,23 @@ function yt(t, e) {
347
347
  return s;
348
348
  return null;
349
349
  }
350
- const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, bt = (t) => !Z(t) && t !== K;
351
- function Le() {
352
- const { caseless: t, skipUndefined: e } = bt(this) && this || {}, r = {}, n = (s, o) => {
350
+ const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Et = (t) => !Z(t) && t !== K;
351
+ function Ie() {
352
+ const { caseless: t, skipUndefined: e } = Et(this) && this || {}, r = {}, n = (s, o) => {
353
353
  if (o === "__proto__" || o === "constructor" || o === "prototype")
354
354
  return;
355
- const i = t && yt(r, o) || o;
356
- we(r[i]) && we(s) ? r[i] = Le(r[i], s) : we(s) ? r[i] = Le({}, s) : ee(s) ? r[i] = s.slice() : (!e || !Z(s)) && (r[i] = s);
355
+ const i = t && gt(r, o) || o;
356
+ Ee(r[i]) && Ee(s) ? r[i] = Ie(r[i], s) : Ee(s) ? r[i] = Ie({}, s) : ee(s) ? r[i] = s.slice() : (!e || !Z(s)) && (r[i] = s);
357
357
  };
358
358
  for (let s = 0, o = arguments.length; s < o; s++)
359
359
  arguments[s] && ue(arguments[s], n);
360
360
  return r;
361
361
  }
362
- const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
362
+ const fr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
363
363
  e,
364
364
  (s, o) => {
365
365
  r && k(s) ? Object.defineProperty(t, o, {
366
- value: dt(s, r),
366
+ value: pt(s, r),
367
367
  writable: !0,
368
368
  enumerable: !0,
369
369
  configurable: !0
@@ -375,7 +375,7 @@ const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
375
375
  });
376
376
  },
377
377
  { allOwnKeys: n }
378
- ), t), ur = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), fr = (t, e, r, n) => {
378
+ ), t), dr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), hr = (t, e, r, n) => {
379
379
  t.prototype = Object.create(
380
380
  e.prototype,
381
381
  n
@@ -387,52 +387,52 @@ const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
387
387
  }), Object.defineProperty(t, "super", {
388
388
  value: e.prototype
389
389
  }), r && Object.assign(t.prototype, r);
390
- }, dr = (t, e, r, n) => {
390
+ }, pr = (t, e, r, n) => {
391
391
  let s, o, i;
392
392
  const c = {};
393
393
  if (e = e || {}, t == null) return e;
394
394
  do {
395
395
  for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
396
396
  i = s[o], (!n || n(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0);
397
- t = r !== !1 && qe(t);
397
+ t = r !== !1 && $e(t);
398
398
  } while (t && (!r || r(t, e)) && t !== Object.prototype);
399
399
  return e;
400
- }, hr = (t, e, r) => {
400
+ }, mr = (t, e, r) => {
401
401
  t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
402
402
  const n = t.indexOf(e, r);
403
403
  return n !== -1 && n === r;
404
- }, pr = (t) => {
404
+ }, yr = (t) => {
405
405
  if (!t) return null;
406
406
  if (ee(t)) return t;
407
407
  let e = t.length;
408
- if (!mt(e)) return null;
408
+ if (!bt(e)) return null;
409
409
  const r = new Array(e);
410
410
  for (; e-- > 0; )
411
411
  r[e] = t[e];
412
412
  return r;
413
- }, mr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && qe(Uint8Array)), yr = (t, e) => {
413
+ }, br = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && $e(Uint8Array)), gr = (t, e) => {
414
414
  const n = (t && t[Te]).call(t);
415
415
  let s;
416
416
  for (; (s = n.next()) && !s.done; ) {
417
417
  const o = s.value;
418
418
  e.call(t, o[0], o[1]);
419
419
  }
420
- }, br = (t, e) => {
420
+ }, Er = (t, e) => {
421
421
  let r;
422
422
  const n = [];
423
423
  for (; (r = t.exec(e)) !== null; )
424
424
  n.push(r);
425
425
  return n;
426
- }, gr = D("HTMLFormElement"), wr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
426
+ }, wr = D("HTMLFormElement"), Rr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
427
427
  return n.toUpperCase() + s;
428
- }), Ke = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Er = D("RegExp"), gt = (t, e) => {
428
+ }), Ge = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Sr = D("RegExp"), wt = (t, e) => {
429
429
  const r = Object.getOwnPropertyDescriptors(t), n = {};
430
430
  ue(r, (s, o) => {
431
431
  let i;
432
432
  (i = e(s, o, t)) !== !1 && (n[o] = i || s);
433
433
  }), Object.defineProperties(t, n);
434
- }, Rr = (t) => {
435
- gt(t, (e, r) => {
434
+ }, Tr = (t) => {
435
+ wt(t, (e, r) => {
436
436
  if (k(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
437
437
  return !1;
438
438
  const n = t[r];
@@ -446,19 +446,19 @@ const lr = (t, e, r, { allOwnKeys: n } = {}) => (ue(
446
446
  });
447
447
  }
448
448
  });
449
- }, Sr = (t, e) => {
449
+ }, Ar = (t, e) => {
450
450
  const r = {}, n = (s) => {
451
451
  s.forEach((o) => {
452
452
  r[o] = !0;
453
453
  });
454
454
  };
455
455
  return ee(t) ? n(t) : n(String(t).split(e)), r;
456
- }, Tr = () => {
457
- }, Ar = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
458
- function xr(t) {
459
- return !!(t && k(t.append) && t[ht] === "FormData" && t[Te]);
456
+ }, xr = () => {
457
+ }, _r = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
458
+ function Or(t) {
459
+ return !!(t && k(t.append) && t[mt] === "FormData" && t[Te]);
460
460
  }
461
- const Or = (t) => {
461
+ const Nr = (t) => {
462
462
  const e = new Array(10), r = (n, s) => {
463
463
  if (le(n)) {
464
464
  if (e.indexOf(n) >= 0)
@@ -477,7 +477,7 @@ const Or = (t) => {
477
477
  return n;
478
478
  };
479
479
  return r(t, 0);
480
- }, _r = D("AsyncFunction"), Nr = (t) => t && (le(t) || k(t)) && k(t.then) && k(t.catch), wt = ((t, e) => t ? setImmediate : e ? ((r, n) => (K.addEventListener(
480
+ }, Cr = D("AsyncFunction"), Pr = (t) => t && (le(t) || k(t)) && k(t.then) && k(t.catch), Rt = ((t, e) => t ? setImmediate : e ? ((r, n) => (K.addEventListener(
481
481
  "message",
482
482
  ({ source: s, data: o }) => {
483
483
  s === K && o === r && n.length && n.shift()();
@@ -485,69 +485,69 @@ const Or = (t) => {
485
485
  !1
486
486
  ), (s) => {
487
487
  n.push(s), K.postMessage(r, "*");
488
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", k(K.postMessage)), Cr = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || wt, Pr = (t) => t != null && k(t[Te]), a = {
488
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", k(K.postMessage)), jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || Rt, vr = (t) => t != null && k(t[Te]), a = {
489
489
  isArray: ee,
490
- isArrayBuffer: pt,
490
+ isArrayBuffer: yt,
491
491
  isBuffer: ce,
492
- isFormData: rr,
493
- isArrayBufferView: Vt,
494
- isString: Kt,
495
- isNumber: mt,
496
- isBoolean: Yt,
492
+ isFormData: sr,
493
+ isArrayBufferView: Yt,
494
+ isString: Xt,
495
+ isNumber: bt,
496
+ isBoolean: Gt,
497
497
  isObject: le,
498
- isPlainObject: we,
499
- isEmptyObject: Xt,
500
- isReadableStream: sr,
501
- isRequest: or,
502
- isResponse: ir,
503
- isHeaders: ar,
498
+ isPlainObject: Ee,
499
+ isEmptyObject: Qt,
500
+ isReadableStream: ir,
501
+ isRequest: ar,
502
+ isResponse: cr,
503
+ isHeaders: lr,
504
504
  isUndefined: Z,
505
- isDate: Gt,
506
- isFile: Qt,
507
- isBlob: Zt,
508
- isRegExp: Er,
505
+ isDate: Zt,
506
+ isFile: er,
507
+ isBlob: tr,
508
+ isRegExp: Sr,
509
509
  isFunction: k,
510
- isStream: tr,
511
- isURLSearchParams: nr,
512
- isTypedArray: mr,
513
- isFileList: er,
510
+ isStream: nr,
511
+ isURLSearchParams: or,
512
+ isTypedArray: br,
513
+ isFileList: rr,
514
514
  forEach: ue,
515
- merge: Le,
516
- extend: lr,
517
- trim: cr,
518
- stripBOM: ur,
519
- inherits: fr,
520
- toFlatObject: dr,
515
+ merge: Ie,
516
+ extend: fr,
517
+ trim: ur,
518
+ stripBOM: dr,
519
+ inherits: hr,
520
+ toFlatObject: pr,
521
521
  kindOf: Ae,
522
522
  kindOfTest: D,
523
- endsWith: hr,
524
- toArray: pr,
525
- forEachEntry: yr,
526
- matchAll: br,
527
- isHTMLForm: gr,
528
- hasOwnProperty: Ke,
529
- hasOwnProp: Ke,
523
+ endsWith: mr,
524
+ toArray: yr,
525
+ forEachEntry: gr,
526
+ matchAll: Er,
527
+ isHTMLForm: wr,
528
+ hasOwnProperty: Ge,
529
+ hasOwnProp: Ge,
530
530
  // an alias to avoid ESLint no-prototype-builtins detection
531
- reduceDescriptors: gt,
532
- freezeMethods: Rr,
533
- toObjectSet: Sr,
534
- toCamelCase: wr,
535
- noop: Tr,
536
- toFiniteNumber: Ar,
537
- findKey: yt,
531
+ reduceDescriptors: wt,
532
+ freezeMethods: Tr,
533
+ toObjectSet: Ar,
534
+ toCamelCase: Rr,
535
+ noop: xr,
536
+ toFiniteNumber: _r,
537
+ findKey: gt,
538
538
  global: K,
539
- isContextDefined: bt,
540
- isSpecCompliantForm: xr,
541
- toJSONObject: Or,
542
- isAsyncFn: _r,
543
- isThenable: Nr,
544
- setImmediate: wt,
545
- asap: Cr,
546
- isIterable: Pr
539
+ isContextDefined: Et,
540
+ isSpecCompliantForm: Or,
541
+ toJSONObject: Nr,
542
+ isAsyncFn: Cr,
543
+ isThenable: Pr,
544
+ setImmediate: Rt,
545
+ asap: jr,
546
+ isIterable: vr
547
547
  };
548
- let g = class Et extends Error {
548
+ let g = class St extends Error {
549
549
  static from(e, r, n, s, o, i) {
550
- const c = new Et(e.message, r || e.code, n, s, o);
550
+ const c = new St(e.message, r || e.code, n, s, o);
551
551
  return c.cause = e, c.name = e.name, i && Object.assign(c, i), c;
552
552
  }
553
553
  /**
@@ -596,25 +596,25 @@ g.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
596
596
  g.ERR_CANCELED = "ERR_CANCELED";
597
597
  g.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
598
598
  g.ERR_INVALID_URL = "ERR_INVALID_URL";
599
- const jr = null;
600
- function Ue(t) {
599
+ const kr = null;
600
+ function Fe(t) {
601
601
  return a.isPlainObject(t) || a.isArray(t);
602
602
  }
603
- function Rt(t) {
603
+ function Tt(t) {
604
604
  return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
605
605
  }
606
- function Ye(t, e, r) {
606
+ function Qe(t, e, r) {
607
607
  return t ? t.concat(e).map(function(s, o) {
608
- return s = Rt(s), !r && o ? "[" + s + "]" : s;
608
+ return s = Tt(s), !r && o ? "[" + s + "]" : s;
609
609
  }).join(r ? "." : "") : e;
610
610
  }
611
- function vr(t) {
612
- return a.isArray(t) && !t.some(Ue);
611
+ function Lr(t) {
612
+ return a.isArray(t) && !t.some(Fe);
613
613
  }
614
- const kr = a.toFlatObject(a, {}, null, function(e) {
614
+ const Ur = a.toFlatObject(a, {}, null, function(e) {
615
615
  return /^is[A-Z]/.test(e);
616
616
  });
617
- function Oe(t, e, r) {
617
+ function _e(t, e, r) {
618
618
  if (!a.isObject(t))
619
619
  throw new TypeError("target must be an object");
620
620
  e = e || new FormData(), r = a.toFlatObject(r, {
@@ -642,21 +642,21 @@ function Oe(t, e, r) {
642
642
  if (f && !h && typeof f == "object") {
643
643
  if (a.endsWith(y, "{}"))
644
644
  y = n ? y : y.slice(0, -2), f = JSON.stringify(f);
645
- else if (a.isArray(f) && vr(f) || (a.isFileList(f) || a.endsWith(y, "[]")) && (S = a.toArray(f)))
646
- return y = Rt(y), S.forEach(function(O, C) {
647
- !(a.isUndefined(O) || O === null) && e.append(
645
+ else if (a.isArray(f) && Lr(f) || (a.isFileList(f) || a.endsWith(y, "[]")) && (S = a.toArray(f)))
646
+ return y = Tt(y), S.forEach(function(_, C) {
647
+ !(a.isUndefined(_) || _ === null) && e.append(
648
648
  // eslint-disable-next-line no-nested-ternary
649
- i === !0 ? Ye([y], C, o) : i === null ? y : y + "[]",
650
- d(O)
649
+ i === !0 ? Qe([y], C, o) : i === null ? y : y + "[]",
650
+ d(_)
651
651
  );
652
652
  }), !1;
653
653
  }
654
- return Ue(f) ? !0 : (e.append(Ye(h, y, o), d(f)), !1);
654
+ return Fe(f) ? !0 : (e.append(Qe(h, y, o), d(f)), !1);
655
655
  }
656
- const m = [], E = Object.assign(kr, {
656
+ const m = [], w = Object.assign(Ur, {
657
657
  defaultVisitor: u,
658
658
  convertValue: d,
659
- isVisitable: Ue
659
+ isVisitable: Fe
660
660
  });
661
661
  function R(f, y) {
662
662
  if (!a.isUndefined(f)) {
@@ -668,7 +668,7 @@ function Oe(t, e, r) {
668
668
  S,
669
669
  a.isString(j) ? j.trim() : j,
670
670
  y,
671
- E
671
+ w
672
672
  )) === !0 && R(S, y ? y.concat(j) : [j]);
673
673
  }), m.pop();
674
674
  }
@@ -677,7 +677,7 @@ function Oe(t, e, r) {
677
677
  throw new TypeError("data must be an object");
678
678
  return R(t), e;
679
679
  }
680
- function Xe(t) {
680
+ function Ze(t) {
681
681
  const e = {
682
682
  "!": "%21",
683
683
  "'": "%27",
@@ -691,38 +691,38 @@ function Xe(t) {
691
691
  return e[n];
692
692
  });
693
693
  }
694
- function Me(t, e) {
695
- this._pairs = [], t && Oe(t, this, e);
694
+ function ze(t, e) {
695
+ this._pairs = [], t && _e(t, this, e);
696
696
  }
697
- const St = Me.prototype;
698
- St.append = function(e, r) {
697
+ const At = ze.prototype;
698
+ At.append = function(e, r) {
699
699
  this._pairs.push([e, r]);
700
700
  };
701
- St.toString = function(e) {
701
+ At.toString = function(e) {
702
702
  const r = e ? function(n) {
703
- return e.call(this, n, Xe);
704
- } : Xe;
703
+ return e.call(this, n, Ze);
704
+ } : Ze;
705
705
  return this._pairs.map(function(s) {
706
706
  return r(s[0]) + "=" + r(s[1]);
707
707
  }, "").join("&");
708
708
  };
709
- function Lr(t) {
709
+ function Ir(t) {
710
710
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
711
711
  }
712
- function Tt(t, e, r) {
712
+ function xt(t, e, r) {
713
713
  if (!e)
714
714
  return t;
715
- const n = r && r.encode || Lr, s = a.isFunction(r) ? {
715
+ const n = r && r.encode || Ir, s = a.isFunction(r) ? {
716
716
  serialize: r
717
717
  } : r, o = s && s.serialize;
718
718
  let i;
719
- if (o ? i = o(e, s) : i = a.isURLSearchParams(e) ? e.toString() : new Me(e, s).toString(n), i) {
719
+ if (o ? i = o(e, s) : i = a.isURLSearchParams(e) ? e.toString() : new ze(e, s).toString(n), i) {
720
720
  const c = t.indexOf("#");
721
721
  c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
722
722
  }
723
723
  return t;
724
724
  }
725
- class Ge {
725
+ class et {
726
726
  constructor() {
727
727
  this.handlers = [];
728
728
  }
@@ -777,43 +777,43 @@ class Ge {
777
777
  });
778
778
  }
779
779
  }
780
- const He = {
780
+ const We = {
781
781
  silentJSONParsing: !0,
782
782
  forcedJSONParsing: !0,
783
783
  clarifyTimeoutError: !1,
784
784
  legacyInterceptorReqResOrdering: !0
785
- }, Ur = typeof URLSearchParams < "u" ? URLSearchParams : Me, Fr = typeof FormData < "u" ? FormData : null, Ir = typeof Blob < "u" ? Blob : null, Br = {
785
+ }, Fr = typeof URLSearchParams < "u" ? URLSearchParams : ze, Br = typeof FormData < "u" ? FormData : null, Dr = typeof Blob < "u" ? Blob : null, qr = {
786
786
  isBrowser: !0,
787
787
  classes: {
788
- URLSearchParams: Ur,
789
- FormData: Fr,
790
- Blob: Ir
788
+ URLSearchParams: Fr,
789
+ FormData: Br,
790
+ Blob: Dr
791
791
  },
792
792
  protocols: ["http", "https", "file", "blob", "url", "data"]
793
- }, $e = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Dr = $e && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), qr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
794
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Mr = $e && window.location.href || "http://localhost", Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
793
+ }, Je = typeof window < "u" && typeof document < "u", Be = typeof navigator == "object" && navigator || void 0, Mr = Je && (!Be || ["ReactNative", "NativeScript", "NS"].indexOf(Be.product) < 0), Hr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
794
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $r = Je && window.location.href || "http://localhost", zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
795
795
  __proto__: null,
796
- hasBrowserEnv: $e,
797
- hasStandardBrowserEnv: Dr,
798
- hasStandardBrowserWebWorkerEnv: qr,
799
- navigator: Fe,
800
- origin: Mr
796
+ hasBrowserEnv: Je,
797
+ hasStandardBrowserEnv: Mr,
798
+ hasStandardBrowserWebWorkerEnv: Hr,
799
+ navigator: Be,
800
+ origin: $r
801
801
  }, Symbol.toStringTag, { value: "Module" })), P = {
802
- ...Hr,
803
- ...Br
802
+ ...zr,
803
+ ...qr
804
804
  };
805
- function $r(t, e) {
806
- return Oe(t, new P.classes.URLSearchParams(), {
805
+ function Wr(t, e) {
806
+ return _e(t, new P.classes.URLSearchParams(), {
807
807
  visitor: function(r, n, s, o) {
808
808
  return P.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
809
809
  },
810
810
  ...e
811
811
  });
812
812
  }
813
- function zr(t) {
813
+ function Jr(t) {
814
814
  return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
815
815
  }
816
- function Wr(t) {
816
+ function Vr(t) {
817
817
  const e = {}, r = Object.keys(t);
818
818
  let n;
819
819
  const s = r.length;
@@ -822,22 +822,22 @@ function Wr(t) {
822
822
  o = r[n], e[o] = t[o];
823
823
  return e;
824
824
  }
825
- function At(t) {
825
+ function _t(t) {
826
826
  function e(r, n, s, o) {
827
827
  let i = r[o++];
828
828
  if (i === "__proto__") return !0;
829
829
  const c = Number.isFinite(+i), p = o >= r.length;
830
- return i = !i && a.isArray(s) ? s.length : i, p ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Wr(s[i])), !c);
830
+ return i = !i && a.isArray(s) ? s.length : i, p ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Vr(s[i])), !c);
831
831
  }
832
832
  if (a.isFormData(t) && a.isFunction(t.entries)) {
833
833
  const r = {};
834
834
  return a.forEachEntry(t, (n, s) => {
835
- e(zr(n), s, r, 0);
835
+ e(Jr(n), s, r, 0);
836
836
  }), r;
837
837
  }
838
838
  return null;
839
839
  }
840
- function Jr(t, e, r) {
840
+ function Kr(t, e, r) {
841
841
  if (a.isString(t))
842
842
  try {
843
843
  return (e || JSON.parse)(t), a.trim(t);
@@ -848,12 +848,12 @@ function Jr(t, e, r) {
848
848
  return (r || JSON.stringify)(t);
849
849
  }
850
850
  const fe = {
851
- transitional: He,
851
+ transitional: We,
852
852
  adapter: ["xhr", "http", "fetch"],
853
853
  transformRequest: [function(e, r) {
854
854
  const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(e);
855
855
  if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
856
- return s ? JSON.stringify(At(e)) : e;
856
+ return s ? JSON.stringify(_t(e)) : e;
857
857
  if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
858
858
  return e;
859
859
  if (a.isArrayBufferView(e))
@@ -863,17 +863,17 @@ const fe = {
863
863
  let c;
864
864
  if (o) {
865
865
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
866
- return $r(e, this.formSerializer).toString();
866
+ return Wr(e, this.formSerializer).toString();
867
867
  if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
868
868
  const p = this.env && this.env.FormData;
869
- return Oe(
869
+ return _e(
870
870
  c ? { "files[]": e } : e,
871
871
  p && new p(),
872
872
  this.formSerializer
873
873
  );
874
874
  }
875
875
  }
876
- return o || s ? (r.setContentType("application/json", !1), Jr(e)) : e;
876
+ return o || s ? (r.setContentType("application/json", !1), Kr(e)) : e;
877
877
  }],
878
878
  transformResponse: [function(e) {
879
879
  const r = this.transitional || fe.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
@@ -916,7 +916,7 @@ const fe = {
916
916
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
917
917
  fe.headers[t] = {};
918
918
  });
919
- const Vr = a.toObjectSet([
919
+ const Yr = a.toObjectSet([
920
920
  "age",
921
921
  "authorization",
922
922
  "content-length",
@@ -934,28 +934,28 @@ const Vr = a.toObjectSet([
934
934
  "referer",
935
935
  "retry-after",
936
936
  "user-agent"
937
- ]), Kr = (t) => {
937
+ ]), Xr = (t) => {
938
938
  const e = {};
939
939
  let r, n, s;
940
940
  return t && t.split(`
941
941
  `).forEach(function(i) {
942
- s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || e[r] && Vr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
942
+ s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || e[r] && Yr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
943
943
  }), e;
944
- }, Qe = Symbol("internals");
944
+ }, tt = Symbol("internals");
945
945
  function ie(t) {
946
946
  return t && String(t).trim().toLowerCase();
947
947
  }
948
- function Ee(t) {
949
- return t === !1 || t == null ? t : a.isArray(t) ? t.map(Ee) : String(t);
948
+ function we(t) {
949
+ return t === !1 || t == null ? t : a.isArray(t) ? t.map(we) : String(t);
950
950
  }
951
- function Yr(t) {
951
+ function Gr(t) {
952
952
  const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
953
953
  let n;
954
954
  for (; n = r.exec(t); )
955
955
  e[n[1]] = n[2];
956
956
  return e;
957
957
  }
958
- const Xr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
958
+ const Qr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
959
959
  function Pe(t, e, r, n, s) {
960
960
  if (a.isFunction(n))
961
961
  return n.call(this, e, r);
@@ -966,10 +966,10 @@ function Pe(t, e, r, n, s) {
966
966
  return n.test(e);
967
967
  }
968
968
  }
969
- function Gr(t) {
969
+ function Zr(t) {
970
970
  return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
971
971
  }
972
- function Qr(t, e) {
972
+ function en(t, e) {
973
973
  const r = a.toCamelCase(" " + e);
974
974
  ["get", "set", "has"].forEach((n) => {
975
975
  Object.defineProperty(t, n + r, {
@@ -991,13 +991,13 @@ let L = class {
991
991
  if (!u)
992
992
  throw new Error("header name must be a non-empty string");
993
993
  const m = a.findKey(s, u);
994
- (!m || s[m] === void 0 || d === !0 || d === void 0 && s[m] !== !1) && (s[m || p] = Ee(c));
994
+ (!m || s[m] === void 0 || d === !0 || d === void 0 && s[m] !== !1) && (s[m || p] = we(c));
995
995
  }
996
996
  const i = (c, p) => a.forEach(c, (d, u) => o(d, u, p));
997
997
  if (a.isPlainObject(e) || e instanceof this.constructor)
998
998
  i(e, r);
999
- else if (a.isString(e) && (e = e.trim()) && !Xr(e))
1000
- i(Kr(e), r);
999
+ else if (a.isString(e) && (e = e.trim()) && !Qr(e))
1000
+ i(Xr(e), r);
1001
1001
  else if (a.isObject(e) && a.isIterable(e)) {
1002
1002
  let c = {}, p, d;
1003
1003
  for (const u of e) {
@@ -1018,7 +1018,7 @@ let L = class {
1018
1018
  if (!r)
1019
1019
  return s;
1020
1020
  if (r === !0)
1021
- return Yr(s);
1021
+ return Gr(s);
1022
1022
  if (a.isFunction(r))
1023
1023
  return r.call(this, s, n);
1024
1024
  if (a.isRegExp(r))
@@ -1059,11 +1059,11 @@ let L = class {
1059
1059
  return a.forEach(this, (s, o) => {
1060
1060
  const i = a.findKey(n, o);
1061
1061
  if (i) {
1062
- r[i] = Ee(s), delete r[o];
1062
+ r[i] = we(s), delete r[o];
1063
1063
  return;
1064
1064
  }
1065
- const c = e ? Gr(o) : String(o).trim();
1066
- c !== o && delete r[o], r[c] = Ee(s), n[c] = !0;
1065
+ const c = e ? Zr(o) : String(o).trim();
1066
+ c !== o && delete r[o], r[c] = we(s), n[c] = !0;
1067
1067
  }), this;
1068
1068
  }
1069
1069
  concat(...e) {
@@ -1096,12 +1096,12 @@ let L = class {
1096
1096
  return r.forEach((s) => n.set(s)), n;
1097
1097
  }
1098
1098
  static accessor(e) {
1099
- const n = (this[Qe] = this[Qe] = {
1099
+ const n = (this[tt] = this[tt] = {
1100
1100
  accessors: {}
1101
1101
  }).accessors, s = this.prototype;
1102
1102
  function o(i) {
1103
1103
  const c = ie(i);
1104
- n[c] || (Qr(s, i), n[c] = !0);
1104
+ n[c] || (en(s, i), n[c] = !0);
1105
1105
  }
1106
1106
  return a.isArray(e) ? e.forEach(o) : o(e), this;
1107
1107
  }
@@ -1124,7 +1124,7 @@ function je(t, e) {
1124
1124
  o = c.call(r, o, s.normalize(), e ? e.status : void 0);
1125
1125
  }), s.normalize(), o;
1126
1126
  }
1127
- function xt(t) {
1127
+ function Ot(t) {
1128
1128
  return !!(t && t.__CANCEL__);
1129
1129
  }
1130
1130
  let de = class extends g {
@@ -1141,7 +1141,7 @@ let de = class extends g {
1141
1141
  super(e ?? "canceled", g.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
1142
1142
  }
1143
1143
  };
1144
- function Ot(t, e, r) {
1144
+ function Nt(t, e, r) {
1145
1145
  const n = r.config.validateStatus;
1146
1146
  !r.status || !n || n(r.status) ? t(r) : e(new g(
1147
1147
  "Request failed with status code " + r.status,
@@ -1151,27 +1151,27 @@ function Ot(t, e, r) {
1151
1151
  r
1152
1152
  ));
1153
1153
  }
1154
- function Zr(t) {
1154
+ function tn(t) {
1155
1155
  const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
1156
1156
  return e && e[1] || "";
1157
1157
  }
1158
- function en(t, e) {
1158
+ function rn(t, e) {
1159
1159
  t = t || 10;
1160
1160
  const r = new Array(t), n = new Array(t);
1161
1161
  let s = 0, o = 0, i;
1162
1162
  return e = e !== void 0 ? e : 1e3, function(p) {
1163
1163
  const d = Date.now(), u = n[o];
1164
1164
  i || (i = d), r[s] = p, n[s] = d;
1165
- let m = o, E = 0;
1165
+ let m = o, w = 0;
1166
1166
  for (; m !== s; )
1167
- E += r[m++], m = m % t;
1167
+ w += r[m++], m = m % t;
1168
1168
  if (s = (s + 1) % t, s === o && (o = (o + 1) % t), d - i < e)
1169
1169
  return;
1170
1170
  const R = u && d - u;
1171
- return R ? Math.round(E * 1e3 / R) : void 0;
1171
+ return R ? Math.round(w * 1e3 / R) : void 0;
1172
1172
  };
1173
1173
  }
1174
- function tn(t, e) {
1174
+ function nn(t, e) {
1175
1175
  let r = 0, n = 1e3 / e, s, o;
1176
1176
  const i = (d, u = Date.now()) => {
1177
1177
  r = u, s = null, o && (clearTimeout(o), o = null), t(...d);
@@ -1185,8 +1185,8 @@ function tn(t, e) {
1185
1185
  }
1186
1186
  const Se = (t, e, r = 3) => {
1187
1187
  let n = 0;
1188
- const s = en(50, 250);
1189
- return tn((o) => {
1188
+ const s = rn(50, 250);
1189
+ return nn((o) => {
1190
1190
  const i = o.loaded, c = o.lengthComputable ? o.total : void 0, p = i - n, d = s(p), u = i <= c;
1191
1191
  n = i;
1192
1192
  const m = {
@@ -1202,17 +1202,17 @@ const Se = (t, e, r = 3) => {
1202
1202
  };
1203
1203
  t(m);
1204
1204
  }, r);
1205
- }, Ze = (t, e) => {
1205
+ }, rt = (t, e) => {
1206
1206
  const r = t != null;
1207
1207
  return [(n) => e[0]({
1208
1208
  lengthComputable: r,
1209
1209
  total: t,
1210
1210
  loaded: n
1211
1211
  }), e[1]];
1212
- }, et = (t) => (...e) => a.asap(() => t(...e)), rn = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, P.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
1212
+ }, nt = (t) => (...e) => a.asap(() => t(...e)), sn = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, P.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
1213
1213
  new URL(P.origin),
1214
1214
  P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
1215
- ) : () => !0, nn = P.hasStandardBrowserEnv ? (
1215
+ ) : () => !0, on = P.hasStandardBrowserEnv ? (
1216
1216
  // Standard browser envs support document.cookie
1217
1217
  {
1218
1218
  write(t, e, r, n, s, o, i) {
@@ -1241,28 +1241,28 @@ const Se = (t, e, r = 3) => {
1241
1241
  }
1242
1242
  }
1243
1243
  );
1244
- function sn(t) {
1244
+ function an(t) {
1245
1245
  return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
1246
1246
  }
1247
- function on(t, e) {
1247
+ function cn(t, e) {
1248
1248
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
1249
1249
  }
1250
- function _t(t, e, r) {
1251
- let n = !sn(e);
1252
- return t && (n || r == !1) ? on(t, e) : e;
1250
+ function Ct(t, e, r) {
1251
+ let n = !an(e);
1252
+ return t && (n || r == !1) ? cn(t, e) : e;
1253
1253
  }
1254
- const tt = (t) => t instanceof L ? { ...t } : t;
1254
+ const st = (t) => t instanceof L ? { ...t } : t;
1255
1255
  function X(t, e) {
1256
1256
  e = e || {};
1257
1257
  const r = {};
1258
- function n(d, u, m, E) {
1259
- return a.isPlainObject(d) && a.isPlainObject(u) ? a.merge.call({ caseless: E }, d, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
1258
+ function n(d, u, m, w) {
1259
+ return a.isPlainObject(d) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, d, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
1260
1260
  }
1261
- function s(d, u, m, E) {
1261
+ function s(d, u, m, w) {
1262
1262
  if (a.isUndefined(u)) {
1263
1263
  if (!a.isUndefined(d))
1264
- return n(void 0, d, m, E);
1265
- } else return n(d, u, m, E);
1264
+ return n(void 0, d, m, w);
1265
+ } else return n(d, u, m, w);
1266
1266
  }
1267
1267
  function o(d, u) {
1268
1268
  if (!a.isUndefined(u))
@@ -1309,22 +1309,22 @@ function X(t, e) {
1309
1309
  socketPath: i,
1310
1310
  responseEncoding: i,
1311
1311
  validateStatus: c,
1312
- headers: (d, u, m) => s(tt(d), tt(u), m, !0)
1312
+ headers: (d, u, m) => s(st(d), st(u), m, !0)
1313
1313
  };
1314
1314
  return a.forEach(
1315
1315
  Object.keys({ ...t, ...e }),
1316
1316
  function(u) {
1317
1317
  if (u === "__proto__" || u === "constructor" || u === "prototype")
1318
1318
  return;
1319
- const m = a.hasOwnProp(p, u) ? p[u] : s, E = m(t[u], e[u], u);
1320
- a.isUndefined(E) && m !== c || (r[u] = E);
1319
+ const m = a.hasOwnProp(p, u) ? p[u] : s, w = m(t[u], e[u], u);
1320
+ a.isUndefined(w) && m !== c || (r[u] = w);
1321
1321
  }
1322
1322
  ), r;
1323
1323
  }
1324
- const Nt = (t) => {
1324
+ const Pt = (t) => {
1325
1325
  const e = X({}, t);
1326
1326
  let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = e;
1327
- if (e.headers = i = L.from(i), e.url = Tt(_t(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && i.set(
1327
+ if (e.headers = i = L.from(i), e.url = xt(Ct(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && i.set(
1328
1328
  "Authorization",
1329
1329
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1330
1330
  ), a.isFormData(r)) {
@@ -1337,17 +1337,17 @@ const Nt = (t) => {
1337
1337
  });
1338
1338
  }
1339
1339
  }
1340
- if (P.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 && rn(e.url))) {
1341
- const p = s && o && nn.read(o);
1340
+ if (P.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 && sn(e.url))) {
1341
+ const p = s && o && on.read(o);
1342
1342
  p && i.set(s, p);
1343
1343
  }
1344
1344
  return e;
1345
- }, an = typeof XMLHttpRequest < "u", cn = an && function(t) {
1345
+ }, ln = typeof XMLHttpRequest < "u", un = ln && function(t) {
1346
1346
  return new Promise(function(r, n) {
1347
- const s = Nt(t);
1347
+ const s = Pt(t);
1348
1348
  let o = s.data;
1349
1349
  const i = L.from(s.headers).normalize();
1350
- let { responseType: c, onUploadProgress: p, onDownloadProgress: d } = s, u, m, E, R, f;
1350
+ let { responseType: c, onUploadProgress: p, onDownloadProgress: d } = s, u, m, w, R, f;
1351
1351
  function y() {
1352
1352
  R && R(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1353
1353
  }
@@ -1356,17 +1356,17 @@ const Nt = (t) => {
1356
1356
  function S() {
1357
1357
  if (!h)
1358
1358
  return;
1359
- const O = L.from(
1359
+ const _ = L.from(
1360
1360
  "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1361
1361
  ), U = {
1362
1362
  data: !c || c === "text" || c === "json" ? h.responseText : h.response,
1363
1363
  status: h.status,
1364
1364
  statusText: h.statusText,
1365
- headers: O,
1365
+ headers: _,
1366
1366
  config: t,
1367
1367
  request: h
1368
1368
  };
1369
- Ot(function(v) {
1369
+ Nt(function(v) {
1370
1370
  r(v), y();
1371
1371
  }, function(v) {
1372
1372
  n(v), y();
@@ -1381,7 +1381,7 @@ const Nt = (t) => {
1381
1381
  M.event = C || null, n(M), h = null;
1382
1382
  }, h.ontimeout = function() {
1383
1383
  let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1384
- const U = s.transitional || He;
1384
+ const U = s.transitional || We;
1385
1385
  s.timeoutErrorMessage && (C = s.timeoutErrorMessage), n(new g(
1386
1386
  C,
1387
1387
  U.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
@@ -1390,17 +1390,17 @@ const Nt = (t) => {
1390
1390
  )), h = null;
1391
1391
  }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(C, U) {
1392
1392
  h.setRequestHeader(U, C);
1393
- }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), d && ([E, f] = Se(d, !0), h.addEventListener("progress", E)), p && h.upload && ([m, R] = Se(p), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (O) => {
1394
- h && (n(!O || O.type ? new de(null, t, h) : O), h.abort(), h = null);
1393
+ }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), d && ([w, f] = Se(d, !0), h.addEventListener("progress", w)), p && h.upload && ([m, R] = Se(p), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (_) => {
1394
+ h && (n(!_ || _.type ? new de(null, t, h) : _), h.abort(), h = null);
1395
1395
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1396
- const j = Zr(s.url);
1396
+ const j = tn(s.url);
1397
1397
  if (j && P.protocols.indexOf(j) === -1) {
1398
1398
  n(new g("Unsupported protocol " + j + ":", g.ERR_BAD_REQUEST, t));
1399
1399
  return;
1400
1400
  }
1401
1401
  h.send(o || null);
1402
1402
  });
1403
- }, ln = (t, e) => {
1403
+ }, fn = (t, e) => {
1404
1404
  const { length: r } = t = t ? t.filter(Boolean) : [];
1405
1405
  if (e || r) {
1406
1406
  let n = new AbortController(), s;
@@ -1423,7 +1423,7 @@ const Nt = (t) => {
1423
1423
  const { signal: p } = n;
1424
1424
  return p.unsubscribe = () => a.asap(c), p;
1425
1425
  }
1426
- }, un = function* (t, e) {
1426
+ }, dn = function* (t, e) {
1427
1427
  let r = t.byteLength;
1428
1428
  if (r < e) {
1429
1429
  yield t;
@@ -1432,10 +1432,10 @@ const Nt = (t) => {
1432
1432
  let n = 0, s;
1433
1433
  for (; n < r; )
1434
1434
  s = n + e, yield t.slice(n, s), n = s;
1435
- }, fn = async function* (t, e) {
1436
- for await (const r of dn(t))
1437
- yield* un(r, e);
1438
- }, dn = async function* (t) {
1435
+ }, hn = async function* (t, e) {
1436
+ for await (const r of pn(t))
1437
+ yield* dn(r, e);
1438
+ }, pn = async function* (t) {
1439
1439
  if (t[Symbol.asyncIterator]) {
1440
1440
  yield* t;
1441
1441
  return;
@@ -1451,8 +1451,8 @@ const Nt = (t) => {
1451
1451
  } finally {
1452
1452
  await e.cancel();
1453
1453
  }
1454
- }, rt = (t, e, r, n) => {
1455
- const s = fn(t, e);
1454
+ }, ot = (t, e, r, n) => {
1455
+ const s = hn(t, e);
1456
1456
  let o = 0, i, c = (p) => {
1457
1457
  i || (i = !0, n && n(p));
1458
1458
  };
@@ -1466,8 +1466,8 @@ const Nt = (t) => {
1466
1466
  }
1467
1467
  let m = u.byteLength;
1468
1468
  if (r) {
1469
- let E = o += m;
1470
- r(E);
1469
+ let w = o += m;
1470
+ r(w);
1471
1471
  }
1472
1472
  p.enqueue(new Uint8Array(u));
1473
1473
  } catch (d) {
@@ -1480,36 +1480,36 @@ const Nt = (t) => {
1480
1480
  }, {
1481
1481
  highWaterMark: 2
1482
1482
  });
1483
- }, nt = 64 * 1024, { isFunction: ge } = a, hn = (({ Request: t, Response: e }) => ({
1483
+ }, it = 64 * 1024, { isFunction: ge } = a, mn = (({ Request: t, Response: e }) => ({
1484
1484
  Request: t,
1485
1485
  Response: e
1486
1486
  }))(a.global), {
1487
- ReadableStream: st,
1488
- TextEncoder: ot
1489
- } = a.global, it = (t, ...e) => {
1487
+ ReadableStream: at,
1488
+ TextEncoder: ct
1489
+ } = a.global, lt = (t, ...e) => {
1490
1490
  try {
1491
1491
  return !!t(...e);
1492
1492
  } catch {
1493
1493
  return !1;
1494
1494
  }
1495
- }, pn = (t) => {
1495
+ }, yn = (t) => {
1496
1496
  t = a.merge.call({
1497
1497
  skipUndefined: !0
1498
- }, hn, t);
1498
+ }, mn, t);
1499
1499
  const { fetch: e, Request: r, Response: n } = t, s = e ? ge(e) : typeof fetch == "function", o = ge(r), i = ge(n);
1500
1500
  if (!s)
1501
1501
  return !1;
1502
- const c = s && ge(st), p = s && (typeof ot == "function" ? /* @__PURE__ */ ((f) => (y) => f.encode(y))(new ot()) : async (f) => new Uint8Array(await new r(f).arrayBuffer())), d = o && c && it(() => {
1502
+ const c = s && ge(at), p = s && (typeof ct == "function" ? /* @__PURE__ */ ((f) => (y) => f.encode(y))(new ct()) : async (f) => new Uint8Array(await new r(f).arrayBuffer())), d = o && c && lt(() => {
1503
1503
  let f = !1;
1504
1504
  const y = new r(P.origin, {
1505
- body: new st(),
1505
+ body: new at(),
1506
1506
  method: "POST",
1507
1507
  get duplex() {
1508
1508
  return f = !0, "half";
1509
1509
  }
1510
1510
  }).headers.has("Content-Type");
1511
1511
  return f && !y;
1512
- }), u = i && c && it(() => a.isReadableStream(new n("").body)), m = {
1512
+ }), u = i && c && lt(() => a.isReadableStream(new n("").body)), m = {
1513
1513
  stream: u && ((f) => f.body)
1514
1514
  };
1515
1515
  s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
@@ -1520,7 +1520,7 @@ const Nt = (t) => {
1520
1520
  throw new g(`Response type '${f}' is not supported`, g.ERR_NOT_SUPPORT, h);
1521
1521
  });
1522
1522
  });
1523
- const E = async (f) => {
1523
+ const w = async (f) => {
1524
1524
  if (f == null)
1525
1525
  return 0;
1526
1526
  if (a.isBlob(f))
@@ -1536,7 +1536,7 @@ const Nt = (t) => {
1536
1536
  return (await p(f)).byteLength;
1537
1537
  }, R = async (f, y) => {
1538
1538
  const h = a.toFiniteNumber(f.getContentLength());
1539
- return h ?? E(y);
1539
+ return h ?? w(y);
1540
1540
  };
1541
1541
  return async (f) => {
1542
1542
  let {
@@ -1544,7 +1544,7 @@ const Nt = (t) => {
1544
1544
  method: h,
1545
1545
  data: S,
1546
1546
  signal: j,
1547
- cancelToken: O,
1547
+ cancelToken: _,
1548
1548
  timeout: C,
1549
1549
  onDownloadProgress: U,
1550
1550
  onUploadProgress: M,
@@ -1552,9 +1552,9 @@ const Nt = (t) => {
1552
1552
  headers: te,
1553
1553
  withCredentials: $ = "same-origin",
1554
1554
  fetchOptions: pe
1555
- } = Nt(f), me = e || fetch;
1555
+ } = Pt(f), me = e || fetch;
1556
1556
  v = v ? (v + "").toLowerCase() : "text";
1557
- let z = ln([j, O && O.toAbortSignal()], C), W = null;
1557
+ let z = fn([j, _ && _.toAbortSignal()], C), W = null;
1558
1558
  const H = z && z.unsubscribe && (() => {
1559
1559
  z.unsubscribe();
1560
1560
  });
@@ -1565,13 +1565,13 @@ const Nt = (t) => {
1565
1565
  method: "POST",
1566
1566
  body: S,
1567
1567
  duplex: "half"
1568
- }), w;
1569
- if (a.isFormData(S) && (w = l.headers.get("content-type")) && te.setContentType(w), l.body) {
1570
- const [T, A] = Ze(
1568
+ }), E;
1569
+ if (a.isFormData(S) && (E = l.headers.get("content-type")) && te.setContentType(E), l.body) {
1570
+ const [T, A] = rt(
1571
1571
  G,
1572
- Se(et(M))
1572
+ Se(nt(M))
1573
1573
  );
1574
- S = rt(l.body, nt, T, A);
1574
+ S = ot(l.body, it, T, A);
1575
1575
  }
1576
1576
  }
1577
1577
  a.isString($) || ($ = $ ? "include" : "omit");
@@ -1592,12 +1592,12 @@ const Nt = (t) => {
1592
1592
  ["status", "statusText", "headers"].forEach((J) => {
1593
1593
  l[J] = B[J];
1594
1594
  });
1595
- const w = a.toFiniteNumber(B.headers.get("content-length")), [T, A] = U && Ze(
1596
- w,
1597
- Se(et(U), !0)
1595
+ const E = a.toFiniteNumber(B.headers.get("content-length")), [T, A] = U && rt(
1596
+ E,
1597
+ Se(nt(U), !0)
1598
1598
  ) || [];
1599
1599
  B = new n(
1600
- rt(B.body, nt, T, () => {
1600
+ ot(B.body, it, T, () => {
1601
1601
  A && A(), H && H();
1602
1602
  }),
1603
1603
  l
@@ -1605,8 +1605,8 @@ const Nt = (t) => {
1605
1605
  }
1606
1606
  v = v || "text";
1607
1607
  let ye = await m[a.findKey(m, v) || "text"](B, f);
1608
- return !ne && H && H(), await new Promise((l, w) => {
1609
- Ot(l, w, {
1608
+ return !ne && H && H(), await new Promise((l, E) => {
1609
+ Nt(l, E, {
1610
1610
  data: ye,
1611
1611
  headers: L.from(B.headers),
1612
1612
  status: B.status,
@@ -1624,27 +1624,27 @@ const Nt = (t) => {
1624
1624
  ) : g.from(N, N && N.code, f, W, N && N.response);
1625
1625
  }
1626
1626
  };
1627
- }, mn = /* @__PURE__ */ new Map(), Ct = (t) => {
1627
+ }, bn = /* @__PURE__ */ new Map(), jt = (t) => {
1628
1628
  let e = t && t.env || {};
1629
1629
  const { fetch: r, Request: n, Response: s } = e, o = [
1630
1630
  n,
1631
1631
  s,
1632
1632
  r
1633
1633
  ];
1634
- let i = o.length, c = i, p, d, u = mn;
1634
+ let i = o.length, c = i, p, d, u = bn;
1635
1635
  for (; c--; )
1636
- p = o[c], d = u.get(p), d === void 0 && u.set(p, d = c ? /* @__PURE__ */ new Map() : pn(e)), u = d;
1636
+ p = o[c], d = u.get(p), d === void 0 && u.set(p, d = c ? /* @__PURE__ */ new Map() : yn(e)), u = d;
1637
1637
  return d;
1638
1638
  };
1639
- Ct();
1640
- const ze = {
1641
- http: jr,
1642
- xhr: cn,
1639
+ jt();
1640
+ const Ve = {
1641
+ http: kr,
1642
+ xhr: un,
1643
1643
  fetch: {
1644
- get: Ct
1644
+ get: jt
1645
1645
  }
1646
1646
  };
1647
- a.forEach(ze, (t, e) => {
1647
+ a.forEach(Ve, (t, e) => {
1648
1648
  if (t) {
1649
1649
  try {
1650
1650
  Object.defineProperty(t, "name", { value: e });
@@ -1653,8 +1653,8 @@ a.forEach(ze, (t, e) => {
1653
1653
  Object.defineProperty(t, "adapterName", { value: e });
1654
1654
  }
1655
1655
  });
1656
- const at = (t) => `- ${t}`, yn = (t) => a.isFunction(t) || t === null || t === !1;
1657
- function bn(t, e) {
1656
+ const ut = (t) => `- ${t}`, gn = (t) => a.isFunction(t) || t === null || t === !1;
1657
+ function En(t, e) {
1658
1658
  t = a.isArray(t) ? t : [t];
1659
1659
  const { length: r } = t;
1660
1660
  let n, s;
@@ -1662,7 +1662,7 @@ function bn(t, e) {
1662
1662
  for (let i = 0; i < r; i++) {
1663
1663
  n = t[i];
1664
1664
  let c;
1665
- if (s = n, !yn(n) && (s = ze[(c = String(n)).toLowerCase()], s === void 0))
1665
+ if (s = n, !gn(n) && (s = Ve[(c = String(n)).toLowerCase()], s === void 0))
1666
1666
  throw new g(`Unknown adapter '${c}'`);
1667
1667
  if (s && (a.isFunction(s) || (s = s.get(e))))
1668
1668
  break;
@@ -1673,8 +1673,8 @@ function bn(t, e) {
1673
1673
  ([p, d]) => `adapter ${p} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1674
1674
  );
1675
1675
  let c = r ? i.length > 1 ? `since :
1676
- ` + i.map(at).join(`
1677
- `) : " " + at(i[0]) : "as no adapter specified";
1676
+ ` + i.map(ut).join(`
1677
+ `) : " " + ut(i[0]) : "as no adapter specified";
1678
1678
  throw new g(
1679
1679
  "There is no suitable adapter to dispatch the request " + c,
1680
1680
  "ERR_NOT_SUPPORT"
@@ -1682,50 +1682,50 @@ function bn(t, e) {
1682
1682
  }
1683
1683
  return s;
1684
1684
  }
1685
- const Pt = {
1685
+ const vt = {
1686
1686
  /**
1687
1687
  * Resolve an adapter from a list of adapter names or functions.
1688
1688
  * @type {Function}
1689
1689
  */
1690
- getAdapter: bn,
1690
+ getAdapter: En,
1691
1691
  /**
1692
1692
  * Exposes all known adapters
1693
1693
  * @type {Object<string, Function|Object>}
1694
1694
  */
1695
- adapters: ze
1695
+ adapters: Ve
1696
1696
  };
1697
1697
  function ve(t) {
1698
1698
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1699
1699
  throw new de(null, t);
1700
1700
  }
1701
- function ct(t) {
1701
+ function ft(t) {
1702
1702
  return ve(t), t.headers = L.from(t.headers), t.data = je.call(
1703
1703
  t,
1704
1704
  t.transformRequest
1705
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Pt.getAdapter(t.adapter || fe.adapter, t)(t).then(function(n) {
1705
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), vt.getAdapter(t.adapter || fe.adapter, t)(t).then(function(n) {
1706
1706
  return ve(t), n.data = je.call(
1707
1707
  t,
1708
1708
  t.transformResponse,
1709
1709
  n
1710
1710
  ), n.headers = L.from(n.headers), n;
1711
1711
  }, function(n) {
1712
- return xt(n) || (ve(t), n && n.response && (n.response.data = je.call(
1712
+ return Ot(n) || (ve(t), n && n.response && (n.response.data = je.call(
1713
1713
  t,
1714
1714
  t.transformResponse,
1715
1715
  n.response
1716
1716
  ), n.response.headers = L.from(n.response.headers))), Promise.reject(n);
1717
1717
  });
1718
1718
  }
1719
- const jt = "1.13.5", _e = {};
1719
+ const kt = "1.13.5", Oe = {};
1720
1720
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1721
- _e[t] = function(n) {
1721
+ Oe[t] = function(n) {
1722
1722
  return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
1723
1723
  };
1724
1724
  });
1725
- const lt = {};
1726
- _e.transitional = function(e, r, n) {
1725
+ const dt = {};
1726
+ Oe.transitional = function(e, r, n) {
1727
1727
  function s(o, i) {
1728
- return "[Axios v" + jt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
1728
+ return "[Axios v" + kt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
1729
1729
  }
1730
1730
  return (o, i, c) => {
1731
1731
  if (e === !1)
@@ -1733,7 +1733,7 @@ _e.transitional = function(e, r, n) {
1733
1733
  s(i, " has been removed" + (r ? " in " + r : "")),
1734
1734
  g.ERR_DEPRECATED
1735
1735
  );
1736
- return r && !lt[i] && (lt[i] = !0, console.warn(
1736
+ return r && !dt[i] && (dt[i] = !0, console.warn(
1737
1737
  s(
1738
1738
  i,
1739
1739
  " has been deprecated since v" + r + " and will be removed in the near future"
@@ -1741,10 +1741,10 @@ _e.transitional = function(e, r, n) {
1741
1741
  )), e ? e(o, i, c) : !0;
1742
1742
  };
1743
1743
  };
1744
- _e.spelling = function(e) {
1744
+ Oe.spelling = function(e) {
1745
1745
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
1746
1746
  };
1747
- function gn(t, e, r) {
1747
+ function wn(t, e, r) {
1748
1748
  if (typeof t != "object")
1749
1749
  throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
1750
1750
  const n = Object.keys(t);
@@ -1762,14 +1762,14 @@ function gn(t, e, r) {
1762
1762
  }
1763
1763
  }
1764
1764
  const Re = {
1765
- assertOptions: gn,
1766
- validators: _e
1767
- }, I = Re.validators;
1765
+ assertOptions: wn,
1766
+ validators: Oe
1767
+ }, F = Re.validators;
1768
1768
  let Y = class {
1769
1769
  constructor(e) {
1770
1770
  this.defaults = e || {}, this.interceptors = {
1771
- request: new Ge(),
1772
- response: new Ge()
1771
+ request: new et(),
1772
+ response: new et()
1773
1773
  };
1774
1774
  }
1775
1775
  /**
@@ -1801,18 +1801,18 @@ let Y = class {
1801
1801
  typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = X(this.defaults, r);
1802
1802
  const { transitional: n, paramsSerializer: s, headers: o } = r;
1803
1803
  n !== void 0 && Re.assertOptions(n, {
1804
- silentJSONParsing: I.transitional(I.boolean),
1805
- forcedJSONParsing: I.transitional(I.boolean),
1806
- clarifyTimeoutError: I.transitional(I.boolean),
1807
- legacyInterceptorReqResOrdering: I.transitional(I.boolean)
1804
+ silentJSONParsing: F.transitional(F.boolean),
1805
+ forcedJSONParsing: F.transitional(F.boolean),
1806
+ clarifyTimeoutError: F.transitional(F.boolean),
1807
+ legacyInterceptorReqResOrdering: F.transitional(F.boolean)
1808
1808
  }, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
1809
1809
  serialize: s
1810
1810
  } : Re.assertOptions(s, {
1811
- encode: I.function,
1812
- serialize: I.function
1811
+ encode: F.function,
1812
+ serialize: F.function
1813
1813
  }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Re.assertOptions(r, {
1814
- baseUrl: I.spelling("baseURL"),
1815
- withXsrfToken: I.spelling("withXSRFToken")
1814
+ baseUrl: F.spelling("baseURL"),
1815
+ withXsrfToken: F.spelling("withXSRFToken")
1816
1816
  }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
1817
1817
  let i = o && a.merge(
1818
1818
  o.common,
@@ -1830,23 +1830,23 @@ let Y = class {
1830
1830
  if (typeof y.runWhen == "function" && y.runWhen(r) === !1)
1831
1831
  return;
1832
1832
  p = p && y.synchronous;
1833
- const h = r.transitional || He;
1833
+ const h = r.transitional || We;
1834
1834
  h && h.legacyInterceptorReqResOrdering ? c.unshift(y.fulfilled, y.rejected) : c.push(y.fulfilled, y.rejected);
1835
1835
  });
1836
1836
  const d = [];
1837
1837
  this.interceptors.response.forEach(function(y) {
1838
1838
  d.push(y.fulfilled, y.rejected);
1839
1839
  });
1840
- let u, m = 0, E;
1840
+ let u, m = 0, w;
1841
1841
  if (!p) {
1842
- const f = [ct.bind(this), void 0];
1843
- for (f.unshift(...c), f.push(...d), E = f.length, u = Promise.resolve(r); m < E; )
1842
+ const f = [ft.bind(this), void 0];
1843
+ for (f.unshift(...c), f.push(...d), w = f.length, u = Promise.resolve(r); m < w; )
1844
1844
  u = u.then(f[m++], f[m++]);
1845
1845
  return u;
1846
1846
  }
1847
- E = c.length;
1847
+ w = c.length;
1848
1848
  let R = r;
1849
- for (; m < E; ) {
1849
+ for (; m < w; ) {
1850
1850
  const f = c[m++], y = c[m++];
1851
1851
  try {
1852
1852
  R = f(R);
@@ -1856,18 +1856,18 @@ let Y = class {
1856
1856
  }
1857
1857
  }
1858
1858
  try {
1859
- u = ct.call(this, R);
1859
+ u = ft.call(this, R);
1860
1860
  } catch (f) {
1861
1861
  return Promise.reject(f);
1862
1862
  }
1863
- for (m = 0, E = d.length; m < E; )
1863
+ for (m = 0, w = d.length; m < w; )
1864
1864
  u = u.then(d[m++], d[m++]);
1865
1865
  return u;
1866
1866
  }
1867
1867
  getUri(e) {
1868
1868
  e = X(this.defaults, e);
1869
- const r = _t(e.baseURL, e.url, e.allowAbsoluteUrls);
1870
- return Tt(r, e.params, e.paramsSerializer);
1869
+ const r = Ct(e.baseURL, e.url, e.allowAbsoluteUrls);
1870
+ return xt(r, e.params, e.paramsSerializer);
1871
1871
  }
1872
1872
  };
1873
1873
  a.forEach(["delete", "get", "head", "options"], function(e) {
@@ -1894,7 +1894,7 @@ a.forEach(["post", "put", "patch"], function(e) {
1894
1894
  }
1895
1895
  Y.prototype[e] = r(), Y.prototype[e + "Form"] = r(!0);
1896
1896
  });
1897
- let wn = class vt {
1897
+ let Rn = class Lt {
1898
1898
  constructor(e) {
1899
1899
  if (typeof e != "function")
1900
1900
  throw new TypeError("executor must be a function.");
@@ -1960,22 +1960,22 @@ let wn = class vt {
1960
1960
  static source() {
1961
1961
  let e;
1962
1962
  return {
1963
- token: new vt(function(s) {
1963
+ token: new Lt(function(s) {
1964
1964
  e = s;
1965
1965
  }),
1966
1966
  cancel: e
1967
1967
  };
1968
1968
  }
1969
1969
  };
1970
- function En(t) {
1970
+ function Sn(t) {
1971
1971
  return function(r) {
1972
1972
  return t.apply(null, r);
1973
1973
  };
1974
1974
  }
1975
- function Rn(t) {
1975
+ function Tn(t) {
1976
1976
  return a.isObject(t) && t.isAxiosError === !0;
1977
1977
  }
1978
- const Ie = {
1978
+ const De = {
1979
1979
  Continue: 100,
1980
1980
  SwitchingProtocols: 101,
1981
1981
  Processing: 102,
@@ -2046,70 +2046,78 @@ const Ie = {
2046
2046
  SslHandshakeFailed: 525,
2047
2047
  InvalidSslCertificate: 526
2048
2048
  };
2049
- Object.entries(Ie).forEach(([t, e]) => {
2050
- Ie[e] = t;
2049
+ Object.entries(De).forEach(([t, e]) => {
2050
+ De[e] = t;
2051
2051
  });
2052
- function kt(t) {
2053
- const e = new Y(t), r = dt(Y.prototype.request, e);
2052
+ function Ut(t) {
2053
+ const e = new Y(t), r = pt(Y.prototype.request, e);
2054
2054
  return a.extend(r, Y.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
2055
- return kt(X(t, s));
2055
+ return Ut(X(t, s));
2056
2056
  }, r;
2057
2057
  }
2058
- const x = kt(fe);
2058
+ const x = Ut(fe);
2059
2059
  x.Axios = Y;
2060
2060
  x.CanceledError = de;
2061
- x.CancelToken = wn;
2062
- x.isCancel = xt;
2063
- x.VERSION = jt;
2064
- x.toFormData = Oe;
2061
+ x.CancelToken = Rn;
2062
+ x.isCancel = Ot;
2063
+ x.VERSION = kt;
2064
+ x.toFormData = _e;
2065
2065
  x.AxiosError = g;
2066
2066
  x.Cancel = x.CanceledError;
2067
2067
  x.all = function(e) {
2068
2068
  return Promise.all(e);
2069
2069
  };
2070
- x.spread = En;
2071
- x.isAxiosError = Rn;
2070
+ x.spread = Sn;
2071
+ x.isAxiosError = Tn;
2072
2072
  x.mergeConfig = X;
2073
2073
  x.AxiosHeaders = L;
2074
- x.formToJSON = (t) => At(a.isHTMLForm(t) ? new FormData(t) : t);
2075
- x.getAdapter = Pt.getAdapter;
2076
- x.HttpStatusCode = Ie;
2074
+ x.formToJSON = (t) => _t(a.isHTMLForm(t) ? new FormData(t) : t);
2075
+ x.getAdapter = vt.getAdapter;
2076
+ x.HttpStatusCode = De;
2077
2077
  x.default = x;
2078
2078
  const {
2079
- Axios: kn,
2080
- AxiosError: Ln,
2081
- CanceledError: Un,
2082
- isCancel: Fn,
2083
- CancelToken: In,
2084
- VERSION: Bn,
2085
- all: Dn,
2086
- Cancel: qn,
2087
- isAxiosError: Mn,
2088
- spread: Hn,
2089
- toFormData: $n,
2090
- AxiosHeaders: zn,
2091
- HttpStatusCode: Wn,
2092
- formToJSON: Jn,
2093
- getAdapter: Vn,
2094
- mergeConfig: Kn
2095
- } = x, Sn = "https://authifyer-backend.onrender.com", q = x.create({
2096
- baseURL: Sn,
2097
- withCredentials: !0,
2098
- // Kept for legacy compatibility if cookies are ever used
2079
+ Axios: Un,
2080
+ AxiosError: In,
2081
+ CanceledError: Fn,
2082
+ isCancel: Bn,
2083
+ CancelToken: Dn,
2084
+ VERSION: qn,
2085
+ all: Mn,
2086
+ Cancel: Hn,
2087
+ isAxiosError: $n,
2088
+ spread: zn,
2089
+ toFormData: Wn,
2090
+ AxiosHeaders: Jn,
2091
+ HttpStatusCode: Vn,
2092
+ formToJSON: Kn,
2093
+ getAdapter: Yn,
2094
+ mergeConfig: Xn
2095
+ } = x, An = "https://authifyer-backend.onrender.com", q = x.create({
2096
+ baseURL: An,
2099
2097
  headers: {
2100
2098
  "Content-Type": "application/json"
2101
2099
  }
2102
- }), ut = (t) => {
2103
- t ? q.defaults.headers.common.Authorization = `Bearer ${t}` : delete q.defaults.headers.common.Authorization;
2104
- }, Be = "authifyer_refresh_token", ke = (t) => {
2100
+ }), qe = "authifyer_access_token", ke = (t) => {
2105
2101
  try {
2106
- t ? localStorage.setItem(Be, t) : localStorage.removeItem(Be);
2102
+ t ? (localStorage.setItem(qe, t), q.defaults.headers.common.Authorization = `Bearer ${t}`) : (localStorage.removeItem(qe), delete q.defaults.headers.common.Authorization);
2103
+ } catch (e) {
2104
+ console.warn("Authifyer: localStorage is not accessible.", e);
2105
+ }
2106
+ }, xn = () => {
2107
+ try {
2108
+ return localStorage.getItem(qe);
2109
+ } catch {
2110
+ return null;
2111
+ }
2112
+ }, Me = "authifyer_refresh_token", Le = (t) => {
2113
+ try {
2114
+ t ? localStorage.setItem(Me, t) : localStorage.removeItem(Me);
2107
2115
  } catch (e) {
2108
2116
  console.warn("Authifyer: localStorage is not accessible. Session persistence may fail.", e), typeof window < "u" && window.dispatchEvent(new CustomEvent("auth:storage_error"));
2109
2117
  }
2110
- }, ft = () => {
2118
+ }, Ue = () => {
2111
2119
  try {
2112
- return localStorage.getItem(Be);
2120
+ return localStorage.getItem(Me);
2113
2121
  } catch (t) {
2114
2122
  return console.warn("Authifyer: localStorage is not accessible. Session persistence may fail.", t), typeof window < "u" && window.dispatchEvent(new CustomEvent("auth:storage_error")), null;
2115
2123
  }
@@ -2117,13 +2125,13 @@ const {
2117
2125
  class ae extends Error {
2118
2126
  }
2119
2127
  ae.prototype.name = "InvalidTokenError";
2120
- function Tn(t) {
2128
+ function _n(t) {
2121
2129
  return decodeURIComponent(atob(t).replace(/(.)/g, (e, r) => {
2122
2130
  let n = r.charCodeAt(0).toString(16).toUpperCase();
2123
2131
  return n.length < 2 && (n = "0" + n), "%" + n;
2124
2132
  }));
2125
2133
  }
2126
- function An(t) {
2134
+ function On(t) {
2127
2135
  let e = t.replace(/-/g, "+").replace(/_/g, "/");
2128
2136
  switch (e.length % 4) {
2129
2137
  case 0:
@@ -2138,12 +2146,12 @@ function An(t) {
2138
2146
  throw new Error("base64 string is not of the correct length");
2139
2147
  }
2140
2148
  try {
2141
- return Tn(e);
2149
+ return _n(e);
2142
2150
  } catch {
2143
2151
  return atob(e);
2144
2152
  }
2145
2153
  }
2146
- function xn(t, e) {
2154
+ function Nn(t, e) {
2147
2155
  if (typeof t != "string")
2148
2156
  throw new ae("Invalid token specified: must be a string");
2149
2157
  e || (e = {});
@@ -2152,7 +2160,7 @@ function xn(t, e) {
2152
2160
  throw new ae(`Invalid token specified: missing part #${r + 1}`);
2153
2161
  let s;
2154
2162
  try {
2155
- s = An(n);
2163
+ s = On(n);
2156
2164
  } catch (o) {
2157
2165
  throw new ae(`Invalid token specified: invalid base64 for part #${r + 1} (${o.message})`);
2158
2166
  }
@@ -2162,9 +2170,9 @@ function xn(t, e) {
2162
2170
  throw new ae(`Invalid token specified: invalid json for part #${r + 1} (${o.message})`);
2163
2171
  }
2164
2172
  }
2165
- const On = (t) => {
2173
+ const ht = (t) => {
2166
2174
  try {
2167
- const e = xn(t), r = Date.now() / 1e3;
2175
+ const e = Nn(t), r = Date.now() / 1e3;
2168
2176
  if (e.exp < r)
2169
2177
  return null;
2170
2178
  const n = {
@@ -2187,7 +2195,7 @@ const On = (t) => {
2187
2195
  return console.error("Invalid token", e), null;
2188
2196
  }
2189
2197
  };
2190
- class _n {
2198
+ class Cn {
2191
2199
  constructor(e, r) {
2192
2200
  V(this, "publishableKey");
2193
2201
  V(this, "refreshTimer", null);
@@ -2203,18 +2211,23 @@ class _n {
2203
2211
  try {
2204
2212
  this.isLoading = !0, this.notifyListeners();
2205
2213
  try {
2206
- const r = (await q.get(`/public/config/${this.publishableKey}`)).data, n = [];
2207
- r.isGoogleOauthEnabled && n.push("google"), r.isGithubOauthEnabled && n.push("github"), this.config = {
2208
- emailPasswordEnabled: r.isEmailPassEnabled,
2209
- oauthProviders: n
2214
+ const n = (await q.get(`/public/config/${this.publishableKey}`)).data, s = [];
2215
+ n.isGoogleOauthEnabled && s.push("google"), n.isGithubOauthEnabled && s.push("github"), this.config = {
2216
+ emailPasswordEnabled: n.isEmailPassEnabled,
2217
+ oauthProviders: s
2210
2218
  };
2211
- } catch (e) {
2212
- console.warn("Authifyer: Failed to fetch public project configuration. Using default defaults.", e), this.config = {
2219
+ } catch (r) {
2220
+ console.warn("Authifyer: Failed to fetch public project configuration. Using defaults.", r), this.config = {
2213
2221
  emailPasswordEnabled: !0,
2214
2222
  oauthProviders: ["google", "github"]
2215
2223
  };
2216
2224
  }
2217
- await this.refreshSession();
2225
+ const e = xn();
2226
+ if (e) {
2227
+ const r = ht(e);
2228
+ r && (this.session = r, ke(e), this.startRefreshTimer());
2229
+ }
2230
+ this.session || await this.refreshSession();
2218
2231
  } catch (e) {
2219
2232
  console.error("Failed to load Authifyer client", e);
2220
2233
  } finally {
@@ -2249,7 +2262,10 @@ class _n {
2249
2262
  }
2250
2263
  async signOut() {
2251
2264
  try {
2252
- await q.post("/authifyer/session/logout");
2265
+ const e = Ue();
2266
+ await q.post("/authifyer/session/logout", {
2267
+ refresh_token: e || void 0
2268
+ });
2253
2269
  } catch (e) {
2254
2270
  console.warn("Logout failed", e);
2255
2271
  } finally {
@@ -2263,14 +2279,19 @@ class _n {
2263
2279
  // --- Session Management ---
2264
2280
  async refreshSession() {
2265
2281
  try {
2266
- const e = ft(), r = await q.post("/authifyer/jwt/refresh-jwt", {
2267
- refresh_token: e || void 0
2282
+ const e = Ue();
2283
+ if (!e) {
2284
+ this.clearSession();
2285
+ return;
2286
+ }
2287
+ const r = await q.post("/authifyer/jwt/refresh-jwt", {
2288
+ refresh_token: e
2268
2289
  }), { access_token: n, refresh_token: s } = r.data;
2269
2290
  if (n) {
2270
2291
  const o = n.accessToken || n;
2271
2292
  this.setSession(o);
2272
2293
  }
2273
- s && ke(s);
2294
+ s && Le(s);
2274
2295
  } catch {
2275
2296
  this.clearSession();
2276
2297
  }
@@ -2282,7 +2303,7 @@ class _n {
2282
2303
  */
2283
2304
  async rotateSession() {
2284
2305
  try {
2285
- const e = ft();
2306
+ const e = Ue();
2286
2307
  await q.post("/authifyer/session/refresh", {
2287
2308
  refresh_token: e || void 0
2288
2309
  }), await this.refreshSession();
@@ -2291,14 +2312,14 @@ class _n {
2291
2312
  }
2292
2313
  }
2293
2314
  handleAuthResponse(e) {
2294
- e.accessToken && this.setSession(e.accessToken), (e.refreshToken || e.refresh_token) && ke(e.refreshToken || e.refresh_token);
2315
+ e.accessToken && this.setSession(e.accessToken), (e.refreshToken || e.refresh_token) && Le(e.refreshToken || e.refresh_token);
2295
2316
  }
2296
2317
  setSession(e) {
2297
- const r = On(e);
2298
- r && (this.session = r, ut(e), this.startRefreshTimer(), this.notifyListeners());
2318
+ const r = ht(e);
2319
+ r && (this.session = r, ke(e), this.startRefreshTimer(), this.notifyListeners());
2299
2320
  }
2300
2321
  clearSession() {
2301
- this.session = null, ut(null), ke(null), this.stopRefreshTimer(), this.notifyListeners();
2322
+ this.session = null, ke(null), Le(null), this.stopRefreshTimer(), this.notifyListeners();
2302
2323
  }
2303
2324
  // --- Timer ---
2304
2325
  startRefreshTimer() {
@@ -2319,27 +2340,27 @@ class _n {
2319
2340
  this.listeners.forEach((e) => e(this));
2320
2341
  }
2321
2342
  }
2322
- const Lt = Dt(void 0), Yn = ({
2343
+ const It = Mt(void 0), Gn = ({
2323
2344
  publishableKey: t,
2324
2345
  backendUrl: e,
2325
2346
  config: r,
2326
2347
  children: n
2327
2348
  }) => {
2328
2349
  var f;
2329
- const s = qt(() => {
2350
+ const s = Ht(() => {
2330
2351
  const y = (
2331
2352
  // @ts-ignore (Vite)
2332
2353
  // @ts-ignore (Next.js / CRA)
2333
2354
  typeof process < "u" && process.env && (process.env.NEXT_PUBLIC_AUTHIFYER_PUBLISHABLE_KEY || process.env.REACT_APP_AUTHIFYER_PUBLISHABLE_KEY)
2334
2355
  ), h = t || y;
2335
2356
  h || console.error("AuthifyerProvider requires a publishableKey either passed as a prop or set as an environment variable (e.g. VITE_AUTHIFYER_PUBLISHABLE_KEY, NEXT_PUBLIC_AUTHIFYER_PUBLISHABLE_KEY, REACT_APP_AUTHIFYER_PUBLISHABLE_KEY).");
2336
- const S = new _n(h || "", { backendUrl: e });
2357
+ const S = new Cn(h || "", { backendUrl: e });
2337
2358
  return r && (S.config = r), S;
2338
- }, [t, e, r]), [o, i] = F(((f = s.session) == null ? void 0 : f.user) || null), [c, p] = F(s.session), [d, u] = F(s.config), [m, E] = F(s.isLoading);
2339
- Mt(() => {
2359
+ }, [t, e, r]), [o, i] = I(((f = s.session) == null ? void 0 : f.user) || null), [c, p] = I(s.session), [d, u] = I(s.config), [m, w] = I(s.isLoading);
2360
+ $t(() => {
2340
2361
  const y = s.subscribe((h) => {
2341
2362
  var S;
2342
- i(((S = h.session) == null ? void 0 : S.user) || null), p(h.session), r || u(h.config), E(h.isLoading);
2363
+ i(((S = h.session) == null ? void 0 : S.user) || null), p(h.session), r || u(h.config), w(h.isLoading);
2343
2364
  });
2344
2365
  return s.load(), () => {
2345
2366
  y();
@@ -2352,22 +2373,22 @@ const Lt = Dt(void 0), Yn = ({
2352
2373
  config: r || d,
2353
2374
  isLoading: m
2354
2375
  };
2355
- return /* @__PURE__ */ b.jsx(Lt.Provider, { value: R, children: n });
2376
+ return /* @__PURE__ */ b.jsx(It.Provider, { value: R, children: n });
2356
2377
  }, he = () => {
2357
- const t = Ht(Lt);
2378
+ const t = zt(It);
2358
2379
  if (t === void 0)
2359
2380
  throw new Error("useAuth must be used within an AuthifyerProvider");
2360
2381
  return t;
2361
- }, Xn = () => {
2382
+ }, Qn = () => {
2362
2383
  const { user: t, isLoading: e } = he();
2363
2384
  return { user: t, isLoading: e, isSignedIn: !!t };
2364
- }, Gn = () => {
2385
+ }, Zn = () => {
2365
2386
  const { session: t, isLoading: e } = he();
2366
2387
  return { session: t, isLoading: e, isSignedIn: !!t };
2367
- }, Qn = () => {
2388
+ }, es = () => {
2368
2389
  const { client: t } = he();
2369
2390
  return t;
2370
- }, De = ({ title: t, subtitle: e, children: r }) => /* @__PURE__ */ b.jsx("div", { className: "authifyer-root", children: /* @__PURE__ */ b.jsxs("div", { className: "authifyer-card", children: [
2391
+ }, He = ({ title: t, subtitle: e, children: r }) => /* @__PURE__ */ b.jsx("div", { className: "authifyer-root", children: /* @__PURE__ */ b.jsxs("div", { className: "authifyer-card", children: [
2371
2392
  /* @__PURE__ */ b.jsxs("div", { className: "authifyer-card-header", children: [
2372
2393
  /* @__PURE__ */ b.jsx("h2", { className: "authifyer-card-title", children: t }),
2373
2394
  e && /* @__PURE__ */ b.jsx("p", { className: "authifyer-card-subtitle", children: e })
@@ -2380,8 +2401,8 @@ const Lt = Dt(void 0), Yn = ({
2380
2401
  "Authifyer"
2381
2402
  ] })
2382
2403
  ] })
2383
- ] }) }), Zn = () => {
2384
- const { client: t, config: e } = he(), [r, n] = F(""), [s, o] = F(""), [i, c] = F(""), [p, d] = F(!1), u = (e == null ? void 0 : e.emailPasswordEnabled) ?? !0, m = (e == null ? void 0 : e.oauthProviders) ?? ["google", "github"], E = async (R) => {
2404
+ ] }) }), ts = () => {
2405
+ const { client: t, config: e } = he(), [r, n] = I(""), [s, o] = I(""), [i, c] = I(""), [p, d] = I(!1), u = (e == null ? void 0 : e.emailPasswordEnabled) ?? !0, m = (e == null ? void 0 : e.oauthProviders) ?? ["google", "github"], w = async (R) => {
2385
2406
  R.preventDefault(), d(!0), c("");
2386
2407
  try {
2387
2408
  await t.signInWithEmail(r, s);
@@ -2391,7 +2412,7 @@ const Lt = Dt(void 0), Yn = ({
2391
2412
  d(!1);
2392
2413
  }
2393
2414
  };
2394
- return /* @__PURE__ */ b.jsxs(De, { title: "Sign in", subtitle: "to continue to Authifyer", children: [
2415
+ return /* @__PURE__ */ b.jsxs(He, { title: "Sign in", subtitle: "to continue to Authifyer", children: [
2395
2416
  i && /* @__PURE__ */ b.jsx("p", { className: "authifyer-error", children: i }),
2396
2417
  (m.includes("google") || m.includes("github")) && /* @__PURE__ */ b.jsxs("div", { className: "authifyer-form", children: [
2397
2418
  m.includes("google") && /* @__PURE__ */ b.jsxs(
@@ -2423,7 +2444,7 @@ const Lt = Dt(void 0), Yn = ({
2423
2444
  )
2424
2445
  ] }),
2425
2446
  (m.includes("google") || m.includes("github")) && u && /* @__PURE__ */ b.jsx("div", { className: "authifyer-divider", children: "or" }),
2426
- u && /* @__PURE__ */ b.jsxs("form", { onSubmit: E, className: "authifyer-form", children: [
2447
+ u && /* @__PURE__ */ b.jsxs("form", { onSubmit: w, className: "authifyer-form", children: [
2427
2448
  /* @__PURE__ */ b.jsxs("div", { className: "authifyer-form-group", children: [
2428
2449
  /* @__PURE__ */ b.jsx("label", { className: "authifyer-label", children: "Email address" }),
2429
2450
  /* @__PURE__ */ b.jsx(
@@ -2453,8 +2474,8 @@ const Lt = Dt(void 0), Yn = ({
2453
2474
  /* @__PURE__ */ b.jsx("button", { type: "submit", className: "authifyer-submit-btn", disabled: p, children: p ? "Signing In..." : "Continue" })
2454
2475
  ] })
2455
2476
  ] });
2456
- }, es = () => {
2457
- const { client: t, config: e } = he(), [r, n] = F(""), [s, o] = F(""), [i, c] = F(""), [p, d] = F(!1), [u, m] = F(!1), E = (e == null ? void 0 : e.emailPasswordEnabled) ?? !0, R = (e == null ? void 0 : e.oauthProviders) ?? ["google", "github"], f = async (y) => {
2477
+ }, rs = () => {
2478
+ const { client: t, config: e } = he(), [r, n] = I(""), [s, o] = I(""), [i, c] = I(""), [p, d] = I(!1), [u, m] = I(!1), w = (e == null ? void 0 : e.emailPasswordEnabled) ?? !0, R = (e == null ? void 0 : e.oauthProviders) ?? ["google", "github"], f = async (y) => {
2458
2479
  y.preventDefault(), d(!0), c("");
2459
2480
  try {
2460
2481
  await t.signUpWithEmail(r, s), m(!0);
@@ -2464,13 +2485,13 @@ const Lt = Dt(void 0), Yn = ({
2464
2485
  d(!1);
2465
2486
  }
2466
2487
  };
2467
- return u ? /* @__PURE__ */ b.jsx(De, { title: "Welcome!", children: /* @__PURE__ */ b.jsxs("div", { className: "authifyer-success", children: [
2488
+ return u ? /* @__PURE__ */ b.jsx(He, { title: "Welcome!", children: /* @__PURE__ */ b.jsxs("div", { className: "authifyer-success", children: [
2468
2489
  /* @__PURE__ */ b.jsx("svg", { className: "authifyer-success-icon", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ b.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
2469
2490
  /* @__PURE__ */ b.jsxs("div", { children: [
2470
2491
  /* @__PURE__ */ b.jsx("h3", { className: "authifyer-success-title", children: "Success" }),
2471
2492
  /* @__PURE__ */ b.jsx("p", { className: "authifyer-success-text", children: "Registration completed. Please verify your email." })
2472
2493
  ] })
2473
- ] }) }) : /* @__PURE__ */ b.jsxs(De, { title: "Create your account", subtitle: "Welcome to Authifyer", children: [
2494
+ ] }) }) : /* @__PURE__ */ b.jsxs(He, { title: "Create your account", subtitle: "Welcome to Authifyer", children: [
2474
2495
  i && /* @__PURE__ */ b.jsx("p", { className: "authifyer-error", children: i }),
2475
2496
  (R.includes("google") || R.includes("github")) && /* @__PURE__ */ b.jsxs("div", { className: "authifyer-form", children: [
2476
2497
  R.includes("google") && /* @__PURE__ */ b.jsxs(
@@ -2501,8 +2522,8 @@ const Lt = Dt(void 0), Yn = ({
2501
2522
  }
2502
2523
  )
2503
2524
  ] }),
2504
- (R.includes("google") || R.includes("github")) && E && /* @__PURE__ */ b.jsx("div", { className: "authifyer-divider", children: "or" }),
2505
- E && /* @__PURE__ */ b.jsxs("form", { onSubmit: f, className: "authifyer-form", children: [
2525
+ (R.includes("google") || R.includes("github")) && w && /* @__PURE__ */ b.jsx("div", { className: "authifyer-divider", children: "or" }),
2526
+ w && /* @__PURE__ */ b.jsxs("form", { onSubmit: f, className: "authifyer-form", children: [
2506
2527
  /* @__PURE__ */ b.jsxs("div", { className: "authifyer-form-group", children: [
2507
2528
  /* @__PURE__ */ b.jsx("label", { className: "authifyer-label", children: "Email address" }),
2508
2529
  /* @__PURE__ */ b.jsx(
@@ -2534,11 +2555,11 @@ const Lt = Dt(void 0), Yn = ({
2534
2555
  ] });
2535
2556
  };
2536
2557
  export {
2537
- Yn as AuthifyerProvider,
2538
- Zn as SignIn,
2539
- es as SignUp,
2558
+ Gn as AuthifyerProvider,
2559
+ ts as SignIn,
2560
+ rs as SignUp,
2540
2561
  he as useAuth,
2541
- Qn as useAuthifyer,
2542
- Gn as useSession,
2543
- Xn as useUser
2562
+ es as useAuthifyer,
2563
+ Zn as useSession,
2564
+ Qn as useUser
2544
2565
  };