@neuctra/authix 1.1.26 → 1.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neuctra-authix.es.js +685 -670
- package/dist/neuctra-authix.umd.js +15 -15
- package/dist/react/SignedIn.d.ts +1 -0
- package/dist/react/SignedIn.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,11 +7,11 @@ function Ut(t, e) {
|
|
|
7
7
|
const { toString: fr } = Object.prototype, { getPrototypeOf: st } = Object, { iterator: Fe, toStringTag: Dt } = Symbol, Me = /* @__PURE__ */ ((t) => (e) => {
|
|
8
8
|
const r = fr.call(e);
|
|
9
9
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), oe = (t) => (t = t.toLowerCase(), (e) => Me(e) === t), We = (t) => (e) => typeof e === t, { isArray: we } = Array, ye = We("undefined");
|
|
11
11
|
function Ce(t) {
|
|
12
12
|
return t !== null && !ye(t) && t.constructor !== null && !ye(t.constructor) && re(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
13
13
|
}
|
|
14
|
-
const Lt =
|
|
14
|
+
const Lt = oe("ArrayBuffer");
|
|
15
15
|
function xr(t) {
|
|
16
16
|
let e;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Lt(t.buffer), e;
|
|
@@ -29,24 +29,24 @@ const hr = We("string"), re = We("function"), Ft = We("number"), Te = (t) => t !
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
}, yr =
|
|
32
|
+
}, yr = oe("Date"), br = oe("File"), wr = oe("Blob"), jr = oe("FileList"), vr = (t) => Te(t) && re(t.pipe), Sr = (t) => {
|
|
33
33
|
let e;
|
|
34
34
|
return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = Me(t)) === "formdata" || // detect form-data instance
|
|
35
35
|
e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
|
|
36
|
-
}, kr =
|
|
36
|
+
}, kr = oe("URLSearchParams"), [Er, Cr, Tr, Rr] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Ir = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Re(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
38
38
|
if (t === null || typeof t > "u")
|
|
39
39
|
return;
|
|
40
|
-
let s,
|
|
40
|
+
let s, a;
|
|
41
41
|
if (typeof t != "object" && (t = [t]), we(t))
|
|
42
|
-
for (s = 0,
|
|
42
|
+
for (s = 0, a = t.length; s < a; s++)
|
|
43
43
|
e.call(null, t[s], s, t);
|
|
44
44
|
else {
|
|
45
45
|
if (Ce(t))
|
|
46
46
|
return;
|
|
47
|
-
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t),
|
|
47
|
+
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
|
|
48
48
|
let l;
|
|
49
|
-
for (s = 0; s <
|
|
49
|
+
for (s = 0; s < o; s++)
|
|
50
50
|
l = i[s], e.call(null, t[l], l, t);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,35 +55,35 @@ function Mt(t, e) {
|
|
|
55
55
|
return null;
|
|
56
56
|
e = e.toLowerCase();
|
|
57
57
|
const r = Object.keys(t);
|
|
58
|
-
let s = r.length,
|
|
58
|
+
let s = r.length, a;
|
|
59
59
|
for (; s-- > 0; )
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
60
|
+
if (a = r[s], e === a.toLowerCase())
|
|
61
|
+
return a;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Wt = (t) => !ye(t) && t !== fe;
|
|
65
65
|
function Ze() {
|
|
66
|
-
const { caseless: t, skipUndefined: e } = Wt(this) && this || {}, r = {}, s = (
|
|
67
|
-
const
|
|
68
|
-
Ae(r[
|
|
66
|
+
const { caseless: t, skipUndefined: e } = Wt(this) && this || {}, r = {}, s = (a, i) => {
|
|
67
|
+
const o = t && Mt(r, i) || i;
|
|
68
|
+
Ae(r[o]) && Ae(a) ? r[o] = Ze(r[o], a) : Ae(a) ? r[o] = Ze({}, a) : we(a) ? r[o] = a.slice() : (!e || !ye(a)) && (r[o] = a);
|
|
69
69
|
};
|
|
70
|
-
for (let
|
|
71
|
-
arguments[
|
|
70
|
+
for (let a = 0, i = arguments.length; a < i; a++)
|
|
71
|
+
arguments[a] && Re(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (
|
|
75
|
-
r && re(
|
|
74
|
+
const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
|
|
75
|
+
r && re(a) ? t[i] = Ut(a, r) : t[i] = a;
|
|
76
76
|
}, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), zr = (t, e, r, s) => {
|
|
77
77
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
78
78
|
value: e.prototype
|
|
79
79
|
}), r && Object.assign(t.prototype, r);
|
|
80
80
|
}, Ar = (t, e, r, s) => {
|
|
81
|
-
let
|
|
81
|
+
let a, i, o;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (e = e || {}, t == null) return e;
|
|
84
84
|
do {
|
|
85
|
-
for (
|
|
86
|
-
|
|
85
|
+
for (a = Object.getOwnPropertyNames(t), i = a.length; i-- > 0; )
|
|
86
|
+
o = a[i], (!s || s(o, t, e)) && !l[o] && (e[o] = t[o], l[o] = !0);
|
|
87
87
|
t = r !== !1 && st(t);
|
|
88
88
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
89
89
|
return e;
|
|
@@ -102,9 +102,9 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
|
102
102
|
return r;
|
|
103
103
|
}, Nr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && st(Uint8Array)), Ur = (t, e) => {
|
|
104
104
|
const s = (t && t[Fe]).call(t);
|
|
105
|
-
let
|
|
106
|
-
for (; (
|
|
107
|
-
const i =
|
|
105
|
+
let a;
|
|
106
|
+
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
+
const i = a.value;
|
|
108
108
|
e.call(t, i[0], i[1]);
|
|
109
109
|
}
|
|
110
110
|
}, Dr = (t, e) => {
|
|
@@ -113,16 +113,16 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
|
113
113
|
for (; (r = t.exec(e)) !== null; )
|
|
114
114
|
s.push(r);
|
|
115
115
|
return s;
|
|
116
|
-
}, Lr =
|
|
116
|
+
}, Lr = oe("HTMLFormElement"), Fr = (t) => t.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
|
-
function(r, s,
|
|
119
|
-
return s.toUpperCase() +
|
|
118
|
+
function(r, s, a) {
|
|
119
|
+
return s.toUpperCase() + a;
|
|
120
120
|
}
|
|
121
|
-
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr =
|
|
121
|
+
), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Mr = oe("RegExp"), qt = (t, e) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(t), s = {};
|
|
123
|
-
Re(r, (
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Re(r, (a, i) => {
|
|
124
|
+
let o;
|
|
125
|
+
(o = e(a, i, t)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(t, s);
|
|
127
127
|
}, Wr = (t) => {
|
|
128
128
|
qt(t, (e, r) => {
|
|
@@ -140,8 +140,8 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (o, i) => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, qr = (t, e) => {
|
|
143
|
-
const r = {}, s = (
|
|
144
|
-
|
|
143
|
+
const r = {}, s = (a) => {
|
|
144
|
+
a.forEach((i) => {
|
|
145
145
|
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
@@ -152,28 +152,28 @@ function Vr(t) {
|
|
|
152
152
|
return !!(t && re(t.append) && t[Dt] === "FormData" && t[Fe]);
|
|
153
153
|
}
|
|
154
154
|
const Yr = (t) => {
|
|
155
|
-
const e = new Array(10), r = (s,
|
|
155
|
+
const e = new Array(10), r = (s, a) => {
|
|
156
156
|
if (Te(s)) {
|
|
157
157
|
if (e.indexOf(s) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (Ce(s))
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
|
-
e[
|
|
162
|
+
e[a] = s;
|
|
163
163
|
const i = we(s) ? [] : {};
|
|
164
|
-
return Re(s, (
|
|
165
|
-
const h = r(
|
|
164
|
+
return Re(s, (o, l) => {
|
|
165
|
+
const h = r(o, a + 1);
|
|
166
166
|
!ye(h) && (i[l] = h);
|
|
167
|
-
}), e[
|
|
167
|
+
}), e[a] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(t, 0);
|
|
173
|
-
}, Kr =
|
|
174
|
-
|
|
175
|
-
}, !1), (
|
|
176
|
-
s.push(
|
|
173
|
+
}, Kr = oe("AsyncFunction"), Jr = (t) => t && (Te(t) || re(t)) && re(t.then) && re(t.catch), Bt = ((t, e) => t ? setImmediate : e ? ((r, s) => (fe.addEventListener("message", ({ source: a, data: i }) => {
|
|
174
|
+
a === fe && i === r && s.length && s.shift()();
|
|
175
|
+
}, !1), (a) => {
|
|
176
|
+
s.push(a), fe.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
re(fe.postMessage)
|
|
@@ -211,7 +211,7 @@ const Yr = (t) => {
|
|
|
211
211
|
inherits: zr,
|
|
212
212
|
toFlatObject: Ar,
|
|
213
213
|
kindOf: Me,
|
|
214
|
-
kindOfTest:
|
|
214
|
+
kindOfTest: oe,
|
|
215
215
|
endsWith: _r,
|
|
216
216
|
toArray: $r,
|
|
217
217
|
forEachEntry: Ur,
|
|
@@ -237,8 +237,8 @@ const Yr = (t) => {
|
|
|
237
237
|
asap: Xr,
|
|
238
238
|
isIterable: Gr
|
|
239
239
|
};
|
|
240
|
-
function L(t, e, r, s,
|
|
241
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), s && (this.request = s),
|
|
240
|
+
function L(t, e, r, s, a) {
|
|
241
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), s && (this.request = s), a && (this.response = a, this.status = a.status ? a.status : null);
|
|
242
242
|
}
|
|
243
243
|
p.inherits(L, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -281,13 +281,13 @@ const Ht = L.prototype, Vt = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties(L, Vt);
|
|
283
283
|
Object.defineProperty(Ht, "isAxiosError", { value: !0 });
|
|
284
|
-
L.from = (t, e, r, s,
|
|
285
|
-
const
|
|
286
|
-
p.toFlatObject(t,
|
|
287
|
-
return
|
|
284
|
+
L.from = (t, e, r, s, a, i) => {
|
|
285
|
+
const o = Object.create(Ht);
|
|
286
|
+
p.toFlatObject(t, o, function(d) {
|
|
287
|
+
return d !== Error.prototype;
|
|
288
288
|
}, (c) => c !== "isAxiosError");
|
|
289
289
|
const l = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
|
|
290
|
-
return L.call(
|
|
290
|
+
return L.call(o, l, h, r, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
292
|
const Zr = null;
|
|
293
293
|
function Qe(t) {
|
|
@@ -297,8 +297,8 @@ function Yt(t) {
|
|
|
297
297
|
return p.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
298
298
|
}
|
|
299
299
|
function gt(t, e, r) {
|
|
300
|
-
return t ? t.concat(e).map(function(
|
|
301
|
-
return
|
|
300
|
+
return t ? t.concat(e).map(function(a, i) {
|
|
301
|
+
return a = Yt(a), !r && i ? "[" + a + "]" : a;
|
|
302
302
|
}).join(r ? "." : "") : e;
|
|
303
303
|
}
|
|
304
304
|
function Qr(t) {
|
|
@@ -317,46 +317,46 @@ function qe(t, e, r) {
|
|
|
317
317
|
}, !1, function(j, m) {
|
|
318
318
|
return !p.isUndefined(m[j]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens,
|
|
321
|
-
if (!p.isFunction(
|
|
320
|
+
const s = r.metaTokens, a = r.visitor || d, i = r.dots, o = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
|
|
321
|
+
if (!p.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function c(
|
|
324
|
-
if (
|
|
325
|
-
if (p.isDate(
|
|
326
|
-
return
|
|
327
|
-
if (p.isBoolean(
|
|
328
|
-
return
|
|
329
|
-
if (!h && p.isBlob(
|
|
323
|
+
function c(u) {
|
|
324
|
+
if (u === null) return "";
|
|
325
|
+
if (p.isDate(u))
|
|
326
|
+
return u.toISOString();
|
|
327
|
+
if (p.isBoolean(u))
|
|
328
|
+
return u.toString();
|
|
329
|
+
if (!h && p.isBlob(u))
|
|
330
330
|
throw new L("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return p.isArrayBuffer(
|
|
331
|
+
return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
|
|
332
332
|
}
|
|
333
|
-
function u
|
|
334
|
-
let _ =
|
|
335
|
-
if (
|
|
333
|
+
function d(u, j, m) {
|
|
334
|
+
let _ = u;
|
|
335
|
+
if (u && !m && typeof u == "object") {
|
|
336
336
|
if (p.endsWith(j, "{}"))
|
|
337
|
-
j = s ? j : j.slice(0, -2),
|
|
338
|
-
else if (p.isArray(
|
|
337
|
+
j = s ? j : j.slice(0, -2), u = JSON.stringify(u);
|
|
338
|
+
else if (p.isArray(u) && Qr(u) || (p.isFileList(u) || p.endsWith(j, "[]")) && (_ = p.toArray(u)))
|
|
339
339
|
return j = Yt(j), _.forEach(function(A, C) {
|
|
340
340
|
!(p.isUndefined(A) || A === null) && e.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
342
|
+
o === !0 ? gt([j], C, i) : o === null ? j : j + "[]",
|
|
343
343
|
c(A)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Qe(
|
|
347
|
+
return Qe(u) ? !0 : (e.append(gt(m, j, i), c(u)), !1);
|
|
348
348
|
}
|
|
349
349
|
const b = [], y = Object.assign(en, {
|
|
350
|
-
defaultVisitor:
|
|
350
|
+
defaultVisitor: d,
|
|
351
351
|
convertValue: c,
|
|
352
352
|
isVisitable: Qe
|
|
353
353
|
});
|
|
354
|
-
function w(
|
|
355
|
-
if (!p.isUndefined(
|
|
356
|
-
if (b.indexOf(
|
|
354
|
+
function w(u, j) {
|
|
355
|
+
if (!p.isUndefined(u)) {
|
|
356
|
+
if (b.indexOf(u) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + j.join("."));
|
|
358
|
-
b.push(
|
|
359
|
-
(!(p.isUndefined(_) || _ === null) &&
|
|
358
|
+
b.push(u), p.forEach(u, function(_, R) {
|
|
359
|
+
(!(p.isUndefined(_) || _ === null) && a.call(
|
|
360
360
|
e,
|
|
361
361
|
_,
|
|
362
362
|
p.isString(R) ? R.trim() : R,
|
|
@@ -384,10 +384,10 @@ function mt(t) {
|
|
|
384
384
|
return e[s];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function at(t, e) {
|
|
388
388
|
this._pairs = [], t && qe(t, this, e);
|
|
389
389
|
}
|
|
390
|
-
const Kt =
|
|
390
|
+
const Kt = at.prototype;
|
|
391
391
|
Kt.append = function(e, r) {
|
|
392
392
|
this._pairs.push([e, r]);
|
|
393
393
|
};
|
|
@@ -395,8 +395,8 @@ Kt.toString = function(e) {
|
|
|
395
395
|
const r = e ? function(s) {
|
|
396
396
|
return e.call(this, s, mt);
|
|
397
397
|
} : mt;
|
|
398
|
-
return this._pairs.map(function(
|
|
399
|
-
return r(
|
|
398
|
+
return this._pairs.map(function(a) {
|
|
399
|
+
return r(a[0]) + "=" + r(a[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
402
|
function tn(t) {
|
|
@@ -409,11 +409,11 @@ function Jt(t, e, r) {
|
|
|
409
409
|
p.isFunction(r) && (r = {
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
|
-
const
|
|
412
|
+
const a = r && r.serialize;
|
|
413
413
|
let i;
|
|
414
|
-
if (
|
|
415
|
-
const
|
|
416
|
-
|
|
414
|
+
if (a ? i = a(e, r) : i = p.isURLSearchParams(e) ? e.toString() : new at(e, r).toString(s), i) {
|
|
415
|
+
const o = t.indexOf("#");
|
|
416
|
+
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return t;
|
|
419
419
|
}
|
|
@@ -475,7 +475,7 @@ const Xt = {
|
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
}, rn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
478
|
+
}, rn = typeof URLSearchParams < "u" ? URLSearchParams : at, nn = typeof FormData < "u" ? FormData : null, sn = typeof Blob < "u" ? Blob : null, an = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
481
|
URLSearchParams: rn,
|
|
@@ -483,21 +483,21 @@ const Xt = {
|
|
|
483
483
|
Blob: sn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn =
|
|
486
|
+
}, ot = typeof window < "u" && typeof document < "u", et = typeof navigator == "object" && navigator || void 0, on = ot && (!et || ["ReactNative", "NativeScript", "NS"].indexOf(et.product) < 0), ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn = ot && window.location.href || "http://localhost", dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
490
|
-
hasStandardBrowserEnv:
|
|
489
|
+
hasBrowserEnv: ot,
|
|
490
|
+
hasStandardBrowserEnv: on,
|
|
491
491
|
hasStandardBrowserWebWorkerEnv: ln,
|
|
492
492
|
navigator: et,
|
|
493
493
|
origin: cn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
495
495
|
...dn,
|
|
496
|
-
...
|
|
496
|
+
...an
|
|
497
497
|
};
|
|
498
498
|
function un(t, e) {
|
|
499
499
|
return qe(t, new ee.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s,
|
|
500
|
+
visitor: function(r, s, a, i) {
|
|
501
501
|
return ee.isNode && p.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...e
|
|
@@ -509,23 +509,23 @@ function pn(t) {
|
|
|
509
509
|
function fn(t) {
|
|
510
510
|
const e = {}, r = Object.keys(t);
|
|
511
511
|
let s;
|
|
512
|
-
const
|
|
512
|
+
const a = r.length;
|
|
513
513
|
let i;
|
|
514
|
-
for (s = 0; s <
|
|
514
|
+
for (s = 0; s < a; s++)
|
|
515
515
|
i = r[s], e[i] = t[i];
|
|
516
516
|
return e;
|
|
517
517
|
}
|
|
518
518
|
function Gt(t) {
|
|
519
|
-
function e(r, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
519
|
+
function e(r, s, a, i) {
|
|
520
|
+
let o = r[i++];
|
|
521
|
+
if (o === "__proto__") return !0;
|
|
522
|
+
const l = Number.isFinite(+o), h = i >= r.length;
|
|
523
|
+
return o = !o && p.isArray(a) ? a.length : o, h ? (p.hasOwnProp(a, o) ? a[o] = [a[o], s] : a[o] = s, !l) : ((!a[o] || !p.isObject(a[o])) && (a[o] = []), e(r, s, a[o], i) && p.isArray(a[o]) && (a[o] = fn(a[o])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
526
526
|
const r = {};
|
|
527
|
-
return p.forEachEntry(t, (s,
|
|
528
|
-
e(pn(s),
|
|
527
|
+
return p.forEachEntry(t, (s, a) => {
|
|
528
|
+
e(pn(s), a, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
@@ -544,9 +544,9 @@ const Ie = {
|
|
|
544
544
|
transitional: Xt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(e, r) {
|
|
547
|
-
const s = r.getContentType() || "",
|
|
547
|
+
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1, i = p.isObject(e);
|
|
548
548
|
if (i && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
549
|
-
return
|
|
549
|
+
return a ? JSON.stringify(Gt(e)) : e;
|
|
550
550
|
if (p.isArrayBuffer(e) || p.isBuffer(e) || p.isStream(e) || p.isFile(e) || p.isBlob(e) || p.isReadableStream(e))
|
|
551
551
|
return e;
|
|
552
552
|
if (p.isArrayBufferView(e))
|
|
@@ -566,18 +566,18 @@ const Ie = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return i ||
|
|
569
|
+
return i || a ? (r.setContentType("application/json", !1), xn(e)) : e;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(e) {
|
|
572
|
-
const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing,
|
|
572
|
+
const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (p.isResponse(e) || p.isReadableStream(e))
|
|
574
574
|
return e;
|
|
575
|
-
if (e && p.isString(e) && (s && !this.responseType ||
|
|
576
|
-
const
|
|
575
|
+
if (e && p.isString(e) && (s && !this.responseType || a)) {
|
|
576
|
+
const o = !(r && r.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(e, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
|
-
if (
|
|
580
|
+
if (o)
|
|
581
581
|
throw l.name === "SyntaxError" ? L.from(l, L.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -629,10 +629,10 @@ const hn = p.toObjectSet([
|
|
|
629
629
|
"user-agent"
|
|
630
630
|
]), gn = (t) => {
|
|
631
631
|
const e = {};
|
|
632
|
-
let r, s,
|
|
632
|
+
let r, s, a;
|
|
633
633
|
return t && t.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
|
|
634
|
+
`).forEach(function(o) {
|
|
635
|
+
a = o.indexOf(":"), r = o.substring(0, a).trim().toLowerCase(), s = o.substring(a + 1).trim(), !(!r || e[r] && hn[r]) && (r === "set-cookie" ? e[r] ? e[r].push(s) : e[r] = [s] : e[r] = e[r] ? e[r] + ", " + s : s);
|
|
636
636
|
}), e;
|
|
637
637
|
}, bt = Symbol("internals");
|
|
638
638
|
function Se(t) {
|
|
@@ -649,10 +649,10 @@ function mn(t) {
|
|
|
649
649
|
return e;
|
|
650
650
|
}
|
|
651
651
|
const yn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
652
|
-
function Ye(t, e, r, s,
|
|
652
|
+
function Ye(t, e, r, s, a) {
|
|
653
653
|
if (p.isFunction(s))
|
|
654
654
|
return s.call(this, e, r);
|
|
655
|
-
if (
|
|
655
|
+
if (a && (e = r), !!p.isString(e)) {
|
|
656
656
|
if (p.isString(s))
|
|
657
657
|
return e.indexOf(s) !== -1;
|
|
658
658
|
if (p.isRegExp(s))
|
|
@@ -666,8 +666,8 @@ function wn(t, e) {
|
|
|
666
666
|
const r = p.toCamelCase(" " + e);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(t, s + r, {
|
|
669
|
-
value: function(
|
|
670
|
-
return this[s].call(this, e,
|
|
669
|
+
value: function(a, i, o) {
|
|
670
|
+
return this[s].call(this, e, a, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -678,27 +678,27 @@ let ne = class {
|
|
|
678
678
|
e && this.set(e);
|
|
679
679
|
}
|
|
680
680
|
set(e, r, s) {
|
|
681
|
-
const
|
|
681
|
+
const a = this;
|
|
682
682
|
function i(l, h, c) {
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
683
|
+
const d = Se(h);
|
|
684
|
+
if (!d)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const b = p.findKey(
|
|
687
|
-
(!b ||
|
|
686
|
+
const b = p.findKey(a, d);
|
|
687
|
+
(!b || a[b] === void 0 || c === !0 || c === void 0 && a[b] !== !1) && (a[b || h] = _e(l));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const o = (l, h) => p.forEach(l, (c, d) => i(c, d, h));
|
|
690
690
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
691
|
-
|
|
691
|
+
o(e, r);
|
|
692
692
|
else if (p.isString(e) && (e = e.trim()) && !yn(e))
|
|
693
|
-
|
|
693
|
+
o(gn(e), r);
|
|
694
694
|
else if (p.isObject(e) && p.isIterable(e)) {
|
|
695
695
|
let l = {}, h, c;
|
|
696
|
-
for (const
|
|
697
|
-
if (!p.isArray(
|
|
696
|
+
for (const d of e) {
|
|
697
|
+
if (!p.isArray(d))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
l[c =
|
|
699
|
+
l[c = d[0]] = (h = l[c]) ? p.isArray(h) ? [...h, d[1]] : [h, d[1]] : d[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
o(l, r);
|
|
702
702
|
} else
|
|
703
703
|
e != null && i(r, e, s);
|
|
704
704
|
return this;
|
|
@@ -707,15 +707,15 @@ let ne = class {
|
|
|
707
707
|
if (e = Se(e), e) {
|
|
708
708
|
const s = p.findKey(this, e);
|
|
709
709
|
if (s) {
|
|
710
|
-
const
|
|
710
|
+
const a = this[s];
|
|
711
711
|
if (!r)
|
|
712
|
-
return
|
|
712
|
+
return a;
|
|
713
713
|
if (r === !0)
|
|
714
|
-
return mn(
|
|
714
|
+
return mn(a);
|
|
715
715
|
if (p.isFunction(r))
|
|
716
|
-
return r.call(this,
|
|
716
|
+
return r.call(this, a, s);
|
|
717
717
|
if (p.isRegExp(r))
|
|
718
|
-
return r.exec(
|
|
718
|
+
return r.exec(a);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
@@ -729,34 +729,34 @@ let ne = class {
|
|
|
729
729
|
}
|
|
730
730
|
delete(e, r) {
|
|
731
731
|
const s = this;
|
|
732
|
-
let
|
|
733
|
-
function i(
|
|
734
|
-
if (
|
|
735
|
-
const l = p.findKey(s,
|
|
736
|
-
l && (!r || Ye(s, s[l], l, r)) && (delete s[l],
|
|
732
|
+
let a = !1;
|
|
733
|
+
function i(o) {
|
|
734
|
+
if (o = Se(o), o) {
|
|
735
|
+
const l = p.findKey(s, o);
|
|
736
|
+
l && (!r || Ye(s, s[l], l, r)) && (delete s[l], a = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return p.isArray(e) ? e.forEach(i) : i(e),
|
|
739
|
+
return p.isArray(e) ? e.forEach(i) : i(e), a;
|
|
740
740
|
}
|
|
741
741
|
clear(e) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
|
-
let s = r.length,
|
|
743
|
+
let s = r.length, a = !1;
|
|
744
744
|
for (; s--; ) {
|
|
745
745
|
const i = r[s];
|
|
746
|
-
(!e || Ye(this, this[i], i, e, !0)) && (delete this[i],
|
|
746
|
+
(!e || Ye(this, this[i], i, e, !0)) && (delete this[i], a = !0);
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return a;
|
|
749
749
|
}
|
|
750
750
|
normalize(e) {
|
|
751
751
|
const r = this, s = {};
|
|
752
|
-
return p.forEach(this, (
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return p.forEach(this, (a, i) => {
|
|
753
|
+
const o = p.findKey(s, i);
|
|
754
|
+
if (o) {
|
|
755
|
+
r[o] = _e(a), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
const l = e ? bn(i) : String(i).trim();
|
|
759
|
-
l !== i && delete r[i], r[l] = _e(
|
|
759
|
+
l !== i && delete r[i], r[l] = _e(a), s[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...e) {
|
|
@@ -764,8 +764,8 @@ let ne = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(e) {
|
|
766
766
|
const r = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return p.forEach(this, (s,
|
|
768
|
-
s != null && s !== !1 && (r[
|
|
767
|
+
return p.forEach(this, (s, a) => {
|
|
768
|
+
s != null && s !== !1 && (r[a] = e && p.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), r;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -786,15 +786,15 @@ let ne = class {
|
|
|
786
786
|
}
|
|
787
787
|
static concat(e, ...r) {
|
|
788
788
|
const s = new this(e);
|
|
789
|
-
return r.forEach((
|
|
789
|
+
return r.forEach((a) => s.set(a)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(e) {
|
|
792
792
|
const s = (this[bt] = this[bt] = {
|
|
793
793
|
accessors: {}
|
|
794
|
-
}).accessors,
|
|
795
|
-
function i(
|
|
796
|
-
const l = Se(
|
|
797
|
-
s[l] || (wn(
|
|
794
|
+
}).accessors, a = this.prototype;
|
|
795
|
+
function i(o) {
|
|
796
|
+
const l = Se(o);
|
|
797
|
+
s[l] || (wn(a, o), s[l] = !0);
|
|
798
798
|
}
|
|
799
799
|
return p.isArray(e) ? e.forEach(i) : i(e), this;
|
|
800
800
|
}
|
|
@@ -811,11 +811,11 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
|
|
|
811
811
|
});
|
|
812
812
|
p.freezeMethods(ne);
|
|
813
813
|
function Ke(t, e) {
|
|
814
|
-
const r = this || Ie, s = e || r,
|
|
814
|
+
const r = this || Ie, s = e || r, a = ne.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return p.forEach(t, function(l) {
|
|
817
|
-
i = l.call(r, i,
|
|
818
|
-
}),
|
|
817
|
+
i = l.call(r, i, a.normalize(), e ? e.status : void 0);
|
|
818
|
+
}), a.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Zt(t) {
|
|
821
821
|
return !!(t && t.__CANCEL__);
|
|
@@ -843,44 +843,44 @@ function jn(t) {
|
|
|
843
843
|
function vn(t, e) {
|
|
844
844
|
t = t || 10;
|
|
845
845
|
const r = new Array(t), s = new Array(t);
|
|
846
|
-
let
|
|
846
|
+
let a = 0, i = 0, o;
|
|
847
847
|
return e = e !== void 0 ? e : 1e3, function(h) {
|
|
848
|
-
const c = Date.now(),
|
|
849
|
-
|
|
848
|
+
const c = Date.now(), d = s[i];
|
|
849
|
+
o || (o = c), r[a] = h, s[a] = c;
|
|
850
850
|
let b = i, y = 0;
|
|
851
|
-
for (; b !==
|
|
851
|
+
for (; b !== a; )
|
|
852
852
|
y += r[b++], b = b % t;
|
|
853
|
-
if (
|
|
853
|
+
if (a = (a + 1) % t, a === i && (i = (i + 1) % t), c - o < e)
|
|
854
854
|
return;
|
|
855
|
-
const w =
|
|
855
|
+
const w = d && c - d;
|
|
856
856
|
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function Sn(t, e) {
|
|
860
|
-
let r = 0, s = 1e3 / e,
|
|
861
|
-
const
|
|
862
|
-
r =
|
|
860
|
+
let r = 0, s = 1e3 / e, a, i;
|
|
861
|
+
const o = (c, d = Date.now()) => {
|
|
862
|
+
r = d, a = null, i && (clearTimeout(i), i = null), t(...c);
|
|
863
863
|
};
|
|
864
864
|
return [(...c) => {
|
|
865
|
-
const
|
|
866
|
-
b >= s ?
|
|
867
|
-
i = null, a
|
|
865
|
+
const d = Date.now(), b = d - r;
|
|
866
|
+
b >= s ? o(c, d) : (a = c, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(a);
|
|
868
868
|
}, s - b)));
|
|
869
|
-
}, () =>
|
|
869
|
+
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const De = (t, e, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const
|
|
873
|
+
const a = vn(50, 250);
|
|
874
874
|
return Sn((i) => {
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
875
|
+
const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s, c = a(h), d = o <= l;
|
|
876
|
+
s = o;
|
|
877
877
|
const b = {
|
|
878
|
-
loaded:
|
|
878
|
+
loaded: o,
|
|
879
879
|
total: l,
|
|
880
|
-
progress: l ?
|
|
880
|
+
progress: l ? o / l : void 0,
|
|
881
881
|
bytes: h,
|
|
882
882
|
rate: c || void 0,
|
|
883
|
-
estimated: c && l &&
|
|
883
|
+
estimated: c && l && d ? (l - o) / c : void 0,
|
|
884
884
|
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[e ? "download" : "upload"]: !0
|
|
@@ -900,9 +900,9 @@ const De = (t, e, r = 3) => {
|
|
|
900
900
|
) : () => !0, En = ee.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(t, e, r, s,
|
|
904
|
-
const
|
|
905
|
-
p.isNumber(r) &&
|
|
903
|
+
write(t, e, r, s, a, i) {
|
|
904
|
+
const o = [t + "=" + encodeURIComponent(e)];
|
|
905
|
+
p.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), p.isString(s) && o.push("path=" + s), p.isString(a) && o.push("domain=" + a), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(t) {
|
|
908
908
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -938,28 +938,28 @@ const vt = (t) => t instanceof ne ? { ...t } : t;
|
|
|
938
938
|
function he(t, e) {
|
|
939
939
|
e = e || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function s(c,
|
|
942
|
-
return p.isPlainObject(c) && p.isPlainObject(
|
|
941
|
+
function s(c, d, b, y) {
|
|
942
|
+
return p.isPlainObject(c) && p.isPlainObject(d) ? p.merge.call({ caseless: y }, c, d) : p.isPlainObject(d) ? p.merge({}, d) : p.isArray(d) ? d.slice() : d;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
if (p.isUndefined(
|
|
944
|
+
function a(c, d, b, y) {
|
|
945
|
+
if (p.isUndefined(d)) {
|
|
946
946
|
if (!p.isUndefined(c))
|
|
947
947
|
return s(void 0, c, b, y);
|
|
948
|
-
} else return s(c,
|
|
948
|
+
} else return s(c, d, b, y);
|
|
949
949
|
}
|
|
950
|
-
function i(c,
|
|
951
|
-
if (!p.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
950
|
+
function i(c, d) {
|
|
951
|
+
if (!p.isUndefined(d))
|
|
952
|
+
return s(void 0, d);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (p.isUndefined(
|
|
954
|
+
function o(c, d) {
|
|
955
|
+
if (p.isUndefined(d)) {
|
|
956
956
|
if (!p.isUndefined(c))
|
|
957
957
|
return s(void 0, c);
|
|
958
|
-
} else return s(void 0,
|
|
958
|
+
} else return s(void 0, d);
|
|
959
959
|
}
|
|
960
|
-
function l(c,
|
|
960
|
+
function l(c, d, b) {
|
|
961
961
|
if (b in e)
|
|
962
|
-
return s(c,
|
|
962
|
+
return s(c, d);
|
|
963
963
|
if (b in t)
|
|
964
964
|
return s(void 0, c);
|
|
965
965
|
}
|
|
@@ -967,70 +967,70 @@ function he(t, e) {
|
|
|
967
967
|
url: i,
|
|
968
968
|
method: i,
|
|
969
969
|
data: i,
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
970
|
+
baseURL: o,
|
|
971
|
+
transformRequest: o,
|
|
972
|
+
transformResponse: o,
|
|
973
|
+
paramsSerializer: o,
|
|
974
|
+
timeout: o,
|
|
975
|
+
timeoutMessage: o,
|
|
976
|
+
withCredentials: o,
|
|
977
|
+
withXSRFToken: o,
|
|
978
|
+
adapter: o,
|
|
979
|
+
responseType: o,
|
|
980
|
+
xsrfCookieName: o,
|
|
981
|
+
xsrfHeaderName: o,
|
|
982
|
+
onUploadProgress: o,
|
|
983
|
+
onDownloadProgress: o,
|
|
984
|
+
decompress: o,
|
|
985
|
+
maxContentLength: o,
|
|
986
|
+
maxBodyLength: o,
|
|
987
|
+
beforeRedirect: o,
|
|
988
|
+
transport: o,
|
|
989
|
+
httpAgent: o,
|
|
990
|
+
httpsAgent: o,
|
|
991
|
+
cancelToken: o,
|
|
992
|
+
socketPath: o,
|
|
993
|
+
responseEncoding: o,
|
|
994
994
|
validateStatus: l,
|
|
995
|
-
headers: (c,
|
|
995
|
+
headers: (c, d, b) => a(vt(c), vt(d), b, !0)
|
|
996
996
|
};
|
|
997
|
-
return p.forEach(Object.keys({ ...t, ...e }), function(
|
|
998
|
-
const b = h[
|
|
999
|
-
p.isUndefined(y) && b !== l || (r[
|
|
997
|
+
return p.forEach(Object.keys({ ...t, ...e }), function(d) {
|
|
998
|
+
const b = h[d] || a, y = b(t[d], e[d], d);
|
|
999
|
+
p.isUndefined(y) && b !== l || (r[d] = y);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const tr = (t) => {
|
|
1003
1003
|
const e = he({}, t);
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName:
|
|
1005
|
-
if (e.headers =
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: l } = e;
|
|
1005
|
+
if (e.headers = o = ne.from(o), e.url = Jt(er(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), l && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1008
1008
|
), p.isFormData(r)) {
|
|
1009
1009
|
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
-
|
|
1010
|
+
o.setContentType(void 0);
|
|
1011
1011
|
else if (p.isFunction(r.getHeaders)) {
|
|
1012
1012
|
const h = r.getHeaders(), c = ["content-type", "content-length"];
|
|
1013
|
-
Object.entries(h).forEach(([
|
|
1014
|
-
c.includes(
|
|
1013
|
+
Object.entries(h).forEach(([d, b]) => {
|
|
1014
|
+
c.includes(d.toLowerCase()) && o.set(d, b);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (ee.hasStandardBrowserEnv && (s && p.isFunction(s) && (s = s(e)), s || s !== !1 && kn(e.url))) {
|
|
1019
|
-
const h =
|
|
1020
|
-
h &&
|
|
1019
|
+
const h = a && i && En.read(i);
|
|
1020
|
+
h && o.set(a, h);
|
|
1021
1021
|
}
|
|
1022
1022
|
return e;
|
|
1023
1023
|
}, Rn = typeof XMLHttpRequest < "u", In = Rn && function(t) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
|
-
const
|
|
1026
|
-
let i =
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } =
|
|
1025
|
+
const a = tr(t);
|
|
1026
|
+
let i = a.data;
|
|
1027
|
+
const o = ne.from(a.headers).normalize();
|
|
1028
|
+
let { responseType: l, onUploadProgress: h, onDownloadProgress: c } = a, d, b, y, w, u;
|
|
1029
1029
|
function j() {
|
|
1030
|
-
w && w(),
|
|
1030
|
+
w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(d), a.signal && a.signal.removeEventListener("abort", d);
|
|
1031
1031
|
}
|
|
1032
1032
|
let m = new XMLHttpRequest();
|
|
1033
|
-
m.open(
|
|
1033
|
+
m.open(a.method.toUpperCase(), a.url, !0), m.timeout = a.timeout;
|
|
1034
1034
|
function _() {
|
|
1035
1035
|
if (!m)
|
|
1036
1036
|
return;
|
|
@@ -1058,20 +1058,20 @@ const tr = (t) => {
|
|
|
1058
1058
|
const M = C && C.message ? C.message : "Network Error", g = new L(M, L.ERR_NETWORK, t, m);
|
|
1059
1059
|
g.event = C || null, s(g), m = null;
|
|
1060
1060
|
}, m.ontimeout = function() {
|
|
1061
|
-
let C =
|
|
1062
|
-
const M =
|
|
1063
|
-
|
|
1061
|
+
let C = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
+
const M = a.transitional || Xt;
|
|
1063
|
+
a.timeoutErrorMessage && (C = a.timeoutErrorMessage), s(new L(
|
|
1064
1064
|
C,
|
|
1065
1065
|
M.clarifyTimeoutError ? L.ETIMEDOUT : L.ECONNABORTED,
|
|
1066
1066
|
t,
|
|
1067
1067
|
m
|
|
1068
1068
|
)), m = null;
|
|
1069
|
-
}, i === void 0 &&
|
|
1069
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in m && p.forEach(o.toJSON(), function(C, M) {
|
|
1070
1070
|
m.setRequestHeader(M, C);
|
|
1071
|
-
}), p.isUndefined(
|
|
1071
|
+
}), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), c && ([y, u] = De(c, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = De(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (d = (A) => {
|
|
1072
1072
|
m && (s(!A || A.type ? new je(null, t, m) : A), m.abort(), m = null);
|
|
1073
|
-
},
|
|
1074
|
-
const R = jn(
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(d), a.signal && (a.signal.aborted ? d() : a.signal.addEventListener("abort", d)));
|
|
1074
|
+
const R = jn(a.url);
|
|
1075
1075
|
if (R && ee.protocols.indexOf(R) === -1) {
|
|
1076
1076
|
s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
|
|
1077
1077
|
return;
|
|
@@ -1081,19 +1081,19 @@ const tr = (t) => {
|
|
|
1081
1081
|
}, Pn = (t, e) => {
|
|
1082
1082
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1083
1083
|
if (e || r) {
|
|
1084
|
-
let s = new AbortController(),
|
|
1084
|
+
let s = new AbortController(), a;
|
|
1085
1085
|
const i = function(c) {
|
|
1086
|
-
if (!
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
s.abort(
|
|
1086
|
+
if (!a) {
|
|
1087
|
+
a = !0, l();
|
|
1088
|
+
const d = c instanceof Error ? c : this.reason;
|
|
1089
|
+
s.abort(d instanceof L ? d : new je(d instanceof Error ? d.message : d));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let o = e && setTimeout(() => {
|
|
1093
|
+
o = null, i(new L(`timeout ${e} of ms exceeded`, L.ETIMEDOUT));
|
|
1094
1094
|
}, e);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
t && (
|
|
1096
|
+
t && (o && clearTimeout(o), o = null, t.forEach((c) => {
|
|
1097
1097
|
c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
|
|
1098
1098
|
}), t = null);
|
|
1099
1099
|
};
|
|
@@ -1107,9 +1107,9 @@ const tr = (t) => {
|
|
|
1107
1107
|
yield t;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
let s = 0,
|
|
1110
|
+
let s = 0, a;
|
|
1111
1111
|
for (; s < r; )
|
|
1112
|
-
|
|
1112
|
+
a = s + e, yield t.slice(s, a), s = a;
|
|
1113
1113
|
}, zn = async function* (t, e) {
|
|
1114
1114
|
for await (const r of An(t))
|
|
1115
1115
|
yield* On(r, e);
|
|
@@ -1130,30 +1130,30 @@ const tr = (t) => {
|
|
|
1130
1130
|
await e.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, St = (t, e, r, s) => {
|
|
1133
|
-
const
|
|
1134
|
-
let i = 0,
|
|
1135
|
-
|
|
1133
|
+
const a = zn(t, e);
|
|
1134
|
+
let i = 0, o, l = (h) => {
|
|
1135
|
+
o || (o = !0, s && s(h));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(h) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done: c, value:
|
|
1140
|
+
const { done: c, value: d } = await a.next();
|
|
1141
1141
|
if (c) {
|
|
1142
1142
|
l(), h.close();
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
let b =
|
|
1145
|
+
let b = d.byteLength;
|
|
1146
1146
|
if (r) {
|
|
1147
1147
|
let y = i += b;
|
|
1148
1148
|
r(y);
|
|
1149
1149
|
}
|
|
1150
|
-
h.enqueue(new Uint8Array(
|
|
1150
|
+
h.enqueue(new Uint8Array(d));
|
|
1151
1151
|
} catch (c) {
|
|
1152
1152
|
throw l(c), c;
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(h) {
|
|
1156
|
-
return l(h),
|
|
1156
|
+
return l(h), a.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
@@ -1174,49 +1174,49 @@ const tr = (t) => {
|
|
|
1174
1174
|
t = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, _n, t);
|
|
1177
|
-
const { fetch: e, Request: r, Response: s } = t,
|
|
1178
|
-
if (!
|
|
1177
|
+
const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", i = Oe(r), o = Oe(s);
|
|
1178
|
+
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l =
|
|
1181
|
-
let
|
|
1180
|
+
const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), c = i && l && Tt(() => {
|
|
1181
|
+
let u = !1;
|
|
1182
1182
|
const j = new r(ee.origin, {
|
|
1183
1183
|
body: new Et(),
|
|
1184
1184
|
method: "POST",
|
|
1185
1185
|
get duplex() {
|
|
1186
|
-
return
|
|
1186
|
+
return u = !0, "half";
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
|
-
return
|
|
1190
|
-
}),
|
|
1191
|
-
stream:
|
|
1189
|
+
return u && !j;
|
|
1190
|
+
}), d = o && l && Tt(() => p.isReadableStream(new s("").body)), b = {
|
|
1191
|
+
stream: d && ((u) => u.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1194
|
-
!b[
|
|
1195
|
-
let _ = j && j[
|
|
1193
|
+
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
|
|
1194
|
+
!b[u] && (b[u] = (j, m) => {
|
|
1195
|
+
let _ = j && j[u];
|
|
1196
1196
|
if (_)
|
|
1197
1197
|
return _.call(j);
|
|
1198
|
-
throw new L(`Response type '${
|
|
1198
|
+
throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, m);
|
|
1199
1199
|
});
|
|
1200
1200
|
});
|
|
1201
|
-
const y = async (
|
|
1202
|
-
if (
|
|
1201
|
+
const y = async (u) => {
|
|
1202
|
+
if (u == null)
|
|
1203
1203
|
return 0;
|
|
1204
|
-
if (p.isBlob(
|
|
1205
|
-
return
|
|
1206
|
-
if (p.isSpecCompliantForm(
|
|
1204
|
+
if (p.isBlob(u))
|
|
1205
|
+
return u.size;
|
|
1206
|
+
if (p.isSpecCompliantForm(u))
|
|
1207
1207
|
return (await new r(ee.origin, {
|
|
1208
1208
|
method: "POST",
|
|
1209
|
-
body:
|
|
1209
|
+
body: u
|
|
1210
1210
|
}).arrayBuffer()).byteLength;
|
|
1211
|
-
if (p.isArrayBufferView(
|
|
1212
|
-
return
|
|
1213
|
-
if (p.isURLSearchParams(
|
|
1214
|
-
return (await h(
|
|
1215
|
-
}, w = async (
|
|
1216
|
-
const m = p.toFiniteNumber(
|
|
1211
|
+
if (p.isArrayBufferView(u) || p.isArrayBuffer(u))
|
|
1212
|
+
return u.byteLength;
|
|
1213
|
+
if (p.isURLSearchParams(u) && (u = u + ""), p.isString(u))
|
|
1214
|
+
return (await h(u)).byteLength;
|
|
1215
|
+
}, w = async (u, j) => {
|
|
1216
|
+
const m = p.toFiniteNumber(u.getContentLength());
|
|
1217
1217
|
return m ?? y(j);
|
|
1218
1218
|
};
|
|
1219
|
-
return async (
|
|
1219
|
+
return async (u) => {
|
|
1220
1220
|
let {
|
|
1221
1221
|
url: j,
|
|
1222
1222
|
method: m,
|
|
@@ -1230,7 +1230,7 @@ const tr = (t) => {
|
|
|
1230
1230
|
headers: v,
|
|
1231
1231
|
withCredentials: U = "same-origin",
|
|
1232
1232
|
fetchOptions: q
|
|
1233
|
-
} = tr(
|
|
1233
|
+
} = tr(u), F = e || fetch;
|
|
1234
1234
|
I = I ? (I + "").toLowerCase() : "text";
|
|
1235
1235
|
let V = Pn([R, A && A.toAbortSignal()], C), Z = null;
|
|
1236
1236
|
const T = V && V.unsubscribe && (() => {
|
|
@@ -1264,8 +1264,8 @@ const tr = (t) => {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
Z = i && new r(j, P);
|
|
1266
1266
|
let K = await (i ? F(Z, q) : F(j, P));
|
|
1267
|
-
const Q =
|
|
1268
|
-
if (
|
|
1267
|
+
const Q = d && (I === "stream" || I === "response");
|
|
1268
|
+
if (d && (M || Q && T)) {
|
|
1269
1269
|
const f = {};
|
|
1270
1270
|
["status", "statusText", "headers"].forEach(($) => {
|
|
1271
1271
|
f[$] = K[$];
|
|
@@ -1282,36 +1282,36 @@ const tr = (t) => {
|
|
|
1282
1282
|
);
|
|
1283
1283
|
}
|
|
1284
1284
|
I = I || "text";
|
|
1285
|
-
let X = await b[p.findKey(b, I) || "text"](K,
|
|
1285
|
+
let X = await b[p.findKey(b, I) || "text"](K, u);
|
|
1286
1286
|
return !Q && T && T(), await new Promise((f, S) => {
|
|
1287
1287
|
Qt(f, S, {
|
|
1288
1288
|
data: X,
|
|
1289
1289
|
headers: ne.from(K.headers),
|
|
1290
1290
|
status: K.status,
|
|
1291
1291
|
statusText: K.statusText,
|
|
1292
|
-
config:
|
|
1292
|
+
config: u,
|
|
1293
1293
|
request: Z
|
|
1294
1294
|
});
|
|
1295
1295
|
});
|
|
1296
1296
|
} catch (z) {
|
|
1297
1297
|
throw T && T(), z && z.name === "TypeError" && /Load failed|fetch/i.test(z.message) ? Object.assign(
|
|
1298
|
-
new L("Network Error", L.ERR_NETWORK,
|
|
1298
|
+
new L("Network Error", L.ERR_NETWORK, u, Z),
|
|
1299
1299
|
{
|
|
1300
1300
|
cause: z.cause || z
|
|
1301
1301
|
}
|
|
1302
|
-
) : L.from(z, z && z.code,
|
|
1302
|
+
) : L.from(z, z && z.code, u, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Nn = /* @__PURE__ */ new Map(), rr = (t) => {
|
|
1306
1306
|
let e = t ? t.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response:
|
|
1307
|
+
const { fetch: r, Request: s, Response: a } = e, i = [
|
|
1308
1308
|
s,
|
|
1309
|
-
|
|
1309
|
+
a,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let o = i.length, l = o, h, c, d = Nn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l], c =
|
|
1314
|
+
h = i[l], c = d.get(h), c === void 0 && d.set(h, c = l ? /* @__PURE__ */ new Map() : $n(e)), d = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
rr();
|
|
@@ -1335,30 +1335,30 @@ const Rt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
|
|
|
1335
1335
|
getAdapter: (t, e) => {
|
|
1336
1336
|
t = p.isArray(t) ? t : [t];
|
|
1337
1337
|
const { length: r } = t;
|
|
1338
|
-
let s,
|
|
1338
|
+
let s, a;
|
|
1339
1339
|
const i = {};
|
|
1340
|
-
for (let
|
|
1341
|
-
s = t[
|
|
1340
|
+
for (let o = 0; o < r; o++) {
|
|
1341
|
+
s = t[o];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (
|
|
1343
|
+
if (a = s, !Un(s) && (a = tt[(l = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new L(`Unknown adapter '${l}'`);
|
|
1345
|
-
if (
|
|
1345
|
+
if (a && (p.isFunction(a) || (a = a.get(e))))
|
|
1346
1346
|
break;
|
|
1347
|
-
i[l || "#" +
|
|
1347
|
+
i[l || "#" + o] = a;
|
|
1348
1348
|
}
|
|
1349
|
-
if (!
|
|
1350
|
-
const
|
|
1349
|
+
if (!a) {
|
|
1350
|
+
const o = Object.entries(i).map(
|
|
1351
1351
|
([h, c]) => `adapter ${h} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
|
-
let l = r ?
|
|
1354
|
-
` +
|
|
1355
|
-
`) : " " + Rt(
|
|
1353
|
+
let l = r ? o.length > 1 ? `since :
|
|
1354
|
+
` + o.map(Rt).join(`
|
|
1355
|
+
`) : " " + Rt(o[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new L(
|
|
1357
1357
|
"There is no suitable adapter to dispatch the request " + l,
|
|
1358
1358
|
"ERR_NOT_SUPPORT"
|
|
1359
1359
|
);
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return a;
|
|
1362
1362
|
},
|
|
1363
1363
|
adapters: tt
|
|
1364
1364
|
};
|
|
@@ -1392,21 +1392,21 @@ const sr = "1.12.2", Be = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const Pt = {};
|
|
1394
1394
|
Be.transitional = function(e, r, s) {
|
|
1395
|
-
function
|
|
1396
|
-
return "[Axios v" + sr + "] Transitional option '" + i + "'" +
|
|
1395
|
+
function a(i, o) {
|
|
1396
|
+
return "[Axios v" + sr + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (i,
|
|
1398
|
+
return (i, o, l) => {
|
|
1399
1399
|
if (e === !1)
|
|
1400
1400
|
throw new L(
|
|
1401
|
-
o
|
|
1401
|
+
a(o, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
L.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !Pt[
|
|
1405
|
-
|
|
1406
|
-
|
|
1404
|
+
return r && !Pt[o] && (Pt[o] = !0, console.warn(
|
|
1405
|
+
a(
|
|
1406
|
+
o,
|
|
1407
1407
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1408
1408
|
)
|
|
1409
|
-
)), e ? e(i,
|
|
1409
|
+
)), e ? e(i, o, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
Be.spelling = function(e) {
|
|
@@ -1416,11 +1416,11 @@ function Dn(t, e, r) {
|
|
|
1416
1416
|
if (typeof t != "object")
|
|
1417
1417
|
throw new L("options must be an object", L.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(t);
|
|
1419
|
-
let
|
|
1420
|
-
for (;
|
|
1421
|
-
const i = s[
|
|
1422
|
-
if (
|
|
1423
|
-
const l = t[i], h = l === void 0 ||
|
|
1419
|
+
let a = s.length;
|
|
1420
|
+
for (; a-- > 0; ) {
|
|
1421
|
+
const i = s[a], o = e[i];
|
|
1422
|
+
if (o) {
|
|
1423
|
+
const l = t[i], h = l === void 0 || o(l, i, t);
|
|
1424
1424
|
if (h !== !0)
|
|
1425
1425
|
throw new L("option " + i + " must be " + h, L.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
@@ -1453,9 +1453,9 @@ let xe = class {
|
|
|
1453
1453
|
return await this._request(e, r);
|
|
1454
1454
|
} catch (s) {
|
|
1455
1455
|
if (s instanceof Error) {
|
|
1456
|
-
let
|
|
1457
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1458
|
-
const i =
|
|
1456
|
+
let a = {};
|
|
1457
|
+
Error.captureStackTrace ? Error.captureStackTrace(a) : a = new Error();
|
|
1458
|
+
const i = a.stack ? a.stack.replace(/^.+\n/, "") : "";
|
|
1459
1459
|
try {
|
|
1460
1460
|
s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1461
1461
|
` + i) : s.stack = i;
|
|
@@ -1467,30 +1467,30 @@ let xe = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(e, r) {
|
|
1469
1469
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = he(this.defaults, r);
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: i } = r;
|
|
1471
1471
|
s !== void 0 && $e.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ie.transitional(ie.boolean),
|
|
1473
1473
|
forcedJSONParsing: ie.transitional(ie.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ie.transitional(ie.boolean)
|
|
1475
|
-
}, !1),
|
|
1476
|
-
serialize:
|
|
1477
|
-
} : $e.assertOptions(
|
|
1475
|
+
}, !1), a != null && (p.isFunction(a) ? r.paramsSerializer = {
|
|
1476
|
+
serialize: a
|
|
1477
|
+
} : $e.assertOptions(a, {
|
|
1478
1478
|
encode: ie.function,
|
|
1479
1479
|
serialize: ie.function
|
|
1480
1480
|
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), $e.assertOptions(r, {
|
|
1481
1481
|
baseUrl: ie.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ie.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1484
|
+
let o = i && p.merge(
|
|
1485
1485
|
i.common,
|
|
1486
1486
|
i[r.method]
|
|
1487
1487
|
);
|
|
1488
1488
|
i && p.forEach(
|
|
1489
1489
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1490
|
-
(
|
|
1491
|
-
delete i[
|
|
1490
|
+
(u) => {
|
|
1491
|
+
delete i[u];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = ne.concat(
|
|
1493
|
+
), r.headers = ne.concat(o, i);
|
|
1494
1494
|
const l = [];
|
|
1495
1495
|
let h = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(j) {
|
|
@@ -1500,32 +1500,32 @@ let xe = class {
|
|
|
1500
1500
|
this.interceptors.response.forEach(function(j) {
|
|
1501
1501
|
c.push(j.fulfilled, j.rejected);
|
|
1502
1502
|
});
|
|
1503
|
-
let
|
|
1503
|
+
let d, b = 0, y;
|
|
1504
1504
|
if (!h) {
|
|
1505
|
-
const
|
|
1506
|
-
for (
|
|
1507
|
-
|
|
1508
|
-
return
|
|
1505
|
+
const u = [It.bind(this), void 0];
|
|
1506
|
+
for (u.unshift(...l), u.push(...c), y = u.length, d = Promise.resolve(r); b < y; )
|
|
1507
|
+
d = d.then(u[b++], u[b++]);
|
|
1508
|
+
return d;
|
|
1509
1509
|
}
|
|
1510
1510
|
y = l.length;
|
|
1511
1511
|
let w = r;
|
|
1512
1512
|
for (; b < y; ) {
|
|
1513
|
-
const
|
|
1513
|
+
const u = l[b++], j = l[b++];
|
|
1514
1514
|
try {
|
|
1515
|
-
w =
|
|
1515
|
+
w = u(w);
|
|
1516
1516
|
} catch (m) {
|
|
1517
1517
|
j.call(this, m);
|
|
1518
1518
|
break;
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1523
|
-
} catch (
|
|
1524
|
-
return Promise.reject(
|
|
1522
|
+
d = It.call(this, w);
|
|
1523
|
+
} catch (u) {
|
|
1524
|
+
return Promise.reject(u);
|
|
1525
1525
|
}
|
|
1526
1526
|
for (b = 0, y = c.length; b < y; )
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1527
|
+
d = d.then(c[b++], c[b++]);
|
|
1528
|
+
return d;
|
|
1529
1529
|
}
|
|
1530
1530
|
getUri(e) {
|
|
1531
1531
|
e = he(this.defaults, e);
|
|
@@ -1544,20 +1544,20 @@ p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
p.forEach(["post", "put", "patch"], function(e) {
|
|
1546
1546
|
function r(s) {
|
|
1547
|
-
return function(i,
|
|
1547
|
+
return function(i, o, l) {
|
|
1548
1548
|
return this.request(he(l || {}, {
|
|
1549
1549
|
method: e,
|
|
1550
1550
|
headers: s ? {
|
|
1551
1551
|
"Content-Type": "multipart/form-data"
|
|
1552
1552
|
} : {},
|
|
1553
1553
|
url: i,
|
|
1554
|
-
data:
|
|
1554
|
+
data: o
|
|
1555
1555
|
}));
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
1558
|
xe.prototype[e] = r(), xe.prototype[e + "Form"] = r(!0);
|
|
1559
1559
|
});
|
|
1560
|
-
let Ln = class
|
|
1560
|
+
let Ln = class ar {
|
|
1561
1561
|
constructor(e) {
|
|
1562
1562
|
if (typeof e != "function")
|
|
1563
1563
|
throw new TypeError("executor must be a function.");
|
|
@@ -1566,22 +1566,22 @@ let Ln = class or {
|
|
|
1566
1566
|
r = i;
|
|
1567
1567
|
});
|
|
1568
1568
|
const s = this;
|
|
1569
|
-
this.promise.then((
|
|
1569
|
+
this.promise.then((a) => {
|
|
1570
1570
|
if (!s._listeners) return;
|
|
1571
1571
|
let i = s._listeners.length;
|
|
1572
1572
|
for (; i-- > 0; )
|
|
1573
|
-
s._listeners[i](
|
|
1573
|
+
s._listeners[i](a);
|
|
1574
1574
|
s._listeners = null;
|
|
1575
|
-
}), this.promise.then = (
|
|
1575
|
+
}), this.promise.then = (a) => {
|
|
1576
1576
|
let i;
|
|
1577
|
-
const
|
|
1577
|
+
const o = new Promise((l) => {
|
|
1578
1578
|
s.subscribe(l), i = l;
|
|
1579
|
-
}).then(
|
|
1580
|
-
return
|
|
1579
|
+
}).then(a);
|
|
1580
|
+
return o.cancel = function() {
|
|
1581
1581
|
s.unsubscribe(i);
|
|
1582
|
-
},
|
|
1583
|
-
}, e(function(i,
|
|
1584
|
-
s.reason || (s.reason = new je(i,
|
|
1582
|
+
}, o;
|
|
1583
|
+
}, e(function(i, o, l) {
|
|
1584
|
+
s.reason || (s.reason = new je(i, o, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1623,8 +1623,8 @@ let Ln = class or {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let e;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new
|
|
1627
|
-
e =
|
|
1626
|
+
token: new ar(function(a) {
|
|
1627
|
+
e = a;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: e
|
|
1630
1630
|
};
|
|
@@ -1706,13 +1706,13 @@ const rt = {
|
|
|
1706
1706
|
Object.entries(rt).forEach(([t, e]) => {
|
|
1707
1707
|
rt[e] = t;
|
|
1708
1708
|
});
|
|
1709
|
-
function
|
|
1709
|
+
function or(t) {
|
|
1710
1710
|
const e = new xe(t), r = Ut(xe.prototype.request, e);
|
|
1711
|
-
return p.extend(r, xe.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(
|
|
1712
|
-
return
|
|
1711
|
+
return p.extend(r, xe.prototype, e, { allOwnKeys: !0 }), p.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1712
|
+
return or(he(t, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
|
-
const W =
|
|
1715
|
+
const W = or(Ie);
|
|
1716
1716
|
W.Axios = xe;
|
|
1717
1717
|
W.CanceledError = je;
|
|
1718
1718
|
W.CancelToken = Ln;
|
|
@@ -1739,18 +1739,18 @@ const {
|
|
|
1739
1739
|
isCancel: Gs,
|
|
1740
1740
|
CancelToken: Zs,
|
|
1741
1741
|
VERSION: Qs,
|
|
1742
|
-
all:
|
|
1743
|
-
Cancel:
|
|
1744
|
-
isAxiosError:
|
|
1745
|
-
spread:
|
|
1746
|
-
toFormData:
|
|
1747
|
-
AxiosHeaders:
|
|
1748
|
-
HttpStatusCode:
|
|
1749
|
-
formToJSON:
|
|
1750
|
-
getAdapter:
|
|
1751
|
-
mergeConfig:
|
|
1742
|
+
all: ea,
|
|
1743
|
+
Cancel: ta,
|
|
1744
|
+
isAxiosError: ra,
|
|
1745
|
+
spread: na,
|
|
1746
|
+
toFormData: sa,
|
|
1747
|
+
AxiosHeaders: aa,
|
|
1748
|
+
HttpStatusCode: oa,
|
|
1749
|
+
formToJSON: ia,
|
|
1750
|
+
getAdapter: la,
|
|
1751
|
+
mergeConfig: ca
|
|
1752
1752
|
} = W;
|
|
1753
|
-
class
|
|
1753
|
+
class da {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1779,7 +1779,7 @@ class uo {
|
|
|
1779
1779
|
* @param data Optional request body
|
|
1780
1780
|
* @param extraHeaders Optional custom headers
|
|
1781
1781
|
*/
|
|
1782
|
-
async request(e, r, s,
|
|
1782
|
+
async request(e, r, s, a = {}) {
|
|
1783
1783
|
if (!e) throw new Error("HTTP method is required");
|
|
1784
1784
|
if (!r) throw new Error("Request path is required");
|
|
1785
1785
|
try {
|
|
@@ -1791,12 +1791,12 @@ class uo {
|
|
|
1791
1791
|
url: r,
|
|
1792
1792
|
method: e,
|
|
1793
1793
|
data: i,
|
|
1794
|
-
headers:
|
|
1794
|
+
headers: a
|
|
1795
1795
|
})).data;
|
|
1796
1796
|
} catch (i) {
|
|
1797
1797
|
if (console.error("❌ [Request Error]:", i), i.isAxiosError) {
|
|
1798
|
-
const
|
|
1799
|
-
throw new Error(`Request failed (${
|
|
1798
|
+
const o = i.response?.status || 0, l = i.response?.data?.message || i.message || "Unknown Axios error occurred";
|
|
1799
|
+
throw new Error(`Request failed (${o}): ${l}`);
|
|
1800
1800
|
}
|
|
1801
1801
|
throw new Error(`Unexpected error: ${i.message || "Unknown failure"}`);
|
|
1802
1802
|
}
|
|
@@ -1807,8 +1807,8 @@ class uo {
|
|
|
1807
1807
|
* @param params user details
|
|
1808
1808
|
*/
|
|
1809
1809
|
async signup(e) {
|
|
1810
|
-
const { name: r, email: s, password:
|
|
1811
|
-
if (!r || !s || !
|
|
1810
|
+
const { name: r, email: s, password: a } = e;
|
|
1811
|
+
if (!r || !s || !a)
|
|
1812
1812
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1813
1813
|
return this.request("POST", "/users/signup", e);
|
|
1814
1814
|
}
|
|
@@ -1817,13 +1817,13 @@ class uo {
|
|
|
1817
1817
|
* @param params login details
|
|
1818
1818
|
*/
|
|
1819
1819
|
async login(e) {
|
|
1820
|
-
const { email: r, password: s, appId:
|
|
1820
|
+
const { email: r, password: s, appId: a } = e;
|
|
1821
1821
|
if (!r || !s)
|
|
1822
1822
|
throw new Error("login: 'email' and 'password' are required");
|
|
1823
1823
|
return this.request("POST", "/users/login", {
|
|
1824
1824
|
email: r,
|
|
1825
1825
|
password: s,
|
|
1826
|
-
appId:
|
|
1826
|
+
appId: a || this.appId
|
|
1827
1827
|
});
|
|
1828
1828
|
}
|
|
1829
1829
|
/**
|
|
@@ -1843,15 +1843,15 @@ class uo {
|
|
|
1843
1843
|
* @param params requires userId, currentPassword, newPassword
|
|
1844
1844
|
*/
|
|
1845
1845
|
async changePassword(e) {
|
|
1846
|
-
const { userId: r, currentPassword: s, newPassword:
|
|
1846
|
+
const { userId: r, currentPassword: s, newPassword: a, appId: i } = e;
|
|
1847
1847
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1848
|
-
if (!s || !
|
|
1848
|
+
if (!s || !a)
|
|
1849
1849
|
throw new Error(
|
|
1850
1850
|
"changePassword: both 'currentPassword' and 'newPassword' are required"
|
|
1851
1851
|
);
|
|
1852
1852
|
return this.request("PUT", `/users/change-password/${r}`, {
|
|
1853
1853
|
currentPassword: s,
|
|
1854
|
-
newPassword:
|
|
1854
|
+
newPassword: a,
|
|
1855
1855
|
appId: i || this.appId
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
@@ -1900,13 +1900,13 @@ class uo {
|
|
|
1900
1900
|
* @param params requires token + otp
|
|
1901
1901
|
*/
|
|
1902
1902
|
async verifyEmail(e) {
|
|
1903
|
-
const { token: r, otp: s, appId:
|
|
1903
|
+
const { token: r, otp: s, appId: a } = e;
|
|
1904
1904
|
if (!r) throw new Error("verifyEmail: 'token' is required");
|
|
1905
1905
|
if (!s) throw new Error("verifyEmail: 'otp' is required");
|
|
1906
1906
|
return this.request(
|
|
1907
1907
|
"POST",
|
|
1908
1908
|
"/users/verify-email",
|
|
1909
|
-
{ otp: s, appId:
|
|
1909
|
+
{ otp: s, appId: a || this.appId },
|
|
1910
1910
|
{ Authorization: `Bearer ${r}` }
|
|
1911
1911
|
);
|
|
1912
1912
|
}
|
|
@@ -1927,15 +1927,15 @@ class uo {
|
|
|
1927
1927
|
* @param params requires email, otp, newPassword
|
|
1928
1928
|
*/
|
|
1929
1929
|
async resetPassword(e) {
|
|
1930
|
-
const { email: r, otp: s, newPassword:
|
|
1931
|
-
if (!r || !s || !
|
|
1930
|
+
const { email: r, otp: s, newPassword: a, appId: i } = e;
|
|
1931
|
+
if (!r || !s || !a)
|
|
1932
1932
|
throw new Error(
|
|
1933
1933
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
1934
1934
|
);
|
|
1935
1935
|
return this.request("POST", "/users/reset-password", {
|
|
1936
1936
|
email: r,
|
|
1937
1937
|
otp: s,
|
|
1938
|
-
newPassword:
|
|
1938
|
+
newPassword: a,
|
|
1939
1939
|
appId: i || this.appId
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
@@ -1948,8 +1948,8 @@ class uo {
|
|
|
1948
1948
|
async searchUserData(e) {
|
|
1949
1949
|
const { userId: r, ...s } = e;
|
|
1950
1950
|
if (!r) throw new Error("userId required");
|
|
1951
|
-
const
|
|
1952
|
-
return this.request("GET", `/users/${r}/data/search?${
|
|
1951
|
+
const a = new URLSearchParams(s).toString();
|
|
1952
|
+
return this.request("GET", `/users/${r}/data/search?${a}`);
|
|
1953
1953
|
}
|
|
1954
1954
|
/**
|
|
1955
1955
|
* Fetch ALL users' merged data for a specific app
|
|
@@ -1984,14 +1984,14 @@ class uo {
|
|
|
1984
1984
|
* @param params requires userId and data object
|
|
1985
1985
|
*/
|
|
1986
1986
|
async addUserData(e) {
|
|
1987
|
-
const { userId: r, dataCategory: s, data:
|
|
1987
|
+
const { userId: r, dataCategory: s, data: a } = e;
|
|
1988
1988
|
if (!r) throw new Error("addUserData: 'userId' is required");
|
|
1989
1989
|
if (!s)
|
|
1990
1990
|
throw new Error("addUserData: 'dataCategory' is required");
|
|
1991
|
-
if (!
|
|
1991
|
+
if (!a) throw new Error("addUserData: 'data' is required");
|
|
1992
1992
|
return this.request("POST", `/users/${r}/data`, {
|
|
1993
1993
|
dataCategory: s,
|
|
1994
|
-
...
|
|
1994
|
+
...a
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
1997
|
/**
|
|
@@ -1999,11 +1999,11 @@ class uo {
|
|
|
1999
1999
|
* @param params requires userId, dataId, and updated fields
|
|
2000
2000
|
*/
|
|
2001
2001
|
async updateUserData(e) {
|
|
2002
|
-
const { userId: r, dataId: s, data:
|
|
2002
|
+
const { userId: r, dataId: s, data: a } = e;
|
|
2003
2003
|
if (!r || !s)
|
|
2004
2004
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
2005
|
-
if (!
|
|
2006
|
-
return this.request("PUT", `/users/${r}/data/${s}`,
|
|
2005
|
+
if (!a) throw new Error("updateUserData: 'data' is required");
|
|
2006
|
+
return this.request("PUT", `/users/${r}/data/${s}`, a);
|
|
2007
2007
|
}
|
|
2008
2008
|
/**
|
|
2009
2009
|
* Delete a data object by its id
|
|
@@ -2031,18 +2031,18 @@ function Wn() {
|
|
|
2031
2031
|
if (Ot) return ke;
|
|
2032
2032
|
Ot = 1;
|
|
2033
2033
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
2034
|
-
function r(s,
|
|
2035
|
-
var
|
|
2036
|
-
if (i !== void 0 && (
|
|
2034
|
+
function r(s, a, i) {
|
|
2035
|
+
var o = null;
|
|
2036
|
+
if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
2037
2037
|
i = {};
|
|
2038
|
-
for (var l in
|
|
2039
|
-
l !== "key" && (i[l] =
|
|
2040
|
-
} else i =
|
|
2041
|
-
return
|
|
2038
|
+
for (var l in a)
|
|
2039
|
+
l !== "key" && (i[l] = a[l]);
|
|
2040
|
+
} else i = a;
|
|
2041
|
+
return a = i.ref, {
|
|
2042
2042
|
$$typeof: t,
|
|
2043
2043
|
type: s,
|
|
2044
|
-
key:
|
|
2045
|
-
ref:
|
|
2044
|
+
key: o,
|
|
2045
|
+
ref: a !== void 0 ? a : null,
|
|
2046
2046
|
props: i
|
|
2047
2047
|
};
|
|
2048
2048
|
}
|
|
@@ -2135,14 +2135,14 @@ function qn() {
|
|
|
2135
2135
|
return "<...>";
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function a() {
|
|
2139
2139
|
var f = V.A;
|
|
2140
2140
|
return f === null ? null : f.getOwner();
|
|
2141
2141
|
}
|
|
2142
2142
|
function i() {
|
|
2143
2143
|
return Error("react-stack-top-frame");
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2145
|
+
function o(f) {
|
|
2146
2146
|
if (Z.call(f, "key")) {
|
|
2147
2147
|
var S = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
2148
2148
|
if (S && S.isReactWarning) return !1;
|
|
@@ -2170,7 +2170,7 @@ function qn() {
|
|
|
2170
2170
|
function c(f, S, x, k, $, N) {
|
|
2171
2171
|
var Y = x.ref;
|
|
2172
2172
|
return f = {
|
|
2173
|
-
$$typeof:
|
|
2173
|
+
$$typeof: u,
|
|
2174
2174
|
type: f,
|
|
2175
2175
|
key: S,
|
|
2176
2176
|
props: x,
|
|
@@ -2200,7 +2200,7 @@ function qn() {
|
|
|
2200
2200
|
value: N
|
|
2201
2201
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
2202
2202
|
}
|
|
2203
|
-
function
|
|
2203
|
+
function d(f, S, x, k, $, N) {
|
|
2204
2204
|
var Y = S.children;
|
|
2205
2205
|
if (Y !== void 0)
|
|
2206
2206
|
if (k)
|
|
@@ -2231,7 +2231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2231
2231
|
Y
|
|
2232
2232
|
), X[Y + k] = !0);
|
|
2233
2233
|
}
|
|
2234
|
-
if (Y = null, x !== void 0 && (r(x), Y = "" + x),
|
|
2234
|
+
if (Y = null, x !== void 0 && (r(x), Y = "" + x), o(S) && (r(S.key), Y = "" + S.key), "key" in S) {
|
|
2235
2235
|
x = {};
|
|
2236
2236
|
for (var ue in S)
|
|
2237
2237
|
ue !== "key" && (x[ue] = S[ue]);
|
|
@@ -2243,7 +2243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2243
2243
|
f,
|
|
2244
2244
|
Y,
|
|
2245
2245
|
x,
|
|
2246
|
-
|
|
2246
|
+
a(),
|
|
2247
2247
|
$,
|
|
2248
2248
|
N
|
|
2249
2249
|
);
|
|
@@ -2252,9 +2252,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2252
2252
|
y(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === U && (f._payload.status === "fulfilled" ? y(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
2253
2253
|
}
|
|
2254
2254
|
function y(f) {
|
|
2255
|
-
return typeof f == "object" && f !== null && f.$$typeof ===
|
|
2255
|
+
return typeof f == "object" && f !== null && f.$$typeof === u;
|
|
2256
2256
|
}
|
|
2257
|
-
var w = Le,
|
|
2257
|
+
var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), C = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
2258
2258
|
return null;
|
|
2259
2259
|
};
|
|
2260
2260
|
w = {
|
|
@@ -2268,7 +2268,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2268
2268
|
)(), Q = J(s(i)), X = {};
|
|
2269
2269
|
Ee.Fragment = m, Ee.jsx = function(f, S, x) {
|
|
2270
2270
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2271
|
-
return
|
|
2271
|
+
return d(
|
|
2272
2272
|
f,
|
|
2273
2273
|
S,
|
|
2274
2274
|
x,
|
|
@@ -2278,7 +2278,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2278
2278
|
);
|
|
2279
2279
|
}, Ee.jsxs = function(f, S, x) {
|
|
2280
2280
|
var k = 1e4 > V.recentlyCreatedOwnerStacks++;
|
|
2281
|
-
return
|
|
2281
|
+
return d(
|
|
2282
2282
|
f,
|
|
2283
2283
|
S,
|
|
2284
2284
|
x,
|
|
@@ -2295,10 +2295,10 @@ function Bn() {
|
|
|
2295
2295
|
}
|
|
2296
2296
|
var n = Bn();
|
|
2297
2297
|
const Hn = async (t, e) => {
|
|
2298
|
-
const { name: r, email: s, password:
|
|
2298
|
+
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: c = !0, role: d = "user" } = t, { baseUrl: b, apiKey: y } = e;
|
|
2299
2299
|
if (!y)
|
|
2300
2300
|
throw new Error("API key is required for signup");
|
|
2301
|
-
if (!r || !s || !
|
|
2301
|
+
if (!r || !s || !a || !i)
|
|
2302
2302
|
throw new Error("Name, email, password, and appId are required");
|
|
2303
2303
|
try {
|
|
2304
2304
|
const w = await W.post(
|
|
@@ -2306,13 +2306,13 @@ const Hn = async (t, e) => {
|
|
|
2306
2306
|
{
|
|
2307
2307
|
name: r,
|
|
2308
2308
|
email: s,
|
|
2309
|
-
password:
|
|
2309
|
+
password: a,
|
|
2310
2310
|
appId: i,
|
|
2311
|
-
phone:
|
|
2311
|
+
phone: o,
|
|
2312
2312
|
address: l,
|
|
2313
2313
|
avatarUrl: h,
|
|
2314
2314
|
isActive: c,
|
|
2315
|
-
role:
|
|
2315
|
+
role: d
|
|
2316
2316
|
},
|
|
2317
2317
|
{
|
|
2318
2318
|
headers: {
|
|
@@ -2323,15 +2323,15 @@ const Hn = async (t, e) => {
|
|
|
2323
2323
|
);
|
|
2324
2324
|
return w.data?.user && localStorage.setItem("userInfo", JSON.stringify(w.data.user)), w.data.user;
|
|
2325
2325
|
} catch (w) {
|
|
2326
|
-
const
|
|
2327
|
-
if (console.error("Signup API Error:",
|
|
2328
|
-
if (
|
|
2326
|
+
const u = w.response?.data?.message || w.message || "Signup failed";
|
|
2327
|
+
if (console.error("Signup API Error:", u), w.response?.status === 400) {
|
|
2328
|
+
if (u.includes("already exists"))
|
|
2329
2329
|
throw {
|
|
2330
2330
|
success: !1,
|
|
2331
2331
|
message: "User with this email already exists for this app",
|
|
2332
2332
|
status: 400
|
|
2333
2333
|
};
|
|
2334
|
-
if (
|
|
2334
|
+
if (u.includes("inactive"))
|
|
2335
2335
|
throw {
|
|
2336
2336
|
success: !1,
|
|
2337
2337
|
message: "Cannot signup under an inactive app",
|
|
@@ -2344,7 +2344,7 @@ const Hn = async (t, e) => {
|
|
|
2344
2344
|
status: 404
|
|
2345
2345
|
} : {
|
|
2346
2346
|
success: !1,
|
|
2347
|
-
message:
|
|
2347
|
+
message: u,
|
|
2348
2348
|
status: w.response?.status || 500
|
|
2349
2349
|
};
|
|
2350
2350
|
}
|
|
@@ -2395,9 +2395,9 @@ const Xn = Nt(
|
|
|
2395
2395
|
size: e = 24,
|
|
2396
2396
|
strokeWidth: r = 2,
|
|
2397
2397
|
absoluteStrokeWidth: s,
|
|
2398
|
-
className:
|
|
2398
|
+
className: a = "",
|
|
2399
2399
|
children: i,
|
|
2400
|
-
iconNode:
|
|
2400
|
+
iconNode: o,
|
|
2401
2401
|
...l
|
|
2402
2402
|
}, h) => Ge(
|
|
2403
2403
|
"svg",
|
|
@@ -2408,12 +2408,12 @@ const Xn = Nt(
|
|
|
2408
2408
|
height: e,
|
|
2409
2409
|
stroke: t,
|
|
2410
2410
|
strokeWidth: s ? Number(r) * 24 / Number(e) : r,
|
|
2411
|
-
className: ir("lucide",
|
|
2411
|
+
className: ir("lucide", a),
|
|
2412
2412
|
...!i && !Kn(l) && { "aria-hidden": "true" },
|
|
2413
2413
|
...l
|
|
2414
2414
|
},
|
|
2415
2415
|
[
|
|
2416
|
-
...
|
|
2416
|
+
...o.map(([c, d]) => Ge(c, d)),
|
|
2417
2417
|
...Array.isArray(i) ? i : [i]
|
|
2418
2418
|
]
|
|
2419
2419
|
)
|
|
@@ -2426,7 +2426,7 @@ const Xn = Nt(
|
|
|
2426
2426
|
*/
|
|
2427
2427
|
const B = (t, e) => {
|
|
2428
2428
|
const r = Nt(
|
|
2429
|
-
({ className: s, ...
|
|
2429
|
+
({ className: s, ...a }, i) => Ge(Xn, {
|
|
2430
2430
|
ref: i,
|
|
2431
2431
|
iconNode: e,
|
|
2432
2432
|
className: ir(
|
|
@@ -2434,7 +2434,7 @@ const B = (t, e) => {
|
|
|
2434
2434
|
`lucide-${t}`,
|
|
2435
2435
|
s
|
|
2436
2436
|
),
|
|
2437
|
-
...
|
|
2437
|
+
...a
|
|
2438
2438
|
})
|
|
2439
2439
|
);
|
|
2440
2440
|
return r.displayName = _t(t), r;
|
|
@@ -2510,11 +2510,11 @@ const ns = [
|
|
|
2510
2510
|
* This source code is licensed under the ISC license.
|
|
2511
2511
|
* See the LICENSE file in the root directory of this source tree.
|
|
2512
2512
|
*/
|
|
2513
|
-
const
|
|
2513
|
+
const as = [
|
|
2514
2514
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
2515
2515
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
2516
2516
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
2517
|
-
],
|
|
2517
|
+
], os = B("ellipsis-vertical", as);
|
|
2518
2518
|
/**
|
|
2519
2519
|
* @license lucide-react v0.544.0 - ISC
|
|
2520
2520
|
*
|
|
@@ -2626,7 +2626,7 @@ const xs = [
|
|
|
2626
2626
|
* This source code is licensed under the ISC license.
|
|
2627
2627
|
* See the LICENSE file in the root directory of this source tree.
|
|
2628
2628
|
*/
|
|
2629
|
-
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2629
|
+
const gs = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ae = B("loader-circle", gs);
|
|
2630
2630
|
/**
|
|
2631
2631
|
* @license lucide-react v0.544.0 - ISC
|
|
2632
2632
|
*
|
|
@@ -2850,30 +2850,30 @@ const Ls = [
|
|
|
2850
2850
|
baseUrl: "",
|
|
2851
2851
|
apiKey: "",
|
|
2852
2852
|
appId: ""
|
|
2853
|
-
},
|
|
2853
|
+
}, ua = (t) => {
|
|
2854
2854
|
if (!t.baseUrl || !t.apiKey || !t.appId)
|
|
2855
2855
|
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2856
2856
|
Ue.baseUrl = t.baseUrl, Ue.apiKey = t.apiKey, Ue.appId = t.appId;
|
|
2857
|
-
}, ge = () => Ue,
|
|
2857
|
+
}, ge = () => Ue, pa = ({
|
|
2858
2858
|
logoUrl: t,
|
|
2859
2859
|
logoLinkUrl: e,
|
|
2860
2860
|
title: r = "Create Your Account",
|
|
2861
2861
|
subtitle: s = "Join our platform today",
|
|
2862
|
-
footerText:
|
|
2862
|
+
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
2863
2863
|
primaryColor: i = "#00C214",
|
|
2864
|
-
gradient:
|
|
2864
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2865
2865
|
darkMode: l = !0,
|
|
2866
2866
|
// Only avatar is optional
|
|
2867
2867
|
showAvatar: h = !1,
|
|
2868
2868
|
roles: c = [],
|
|
2869
2869
|
// 🔥 FIXED
|
|
2870
|
-
showRoleSelector:
|
|
2870
|
+
showRoleSelector: d = !1,
|
|
2871
2871
|
// 🔥 FIXED
|
|
2872
2872
|
loginUrl: b,
|
|
2873
2873
|
onSuccess: y,
|
|
2874
2874
|
onError: w
|
|
2875
2875
|
}) => {
|
|
2876
|
-
const { baseUrl:
|
|
2876
|
+
const { baseUrl: u, apiKey: j, appId: m } = ge(), _ = {
|
|
2877
2877
|
name: "",
|
|
2878
2878
|
email: "",
|
|
2879
2879
|
password: "",
|
|
@@ -2899,7 +2899,7 @@ const Ls = [
|
|
|
2899
2899
|
const x = {
|
|
2900
2900
|
...R,
|
|
2901
2901
|
appId: m
|
|
2902
|
-
}, k = await Hn(x, { baseUrl:
|
|
2902
|
+
}, k = await Hn(x, { baseUrl: u, apiKey: j });
|
|
2903
2903
|
U({ type: "success", text: "Account created successfully!" }), y && y(k);
|
|
2904
2904
|
} catch (x) {
|
|
2905
2905
|
const k = x.message || "Signup failed. Please try again.";
|
|
@@ -3036,7 +3036,7 @@ const Ls = [
|
|
|
3036
3036
|
onSubmit: X,
|
|
3037
3037
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3038
3038
|
children: [
|
|
3039
|
-
|
|
3039
|
+
d && c && c.length === 2 && /* @__PURE__ */ n.jsxs(
|
|
3040
3040
|
"div",
|
|
3041
3041
|
{
|
|
3042
3042
|
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
@@ -3415,7 +3415,7 @@ const Ls = [
|
|
|
3415
3415
|
disabled: g,
|
|
3416
3416
|
style: {
|
|
3417
3417
|
padding: "12px",
|
|
3418
|
-
background:
|
|
3418
|
+
background: o,
|
|
3419
3419
|
color: "#fff",
|
|
3420
3420
|
border: "none",
|
|
3421
3421
|
borderRadius: "10px",
|
|
@@ -3473,17 +3473,17 @@ const Ls = [
|
|
|
3473
3473
|
}
|
|
3474
3474
|
);
|
|
3475
3475
|
}, Fs = async (t, e) => {
|
|
3476
|
-
const { email: r, password: s, appId:
|
|
3477
|
-
if (!
|
|
3476
|
+
const { email: r, password: s, appId: a } = t, { baseUrl: i, apiKey: o } = e;
|
|
3477
|
+
if (!o)
|
|
3478
3478
|
throw new Error("API key is required for login");
|
|
3479
3479
|
try {
|
|
3480
3480
|
const l = await W.post(
|
|
3481
3481
|
`${i}/users/login`,
|
|
3482
|
-
{ email: r, password: s, appId:
|
|
3482
|
+
{ email: r, password: s, appId: a },
|
|
3483
3483
|
{
|
|
3484
3484
|
headers: {
|
|
3485
3485
|
"Content-Type": "application/json",
|
|
3486
|
-
"x-api-key":
|
|
3486
|
+
"x-api-key": o
|
|
3487
3487
|
}
|
|
3488
3488
|
}
|
|
3489
3489
|
);
|
|
@@ -3496,20 +3496,20 @@ const Ls = [
|
|
|
3496
3496
|
status: l.response?.status || 500
|
|
3497
3497
|
};
|
|
3498
3498
|
}
|
|
3499
|
-
},
|
|
3499
|
+
}, fa = ({
|
|
3500
3500
|
logoUrl: t,
|
|
3501
3501
|
logoLinkUrl: e,
|
|
3502
3502
|
title: r = "Sign In to Your Account",
|
|
3503
3503
|
subtitle: s = "Welcome back! Please enter your details",
|
|
3504
|
-
footerText:
|
|
3504
|
+
footerText: a = "Secure authentication powered by Neuctra Authix",
|
|
3505
3505
|
primaryColor: i = "#00C214",
|
|
3506
|
-
gradient:
|
|
3506
|
+
gradient: o = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3507
3507
|
darkMode: l = !0,
|
|
3508
3508
|
signupUrl: h,
|
|
3509
3509
|
onSuccess: c,
|
|
3510
|
-
onError:
|
|
3510
|
+
onError: d
|
|
3511
3511
|
}) => {
|
|
3512
|
-
const { baseUrl: b, apiKey: y, appId: w } = ge(), [
|
|
3512
|
+
const { baseUrl: b, apiKey: y, appId: w } = ge(), [u, j] = O("login"), [m, _] = O(1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(null), [v, U] = O(""), [q, F] = O(""), [V, Z] = O({
|
|
3513
3513
|
email: "",
|
|
3514
3514
|
otp: "",
|
|
3515
3515
|
newPassword: "",
|
|
@@ -3531,7 +3531,7 @@ const Ls = [
|
|
|
3531
3531
|
I({ type: "success", text: `Welcome ${N.name}` }), c?.(N);
|
|
3532
3532
|
} catch (N) {
|
|
3533
3533
|
const Y = N.message || "Login failed";
|
|
3534
|
-
I({ type: "error", text: Y }),
|
|
3534
|
+
I({ type: "error", text: Y }), d?.(N);
|
|
3535
3535
|
} finally {
|
|
3536
3536
|
M(!1);
|
|
3537
3537
|
}
|
|
@@ -3653,7 +3653,7 @@ const Ls = [
|
|
|
3653
3653
|
color: z,
|
|
3654
3654
|
margin: 0
|
|
3655
3655
|
},
|
|
3656
|
-
children:
|
|
3656
|
+
children: u === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
|
|
3657
3657
|
}
|
|
3658
3658
|
),
|
|
3659
3659
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3663,13 +3663,13 @@ const Ls = [
|
|
|
3663
3663
|
fontSize: "14px",
|
|
3664
3664
|
color: P
|
|
3665
3665
|
},
|
|
3666
|
-
children:
|
|
3666
|
+
children: u === "login" ? s : "Follow the steps to reset your password"
|
|
3667
3667
|
}
|
|
3668
3668
|
)
|
|
3669
3669
|
]
|
|
3670
3670
|
}
|
|
3671
3671
|
),
|
|
3672
|
-
|
|
3672
|
+
u === "login" && /* @__PURE__ */ n.jsxs(
|
|
3673
3673
|
"form",
|
|
3674
3674
|
{
|
|
3675
3675
|
onSubmit: X,
|
|
@@ -3832,7 +3832,7 @@ const Ls = [
|
|
|
3832
3832
|
disabled: C,
|
|
3833
3833
|
style: {
|
|
3834
3834
|
padding: "12px",
|
|
3835
|
-
background:
|
|
3835
|
+
background: o,
|
|
3836
3836
|
color: "#fff",
|
|
3837
3837
|
border: "none",
|
|
3838
3838
|
borderRadius: "10px",
|
|
@@ -3845,7 +3845,7 @@ const Ls = [
|
|
|
3845
3845
|
]
|
|
3846
3846
|
}
|
|
3847
3847
|
),
|
|
3848
|
-
|
|
3848
|
+
u === "forgot" && /* @__PURE__ */ n.jsxs(
|
|
3849
3849
|
"form",
|
|
3850
3850
|
{
|
|
3851
3851
|
onSubmit: m === 1 ? S : x,
|
|
@@ -4008,7 +4008,7 @@ const Ls = [
|
|
|
4008
4008
|
disabled: C,
|
|
4009
4009
|
style: {
|
|
4010
4010
|
padding: "12px",
|
|
4011
|
-
background:
|
|
4011
|
+
background: o,
|
|
4012
4012
|
color: "#fff",
|
|
4013
4013
|
border: "none",
|
|
4014
4014
|
fontSize: "14px",
|
|
@@ -4082,38 +4082,53 @@ const Ls = [
|
|
|
4082
4082
|
)
|
|
4083
4083
|
}
|
|
4084
4084
|
);
|
|
4085
|
-
},
|
|
4085
|
+
}, xa = ({
|
|
4086
4086
|
children: t,
|
|
4087
4087
|
fallback: e = null,
|
|
4088
4088
|
className: r,
|
|
4089
4089
|
width: s,
|
|
4090
|
-
height:
|
|
4090
|
+
height: a,
|
|
4091
|
+
appId: i
|
|
4091
4092
|
}) => {
|
|
4092
|
-
const [
|
|
4093
|
-
if (typeof window > "u") return !1;
|
|
4094
|
-
try {
|
|
4095
|
-
const l = localStorage.getItem("userInfo");
|
|
4096
|
-
return !!(l && l !== "undefined" && l !== "null");
|
|
4097
|
-
} catch {
|
|
4098
|
-
return !1;
|
|
4099
|
-
}
|
|
4100
|
-
});
|
|
4093
|
+
const [o, l] = O(!1), [h, c] = O(!0);
|
|
4101
4094
|
return te(() => {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
}
|
|
4110
|
-
|
|
4095
|
+
let d = !1;
|
|
4096
|
+
const b = async () => {
|
|
4097
|
+
try {
|
|
4098
|
+
const w = localStorage.getItem("userInfo");
|
|
4099
|
+
if (!w || w === "undefined" || w === "null") {
|
|
4100
|
+
l(!1);
|
|
4101
|
+
return;
|
|
4102
|
+
}
|
|
4103
|
+
const u = JSON.parse(w);
|
|
4104
|
+
if (!u?.id) {
|
|
4105
|
+
l(!1);
|
|
4106
|
+
return;
|
|
4111
4107
|
}
|
|
4108
|
+
const j = await fetch(
|
|
4109
|
+
`https://server.authix.neuctra.com/api/users/check-user/${u.id}?appId=${i}`,
|
|
4110
|
+
{
|
|
4111
|
+
credentials: "include"
|
|
4112
|
+
}
|
|
4113
|
+
);
|
|
4114
|
+
if (!j.ok) {
|
|
4115
|
+
l(!1);
|
|
4116
|
+
return;
|
|
4117
|
+
}
|
|
4118
|
+
const m = await j.json();
|
|
4119
|
+
d || l(!!m?.exists);
|
|
4120
|
+
} catch {
|
|
4121
|
+
d || l(!1);
|
|
4122
|
+
} finally {
|
|
4123
|
+
d || c(!1);
|
|
4124
|
+
}
|
|
4112
4125
|
};
|
|
4113
|
-
|
|
4114
|
-
|
|
4126
|
+
b();
|
|
4127
|
+
const y = () => b();
|
|
4128
|
+
return window.addEventListener("storage", y), () => {
|
|
4129
|
+
d = !0, window.removeEventListener("storage", y);
|
|
4115
4130
|
};
|
|
4116
|
-
}, []),
|
|
4131
|
+
}, [i]), h ? null : o ? /* @__PURE__ */ n.jsx(
|
|
4117
4132
|
"div",
|
|
4118
4133
|
{
|
|
4119
4134
|
className: r,
|
|
@@ -4121,19 +4136,19 @@ const Ls = [
|
|
|
4121
4136
|
display: "flex",
|
|
4122
4137
|
alignItems: "center",
|
|
4123
4138
|
width: s,
|
|
4124
|
-
height:
|
|
4139
|
+
height: a
|
|
4125
4140
|
},
|
|
4126
4141
|
children: t
|
|
4127
4142
|
}
|
|
4128
4143
|
) : typeof e == "function" ? e() : e;
|
|
4129
|
-
},
|
|
4144
|
+
}, ha = ({
|
|
4130
4145
|
children: t,
|
|
4131
4146
|
fallback: e = null,
|
|
4132
4147
|
className: r,
|
|
4133
4148
|
width: s,
|
|
4134
|
-
height:
|
|
4149
|
+
height: a
|
|
4135
4150
|
}) => {
|
|
4136
|
-
const [i,
|
|
4151
|
+
const [i, o] = O(() => {
|
|
4137
4152
|
if (typeof window > "u") return !0;
|
|
4138
4153
|
try {
|
|
4139
4154
|
const l = localStorage.getItem("userInfo");
|
|
@@ -4146,11 +4161,11 @@ const Ls = [
|
|
|
4146
4161
|
const l = () => {
|
|
4147
4162
|
try {
|
|
4148
4163
|
const h = localStorage.getItem("userInfo");
|
|
4149
|
-
|
|
4164
|
+
o(
|
|
4150
4165
|
!h || h === "undefined" || h === "null"
|
|
4151
4166
|
);
|
|
4152
4167
|
} catch {
|
|
4153
|
-
|
|
4168
|
+
o(!0);
|
|
4154
4169
|
}
|
|
4155
4170
|
};
|
|
4156
4171
|
return l(), window.addEventListener("storage", l), () => window.removeEventListener("storage", l);
|
|
@@ -4162,7 +4177,7 @@ const Ls = [
|
|
|
4162
4177
|
display: "flex",
|
|
4163
4178
|
alignItems: "center",
|
|
4164
4179
|
width: s,
|
|
4165
|
-
height:
|
|
4180
|
+
height: a
|
|
4166
4181
|
},
|
|
4167
4182
|
children: t
|
|
4168
4183
|
}
|
|
@@ -4172,11 +4187,11 @@ const Ls = [
|
|
|
4172
4187
|
onClose: e,
|
|
4173
4188
|
onSuccess: r,
|
|
4174
4189
|
onError: s,
|
|
4175
|
-
userId:
|
|
4190
|
+
userId: a,
|
|
4176
4191
|
token: i,
|
|
4177
|
-
colors:
|
|
4192
|
+
colors: o
|
|
4178
4193
|
}) => {
|
|
4179
|
-
const { baseUrl: l, apiKey: h, appId: c } = ge(), [
|
|
4194
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = O(!1), [y, w] = O(""), [u, j] = O("warning"), [m, _] = O(!1);
|
|
4180
4195
|
if (te(() => {
|
|
4181
4196
|
if (typeof window > "u") return;
|
|
4182
4197
|
const g = () => {
|
|
@@ -4187,7 +4202,7 @@ const Ls = [
|
|
|
4187
4202
|
const R = async () => {
|
|
4188
4203
|
b(!0), j("processing");
|
|
4189
4204
|
try {
|
|
4190
|
-
const { data: g } = await W.delete(`${l}/users/delete/${
|
|
4205
|
+
const { data: g } = await W.delete(`${l}/users/delete/${a}`, {
|
|
4191
4206
|
data: { appId: c },
|
|
4192
4207
|
headers: {
|
|
4193
4208
|
"x-api-key": h
|
|
@@ -4202,9 +4217,9 @@ const Ls = [
|
|
|
4202
4217
|
b(!1);
|
|
4203
4218
|
}
|
|
4204
4219
|
}, A = y.toLowerCase() === "delete my account", C = (g) => {
|
|
4205
|
-
g.target === g.currentTarget &&
|
|
4220
|
+
g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
|
|
4206
4221
|
}, M = () => {
|
|
4207
|
-
switch (
|
|
4222
|
+
switch (u) {
|
|
4208
4223
|
case "warning":
|
|
4209
4224
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4210
4225
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -4249,7 +4264,7 @@ const Ls = [
|
|
|
4249
4264
|
"h3",
|
|
4250
4265
|
{
|
|
4251
4266
|
style: {
|
|
4252
|
-
color:
|
|
4267
|
+
color: o.textPrimary,
|
|
4253
4268
|
margin: 0,
|
|
4254
4269
|
fontSize: "20px",
|
|
4255
4270
|
fontWeight: 700,
|
|
@@ -4269,7 +4284,7 @@ const Ls = [
|
|
|
4269
4284
|
style: {
|
|
4270
4285
|
background: "transparent",
|
|
4271
4286
|
border: "none",
|
|
4272
|
-
color:
|
|
4287
|
+
color: o.textTertiary,
|
|
4273
4288
|
cursor: "pointer",
|
|
4274
4289
|
padding: "8px",
|
|
4275
4290
|
borderRadius: "8px",
|
|
@@ -4282,10 +4297,10 @@ const Ls = [
|
|
|
4282
4297
|
transition: "all 0.2s ease"
|
|
4283
4298
|
},
|
|
4284
4299
|
onMouseOver: (g) => {
|
|
4285
|
-
g.currentTarget.style.backgroundColor =
|
|
4300
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.color = o.textPrimary;
|
|
4286
4301
|
},
|
|
4287
4302
|
onMouseOut: (g) => {
|
|
4288
|
-
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color =
|
|
4303
|
+
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.color = o.textTertiary;
|
|
4289
4304
|
},
|
|
4290
4305
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
4291
4306
|
}
|
|
@@ -4300,8 +4315,8 @@ const Ls = [
|
|
|
4300
4315
|
display: "flex",
|
|
4301
4316
|
gap: "16px",
|
|
4302
4317
|
padding: "20px",
|
|
4303
|
-
background: `${
|
|
4304
|
-
border: `1px solid ${
|
|
4318
|
+
background: `${o.error}15`,
|
|
4319
|
+
border: `1px solid ${o.error}30`,
|
|
4305
4320
|
borderRadius: "12px",
|
|
4306
4321
|
marginBottom: "20px"
|
|
4307
4322
|
},
|
|
@@ -4310,7 +4325,7 @@ const Ls = [
|
|
|
4310
4325
|
"div",
|
|
4311
4326
|
{
|
|
4312
4327
|
style: {
|
|
4313
|
-
color:
|
|
4328
|
+
color: o.error,
|
|
4314
4329
|
flexShrink: 0,
|
|
4315
4330
|
display: "flex",
|
|
4316
4331
|
alignItems: "flex-start"
|
|
@@ -4323,7 +4338,7 @@ const Ls = [
|
|
|
4323
4338
|
"h4",
|
|
4324
4339
|
{
|
|
4325
4340
|
style: {
|
|
4326
|
-
color:
|
|
4341
|
+
color: o.textPrimary,
|
|
4327
4342
|
margin: "0 0 12px 0",
|
|
4328
4343
|
fontSize: "16px",
|
|
4329
4344
|
fontWeight: 600
|
|
@@ -4360,10 +4375,10 @@ const Ls = [
|
|
|
4360
4375
|
alignItems: "center",
|
|
4361
4376
|
gap: "10px",
|
|
4362
4377
|
fontSize: "14px",
|
|
4363
|
-
color:
|
|
4378
|
+
color: o.textSecondary
|
|
4364
4379
|
},
|
|
4365
4380
|
children: [
|
|
4366
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4381
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: o.error, flexShrink: 0 }, children: g.icon }),
|
|
4367
4382
|
/* @__PURE__ */ n.jsx("span", { children: g.text })
|
|
4368
4383
|
]
|
|
4369
4384
|
},
|
|
@@ -4393,9 +4408,9 @@ const Ls = [
|
|
|
4393
4408
|
style: {
|
|
4394
4409
|
padding: "10px 24px",
|
|
4395
4410
|
borderRadius: "10px",
|
|
4396
|
-
border: `1.5px solid ${
|
|
4411
|
+
border: `1.5px solid ${o.border}`,
|
|
4397
4412
|
background: "transparent",
|
|
4398
|
-
color:
|
|
4413
|
+
color: o.textPrimary,
|
|
4399
4414
|
fontSize: "14px",
|
|
4400
4415
|
fontWeight: 500,
|
|
4401
4416
|
cursor: "pointer",
|
|
@@ -4404,7 +4419,7 @@ const Ls = [
|
|
|
4404
4419
|
transition: "all 0.2s ease"
|
|
4405
4420
|
},
|
|
4406
4421
|
onMouseOver: (g) => {
|
|
4407
|
-
g.currentTarget.style.backgroundColor =
|
|
4422
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4408
4423
|
},
|
|
4409
4424
|
onMouseOut: (g) => {
|
|
4410
4425
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4483,7 +4498,7 @@ const Ls = [
|
|
|
4483
4498
|
"h3",
|
|
4484
4499
|
{
|
|
4485
4500
|
style: {
|
|
4486
|
-
color:
|
|
4501
|
+
color: o.textPrimary,
|
|
4487
4502
|
margin: 0,
|
|
4488
4503
|
fontSize: "20px",
|
|
4489
4504
|
fontWeight: 700,
|
|
@@ -4500,7 +4515,7 @@ const Ls = [
|
|
|
4500
4515
|
"p",
|
|
4501
4516
|
{
|
|
4502
4517
|
style: {
|
|
4503
|
-
color:
|
|
4518
|
+
color: o.textSecondary,
|
|
4504
4519
|
marginBottom: "16px",
|
|
4505
4520
|
fontSize: "14px",
|
|
4506
4521
|
lineHeight: "1.5"
|
|
@@ -4508,7 +4523,7 @@ const Ls = [
|
|
|
4508
4523
|
children: [
|
|
4509
4524
|
"Type",
|
|
4510
4525
|
" ",
|
|
4511
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4526
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: o.textPrimary }, children: '"delete my account"' }),
|
|
4512
4527
|
" ",
|
|
4513
4528
|
"to confirm:"
|
|
4514
4529
|
]
|
|
@@ -4525,16 +4540,16 @@ const Ls = [
|
|
|
4525
4540
|
width: "100%",
|
|
4526
4541
|
padding: "14px 16px",
|
|
4527
4542
|
borderRadius: "10px",
|
|
4528
|
-
border: `2px solid ${A ?
|
|
4543
|
+
border: `2px solid ${A ? o.success : o.error}`,
|
|
4529
4544
|
backgroundColor: "transparent",
|
|
4530
|
-
color:
|
|
4545
|
+
color: o.textPrimary,
|
|
4531
4546
|
fontSize: "15px",
|
|
4532
4547
|
outline: "none",
|
|
4533
4548
|
transition: "all 0.2s ease",
|
|
4534
4549
|
boxSizing: "border-box"
|
|
4535
4550
|
},
|
|
4536
4551
|
onFocus: (g) => {
|
|
4537
|
-
g.target.style.boxShadow = `0 0 0 3px ${
|
|
4552
|
+
g.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
4538
4553
|
},
|
|
4539
4554
|
onBlur: (g) => {
|
|
4540
4555
|
g.target.style.boxShadow = "none";
|
|
@@ -4550,7 +4565,7 @@ const Ls = [
|
|
|
4550
4565
|
alignItems: "center",
|
|
4551
4566
|
gap: "8px",
|
|
4552
4567
|
marginTop: "10px",
|
|
4553
|
-
color:
|
|
4568
|
+
color: o.success,
|
|
4554
4569
|
fontSize: "14px",
|
|
4555
4570
|
fontWeight: 500
|
|
4556
4571
|
},
|
|
@@ -4581,9 +4596,9 @@ const Ls = [
|
|
|
4581
4596
|
style: {
|
|
4582
4597
|
padding: "10px 24px",
|
|
4583
4598
|
borderRadius: "10px",
|
|
4584
|
-
border: `1.5px solid ${
|
|
4599
|
+
border: `1.5px solid ${o.border}`,
|
|
4585
4600
|
background: "transparent",
|
|
4586
|
-
color:
|
|
4601
|
+
color: o.textPrimary,
|
|
4587
4602
|
fontSize: "14px",
|
|
4588
4603
|
fontWeight: 500,
|
|
4589
4604
|
cursor: "pointer",
|
|
@@ -4592,7 +4607,7 @@ const Ls = [
|
|
|
4592
4607
|
transition: "all 0.2s ease"
|
|
4593
4608
|
},
|
|
4594
4609
|
onMouseOver: (g) => {
|
|
4595
|
-
g.currentTarget.style.backgroundColor =
|
|
4610
|
+
g.currentTarget.style.backgroundColor = o.border, g.currentTarget.style.transform = "translateY(-1px)";
|
|
4596
4611
|
},
|
|
4597
4612
|
onMouseOut: (g) => {
|
|
4598
4613
|
g.currentTarget.style.backgroundColor = "transparent", g.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4604,7 +4619,7 @@ const Ls = [
|
|
|
4604
4619
|
"button",
|
|
4605
4620
|
{
|
|
4606
4621
|
onClick: R,
|
|
4607
|
-
disabled: !A ||
|
|
4622
|
+
disabled: !A || d,
|
|
4608
4623
|
style: {
|
|
4609
4624
|
padding: "10px 24px",
|
|
4610
4625
|
borderRadius: "10px",
|
|
@@ -4613,22 +4628,22 @@ const Ls = [
|
|
|
4613
4628
|
color: "white",
|
|
4614
4629
|
fontSize: "14px",
|
|
4615
4630
|
fontWeight: 600,
|
|
4616
|
-
cursor: !A ||
|
|
4631
|
+
cursor: !A || d ? "not-allowed" : "pointer",
|
|
4617
4632
|
flex: m ? "none" : 1,
|
|
4618
4633
|
minWidth: m ? "100%" : "140px",
|
|
4619
|
-
opacity: !A ||
|
|
4634
|
+
opacity: !A || d ? 0.6 : 1,
|
|
4620
4635
|
display: "flex",
|
|
4621
4636
|
alignItems: "center",
|
|
4622
4637
|
justifyContent: "center",
|
|
4623
4638
|
gap: "8px",
|
|
4624
4639
|
transition: "all 0.2s ease",
|
|
4625
|
-
boxShadow: !A ||
|
|
4640
|
+
boxShadow: !A || d ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4626
4641
|
},
|
|
4627
4642
|
onMouseOver: (g) => {
|
|
4628
|
-
A && !
|
|
4643
|
+
A && !d && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4629
4644
|
},
|
|
4630
4645
|
onMouseOut: (g) => {
|
|
4631
|
-
A && !
|
|
4646
|
+
A && !d && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4632
4647
|
},
|
|
4633
4648
|
children: [
|
|
4634
4649
|
/* @__PURE__ */ n.jsx(Ne, { size: 16 }),
|
|
@@ -4667,7 +4682,7 @@ const Ls = [
|
|
|
4667
4682
|
flexShrink: 0
|
|
4668
4683
|
},
|
|
4669
4684
|
children: /* @__PURE__ */ n.jsx(
|
|
4670
|
-
|
|
4685
|
+
ae,
|
|
4671
4686
|
{
|
|
4672
4687
|
size: 20,
|
|
4673
4688
|
style: {
|
|
@@ -4682,7 +4697,7 @@ const Ls = [
|
|
|
4682
4697
|
"h3",
|
|
4683
4698
|
{
|
|
4684
4699
|
style: {
|
|
4685
|
-
color:
|
|
4700
|
+
color: o.textPrimary,
|
|
4686
4701
|
margin: 0,
|
|
4687
4702
|
fontSize: "20px",
|
|
4688
4703
|
fontWeight: 700,
|
|
@@ -4695,7 +4710,7 @@ const Ls = [
|
|
|
4695
4710
|
"p",
|
|
4696
4711
|
{
|
|
4697
4712
|
style: {
|
|
4698
|
-
color:
|
|
4713
|
+
color: o.textTertiary,
|
|
4699
4714
|
margin: "4px 0 0 0",
|
|
4700
4715
|
fontSize: "14px",
|
|
4701
4716
|
lineHeight: "1.4"
|
|
@@ -4729,7 +4744,7 @@ const Ls = [
|
|
|
4729
4744
|
padding: "12px",
|
|
4730
4745
|
borderRadius: "8px",
|
|
4731
4746
|
transition: "all 0.2s ease",
|
|
4732
|
-
backgroundColor: g.active ? `${
|
|
4747
|
+
backgroundColor: g.active ? `${o.accent}10` : "transparent"
|
|
4733
4748
|
},
|
|
4734
4749
|
children: [
|
|
4735
4750
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4739,9 +4754,9 @@ const Ls = [
|
|
|
4739
4754
|
width: "8px",
|
|
4740
4755
|
height: "8px",
|
|
4741
4756
|
borderRadius: "50%",
|
|
4742
|
-
backgroundColor: g.active ?
|
|
4757
|
+
backgroundColor: g.active ? o.accent : o.textTertiary,
|
|
4743
4758
|
transition: "all 0.3s ease",
|
|
4744
|
-
boxShadow: g.active ? `0 0 0 4px ${
|
|
4759
|
+
boxShadow: g.active ? `0 0 0 4px ${o.accent}20` : "none"
|
|
4745
4760
|
}
|
|
4746
4761
|
}
|
|
4747
4762
|
),
|
|
@@ -4750,7 +4765,7 @@ const Ls = [
|
|
|
4750
4765
|
{
|
|
4751
4766
|
style: {
|
|
4752
4767
|
fontSize: "14px",
|
|
4753
|
-
color: g.active ?
|
|
4768
|
+
color: g.active ? o.textPrimary : o.textSecondary,
|
|
4754
4769
|
fontWeight: g.active ? 500 : 400
|
|
4755
4770
|
},
|
|
4756
4771
|
children: g.text
|
|
@@ -4770,17 +4785,17 @@ const Ls = [
|
|
|
4770
4785
|
alignItems: "center",
|
|
4771
4786
|
gap: "10px",
|
|
4772
4787
|
padding: "16px",
|
|
4773
|
-
background: `${
|
|
4788
|
+
background: `${o.accent}10`,
|
|
4774
4789
|
borderRadius: "10px",
|
|
4775
4790
|
fontSize: "14px",
|
|
4776
|
-
color:
|
|
4791
|
+
color: o.textSecondary
|
|
4777
4792
|
},
|
|
4778
4793
|
children: [
|
|
4779
4794
|
/* @__PURE__ */ n.jsx(
|
|
4780
4795
|
dr,
|
|
4781
4796
|
{
|
|
4782
4797
|
size: 18,
|
|
4783
|
-
style: { color:
|
|
4798
|
+
style: { color: o.accent, flexShrink: 0 }
|
|
4784
4799
|
}
|
|
4785
4800
|
),
|
|
4786
4801
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4822,7 +4837,7 @@ const Ls = [
|
|
|
4822
4837
|
"h3",
|
|
4823
4838
|
{
|
|
4824
4839
|
style: {
|
|
4825
|
-
color:
|
|
4840
|
+
color: o.textPrimary,
|
|
4826
4841
|
margin: 0,
|
|
4827
4842
|
fontSize: "20px",
|
|
4828
4843
|
fontWeight: 700,
|
|
@@ -4835,7 +4850,7 @@ const Ls = [
|
|
|
4835
4850
|
"p",
|
|
4836
4851
|
{
|
|
4837
4852
|
style: {
|
|
4838
|
-
color:
|
|
4853
|
+
color: o.textTertiary,
|
|
4839
4854
|
margin: "4px 0 0 0",
|
|
4840
4855
|
fontSize: "14px",
|
|
4841
4856
|
lineHeight: "1.4"
|
|
@@ -4853,8 +4868,8 @@ const Ls = [
|
|
|
4853
4868
|
style: {
|
|
4854
4869
|
textAlign: "center",
|
|
4855
4870
|
padding: "20px",
|
|
4856
|
-
background: `${
|
|
4857
|
-
border: `1px solid ${
|
|
4871
|
+
background: `${o.success}10`,
|
|
4872
|
+
border: `1px solid ${o.success}20`,
|
|
4858
4873
|
borderRadius: "12px",
|
|
4859
4874
|
marginBottom: "24px"
|
|
4860
4875
|
},
|
|
@@ -4864,7 +4879,7 @@ const Ls = [
|
|
|
4864
4879
|
{
|
|
4865
4880
|
size: 48,
|
|
4866
4881
|
style: {
|
|
4867
|
-
color:
|
|
4882
|
+
color: o.success,
|
|
4868
4883
|
marginBottom: "12px",
|
|
4869
4884
|
display: "block",
|
|
4870
4885
|
margin: "0 auto 12px auto"
|
|
@@ -4875,7 +4890,7 @@ const Ls = [
|
|
|
4875
4890
|
"p",
|
|
4876
4891
|
{
|
|
4877
4892
|
style: {
|
|
4878
|
-
color:
|
|
4893
|
+
color: o.textPrimary,
|
|
4879
4894
|
fontSize: "16px",
|
|
4880
4895
|
fontWeight: 600,
|
|
4881
4896
|
margin: "0 0 8px 0"
|
|
@@ -4887,7 +4902,7 @@ const Ls = [
|
|
|
4887
4902
|
"p",
|
|
4888
4903
|
{
|
|
4889
4904
|
style: {
|
|
4890
|
-
color:
|
|
4905
|
+
color: o.textSecondary,
|
|
4891
4906
|
fontSize: "14px",
|
|
4892
4907
|
margin: 0,
|
|
4893
4908
|
lineHeight: "1.5"
|
|
@@ -4906,20 +4921,20 @@ const Ls = [
|
|
|
4906
4921
|
alignItems: "center",
|
|
4907
4922
|
gap: "10px",
|
|
4908
4923
|
padding: "16px",
|
|
4909
|
-
background: `${
|
|
4924
|
+
background: `${o.accent}10`,
|
|
4910
4925
|
borderRadius: "10px",
|
|
4911
4926
|
fontSize: "14px",
|
|
4912
|
-
color:
|
|
4927
|
+
color: o.textSecondary,
|
|
4913
4928
|
justifyContent: "center"
|
|
4914
4929
|
},
|
|
4915
4930
|
children: [
|
|
4916
4931
|
/* @__PURE__ */ n.jsx(
|
|
4917
|
-
|
|
4932
|
+
ae,
|
|
4918
4933
|
{
|
|
4919
4934
|
size: 16,
|
|
4920
4935
|
style: {
|
|
4921
4936
|
animation: "spin 1s linear infinite",
|
|
4922
|
-
color:
|
|
4937
|
+
color: o.accent
|
|
4923
4938
|
}
|
|
4924
4939
|
}
|
|
4925
4940
|
),
|
|
@@ -4951,8 +4966,8 @@ const Ls = [
|
|
|
4951
4966
|
"div",
|
|
4952
4967
|
{
|
|
4953
4968
|
style: {
|
|
4954
|
-
backgroundColor:
|
|
4955
|
-
border: `1px solid ${
|
|
4969
|
+
backgroundColor: o.surface,
|
|
4970
|
+
border: `1px solid ${o.border}`,
|
|
4956
4971
|
borderRadius: "20px",
|
|
4957
4972
|
width: "100%",
|
|
4958
4973
|
maxWidth: "480px",
|
|
@@ -5028,20 +5043,20 @@ const Ls = [
|
|
|
5028
5043
|
onUpdate: r,
|
|
5029
5044
|
colors: s
|
|
5030
5045
|
}) => {
|
|
5031
|
-
const [
|
|
5046
|
+
const [a, i] = O(""), [o, l] = O(!1), [h, c] = O(!1), [d, b] = O({ isValid: !1, message: "", type: null });
|
|
5032
5047
|
if (te(() => {
|
|
5033
5048
|
if (typeof window > "u") return;
|
|
5034
|
-
const
|
|
5049
|
+
const u = () => {
|
|
5035
5050
|
c(window.innerWidth < 640);
|
|
5036
5051
|
};
|
|
5037
|
-
return
|
|
5052
|
+
return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
5038
5053
|
}, []), te(() => {
|
|
5039
|
-
if (!
|
|
5054
|
+
if (!a.trim()) {
|
|
5040
5055
|
b({ isValid: !1, message: "", type: null });
|
|
5041
5056
|
return;
|
|
5042
5057
|
}
|
|
5043
5058
|
try {
|
|
5044
|
-
const
|
|
5059
|
+
const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
|
|
5045
5060
|
b(j ? {
|
|
5046
5061
|
isValid: !0,
|
|
5047
5062
|
message: "Valid image URL",
|
|
@@ -5058,18 +5073,18 @@ const Ls = [
|
|
|
5058
5073
|
type: "error"
|
|
5059
5074
|
});
|
|
5060
5075
|
}
|
|
5061
|
-
}, [
|
|
5076
|
+
}, [a]), !t) return null;
|
|
5062
5077
|
const y = async () => {
|
|
5063
|
-
if (!(!
|
|
5078
|
+
if (!(!a || !d.isValid)) {
|
|
5064
5079
|
l(!0);
|
|
5065
5080
|
try {
|
|
5066
|
-
await r(
|
|
5081
|
+
await r(a) && (i(""), e());
|
|
5067
5082
|
} finally {
|
|
5068
5083
|
l(!1);
|
|
5069
5084
|
}
|
|
5070
5085
|
}
|
|
5071
|
-
}, w = (
|
|
5072
|
-
|
|
5086
|
+
}, w = (u) => {
|
|
5087
|
+
u.target === u.currentTarget && e();
|
|
5073
5088
|
};
|
|
5074
5089
|
return /* @__PURE__ */ n.jsxs(
|
|
5075
5090
|
"div",
|
|
@@ -5176,11 +5191,11 @@ const Ls = [
|
|
|
5176
5191
|
flexShrink: 0,
|
|
5177
5192
|
transition: "all 0.2s ease"
|
|
5178
5193
|
},
|
|
5179
|
-
onMouseOver: (
|
|
5180
|
-
|
|
5194
|
+
onMouseOver: (u) => {
|
|
5195
|
+
u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.color = s.textPrimary;
|
|
5181
5196
|
},
|
|
5182
|
-
onMouseOut: (
|
|
5183
|
-
|
|
5197
|
+
onMouseOut: (u) => {
|
|
5198
|
+
u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color = s.textTertiary;
|
|
5184
5199
|
},
|
|
5185
5200
|
children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
|
|
5186
5201
|
}
|
|
@@ -5224,14 +5239,14 @@ const Ls = [
|
|
|
5224
5239
|
type: "url",
|
|
5225
5240
|
id: "avatar-url",
|
|
5226
5241
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5227
|
-
value:
|
|
5228
|
-
onChange: (
|
|
5242
|
+
value: a,
|
|
5243
|
+
onChange: (u) => i(u.target.value),
|
|
5229
5244
|
style: {
|
|
5230
5245
|
width: "100%",
|
|
5231
5246
|
padding: "14px 16px",
|
|
5232
5247
|
paddingLeft: "44px",
|
|
5233
5248
|
borderRadius: "12px",
|
|
5234
|
-
border: `1.5px solid ${
|
|
5249
|
+
border: `1.5px solid ${d.type === "error" ? s.error : d.type === "success" ? s.success : s.border}`,
|
|
5235
5250
|
backgroundColor: "transparent",
|
|
5236
5251
|
color: s.textPrimary,
|
|
5237
5252
|
fontSize: "15px",
|
|
@@ -5239,13 +5254,13 @@ const Ls = [
|
|
|
5239
5254
|
transition: "all 0.2s ease",
|
|
5240
5255
|
boxSizing: "border-box"
|
|
5241
5256
|
},
|
|
5242
|
-
onFocus: (
|
|
5243
|
-
|
|
5257
|
+
onFocus: (u) => {
|
|
5258
|
+
u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
|
|
5244
5259
|
},
|
|
5245
|
-
onBlur: (
|
|
5246
|
-
|
|
5260
|
+
onBlur: (u) => {
|
|
5261
|
+
u.target.style.borderColor = d.type === "error" ? s.error : d.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
|
|
5247
5262
|
},
|
|
5248
|
-
disabled:
|
|
5263
|
+
disabled: o
|
|
5249
5264
|
}
|
|
5250
5265
|
),
|
|
5251
5266
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5262,7 +5277,7 @@ const Ls = [
|
|
|
5262
5277
|
}
|
|
5263
5278
|
)
|
|
5264
5279
|
] }),
|
|
5265
|
-
|
|
5280
|
+
d.message && /* @__PURE__ */ n.jsxs(
|
|
5266
5281
|
"div",
|
|
5267
5282
|
{
|
|
5268
5283
|
style: {
|
|
@@ -5271,18 +5286,18 @@ const Ls = [
|
|
|
5271
5286
|
gap: "6px",
|
|
5272
5287
|
marginTop: "8px",
|
|
5273
5288
|
fontSize: "13px",
|
|
5274
|
-
color:
|
|
5289
|
+
color: d.type === "success" ? s.success : d.type === "error" ? s.error : s.textTertiary
|
|
5275
5290
|
},
|
|
5276
5291
|
children: [
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5292
|
+
d.type === "success" && /* @__PURE__ */ n.jsx(ce, { size: 14 }),
|
|
5293
|
+
d.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5294
|
+
d.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
|
|
5295
|
+
d.message
|
|
5281
5296
|
]
|
|
5282
5297
|
}
|
|
5283
5298
|
)
|
|
5284
5299
|
] }),
|
|
5285
|
-
|
|
5300
|
+
a && d.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5286
5301
|
"div",
|
|
5287
5302
|
{
|
|
5288
5303
|
style: {
|
|
@@ -5308,7 +5323,7 @@ const Ls = [
|
|
|
5308
5323
|
/* @__PURE__ */ n.jsx(
|
|
5309
5324
|
"img",
|
|
5310
5325
|
{
|
|
5311
|
-
src:
|
|
5326
|
+
src: a,
|
|
5312
5327
|
alt: "Avatar preview",
|
|
5313
5328
|
style: {
|
|
5314
5329
|
width: "80px",
|
|
@@ -5318,8 +5333,8 @@ const Ls = [
|
|
|
5318
5333
|
border: `2px solid ${s.success}40`,
|
|
5319
5334
|
margin: "0 auto"
|
|
5320
5335
|
},
|
|
5321
|
-
onError: (
|
|
5322
|
-
|
|
5336
|
+
onError: (u) => {
|
|
5337
|
+
u.currentTarget.style.display = "none";
|
|
5323
5338
|
}
|
|
5324
5339
|
}
|
|
5325
5340
|
)
|
|
@@ -5345,7 +5360,7 @@ const Ls = [
|
|
|
5345
5360
|
"button",
|
|
5346
5361
|
{
|
|
5347
5362
|
onClick: e,
|
|
5348
|
-
disabled:
|
|
5363
|
+
disabled: o,
|
|
5349
5364
|
style: {
|
|
5350
5365
|
padding: "10px 24px",
|
|
5351
5366
|
borderRadius: "10px",
|
|
@@ -5354,17 +5369,17 @@ const Ls = [
|
|
|
5354
5369
|
color: s.textPrimary,
|
|
5355
5370
|
fontSize: "14px",
|
|
5356
5371
|
fontWeight: 500,
|
|
5357
|
-
cursor:
|
|
5372
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
5358
5373
|
flex: h ? "none" : 1,
|
|
5359
5374
|
minWidth: h ? "100%" : "120px",
|
|
5360
|
-
opacity:
|
|
5375
|
+
opacity: o ? 0.6 : 1,
|
|
5361
5376
|
transition: "all 0.2s ease"
|
|
5362
5377
|
},
|
|
5363
|
-
onMouseOver: (
|
|
5364
|
-
|
|
5378
|
+
onMouseOver: (u) => {
|
|
5379
|
+
o || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
|
|
5365
5380
|
},
|
|
5366
|
-
onMouseOut: (
|
|
5367
|
-
|
|
5381
|
+
onMouseOut: (u) => {
|
|
5382
|
+
o || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
|
|
5368
5383
|
},
|
|
5369
5384
|
children: "Cancel"
|
|
5370
5385
|
}
|
|
@@ -5373,7 +5388,7 @@ const Ls = [
|
|
|
5373
5388
|
"button",
|
|
5374
5389
|
{
|
|
5375
5390
|
onClick: y,
|
|
5376
|
-
disabled:
|
|
5391
|
+
disabled: o || !d.isValid,
|
|
5377
5392
|
style: {
|
|
5378
5393
|
padding: "10px 24px",
|
|
5379
5394
|
borderRadius: "10px",
|
|
@@ -5382,26 +5397,26 @@ const Ls = [
|
|
|
5382
5397
|
color: "#fff",
|
|
5383
5398
|
fontSize: "14px",
|
|
5384
5399
|
fontWeight: 600,
|
|
5385
|
-
cursor:
|
|
5400
|
+
cursor: o || !d.isValid ? "not-allowed" : "pointer",
|
|
5386
5401
|
flex: h ? "none" : 1,
|
|
5387
5402
|
minWidth: h ? "100%" : "140px",
|
|
5388
|
-
opacity:
|
|
5403
|
+
opacity: o || !d.isValid ? 0.6 : 1,
|
|
5389
5404
|
display: "flex",
|
|
5390
5405
|
alignItems: "center",
|
|
5391
5406
|
justifyContent: "center",
|
|
5392
5407
|
gap: "8px",
|
|
5393
5408
|
transition: "all 0.2s ease",
|
|
5394
|
-
boxShadow:
|
|
5409
|
+
boxShadow: o || !d.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5395
5410
|
},
|
|
5396
|
-
onMouseOver: (
|
|
5397
|
-
!
|
|
5411
|
+
onMouseOver: (u) => {
|
|
5412
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5398
5413
|
},
|
|
5399
|
-
onMouseOut: (
|
|
5400
|
-
!
|
|
5414
|
+
onMouseOut: (u) => {
|
|
5415
|
+
!o && d.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5401
5416
|
},
|
|
5402
|
-
children:
|
|
5417
|
+
children: o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5403
5418
|
/* @__PURE__ */ n.jsx(
|
|
5404
|
-
|
|
5419
|
+
ae,
|
|
5405
5420
|
{
|
|
5406
5421
|
size: 16,
|
|
5407
5422
|
style: {
|
|
@@ -5479,14 +5494,14 @@ const Ls = [
|
|
|
5479
5494
|
onClose: e,
|
|
5480
5495
|
onSuccess: r,
|
|
5481
5496
|
onError: s,
|
|
5482
|
-
userId:
|
|
5497
|
+
userId: a,
|
|
5483
5498
|
colors: i
|
|
5484
5499
|
}) => {
|
|
5485
|
-
const { baseUrl:
|
|
5500
|
+
const { baseUrl: o, apiKey: l, appId: h } = ge(), [c, d] = O({
|
|
5486
5501
|
currentPassword: "",
|
|
5487
5502
|
newPassword: "",
|
|
5488
5503
|
confirmPassword: ""
|
|
5489
|
-
}), [b, y] = O({}), [w,
|
|
5504
|
+
}), [b, y] = O({}), [w, u] = O(!1), [j, m] = O({
|
|
5490
5505
|
currentPassword: !1,
|
|
5491
5506
|
newPassword: !1,
|
|
5492
5507
|
confirmPassword: !1
|
|
@@ -5500,7 +5515,7 @@ const Ls = [
|
|
|
5500
5515
|
}, []), !t) return null;
|
|
5501
5516
|
const A = (v) => {
|
|
5502
5517
|
const { name: U, value: q } = v.target;
|
|
5503
|
-
|
|
5518
|
+
d((F) => ({ ...F, [U]: q })), b[U] && y((F) => ({ ...F, [U]: "" }));
|
|
5504
5519
|
}, C = (v) => {
|
|
5505
5520
|
m((U) => ({ ...U, [v]: !U[v] }));
|
|
5506
5521
|
}, M = () => {
|
|
@@ -5508,10 +5523,10 @@ const Ls = [
|
|
|
5508
5523
|
return c.currentPassword || (v.currentPassword = "Current password is required"), c.newPassword ? c.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", c.newPassword !== c.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
|
|
5509
5524
|
}, g = async (v) => {
|
|
5510
5525
|
if (v.preventDefault(), !!M()) {
|
|
5511
|
-
|
|
5526
|
+
u(!0);
|
|
5512
5527
|
try {
|
|
5513
5528
|
const { data: U } = await W.put(
|
|
5514
|
-
`${
|
|
5529
|
+
`${o}/users/change-password/${a}`,
|
|
5515
5530
|
{
|
|
5516
5531
|
appId: h,
|
|
5517
5532
|
currentPassword: c.currentPassword,
|
|
@@ -5523,7 +5538,7 @@ const Ls = [
|
|
|
5523
5538
|
}
|
|
5524
5539
|
}
|
|
5525
5540
|
);
|
|
5526
|
-
U.success ? (r(U.message || "Password updated successfully"),
|
|
5541
|
+
U.success ? (r(U.message || "Password updated successfully"), d({
|
|
5527
5542
|
currentPassword: "",
|
|
5528
5543
|
newPassword: "",
|
|
5529
5544
|
confirmPassword: ""
|
|
@@ -5531,7 +5546,7 @@ const Ls = [
|
|
|
5531
5546
|
} catch (U) {
|
|
5532
5547
|
s(U.response?.data?.message || "Something went wrong");
|
|
5533
5548
|
} finally {
|
|
5534
|
-
|
|
5549
|
+
u(!1);
|
|
5535
5550
|
}
|
|
5536
5551
|
}
|
|
5537
5552
|
}, I = [
|
|
@@ -5859,7 +5874,7 @@ const Ls = [
|
|
|
5859
5874
|
},
|
|
5860
5875
|
children: w ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5861
5876
|
/* @__PURE__ */ n.jsx(
|
|
5862
|
-
|
|
5877
|
+
ae,
|
|
5863
5878
|
{
|
|
5864
5879
|
size: 16,
|
|
5865
5880
|
style: {
|
|
@@ -5924,24 +5939,24 @@ const Ls = [
|
|
|
5924
5939
|
onClose: e,
|
|
5925
5940
|
onVerify: r,
|
|
5926
5941
|
onSendOTP: s,
|
|
5927
|
-
verifyFormData:
|
|
5942
|
+
verifyFormData: a,
|
|
5928
5943
|
setVerifyFormData: i,
|
|
5929
|
-
otpSent:
|
|
5944
|
+
otpSent: o,
|
|
5930
5945
|
verifying: l,
|
|
5931
5946
|
user: h,
|
|
5932
5947
|
colors: c,
|
|
5933
|
-
darkMode:
|
|
5948
|
+
darkMode: d
|
|
5934
5949
|
}) => {
|
|
5935
5950
|
if (!t) return null;
|
|
5936
5951
|
const b = () => {
|
|
5937
|
-
e(), i({ email: h?.email || "", otp: "", appId:
|
|
5952
|
+
e(), i({ email: h?.email || "", otp: "", appId: a.appId });
|
|
5938
5953
|
};
|
|
5939
5954
|
return /* @__PURE__ */ n.jsxs(
|
|
5940
5955
|
"div",
|
|
5941
5956
|
{
|
|
5942
5957
|
className: "modal-overlay",
|
|
5943
5958
|
style: {
|
|
5944
|
-
backgroundColor:
|
|
5959
|
+
backgroundColor: d ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
|
|
5945
5960
|
},
|
|
5946
5961
|
children: [
|
|
5947
5962
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -5975,7 +5990,7 @@ const Ls = [
|
|
|
5975
5990
|
"input",
|
|
5976
5991
|
{
|
|
5977
5992
|
type: "email",
|
|
5978
|
-
value:
|
|
5993
|
+
value: a.email,
|
|
5979
5994
|
onChange: (y) => i((w) => ({ ...w, email: y.target.value })),
|
|
5980
5995
|
placeholder: "Enter your email",
|
|
5981
5996
|
style: {
|
|
@@ -5990,7 +6005,7 @@ const Ls = [
|
|
|
5990
6005
|
)
|
|
5991
6006
|
] })
|
|
5992
6007
|
] }),
|
|
5993
|
-
|
|
6008
|
+
o && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
5994
6009
|
/* @__PURE__ */ n.jsx("label", { style: { color: c.textSecondary }, children: "OTP" }),
|
|
5995
6010
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
5996
6011
|
/* @__PURE__ */ n.jsx(cr, { size: 18, style: { color: c.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -5998,7 +6013,7 @@ const Ls = [
|
|
|
5998
6013
|
"input",
|
|
5999
6014
|
{
|
|
6000
6015
|
type: "text",
|
|
6001
|
-
value:
|
|
6016
|
+
value: a.otp,
|
|
6002
6017
|
onChange: (y) => i((w) => ({ ...w, otp: y.target.value })),
|
|
6003
6018
|
placeholder: "Enter OTP",
|
|
6004
6019
|
style: {
|
|
@@ -6013,7 +6028,7 @@ const Ls = [
|
|
|
6013
6028
|
)
|
|
6014
6029
|
] })
|
|
6015
6030
|
] }),
|
|
6016
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
6031
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: o ? /* @__PURE__ */ n.jsxs(
|
|
6017
6032
|
"button",
|
|
6018
6033
|
{
|
|
6019
6034
|
type: "submit",
|
|
@@ -6025,7 +6040,7 @@ const Ls = [
|
|
|
6025
6040
|
},
|
|
6026
6041
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
6027
6042
|
children: [
|
|
6028
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6043
|
+
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ce, { size: 16, "aria-hidden": "true" }),
|
|
6029
6044
|
l ? "Verifying..." : "Verify Email"
|
|
6030
6045
|
]
|
|
6031
6046
|
}
|
|
@@ -6042,7 +6057,7 @@ const Ls = [
|
|
|
6042
6057
|
},
|
|
6043
6058
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
6044
6059
|
children: [
|
|
6045
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
6060
|
+
l ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ut, { size: 16, "aria-hidden": "true" }),
|
|
6046
6061
|
l ? "Sending..." : "Send OTP"
|
|
6047
6062
|
]
|
|
6048
6063
|
}
|
|
@@ -6100,7 +6115,7 @@ const Ls = [
|
|
|
6100
6115
|
}
|
|
6101
6116
|
|
|
6102
6117
|
.close-btn:hover {
|
|
6103
|
-
background-color: ${
|
|
6118
|
+
background-color: ${d ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
|
|
6104
6119
|
}
|
|
6105
6120
|
|
|
6106
6121
|
.verify-form {
|
|
@@ -6202,16 +6217,16 @@ const Ls = [
|
|
|
6202
6217
|
]
|
|
6203
6218
|
}
|
|
6204
6219
|
);
|
|
6205
|
-
},
|
|
6220
|
+
}, ga = ({
|
|
6206
6221
|
token: t,
|
|
6207
6222
|
user: e = null,
|
|
6208
6223
|
darkMode: r = !0,
|
|
6209
6224
|
homeUrl: s,
|
|
6210
|
-
onLogout:
|
|
6225
|
+
onLogout: a,
|
|
6211
6226
|
onVerify: i,
|
|
6212
|
-
primaryColor:
|
|
6227
|
+
primaryColor: o = "#00C212"
|
|
6213
6228
|
}) => {
|
|
6214
|
-
const { baseUrl: l, apiKey: h, appId: c } = ge(), [
|
|
6229
|
+
const { baseUrl: l, apiKey: h, appId: c } = ge(), [d, b] = O(null), [y, w] = O(e), [u, j] = O(!0), [m, _] = O(!1), [R, A] = O(!1), [C, M] = O(!1), [g, I] = O(!1), [v, U] = O(!1), [q, F] = O(!1), [V, Z] = O(!1), [T, J] = O(!1), [z, P] = O(null), [K, Q] = O(!1), [X, f] = O({
|
|
6215
6230
|
email: "",
|
|
6216
6231
|
otp: "",
|
|
6217
6232
|
appId: c
|
|
@@ -6362,8 +6377,8 @@ const Ls = [
|
|
|
6362
6377
|
textPrimary: "#ffffff",
|
|
6363
6378
|
textSecondary: "#d4d4d8",
|
|
6364
6379
|
textTertiary: "#a1a1aa",
|
|
6365
|
-
accent:
|
|
6366
|
-
accentHover: ft(
|
|
6380
|
+
accent: o,
|
|
6381
|
+
accentHover: ft(o, -15),
|
|
6367
6382
|
success: "#10b981",
|
|
6368
6383
|
error: "#ef4444",
|
|
6369
6384
|
border: "#27272a",
|
|
@@ -6376,14 +6391,14 @@ const Ls = [
|
|
|
6376
6391
|
textPrimary: "#18181b",
|
|
6377
6392
|
textSecondary: "#52525b",
|
|
6378
6393
|
textTertiary: "#71717a",
|
|
6379
|
-
accent:
|
|
6380
|
-
accentHover: ft(
|
|
6394
|
+
accent: o,
|
|
6395
|
+
accentHover: ft(o, -15),
|
|
6381
6396
|
success: "#10b981",
|
|
6382
6397
|
error: "#ef4444",
|
|
6383
6398
|
border: "#e4e4e7",
|
|
6384
6399
|
warning: "#d97706"
|
|
6385
6400
|
};
|
|
6386
|
-
if (
|
|
6401
|
+
if (u)
|
|
6387
6402
|
return /* @__PURE__ */ n.jsx(
|
|
6388
6403
|
"div",
|
|
6389
6404
|
{
|
|
@@ -6408,7 +6423,7 @@ const Ls = [
|
|
|
6408
6423
|
},
|
|
6409
6424
|
children: [
|
|
6410
6425
|
/* @__PURE__ */ n.jsx(
|
|
6411
|
-
|
|
6426
|
+
ae,
|
|
6412
6427
|
{
|
|
6413
6428
|
size: 40,
|
|
6414
6429
|
color: D.accent,
|
|
@@ -6551,14 +6566,14 @@ const Ls = [
|
|
|
6551
6566
|
display: "grid",
|
|
6552
6567
|
gap: "24px",
|
|
6553
6568
|
gridTemplateColumns: "1fr",
|
|
6554
|
-
...
|
|
6569
|
+
...d && window.innerWidth >= 1024 && {
|
|
6555
6570
|
gridTemplateColumns: "1fr 2fr",
|
|
6556
6571
|
gap: "10px"
|
|
6557
6572
|
},
|
|
6558
|
-
...
|
|
6573
|
+
...d && window.innerWidth >= 768 && d && window.innerWidth < 1024 && {
|
|
6559
6574
|
gap: "10px"
|
|
6560
6575
|
},
|
|
6561
|
-
...
|
|
6576
|
+
...d && window.innerWidth >= 600 && d && window.innerWidth < 768 && {
|
|
6562
6577
|
gap: "28px"
|
|
6563
6578
|
}
|
|
6564
6579
|
},
|
|
@@ -6743,7 +6758,7 @@ const Ls = [
|
|
|
6743
6758
|
gap: "8px",
|
|
6744
6759
|
textDecoration: "none",
|
|
6745
6760
|
minHeight: "36px",
|
|
6746
|
-
flex:
|
|
6761
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6747
6762
|
},
|
|
6748
6763
|
children: [
|
|
6749
6764
|
/* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6773,11 +6788,11 @@ const Ls = [
|
|
|
6773
6788
|
gap: "8px",
|
|
6774
6789
|
textDecoration: "none",
|
|
6775
6790
|
minHeight: "36px",
|
|
6776
|
-
flex:
|
|
6791
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6777
6792
|
},
|
|
6778
6793
|
children: [
|
|
6779
6794
|
R ? /* @__PURE__ */ n.jsx(
|
|
6780
|
-
|
|
6795
|
+
ae,
|
|
6781
6796
|
{
|
|
6782
6797
|
size: 16,
|
|
6783
6798
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6809,7 +6824,7 @@ const Ls = [
|
|
|
6809
6824
|
gap: "8px",
|
|
6810
6825
|
textDecoration: "none",
|
|
6811
6826
|
minHeight: "36px",
|
|
6812
|
-
flex:
|
|
6827
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6813
6828
|
},
|
|
6814
6829
|
children: [
|
|
6815
6830
|
/* @__PURE__ */ n.jsx(Es, { size: 16, "aria-hidden": "true" }),
|
|
@@ -6839,11 +6854,11 @@ const Ls = [
|
|
|
6839
6854
|
gap: "8px",
|
|
6840
6855
|
minHeight: "36px",
|
|
6841
6856
|
opacity: K ? 0.7 : 1,
|
|
6842
|
-
flex:
|
|
6857
|
+
flex: d && window.innerWidth < 1024 ? "1" : "auto"
|
|
6843
6858
|
},
|
|
6844
6859
|
children: [
|
|
6845
6860
|
K ? /* @__PURE__ */ n.jsx(
|
|
6846
|
-
|
|
6861
|
+
ae,
|
|
6847
6862
|
{
|
|
6848
6863
|
size: 14,
|
|
6849
6864
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6879,7 +6894,7 @@ const Ls = [
|
|
|
6879
6894
|
},
|
|
6880
6895
|
onClick: () => Z(!V),
|
|
6881
6896
|
children: [
|
|
6882
|
-
/* @__PURE__ */ n.jsx(
|
|
6897
|
+
/* @__PURE__ */ n.jsx(os, { size: 16, "aria-hidden": "true" }),
|
|
6883
6898
|
"More Actions"
|
|
6884
6899
|
]
|
|
6885
6900
|
}
|
|
@@ -6932,11 +6947,11 @@ const Ls = [
|
|
|
6932
6947
|
]
|
|
6933
6948
|
}
|
|
6934
6949
|
),
|
|
6935
|
-
|
|
6950
|
+
a && /* @__PURE__ */ n.jsxs(
|
|
6936
6951
|
"button",
|
|
6937
6952
|
{
|
|
6938
6953
|
onClick: () => {
|
|
6939
|
-
|
|
6954
|
+
a(), Y();
|
|
6940
6955
|
},
|
|
6941
6956
|
style: {
|
|
6942
6957
|
width: "100%",
|
|
@@ -7049,7 +7064,7 @@ const Ls = [
|
|
|
7049
7064
|
display: "grid",
|
|
7050
7065
|
gap: "20px",
|
|
7051
7066
|
gridTemplateColumns: "1fr",
|
|
7052
|
-
...
|
|
7067
|
+
...d && window.innerWidth >= 600 && {
|
|
7053
7068
|
gridTemplateColumns: "1fr 1fr",
|
|
7054
7069
|
gap: "20px"
|
|
7055
7070
|
}
|
|
@@ -7094,7 +7109,7 @@ const Ls = [
|
|
|
7094
7109
|
style: {
|
|
7095
7110
|
padding: "12px",
|
|
7096
7111
|
borderRadius: "8px",
|
|
7097
|
-
border: `1px solid ${
|
|
7112
|
+
border: `1px solid ${o}`,
|
|
7098
7113
|
backgroundColor: "transparent",
|
|
7099
7114
|
color: D.textPrimary,
|
|
7100
7115
|
fontSize: "12px",
|
|
@@ -7415,25 +7430,25 @@ const Ls = [
|
|
|
7415
7430
|
]
|
|
7416
7431
|
}
|
|
7417
7432
|
);
|
|
7418
|
-
},
|
|
7433
|
+
}, ma = ({
|
|
7419
7434
|
darkMode: t = !0,
|
|
7420
7435
|
primaryColor: e = "#3b82f6",
|
|
7421
7436
|
onLogout: r,
|
|
7422
7437
|
varient: s = "classic",
|
|
7423
|
-
propUser:
|
|
7438
|
+
propUser: a,
|
|
7424
7439
|
className: i = "",
|
|
7425
7440
|
// New URL props with defaults
|
|
7426
|
-
profileUrl:
|
|
7441
|
+
profileUrl: o,
|
|
7427
7442
|
settingsUrl: l,
|
|
7428
7443
|
// Menu item visibility with defaults
|
|
7429
7444
|
showProfileMenuItem: h = !0,
|
|
7430
7445
|
showSettingsMenuItem: c = !0,
|
|
7431
|
-
showViewProfileMenuItem:
|
|
7446
|
+
showViewProfileMenuItem: d = !0,
|
|
7432
7447
|
// Custom labels with defaults
|
|
7433
7448
|
profileLabel: b = "My Profile",
|
|
7434
7449
|
settingsLabel: y = "Settings",
|
|
7435
7450
|
viewProfileLabel: w = "View Profile",
|
|
7436
|
-
logoutLabel:
|
|
7451
|
+
logoutLabel: u = "Sign Out"
|
|
7437
7452
|
}) => {
|
|
7438
7453
|
const { baseUrl: j, apiKey: m, appId: _ } = ge(), [R, A] = O(!1), [C, M] = O(null), [g, I] = O(!0), [v, U] = O(null), q = xt(null), F = xt(null), [V, Z] = O(!1), [T, J] = O(!1);
|
|
7439
7454
|
te(() => {
|
|
@@ -7445,10 +7460,10 @@ const Ls = [
|
|
|
7445
7460
|
}, []), te(() => {
|
|
7446
7461
|
(async () => {
|
|
7447
7462
|
try {
|
|
7448
|
-
if (I(!0), U(null),
|
|
7449
|
-
if (!
|
|
7463
|
+
if (I(!0), U(null), a) {
|
|
7464
|
+
if (!a.id || !a.name || !a.email)
|
|
7450
7465
|
throw new Error("Invalid user data provided");
|
|
7451
|
-
M(
|
|
7466
|
+
M(a);
|
|
7452
7467
|
} else if (typeof window < "u") {
|
|
7453
7468
|
const k = localStorage.getItem("userInfo");
|
|
7454
7469
|
if (k)
|
|
@@ -7467,7 +7482,7 @@ const Ls = [
|
|
|
7467
7482
|
I(!1);
|
|
7468
7483
|
}
|
|
7469
7484
|
})();
|
|
7470
|
-
}, [
|
|
7485
|
+
}, [a]), te(() => {
|
|
7471
7486
|
if (typeof window > "u") return;
|
|
7472
7487
|
const x = () => {
|
|
7473
7488
|
if (!R || !F.current) return;
|
|
@@ -7714,7 +7729,7 @@ const Ls = [
|
|
|
7714
7729
|
if (x) {
|
|
7715
7730
|
const k = JSON.parse(x);
|
|
7716
7731
|
M(k);
|
|
7717
|
-
} else
|
|
7732
|
+
} else a && M(a);
|
|
7718
7733
|
} catch (x) {
|
|
7719
7734
|
console.error("Retry failed:", x), U("Invalid user data"), localStorage.removeItem("userInfo"), M(null);
|
|
7720
7735
|
} finally {
|
|
@@ -7722,7 +7737,7 @@ const Ls = [
|
|
|
7722
7737
|
}
|
|
7723
7738
|
}, Q = (x, k) => {
|
|
7724
7739
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
7725
|
-
}, X = () =>
|
|
7740
|
+
}, X = () => o || C?.profileUrl, f = () => {
|
|
7726
7741
|
const x = X();
|
|
7727
7742
|
x && window.open(x, "_self", "noopener,noreferrer");
|
|
7728
7743
|
}, S = () => {
|
|
@@ -7754,8 +7769,8 @@ const Ls = [
|
|
|
7754
7769
|
src: C.avatarUrl,
|
|
7755
7770
|
alt: `${C?.name || "User"}'s avatar`,
|
|
7756
7771
|
style: {
|
|
7757
|
-
width: T ? "34px" : "
|
|
7758
|
-
height: T ? "34px" : "
|
|
7772
|
+
width: T ? "34px" : "36px",
|
|
7773
|
+
height: T ? "34px" : "36px",
|
|
7759
7774
|
borderRadius: "50%",
|
|
7760
7775
|
objectFit: "cover",
|
|
7761
7776
|
border: `2px solid ${z.borderLight}`,
|
|
@@ -7915,7 +7930,7 @@ const Ls = [
|
|
|
7915
7930
|
]
|
|
7916
7931
|
}
|
|
7917
7932
|
),
|
|
7918
|
-
|
|
7933
|
+
d && C.profileUrl && /* @__PURE__ */ n.jsxs(
|
|
7919
7934
|
"a",
|
|
7920
7935
|
{
|
|
7921
7936
|
href: C.profileUrl,
|
|
@@ -7959,7 +7974,7 @@ const Ls = [
|
|
|
7959
7974
|
"aria-hidden": "true"
|
|
7960
7975
|
}
|
|
7961
7976
|
),
|
|
7962
|
-
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children:
|
|
7977
|
+
/* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: u })
|
|
7963
7978
|
]
|
|
7964
7979
|
}
|
|
7965
7980
|
) })
|
|
@@ -7992,17 +8007,17 @@ const Ls = [
|
|
|
7992
8007
|
]
|
|
7993
8008
|
}
|
|
7994
8009
|
);
|
|
7995
|
-
},
|
|
8010
|
+
}, ya = ({
|
|
7996
8011
|
user: t,
|
|
7997
8012
|
darkMode: e = !0,
|
|
7998
8013
|
primaryColor: r = "#00C212",
|
|
7999
8014
|
onVerify: s
|
|
8000
8015
|
}) => {
|
|
8001
|
-
const { appId:
|
|
8016
|
+
const { appId: a, baseUrl: i, apiKey: o } = ge(), [l, h] = O({
|
|
8002
8017
|
email: t?.email || "",
|
|
8003
8018
|
otp: "",
|
|
8004
|
-
appId:
|
|
8005
|
-
}), [c,
|
|
8019
|
+
appId: a
|
|
8020
|
+
}), [c, d] = O(!1), [b, y] = O(!1), [w, u] = O(null), j = (g, I) => {
|
|
8006
8021
|
let v = parseInt(g.replace("#", ""), 16), U = (v >> 16) + I, q = (v >> 8 & 255) + I, F = (v & 255) + I;
|
|
8007
8022
|
return U = Math.min(255, Math.max(0, U)), q = Math.min(255, Math.max(0, q)), F = Math.min(255, Math.max(0, F)), `#${(F | q << 8 | U << 16).toString(16).padStart(6, "0")}`;
|
|
8008
8023
|
}, m = e ? {
|
|
@@ -8032,7 +8047,7 @@ const Ls = [
|
|
|
8032
8047
|
t?.email && h((g) => ({ ...g, email: t.email }));
|
|
8033
8048
|
}, [t?.email]);
|
|
8034
8049
|
const _ = (g, I) => {
|
|
8035
|
-
|
|
8050
|
+
u({ type: g, message: I }), setTimeout(() => u(null), 3e3);
|
|
8036
8051
|
}, R = async () => {
|
|
8037
8052
|
if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
|
|
8038
8053
|
_("error", "Please enter a valid email");
|
|
@@ -8043,9 +8058,9 @@ const Ls = [
|
|
|
8043
8058
|
const g = await W.post(
|
|
8044
8059
|
`${i}/users/send-verify-otp/${t?.id}`,
|
|
8045
8060
|
{ email: l.email },
|
|
8046
|
-
{ headers: { "x-api-key":
|
|
8061
|
+
{ headers: { "x-api-key": o, "x-app-id": a } }
|
|
8047
8062
|
);
|
|
8048
|
-
g.data.success ? (_("success", g.data.message || "OTP sent!"),
|
|
8063
|
+
g.data.success ? (_("success", g.data.message || "OTP sent!"), d(!0)) : _("error", g.data.message || "Failed to send OTP");
|
|
8049
8064
|
} catch (g) {
|
|
8050
8065
|
_("error", g.response?.data?.message || "Server error");
|
|
8051
8066
|
} finally {
|
|
@@ -8061,7 +8076,7 @@ const Ls = [
|
|
|
8061
8076
|
const I = await W.post(`${i}/users/verify-email`, l);
|
|
8062
8077
|
if (I.data.success && t) {
|
|
8063
8078
|
const v = { ...t, isVerified: !0 };
|
|
8064
|
-
s?.(v), _("success", I.data.message || "Email verified!"),
|
|
8079
|
+
s?.(v), _("success", I.data.message || "Email verified!"), d(!1), h({ email: t.email, otp: "", appId: a });
|
|
8065
8080
|
} else
|
|
8066
8081
|
_("error", I.data.message || "Verification failed");
|
|
8067
8082
|
} catch (I) {
|
|
@@ -8192,7 +8207,7 @@ const Ls = [
|
|
|
8192
8207
|
] })
|
|
8193
8208
|
] }),
|
|
8194
8209
|
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 12 }, children: c ? /* @__PURE__ */ n.jsxs("button", { type: "submit", disabled: b, style: M(b), children: [
|
|
8195
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8210
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ce, { size: 16 }),
|
|
8196
8211
|
b ? "Verifying..." : "Verify Email"
|
|
8197
8212
|
] }) : /* @__PURE__ */ n.jsxs(
|
|
8198
8213
|
"button",
|
|
@@ -8202,7 +8217,7 @@ const Ls = [
|
|
|
8202
8217
|
disabled: b,
|
|
8203
8218
|
style: M(b),
|
|
8204
8219
|
children: [
|
|
8205
|
-
b ? /* @__PURE__ */ n.jsx(
|
|
8220
|
+
b ? /* @__PURE__ */ n.jsx(ae, { size: 16, className: "spinner" }) : /* @__PURE__ */ n.jsx(ut, { size: 16 }),
|
|
8206
8221
|
b ? "Sending..." : "Send OTP"
|
|
8207
8222
|
]
|
|
8208
8223
|
}
|
|
@@ -8212,14 +8227,14 @@ const Ls = [
|
|
|
8212
8227
|
);
|
|
8213
8228
|
};
|
|
8214
8229
|
export {
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8230
|
+
da as NeuctraAuthix,
|
|
8231
|
+
ya as ReactEmailVerification,
|
|
8232
|
+
xa as ReactSignedIn,
|
|
8233
|
+
ha as ReactSignedOut,
|
|
8234
|
+
ma as ReactUserButton,
|
|
8235
|
+
fa as ReactUserLogin,
|
|
8236
|
+
ga as ReactUserProfile,
|
|
8237
|
+
pa as ReactUserSignUp,
|
|
8223
8238
|
ge as getSdkConfig,
|
|
8224
|
-
|
|
8239
|
+
ua as setSdkConfig
|
|
8225
8240
|
};
|