@neuctra/authix 1.0.8 → 1.0.10
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 +588 -592
- package/dist/neuctra-authix.umd.js +11 -11
- package/dist/src/react/SignedIn.d.ts +9 -3
- package/dist/src/react/SignedOut.d.ts +8 -2
- package/package.json +1 -1
|
@@ -4,23 +4,23 @@ function Rt(e, t) {
|
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const r =
|
|
7
|
+
const { toString: ar } = Object.prototype, { getPrototypeOf: Ze } = Object, { iterator: $e, toStringTag: It } = Symbol, Ue = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const r = ar.call(t);
|
|
9
9
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
10
10
|
})(/* @__PURE__ */ Object.create(null)), re = (e) => (e = e.toLowerCase(), (t) => Ue(t) === e), De = (e) => (t) => typeof t === e, { isArray: ge } = Array, xe = De("undefined");
|
|
11
11
|
function Se(e) {
|
|
12
12
|
return e !== null && !xe(e) && e.constructor !== null && !xe(e.constructor) && ee(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
14
|
+
const Pt = re("ArrayBuffer");
|
|
15
|
+
function or(e) {
|
|
16
16
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Pt(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const ir = De("string"), ee = De("function"), Ot = De("number"), ke = (e) => e !== null && typeof e == "object", lr = (e) => e === !0 || e === !1,
|
|
19
|
+
const ir = De("string"), ee = De("function"), Ot = De("number"), ke = (e) => e !== null && typeof e == "object", lr = (e) => e === !0 || e === !1, Pe = (e) => {
|
|
20
20
|
if (Ue(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const t = Ze(e);
|
|
23
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(It in e) && !($e in e);
|
|
24
24
|
}, cr = (e) => {
|
|
25
25
|
if (!ke(e) || Se(e))
|
|
26
26
|
return !1;
|
|
@@ -37,16 +37,16 @@ const ir = De("string"), ee = De("function"), Ot = De("number"), ke = (e) => e !
|
|
|
37
37
|
function Ee(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
38
38
|
if (e === null || typeof e > "u")
|
|
39
39
|
return;
|
|
40
|
-
let s,
|
|
40
|
+
let s, a;
|
|
41
41
|
if (typeof e != "object" && (e = [e]), ge(e))
|
|
42
|
-
for (s = 0,
|
|
42
|
+
for (s = 0, a = e.length; s < a; s++)
|
|
43
43
|
t.call(null, e[s], s, e);
|
|
44
44
|
else {
|
|
45
45
|
if (Se(e))
|
|
46
46
|
return;
|
|
47
|
-
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e),
|
|
47
|
+
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
48
48
|
let l;
|
|
49
|
-
for (s = 0; s <
|
|
49
|
+
for (s = 0; s < o; s++)
|
|
50
50
|
l = i[s], t.call(null, e[l], l, e);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,35 +55,35 @@ function At(e, t) {
|
|
|
55
55
|
return null;
|
|
56
56
|
t = t.toLowerCase();
|
|
57
57
|
const r = Object.keys(e);
|
|
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], t === a.toLowerCase())
|
|
61
|
+
return a;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
const le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, zt = (e) => !xe(e) && e !== le;
|
|
65
65
|
function Ve() {
|
|
66
|
-
const { caseless: e, skipUndefined: t } = zt(this) && this || {}, r = {}, s = (
|
|
67
|
-
const
|
|
68
|
-
|
|
66
|
+
const { caseless: e, skipUndefined: t } = zt(this) && this || {}, r = {}, s = (a, i) => {
|
|
67
|
+
const o = e && At(r, i) || i;
|
|
68
|
+
Pe(r[o]) && Pe(a) ? r[o] = Ve(r[o], a) : Pe(a) ? r[o] = Ve({}, a) : ge(a) ? r[o] = a.slice() : (!t || !xe(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] && Ee(arguments[a], s);
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
const vr = (e, t, r, { allOwnKeys: s } = {}) => (Ee(t, (
|
|
75
|
-
r && ee(
|
|
74
|
+
const vr = (e, t, r, { allOwnKeys: s } = {}) => (Ee(t, (a, i) => {
|
|
75
|
+
r && ee(a) ? e[i] = Rt(a, r) : e[i] = a;
|
|
76
76
|
}, { allOwnKeys: s }), e), Sr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), kr = (e, t, r, s) => {
|
|
77
77
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
78
|
value: t.prototype
|
|
79
79
|
}), r && Object.assign(e.prototype, r);
|
|
80
80
|
}, Er = (e, t, r, s) => {
|
|
81
|
-
let
|
|
81
|
+
let a, i, o;
|
|
82
82
|
const l = {};
|
|
83
83
|
if (t = t || {}, e == null) return t;
|
|
84
84
|
do {
|
|
85
|
-
for (
|
|
86
|
-
|
|
85
|
+
for (a = Object.getOwnPropertyNames(e), i = a.length; i-- > 0; )
|
|
86
|
+
o = a[i], (!s || s(o, e, t)) && !l[o] && (t[o] = e[o], l[o] = !0);
|
|
87
87
|
e = r !== !1 && Ze(e);
|
|
88
88
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
89
89
|
return t;
|
|
@@ -100,14 +100,14 @@ const vr = (e, t, r, { allOwnKeys: s } = {}) => (Ee(t, (o, i) => {
|
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
r[t] = e[t];
|
|
102
102
|
return r;
|
|
103
|
-
}, Rr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ze(Uint8Array)),
|
|
103
|
+
}, Rr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ze(Uint8Array)), Ir = (e, t) => {
|
|
104
104
|
const s = (e && e[$e]).call(e);
|
|
105
|
-
let
|
|
106
|
-
for (; (
|
|
107
|
-
const i =
|
|
105
|
+
let a;
|
|
106
|
+
for (; (a = s.next()) && !a.done; ) {
|
|
107
|
+
const i = a.value;
|
|
108
108
|
t.call(e, i[0], i[1]);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, Pr = (e, t) => {
|
|
111
111
|
let r;
|
|
112
112
|
const s = [];
|
|
113
113
|
for (; (r = e.exec(t)) !== null; )
|
|
@@ -115,14 +115,14 @@ const vr = (e, t, r, { allOwnKeys: s } = {}) => (Ee(t, (o, i) => {
|
|
|
115
115
|
return s;
|
|
116
116
|
}, Or = re("HTMLFormElement"), Ar = (e) => e.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
|
-
),
|
|
121
|
+
), at = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), zr = re("RegExp"), _t = (e, t) => {
|
|
122
122
|
const r = Object.getOwnPropertyDescriptors(e), s = {};
|
|
123
|
-
Ee(r, (
|
|
124
|
-
let
|
|
125
|
-
(
|
|
123
|
+
Ee(r, (a, i) => {
|
|
124
|
+
let o;
|
|
125
|
+
(o = t(a, i, e)) !== !1 && (s[i] = o || a);
|
|
126
126
|
}), Object.defineProperties(e, s);
|
|
127
127
|
}, _r = (e) => {
|
|
128
128
|
_t(e, (t, r) => {
|
|
@@ -140,8 +140,8 @@ const vr = (e, t, r, { allOwnKeys: s } = {}) => (Ee(t, (o, i) => {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}, Nr = (e, t) => {
|
|
143
|
-
const r = {}, s = (
|
|
144
|
-
|
|
143
|
+
const r = {}, s = (a) => {
|
|
144
|
+
a.forEach((i) => {
|
|
145
145
|
r[i] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
@@ -149,45 +149,45 @@ const vr = (e, t, r, { allOwnKeys: s } = {}) => (Ee(t, (o, i) => {
|
|
|
149
149
|
}, $r = () => {
|
|
150
150
|
}, Ur = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
151
|
function Dr(e) {
|
|
152
|
-
return !!(e && ee(e.append) && e[
|
|
152
|
+
return !!(e && ee(e.append) && e[It] === "FormData" && e[$e]);
|
|
153
153
|
}
|
|
154
154
|
const Fr = (e) => {
|
|
155
|
-
const t = new Array(10), r = (s,
|
|
155
|
+
const t = new Array(10), r = (s, a) => {
|
|
156
156
|
if (ke(s)) {
|
|
157
157
|
if (t.indexOf(s) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (Se(s))
|
|
160
160
|
return s;
|
|
161
161
|
if (!("toJSON" in s)) {
|
|
162
|
-
t[
|
|
162
|
+
t[a] = s;
|
|
163
163
|
const i = ge(s) ? [] : {};
|
|
164
|
-
return Ee(s, (
|
|
165
|
-
const f = r(
|
|
164
|
+
return Ee(s, (o, l) => {
|
|
165
|
+
const f = r(o, a + 1);
|
|
166
166
|
!xe(f) && (i[l] = f);
|
|
167
|
-
}), t[
|
|
167
|
+
}), t[a] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
return s;
|
|
171
171
|
};
|
|
172
172
|
return r(e, 0);
|
|
173
|
-
}, Lr = re("AsyncFunction"), Mr = (e) => e && (ke(e) || ee(e)) && ee(e.then) && ee(e.catch), Nt = ((e, t) => e ? setImmediate : t ? ((r, s) => (le.addEventListener("message", ({ source:
|
|
174
|
-
|
|
175
|
-
}, !1), (
|
|
176
|
-
s.push(
|
|
173
|
+
}, Lr = re("AsyncFunction"), Mr = (e) => e && (ke(e) || ee(e)) && ee(e.then) && ee(e.catch), Nt = ((e, t) => e ? setImmediate : t ? ((r, s) => (le.addEventListener("message", ({ source: a, data: i }) => {
|
|
174
|
+
a === le && i === r && s.length && s.shift()();
|
|
175
|
+
}, !1), (a) => {
|
|
176
|
+
s.push(a), le.postMessage(r, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
ee(le.postMessage)
|
|
180
180
|
), Wr = typeof queueMicrotask < "u" ? queueMicrotask.bind(le) : typeof process < "u" && process.nextTick || Nt, Br = (e) => e != null && ee(e[$e]), d = {
|
|
181
181
|
isArray: ge,
|
|
182
|
-
isArrayBuffer:
|
|
182
|
+
isArrayBuffer: Pt,
|
|
183
183
|
isBuffer: Se,
|
|
184
184
|
isFormData: hr,
|
|
185
|
-
isArrayBufferView:
|
|
185
|
+
isArrayBufferView: or,
|
|
186
186
|
isString: ir,
|
|
187
187
|
isNumber: Ot,
|
|
188
188
|
isBoolean: lr,
|
|
189
189
|
isObject: ke,
|
|
190
|
-
isPlainObject:
|
|
190
|
+
isPlainObject: Pe,
|
|
191
191
|
isEmptyObject: cr,
|
|
192
192
|
isReadableStream: mr,
|
|
193
193
|
isRequest: yr,
|
|
@@ -214,11 +214,11 @@ const Fr = (e) => {
|
|
|
214
214
|
kindOfTest: re,
|
|
215
215
|
endsWith: Tr,
|
|
216
216
|
toArray: Cr,
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
217
|
+
forEachEntry: Ir,
|
|
218
|
+
matchAll: Pr,
|
|
219
219
|
isHTMLForm: Or,
|
|
220
|
-
hasOwnProperty:
|
|
221
|
-
hasOwnProp:
|
|
220
|
+
hasOwnProperty: at,
|
|
221
|
+
hasOwnProp: at,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
223
|
reduceDescriptors: _t,
|
|
224
224
|
freezeMethods: _r,
|
|
@@ -237,8 +237,8 @@ const Fr = (e) => {
|
|
|
237
237
|
asap: Wr,
|
|
238
238
|
isIterable: Br
|
|
239
239
|
};
|
|
240
|
-
function U(e, t, r, s,
|
|
241
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), s && (this.request = s),
|
|
240
|
+
function U(e, t, r, s, a) {
|
|
241
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), s && (this.request = s), a && (this.response = a, this.status = a.status ? a.status : null);
|
|
242
242
|
}
|
|
243
243
|
d.inherits(U, Error, {
|
|
244
244
|
toJSON: function() {
|
|
@@ -281,13 +281,13 @@ const $t = U.prototype, Ut = {};
|
|
|
281
281
|
});
|
|
282
282
|
Object.defineProperties(U, Ut);
|
|
283
283
|
Object.defineProperty($t, "isAxiosError", { value: !0 });
|
|
284
|
-
U.from = (e, t, r, s,
|
|
285
|
-
const
|
|
286
|
-
d.toFlatObject(e,
|
|
284
|
+
U.from = (e, t, r, s, a, i) => {
|
|
285
|
+
const o = Object.create($t);
|
|
286
|
+
d.toFlatObject(e, o, function(u) {
|
|
287
287
|
return u !== Error.prototype;
|
|
288
288
|
}, (p) => p !== "isAxiosError");
|
|
289
289
|
const l = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
|
|
290
|
-
return U.call(
|
|
290
|
+
return U.call(o, l, f, r, s, a), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
292
|
const qr = null;
|
|
293
293
|
function Ye(e) {
|
|
@@ -296,9 +296,9 @@ function Ye(e) {
|
|
|
296
296
|
function Dt(e) {
|
|
297
297
|
return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
return e ? e.concat(t).map(function(
|
|
301
|
-
return
|
|
299
|
+
function ot(e, t, r) {
|
|
300
|
+
return e ? e.concat(t).map(function(a, i) {
|
|
301
|
+
return a = Dt(a), !r && i ? "[" + a + "]" : a;
|
|
302
302
|
}).join(r ? "." : "") : t;
|
|
303
303
|
}
|
|
304
304
|
function Hr(e) {
|
|
@@ -317,8 +317,8 @@ function Fe(e, t, r) {
|
|
|
317
317
|
}, !1, function(b, w) {
|
|
318
318
|
return !d.isUndefined(w[b]);
|
|
319
319
|
});
|
|
320
|
-
const s = r.metaTokens,
|
|
321
|
-
if (!d.isFunction(
|
|
320
|
+
const s = r.metaTokens, a = r.visitor || u, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(t);
|
|
321
|
+
if (!d.isFunction(a))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function p(c) {
|
|
324
324
|
if (c === null) return "";
|
|
@@ -336,15 +336,15 @@ function Fe(e, t, r) {
|
|
|
336
336
|
if (d.endsWith(b, "{}"))
|
|
337
337
|
b = s ? b : b.slice(0, -2), c = JSON.stringify(c);
|
|
338
338
|
else if (d.isArray(c) && Hr(c) || (d.isFileList(c) || d.endsWith(b, "[]")) && (N = d.toArray(c)))
|
|
339
|
-
return b = Dt(b), N.forEach(function(
|
|
340
|
-
!(d.isUndefined(
|
|
339
|
+
return b = Dt(b), N.forEach(function(I, T) {
|
|
340
|
+
!(d.isUndefined(I) || I === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
343
|
-
p(
|
|
342
|
+
o === !0 ? ot([b], T, i) : o === null ? b : b + "[]",
|
|
343
|
+
p(I)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return Ye(c) ? !0 : (t.append(
|
|
347
|
+
return Ye(c) ? !0 : (t.append(ot(w, b, i), p(c)), !1);
|
|
348
348
|
}
|
|
349
349
|
const y = [], E = Object.assign(Vr, {
|
|
350
350
|
defaultVisitor: u,
|
|
@@ -356,7 +356,7 @@ function Fe(e, t, r) {
|
|
|
356
356
|
if (y.indexOf(c) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + b.join("."));
|
|
358
358
|
y.push(c), d.forEach(c, function(N, M) {
|
|
359
|
-
(!(d.isUndefined(N) || N === null) &&
|
|
359
|
+
(!(d.isUndefined(N) || N === null) && a.call(
|
|
360
360
|
t,
|
|
361
361
|
N,
|
|
362
362
|
d.isString(M) ? M.trim() : M,
|
|
@@ -395,8 +395,8 @@ Ft.toString = function(t) {
|
|
|
395
395
|
const r = t ? function(s) {
|
|
396
396
|
return t.call(this, s, it);
|
|
397
397
|
} : it;
|
|
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 Yr(e) {
|
|
@@ -409,11 +409,11 @@ function Lt(e, t, r) {
|
|
|
409
409
|
d.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(t, r) : i = d.isURLSearchParams(t) ? t.toString() : new Qe(t, r).toString(s), i) {
|
|
415
|
+
const o = e.indexOf("#");
|
|
416
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return e;
|
|
419
419
|
}
|
|
@@ -497,7 +497,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", en
|
|
|
497
497
|
};
|
|
498
498
|
function rn(e, t) {
|
|
499
499
|
return Fe(e, new Z.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, s,
|
|
500
|
+
visitor: function(r, s, a, i) {
|
|
501
501
|
return Z.isNode && d.isBuffer(r) ? (this.append(s, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...t
|
|
@@ -509,28 +509,28 @@ function nn(e) {
|
|
|
509
509
|
function sn(e) {
|
|
510
510
|
const t = {}, r = Object.keys(e);
|
|
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], t[i] = e[i];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
518
|
function Wt(e) {
|
|
519
|
-
function t(r, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const l = Number.isFinite(+
|
|
523
|
-
return
|
|
519
|
+
function t(r, s, a, i) {
|
|
520
|
+
let o = r[i++];
|
|
521
|
+
if (o === "__proto__") return !0;
|
|
522
|
+
const l = Number.isFinite(+o), f = i >= r.length;
|
|
523
|
+
return o = !o && d.isArray(a) ? a.length : o, f ? (d.hasOwnProp(a, o) ? a[o] = [a[o], s] : a[o] = s, !l) : ((!a[o] || !d.isObject(a[o])) && (a[o] = []), t(r, s, a[o], i) && d.isArray(a[o]) && (a[o] = sn(a[o])), !l);
|
|
524
524
|
}
|
|
525
525
|
if (d.isFormData(e) && d.isFunction(e.entries)) {
|
|
526
526
|
const r = {};
|
|
527
|
-
return d.forEachEntry(e, (s,
|
|
528
|
-
t(nn(s),
|
|
527
|
+
return d.forEachEntry(e, (s, a) => {
|
|
528
|
+
t(nn(s), a, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function an(e, t, r) {
|
|
534
534
|
if (d.isString(e))
|
|
535
535
|
try {
|
|
536
536
|
return (t || JSON.parse)(e), d.trim(e);
|
|
@@ -544,9 +544,9 @@ const Te = {
|
|
|
544
544
|
transitional: Mt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(t, r) {
|
|
547
|
-
const s = r.getContentType() || "",
|
|
547
|
+
const s = r.getContentType() || "", a = s.indexOf("application/json") > -1, i = d.isObject(t);
|
|
548
548
|
if (i && d.isHTMLForm(t) && (t = new FormData(t)), d.isFormData(t))
|
|
549
|
-
return
|
|
549
|
+
return a ? JSON.stringify(Wt(t)) : t;
|
|
550
550
|
if (d.isArrayBuffer(t) || d.isBuffer(t) || d.isStream(t) || d.isFile(t) || d.isBlob(t) || d.isReadableStream(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (d.isArrayBufferView(t))
|
|
@@ -566,18 +566,18 @@ const Te = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return i ||
|
|
569
|
+
return i || a ? (r.setContentType("application/json", !1), an(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
|
-
const r = this.transitional || Te.transitional, s = r && r.forcedJSONParsing,
|
|
572
|
+
const r = this.transitional || Te.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
|
|
573
573
|
if (d.isResponse(t) || d.isReadableStream(t))
|
|
574
574
|
return t;
|
|
575
|
-
if (t && d.isString(t) && (s && !this.responseType ||
|
|
576
|
-
const
|
|
575
|
+
if (t && d.isString(t) && (s && !this.responseType || a)) {
|
|
576
|
+
const o = !(r && r.silentJSONParsing) && a;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(t, this.parseReviver);
|
|
579
579
|
} catch (l) {
|
|
580
|
-
if (
|
|
580
|
+
if (o)
|
|
581
581
|
throw l.name === "SyntaxError" ? U.from(l, U.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -609,7 +609,7 @@ const Te = {
|
|
|
609
609
|
d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
610
|
Te.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const on = d.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -629,10 +629,10 @@ const an = d.toObjectSet([
|
|
|
629
629
|
"user-agent"
|
|
630
630
|
]), ln = (e) => {
|
|
631
631
|
const t = {};
|
|
632
|
-
let r, s,
|
|
632
|
+
let r, s, a;
|
|
633
633
|
return e && e.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 || t[r] && on[r]) && (r === "set-cookie" ? t[r] ? t[r].push(s) : t[r] = [s] : t[r] = t[r] ? t[r] + ", " + s : s);
|
|
636
636
|
}), t;
|
|
637
637
|
}, ct = Symbol("internals");
|
|
638
638
|
function we(e) {
|
|
@@ -649,10 +649,10 @@ function cn(e) {
|
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
651
|
const dn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
-
function Me(e, t, r, s,
|
|
652
|
+
function Me(e, t, r, s, a) {
|
|
653
653
|
if (d.isFunction(s))
|
|
654
654
|
return s.call(this, t, r);
|
|
655
|
-
if (
|
|
655
|
+
if (a && (t = r), !!d.isString(t)) {
|
|
656
656
|
if (d.isString(s))
|
|
657
657
|
return t.indexOf(s) !== -1;
|
|
658
658
|
if (d.isRegExp(s))
|
|
@@ -666,8 +666,8 @@ function pn(e, t) {
|
|
|
666
666
|
const r = d.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((s) => {
|
|
668
668
|
Object.defineProperty(e, s + r, {
|
|
669
|
-
value: function(
|
|
670
|
-
return this[s].call(this, t,
|
|
669
|
+
value: function(a, i, o) {
|
|
670
|
+
return this[s].call(this, t, a, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -678,19 +678,19 @@ let te = class {
|
|
|
678
678
|
t && this.set(t);
|
|
679
679
|
}
|
|
680
680
|
set(t, r, s) {
|
|
681
|
-
const
|
|
681
|
+
const a = this;
|
|
682
682
|
function i(l, f, p) {
|
|
683
683
|
const u = we(f);
|
|
684
684
|
if (!u)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const y = d.findKey(
|
|
687
|
-
(!y ||
|
|
686
|
+
const y = d.findKey(a, u);
|
|
687
|
+
(!y || a[y] === void 0 || p === !0 || p === void 0 && a[y] !== !1) && (a[y || f] = Oe(l));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const o = (l, f) => d.forEach(l, (p, u) => i(p, u, f));
|
|
690
690
|
if (d.isPlainObject(t) || t instanceof this.constructor)
|
|
691
|
-
|
|
691
|
+
o(t, r);
|
|
692
692
|
else if (d.isString(t) && (t = t.trim()) && !dn(t))
|
|
693
|
-
|
|
693
|
+
o(ln(t), r);
|
|
694
694
|
else if (d.isObject(t) && d.isIterable(t)) {
|
|
695
695
|
let l = {}, f, p;
|
|
696
696
|
for (const u of t) {
|
|
@@ -698,7 +698,7 @@ let te = class {
|
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
699
|
l[p = u[0]] = (f = l[p]) ? d.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
o(l, r);
|
|
702
702
|
} else
|
|
703
703
|
t != null && i(r, t, s);
|
|
704
704
|
return this;
|
|
@@ -707,15 +707,15 @@ let te = class {
|
|
|
707
707
|
if (t = we(t), t) {
|
|
708
708
|
const s = d.findKey(this, t);
|
|
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 cn(
|
|
714
|
+
return cn(a);
|
|
715
715
|
if (d.isFunction(r))
|
|
716
|
-
return r.call(this,
|
|
716
|
+
return r.call(this, a, s);
|
|
717
717
|
if (d.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 te = class {
|
|
|
729
729
|
}
|
|
730
730
|
delete(t, r) {
|
|
731
731
|
const s = this;
|
|
732
|
-
let
|
|
733
|
-
function i(
|
|
734
|
-
if (
|
|
735
|
-
const l = d.findKey(s,
|
|
736
|
-
l && (!r || Me(s, s[l], l, r)) && (delete s[l],
|
|
732
|
+
let a = !1;
|
|
733
|
+
function i(o) {
|
|
734
|
+
if (o = we(o), o) {
|
|
735
|
+
const l = d.findKey(s, o);
|
|
736
|
+
l && (!r || Me(s, s[l], l, r)) && (delete s[l], a = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return d.isArray(t) ? t.forEach(i) : i(t),
|
|
739
|
+
return d.isArray(t) ? t.forEach(i) : i(t), a;
|
|
740
740
|
}
|
|
741
741
|
clear(t) {
|
|
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
|
-
(!t || Me(this, this[i], i, t, !0)) && (delete this[i],
|
|
746
|
+
(!t || Me(this, this[i], i, t, !0)) && (delete this[i], a = !0);
|
|
747
747
|
}
|
|
748
|
-
return
|
|
748
|
+
return a;
|
|
749
749
|
}
|
|
750
750
|
normalize(t) {
|
|
751
751
|
const r = this, s = {};
|
|
752
|
-
return d.forEach(this, (
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return d.forEach(this, (a, i) => {
|
|
753
|
+
const o = d.findKey(s, i);
|
|
754
|
+
if (o) {
|
|
755
|
+
r[o] = Oe(a), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
const l = t ? un(i) : String(i).trim();
|
|
759
|
-
l !== i && delete r[i], r[l] = Oe(
|
|
759
|
+
l !== i && delete r[i], r[l] = Oe(a), s[l] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...t) {
|
|
@@ -764,8 +764,8 @@ let te = class {
|
|
|
764
764
|
}
|
|
765
765
|
toJSON(t) {
|
|
766
766
|
const r = /* @__PURE__ */ Object.create(null);
|
|
767
|
-
return d.forEach(this, (s,
|
|
768
|
-
s != null && s !== !1 && (r[
|
|
767
|
+
return d.forEach(this, (s, a) => {
|
|
768
|
+
s != null && s !== !1 && (r[a] = t && d.isArray(s) ? s.join(", ") : s);
|
|
769
769
|
}), r;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
@@ -786,15 +786,15 @@ let te = class {
|
|
|
786
786
|
}
|
|
787
787
|
static concat(t, ...r) {
|
|
788
788
|
const s = new this(t);
|
|
789
|
-
return r.forEach((
|
|
789
|
+
return r.forEach((a) => s.set(a)), s;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
792
|
const s = (this[ct] = this[ct] = {
|
|
793
793
|
accessors: {}
|
|
794
|
-
}).accessors,
|
|
795
|
-
function i(
|
|
796
|
-
const l = we(
|
|
797
|
-
s[l] || (pn(
|
|
794
|
+
}).accessors, a = this.prototype;
|
|
795
|
+
function i(o) {
|
|
796
|
+
const l = we(o);
|
|
797
|
+
s[l] || (pn(a, o), s[l] = !0);
|
|
798
798
|
}
|
|
799
799
|
return d.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
800
|
}
|
|
@@ -811,11 +811,11 @@ d.reduceDescriptors(te.prototype, ({ value: e }, t) => {
|
|
|
811
811
|
});
|
|
812
812
|
d.freezeMethods(te);
|
|
813
813
|
function We(e, t) {
|
|
814
|
-
const r = this || Te, s = t || r,
|
|
814
|
+
const r = this || Te, s = t || r, a = te.from(s.headers);
|
|
815
815
|
let i = s.data;
|
|
816
816
|
return d.forEach(e, function(l) {
|
|
817
|
-
i = l.call(r, i,
|
|
818
|
-
}),
|
|
817
|
+
i = l.call(r, i, a.normalize(), t ? t.status : void 0);
|
|
818
|
+
}), a.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function Bt(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
@@ -843,44 +843,44 @@ function fn(e) {
|
|
|
843
843
|
function xn(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const r = new Array(e), s = new Array(e);
|
|
846
|
-
let
|
|
846
|
+
let a = 0, i = 0, o;
|
|
847
847
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
848
848
|
const p = Date.now(), u = s[i];
|
|
849
|
-
|
|
849
|
+
o || (o = p), r[a] = f, s[a] = p;
|
|
850
850
|
let y = i, E = 0;
|
|
851
|
-
for (; y !==
|
|
851
|
+
for (; y !== a; )
|
|
852
852
|
E += r[y++], y = y % e;
|
|
853
|
-
if (
|
|
853
|
+
if (a = (a + 1) % e, a === i && (i = (i + 1) % e), p - o < t)
|
|
854
854
|
return;
|
|
855
855
|
const k = u && p - u;
|
|
856
856
|
return k ? Math.round(E * 1e3 / k) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
function hn(e, t) {
|
|
860
|
-
let r = 0, s = 1e3 / t,
|
|
861
|
-
const
|
|
862
|
-
r = u,
|
|
860
|
+
let r = 0, s = 1e3 / t, a, i;
|
|
861
|
+
const o = (p, u = Date.now()) => {
|
|
862
|
+
r = u, a = null, i && (clearTimeout(i), i = null), e(...p);
|
|
863
863
|
};
|
|
864
864
|
return [(...p) => {
|
|
865
865
|
const u = Date.now(), y = u - r;
|
|
866
|
-
y >= s ?
|
|
867
|
-
i = null, a
|
|
866
|
+
y >= s ? o(p, u) : (a = p, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(a);
|
|
868
868
|
}, s - y)));
|
|
869
|
-
}, () =>
|
|
869
|
+
}, () => a && o(a)];
|
|
870
870
|
}
|
|
871
871
|
const Ne = (e, t, r = 3) => {
|
|
872
872
|
let s = 0;
|
|
873
|
-
const
|
|
873
|
+
const a = xn(50, 250);
|
|
874
874
|
return hn((i) => {
|
|
875
|
-
const
|
|
876
|
-
s =
|
|
875
|
+
const o = i.loaded, l = i.lengthComputable ? i.total : void 0, f = o - s, p = a(f), u = o <= l;
|
|
876
|
+
s = o;
|
|
877
877
|
const y = {
|
|
878
|
-
loaded:
|
|
878
|
+
loaded: o,
|
|
879
879
|
total: l,
|
|
880
|
-
progress: l ?
|
|
880
|
+
progress: l ? o / l : void 0,
|
|
881
881
|
bytes: f,
|
|
882
882
|
rate: p || void 0,
|
|
883
|
-
estimated: p && l && u ? (l -
|
|
883
|
+
estimated: p && l && u ? (l - o) / p : void 0,
|
|
884
884
|
event: i,
|
|
885
885
|
lengthComputable: l != null,
|
|
886
886
|
[t ? "download" : "upload"]: !0
|
|
@@ -900,9 +900,9 @@ const Ne = (e, t, r = 3) => {
|
|
|
900
900
|
) : () => !0, mn = Z.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(e, t, r, s,
|
|
904
|
-
const
|
|
905
|
-
d.isNumber(r) &&
|
|
903
|
+
write(e, t, r, s, a, i) {
|
|
904
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
905
|
+
d.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), d.isString(s) && o.push("path=" + s), d.isString(a) && o.push("domain=" + a), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(e) {
|
|
908
908
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -941,7 +941,7 @@ function ue(e, t) {
|
|
|
941
941
|
function s(p, u, y, E) {
|
|
942
942
|
return d.isPlainObject(p) && d.isPlainObject(u) ? d.merge.call({ caseless: E }, p, u) : d.isPlainObject(u) ? d.merge({}, u) : d.isArray(u) ? u.slice() : u;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function a(p, u, y, E) {
|
|
945
945
|
if (d.isUndefined(u)) {
|
|
946
946
|
if (!d.isUndefined(p))
|
|
947
947
|
return s(void 0, p, y, E);
|
|
@@ -951,7 +951,7 @@ function ue(e, t) {
|
|
|
951
951
|
if (!d.isUndefined(u))
|
|
952
952
|
return s(void 0, u);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function o(p, u) {
|
|
955
955
|
if (d.isUndefined(u)) {
|
|
956
956
|
if (!d.isUndefined(p))
|
|
957
957
|
return s(void 0, p);
|
|
@@ -967,80 +967,80 @@ function ue(e, t) {
|
|
|
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: (p, u, y) =>
|
|
995
|
+
headers: (p, u, y) => a(pt(p), pt(u), y, !0)
|
|
996
996
|
};
|
|
997
997
|
return d.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
998
|
-
const y = f[u] ||
|
|
998
|
+
const y = f[u] || a, E = y(e[u], t[u], u);
|
|
999
999
|
d.isUndefined(E) && y !== l || (r[u] = E);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const Vt = (e) => {
|
|
1003
1003
|
const t = ue({}, e);
|
|
1004
|
-
let { data: r, withXSRFToken: s, xsrfHeaderName:
|
|
1005
|
-
if (t.headers =
|
|
1004
|
+
let { data: r, withXSRFToken: s, xsrfHeaderName: a, xsrfCookieName: i, headers: o, auth: l } = t;
|
|
1005
|
+
if (t.headers = o = te.from(o), t.url = Lt(Ht(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1008
1008
|
), d.isFormData(r)) {
|
|
1009
1009
|
if (Z.hasStandardBrowserEnv || Z.hasStandardBrowserWebWorkerEnv)
|
|
1010
|
-
|
|
1010
|
+
o.setContentType(void 0);
|
|
1011
1011
|
else if (d.isFunction(r.getHeaders)) {
|
|
1012
1012
|
const f = r.getHeaders(), p = ["content-type", "content-length"];
|
|
1013
1013
|
Object.entries(f).forEach(([u, y]) => {
|
|
1014
|
-
p.includes(u.toLowerCase()) &&
|
|
1014
|
+
p.includes(u.toLowerCase()) && o.set(u, y);
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (Z.hasStandardBrowserEnv && (s && d.isFunction(s) && (s = s(t)), s || s !== !1 && gn(t.url))) {
|
|
1019
|
-
const f =
|
|
1020
|
-
f &&
|
|
1019
|
+
const f = a && i && mn.read(i);
|
|
1020
|
+
f && o.set(a, f);
|
|
1021
1021
|
}
|
|
1022
1022
|
return t;
|
|
1023
1023
|
}, wn = typeof XMLHttpRequest < "u", jn = wn && function(e) {
|
|
1024
1024
|
return new Promise(function(r, s) {
|
|
1025
|
-
const
|
|
1026
|
-
let i =
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: l, onUploadProgress: f, onDownloadProgress: p } =
|
|
1025
|
+
const a = Vt(e);
|
|
1026
|
+
let i = a.data;
|
|
1027
|
+
const o = te.from(a.headers).normalize();
|
|
1028
|
+
let { responseType: l, onUploadProgress: f, onDownloadProgress: p } = a, u, y, E, k, c;
|
|
1029
1029
|
function b() {
|
|
1030
|
-
k && k(), c && c(),
|
|
1030
|
+
k && k(), c && c(), a.cancelToken && a.cancelToken.unsubscribe(u), a.signal && a.signal.removeEventListener("abort", u);
|
|
1031
1031
|
}
|
|
1032
1032
|
let w = new XMLHttpRequest();
|
|
1033
|
-
w.open(
|
|
1033
|
+
w.open(a.method.toUpperCase(), a.url, !0), w.timeout = a.timeout;
|
|
1034
1034
|
function N() {
|
|
1035
1035
|
if (!w)
|
|
1036
1036
|
return;
|
|
1037
|
-
const
|
|
1037
|
+
const I = te.from(
|
|
1038
1038
|
"getAllResponseHeaders" in w && w.getAllResponseHeaders()
|
|
1039
1039
|
), F = {
|
|
1040
1040
|
data: !l || l === "text" || l === "json" ? w.responseText : w.response,
|
|
1041
1041
|
status: w.status,
|
|
1042
1042
|
statusText: w.statusText,
|
|
1043
|
-
headers:
|
|
1043
|
+
headers: I,
|
|
1044
1044
|
config: e,
|
|
1045
1045
|
request: w
|
|
1046
1046
|
};
|
|
@@ -1058,20 +1058,20 @@ const Vt = (e) => {
|
|
|
1058
1058
|
const F = T && T.message ? T.message : "Network Error", m = new U(F, U.ERR_NETWORK, e, w);
|
|
1059
1059
|
m.event = T || null, s(m), w = null;
|
|
1060
1060
|
}, w.ontimeout = function() {
|
|
1061
|
-
let T =
|
|
1062
|
-
const F =
|
|
1063
|
-
|
|
1061
|
+
let T = a.timeout ? "timeout of " + a.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
+
const F = a.transitional || Mt;
|
|
1063
|
+
a.timeoutErrorMessage && (T = a.timeoutErrorMessage), s(new U(
|
|
1064
1064
|
T,
|
|
1065
1065
|
F.clarifyTimeoutError ? U.ETIMEDOUT : U.ECONNABORTED,
|
|
1066
1066
|
e,
|
|
1067
1067
|
w
|
|
1068
1068
|
)), w = null;
|
|
1069
|
-
}, i === void 0 &&
|
|
1069
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in w && d.forEach(o.toJSON(), function(T, F) {
|
|
1070
1070
|
w.setRequestHeader(F, T);
|
|
1071
|
-
}), d.isUndefined(
|
|
1072
|
-
w && (s(!
|
|
1073
|
-
},
|
|
1074
|
-
const M = fn(
|
|
1071
|
+
}), d.isUndefined(a.withCredentials) || (w.withCredentials = !!a.withCredentials), l && l !== "json" && (w.responseType = a.responseType), p && ([E, c] = Ne(p, !0), w.addEventListener("progress", E)), f && w.upload && ([y, k] = Ne(f), w.upload.addEventListener("progress", y), w.upload.addEventListener("loadend", k)), (a.cancelToken || a.signal) && (u = (I) => {
|
|
1072
|
+
w && (s(!I || I.type ? new me(null, e, w) : I), w.abort(), w = null);
|
|
1073
|
+
}, a.cancelToken && a.cancelToken.subscribe(u), a.signal && (a.signal.aborted ? u() : a.signal.addEventListener("abort", u)));
|
|
1074
|
+
const M = fn(a.url);
|
|
1075
1075
|
if (M && Z.protocols.indexOf(M) === -1) {
|
|
1076
1076
|
s(new U("Unsupported protocol " + M + ":", U.ERR_BAD_REQUEST, e));
|
|
1077
1077
|
return;
|
|
@@ -1081,19 +1081,19 @@ const Vt = (e) => {
|
|
|
1081
1081
|
}, vn = (e, t) => {
|
|
1082
1082
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1083
1083
|
if (t || r) {
|
|
1084
|
-
let s = new AbortController(),
|
|
1084
|
+
let s = new AbortController(), a;
|
|
1085
1085
|
const i = function(p) {
|
|
1086
|
-
if (!
|
|
1087
|
-
|
|
1086
|
+
if (!a) {
|
|
1087
|
+
a = !0, l();
|
|
1088
1088
|
const u = p instanceof Error ? p : this.reason;
|
|
1089
1089
|
s.abort(u instanceof U ? u : new me(u instanceof Error ? u.message : u));
|
|
1090
1090
|
}
|
|
1091
1091
|
};
|
|
1092
|
-
let
|
|
1093
|
-
|
|
1092
|
+
let o = t && setTimeout(() => {
|
|
1093
|
+
o = null, i(new U(`timeout ${t} of ms exceeded`, U.ETIMEDOUT));
|
|
1094
1094
|
}, t);
|
|
1095
1095
|
const l = () => {
|
|
1096
|
-
e && (
|
|
1096
|
+
e && (o && clearTimeout(o), o = null, e.forEach((p) => {
|
|
1097
1097
|
p.unsubscribe ? p.unsubscribe(i) : p.removeEventListener("abort", i);
|
|
1098
1098
|
}), e = null);
|
|
1099
1099
|
};
|
|
@@ -1107,9 +1107,9 @@ const Vt = (e) => {
|
|
|
1107
1107
|
yield e;
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
let s = 0,
|
|
1110
|
+
let s = 0, a;
|
|
1111
1111
|
for (; s < r; )
|
|
1112
|
-
|
|
1112
|
+
a = s + t, yield e.slice(s, a), s = a;
|
|
1113
1113
|
}, kn = async function* (e, t) {
|
|
1114
1114
|
for await (const r of En(e))
|
|
1115
1115
|
yield* Sn(r, t);
|
|
@@ -1130,14 +1130,14 @@ const Vt = (e) => {
|
|
|
1130
1130
|
await t.cancel();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, ft = (e, t, r, s) => {
|
|
1133
|
-
const
|
|
1134
|
-
let i = 0,
|
|
1135
|
-
|
|
1133
|
+
const a = kn(e, t);
|
|
1134
|
+
let i = 0, o, l = (f) => {
|
|
1135
|
+
o || (o = !0, s && s(f));
|
|
1136
1136
|
};
|
|
1137
1137
|
return new ReadableStream({
|
|
1138
1138
|
async pull(f) {
|
|
1139
1139
|
try {
|
|
1140
|
-
const { done: p, value: u } = await
|
|
1140
|
+
const { done: p, value: u } = await a.next();
|
|
1141
1141
|
if (p) {
|
|
1142
1142
|
l(), f.close();
|
|
1143
1143
|
return;
|
|
@@ -1153,7 +1153,7 @@ const Vt = (e) => {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
},
|
|
1155
1155
|
cancel(f) {
|
|
1156
|
-
return l(f),
|
|
1156
|
+
return l(f), a.return();
|
|
1157
1157
|
}
|
|
1158
1158
|
}, {
|
|
1159
1159
|
highWaterMark: 2
|
|
@@ -1174,10 +1174,10 @@ const Vt = (e) => {
|
|
|
1174
1174
|
e = d.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, Tn, e);
|
|
1177
|
-
const { fetch: t, Request: r, Response: s } = e,
|
|
1178
|
-
if (!
|
|
1177
|
+
const { fetch: t, Request: r, Response: s } = e, a = t ? Re(t) : typeof fetch == "function", i = Re(r), o = Re(s);
|
|
1178
|
+
if (!a)
|
|
1179
1179
|
return !1;
|
|
1180
|
-
const l =
|
|
1180
|
+
const l = a && Re(ht), f = a && (typeof gt == "function" ? /* @__PURE__ */ ((c) => (b) => c.encode(b))(new gt()) : async (c) => new Uint8Array(await new r(c).arrayBuffer())), p = i && l && mt(() => {
|
|
1181
1181
|
let c = !1;
|
|
1182
1182
|
const b = new r(Z.origin, {
|
|
1183
1183
|
body: new ht(),
|
|
@@ -1187,10 +1187,10 @@ const Vt = (e) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return c && !b;
|
|
1190
|
-
}), u =
|
|
1190
|
+
}), u = o && l && mt(() => d.isReadableStream(new s("").body)), y = {
|
|
1191
1191
|
stream: u && ((c) => c.body)
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
|
|
1194
1194
|
!y[c] && (y[c] = (b, w) => {
|
|
1195
1195
|
let N = b && b[c];
|
|
1196
1196
|
if (N)
|
|
@@ -1222,7 +1222,7 @@ const Vt = (e) => {
|
|
|
1222
1222
|
method: w,
|
|
1223
1223
|
data: N,
|
|
1224
1224
|
signal: M,
|
|
1225
|
-
cancelToken:
|
|
1225
|
+
cancelToken: I,
|
|
1226
1226
|
timeout: T,
|
|
1227
1227
|
onDownloadProgress: F,
|
|
1228
1228
|
onUploadProgress: m,
|
|
@@ -1232,7 +1232,7 @@ const Vt = (e) => {
|
|
|
1232
1232
|
fetchOptions: q
|
|
1233
1233
|
} = Vt(c), z = t || fetch;
|
|
1234
1234
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1235
|
-
let X = vn([M,
|
|
1235
|
+
let X = vn([M, I && I.toAbortSignal()], T), H = null;
|
|
1236
1236
|
const R = X && X.unsubscribe && (() => {
|
|
1237
1237
|
X.unsubscribe();
|
|
1238
1238
|
});
|
|
@@ -1304,12 +1304,12 @@ const Vt = (e) => {
|
|
|
1304
1304
|
};
|
|
1305
1305
|
}, Rn = /* @__PURE__ */ new Map(), Yt = (e) => {
|
|
1306
1306
|
let t = e ? e.env : {};
|
|
1307
|
-
const { fetch: r, Request: s, Response:
|
|
1307
|
+
const { fetch: r, Request: s, Response: a } = t, i = [
|
|
1308
1308
|
s,
|
|
1309
|
-
|
|
1309
|
+
a,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let
|
|
1312
|
+
let o = i.length, l = o, f, p, u = Rn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
1314
|
f = i[l], p = u.get(f), p === void 0 && u.set(f, p = l ? /* @__PURE__ */ new Map() : Cn(t)), u = p;
|
|
1315
1315
|
return p;
|
|
@@ -1331,34 +1331,34 @@ d.forEach(Je, (e, t) => {
|
|
|
1331
1331
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1332
1332
|
}
|
|
1333
1333
|
});
|
|
1334
|
-
const yt = (e) => `- ${e}`,
|
|
1334
|
+
const yt = (e) => `- ${e}`, In = (e) => d.isFunction(e) || e === null || e === !1, Kt = {
|
|
1335
1335
|
getAdapter: (e, t) => {
|
|
1336
1336
|
e = d.isArray(e) ? e : [e];
|
|
1337
1337
|
const { length: r } = e;
|
|
1338
|
-
let s,
|
|
1338
|
+
let s, a;
|
|
1339
1339
|
const i = {};
|
|
1340
|
-
for (let
|
|
1341
|
-
s = e[
|
|
1340
|
+
for (let o = 0; o < r; o++) {
|
|
1341
|
+
s = e[o];
|
|
1342
1342
|
let l;
|
|
1343
|
-
if (
|
|
1343
|
+
if (a = s, !In(s) && (a = Je[(l = String(s)).toLowerCase()], a === void 0))
|
|
1344
1344
|
throw new U(`Unknown adapter '${l}'`);
|
|
1345
|
-
if (
|
|
1345
|
+
if (a && (d.isFunction(a) || (a = a.get(t))))
|
|
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
|
([f, p]) => `adapter ${f} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1352
1352
|
);
|
|
1353
|
-
let l = r ?
|
|
1354
|
-
` +
|
|
1355
|
-
`) : " " + yt(
|
|
1353
|
+
let l = r ? o.length > 1 ? `since :
|
|
1354
|
+
` + o.map(yt).join(`
|
|
1355
|
+
`) : " " + yt(o[0]) : "as no adapter specified";
|
|
1356
1356
|
throw new U(
|
|
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: Je
|
|
1364
1364
|
};
|
|
@@ -1392,35 +1392,35 @@ const Jt = "1.12.2", Le = {};
|
|
|
1392
1392
|
});
|
|
1393
1393
|
const wt = {};
|
|
1394
1394
|
Le.transitional = function(t, r, s) {
|
|
1395
|
-
function
|
|
1396
|
-
return "[Axios v" + Jt + "] Transitional option '" + i + "'" +
|
|
1395
|
+
function a(i, o) {
|
|
1396
|
+
return "[Axios v" + Jt + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1397
1397
|
}
|
|
1398
|
-
return (i,
|
|
1398
|
+
return (i, o, l) => {
|
|
1399
1399
|
if (t === !1)
|
|
1400
1400
|
throw new U(
|
|
1401
|
-
o
|
|
1401
|
+
a(o, " has been removed" + (r ? " in " + r : "")),
|
|
1402
1402
|
U.ERR_DEPRECATED
|
|
1403
1403
|
);
|
|
1404
|
-
return r && !wt[
|
|
1405
|
-
|
|
1406
|
-
|
|
1404
|
+
return r && !wt[o] && (wt[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
|
-
)), t ? t(i,
|
|
1409
|
+
)), t ? t(i, o, l) : !0;
|
|
1410
1410
|
};
|
|
1411
1411
|
};
|
|
1412
1412
|
Le.spelling = function(t) {
|
|
1413
1413
|
return (r, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1414
1414
|
};
|
|
1415
|
-
function
|
|
1415
|
+
function Pn(e, t, r) {
|
|
1416
1416
|
if (typeof e != "object")
|
|
1417
1417
|
throw new U("options must be an object", U.ERR_BAD_OPTION_VALUE);
|
|
1418
1418
|
const s = Object.keys(e);
|
|
1419
|
-
let
|
|
1420
|
-
for (;
|
|
1421
|
-
const i = s[
|
|
1422
|
-
if (
|
|
1423
|
-
const l = e[i], f = l === void 0 ||
|
|
1419
|
+
let a = s.length;
|
|
1420
|
+
for (; a-- > 0; ) {
|
|
1421
|
+
const i = s[a], o = t[i];
|
|
1422
|
+
if (o) {
|
|
1423
|
+
const l = e[i], f = l === void 0 || o(l, i, e);
|
|
1424
1424
|
if (f !== !0)
|
|
1425
1425
|
throw new U("option " + i + " must be " + f, U.ERR_BAD_OPTION_VALUE);
|
|
1426
1426
|
continue;
|
|
@@ -1430,7 +1430,7 @@ function In(e, t, r) {
|
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const Ae = {
|
|
1433
|
-
assertOptions:
|
|
1433
|
+
assertOptions: Pn,
|
|
1434
1434
|
validators: Le
|
|
1435
1435
|
}, ne = Ae.validators;
|
|
1436
1436
|
let ce = class {
|
|
@@ -1453,9 +1453,9 @@ let ce = class {
|
|
|
1453
1453
|
return await this._request(t, 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,21 +1467,21 @@ let ce = class {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
_request(t, r) {
|
|
1469
1469
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = ue(this.defaults, r);
|
|
1470
|
-
const { transitional: s, paramsSerializer:
|
|
1470
|
+
const { transitional: s, paramsSerializer: a, headers: i } = r;
|
|
1471
1471
|
s !== void 0 && Ae.assertOptions(s, {
|
|
1472
1472
|
silentJSONParsing: ne.transitional(ne.boolean),
|
|
1473
1473
|
forcedJSONParsing: ne.transitional(ne.boolean),
|
|
1474
1474
|
clarifyTimeoutError: ne.transitional(ne.boolean)
|
|
1475
|
-
}, !1),
|
|
1476
|
-
serialize:
|
|
1477
|
-
} : Ae.assertOptions(
|
|
1475
|
+
}, !1), a != null && (d.isFunction(a) ? r.paramsSerializer = {
|
|
1476
|
+
serialize: a
|
|
1477
|
+
} : Ae.assertOptions(a, {
|
|
1478
1478
|
encode: ne.function,
|
|
1479
1479
|
serialize: ne.function
|
|
1480
1480
|
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Ae.assertOptions(r, {
|
|
1481
1481
|
baseUrl: ne.spelling("baseURL"),
|
|
1482
1482
|
withXsrfToken: ne.spelling("withXSRFToken")
|
|
1483
1483
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1484
|
-
let
|
|
1484
|
+
let o = i && d.merge(
|
|
1485
1485
|
i.common,
|
|
1486
1486
|
i[r.method]
|
|
1487
1487
|
);
|
|
@@ -1490,7 +1490,7 @@ let ce = class {
|
|
|
1490
1490
|
(c) => {
|
|
1491
1491
|
delete i[c];
|
|
1492
1492
|
}
|
|
1493
|
-
), r.headers = te.concat(
|
|
1493
|
+
), r.headers = te.concat(o, i);
|
|
1494
1494
|
const l = [];
|
|
1495
1495
|
let f = !0;
|
|
1496
1496
|
this.interceptors.request.forEach(function(b) {
|
|
@@ -1544,14 +1544,14 @@ d.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1544
1544
|
});
|
|
1545
1545
|
d.forEach(["post", "put", "patch"], function(t) {
|
|
1546
1546
|
function r(s) {
|
|
1547
|
-
return function(i,
|
|
1547
|
+
return function(i, o, l) {
|
|
1548
1548
|
return this.request(ue(l || {}, {
|
|
1549
1549
|
method: t,
|
|
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
|
}
|
|
@@ -1566,22 +1566,22 @@ let On = class Xt {
|
|
|
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
|
-
}, t(function(i,
|
|
1584
|
-
s.reason || (s.reason = new me(i,
|
|
1582
|
+
}, o;
|
|
1583
|
+
}, t(function(i, o, l) {
|
|
1584
|
+
s.reason || (s.reason = new me(i, o, l), r(s.reason));
|
|
1585
1585
|
});
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
@@ -1623,8 +1623,8 @@ let On = class Xt {
|
|
|
1623
1623
|
static source() {
|
|
1624
1624
|
let t;
|
|
1625
1625
|
return {
|
|
1626
|
-
token: new Xt(function(
|
|
1627
|
-
t =
|
|
1626
|
+
token: new Xt(function(a) {
|
|
1627
|
+
t = a;
|
|
1628
1628
|
}),
|
|
1629
1629
|
cancel: t
|
|
1630
1630
|
};
|
|
@@ -1708,8 +1708,8 @@ Object.entries(Xe).forEach(([e, t]) => {
|
|
|
1708
1708
|
});
|
|
1709
1709
|
function Gt(e) {
|
|
1710
1710
|
const t = new ce(e), r = Rt(ce.prototype.request, t);
|
|
1711
|
-
return d.extend(r, ce.prototype, t, { allOwnKeys: !0 }), d.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(
|
|
1712
|
-
return Gt(ue(e,
|
|
1711
|
+
return d.extend(r, ce.prototype, t, { allOwnKeys: !0 }), d.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1712
|
+
return Gt(ue(e, a));
|
|
1713
1713
|
}, r;
|
|
1714
1714
|
}
|
|
1715
1715
|
const W = Gt(Te);
|
|
@@ -1750,7 +1750,7 @@ const {
|
|
|
1750
1750
|
getAdapter: Zs,
|
|
1751
1751
|
mergeConfig: Qs
|
|
1752
1752
|
} = W;
|
|
1753
|
-
class
|
|
1753
|
+
class ea {
|
|
1754
1754
|
baseUrl;
|
|
1755
1755
|
apiKey;
|
|
1756
1756
|
appId;
|
|
@@ -1779,7 +1779,7 @@ class eo {
|
|
|
1779
1779
|
* @param data optional request body
|
|
1780
1780
|
* @param extraHeaders optional headers
|
|
1781
1781
|
*/
|
|
1782
|
-
async request(t, r, s,
|
|
1782
|
+
async request(t, r, s, a = {}) {
|
|
1783
1783
|
if (!t) throw new Error("HTTP method is required");
|
|
1784
1784
|
if (!r) throw new Error("Request path is required");
|
|
1785
1785
|
try {
|
|
@@ -1791,14 +1791,14 @@ class eo {
|
|
|
1791
1791
|
url: r,
|
|
1792
1792
|
method: t,
|
|
1793
1793
|
data: i,
|
|
1794
|
-
headers:
|
|
1794
|
+
headers: a
|
|
1795
1795
|
})).data;
|
|
1796
1796
|
} catch (i) {
|
|
1797
1797
|
if (i.isAxiosError && !i.response)
|
|
1798
1798
|
throw new Error(`Network error: ${i.message}`);
|
|
1799
1799
|
if (i.response) {
|
|
1800
|
-
const
|
|
1801
|
-
throw new Error(`API Error (${
|
|
1800
|
+
const o = i.response.status, l = i.response.data?.message || i.response.statusText;
|
|
1801
|
+
throw new Error(`API Error (${o}): ${l}`);
|
|
1802
1802
|
}
|
|
1803
1803
|
throw new Error(
|
|
1804
1804
|
i.message || "Unknown error occurred during API request"
|
|
@@ -1811,8 +1811,8 @@ class eo {
|
|
|
1811
1811
|
* @param params user details
|
|
1812
1812
|
*/
|
|
1813
1813
|
async signup(t) {
|
|
1814
|
-
const { name: r, email: s, password:
|
|
1815
|
-
if (!r || !s || !
|
|
1814
|
+
const { name: r, email: s, password: a } = t;
|
|
1815
|
+
if (!r || !s || !a)
|
|
1816
1816
|
throw new Error("signup: 'name', 'email', and 'password' are required");
|
|
1817
1817
|
return this.request("POST", "/users/signup", t);
|
|
1818
1818
|
}
|
|
@@ -1821,13 +1821,13 @@ class eo {
|
|
|
1821
1821
|
* @param params login details
|
|
1822
1822
|
*/
|
|
1823
1823
|
async login(t) {
|
|
1824
|
-
const { email: r, password: s, appId:
|
|
1824
|
+
const { email: r, password: s, appId: a } = t;
|
|
1825
1825
|
if (!r || !s)
|
|
1826
1826
|
throw new Error("login: 'email' and 'password' are required");
|
|
1827
1827
|
return this.request("POST", "/users/login", {
|
|
1828
1828
|
email: r,
|
|
1829
1829
|
password: s,
|
|
1830
|
-
appId:
|
|
1830
|
+
appId: a || this.appId
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
1833
|
/**
|
|
@@ -1847,15 +1847,15 @@ class eo {
|
|
|
1847
1847
|
* @param params requires userId, currentPassword, newPassword
|
|
1848
1848
|
*/
|
|
1849
1849
|
async changePassword(t) {
|
|
1850
|
-
const { userId: r, currentPassword: s, newPassword:
|
|
1850
|
+
const { userId: r, currentPassword: s, newPassword: a, appId: i } = t;
|
|
1851
1851
|
if (!r) throw new Error("changePassword: 'userId' is required");
|
|
1852
|
-
if (!s || !
|
|
1852
|
+
if (!s || !a)
|
|
1853
1853
|
throw new Error(
|
|
1854
1854
|
"changePassword: both 'currentPassword' and 'newPassword' are required"
|
|
1855
1855
|
);
|
|
1856
1856
|
return this.request("PUT", `/users/change-password/${r}`, {
|
|
1857
1857
|
currentPassword: s,
|
|
1858
|
-
newPassword:
|
|
1858
|
+
newPassword: a,
|
|
1859
1859
|
appId: i || this.appId
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
@@ -1904,13 +1904,13 @@ class eo {
|
|
|
1904
1904
|
* @param params requires token + otp
|
|
1905
1905
|
*/
|
|
1906
1906
|
async verifyEmail(t) {
|
|
1907
|
-
const { token: r, otp: s, appId:
|
|
1907
|
+
const { token: r, otp: s, appId: a } = t;
|
|
1908
1908
|
if (!r) throw new Error("verifyEmail: 'token' is required");
|
|
1909
1909
|
if (!s) throw new Error("verifyEmail: 'otp' is required");
|
|
1910
1910
|
return this.request(
|
|
1911
1911
|
"POST",
|
|
1912
1912
|
"/users/verify-email",
|
|
1913
|
-
{ otp: s, appId:
|
|
1913
|
+
{ otp: s, appId: a || this.appId },
|
|
1914
1914
|
{ Authorization: `Bearer ${r}` }
|
|
1915
1915
|
);
|
|
1916
1916
|
}
|
|
@@ -1931,15 +1931,15 @@ class eo {
|
|
|
1931
1931
|
* @param params requires email, otp, newPassword
|
|
1932
1932
|
*/
|
|
1933
1933
|
async resetPassword(t) {
|
|
1934
|
-
const { email: r, otp: s, newPassword:
|
|
1935
|
-
if (!r || !s || !
|
|
1934
|
+
const { email: r, otp: s, newPassword: a, appId: i } = t;
|
|
1935
|
+
if (!r || !s || !a)
|
|
1936
1936
|
throw new Error(
|
|
1937
1937
|
"resetPassword: 'email', 'otp' and 'newPassword' are required"
|
|
1938
1938
|
);
|
|
1939
1939
|
return this.request("POST", "/users/reset-password", {
|
|
1940
1940
|
email: r,
|
|
1941
1941
|
otp: s,
|
|
1942
|
-
newPassword:
|
|
1942
|
+
newPassword: a,
|
|
1943
1943
|
appId: i || this.appId
|
|
1944
1944
|
});
|
|
1945
1945
|
}
|
|
@@ -1978,11 +1978,11 @@ class eo {
|
|
|
1978
1978
|
* @param params requires userId, dataId, and updated fields
|
|
1979
1979
|
*/
|
|
1980
1980
|
async updateUserData(t) {
|
|
1981
|
-
const { userId: r, dataId: s, data:
|
|
1981
|
+
const { userId: r, dataId: s, data: a } = t;
|
|
1982
1982
|
if (!r || !s)
|
|
1983
1983
|
throw new Error("updateUserData: 'userId' and 'dataId' are required");
|
|
1984
|
-
if (!
|
|
1985
|
-
return this.request("PUT", `/users/${r}/data/${s}`,
|
|
1984
|
+
if (!a) throw new Error("updateUserData: 'data' is required");
|
|
1985
|
+
return this.request("PUT", `/users/${r}/data/${s}`, a);
|
|
1986
1986
|
}
|
|
1987
1987
|
/**
|
|
1988
1988
|
* Delete a data object by its id
|
|
@@ -1995,7 +1995,7 @@ class eo {
|
|
|
1995
1995
|
return this.request("DELETE", `/users/${r}/data/${s}`);
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
|
-
var
|
|
1998
|
+
var Ie = { exports: {} }, je = {};
|
|
1999
1999
|
/**
|
|
2000
2000
|
* @license React
|
|
2001
2001
|
* react-jsx-runtime.production.js
|
|
@@ -2010,18 +2010,18 @@ function _n() {
|
|
|
2010
2010
|
if (jt) return je;
|
|
2011
2011
|
jt = 1;
|
|
2012
2012
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
2013
|
-
function r(s,
|
|
2014
|
-
var
|
|
2015
|
-
if (i !== void 0 && (
|
|
2013
|
+
function r(s, a, i) {
|
|
2014
|
+
var o = null;
|
|
2015
|
+
if (i !== void 0 && (o = "" + i), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
2016
2016
|
i = {};
|
|
2017
|
-
for (var l in
|
|
2018
|
-
l !== "key" && (i[l] =
|
|
2019
|
-
} else i =
|
|
2020
|
-
return
|
|
2017
|
+
for (var l in a)
|
|
2018
|
+
l !== "key" && (i[l] = a[l]);
|
|
2019
|
+
} else i = a;
|
|
2020
|
+
return a = i.ref, {
|
|
2021
2021
|
$$typeof: e,
|
|
2022
2022
|
type: s,
|
|
2023
|
-
key:
|
|
2024
|
-
ref:
|
|
2023
|
+
key: o,
|
|
2024
|
+
ref: a !== void 0 ? a : null,
|
|
2025
2025
|
props: i
|
|
2026
2026
|
};
|
|
2027
2027
|
}
|
|
@@ -2065,7 +2065,7 @@ function Nn() {
|
|
|
2065
2065
|
), x.$$typeof) {
|
|
2066
2066
|
case c:
|
|
2067
2067
|
return "Portal";
|
|
2068
|
-
case
|
|
2068
|
+
case I:
|
|
2069
2069
|
return (x.displayName || "Context") + ".Provider";
|
|
2070
2070
|
case M:
|
|
2071
2071
|
return (x._context.displayName || "Context") + ".Consumer";
|
|
@@ -2114,14 +2114,14 @@ function Nn() {
|
|
|
2114
2114
|
return "<...>";
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2117
|
+
function a() {
|
|
2118
2118
|
var x = z.A;
|
|
2119
2119
|
return x === null ? null : x.getOwner();
|
|
2120
2120
|
}
|
|
2121
2121
|
function i() {
|
|
2122
2122
|
return Error("react-stack-top-frame");
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2124
|
+
function o(x) {
|
|
2125
2125
|
if (X.call(x, "key")) {
|
|
2126
2126
|
var C = Object.getOwnPropertyDescriptor(x, "key").get;
|
|
2127
2127
|
if (C && C.isReactWarning) return !1;
|
|
@@ -2179,24 +2179,24 @@ function Nn() {
|
|
|
2179
2179
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
2180
2180
|
}
|
|
2181
2181
|
function u(x, C, D, L, h, g, G, v) {
|
|
2182
|
-
var
|
|
2183
|
-
if (
|
|
2182
|
+
var P = C.children;
|
|
2183
|
+
if (P !== void 0)
|
|
2184
2184
|
if (L)
|
|
2185
|
-
if (H(
|
|
2186
|
-
for (L = 0; L <
|
|
2187
|
-
y(
|
|
2188
|
-
Object.freeze && Object.freeze(
|
|
2185
|
+
if (H(P)) {
|
|
2186
|
+
for (L = 0; L < P.length; L++)
|
|
2187
|
+
y(P[L]);
|
|
2188
|
+
Object.freeze && Object.freeze(P);
|
|
2189
2189
|
} else
|
|
2190
2190
|
console.error(
|
|
2191
2191
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2192
2192
|
);
|
|
2193
|
-
else y(
|
|
2193
|
+
else y(P);
|
|
2194
2194
|
if (X.call(C, "key")) {
|
|
2195
|
-
|
|
2195
|
+
P = e(x);
|
|
2196
2196
|
var V = Object.keys(C).filter(function(ie) {
|
|
2197
2197
|
return ie !== "key";
|
|
2198
2198
|
});
|
|
2199
|
-
L = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Y[
|
|
2199
|
+
L = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Y[P + L] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2200
2200
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2201
2201
|
let props = %s;
|
|
2202
2202
|
<%s {...props} />
|
|
@@ -2204,25 +2204,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2204
2204
|
let props = %s;
|
|
2205
2205
|
<%s key={someKey} {...props} />`,
|
|
2206
2206
|
L,
|
|
2207
|
-
|
|
2207
|
+
P,
|
|
2208
2208
|
V,
|
|
2209
|
-
|
|
2210
|
-
), Y[
|
|
2209
|
+
P
|
|
2210
|
+
), Y[P + L] = !0);
|
|
2211
2211
|
}
|
|
2212
|
-
if (
|
|
2212
|
+
if (P = null, D !== void 0 && (r(D), P = "" + D), o(C) && (r(C.key), P = "" + C.key), "key" in C) {
|
|
2213
2213
|
D = {};
|
|
2214
2214
|
for (var Q in C)
|
|
2215
2215
|
Q !== "key" && (D[Q] = C[Q]);
|
|
2216
2216
|
} else D = C;
|
|
2217
|
-
return
|
|
2217
|
+
return P && l(
|
|
2218
2218
|
D,
|
|
2219
2219
|
typeof x == "function" ? x.displayName || x.name || "Unknown" : x
|
|
2220
2220
|
), p(
|
|
2221
2221
|
x,
|
|
2222
|
-
|
|
2222
|
+
P,
|
|
2223
2223
|
g,
|
|
2224
2224
|
h,
|
|
2225
|
-
|
|
2225
|
+
a(),
|
|
2226
2226
|
D,
|
|
2227
2227
|
G,
|
|
2228
2228
|
v
|
|
@@ -2231,7 +2231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2231
2231
|
function y(x) {
|
|
2232
2232
|
typeof x == "object" && x !== null && x.$$typeof === k && x._store && (x._store.validated = 1);
|
|
2233
2233
|
}
|
|
2234
|
-
var E = Tt, k = Symbol.for("react.transitional.element"), c = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"),
|
|
2234
|
+
var E = Tt, k = Symbol.for("react.transitional.element"), c = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), I = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), F = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), q = Symbol.for("react.client.reference"), z = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, H = Array.isArray, R = console.createTask ? console.createTask : function() {
|
|
2235
2235
|
return null;
|
|
2236
2236
|
};
|
|
2237
2237
|
E = {
|
|
@@ -2272,14 +2272,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2272
2272
|
}
|
|
2273
2273
|
var St;
|
|
2274
2274
|
function $n() {
|
|
2275
|
-
return St || (St = 1, process.env.NODE_ENV === "production" ?
|
|
2275
|
+
return St || (St = 1, process.env.NODE_ENV === "production" ? Ie.exports = _n() : Ie.exports = Nn()), Ie.exports;
|
|
2276
2276
|
}
|
|
2277
2277
|
var n = $n();
|
|
2278
2278
|
const Un = async (e, t) => {
|
|
2279
|
-
const { name: r, email: s, password:
|
|
2279
|
+
const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: f, isActive: p = !0, role: u = "user" } = e, { baseUrl: y, apiKey: E } = t;
|
|
2280
2280
|
if (!E)
|
|
2281
2281
|
throw new Error("API key is required for signup");
|
|
2282
|
-
if (!r || !s || !
|
|
2282
|
+
if (!r || !s || !a || !i)
|
|
2283
2283
|
throw new Error("Name, email, password, and appId are required");
|
|
2284
2284
|
try {
|
|
2285
2285
|
const k = await W.post(
|
|
@@ -2287,9 +2287,9 @@ const Un = async (e, t) => {
|
|
|
2287
2287
|
{
|
|
2288
2288
|
name: r,
|
|
2289
2289
|
email: s,
|
|
2290
|
-
password:
|
|
2290
|
+
password: a,
|
|
2291
2291
|
appId: i,
|
|
2292
|
-
phone:
|
|
2292
|
+
phone: o,
|
|
2293
2293
|
address: l,
|
|
2294
2294
|
avatarUrl: f,
|
|
2295
2295
|
isActive: p,
|
|
@@ -2376,9 +2376,9 @@ const Wn = Ct(
|
|
|
2376
2376
|
size: t = 24,
|
|
2377
2377
|
strokeWidth: r = 2,
|
|
2378
2378
|
absoluteStrokeWidth: s,
|
|
2379
|
-
className:
|
|
2379
|
+
className: a = "",
|
|
2380
2380
|
children: i,
|
|
2381
|
-
iconNode:
|
|
2381
|
+
iconNode: o,
|
|
2382
2382
|
...l
|
|
2383
2383
|
}, f) => He(
|
|
2384
2384
|
"svg",
|
|
@@ -2389,12 +2389,12 @@ const Wn = Ct(
|
|
|
2389
2389
|
height: t,
|
|
2390
2390
|
stroke: e,
|
|
2391
2391
|
strokeWidth: s ? Number(r) * 24 / Number(t) : r,
|
|
2392
|
-
className: Zt("lucide",
|
|
2392
|
+
className: Zt("lucide", a),
|
|
2393
2393
|
...!i && !Ln(l) && { "aria-hidden": "true" },
|
|
2394
2394
|
...l
|
|
2395
2395
|
},
|
|
2396
2396
|
[
|
|
2397
|
-
...
|
|
2397
|
+
...o.map(([p, u]) => He(p, u)),
|
|
2398
2398
|
...Array.isArray(i) ? i : [i]
|
|
2399
2399
|
]
|
|
2400
2400
|
)
|
|
@@ -2407,7 +2407,7 @@ const Wn = Ct(
|
|
|
2407
2407
|
*/
|
|
2408
2408
|
const B = (e, t) => {
|
|
2409
2409
|
const r = Ct(
|
|
2410
|
-
({ className: s, ...
|
|
2410
|
+
({ className: s, ...a }, i) => He(Wn, {
|
|
2411
2411
|
ref: i,
|
|
2412
2412
|
iconNode: t,
|
|
2413
2413
|
className: Zt(
|
|
@@ -2415,7 +2415,7 @@ const B = (e, t) => {
|
|
|
2415
2415
|
`lucide-${e}`,
|
|
2416
2416
|
s
|
|
2417
2417
|
),
|
|
2418
|
-
...
|
|
2418
|
+
...a
|
|
2419
2419
|
})
|
|
2420
2420
|
);
|
|
2421
2421
|
return r.displayName = kt(e), r;
|
|
@@ -2453,7 +2453,7 @@ const Vn = [
|
|
|
2453
2453
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
2454
2454
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
2455
2455
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
2456
|
-
],
|
|
2456
|
+
], ae = B("circle-alert", Vn);
|
|
2457
2457
|
/**
|
|
2458
2458
|
* @license lucide-react v0.544.0 - ISC
|
|
2459
2459
|
*
|
|
@@ -2580,14 +2580,14 @@ const rs = [
|
|
|
2580
2580
|
* This source code is licensed under the ISC license.
|
|
2581
2581
|
* See the LICENSE file in the root directory of this source tree.
|
|
2582
2582
|
*/
|
|
2583
|
-
const ss = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
|
|
2583
|
+
const ss = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], oe = B("loader-circle", ss);
|
|
2584
2584
|
/**
|
|
2585
2585
|
* @license lucide-react v0.544.0 - ISC
|
|
2586
2586
|
*
|
|
2587
2587
|
* This source code is licensed under the ISC license.
|
|
2588
2588
|
* See the LICENSE file in the root directory of this source tree.
|
|
2589
2589
|
*/
|
|
2590
|
-
const
|
|
2590
|
+
const as = [
|
|
2591
2591
|
["path", { d: "M12 2v4", key: "3427ic" }],
|
|
2592
2592
|
["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
|
|
2593
2593
|
["path", { d: "M18 12h4", key: "wj9ykh" }],
|
|
@@ -2596,7 +2596,7 @@ const os = [
|
|
|
2596
2596
|
["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
|
|
2597
2597
|
["path", { d: "M2 12h4", key: "j09sii" }],
|
|
2598
2598
|
["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
|
|
2599
|
-
],
|
|
2599
|
+
], os = B("loader", as);
|
|
2600
2600
|
/**
|
|
2601
2601
|
* @license lucide-react v0.544.0 - ISC
|
|
2602
2602
|
*
|
|
@@ -2804,18 +2804,18 @@ const Cs = [
|
|
|
2804
2804
|
baseUrl: "",
|
|
2805
2805
|
apiKey: "",
|
|
2806
2806
|
appId: ""
|
|
2807
|
-
},
|
|
2807
|
+
}, ta = (e) => {
|
|
2808
2808
|
if (!e.baseUrl || !e.apiKey || !e.appId)
|
|
2809
2809
|
throw new Error("baseUrl, apiKey, and appId are required");
|
|
2810
2810
|
_e.baseUrl = e.baseUrl, _e.apiKey = e.apiKey, _e.appId = e.appId;
|
|
2811
|
-
}, ye = () => _e,
|
|
2811
|
+
}, ye = () => _e, ra = ({
|
|
2812
2812
|
logoUrl: e,
|
|
2813
2813
|
title: t = "Create Your Account",
|
|
2814
2814
|
subtitle: r = "Join our platform today",
|
|
2815
2815
|
footerText: s = "Secure authentication powered by Neuctra Authix",
|
|
2816
|
-
primaryColor:
|
|
2816
|
+
primaryColor: a = "#00C214",
|
|
2817
2817
|
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
2818
|
-
darkMode:
|
|
2818
|
+
darkMode: o = !0,
|
|
2819
2819
|
// Only avatar is optional
|
|
2820
2820
|
showAvatar: l = !1,
|
|
2821
2821
|
loginUrl: f,
|
|
@@ -2827,7 +2827,7 @@ const Cs = [
|
|
|
2827
2827
|
email: "",
|
|
2828
2828
|
password: "",
|
|
2829
2829
|
...l && { avatarUrl: "" }
|
|
2830
|
-
}, [b, w] = A(c), [N, M] = A(!1), [
|
|
2830
|
+
}, [b, w] = A(c), [N, M] = A(!1), [I, T] = A(!1), [F, m] = A(null), [_, S] = A({}), $ = typeof window < "u" ? window.innerWidth < 768 : !1, q = o ? "#ffffff" : "#111827", z = o ? "#a1a1aa" : "#6b7280", X = o ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", H = o ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", R = (j) => {
|
|
2831
2831
|
const { name: Y, value: x } = j.target;
|
|
2832
2832
|
w((C) => ({ ...C, [Y]: x })), _[Y] && S((C) => ({ ...C, [Y]: void 0 }));
|
|
2833
2833
|
}, K = () => {
|
|
@@ -2881,7 +2881,7 @@ const Cs = [
|
|
|
2881
2881
|
flexDirection: "column",
|
|
2882
2882
|
borderRadius: "10px",
|
|
2883
2883
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
2884
|
-
backgroundColor:
|
|
2884
|
+
backgroundColor: o ? "#000000" : "#ffffff",
|
|
2885
2885
|
padding: $ ? "30px 24px" : "32px 28px"
|
|
2886
2886
|
},
|
|
2887
2887
|
children: [
|
|
@@ -2906,7 +2906,7 @@ const Cs = [
|
|
|
2906
2906
|
he,
|
|
2907
2907
|
{
|
|
2908
2908
|
size: 40,
|
|
2909
|
-
color:
|
|
2909
|
+
color: a,
|
|
2910
2910
|
style: { marginBottom: "10px" }
|
|
2911
2911
|
}
|
|
2912
2912
|
),
|
|
@@ -2954,7 +2954,7 @@ const Cs = [
|
|
|
2954
2954
|
height: "60px",
|
|
2955
2955
|
borderRadius: "50%",
|
|
2956
2956
|
objectFit: "cover",
|
|
2957
|
-
border: `2px solid ${
|
|
2957
|
+
border: `2px solid ${a}30`
|
|
2958
2958
|
},
|
|
2959
2959
|
onError: (j) => {
|
|
2960
2960
|
const Y = j.target;
|
|
@@ -3215,7 +3215,7 @@ const Cs = [
|
|
|
3215
3215
|
{
|
|
3216
3216
|
href: f,
|
|
3217
3217
|
style: {
|
|
3218
|
-
color:
|
|
3218
|
+
color: a,
|
|
3219
3219
|
textDecoration: "none",
|
|
3220
3220
|
fontWeight: 500
|
|
3221
3221
|
},
|
|
@@ -3234,12 +3234,12 @@ const Cs = [
|
|
|
3234
3234
|
display: "flex",
|
|
3235
3235
|
alignItems: "start",
|
|
3236
3236
|
gap: "10px",
|
|
3237
|
-
backgroundColor: F.type === "success" ? `${
|
|
3238
|
-
border: F.type === "success" ? `1px solid ${
|
|
3239
|
-
color: F.type === "success" ?
|
|
3237
|
+
backgroundColor: F.type === "success" ? `${a}15` : "rgba(239,68,68,0.1)",
|
|
3238
|
+
border: F.type === "success" ? `1px solid ${a}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3239
|
+
color: F.type === "success" ? a : "#ef4444"
|
|
3240
3240
|
},
|
|
3241
3241
|
children: [
|
|
3242
|
-
F.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(
|
|
3242
|
+
F.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(ae, { size: 20 }),
|
|
3243
3243
|
/* @__PURE__ */ n.jsx("span", { children: F.text })
|
|
3244
3244
|
]
|
|
3245
3245
|
}
|
|
@@ -3248,7 +3248,7 @@ const Cs = [
|
|
|
3248
3248
|
"button",
|
|
3249
3249
|
{
|
|
3250
3250
|
type: "submit",
|
|
3251
|
-
disabled:
|
|
3251
|
+
disabled: I,
|
|
3252
3252
|
style: {
|
|
3253
3253
|
padding: "12px",
|
|
3254
3254
|
background: i,
|
|
@@ -3256,17 +3256,17 @@ const Cs = [
|
|
|
3256
3256
|
border: "none",
|
|
3257
3257
|
borderRadius: "10px",
|
|
3258
3258
|
fontWeight: 600,
|
|
3259
|
-
cursor:
|
|
3260
|
-
opacity:
|
|
3259
|
+
cursor: I ? "not-allowed" : "pointer",
|
|
3260
|
+
opacity: I ? 0.7 : 1,
|
|
3261
3261
|
marginTop: "8px",
|
|
3262
3262
|
display: "flex",
|
|
3263
3263
|
alignItems: "center",
|
|
3264
3264
|
justifyContent: "center",
|
|
3265
3265
|
gap: "8px"
|
|
3266
3266
|
},
|
|
3267
|
-
children:
|
|
3267
|
+
children: I ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3268
3268
|
/* @__PURE__ */ n.jsx(
|
|
3269
|
-
|
|
3269
|
+
os,
|
|
3270
3270
|
{
|
|
3271
3271
|
size: 18,
|
|
3272
3272
|
style: { animation: "spin 1s linear infinite" }
|
|
@@ -3292,7 +3292,7 @@ const Cs = [
|
|
|
3292
3292
|
children: [
|
|
3293
3293
|
"Secure authentication powered by",
|
|
3294
3294
|
" ",
|
|
3295
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
3295
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: a, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3296
3296
|
]
|
|
3297
3297
|
}
|
|
3298
3298
|
)
|
|
@@ -3309,17 +3309,17 @@ const Cs = [
|
|
|
3309
3309
|
}
|
|
3310
3310
|
);
|
|
3311
3311
|
}, Rs = async (e, t) => {
|
|
3312
|
-
const { email: r, password: s, appId:
|
|
3313
|
-
if (!
|
|
3312
|
+
const { email: r, password: s, appId: a } = e, { baseUrl: i, apiKey: o } = t;
|
|
3313
|
+
if (!o)
|
|
3314
3314
|
throw new Error("API key is required for login");
|
|
3315
3315
|
try {
|
|
3316
3316
|
const l = await W.post(
|
|
3317
3317
|
`${i}/users/login`,
|
|
3318
|
-
{ email: r, password: s, appId:
|
|
3318
|
+
{ email: r, password: s, appId: a },
|
|
3319
3319
|
{
|
|
3320
3320
|
headers: {
|
|
3321
3321
|
"Content-Type": "application/json",
|
|
3322
|
-
"x-api-key":
|
|
3322
|
+
"x-api-key": o
|
|
3323
3323
|
}
|
|
3324
3324
|
}
|
|
3325
3325
|
);
|
|
@@ -3332,24 +3332,24 @@ const Cs = [
|
|
|
3332
3332
|
status: l.response?.status || 500
|
|
3333
3333
|
};
|
|
3334
3334
|
}
|
|
3335
|
-
},
|
|
3335
|
+
}, na = ({
|
|
3336
3336
|
logoUrl: e,
|
|
3337
3337
|
title: t = "Sign In to Your Account",
|
|
3338
3338
|
subtitle: r = "Welcome back! Please enter your details",
|
|
3339
3339
|
footerText: s = "Secure authentication powered by Neuctra Authix",
|
|
3340
|
-
primaryColor:
|
|
3340
|
+
primaryColor: a = "#00C214",
|
|
3341
3341
|
gradient: i = "linear-gradient(135deg, #22c55e, #00C214)",
|
|
3342
|
-
darkMode:
|
|
3342
|
+
darkMode: o = !0,
|
|
3343
3343
|
signupUrl: l,
|
|
3344
3344
|
onSuccess: f,
|
|
3345
3345
|
onError: p
|
|
3346
3346
|
}) => {
|
|
3347
|
-
const { baseUrl: u, apiKey: y, appId: E } = ye(), [k, c] = A("login"), [b, w] = A(1), [N, M] = A(!1), [
|
|
3347
|
+
const { baseUrl: u, apiKey: y, appId: E } = ye(), [k, c] = A("login"), [b, w] = A(1), [N, M] = A(!1), [I, T] = A(!1), [F, m] = A(null), [_, S] = A(""), [$, q] = A(""), [z, X] = A({
|
|
3348
3348
|
email: "",
|
|
3349
3349
|
otp: "",
|
|
3350
3350
|
newPassword: "",
|
|
3351
3351
|
appId: E
|
|
3352
|
-
}), H = window.innerWidth < 768, R =
|
|
3352
|
+
}), H = window.innerWidth < 768, R = o ? "#ffffff" : "#111827", K = o ? "#a1a1aa" : "#6b7280", J = o ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", O = o ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", j = async (L) => {
|
|
3353
3353
|
L.preventDefault(), T(!0), m(null);
|
|
3354
3354
|
try {
|
|
3355
3355
|
const h = await Rs(
|
|
@@ -3435,7 +3435,7 @@ const Cs = [
|
|
|
3435
3435
|
flexDirection: "column",
|
|
3436
3436
|
borderRadius: "10px",
|
|
3437
3437
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
3438
|
-
backgroundColor:
|
|
3438
|
+
backgroundColor: o ? "#000000" : "#ffffff",
|
|
3439
3439
|
padding: H ? "30px 24px" : "32px 28px"
|
|
3440
3440
|
},
|
|
3441
3441
|
children: [
|
|
@@ -3460,7 +3460,7 @@ const Cs = [
|
|
|
3460
3460
|
he,
|
|
3461
3461
|
{
|
|
3462
3462
|
size: 40,
|
|
3463
|
-
color:
|
|
3463
|
+
color: a,
|
|
3464
3464
|
style: { marginBottom: "10px" }
|
|
3465
3465
|
}
|
|
3466
3466
|
),
|
|
@@ -3508,7 +3508,7 @@ const Cs = [
|
|
|
3508
3508
|
style: {
|
|
3509
3509
|
fontSize: "14px",
|
|
3510
3510
|
fontWeight: 500,
|
|
3511
|
-
color:
|
|
3511
|
+
color: o ? "#ffffff" : "#000000"
|
|
3512
3512
|
},
|
|
3513
3513
|
children: "Email Address"
|
|
3514
3514
|
}
|
|
@@ -3554,7 +3554,7 @@ const Cs = [
|
|
|
3554
3554
|
style: {
|
|
3555
3555
|
fontSize: "14px",
|
|
3556
3556
|
fontWeight: 500,
|
|
3557
|
-
color:
|
|
3557
|
+
color: o ? "#ffffff" : "#000000"
|
|
3558
3558
|
},
|
|
3559
3559
|
children: "Password"
|
|
3560
3560
|
}
|
|
@@ -3621,7 +3621,7 @@ const Cs = [
|
|
|
3621
3621
|
{
|
|
3622
3622
|
href: l,
|
|
3623
3623
|
style: {
|
|
3624
|
-
color:
|
|
3624
|
+
color: a,
|
|
3625
3625
|
textDecoration: "none",
|
|
3626
3626
|
fontWeight: 500
|
|
3627
3627
|
},
|
|
@@ -3636,7 +3636,7 @@ const Cs = [
|
|
|
3636
3636
|
style: {
|
|
3637
3637
|
background: "none",
|
|
3638
3638
|
border: "none",
|
|
3639
|
-
color:
|
|
3639
|
+
color: a,
|
|
3640
3640
|
fontWeight: 500,
|
|
3641
3641
|
cursor: "pointer"
|
|
3642
3642
|
},
|
|
@@ -3650,7 +3650,7 @@ const Cs = [
|
|
|
3650
3650
|
"button",
|
|
3651
3651
|
{
|
|
3652
3652
|
type: "submit",
|
|
3653
|
-
disabled:
|
|
3653
|
+
disabled: I,
|
|
3654
3654
|
style: {
|
|
3655
3655
|
padding: "12px",
|
|
3656
3656
|
background: i,
|
|
@@ -3659,7 +3659,7 @@ const Cs = [
|
|
|
3659
3659
|
borderRadius: "10px",
|
|
3660
3660
|
fontWeight: 600
|
|
3661
3661
|
},
|
|
3662
|
-
children:
|
|
3662
|
+
children: I ? "Signing In..." : "Sign In"
|
|
3663
3663
|
}
|
|
3664
3664
|
)
|
|
3665
3665
|
]
|
|
@@ -3683,7 +3683,7 @@ const Cs = [
|
|
|
3683
3683
|
style: {
|
|
3684
3684
|
fontSize: "14px",
|
|
3685
3685
|
fontWeight: 500,
|
|
3686
|
-
color:
|
|
3686
|
+
color: o ? "#ffffff" : "#000000"
|
|
3687
3687
|
},
|
|
3688
3688
|
children: "Email Address"
|
|
3689
3689
|
}
|
|
@@ -3734,7 +3734,7 @@ const Cs = [
|
|
|
3734
3734
|
style: {
|
|
3735
3735
|
fontSize: "14px",
|
|
3736
3736
|
fontWeight: 500,
|
|
3737
|
-
color:
|
|
3737
|
+
color: o ? "#ffffff" : "#000000"
|
|
3738
3738
|
},
|
|
3739
3739
|
children: "One-Time Password (OTP)"
|
|
3740
3740
|
}
|
|
@@ -3785,7 +3785,7 @@ const Cs = [
|
|
|
3785
3785
|
style: {
|
|
3786
3786
|
fontSize: "14px",
|
|
3787
3787
|
fontWeight: 500,
|
|
3788
|
-
color:
|
|
3788
|
+
color: o ? "#ffffff" : "#000000"
|
|
3789
3789
|
},
|
|
3790
3790
|
children: "New Password"
|
|
3791
3791
|
}
|
|
@@ -3825,7 +3825,7 @@ const Cs = [
|
|
|
3825
3825
|
"button",
|
|
3826
3826
|
{
|
|
3827
3827
|
type: "submit",
|
|
3828
|
-
disabled:
|
|
3828
|
+
disabled: I,
|
|
3829
3829
|
style: {
|
|
3830
3830
|
padding: "12px",
|
|
3831
3831
|
background: i,
|
|
@@ -3835,7 +3835,7 @@ const Cs = [
|
|
|
3835
3835
|
borderRadius: "10px",
|
|
3836
3836
|
fontWeight: 600
|
|
3837
3837
|
},
|
|
3838
|
-
children:
|
|
3838
|
+
children: I ? "Please wait..." : b === 1 ? "Send Reset OTP" : "Reset Password"
|
|
3839
3839
|
}
|
|
3840
3840
|
),
|
|
3841
3841
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3869,12 +3869,12 @@ const Cs = [
|
|
|
3869
3869
|
display: "flex",
|
|
3870
3870
|
alignItems: "center",
|
|
3871
3871
|
gap: "10px",
|
|
3872
|
-
backgroundColor: F.type === "success" ? `${
|
|
3873
|
-
border: F.type === "success" ? `1px solid ${
|
|
3874
|
-
color: F.type === "success" ?
|
|
3872
|
+
backgroundColor: F.type === "success" ? `${a}15` : "rgba(239,68,68,0.1)",
|
|
3873
|
+
border: F.type === "success" ? `1px solid ${a}30` : "1px solid rgba(239,68,68,0.3)",
|
|
3874
|
+
color: F.type === "success" ? a : "#ef4444"
|
|
3875
3875
|
},
|
|
3876
3876
|
children: [
|
|
3877
|
-
F.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(
|
|
3877
|
+
F.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20 }) : /* @__PURE__ */ n.jsx(ae, { size: 20 }),
|
|
3878
3878
|
/* @__PURE__ */ n.jsx("span", { children: F.text })
|
|
3879
3879
|
]
|
|
3880
3880
|
}
|
|
@@ -3892,7 +3892,7 @@ const Cs = [
|
|
|
3892
3892
|
children: [
|
|
3893
3893
|
"Secure authentication powered by",
|
|
3894
3894
|
" ",
|
|
3895
|
-
/* @__PURE__ */ n.jsx("span", { style: { color:
|
|
3895
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: a, fontWeight: 600 }, children: "Neuctra Authix" })
|
|
3896
3896
|
]
|
|
3897
3897
|
}
|
|
3898
3898
|
)
|
|
@@ -3901,58 +3901,54 @@ const Cs = [
|
|
|
3901
3901
|
)
|
|
3902
3902
|
}
|
|
3903
3903
|
);
|
|
3904
|
-
},
|
|
3904
|
+
}, Is = () => {
|
|
3905
3905
|
try {
|
|
3906
3906
|
const e = localStorage.getItem("userInfo");
|
|
3907
|
-
return !!(e && e !== "undefined");
|
|
3907
|
+
return !!(e && e !== "undefined" && e !== "null");
|
|
3908
3908
|
} catch {
|
|
3909
3909
|
return !1;
|
|
3910
3910
|
}
|
|
3911
|
-
},
|
|
3912
|
-
children: e
|
|
3913
|
-
|
|
3914
|
-
|
|
3911
|
+
}, sa = ({
|
|
3912
|
+
children: e,
|
|
3913
|
+
fallback: t = null
|
|
3914
|
+
}) => Is() ? /* @__PURE__ */ n.jsx(
|
|
3915
|
+
"span",
|
|
3915
3916
|
{
|
|
3916
3917
|
style: {
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
borderRadius: "8px"
|
|
3918
|
+
display: "inline-flex",
|
|
3919
|
+
alignItems: "center",
|
|
3920
|
+
verticalAlign: "middle"
|
|
3921
3921
|
},
|
|
3922
|
-
children:
|
|
3923
|
-
/* @__PURE__ */ n.jsx("h2", { children: "Signed In Content" }),
|
|
3924
|
-
/* @__PURE__ */ n.jsx("p", { children: "This content only shows when user is signed in." })
|
|
3925
|
-
]
|
|
3922
|
+
children: e
|
|
3926
3923
|
}
|
|
3927
|
-
)
|
|
3924
|
+
) : /* @__PURE__ */ n.jsx(n.Fragment, { children: t }), Ps = () => {
|
|
3928
3925
|
try {
|
|
3929
3926
|
const e = localStorage.getItem("userInfo");
|
|
3930
|
-
return !!(e && e !== "undefined");
|
|
3927
|
+
return !!(e && e !== "undefined" && e !== "null");
|
|
3931
3928
|
} catch {
|
|
3932
3929
|
return !1;
|
|
3933
3930
|
}
|
|
3934
|
-
},
|
|
3935
|
-
|
|
3931
|
+
}, aa = ({
|
|
3932
|
+
children: e,
|
|
3933
|
+
fallback: t = null
|
|
3934
|
+
}) => Ps() ? null : /* @__PURE__ */ n.jsx(
|
|
3935
|
+
"span",
|
|
3936
3936
|
{
|
|
3937
3937
|
style: {
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
borderRadius: "8px"
|
|
3938
|
+
display: "inline-flex",
|
|
3939
|
+
alignItems: "center",
|
|
3940
|
+
verticalAlign: "middle"
|
|
3942
3941
|
},
|
|
3943
|
-
children:
|
|
3944
|
-
/* @__PURE__ */ n.jsx("h2", { children: "Signed Out Content" }),
|
|
3945
|
-
/* @__PURE__ */ n.jsx("p", { children: "This content only shows when user is signed out." })
|
|
3946
|
-
]
|
|
3942
|
+
children: e ?? t
|
|
3947
3943
|
}
|
|
3948
|
-
)
|
|
3944
|
+
), Os = ({
|
|
3949
3945
|
isOpen: e,
|
|
3950
3946
|
onClose: t,
|
|
3951
3947
|
onSuccess: r,
|
|
3952
3948
|
onError: s,
|
|
3953
|
-
userId:
|
|
3949
|
+
userId: a,
|
|
3954
3950
|
token: i,
|
|
3955
|
-
colors:
|
|
3951
|
+
colors: o
|
|
3956
3952
|
}) => {
|
|
3957
3953
|
const { baseUrl: l, apiKey: f, appId: p } = ye(), [u, y] = A(!1), [E, k] = A(""), [c, b] = A("warning"), [w, N] = A(!1);
|
|
3958
3954
|
if (se(() => {
|
|
@@ -3964,7 +3960,7 @@ const Cs = [
|
|
|
3964
3960
|
const M = async () => {
|
|
3965
3961
|
y(!0), b("processing");
|
|
3966
3962
|
try {
|
|
3967
|
-
const { data: m } = await W.delete(`${l}/users/delete/${
|
|
3963
|
+
const { data: m } = await W.delete(`${l}/users/delete/${a}`, {
|
|
3968
3964
|
data: { appId: p },
|
|
3969
3965
|
headers: {
|
|
3970
3966
|
"x-api-key": f
|
|
@@ -3978,7 +3974,7 @@ const Cs = [
|
|
|
3978
3974
|
} finally {
|
|
3979
3975
|
y(!1);
|
|
3980
3976
|
}
|
|
3981
|
-
},
|
|
3977
|
+
}, I = E.toLowerCase() === "delete my account", T = (m) => {
|
|
3982
3978
|
m.target === m.currentTarget && c !== "processing" && c !== "success" && t();
|
|
3983
3979
|
}, F = () => {
|
|
3984
3980
|
switch (c) {
|
|
@@ -4026,7 +4022,7 @@ const Cs = [
|
|
|
4026
4022
|
"h3",
|
|
4027
4023
|
{
|
|
4028
4024
|
style: {
|
|
4029
|
-
color:
|
|
4025
|
+
color: o.textPrimary,
|
|
4030
4026
|
margin: 0,
|
|
4031
4027
|
fontSize: "20px",
|
|
4032
4028
|
fontWeight: 700,
|
|
@@ -4046,7 +4042,7 @@ const Cs = [
|
|
|
4046
4042
|
style: {
|
|
4047
4043
|
background: "transparent",
|
|
4048
4044
|
border: "none",
|
|
4049
|
-
color:
|
|
4045
|
+
color: o.textTertiary,
|
|
4050
4046
|
cursor: "pointer",
|
|
4051
4047
|
padding: "8px",
|
|
4052
4048
|
borderRadius: "8px",
|
|
@@ -4059,10 +4055,10 @@ const Cs = [
|
|
|
4059
4055
|
transition: "all 0.2s ease"
|
|
4060
4056
|
},
|
|
4061
4057
|
onMouseOver: (m) => {
|
|
4062
|
-
m.currentTarget.style.backgroundColor =
|
|
4058
|
+
m.currentTarget.style.backgroundColor = o.border, m.currentTarget.style.color = o.textPrimary;
|
|
4063
4059
|
},
|
|
4064
4060
|
onMouseOut: (m) => {
|
|
4065
|
-
m.currentTarget.style.backgroundColor = "transparent", m.currentTarget.style.color =
|
|
4061
|
+
m.currentTarget.style.backgroundColor = "transparent", m.currentTarget.style.color = o.textTertiary;
|
|
4066
4062
|
},
|
|
4067
4063
|
children: /* @__PURE__ */ n.jsx(Ce, { size: 20 })
|
|
4068
4064
|
}
|
|
@@ -4077,8 +4073,8 @@ const Cs = [
|
|
|
4077
4073
|
display: "flex",
|
|
4078
4074
|
gap: "16px",
|
|
4079
4075
|
padding: "20px",
|
|
4080
|
-
background: `${
|
|
4081
|
-
border: `1px solid ${
|
|
4076
|
+
background: `${o.error}15`,
|
|
4077
|
+
border: `1px solid ${o.error}30`,
|
|
4082
4078
|
borderRadius: "12px",
|
|
4083
4079
|
marginBottom: "20px"
|
|
4084
4080
|
},
|
|
@@ -4087,7 +4083,7 @@ const Cs = [
|
|
|
4087
4083
|
"div",
|
|
4088
4084
|
{
|
|
4089
4085
|
style: {
|
|
4090
|
-
color:
|
|
4086
|
+
color: o.error,
|
|
4091
4087
|
flexShrink: 0,
|
|
4092
4088
|
display: "flex",
|
|
4093
4089
|
alignItems: "flex-start"
|
|
@@ -4100,7 +4096,7 @@ const Cs = [
|
|
|
4100
4096
|
"h4",
|
|
4101
4097
|
{
|
|
4102
4098
|
style: {
|
|
4103
|
-
color:
|
|
4099
|
+
color: o.textPrimary,
|
|
4104
4100
|
margin: "0 0 12px 0",
|
|
4105
4101
|
fontSize: "16px",
|
|
4106
4102
|
fontWeight: 600
|
|
@@ -4137,10 +4133,10 @@ const Cs = [
|
|
|
4137
4133
|
alignItems: "center",
|
|
4138
4134
|
gap: "10px",
|
|
4139
4135
|
fontSize: "14px",
|
|
4140
|
-
color:
|
|
4136
|
+
color: o.textSecondary
|
|
4141
4137
|
},
|
|
4142
4138
|
children: [
|
|
4143
|
-
/* @__PURE__ */ n.jsx("div", { style: { color:
|
|
4139
|
+
/* @__PURE__ */ n.jsx("div", { style: { color: o.error, flexShrink: 0 }, children: m.icon }),
|
|
4144
4140
|
/* @__PURE__ */ n.jsx("span", { children: m.text })
|
|
4145
4141
|
]
|
|
4146
4142
|
},
|
|
@@ -4170,9 +4166,9 @@ const Cs = [
|
|
|
4170
4166
|
style: {
|
|
4171
4167
|
padding: "10px 24px",
|
|
4172
4168
|
borderRadius: "10px",
|
|
4173
|
-
border: `1.5px solid ${
|
|
4169
|
+
border: `1.5px solid ${o.border}`,
|
|
4174
4170
|
background: "transparent",
|
|
4175
|
-
color:
|
|
4171
|
+
color: o.textPrimary,
|
|
4176
4172
|
fontSize: "14px",
|
|
4177
4173
|
fontWeight: 500,
|
|
4178
4174
|
cursor: "pointer",
|
|
@@ -4181,7 +4177,7 @@ const Cs = [
|
|
|
4181
4177
|
transition: "all 0.2s ease"
|
|
4182
4178
|
},
|
|
4183
4179
|
onMouseOver: (m) => {
|
|
4184
|
-
m.currentTarget.style.backgroundColor =
|
|
4180
|
+
m.currentTarget.style.backgroundColor = o.border, m.currentTarget.style.transform = "translateY(-1px)";
|
|
4185
4181
|
},
|
|
4186
4182
|
onMouseOut: (m) => {
|
|
4187
4183
|
m.currentTarget.style.backgroundColor = "transparent", m.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4260,7 +4256,7 @@ const Cs = [
|
|
|
4260
4256
|
"h3",
|
|
4261
4257
|
{
|
|
4262
4258
|
style: {
|
|
4263
|
-
color:
|
|
4259
|
+
color: o.textPrimary,
|
|
4264
4260
|
margin: 0,
|
|
4265
4261
|
fontSize: "20px",
|
|
4266
4262
|
fontWeight: 700,
|
|
@@ -4277,7 +4273,7 @@ const Cs = [
|
|
|
4277
4273
|
"p",
|
|
4278
4274
|
{
|
|
4279
4275
|
style: {
|
|
4280
|
-
color:
|
|
4276
|
+
color: o.textSecondary,
|
|
4281
4277
|
marginBottom: "16px",
|
|
4282
4278
|
fontSize: "14px",
|
|
4283
4279
|
lineHeight: "1.5"
|
|
@@ -4285,7 +4281,7 @@ const Cs = [
|
|
|
4285
4281
|
children: [
|
|
4286
4282
|
"Type",
|
|
4287
4283
|
" ",
|
|
4288
|
-
/* @__PURE__ */ n.jsx("strong", { style: { color:
|
|
4284
|
+
/* @__PURE__ */ n.jsx("strong", { style: { color: o.textPrimary }, children: '"delete my account"' }),
|
|
4289
4285
|
" ",
|
|
4290
4286
|
"to confirm:"
|
|
4291
4287
|
]
|
|
@@ -4302,16 +4298,16 @@ const Cs = [
|
|
|
4302
4298
|
width: "100%",
|
|
4303
4299
|
padding: "14px 16px",
|
|
4304
4300
|
borderRadius: "10px",
|
|
4305
|
-
border: `2px solid ${
|
|
4301
|
+
border: `2px solid ${I ? o.success : o.error}`,
|
|
4306
4302
|
backgroundColor: "transparent",
|
|
4307
|
-
color:
|
|
4303
|
+
color: o.textPrimary,
|
|
4308
4304
|
fontSize: "15px",
|
|
4309
4305
|
outline: "none",
|
|
4310
4306
|
transition: "all 0.2s ease",
|
|
4311
4307
|
boxSizing: "border-box"
|
|
4312
4308
|
},
|
|
4313
4309
|
onFocus: (m) => {
|
|
4314
|
-
m.target.style.boxShadow = `0 0 0 3px ${
|
|
4310
|
+
m.target.style.boxShadow = `0 0 0 3px ${o.accent}20`;
|
|
4315
4311
|
},
|
|
4316
4312
|
onBlur: (m) => {
|
|
4317
4313
|
m.target.style.boxShadow = "none";
|
|
@@ -4319,7 +4315,7 @@ const Cs = [
|
|
|
4319
4315
|
autoFocus: !0
|
|
4320
4316
|
}
|
|
4321
4317
|
),
|
|
4322
|
-
|
|
4318
|
+
I && /* @__PURE__ */ n.jsxs(
|
|
4323
4319
|
"div",
|
|
4324
4320
|
{
|
|
4325
4321
|
style: {
|
|
@@ -4327,7 +4323,7 @@ const Cs = [
|
|
|
4327
4323
|
alignItems: "center",
|
|
4328
4324
|
gap: "8px",
|
|
4329
4325
|
marginTop: "10px",
|
|
4330
|
-
color:
|
|
4326
|
+
color: o.success,
|
|
4331
4327
|
fontSize: "14px",
|
|
4332
4328
|
fontWeight: 500
|
|
4333
4329
|
},
|
|
@@ -4358,9 +4354,9 @@ const Cs = [
|
|
|
4358
4354
|
style: {
|
|
4359
4355
|
padding: "10px 24px",
|
|
4360
4356
|
borderRadius: "10px",
|
|
4361
|
-
border: `1.5px solid ${
|
|
4357
|
+
border: `1.5px solid ${o.border}`,
|
|
4362
4358
|
background: "transparent",
|
|
4363
|
-
color:
|
|
4359
|
+
color: o.textPrimary,
|
|
4364
4360
|
fontSize: "14px",
|
|
4365
4361
|
fontWeight: 500,
|
|
4366
4362
|
cursor: "pointer",
|
|
@@ -4369,7 +4365,7 @@ const Cs = [
|
|
|
4369
4365
|
transition: "all 0.2s ease"
|
|
4370
4366
|
},
|
|
4371
4367
|
onMouseOver: (m) => {
|
|
4372
|
-
m.currentTarget.style.backgroundColor =
|
|
4368
|
+
m.currentTarget.style.backgroundColor = o.border, m.currentTarget.style.transform = "translateY(-1px)";
|
|
4373
4369
|
},
|
|
4374
4370
|
onMouseOut: (m) => {
|
|
4375
4371
|
m.currentTarget.style.backgroundColor = "transparent", m.currentTarget.style.transform = "translateY(0)";
|
|
@@ -4381,7 +4377,7 @@ const Cs = [
|
|
|
4381
4377
|
"button",
|
|
4382
4378
|
{
|
|
4383
4379
|
onClick: M,
|
|
4384
|
-
disabled: !
|
|
4380
|
+
disabled: !I || u,
|
|
4385
4381
|
style: {
|
|
4386
4382
|
padding: "10px 24px",
|
|
4387
4383
|
borderRadius: "10px",
|
|
@@ -4390,22 +4386,22 @@ const Cs = [
|
|
|
4390
4386
|
color: "white",
|
|
4391
4387
|
fontSize: "14px",
|
|
4392
4388
|
fontWeight: 600,
|
|
4393
|
-
cursor: !
|
|
4389
|
+
cursor: !I || u ? "not-allowed" : "pointer",
|
|
4394
4390
|
flex: w ? "none" : 1,
|
|
4395
4391
|
minWidth: w ? "100%" : "140px",
|
|
4396
|
-
opacity: !
|
|
4392
|
+
opacity: !I || u ? 0.6 : 1,
|
|
4397
4393
|
display: "flex",
|
|
4398
4394
|
alignItems: "center",
|
|
4399
4395
|
justifyContent: "center",
|
|
4400
4396
|
gap: "8px",
|
|
4401
4397
|
transition: "all 0.2s ease",
|
|
4402
|
-
boxShadow: !
|
|
4398
|
+
boxShadow: !I || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4403
4399
|
},
|
|
4404
4400
|
onMouseOver: (m) => {
|
|
4405
|
-
|
|
4401
|
+
I && !u && (m.currentTarget.style.transform = "translateY(-1px)", m.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4406
4402
|
},
|
|
4407
4403
|
onMouseOut: (m) => {
|
|
4408
|
-
|
|
4404
|
+
I && !u && (m.currentTarget.style.transform = "translateY(0)", m.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4409
4405
|
},
|
|
4410
4406
|
children: [
|
|
4411
4407
|
/* @__PURE__ */ n.jsx(ze, { size: 16 }),
|
|
@@ -4444,7 +4440,7 @@ const Cs = [
|
|
|
4444
4440
|
flexShrink: 0
|
|
4445
4441
|
},
|
|
4446
4442
|
children: /* @__PURE__ */ n.jsx(
|
|
4447
|
-
|
|
4443
|
+
oe,
|
|
4448
4444
|
{
|
|
4449
4445
|
size: 20,
|
|
4450
4446
|
style: {
|
|
@@ -4459,7 +4455,7 @@ const Cs = [
|
|
|
4459
4455
|
"h3",
|
|
4460
4456
|
{
|
|
4461
4457
|
style: {
|
|
4462
|
-
color:
|
|
4458
|
+
color: o.textPrimary,
|
|
4463
4459
|
margin: 0,
|
|
4464
4460
|
fontSize: "20px",
|
|
4465
4461
|
fontWeight: 700,
|
|
@@ -4472,7 +4468,7 @@ const Cs = [
|
|
|
4472
4468
|
"p",
|
|
4473
4469
|
{
|
|
4474
4470
|
style: {
|
|
4475
|
-
color:
|
|
4471
|
+
color: o.textTertiary,
|
|
4476
4472
|
margin: "4px 0 0 0",
|
|
4477
4473
|
fontSize: "14px",
|
|
4478
4474
|
lineHeight: "1.4"
|
|
@@ -4506,7 +4502,7 @@ const Cs = [
|
|
|
4506
4502
|
padding: "12px",
|
|
4507
4503
|
borderRadius: "8px",
|
|
4508
4504
|
transition: "all 0.2s ease",
|
|
4509
|
-
backgroundColor: m.active ? `${
|
|
4505
|
+
backgroundColor: m.active ? `${o.accent}10` : "transparent"
|
|
4510
4506
|
},
|
|
4511
4507
|
children: [
|
|
4512
4508
|
/* @__PURE__ */ n.jsx(
|
|
@@ -4516,9 +4512,9 @@ const Cs = [
|
|
|
4516
4512
|
width: "8px",
|
|
4517
4513
|
height: "8px",
|
|
4518
4514
|
borderRadius: "50%",
|
|
4519
|
-
backgroundColor: m.active ?
|
|
4515
|
+
backgroundColor: m.active ? o.accent : o.textTertiary,
|
|
4520
4516
|
transition: "all 0.3s ease",
|
|
4521
|
-
boxShadow: m.active ? `0 0 0 4px ${
|
|
4517
|
+
boxShadow: m.active ? `0 0 0 4px ${o.accent}20` : "none"
|
|
4522
4518
|
}
|
|
4523
4519
|
}
|
|
4524
4520
|
),
|
|
@@ -4527,7 +4523,7 @@ const Cs = [
|
|
|
4527
4523
|
{
|
|
4528
4524
|
style: {
|
|
4529
4525
|
fontSize: "14px",
|
|
4530
|
-
color: m.active ?
|
|
4526
|
+
color: m.active ? o.textPrimary : o.textSecondary,
|
|
4531
4527
|
fontWeight: m.active ? 500 : 400
|
|
4532
4528
|
},
|
|
4533
4529
|
children: m.text
|
|
@@ -4547,17 +4543,17 @@ const Cs = [
|
|
|
4547
4543
|
alignItems: "center",
|
|
4548
4544
|
gap: "10px",
|
|
4549
4545
|
padding: "16px",
|
|
4550
|
-
background: `${
|
|
4546
|
+
background: `${o.accent}10`,
|
|
4551
4547
|
borderRadius: "10px",
|
|
4552
4548
|
fontSize: "14px",
|
|
4553
|
-
color:
|
|
4549
|
+
color: o.textSecondary
|
|
4554
4550
|
},
|
|
4555
4551
|
children: [
|
|
4556
4552
|
/* @__PURE__ */ n.jsx(
|
|
4557
4553
|
nr,
|
|
4558
4554
|
{
|
|
4559
4555
|
size: 18,
|
|
4560
|
-
style: { color:
|
|
4556
|
+
style: { color: o.accent, flexShrink: 0 }
|
|
4561
4557
|
}
|
|
4562
4558
|
),
|
|
4563
4559
|
/* @__PURE__ */ n.jsx("span", { children: "You will be redirected to the login page shortly" })
|
|
@@ -4599,7 +4595,7 @@ const Cs = [
|
|
|
4599
4595
|
"h3",
|
|
4600
4596
|
{
|
|
4601
4597
|
style: {
|
|
4602
|
-
color:
|
|
4598
|
+
color: o.textPrimary,
|
|
4603
4599
|
margin: 0,
|
|
4604
4600
|
fontSize: "20px",
|
|
4605
4601
|
fontWeight: 700,
|
|
@@ -4612,7 +4608,7 @@ const Cs = [
|
|
|
4612
4608
|
"p",
|
|
4613
4609
|
{
|
|
4614
4610
|
style: {
|
|
4615
|
-
color:
|
|
4611
|
+
color: o.textTertiary,
|
|
4616
4612
|
margin: "4px 0 0 0",
|
|
4617
4613
|
fontSize: "14px",
|
|
4618
4614
|
lineHeight: "1.4"
|
|
@@ -4630,8 +4626,8 @@ const Cs = [
|
|
|
4630
4626
|
style: {
|
|
4631
4627
|
textAlign: "center",
|
|
4632
4628
|
padding: "20px",
|
|
4633
|
-
background: `${
|
|
4634
|
-
border: `1px solid ${
|
|
4629
|
+
background: `${o.success}10`,
|
|
4630
|
+
border: `1px solid ${o.success}20`,
|
|
4635
4631
|
borderRadius: "12px",
|
|
4636
4632
|
marginBottom: "24px"
|
|
4637
4633
|
},
|
|
@@ -4641,7 +4637,7 @@ const Cs = [
|
|
|
4641
4637
|
{
|
|
4642
4638
|
size: 48,
|
|
4643
4639
|
style: {
|
|
4644
|
-
color:
|
|
4640
|
+
color: o.success,
|
|
4645
4641
|
marginBottom: "12px",
|
|
4646
4642
|
display: "block",
|
|
4647
4643
|
margin: "0 auto 12px auto"
|
|
@@ -4652,7 +4648,7 @@ const Cs = [
|
|
|
4652
4648
|
"p",
|
|
4653
4649
|
{
|
|
4654
4650
|
style: {
|
|
4655
|
-
color:
|
|
4651
|
+
color: o.textPrimary,
|
|
4656
4652
|
fontSize: "16px",
|
|
4657
4653
|
fontWeight: 600,
|
|
4658
4654
|
margin: "0 0 8px 0"
|
|
@@ -4664,7 +4660,7 @@ const Cs = [
|
|
|
4664
4660
|
"p",
|
|
4665
4661
|
{
|
|
4666
4662
|
style: {
|
|
4667
|
-
color:
|
|
4663
|
+
color: o.textSecondary,
|
|
4668
4664
|
fontSize: "14px",
|
|
4669
4665
|
margin: 0,
|
|
4670
4666
|
lineHeight: "1.5"
|
|
@@ -4683,20 +4679,20 @@ const Cs = [
|
|
|
4683
4679
|
alignItems: "center",
|
|
4684
4680
|
gap: "10px",
|
|
4685
4681
|
padding: "16px",
|
|
4686
|
-
background: `${
|
|
4682
|
+
background: `${o.accent}10`,
|
|
4687
4683
|
borderRadius: "10px",
|
|
4688
4684
|
fontSize: "14px",
|
|
4689
|
-
color:
|
|
4685
|
+
color: o.textSecondary,
|
|
4690
4686
|
justifyContent: "center"
|
|
4691
4687
|
},
|
|
4692
4688
|
children: [
|
|
4693
4689
|
/* @__PURE__ */ n.jsx(
|
|
4694
|
-
|
|
4690
|
+
oe,
|
|
4695
4691
|
{
|
|
4696
4692
|
size: 16,
|
|
4697
4693
|
style: {
|
|
4698
4694
|
animation: "spin 1s linear infinite",
|
|
4699
|
-
color:
|
|
4695
|
+
color: o.accent
|
|
4700
4696
|
}
|
|
4701
4697
|
}
|
|
4702
4698
|
),
|
|
@@ -4728,8 +4724,8 @@ const Cs = [
|
|
|
4728
4724
|
"div",
|
|
4729
4725
|
{
|
|
4730
4726
|
style: {
|
|
4731
|
-
backgroundColor:
|
|
4732
|
-
border: `1px solid ${
|
|
4727
|
+
backgroundColor: o.surface,
|
|
4728
|
+
border: `1px solid ${o.border}`,
|
|
4733
4729
|
borderRadius: "20px",
|
|
4734
4730
|
width: "100%",
|
|
4735
4731
|
maxWidth: "480px",
|
|
@@ -4805,19 +4801,19 @@ const Cs = [
|
|
|
4805
4801
|
onUpdate: r,
|
|
4806
4802
|
colors: s
|
|
4807
4803
|
}) => {
|
|
4808
|
-
const [
|
|
4804
|
+
const [a, i] = A(""), [o, l] = A(!1), [f, p] = A(!1), [u, y] = A({ isValid: !1, message: "", type: null });
|
|
4809
4805
|
if (se(() => {
|
|
4810
4806
|
const c = () => {
|
|
4811
4807
|
p(window.innerWidth < 640);
|
|
4812
4808
|
};
|
|
4813
4809
|
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
4814
4810
|
}, []), se(() => {
|
|
4815
|
-
if (!
|
|
4811
|
+
if (!a.trim()) {
|
|
4816
4812
|
y({ isValid: !1, message: "", type: null });
|
|
4817
4813
|
return;
|
|
4818
4814
|
}
|
|
4819
4815
|
try {
|
|
4820
|
-
const c = new URL(
|
|
4816
|
+
const c = new URL(a), b = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(c.pathname);
|
|
4821
4817
|
y(b ? {
|
|
4822
4818
|
isValid: !0,
|
|
4823
4819
|
message: "Valid image URL",
|
|
@@ -4834,12 +4830,12 @@ const Cs = [
|
|
|
4834
4830
|
type: "error"
|
|
4835
4831
|
});
|
|
4836
4832
|
}
|
|
4837
|
-
}, [
|
|
4833
|
+
}, [a]), !e) return null;
|
|
4838
4834
|
const E = async () => {
|
|
4839
|
-
if (!(!
|
|
4835
|
+
if (!(!a || !u.isValid)) {
|
|
4840
4836
|
l(!0);
|
|
4841
4837
|
try {
|
|
4842
|
-
await r(
|
|
4838
|
+
await r(a) && (i(""), t());
|
|
4843
4839
|
} finally {
|
|
4844
4840
|
l(!1);
|
|
4845
4841
|
}
|
|
@@ -5000,7 +4996,7 @@ const Cs = [
|
|
|
5000
4996
|
type: "url",
|
|
5001
4997
|
id: "avatar-url",
|
|
5002
4998
|
placeholder: "https://example.com/your-avatar.jpg",
|
|
5003
|
-
value:
|
|
4999
|
+
value: a,
|
|
5004
5000
|
onChange: (c) => i(c.target.value),
|
|
5005
5001
|
style: {
|
|
5006
5002
|
width: "100%",
|
|
@@ -5021,7 +5017,7 @@ const Cs = [
|
|
|
5021
5017
|
onBlur: (c) => {
|
|
5022
5018
|
c.target.style.borderColor = u.type === "error" ? s.error : u.type === "success" ? s.success : s.border, c.target.style.boxShadow = "none";
|
|
5023
5019
|
},
|
|
5024
|
-
disabled:
|
|
5020
|
+
disabled: o
|
|
5025
5021
|
}
|
|
5026
5022
|
),
|
|
5027
5023
|
/* @__PURE__ */ n.jsx(
|
|
@@ -5051,14 +5047,14 @@ const Cs = [
|
|
|
5051
5047
|
},
|
|
5052
5048
|
children: [
|
|
5053
5049
|
u.type === "success" && /* @__PURE__ */ n.jsx(de, { size: 14 }),
|
|
5054
|
-
u.type === "error" && /* @__PURE__ */ n.jsx(
|
|
5055
|
-
u.type === "warning" && /* @__PURE__ */ n.jsx(
|
|
5050
|
+
u.type === "error" && /* @__PURE__ */ n.jsx(ae, { size: 14 }),
|
|
5051
|
+
u.type === "warning" && /* @__PURE__ */ n.jsx(ae, { size: 14 }),
|
|
5056
5052
|
u.message
|
|
5057
5053
|
]
|
|
5058
5054
|
}
|
|
5059
5055
|
)
|
|
5060
5056
|
] }),
|
|
5061
|
-
|
|
5057
|
+
a && u.type === "success" && /* @__PURE__ */ n.jsxs(
|
|
5062
5058
|
"div",
|
|
5063
5059
|
{
|
|
5064
5060
|
style: {
|
|
@@ -5084,7 +5080,7 @@ const Cs = [
|
|
|
5084
5080
|
/* @__PURE__ */ n.jsx(
|
|
5085
5081
|
"img",
|
|
5086
5082
|
{
|
|
5087
|
-
src:
|
|
5083
|
+
src: a,
|
|
5088
5084
|
alt: "Avatar preview",
|
|
5089
5085
|
style: {
|
|
5090
5086
|
width: "80px",
|
|
@@ -5121,7 +5117,7 @@ const Cs = [
|
|
|
5121
5117
|
"button",
|
|
5122
5118
|
{
|
|
5123
5119
|
onClick: t,
|
|
5124
|
-
disabled:
|
|
5120
|
+
disabled: o,
|
|
5125
5121
|
style: {
|
|
5126
5122
|
padding: "10px 24px",
|
|
5127
5123
|
borderRadius: "10px",
|
|
@@ -5130,17 +5126,17 @@ const Cs = [
|
|
|
5130
5126
|
color: s.textPrimary,
|
|
5131
5127
|
fontSize: "14px",
|
|
5132
5128
|
fontWeight: 500,
|
|
5133
|
-
cursor:
|
|
5129
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
5134
5130
|
flex: f ? "none" : 1,
|
|
5135
5131
|
minWidth: f ? "100%" : "120px",
|
|
5136
|
-
opacity:
|
|
5132
|
+
opacity: o ? 0.6 : 1,
|
|
5137
5133
|
transition: "all 0.2s ease"
|
|
5138
5134
|
},
|
|
5139
5135
|
onMouseOver: (c) => {
|
|
5140
|
-
|
|
5136
|
+
o || (c.currentTarget.style.backgroundColor = s.border, c.currentTarget.style.transform = "translateY(-1px)");
|
|
5141
5137
|
},
|
|
5142
5138
|
onMouseOut: (c) => {
|
|
5143
|
-
|
|
5139
|
+
o || (c.currentTarget.style.backgroundColor = "transparent", c.currentTarget.style.transform = "translateY(0)");
|
|
5144
5140
|
},
|
|
5145
5141
|
children: "Cancel"
|
|
5146
5142
|
}
|
|
@@ -5149,7 +5145,7 @@ const Cs = [
|
|
|
5149
5145
|
"button",
|
|
5150
5146
|
{
|
|
5151
5147
|
onClick: E,
|
|
5152
|
-
disabled:
|
|
5148
|
+
disabled: o || !u.isValid,
|
|
5153
5149
|
style: {
|
|
5154
5150
|
padding: "10px 24px",
|
|
5155
5151
|
borderRadius: "10px",
|
|
@@ -5158,26 +5154,26 @@ const Cs = [
|
|
|
5158
5154
|
color: "#fff",
|
|
5159
5155
|
fontSize: "14px",
|
|
5160
5156
|
fontWeight: 600,
|
|
5161
|
-
cursor:
|
|
5157
|
+
cursor: o || !u.isValid ? "not-allowed" : "pointer",
|
|
5162
5158
|
flex: f ? "none" : 1,
|
|
5163
5159
|
minWidth: f ? "100%" : "140px",
|
|
5164
|
-
opacity:
|
|
5160
|
+
opacity: o || !u.isValid ? 0.6 : 1,
|
|
5165
5161
|
display: "flex",
|
|
5166
5162
|
alignItems: "center",
|
|
5167
5163
|
justifyContent: "center",
|
|
5168
5164
|
gap: "8px",
|
|
5169
5165
|
transition: "all 0.2s ease",
|
|
5170
|
-
boxShadow:
|
|
5166
|
+
boxShadow: o || !u.isValid ? "none" : `0 4px 12px ${s.accent}40`
|
|
5171
5167
|
},
|
|
5172
5168
|
onMouseOver: (c) => {
|
|
5173
|
-
!
|
|
5169
|
+
!o && u.isValid && (c.currentTarget.style.transform = "translateY(-1px)", c.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
|
|
5174
5170
|
},
|
|
5175
5171
|
onMouseOut: (c) => {
|
|
5176
|
-
!
|
|
5172
|
+
!o && u.isValid && (c.currentTarget.style.transform = "translateY(0)", c.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
|
|
5177
5173
|
},
|
|
5178
|
-
children:
|
|
5174
|
+
children: o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5179
5175
|
/* @__PURE__ */ n.jsx(
|
|
5180
|
-
|
|
5176
|
+
oe,
|
|
5181
5177
|
{
|
|
5182
5178
|
size: 16,
|
|
5183
5179
|
style: {
|
|
@@ -5255,10 +5251,10 @@ const Cs = [
|
|
|
5255
5251
|
onClose: t,
|
|
5256
5252
|
onSuccess: r,
|
|
5257
5253
|
onError: s,
|
|
5258
|
-
userId:
|
|
5254
|
+
userId: a,
|
|
5259
5255
|
colors: i
|
|
5260
5256
|
}) => {
|
|
5261
|
-
const { baseUrl:
|
|
5257
|
+
const { baseUrl: o, apiKey: l, appId: f } = ye(), [p, u] = A({
|
|
5262
5258
|
currentPassword: "",
|
|
5263
5259
|
newPassword: "",
|
|
5264
5260
|
confirmPassword: ""
|
|
@@ -5273,7 +5269,7 @@ const Cs = [
|
|
|
5273
5269
|
};
|
|
5274
5270
|
return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
5275
5271
|
}, []), !e) return null;
|
|
5276
|
-
const
|
|
5272
|
+
const I = (S) => {
|
|
5277
5273
|
const { name: $, value: q } = S.target;
|
|
5278
5274
|
u((z) => ({ ...z, [$]: q })), y[$] && E((z) => ({ ...z, [$]: "" }));
|
|
5279
5275
|
}, T = (S) => {
|
|
@@ -5286,7 +5282,7 @@ const Cs = [
|
|
|
5286
5282
|
c(!0);
|
|
5287
5283
|
try {
|
|
5288
5284
|
const { data: $ } = await W.put(
|
|
5289
|
-
`${
|
|
5285
|
+
`${o}/users/change-password/${a}`,
|
|
5290
5286
|
{
|
|
5291
5287
|
appId: f,
|
|
5292
5288
|
currentPassword: p.currentPassword,
|
|
@@ -5488,7 +5484,7 @@ const Cs = [
|
|
|
5488
5484
|
name: S,
|
|
5489
5485
|
placeholder: `Enter ${$.toLowerCase()}`,
|
|
5490
5486
|
value: p[S],
|
|
5491
|
-
onChange:
|
|
5487
|
+
onChange: I,
|
|
5492
5488
|
style: {
|
|
5493
5489
|
width: "100%",
|
|
5494
5490
|
padding: "14px 48px 14px 44px",
|
|
@@ -5634,7 +5630,7 @@ const Cs = [
|
|
|
5634
5630
|
},
|
|
5635
5631
|
children: k ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
5636
5632
|
/* @__PURE__ */ n.jsx(
|
|
5637
|
-
|
|
5633
|
+
oe,
|
|
5638
5634
|
{
|
|
5639
5635
|
size: 16,
|
|
5640
5636
|
style: {
|
|
@@ -5699,9 +5695,9 @@ const Cs = [
|
|
|
5699
5695
|
onClose: t,
|
|
5700
5696
|
onVerify: r,
|
|
5701
5697
|
onSendOTP: s,
|
|
5702
|
-
verifyFormData:
|
|
5698
|
+
verifyFormData: a,
|
|
5703
5699
|
setVerifyFormData: i,
|
|
5704
|
-
otpSent:
|
|
5700
|
+
otpSent: o,
|
|
5705
5701
|
verifying: l,
|
|
5706
5702
|
user: f,
|
|
5707
5703
|
colors: p,
|
|
@@ -5709,7 +5705,7 @@ const Cs = [
|
|
|
5709
5705
|
}) => {
|
|
5710
5706
|
if (!e) return null;
|
|
5711
5707
|
const y = () => {
|
|
5712
|
-
t(), i({ email: f?.email || "", otp: "", appId:
|
|
5708
|
+
t(), i({ email: f?.email || "", otp: "", appId: a.appId });
|
|
5713
5709
|
};
|
|
5714
5710
|
return /* @__PURE__ */ n.jsxs(
|
|
5715
5711
|
"div",
|
|
@@ -5750,7 +5746,7 @@ const Cs = [
|
|
|
5750
5746
|
"input",
|
|
5751
5747
|
{
|
|
5752
5748
|
type: "email",
|
|
5753
|
-
value:
|
|
5749
|
+
value: a.email,
|
|
5754
5750
|
onChange: (E) => i((k) => ({ ...k, email: E.target.value })),
|
|
5755
5751
|
placeholder: "Enter your email",
|
|
5756
5752
|
style: {
|
|
@@ -5765,7 +5761,7 @@ const Cs = [
|
|
|
5765
5761
|
)
|
|
5766
5762
|
] })
|
|
5767
5763
|
] }),
|
|
5768
|
-
|
|
5764
|
+
o && /* @__PURE__ */ n.jsxs("div", { className: "form-group", children: [
|
|
5769
5765
|
/* @__PURE__ */ n.jsx("label", { style: { color: p.textSecondary }, children: "OTP" }),
|
|
5770
5766
|
/* @__PURE__ */ n.jsxs("div", { className: "input-container", children: [
|
|
5771
5767
|
/* @__PURE__ */ n.jsx(er, { size: 18, style: { color: p.textTertiary }, "aria-hidden": "true" }),
|
|
@@ -5773,7 +5769,7 @@ const Cs = [
|
|
|
5773
5769
|
"input",
|
|
5774
5770
|
{
|
|
5775
5771
|
type: "text",
|
|
5776
|
-
value:
|
|
5772
|
+
value: a.otp,
|
|
5777
5773
|
onChange: (E) => i((k) => ({ ...k, otp: E.target.value })),
|
|
5778
5774
|
placeholder: "Enter OTP",
|
|
5779
5775
|
style: {
|
|
@@ -5788,7 +5784,7 @@ const Cs = [
|
|
|
5788
5784
|
)
|
|
5789
5785
|
] })
|
|
5790
5786
|
] }),
|
|
5791
|
-
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children:
|
|
5787
|
+
/* @__PURE__ */ n.jsx("div", { className: "modal-actions", children: o ? /* @__PURE__ */ n.jsxs(
|
|
5792
5788
|
"button",
|
|
5793
5789
|
{
|
|
5794
5790
|
type: "submit",
|
|
@@ -5800,7 +5796,7 @@ const Cs = [
|
|
|
5800
5796
|
},
|
|
5801
5797
|
"aria-label": l ? "Verifying email" : "Verify email",
|
|
5802
5798
|
children: [
|
|
5803
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
5799
|
+
l ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
5804
5800
|
l ? "Verifying..." : "Verify Email"
|
|
5805
5801
|
]
|
|
5806
5802
|
}
|
|
@@ -5817,7 +5813,7 @@ const Cs = [
|
|
|
5817
5813
|
},
|
|
5818
5814
|
"aria-label": l ? "Sending OTP" : "Send OTP",
|
|
5819
5815
|
children: [
|
|
5820
|
-
l ? /* @__PURE__ */ n.jsx(
|
|
5816
|
+
l ? /* @__PURE__ */ n.jsx(oe, { size: 16, className: "spinner", "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(rr, { size: 16, "aria-hidden": "true" }),
|
|
5821
5817
|
l ? "Sending..." : "Send OTP"
|
|
5822
5818
|
]
|
|
5823
5819
|
}
|
|
@@ -5977,19 +5973,19 @@ const Cs = [
|
|
|
5977
5973
|
]
|
|
5978
5974
|
}
|
|
5979
5975
|
);
|
|
5980
|
-
},
|
|
5976
|
+
}, oa = ({
|
|
5981
5977
|
token: e,
|
|
5982
5978
|
user: t = null,
|
|
5983
5979
|
darkMode: r = !0,
|
|
5984
5980
|
onLogout: s,
|
|
5985
|
-
primaryColor:
|
|
5981
|
+
primaryColor: a = "#00C214"
|
|
5986
5982
|
}) => {
|
|
5987
|
-
const { baseUrl: i, apiKey:
|
|
5983
|
+
const { baseUrl: i, apiKey: o, appId: l } = ye(), [f, p] = A(t), [u, y] = A(!0), [E, k] = A(!1), [c, b] = A(!1), [w, N] = A(!1), [M, I] = A(!1), [T, F] = A(!1), [m, _] = A(!1), [S, $] = A(null), [q, z] = A(!1), [X, H] = A({
|
|
5988
5984
|
email: "",
|
|
5989
5985
|
otp: "",
|
|
5990
5986
|
appId: l
|
|
5991
|
-
}), [R, K] = A(!1), [J, O] = A(!1), j = (v,
|
|
5992
|
-
$({ type: v, message:
|
|
5987
|
+
}), [R, K] = A(!1), [J, O] = A(!1), j = (v, P) => {
|
|
5988
|
+
$({ type: v, message: P }), setTimeout(() => $(null), 3e3);
|
|
5993
5989
|
}, Y = async () => {
|
|
5994
5990
|
if (!X.email || !/\S+@\S+\.\S+/.test(X.email)) {
|
|
5995
5991
|
j("error", "Please enter a valid email");
|
|
@@ -6001,7 +5997,7 @@ const Cs = [
|
|
|
6001
5997
|
`${i}/users/send-verify-otp/${f?.id}`,
|
|
6002
5998
|
{ email: X.email },
|
|
6003
5999
|
{
|
|
6004
|
-
headers: { "x-api-key":
|
|
6000
|
+
headers: { "x-api-key": o, "x-app-id": l }
|
|
6005
6001
|
}
|
|
6006
6002
|
);
|
|
6007
6003
|
v.data.success ? (j("success", v.data.message || "OTP sent to email!"), K(!0)) : j("error", v.data.message || "Failed to send OTP");
|
|
@@ -6017,12 +6013,12 @@ const Cs = [
|
|
|
6017
6013
|
}
|
|
6018
6014
|
try {
|
|
6019
6015
|
O(!0);
|
|
6020
|
-
const
|
|
6016
|
+
const P = await W.post(
|
|
6021
6017
|
`${i}/users/verify-email`,
|
|
6022
6018
|
X
|
|
6023
6019
|
);
|
|
6024
|
-
if (
|
|
6025
|
-
if (j("success",
|
|
6020
|
+
if (P.data.success) {
|
|
6021
|
+
if (j("success", P.data.message || "Email verified!"), f) {
|
|
6026
6022
|
const V = { ...f, isVerified: !0 };
|
|
6027
6023
|
p(V), localStorage.setItem(
|
|
6028
6024
|
"userInfo",
|
|
@@ -6031,11 +6027,11 @@ const Cs = [
|
|
|
6031
6027
|
}
|
|
6032
6028
|
H({ email: "", otp: "", appId: l }), K(!1), _(!1);
|
|
6033
6029
|
} else
|
|
6034
|
-
j("error",
|
|
6035
|
-
} catch (
|
|
6030
|
+
j("error", P.data.message || "Verification failed");
|
|
6031
|
+
} catch (P) {
|
|
6036
6032
|
j(
|
|
6037
6033
|
"error",
|
|
6038
|
-
|
|
6034
|
+
P.response?.data?.message || "Something went wrong"
|
|
6039
6035
|
);
|
|
6040
6036
|
} finally {
|
|
6041
6037
|
O(!1);
|
|
@@ -6043,17 +6039,17 @@ const Cs = [
|
|
|
6043
6039
|
}, C = async (v) => {
|
|
6044
6040
|
if (!f) return !1;
|
|
6045
6041
|
try {
|
|
6046
|
-
const
|
|
6042
|
+
const P = { ...f, avatarUrl: v }, { data: V } = await W.put(
|
|
6047
6043
|
`${i}/users/update/${f.id}`,
|
|
6048
|
-
|
|
6049
|
-
{ headers: { "x-api-key":
|
|
6044
|
+
P,
|
|
6045
|
+
{ headers: { "x-api-key": o } }
|
|
6050
6046
|
);
|
|
6051
|
-
return V.success ? (p(
|
|
6047
|
+
return V.success ? (p(P), localStorage.setItem(
|
|
6052
6048
|
"userInfo",
|
|
6053
|
-
JSON.stringify({ ...
|
|
6049
|
+
JSON.stringify({ ...P, token: e })
|
|
6054
6050
|
), j("success", "Avatar updated successfully!"), !0) : (j("error", V.message || "Failed to update avatar"), !1);
|
|
6055
|
-
} catch (
|
|
6056
|
-
return console.error("Avatar update error:",
|
|
6051
|
+
} catch (P) {
|
|
6052
|
+
return console.error("Avatar update error:", P), j("error", "Failed to update avatar"), !1;
|
|
6057
6053
|
}
|
|
6058
6054
|
}, D = async () => {
|
|
6059
6055
|
if (f) {
|
|
@@ -6062,7 +6058,7 @@ const Cs = [
|
|
|
6062
6058
|
const { data: v } = await W.put(
|
|
6063
6059
|
`${i}/users/update/${f.id}`,
|
|
6064
6060
|
f,
|
|
6065
|
-
{ headers: { "x-api-key":
|
|
6061
|
+
{ headers: { "x-api-key": o } }
|
|
6066
6062
|
);
|
|
6067
6063
|
v.success ? (p(v.user), k(!1), localStorage.setItem(
|
|
6068
6064
|
"userInfo",
|
|
@@ -6076,13 +6072,13 @@ const Cs = [
|
|
|
6076
6072
|
}
|
|
6077
6073
|
}, L = async (v) => {
|
|
6078
6074
|
try {
|
|
6079
|
-
const { data:
|
|
6075
|
+
const { data: P } = await W.get(
|
|
6080
6076
|
`${i}/users/check-user/${v}?appId=${l}`,
|
|
6081
|
-
{ headers: { "x-api-key":
|
|
6077
|
+
{ headers: { "x-api-key": o } }
|
|
6082
6078
|
);
|
|
6083
|
-
(!
|
|
6084
|
-
} catch (
|
|
6085
|
-
console.error("User check failed:",
|
|
6079
|
+
(!P.success || !P.exists) && (console.warn("User not found, clearing session..."), localStorage.removeItem("userInfo"), p(null));
|
|
6080
|
+
} catch (P) {
|
|
6081
|
+
console.error("User check failed:", P), localStorage.removeItem("userInfo"), p(null);
|
|
6086
6082
|
}
|
|
6087
6083
|
};
|
|
6088
6084
|
se(() => {
|
|
@@ -6090,9 +6086,9 @@ const Cs = [
|
|
|
6090
6086
|
if (t)
|
|
6091
6087
|
p(t), y(!1), L(t.id);
|
|
6092
6088
|
else {
|
|
6093
|
-
const
|
|
6094
|
-
if (
|
|
6095
|
-
const V = JSON.parse(
|
|
6089
|
+
const P = localStorage.getItem("userInfo");
|
|
6090
|
+
if (P) {
|
|
6091
|
+
const V = JSON.parse(P);
|
|
6096
6092
|
p(V), y(!1), L(V.id);
|
|
6097
6093
|
} else
|
|
6098
6094
|
y(!1);
|
|
@@ -6101,8 +6097,8 @@ const Cs = [
|
|
|
6101
6097
|
}, [t]), se(() => {
|
|
6102
6098
|
f?.email && H((v) => ({ ...v, email: f.email }));
|
|
6103
6099
|
}, [f?.email]);
|
|
6104
|
-
const h = (v,
|
|
6105
|
-
let V = parseInt(v.replace("#", ""), 16), Q = (V >> 16) +
|
|
6100
|
+
const h = (v, P) => {
|
|
6101
|
+
let V = parseInt(v.replace("#", ""), 16), Q = (V >> 16) + P, ie = (V >> 8 & 255) + P, be = (V & 255) + P;
|
|
6106
6102
|
return Q = Math.min(255, Math.max(0, Q)), ie = Math.min(255, Math.max(0, ie)), be = Math.min(255, Math.max(0, be)), `#${(be | ie << 8 | Q << 16).toString(16).padStart(6, "0")}`;
|
|
6107
6103
|
}, g = r ? {
|
|
6108
6104
|
background: "#000000",
|
|
@@ -6112,8 +6108,8 @@ const Cs = [
|
|
|
6112
6108
|
textPrimary: "#ffffff",
|
|
6113
6109
|
textSecondary: "#d4d4d8",
|
|
6114
6110
|
textTertiary: "#a1a1aa",
|
|
6115
|
-
accent:
|
|
6116
|
-
accentHover: h(
|
|
6111
|
+
accent: a,
|
|
6112
|
+
accentHover: h(a, -15),
|
|
6117
6113
|
success: "#10b981",
|
|
6118
6114
|
error: "#ef4444",
|
|
6119
6115
|
border: "#27272a",
|
|
@@ -6126,8 +6122,8 @@ const Cs = [
|
|
|
6126
6122
|
textPrimary: "#18181b",
|
|
6127
6123
|
textSecondary: "#52525b",
|
|
6128
6124
|
textTertiary: "#71717a",
|
|
6129
|
-
accent:
|
|
6130
|
-
accentHover: h(
|
|
6125
|
+
accent: a,
|
|
6126
|
+
accentHover: h(a, -15),
|
|
6131
6127
|
success: "#10b981",
|
|
6132
6128
|
error: "#ef4444",
|
|
6133
6129
|
border: "#e4e4e7",
|
|
@@ -6158,7 +6154,7 @@ const Cs = [
|
|
|
6158
6154
|
},
|
|
6159
6155
|
children: [
|
|
6160
6156
|
/* @__PURE__ */ n.jsx(
|
|
6161
|
-
|
|
6157
|
+
oe,
|
|
6162
6158
|
{
|
|
6163
6159
|
size: 40,
|
|
6164
6160
|
color: g.accent,
|
|
@@ -6196,7 +6192,7 @@ const Cs = [
|
|
|
6196
6192
|
textAlign: "center"
|
|
6197
6193
|
},
|
|
6198
6194
|
children: [
|
|
6199
|
-
/* @__PURE__ */ n.jsx(
|
|
6195
|
+
/* @__PURE__ */ n.jsx(ae, { size: 40, color: g.error, "aria-hidden": "true" }),
|
|
6200
6196
|
/* @__PURE__ */ n.jsx("p", { style: { color: g.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
|
|
6201
6197
|
]
|
|
6202
6198
|
}
|
|
@@ -6280,7 +6276,7 @@ const Cs = [
|
|
|
6280
6276
|
role: "alert",
|
|
6281
6277
|
"aria-live": "polite",
|
|
6282
6278
|
children: [
|
|
6283
|
-
S.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
6279
|
+
S.type === "success" ? /* @__PURE__ */ n.jsx(de, { size: 20, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ae, { size: 20, "aria-hidden": "true" }),
|
|
6284
6280
|
S.message
|
|
6285
6281
|
]
|
|
6286
6282
|
}
|
|
@@ -6433,7 +6429,7 @@ const Cs = [
|
|
|
6433
6429
|
marginTop: "8px"
|
|
6434
6430
|
},
|
|
6435
6431
|
children: [
|
|
6436
|
-
f.isVerified ? /* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(
|
|
6432
|
+
f.isVerified ? /* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ n.jsx(ae, { size: 16, "aria-hidden": "true" }),
|
|
6437
6433
|
f.isVerified ? "Email Verified" : "Not Verified"
|
|
6438
6434
|
]
|
|
6439
6435
|
}
|
|
@@ -6505,7 +6501,7 @@ const Cs = [
|
|
|
6505
6501
|
},
|
|
6506
6502
|
children: [
|
|
6507
6503
|
c ? /* @__PURE__ */ n.jsx(
|
|
6508
|
-
|
|
6504
|
+
oe,
|
|
6509
6505
|
{
|
|
6510
6506
|
size: 16,
|
|
6511
6507
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6548,7 +6544,7 @@ const Cs = [
|
|
|
6548
6544
|
/* @__PURE__ */ n.jsxs(
|
|
6549
6545
|
"button",
|
|
6550
6546
|
{
|
|
6551
|
-
onClick: () =>
|
|
6547
|
+
onClick: () => I(!0),
|
|
6552
6548
|
style: {
|
|
6553
6549
|
backgroundColor: g.surfaceLight,
|
|
6554
6550
|
color: g.textPrimary,
|
|
@@ -6599,7 +6595,7 @@ const Cs = [
|
|
|
6599
6595
|
},
|
|
6600
6596
|
children: [
|
|
6601
6597
|
q ? /* @__PURE__ */ n.jsx(
|
|
6602
|
-
|
|
6598
|
+
oe,
|
|
6603
6599
|
{
|
|
6604
6600
|
size: 16,
|
|
6605
6601
|
style: { animation: "spin 1s linear infinite" },
|
|
@@ -6742,7 +6738,7 @@ const Cs = [
|
|
|
6742
6738
|
}
|
|
6743
6739
|
},
|
|
6744
6740
|
children: G.map((v) => {
|
|
6745
|
-
const
|
|
6741
|
+
const P = v.icon;
|
|
6746
6742
|
return /* @__PURE__ */ n.jsxs(
|
|
6747
6743
|
"div",
|
|
6748
6744
|
{
|
|
@@ -6764,7 +6760,7 @@ const Cs = [
|
|
|
6764
6760
|
gap: "8px"
|
|
6765
6761
|
},
|
|
6766
6762
|
children: [
|
|
6767
|
-
/* @__PURE__ */ n.jsx(
|
|
6763
|
+
/* @__PURE__ */ n.jsx(P, { size: 16, "aria-hidden": "true" }),
|
|
6768
6764
|
v.label
|
|
6769
6765
|
]
|
|
6770
6766
|
}
|
|
@@ -6781,7 +6777,7 @@ const Cs = [
|
|
|
6781
6777
|
style: {
|
|
6782
6778
|
padding: "12px",
|
|
6783
6779
|
borderRadius: "8px",
|
|
6784
|
-
border: `1px solid ${
|
|
6780
|
+
border: `1px solid ${a}`,
|
|
6785
6781
|
backgroundColor: "transparent",
|
|
6786
6782
|
color: g.textPrimary,
|
|
6787
6783
|
fontSize: "14px",
|
|
@@ -6909,7 +6905,7 @@ const Cs = [
|
|
|
6909
6905
|
/* @__PURE__ */ n.jsx(de, { size: 16, "aria-hidden": "true" }),
|
|
6910
6906
|
"Verified"
|
|
6911
6907
|
] }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
6912
|
-
/* @__PURE__ */ n.jsx(
|
|
6908
|
+
/* @__PURE__ */ n.jsx(ae, { size: 16, "aria-hidden": "true" }),
|
|
6913
6909
|
"Not Verified"
|
|
6914
6910
|
] })
|
|
6915
6911
|
}
|
|
@@ -6967,11 +6963,11 @@ const Cs = [
|
|
|
6967
6963
|
zs,
|
|
6968
6964
|
{
|
|
6969
6965
|
baseUrl: i,
|
|
6970
|
-
apiKey:
|
|
6966
|
+
apiKey: o,
|
|
6971
6967
|
appId: l,
|
|
6972
6968
|
userId: f.id,
|
|
6973
6969
|
isOpen: M,
|
|
6974
|
-
onClose: () =>
|
|
6970
|
+
onClose: () => I(!1),
|
|
6975
6971
|
onSuccess: (v) => j("success", v),
|
|
6976
6972
|
onError: (v) => j("error", v),
|
|
6977
6973
|
colors: g
|
|
@@ -6981,7 +6977,7 @@ const Cs = [
|
|
|
6981
6977
|
Os,
|
|
6982
6978
|
{
|
|
6983
6979
|
baseUrl: i,
|
|
6984
|
-
apiKey:
|
|
6980
|
+
apiKey: o,
|
|
6985
6981
|
appId: l,
|
|
6986
6982
|
userId: f.id,
|
|
6987
6983
|
token: e,
|
|
@@ -7064,15 +7060,15 @@ const Cs = [
|
|
|
7064
7060
|
]
|
|
7065
7061
|
}
|
|
7066
7062
|
);
|
|
7067
|
-
},
|
|
7063
|
+
}, ia = ({
|
|
7068
7064
|
darkMode: e = !0,
|
|
7069
7065
|
primaryColor: t = "#3b82f6",
|
|
7070
7066
|
onLogout: r,
|
|
7071
7067
|
varient: s = "classic",
|
|
7072
|
-
propUser:
|
|
7068
|
+
propUser: a,
|
|
7073
7069
|
className: i = "",
|
|
7074
7070
|
// New URL props with defaults
|
|
7075
|
-
profileUrl:
|
|
7071
|
+
profileUrl: o,
|
|
7076
7072
|
settingsUrl: l,
|
|
7077
7073
|
// Menu item visibility with defaults
|
|
7078
7074
|
showProfileMenuItem: f = !0,
|
|
@@ -7084,7 +7080,7 @@ const Cs = [
|
|
|
7084
7080
|
viewProfileLabel: k = "View Profile",
|
|
7085
7081
|
logoutLabel: c = "Sign Out"
|
|
7086
7082
|
}) => {
|
|
7087
|
-
const { baseUrl: b, apiKey: w, appId: N } = ye(), [M,
|
|
7083
|
+
const { baseUrl: b, apiKey: w, appId: N } = ye(), [M, I] = A(!1), [T, F] = A(null), [m, _] = A(!0), [S, $] = A(null), q = st(null), z = st(null), [X, H] = A(!1), [R, K] = A(!1);
|
|
7088
7084
|
se(() => {
|
|
7089
7085
|
const h = () => {
|
|
7090
7086
|
K(window.innerWidth < 768);
|
|
@@ -7113,10 +7109,10 @@ const Cs = [
|
|
|
7113
7109
|
se(() => {
|
|
7114
7110
|
(async () => {
|
|
7115
7111
|
try {
|
|
7116
|
-
if (_(!0), $(null),
|
|
7117
|
-
if (!
|
|
7112
|
+
if (_(!0), $(null), a) {
|
|
7113
|
+
if (!a.id || !a.name || !a.email)
|
|
7118
7114
|
throw new Error("Invalid user data provided");
|
|
7119
|
-
F(
|
|
7115
|
+
F(a), await J(a.id);
|
|
7120
7116
|
} else {
|
|
7121
7117
|
const g = localStorage.getItem("userInfo");
|
|
7122
7118
|
if (g)
|
|
@@ -7135,21 +7131,21 @@ const Cs = [
|
|
|
7135
7131
|
_(!1);
|
|
7136
7132
|
}
|
|
7137
7133
|
})();
|
|
7138
|
-
}, [
|
|
7134
|
+
}, [a]), se(() => {
|
|
7139
7135
|
const h = () => {
|
|
7140
7136
|
if (M && z.current) {
|
|
7141
|
-
const g = z.current.getBoundingClientRect(), G = window.innerWidth, v = window.innerHeight,
|
|
7137
|
+
const g = z.current.getBoundingClientRect(), G = window.innerWidth, v = window.innerHeight, P = 280, V = 300, Q = G - g.right, ie = g.left, be = v - g.bottom, sr = Q >= P || Q > ie;
|
|
7142
7138
|
H(sr), be < V && g.top > V;
|
|
7143
7139
|
}
|
|
7144
7140
|
};
|
|
7145
7141
|
return h(), window.addEventListener("resize", h), () => window.removeEventListener("resize", h);
|
|
7146
7142
|
}, [M]), se(() => {
|
|
7147
7143
|
const h = (v) => {
|
|
7148
|
-
q.current && !q.current.contains(v.target) && !z.current?.contains(v.target) &&
|
|
7144
|
+
q.current && !q.current.contains(v.target) && !z.current?.contains(v.target) && I(!1);
|
|
7149
7145
|
}, g = (v) => {
|
|
7150
|
-
v.key === "Escape" &&
|
|
7146
|
+
v.key === "Escape" && I(!1);
|
|
7151
7147
|
}, G = () => {
|
|
7152
|
-
M &&
|
|
7148
|
+
M && I(!1);
|
|
7153
7149
|
};
|
|
7154
7150
|
return M && (document.addEventListener("mousedown", h), document.addEventListener("keydown", g), window.addEventListener("scroll", G, { passive: !0 })), () => {
|
|
7155
7151
|
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", g), window.removeEventListener("scroll", G);
|
|
@@ -7384,7 +7380,7 @@ const Cs = [
|
|
|
7384
7380
|
_(!1);
|
|
7385
7381
|
}, x = (h, g) => {
|
|
7386
7382
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), g());
|
|
7387
|
-
}, C = () =>
|
|
7383
|
+
}, C = () => o || T?.profileUrl, D = () => {
|
|
7388
7384
|
const h = C();
|
|
7389
7385
|
h && window.open(h, "_blank", "noopener,noreferrer");
|
|
7390
7386
|
}, L = () => {
|
|
@@ -7403,8 +7399,8 @@ const Cs = [
|
|
|
7403
7399
|
"div",
|
|
7404
7400
|
{
|
|
7405
7401
|
ref: z,
|
|
7406
|
-
onClick: () =>
|
|
7407
|
-
onKeyDown: (h) => x(h, () =>
|
|
7402
|
+
onClick: () => I((h) => !h),
|
|
7403
|
+
onKeyDown: (h) => x(h, () => I((g) => !g)),
|
|
7408
7404
|
tabIndex: 0,
|
|
7409
7405
|
role: "button",
|
|
7410
7406
|
"aria-haspopup": "true",
|
|
@@ -7451,8 +7447,8 @@ const Cs = [
|
|
|
7451
7447
|
{
|
|
7452
7448
|
ref: z,
|
|
7453
7449
|
style: j.avatarButton,
|
|
7454
|
-
onClick: () =>
|
|
7455
|
-
onKeyDown: (h) => x(h, () =>
|
|
7450
|
+
onClick: () => I((h) => !h),
|
|
7451
|
+
onKeyDown: (h) => x(h, () => I((g) => !g)),
|
|
7456
7452
|
tabIndex: 0,
|
|
7457
7453
|
role: "button",
|
|
7458
7454
|
"aria-haspopup": "true",
|
|
@@ -7627,7 +7623,7 @@ const Cs = [
|
|
|
7627
7623
|
{
|
|
7628
7624
|
style: { display: "flex", alignItems: "center", gap: "8px" },
|
|
7629
7625
|
children: [
|
|
7630
|
-
/* @__PURE__ */ n.jsx(
|
|
7626
|
+
/* @__PURE__ */ n.jsx(ae, { size: 16, "aria-hidden": "true" }),
|
|
7631
7627
|
/* @__PURE__ */ n.jsx("span", { children: S || "Not signed in" })
|
|
7632
7628
|
]
|
|
7633
7629
|
}
|
|
@@ -7652,13 +7648,13 @@ const Cs = [
|
|
|
7652
7648
|
);
|
|
7653
7649
|
};
|
|
7654
7650
|
export {
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7651
|
+
ea as NeuctraAuthix,
|
|
7652
|
+
sa as ReactSignedIn,
|
|
7653
|
+
aa as ReactSignedOut,
|
|
7654
|
+
ia as ReactUserButton,
|
|
7655
|
+
na as ReactUserLogin,
|
|
7656
|
+
oa as ReactUserProfile,
|
|
7657
|
+
ra as ReactUserSignUp,
|
|
7662
7658
|
ye as getSdkConfig,
|
|
7663
|
-
|
|
7659
|
+
ta as setSdkConfig
|
|
7664
7660
|
};
|