@versini/sassysaint 1.0.8 → 1.0.9
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/chunks/{App.D3duFcJD.js → App.C6D9sIPY.js} +25 -25
- package/dist/chunks/{LazyHeader.B56caFgn.js → LazyHeader.p9mJYmhc.js} +335 -333
- package/dist/chunks/{LazyMarkdownWithExtra.C659-_hy.js → LazyMarkdownWithExtra.CA6Eg_N6.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.BP4_wS5W.js → LazyMessageAssistant.uUafovZf.js} +4 -4
- package/dist/chunks/{index.DruzEDnN.C6Ffe-lT.js → index.BcV6McvW.3HAbnzVE.js} +12 -12
- package/dist/chunks/{index.DcXJ8skl.js → index.t9wD3Z9D.js} +778 -774
- package/dist/chunks/{useLocalStorage.Cx1iecci.js → useLocalStorage.DagJSzA9.js} +9 -9
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as c, jsxs as v, Fragment as le } from "react/jsx-runtime";
|
|
2
|
+
import G, { createContext as ur, useReducer as Et, useRef as F, useCallback as te, useEffect as j, useContext as vt, useSyncExternalStore as mr, useId as Tt, useMemo as hr, useState as J, useLayoutEffect as pr, lazy as St, Suspense as It } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
4
|
var gr = Object.defineProperty, fr = (e, t, r) => t in e ? gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => fr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
|
-
@versini/auth-provider v6.2
|
|
6
|
+
@versini/auth-provider v6.3.2
|
|
7
7
|
© 2024 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "6.2
|
|
12
|
-
buildTime: "07/
|
|
11
|
+
version: "6.3.2",
|
|
12
|
+
buildTime: "07/23/2024 01:37 PM EDT",
|
|
13
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
@@ -28,7 +28,7 @@ function Se(e) {
|
|
|
28
28
|
s[i] = a.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ze() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
34
|
function At(e) {
|
|
@@ -42,7 +42,7 @@ function At(e) {
|
|
|
42
42
|
function kt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
|
-
let
|
|
45
|
+
let R = class extends Error {
|
|
46
46
|
constructor({ message: t, code: r, cause: n, name: a }) {
|
|
47
47
|
super(t, { cause: n }), this.name = a ?? n.name, this.code = r;
|
|
48
48
|
}
|
|
@@ -54,43 +54,43 @@ function yr({ error: e, options: t }) {
|
|
|
54
54
|
throw Error("options was missing required publicKey property");
|
|
55
55
|
if (e.name === "AbortError") {
|
|
56
56
|
if (t.signal instanceof AbortSignal)
|
|
57
|
-
return new
|
|
57
|
+
return new R({
|
|
58
58
|
message: "Registration ceremony was sent an abort signal",
|
|
59
59
|
code: "ERROR_CEREMONY_ABORTED",
|
|
60
60
|
cause: e
|
|
61
61
|
});
|
|
62
62
|
} else if (e.name === "ConstraintError") {
|
|
63
63
|
if (((r = a.authenticatorSelection) == null ? void 0 : r.requireResidentKey) === !0)
|
|
64
|
-
return new
|
|
64
|
+
return new R({
|
|
65
65
|
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
66
66
|
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
67
67
|
cause: e
|
|
68
68
|
});
|
|
69
69
|
if (((n = a.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
-
return new
|
|
70
|
+
return new R({
|
|
71
71
|
message: "User verification was required but no available authenticator supported it",
|
|
72
72
|
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
73
73
|
cause: e
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
76
76
|
if (e.name === "InvalidStateError")
|
|
77
|
-
return new
|
|
77
|
+
return new R({
|
|
78
78
|
message: "The authenticator was previously registered",
|
|
79
79
|
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
80
80
|
cause: e
|
|
81
81
|
});
|
|
82
82
|
if (e.name === "NotAllowedError")
|
|
83
|
-
return new
|
|
83
|
+
return new R({
|
|
84
84
|
message: e.message,
|
|
85
85
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
86
86
|
cause: e
|
|
87
87
|
});
|
|
88
88
|
if (e.name === "NotSupportedError")
|
|
89
|
-
return a.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new
|
|
89
|
+
return a.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new R({
|
|
90
90
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
91
91
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
92
92
|
cause: e
|
|
93
|
-
}) : new
|
|
93
|
+
}) : new R({
|
|
94
94
|
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
95
95
|
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
96
96
|
cause: e
|
|
@@ -99,25 +99,25 @@ function yr({ error: e, options: t }) {
|
|
|
99
99
|
const o = window.location.hostname;
|
|
100
100
|
if (kt(o)) {
|
|
101
101
|
if (a.rp.id !== o)
|
|
102
|
-
return new
|
|
102
|
+
return new R({
|
|
103
103
|
message: `The RP ID "${a.rp.id}" is invalid for this domain`,
|
|
104
104
|
code: "ERROR_INVALID_RP_ID",
|
|
105
105
|
cause: e
|
|
106
106
|
});
|
|
107
|
-
} else return new
|
|
107
|
+
} else return new R({
|
|
108
108
|
message: `${window.location.hostname} is an invalid domain`,
|
|
109
109
|
code: "ERROR_INVALID_DOMAIN",
|
|
110
110
|
cause: e
|
|
111
111
|
});
|
|
112
112
|
} else if (e.name === "TypeError") {
|
|
113
113
|
if (a.user.id.byteLength < 1 || a.user.id.byteLength > 64)
|
|
114
|
-
return new
|
|
114
|
+
return new R({
|
|
115
115
|
message: "User ID was not between 1 and 64 characters",
|
|
116
116
|
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
117
117
|
cause: e
|
|
118
118
|
});
|
|
119
119
|
} else if (e.name === "UnknownError")
|
|
120
|
-
return new
|
|
120
|
+
return new R({
|
|
121
121
|
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
122
122
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
123
123
|
cause: e
|
|
@@ -148,7 +148,7 @@ function Rt(e) {
|
|
|
148
148
|
}
|
|
149
149
|
async function Er(e) {
|
|
150
150
|
var t;
|
|
151
|
-
if (!
|
|
151
|
+
if (!ze())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const r = { publicKey: {
|
|
154
154
|
...e,
|
|
@@ -163,35 +163,35 @@ async function Er(e) {
|
|
|
163
163
|
let n;
|
|
164
164
|
try {
|
|
165
165
|
n = await navigator.credentials.create(r);
|
|
166
|
-
} catch (
|
|
167
|
-
throw yr({ error:
|
|
166
|
+
} catch (l) {
|
|
167
|
+
throw yr({ error: l, options: r });
|
|
168
168
|
}
|
|
169
169
|
if (!n)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
171
171
|
const { id: a, rawId: o, response: s, type: i } = n;
|
|
172
|
+
let p;
|
|
173
|
+
typeof s.getTransports == "function" && (p = s.getTransports());
|
|
172
174
|
let m;
|
|
173
|
-
typeof s.getTransports == "function" && (m = s.getTransports());
|
|
174
|
-
let d;
|
|
175
175
|
if (typeof s.getPublicKeyAlgorithm == "function")
|
|
176
176
|
try {
|
|
177
|
-
|
|
178
|
-
} catch (
|
|
179
|
-
Ue("getPublicKeyAlgorithm()",
|
|
177
|
+
m = s.getPublicKeyAlgorithm();
|
|
178
|
+
} catch (l) {
|
|
179
|
+
Ue("getPublicKeyAlgorithm()", l);
|
|
180
180
|
}
|
|
181
|
-
let
|
|
181
|
+
let u;
|
|
182
182
|
if (typeof s.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
} catch (
|
|
187
|
-
Ue("getPublicKey()",
|
|
184
|
+
const l = s.getPublicKey();
|
|
185
|
+
l !== null && (u = M(l));
|
|
186
|
+
} catch (l) {
|
|
187
|
+
Ue("getPublicKey()", l);
|
|
188
188
|
}
|
|
189
189
|
let g;
|
|
190
190
|
if (typeof s.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
192
|
g = M(s.getAuthenticatorData());
|
|
193
|
-
} catch (
|
|
194
|
-
Ue("getAuthenticatorData()",
|
|
193
|
+
} catch (l) {
|
|
194
|
+
Ue("getAuthenticatorData()", l);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
@@ -199,9 +199,9 @@ async function Er(e) {
|
|
|
199
199
|
response: {
|
|
200
200
|
attestationObject: M(s.attestationObject),
|
|
201
201
|
clientDataJSON: M(s.clientDataJSON),
|
|
202
|
-
transports:
|
|
203
|
-
publicKeyAlgorithm:
|
|
204
|
-
publicKey:
|
|
202
|
+
transports: p,
|
|
203
|
+
publicKeyAlgorithm: m,
|
|
204
|
+
publicKey: u,
|
|
205
205
|
authenticatorData: g
|
|
206
206
|
},
|
|
207
207
|
type: i,
|
|
@@ -214,7 +214,7 @@ function Ue(e, t) {
|
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
216
|
function vr() {
|
|
217
|
-
if (!
|
|
217
|
+
if (!ze())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
220
220
|
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
@@ -225,14 +225,14 @@ function Tr({ error: e, options: t }) {
|
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
226
226
|
if (e.name === "AbortError") {
|
|
227
227
|
if (t.signal instanceof AbortSignal)
|
|
228
|
-
return new
|
|
228
|
+
return new R({
|
|
229
229
|
message: "Authentication ceremony was sent an abort signal",
|
|
230
230
|
code: "ERROR_CEREMONY_ABORTED",
|
|
231
231
|
cause: e
|
|
232
232
|
});
|
|
233
233
|
} else {
|
|
234
234
|
if (e.name === "NotAllowedError")
|
|
235
|
-
return new
|
|
235
|
+
return new R({
|
|
236
236
|
message: e.message,
|
|
237
237
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
238
|
cause: e
|
|
@@ -241,18 +241,18 @@ function Tr({ error: e, options: t }) {
|
|
|
241
241
|
const n = window.location.hostname;
|
|
242
242
|
if (kt(n)) {
|
|
243
243
|
if (r.rpId !== n)
|
|
244
|
-
return new
|
|
244
|
+
return new R({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
246
246
|
code: "ERROR_INVALID_RP_ID",
|
|
247
247
|
cause: e
|
|
248
248
|
});
|
|
249
|
-
} else return new
|
|
249
|
+
} else return new R({
|
|
250
250
|
message: `${window.location.hostname} is an invalid domain`,
|
|
251
251
|
code: "ERROR_INVALID_DOMAIN",
|
|
252
252
|
cause: e
|
|
253
253
|
});
|
|
254
254
|
} else if (e.name === "UnknownError")
|
|
255
|
-
return new
|
|
255
|
+
return new R({
|
|
256
256
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
257
257
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
258
258
|
cause: e
|
|
@@ -262,7 +262,7 @@ function Tr({ error: e, options: t }) {
|
|
|
262
262
|
}
|
|
263
263
|
async function Sr(e, t = !1) {
|
|
264
264
|
var r, n;
|
|
265
|
-
if (!
|
|
265
|
+
if (!ze())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let a;
|
|
268
268
|
((r = e.allowCredentials) == null ? void 0 : r.length) !== 0 && (a = (n = e.allowCredentials) == null ? void 0 : n.map(At));
|
|
@@ -282,21 +282,21 @@ async function Sr(e, t = !1) {
|
|
|
282
282
|
let i;
|
|
283
283
|
try {
|
|
284
284
|
i = await navigator.credentials.get(s);
|
|
285
|
-
} catch (
|
|
286
|
-
throw Tr({ error:
|
|
285
|
+
} catch (d) {
|
|
286
|
+
throw Tr({ error: d, options: s });
|
|
287
287
|
}
|
|
288
288
|
if (!i)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id:
|
|
291
|
-
let
|
|
292
|
-
return
|
|
293
|
-
id:
|
|
294
|
-
rawId: M(
|
|
290
|
+
const { id: p, rawId: m, response: u, type: g } = i;
|
|
291
|
+
let l;
|
|
292
|
+
return u.userHandle && (l = M(u.userHandle)), {
|
|
293
|
+
id: p,
|
|
294
|
+
rawId: M(m),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData: M(
|
|
297
|
-
clientDataJSON: M(
|
|
298
|
-
signature: M(
|
|
299
|
-
userHandle:
|
|
296
|
+
authenticatorData: M(u.authenticatorData),
|
|
297
|
+
clientDataJSON: M(u.clientDataJSON),
|
|
298
|
+
signature: M(u.signature),
|
|
299
|
+
userHandle: l
|
|
300
300
|
},
|
|
301
301
|
type: g,
|
|
302
302
|
clientExtensionResults: i.getClientExtensionResults(),
|
|
@@ -304,13 +304,13 @@ async function Sr(e, t = !1) {
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
307
|
-
@versini/auth-common
|
|
307
|
+
@versini/auth-common v3.3.0
|
|
308
308
|
© 2024 gizmette.com
|
|
309
309
|
*/
|
|
310
310
|
try {
|
|
311
311
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
|
-
version: "
|
|
313
|
-
buildTime: "07/
|
|
312
|
+
version: "3.3.0",
|
|
313
|
+
buildTime: "07/23/2024 01:36 PM EDT",
|
|
314
314
|
homepage: "https://github.com/aversini/auth-client",
|
|
315
315
|
license: "MIT"
|
|
316
316
|
});
|
|
@@ -325,13 +325,16 @@ const re = {
|
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
326
|
}, Nt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
|
-
},
|
|
328
|
+
}, N = {
|
|
329
329
|
ALG: "RS256",
|
|
330
330
|
USER_ID_KEY: "sub",
|
|
331
331
|
TOKEN_ID_KEY: "__raw",
|
|
332
332
|
NONCE_KEY: "_nonce",
|
|
333
333
|
USERNAME_KEY: "username",
|
|
334
334
|
AUTH_TYPE_KEY: "auth_type",
|
|
335
|
+
EXPIRES_AT_KEY: "exp",
|
|
336
|
+
CREATED_AT_KEY: "iat",
|
|
337
|
+
SCOPES_KEY: "scopes",
|
|
335
338
|
ISSUER: "gizmette.com"
|
|
336
339
|
}, Ir = `-----BEGIN PUBLIC KEY-----
|
|
337
340
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
@@ -345,7 +348,7 @@ awIDAQAB
|
|
|
345
348
|
AUTHENTICATE: "authenticate",
|
|
346
349
|
CODE: "code",
|
|
347
350
|
LOGOUT: "logout"
|
|
348
|
-
}, Ne = crypto,
|
|
351
|
+
}, Ne = crypto, xt = (e) => e instanceof CryptoKey, ue = new TextEncoder(), de = new TextDecoder();
|
|
349
352
|
function Ar(...e) {
|
|
350
353
|
const t = e.reduce((a, { length: o }) => a + o, 0), r = new Uint8Array(t);
|
|
351
354
|
let n = 0;
|
|
@@ -398,23 +401,21 @@ class _r extends Y {
|
|
|
398
401
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
399
402
|
}
|
|
400
403
|
}
|
|
401
|
-
let
|
|
404
|
+
let V = class extends Y {
|
|
402
405
|
constructor() {
|
|
403
406
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
407
|
}
|
|
405
408
|
static get code() {
|
|
406
409
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
407
410
|
}
|
|
408
|
-
}
|
|
409
|
-
class R extends Y {
|
|
411
|
+
}, _ = class extends Y {
|
|
410
412
|
constructor() {
|
|
411
413
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
412
414
|
}
|
|
413
415
|
static get code() {
|
|
414
416
|
return "ERR_JWS_INVALID";
|
|
415
417
|
}
|
|
416
|
-
}
|
|
417
|
-
let G = class extends Y {
|
|
418
|
+
}, K = class extends Y {
|
|
418
419
|
constructor() {
|
|
419
420
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
420
421
|
}
|
|
@@ -430,7 +431,7 @@ class Rr extends Y {
|
|
|
430
431
|
return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
|
-
function
|
|
434
|
+
function H(e, t = "algorithm.name") {
|
|
434
435
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
435
436
|
}
|
|
436
437
|
function me(e, t) {
|
|
@@ -451,7 +452,7 @@ function Nr(e) {
|
|
|
451
452
|
throw new Error("unreachable");
|
|
452
453
|
}
|
|
453
454
|
}
|
|
454
|
-
function
|
|
455
|
+
function xr(e, t) {
|
|
455
456
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
456
457
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
457
458
|
if (t.length > 2) {
|
|
@@ -461,59 +462,59 @@ function Cr(e, t) {
|
|
|
461
462
|
throw new TypeError(r);
|
|
462
463
|
}
|
|
463
464
|
}
|
|
464
|
-
function
|
|
465
|
+
function Cr(e, t, ...r) {
|
|
465
466
|
switch (t) {
|
|
466
467
|
case "HS256":
|
|
467
468
|
case "HS384":
|
|
468
469
|
case "HS512": {
|
|
469
470
|
if (!me(e.algorithm, "HMAC"))
|
|
470
|
-
throw
|
|
471
|
+
throw H("HMAC");
|
|
471
472
|
const n = parseInt(t.slice(2), 10);
|
|
472
473
|
if (He(e.algorithm.hash) !== n)
|
|
473
|
-
throw
|
|
474
|
+
throw H(`SHA-${n}`, "algorithm.hash");
|
|
474
475
|
break;
|
|
475
476
|
}
|
|
476
477
|
case "RS256":
|
|
477
478
|
case "RS384":
|
|
478
479
|
case "RS512": {
|
|
479
480
|
if (!me(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
480
|
-
throw
|
|
481
|
+
throw H("RSASSA-PKCS1-v1_5");
|
|
481
482
|
const n = parseInt(t.slice(2), 10);
|
|
482
483
|
if (He(e.algorithm.hash) !== n)
|
|
483
|
-
throw
|
|
484
|
+
throw H(`SHA-${n}`, "algorithm.hash");
|
|
484
485
|
break;
|
|
485
486
|
}
|
|
486
487
|
case "PS256":
|
|
487
488
|
case "PS384":
|
|
488
489
|
case "PS512": {
|
|
489
490
|
if (!me(e.algorithm, "RSA-PSS"))
|
|
490
|
-
throw
|
|
491
|
+
throw H("RSA-PSS");
|
|
491
492
|
const n = parseInt(t.slice(2), 10);
|
|
492
493
|
if (He(e.algorithm.hash) !== n)
|
|
493
|
-
throw
|
|
494
|
+
throw H(`SHA-${n}`, "algorithm.hash");
|
|
494
495
|
break;
|
|
495
496
|
}
|
|
496
497
|
case "EdDSA": {
|
|
497
498
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
498
|
-
throw
|
|
499
|
+
throw H("Ed25519 or Ed448");
|
|
499
500
|
break;
|
|
500
501
|
}
|
|
501
502
|
case "ES256":
|
|
502
503
|
case "ES384":
|
|
503
504
|
case "ES512": {
|
|
504
505
|
if (!me(e.algorithm, "ECDSA"))
|
|
505
|
-
throw
|
|
506
|
+
throw H("ECDSA");
|
|
506
507
|
const n = Nr(t);
|
|
507
508
|
if (e.algorithm.namedCurve !== n)
|
|
508
|
-
throw
|
|
509
|
+
throw H(n, "algorithm.namedCurve");
|
|
509
510
|
break;
|
|
510
511
|
}
|
|
511
512
|
default:
|
|
512
513
|
throw new TypeError("CryptoKey does not support this operation");
|
|
513
514
|
}
|
|
514
|
-
|
|
515
|
+
xr(e, r);
|
|
515
516
|
}
|
|
516
|
-
function
|
|
517
|
+
function Ct(e, t, ...r) {
|
|
517
518
|
var n;
|
|
518
519
|
if (r.length > 2) {
|
|
519
520
|
const a = r.pop();
|
|
@@ -521,11 +522,11 @@ function xt(e, t, ...r) {
|
|
|
521
522
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
522
523
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
523
524
|
}
|
|
524
|
-
const nt = (e, ...t) =>
|
|
525
|
+
const nt = (e, ...t) => Ct("Key must be ", e, ...t);
|
|
525
526
|
function Ot(e, t, ...r) {
|
|
526
|
-
return
|
|
527
|
+
return Ct(`Key for the ${e} algorithm must be `, t, ...r);
|
|
527
528
|
}
|
|
528
|
-
const Pt = (e) =>
|
|
529
|
+
const Pt = (e) => xt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ie = ["CryptoKey"], Or = (...e) => {
|
|
529
530
|
const t = e.filter(Boolean);
|
|
530
531
|
if (t.length === 0 || t.length === 1)
|
|
531
532
|
return !0;
|
|
@@ -589,7 +590,7 @@ function $r(e) {
|
|
|
589
590
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
590
591
|
break;
|
|
591
592
|
default:
|
|
592
|
-
throw new
|
|
593
|
+
throw new V('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
593
594
|
}
|
|
594
595
|
break;
|
|
595
596
|
}
|
|
@@ -611,7 +612,7 @@ function $r(e) {
|
|
|
611
612
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
612
613
|
break;
|
|
613
614
|
default:
|
|
614
|
-
throw new
|
|
615
|
+
throw new V('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
615
616
|
}
|
|
616
617
|
break;
|
|
617
618
|
}
|
|
@@ -627,12 +628,12 @@ function $r(e) {
|
|
|
627
628
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
628
629
|
break;
|
|
629
630
|
default:
|
|
630
|
-
throw new
|
|
631
|
+
throw new V('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
631
632
|
}
|
|
632
633
|
break;
|
|
633
634
|
}
|
|
634
635
|
default:
|
|
635
|
-
throw new
|
|
636
|
+
throw new V('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
636
637
|
}
|
|
637
638
|
return { algorithm: t, keyUsages: r };
|
|
638
639
|
}
|
|
@@ -665,35 +666,35 @@ const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
665
666
|
return r.k ? Dt(r.k) : (Ke || (Ke = /* @__PURE__ */ new WeakMap()), Mt(Ke, e, r, t));
|
|
666
667
|
}
|
|
667
668
|
return e;
|
|
668
|
-
}, Hr = { normalizePublicKey: Lr, normalizePrivateKey: Ur },
|
|
669
|
+
}, Hr = { normalizePublicKey: Lr, normalizePrivateKey: Ur }, W = (e, t, r = 0) => {
|
|
669
670
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
670
671
|
const n = e.indexOf(t[0], r);
|
|
671
672
|
if (n === -1)
|
|
672
673
|
return !1;
|
|
673
674
|
const a = e.subarray(n, n + t.length);
|
|
674
|
-
return a.length !== t.length ? !1 : a.every((o, s) => o === t[s]) ||
|
|
675
|
+
return a.length !== t.length ? !1 : a.every((o, s) => o === t[s]) || W(e, t, n + 1);
|
|
675
676
|
}, at = (e) => {
|
|
676
677
|
switch (!0) {
|
|
677
|
-
case
|
|
678
|
+
case W(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
678
679
|
return "P-256";
|
|
679
|
-
case
|
|
680
|
+
case W(e, [43, 129, 4, 0, 34]):
|
|
680
681
|
return "P-384";
|
|
681
|
-
case
|
|
682
|
+
case W(e, [43, 129, 4, 0, 35]):
|
|
682
683
|
return "P-521";
|
|
683
|
-
case
|
|
684
|
+
case W(e, [43, 101, 110]):
|
|
684
685
|
return "X25519";
|
|
685
|
-
case
|
|
686
|
+
case W(e, [43, 101, 111]):
|
|
686
687
|
return "X448";
|
|
687
|
-
case
|
|
688
|
+
case W(e, [43, 101, 112]):
|
|
688
689
|
return "Ed25519";
|
|
689
|
-
case
|
|
690
|
+
case W(e, [43, 101, 113]):
|
|
690
691
|
return "Ed448";
|
|
691
692
|
default:
|
|
692
|
-
throw new
|
|
693
|
+
throw new V("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
693
694
|
}
|
|
694
695
|
}, Kr = async (e, t, r, n, a) => {
|
|
695
696
|
let o, s;
|
|
696
|
-
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((
|
|
697
|
+
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((p) => p.charCodeAt(0)));
|
|
697
698
|
switch (n) {
|
|
698
699
|
case "PS256":
|
|
699
700
|
case "PS384":
|
|
@@ -727,15 +728,15 @@ const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
727
728
|
case "ECDH-ES+A128KW":
|
|
728
729
|
case "ECDH-ES+A192KW":
|
|
729
730
|
case "ECDH-ES+A256KW": {
|
|
730
|
-
const
|
|
731
|
-
o =
|
|
731
|
+
const p = at(i);
|
|
732
|
+
o = p.startsWith("P-") ? { name: "ECDH", namedCurve: p } : { name: p }, s = [];
|
|
732
733
|
break;
|
|
733
734
|
}
|
|
734
735
|
case "EdDSA":
|
|
735
736
|
o = { name: at(i) }, s = ["verify"];
|
|
736
737
|
break;
|
|
737
738
|
default:
|
|
738
|
-
throw new
|
|
739
|
+
throw new V('Invalid or unsupported "alg" (Algorithm) value');
|
|
739
740
|
}
|
|
740
741
|
return Ne.subtle.importKey(t, i, o, !1, s);
|
|
741
742
|
}, Gr = (e, t, r) => Kr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
@@ -774,7 +775,7 @@ function Jr(e, t, r, n, a) {
|
|
|
774
775
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
775
776
|
for (const s of n.crit) {
|
|
776
777
|
if (!o.has(s))
|
|
777
|
-
throw new
|
|
778
|
+
throw new V(`Extension Header Parameter "${s}" is not recognized`);
|
|
778
779
|
if (a[s] === void 0)
|
|
779
780
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
780
781
|
if (o.get(s) && n[s] === void 0)
|
|
@@ -788,7 +789,7 @@ const jr = (e, t) => {
|
|
|
788
789
|
if (t)
|
|
789
790
|
return new Set(t);
|
|
790
791
|
};
|
|
791
|
-
function
|
|
792
|
+
function Yr(e, t) {
|
|
792
793
|
const r = `SHA-${e.slice(-3)}`;
|
|
793
794
|
switch (e) {
|
|
794
795
|
case "HS256":
|
|
@@ -810,12 +811,12 @@ function zr(e, t) {
|
|
|
810
811
|
case "EdDSA":
|
|
811
812
|
return { name: t.name };
|
|
812
813
|
default:
|
|
813
|
-
throw new
|
|
814
|
+
throw new V(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
814
815
|
}
|
|
815
816
|
}
|
|
816
|
-
async function
|
|
817
|
-
if (t = await Hr.normalizePublicKey(t, e),
|
|
818
|
-
return
|
|
817
|
+
async function zr(e, t, r) {
|
|
818
|
+
if (t = await Hr.normalizePublicKey(t, e), xt(t))
|
|
819
|
+
return Cr(t, e, r), t;
|
|
819
820
|
if (t instanceof Uint8Array) {
|
|
820
821
|
if (!e.startsWith("HS"))
|
|
821
822
|
throw new TypeError(nt(t, ...Ie));
|
|
@@ -824,9 +825,9 @@ async function Yr(e, t, r) {
|
|
|
824
825
|
throw new TypeError(nt(t, ...Ie, "Uint8Array"));
|
|
825
826
|
}
|
|
826
827
|
const qr = async (e, t, r, n) => {
|
|
827
|
-
const a = await
|
|
828
|
+
const a = await zr(e, t, "verify");
|
|
828
829
|
Dr(e, a);
|
|
829
|
-
const o =
|
|
830
|
+
const o = Yr(e, a.algorithm);
|
|
830
831
|
try {
|
|
831
832
|
return await Ne.subtle.verify(o, a, r, n);
|
|
832
833
|
} catch {
|
|
@@ -835,75 +836,75 @@ const qr = async (e, t, r, n) => {
|
|
|
835
836
|
};
|
|
836
837
|
async function Qr(e, t, r) {
|
|
837
838
|
if (!Ae(e))
|
|
838
|
-
throw new
|
|
839
|
+
throw new _("Flattened JWS must be an object");
|
|
839
840
|
if (e.protected === void 0 && e.header === void 0)
|
|
840
|
-
throw new
|
|
841
|
+
throw new _('Flattened JWS must have either of the "protected" or "header" members');
|
|
841
842
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
842
|
-
throw new
|
|
843
|
+
throw new _("JWS Protected Header incorrect type");
|
|
843
844
|
if (e.payload === void 0)
|
|
844
|
-
throw new
|
|
845
|
+
throw new _("JWS Payload missing");
|
|
845
846
|
if (typeof e.signature != "string")
|
|
846
|
-
throw new
|
|
847
|
+
throw new _("JWS Signature missing or incorrect type");
|
|
847
848
|
if (e.header !== void 0 && !Ae(e.header))
|
|
848
|
-
throw new
|
|
849
|
+
throw new _("JWS Unprotected Header incorrect type");
|
|
849
850
|
let n = {};
|
|
850
851
|
if (e.protected)
|
|
851
852
|
try {
|
|
852
|
-
const
|
|
853
|
-
n = JSON.parse(de.decode(
|
|
853
|
+
const h = ie(e.protected);
|
|
854
|
+
n = JSON.parse(de.decode(h));
|
|
854
855
|
} catch {
|
|
855
|
-
throw new
|
|
856
|
+
throw new _("JWS Protected Header is invalid");
|
|
856
857
|
}
|
|
857
858
|
if (!Or(n, e.header))
|
|
858
|
-
throw new
|
|
859
|
+
throw new _("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
859
860
|
const a = {
|
|
860
861
|
...n,
|
|
861
862
|
...e.header
|
|
862
|
-
}, o = Jr(
|
|
863
|
+
}, o = Jr(_, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, n, a);
|
|
863
864
|
let s = !0;
|
|
864
865
|
if (o.has("b64") && (s = n.b64, typeof s != "boolean"))
|
|
865
|
-
throw new
|
|
866
|
+
throw new _('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
866
867
|
const { alg: i } = a;
|
|
867
868
|
if (typeof i != "string" || !i)
|
|
868
|
-
throw new
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
869
|
+
throw new _('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
870
|
+
const p = r && jr("algorithms", r.algorithms);
|
|
871
|
+
if (p && !p.has(i))
|
|
871
872
|
throw new _r('"alg" (Algorithm) Header Parameter value not allowed');
|
|
872
873
|
if (s) {
|
|
873
874
|
if (typeof e.payload != "string")
|
|
874
|
-
throw new
|
|
875
|
+
throw new _("JWS Payload must be a string");
|
|
875
876
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
876
|
-
throw new
|
|
877
|
-
let
|
|
878
|
-
typeof t == "function" && (t = await t(n, e),
|
|
879
|
-
const
|
|
877
|
+
throw new _("JWS Payload must be a string or an Uint8Array instance");
|
|
878
|
+
let m = !1;
|
|
879
|
+
typeof t == "function" && (t = await t(n, e), m = !0), Fr(i, t, "verify");
|
|
880
|
+
const u = Ar(ue.encode(e.protected ?? ""), ue.encode("."), typeof e.payload == "string" ? ue.encode(e.payload) : e.payload);
|
|
880
881
|
let g;
|
|
881
882
|
try {
|
|
882
883
|
g = ie(e.signature);
|
|
883
884
|
} catch {
|
|
884
|
-
throw new
|
|
885
|
+
throw new _("Failed to base64url decode the signature");
|
|
885
886
|
}
|
|
886
|
-
if (!await qr(i, t, g,
|
|
887
|
+
if (!await qr(i, t, g, u))
|
|
887
888
|
throw new Rr();
|
|
888
|
-
let
|
|
889
|
+
let l;
|
|
889
890
|
if (s)
|
|
890
891
|
try {
|
|
891
|
-
|
|
892
|
+
l = ie(e.payload);
|
|
892
893
|
} catch {
|
|
893
|
-
throw new
|
|
894
|
+
throw new _("Failed to base64url decode the payload");
|
|
894
895
|
}
|
|
895
|
-
else typeof e.payload == "string" ?
|
|
896
|
-
const
|
|
897
|
-
return e.protected !== void 0 && (
|
|
896
|
+
else typeof e.payload == "string" ? l = ue.encode(e.payload) : l = e.payload;
|
|
897
|
+
const d = { payload: l };
|
|
898
|
+
return e.protected !== void 0 && (d.protectedHeader = n), e.header !== void 0 && (d.unprotectedHeader = e.header), m ? { ...d, key: t } : d;
|
|
898
899
|
}
|
|
899
900
|
async function Xr(e, t, r) {
|
|
900
901
|
if (e instanceof Uint8Array && (e = de.decode(e)), typeof e != "string")
|
|
901
|
-
throw new
|
|
902
|
+
throw new _("Compact JWS must be a string or Uint8Array");
|
|
902
903
|
const { 0: n, 1: a, 2: o, length: s } = e.split(".");
|
|
903
904
|
if (s !== 3)
|
|
904
|
-
throw new
|
|
905
|
-
const i = await Qr({ payload: a, protected: n, signature: o }, t, r),
|
|
906
|
-
return typeof t == "function" ? { ...
|
|
905
|
+
throw new _("Invalid Compact JWS");
|
|
906
|
+
const i = await Qr({ payload: a, protected: n, signature: o }, t, r), p = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
907
|
+
return typeof t == "function" ? { ...p, key: i.key } : p;
|
|
907
908
|
}
|
|
908
909
|
const Zr = (e) => Math.floor(e.getTime() / 1e3), Lt = 60, Ut = Lt * 60, qe = Ut * 24, en = qe * 7, tn = qe * 365.25, rn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, ot = (e) => {
|
|
909
910
|
const t = rn.exec(e);
|
|
@@ -955,20 +956,20 @@ const Zr = (e) => Math.floor(e.getTime() / 1e3), Lt = 60, Ut = Lt * 60, qe = Ut
|
|
|
955
956
|
} catch {
|
|
956
957
|
}
|
|
957
958
|
if (!Ae(n))
|
|
958
|
-
throw new
|
|
959
|
+
throw new K("JWT Claims Set must be a top-level JSON object");
|
|
959
960
|
const { typ: a } = r;
|
|
960
961
|
if (a && (typeof e.typ != "string" || st(e.typ) !== st(a)))
|
|
961
962
|
throw new $('unexpected "typ" JWT header value', n, "typ", "check_failed");
|
|
962
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience:
|
|
963
|
-
|
|
964
|
-
for (const
|
|
965
|
-
if (!(
|
|
966
|
-
throw new $(`missing required "${
|
|
963
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: p, maxTokenAge: m } = r, u = [...o];
|
|
964
|
+
m !== void 0 && u.push("iat"), p !== void 0 && u.push("aud"), i !== void 0 && u.push("sub"), s !== void 0 && u.push("iss");
|
|
965
|
+
for (const h of new Set(u.reverse()))
|
|
966
|
+
if (!(h in n))
|
|
967
|
+
throw new $(`missing required "${h}" claim`, n, h, "missing");
|
|
967
968
|
if (s && !(Array.isArray(s) ? s : [s]).includes(n.iss))
|
|
968
969
|
throw new $('unexpected "iss" claim value', n, "iss", "check_failed");
|
|
969
970
|
if (i && n.sub !== i)
|
|
970
971
|
throw new $('unexpected "sub" claim value', n, "sub", "check_failed");
|
|
971
|
-
if (
|
|
972
|
+
if (p && !nn(n.aud, typeof p == "string" ? [p] : p))
|
|
972
973
|
throw new $('unexpected "aud" claim value', n, "aud", "check_failed");
|
|
973
974
|
let g;
|
|
974
975
|
switch (typeof r.clockTolerance) {
|
|
@@ -984,26 +985,26 @@ const Zr = (e) => Math.floor(e.getTime() / 1e3), Lt = 60, Ut = Lt * 60, qe = Ut
|
|
|
984
985
|
default:
|
|
985
986
|
throw new TypeError("Invalid clockTolerance option type");
|
|
986
987
|
}
|
|
987
|
-
const { currentDate:
|
|
988
|
-
if ((n.iat !== void 0 ||
|
|
988
|
+
const { currentDate: l } = r, d = Zr(l || /* @__PURE__ */ new Date());
|
|
989
|
+
if ((n.iat !== void 0 || m) && typeof n.iat != "number")
|
|
989
990
|
throw new $('"iat" claim must be a number', n, "iat", "invalid");
|
|
990
991
|
if (n.nbf !== void 0) {
|
|
991
992
|
if (typeof n.nbf != "number")
|
|
992
993
|
throw new $('"nbf" claim must be a number', n, "nbf", "invalid");
|
|
993
|
-
if (n.nbf >
|
|
994
|
+
if (n.nbf > d + g)
|
|
994
995
|
throw new $('"nbf" claim timestamp check failed', n, "nbf", "check_failed");
|
|
995
996
|
}
|
|
996
997
|
if (n.exp !== void 0) {
|
|
997
998
|
if (typeof n.exp != "number")
|
|
998
999
|
throw new $('"exp" claim must be a number', n, "exp", "invalid");
|
|
999
|
-
if (n.exp <=
|
|
1000
|
+
if (n.exp <= d - g)
|
|
1000
1001
|
throw new rt('"exp" claim timestamp check failed', n, "exp", "check_failed");
|
|
1001
1002
|
}
|
|
1002
|
-
if (
|
|
1003
|
-
const
|
|
1004
|
-
if (
|
|
1003
|
+
if (m) {
|
|
1004
|
+
const h = d - n.iat, y = typeof m == "number" ? m : ot(m);
|
|
1005
|
+
if (h - g > y)
|
|
1005
1006
|
throw new rt('"iat" claim timestamp check failed (too far in the past)', n, "iat", "check_failed");
|
|
1006
|
-
if (
|
|
1007
|
+
if (h < 0 - g)
|
|
1007
1008
|
throw new $('"iat" claim timestamp check failed (it should be in the past)', n, "iat", "check_failed");
|
|
1008
1009
|
}
|
|
1009
1010
|
return n;
|
|
@@ -1012,42 +1013,42 @@ async function on(e, t, r) {
|
|
|
1012
1013
|
var n;
|
|
1013
1014
|
const a = await Xr(e, t, r);
|
|
1014
1015
|
if ((n = a.protectedHeader.crit) != null && n.includes("b64") && a.protectedHeader.b64 === !1)
|
|
1015
|
-
throw new
|
|
1016
|
+
throw new K("JWTs MUST NOT use unencoded payload");
|
|
1016
1017
|
const o = { payload: an(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
|
|
1017
1018
|
return typeof t == "function" ? { ...o, key: a.key } : o;
|
|
1018
1019
|
}
|
|
1019
1020
|
const sn = ie;
|
|
1020
1021
|
function cn(e) {
|
|
1021
1022
|
if (typeof e != "string")
|
|
1022
|
-
throw new
|
|
1023
|
+
throw new K("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1023
1024
|
const { 1: t, length: r } = e.split(".");
|
|
1024
1025
|
if (r === 5)
|
|
1025
|
-
throw new
|
|
1026
|
+
throw new K("Only JWTs using Compact JWS serialization can be decoded");
|
|
1026
1027
|
if (r !== 3)
|
|
1027
|
-
throw new
|
|
1028
|
+
throw new K("Invalid JWT");
|
|
1028
1029
|
if (!t)
|
|
1029
|
-
throw new
|
|
1030
|
+
throw new K("JWTs must contain a payload");
|
|
1030
1031
|
let n;
|
|
1031
1032
|
try {
|
|
1032
1033
|
n = sn(t);
|
|
1033
1034
|
} catch {
|
|
1034
|
-
throw new
|
|
1035
|
+
throw new K("Failed to base64url decode the payload");
|
|
1035
1036
|
}
|
|
1036
1037
|
let a;
|
|
1037
1038
|
try {
|
|
1038
1039
|
a = JSON.parse(de.decode(n));
|
|
1039
1040
|
} catch {
|
|
1040
|
-
throw new
|
|
1041
|
+
throw new K("Failed to parse the decoded payload as JSON");
|
|
1041
1042
|
}
|
|
1042
1043
|
if (!Ae(a))
|
|
1043
|
-
throw new
|
|
1044
|
+
throw new K("Invalid JWT Claims Set");
|
|
1044
1045
|
return a;
|
|
1045
1046
|
}
|
|
1046
1047
|
const ce = async (e) => {
|
|
1047
1048
|
try {
|
|
1048
|
-
const t =
|
|
1049
|
+
const t = N.ALG, r = await Br(Ir, t);
|
|
1049
1050
|
return await on(e, r, {
|
|
1050
|
-
issuer:
|
|
1051
|
+
issuer: N.ISSUER
|
|
1051
1052
|
});
|
|
1052
1053
|
} catch {
|
|
1053
1054
|
return;
|
|
@@ -1059,11 +1060,11 @@ const ce = async (e) => {
|
|
|
1059
1060
|
return;
|
|
1060
1061
|
}
|
|
1061
1062
|
};
|
|
1062
|
-
var
|
|
1063
|
+
var A = [];
|
|
1063
1064
|
for (var Be = 0; Be < 256; ++Be)
|
|
1064
|
-
|
|
1065
|
+
A.push((Be + 256).toString(16).slice(1));
|
|
1065
1066
|
function dn(e, t = 0) {
|
|
1066
|
-
return (
|
|
1067
|
+
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
|
1067
1068
|
}
|
|
1068
1069
|
var he, un = new Uint8Array(16);
|
|
1069
1070
|
function mn() {
|
|
@@ -1130,7 +1131,7 @@ function pe({
|
|
|
1130
1131
|
}, [t, n]), o = te(() => {
|
|
1131
1132
|
n(null);
|
|
1132
1133
|
}, [n]);
|
|
1133
|
-
return
|
|
1134
|
+
return j(() => {
|
|
1134
1135
|
try {
|
|
1135
1136
|
ut(e) === null && typeof t < "u" && dt(e, t);
|
|
1136
1137
|
} catch (s) {
|
|
@@ -1138,11 +1139,11 @@ function pe({
|
|
|
1138
1139
|
}
|
|
1139
1140
|
}, [e, t]), [r ? JSON.parse(r) : null, n, a, o];
|
|
1140
1141
|
}
|
|
1141
|
-
var
|
|
1142
|
+
var k = [];
|
|
1142
1143
|
for (var We = 0; We < 256; ++We)
|
|
1143
|
-
|
|
1144
|
+
k.push((We + 256).toString(16).slice(1));
|
|
1144
1145
|
function En(e, t = 0) {
|
|
1145
|
-
return (
|
|
1146
|
+
return (k[e[t + 0]] + k[e[t + 1]] + k[e[t + 2]] + k[e[t + 3]] + "-" + k[e[t + 4]] + k[e[t + 5]] + "-" + k[e[t + 6]] + k[e[t + 7]] + "-" + k[e[t + 8]] + k[e[t + 9]] + "-" + k[e[t + 10]] + k[e[t + 11]] + k[e[t + 12]] + k[e[t + 13]] + k[e[t + 14]] + k[e[t + 15]]).toLowerCase();
|
|
1146
1147
|
}
|
|
1147
1148
|
var ge, vn = new Uint8Array(16);
|
|
1148
1149
|
function Tn() {
|
|
@@ -1190,21 +1191,21 @@ async function An(e, t, r = 50) {
|
|
|
1190
1191
|
await ht(r);
|
|
1191
1192
|
const i = s.createElement("iframe");
|
|
1192
1193
|
try {
|
|
1193
|
-
for (await new Promise((
|
|
1194
|
-
let
|
|
1194
|
+
for (await new Promise((p, m) => {
|
|
1195
|
+
let u = !1;
|
|
1195
1196
|
const g = () => {
|
|
1196
|
-
|
|
1197
|
-
},
|
|
1198
|
-
|
|
1197
|
+
u = !0, p();
|
|
1198
|
+
}, l = (y) => {
|
|
1199
|
+
u = !0, m(y);
|
|
1199
1200
|
};
|
|
1200
|
-
i.onload = g, i.onerror =
|
|
1201
|
-
const { style:
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1204
|
-
var
|
|
1205
|
-
|
|
1201
|
+
i.onload = g, i.onerror = l;
|
|
1202
|
+
const { style: d } = i;
|
|
1203
|
+
d.setProperty("display", "block", "important"), d.position = "absolute", d.top = "0", d.left = "0", d.visibility = "hidden", i.src = "about:blank", s.body.appendChild(i);
|
|
1204
|
+
const h = () => {
|
|
1205
|
+
var y, w;
|
|
1206
|
+
u || (((w = (y = i.contentWindow) == null ? void 0 : y.document) == null ? void 0 : w.readyState) === "complete" ? g() : setTimeout(h, 10));
|
|
1206
1207
|
};
|
|
1207
|
-
|
|
1208
|
+
h();
|
|
1208
1209
|
}); !((a = (n = i.contentWindow) == null ? void 0 : n.document) != null && a.body); )
|
|
1209
1210
|
await ht(r);
|
|
1210
1211
|
return await e(i, i.contentWindow);
|
|
@@ -1253,7 +1254,7 @@ const kn = {
|
|
|
1253
1254
|
try {
|
|
1254
1255
|
const t = Array.from(
|
|
1255
1256
|
{ length: 3 },
|
|
1256
|
-
() =>
|
|
1257
|
+
() => xn(300, 30)
|
|
1257
1258
|
), r = On(t, 300, 30);
|
|
1258
1259
|
return {
|
|
1259
1260
|
canvas: {
|
|
@@ -1263,7 +1264,7 @@ const kn = {
|
|
|
1263
1264
|
} catch {
|
|
1264
1265
|
return Bt;
|
|
1265
1266
|
}
|
|
1266
|
-
},
|
|
1267
|
+
}, xn = (e, t) => {
|
|
1267
1268
|
const r = document.createElement("canvas"), n = r.getContext("2d");
|
|
1268
1269
|
if (!n)
|
|
1269
1270
|
return new ImageData(1, 1);
|
|
@@ -1272,7 +1273,7 @@ const kn = {
|
|
|
1272
1273
|
a.addColorStop(0, "red"), a.addColorStop(1 / 6, "orange"), a.addColorStop(2 / 6, "yellow"), a.addColorStop(3 / 6, "green"), a.addColorStop(4 / 6, "blue"), a.addColorStop(5 / 6, "indigo"), a.addColorStop(1, "violet"), n.fillStyle = a, n.fillRect(0, 0, r.width, r.height);
|
|
1273
1274
|
const o = "mmMwWLliI0O&1 - Les sanglots longs des violons de l'automne blessent mon coeur d'une langueur monotone";
|
|
1274
1275
|
return n.font = "26.321px Arial", n.fillStyle = "black", n.fillText(o, -5, 15), n.fillStyle = "rgba(0, 0, 255, 0.5)", n.fillText(o, -3.3, 17.7), n.beginPath(), n.moveTo(0, 0), n.lineTo(r.width * 2 / 7, r.height), n.strokeStyle = "white", n.lineWidth = 2, n.stroke(), n.getImageData(0, 0, r.width, r.height);
|
|
1275
|
-
},
|
|
1276
|
+
}, Cn = (e) => {
|
|
1276
1277
|
if (e.length === 0)
|
|
1277
1278
|
return 0;
|
|
1278
1279
|
const t = {};
|
|
@@ -1286,9 +1287,9 @@ const kn = {
|
|
|
1286
1287
|
const n = [];
|
|
1287
1288
|
for (let s = 0; s < e[0].data.length; s++) {
|
|
1288
1289
|
const i = [];
|
|
1289
|
-
for (let
|
|
1290
|
-
i.push(e[
|
|
1291
|
-
n.push(
|
|
1290
|
+
for (let p = 0; p < e.length; p++)
|
|
1291
|
+
i.push(e[p].data[s]);
|
|
1292
|
+
n.push(Cn(i));
|
|
1292
1293
|
}
|
|
1293
1294
|
const a = n, o = new Uint8ClampedArray(a);
|
|
1294
1295
|
return new ImageData(o, t, r);
|
|
@@ -1335,23 +1336,23 @@ const kn = {
|
|
|
1335
1336
|
n.style.fontSize = $n;
|
|
1336
1337
|
const a = r.createElement("div");
|
|
1337
1338
|
a.style.setProperty("visibility", "hidden", "important");
|
|
1338
|
-
const o = {}, s = {}, i = (
|
|
1339
|
-
const
|
|
1340
|
-
return w.position = "absolute", w.top = "0", w.left = "0", w.fontFamily =
|
|
1341
|
-
},
|
|
1342
|
-
const
|
|
1343
|
-
for (const
|
|
1344
|
-
|
|
1345
|
-
(w) =>
|
|
1339
|
+
const o = {}, s = {}, i = (h) => {
|
|
1340
|
+
const y = r.createElement("span"), { style: w } = y;
|
|
1341
|
+
return w.position = "absolute", w.top = "0", w.left = "0", w.fontFamily = h, y.textContent = Dn, a.appendChild(y), y;
|
|
1342
|
+
}, p = (h, y) => i(`'${h}',${y}`), m = () => q.map(i), u = () => {
|
|
1343
|
+
const h = {};
|
|
1344
|
+
for (const y of pt)
|
|
1345
|
+
h[y] = q.map(
|
|
1346
|
+
(w) => p(y, w)
|
|
1346
1347
|
);
|
|
1347
|
-
return
|
|
1348
|
-
}, g = (
|
|
1349
|
-
(
|
|
1350
|
-
),
|
|
1348
|
+
return h;
|
|
1349
|
+
}, g = (h) => q.some(
|
|
1350
|
+
(y, w) => h[w].offsetWidth !== o[y] || h[w].offsetHeight !== s[y]
|
|
1351
|
+
), l = m(), d = u();
|
|
1351
1352
|
n.appendChild(a);
|
|
1352
|
-
for (let
|
|
1353
|
-
o[q[
|
|
1354
|
-
return pt.filter((
|
|
1353
|
+
for (let h = 0; h < q.length; h++)
|
|
1354
|
+
o[q[h]] = l[h].offsetWidth, s[q[h]] = l[h].offsetHeight;
|
|
1355
|
+
return pt.filter((h) => g(d[h]));
|
|
1355
1356
|
}), Wt = {
|
|
1356
1357
|
vendor: "",
|
|
1357
1358
|
vendorUnmasked: "",
|
|
@@ -1510,31 +1511,31 @@ const Jn = async (e) => {
|
|
|
1510
1511
|
Jt
|
|
1511
1512
|
];
|
|
1512
1513
|
}
|
|
1513
|
-
},
|
|
1514
|
+
}, Yn = async (e) => {
|
|
1514
1515
|
try {
|
|
1515
1516
|
const t = await jn();
|
|
1516
1517
|
return await Kt(JSON.stringify(t));
|
|
1517
1518
|
} catch {
|
|
1518
1519
|
return "";
|
|
1519
1520
|
}
|
|
1520
|
-
}, fe = "Oops! It looks like your session has expired. For your security, please log in again to continue.",
|
|
1521
|
+
}, fe = "Oops! It looks like your session has expired. For your security, please log in again to continue.", zn = "Your session has been successfully terminated.", ye = "Login failed. Please try again.", Fe = "Error getting access token, please re-authenticate.", qn = "You forgot to wrap your component in <AuthProvider>.", ke = {
|
|
1521
1522
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1522
1523
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1523
|
-
}, be = "@@auth@@", oe = "LOADING", se = "LOGIN", jt = "LOGOUT", Qn = process.env.NODE_ENV === "production",
|
|
1524
|
+
}, be = "@@auth@@", oe = "LOADING", se = "LOGIN", jt = "LOGOUT", Qn = process.env.NODE_ENV === "production", Yt = !Qn, Xn = (e) => {
|
|
1524
1525
|
try {
|
|
1525
1526
|
const t = ln(e);
|
|
1526
|
-
return t ? t[
|
|
1527
|
+
return t ? t[N.USER_ID_KEY] : "";
|
|
1527
1528
|
} catch {
|
|
1528
1529
|
return "";
|
|
1529
1530
|
}
|
|
1530
|
-
},
|
|
1531
|
+
}, xe = async ({
|
|
1531
1532
|
type: e,
|
|
1532
1533
|
clientId: t,
|
|
1533
1534
|
params: r = {}
|
|
1534
1535
|
}) => {
|
|
1535
1536
|
try {
|
|
1536
1537
|
const n = await fetch(
|
|
1537
|
-
|
|
1538
|
+
Yt ? `${ke.dev}/${e}` : `${ke.prod}/${e}`,
|
|
1538
1539
|
{
|
|
1539
1540
|
credentials: "include",
|
|
1540
1541
|
method: "POST",
|
|
@@ -1566,7 +1567,7 @@ const Jn = async (e) => {
|
|
|
1566
1567
|
}) => {
|
|
1567
1568
|
try {
|
|
1568
1569
|
return {
|
|
1569
|
-
status: (await
|
|
1570
|
+
status: (await xe({
|
|
1570
1571
|
type: Re.LOGOUT,
|
|
1571
1572
|
clientId: a,
|
|
1572
1573
|
params: {
|
|
@@ -1592,11 +1593,11 @@ const Jn = async (e) => {
|
|
|
1592
1593
|
sessionExpiration: o,
|
|
1593
1594
|
code: s,
|
|
1594
1595
|
code_verifier: i,
|
|
1595
|
-
domain:
|
|
1596
|
-
fingerprint:
|
|
1596
|
+
domain: p,
|
|
1597
|
+
fingerprint: m
|
|
1597
1598
|
}) => {
|
|
1598
1599
|
try {
|
|
1599
|
-
const
|
|
1600
|
+
const u = await xe({
|
|
1600
1601
|
type: Re.AUTHENTICATE,
|
|
1601
1602
|
clientId: r,
|
|
1602
1603
|
params: {
|
|
@@ -1607,15 +1608,15 @@ const Jn = async (e) => {
|
|
|
1607
1608
|
nonce: n,
|
|
1608
1609
|
code: s,
|
|
1609
1610
|
code_verifier: i,
|
|
1610
|
-
domain:
|
|
1611
|
-
fingerprint:
|
|
1611
|
+
domain: p,
|
|
1612
|
+
fingerprint: m
|
|
1612
1613
|
}
|
|
1613
|
-
}), g = await ce(
|
|
1614
|
-
return g && g.payload[
|
|
1615
|
-
idToken:
|
|
1616
|
-
accessToken:
|
|
1617
|
-
refreshToken:
|
|
1618
|
-
userId: g.payload[
|
|
1614
|
+
}), g = await ce(u.data.idToken);
|
|
1615
|
+
return g && g.payload[N.USER_ID_KEY] !== "" && g.payload[N.NONCE_KEY] === n ? {
|
|
1616
|
+
idToken: u.data.idToken,
|
|
1617
|
+
accessToken: u.data.accessToken,
|
|
1618
|
+
refreshToken: u.data.refreshToken,
|
|
1619
|
+
userId: g.payload[N.USER_ID_KEY],
|
|
1619
1620
|
status: !0
|
|
1620
1621
|
} : {
|
|
1621
1622
|
status: !1
|
|
@@ -1631,7 +1632,7 @@ const Jn = async (e) => {
|
|
|
1631
1632
|
code_challenge: r
|
|
1632
1633
|
}) => {
|
|
1633
1634
|
try {
|
|
1634
|
-
const n = await
|
|
1635
|
+
const n = await xe({
|
|
1635
1636
|
type: Re.CODE,
|
|
1636
1637
|
clientId: t,
|
|
1637
1638
|
params: {
|
|
@@ -1660,7 +1661,7 @@ const Jn = async (e) => {
|
|
|
1660
1661
|
domain: o
|
|
1661
1662
|
}) => {
|
|
1662
1663
|
try {
|
|
1663
|
-
const s = await
|
|
1664
|
+
const s = await xe({
|
|
1664
1665
|
type: Re.AUTHENTICATE,
|
|
1665
1666
|
clientId: e,
|
|
1666
1667
|
params: {
|
|
@@ -1670,13 +1671,13 @@ const Jn = async (e) => {
|
|
|
1670
1671
|
refreshToken: n,
|
|
1671
1672
|
accessToken: a,
|
|
1672
1673
|
domain: o,
|
|
1673
|
-
fingerprint: await
|
|
1674
|
+
fingerprint: await zt()
|
|
1674
1675
|
}
|
|
1675
1676
|
}), i = await ce(s.data.accessToken);
|
|
1676
|
-
return i && i.payload[
|
|
1677
|
+
return i && i.payload[N.USER_ID_KEY] !== "" && i.payload[N.NONCE_KEY] === r ? {
|
|
1677
1678
|
accessToken: s.data.accessToken,
|
|
1678
1679
|
refreshToken: s.data.refreshToken,
|
|
1679
|
-
userId: i.payload[
|
|
1680
|
+
userId: i.payload[N.USER_ID_KEY],
|
|
1680
1681
|
status: !0
|
|
1681
1682
|
} : {
|
|
1682
1683
|
status: !1
|
|
@@ -1707,7 +1708,6 @@ const Jn = async (e) => {
|
|
|
1707
1708
|
alg
|
|
1708
1709
|
}
|
|
1709
1710
|
timeout
|
|
1710
|
-
|
|
1711
1711
|
attestation
|
|
1712
1712
|
}
|
|
1713
1713
|
}`,
|
|
@@ -1734,7 +1734,11 @@ const Jn = async (e) => {
|
|
|
1734
1734
|
clientId: $clientId) {
|
|
1735
1735
|
rpId,
|
|
1736
1736
|
challenge,
|
|
1737
|
-
allowCredentials
|
|
1737
|
+
allowCredentials {
|
|
1738
|
+
id,
|
|
1739
|
+
type,
|
|
1740
|
+
transports
|
|
1741
|
+
}
|
|
1738
1742
|
timeout,
|
|
1739
1743
|
userVerification,
|
|
1740
1744
|
}
|
|
@@ -1786,7 +1790,7 @@ const Jn = async (e) => {
|
|
|
1786
1790
|
}) => {
|
|
1787
1791
|
try {
|
|
1788
1792
|
const a = t != null && t.data ? t.data(n) : n, o = `Bearer ${e}`, s = await fetch(
|
|
1789
|
-
|
|
1793
|
+
Yt ? `${ke.dev}/graphql` : `${ke.prod}/graphql`,
|
|
1790
1794
|
{
|
|
1791
1795
|
method: "POST",
|
|
1792
1796
|
credentials: "include",
|
|
@@ -1804,18 +1808,18 @@ const Jn = async (e) => {
|
|
|
1804
1808
|
);
|
|
1805
1809
|
if (s.status !== 200)
|
|
1806
1810
|
return { status: s.status, data: [] };
|
|
1807
|
-
const { data: i, errors:
|
|
1811
|
+
const { data: i, errors: p } = await s.json();
|
|
1808
1812
|
return {
|
|
1809
1813
|
status: s.status,
|
|
1810
1814
|
data: i[t.method],
|
|
1811
|
-
errors:
|
|
1815
|
+
errors: p
|
|
1812
1816
|
};
|
|
1813
1817
|
} catch (a) {
|
|
1814
1818
|
return console.error(a), { status: 500, data: [] };
|
|
1815
1819
|
}
|
|
1816
|
-
},
|
|
1820
|
+
}, zt = async () => {
|
|
1817
1821
|
try {
|
|
1818
|
-
return await
|
|
1822
|
+
return await Yn();
|
|
1819
1823
|
} catch {
|
|
1820
1824
|
return "";
|
|
1821
1825
|
}
|
|
@@ -1849,7 +1853,7 @@ class ra {
|
|
|
1849
1853
|
domain: a
|
|
1850
1854
|
}) {
|
|
1851
1855
|
const o = await ce(this.refreshToken);
|
|
1852
|
-
if (o && o.payload[
|
|
1856
|
+
if (o && o.payload[N.USER_ID_KEY] !== "") {
|
|
1853
1857
|
const s = await ta({
|
|
1854
1858
|
clientId: t,
|
|
1855
1859
|
userId: r,
|
|
@@ -1871,7 +1875,12 @@ class ra {
|
|
|
1871
1875
|
};
|
|
1872
1876
|
}
|
|
1873
1877
|
}
|
|
1874
|
-
const
|
|
1878
|
+
const na = (e) => te(
|
|
1879
|
+
(...t) => {
|
|
1880
|
+
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1881
|
+
},
|
|
1882
|
+
[e]
|
|
1883
|
+
), Z = () => {
|
|
1875
1884
|
throw new Error(qn);
|
|
1876
1885
|
}, qt = ur({
|
|
1877
1886
|
isAuthenticated: !1,
|
|
@@ -1884,7 +1893,7 @@ const Z = () => {
|
|
|
1884
1893
|
registeringForPasskey: Z,
|
|
1885
1894
|
loginWithPasskey: Z,
|
|
1886
1895
|
logoutReason: ""
|
|
1887
|
-
}),
|
|
1896
|
+
}), aa = G.createContext({
|
|
1888
1897
|
state: {
|
|
1889
1898
|
isLoading: !0,
|
|
1890
1899
|
isAuthenticated: !1,
|
|
@@ -1895,7 +1904,7 @@ const Z = () => {
|
|
|
1895
1904
|
},
|
|
1896
1905
|
dispatch: () => {
|
|
1897
1906
|
}
|
|
1898
|
-
}),
|
|
1907
|
+
}), oa = (e, t) => (t == null ? void 0 : t.type) === oe ? {
|
|
1899
1908
|
...e,
|
|
1900
1909
|
isLoading: t.payload.isLoading
|
|
1901
1910
|
} : (t == null ? void 0 : t.type) === se ? {
|
|
@@ -1912,128 +1921,123 @@ const Z = () => {
|
|
|
1912
1921
|
user: void 0,
|
|
1913
1922
|
authenticationType: null,
|
|
1914
1923
|
logoutReason: t.payload.logoutReason
|
|
1915
|
-
} : e,
|
|
1924
|
+
} : e, sa = ({
|
|
1916
1925
|
children: e,
|
|
1917
1926
|
sessionExpiration: t,
|
|
1918
1927
|
clientId: r,
|
|
1919
1928
|
domain: n = "",
|
|
1920
1929
|
debug: a = !1
|
|
1921
1930
|
}) => {
|
|
1922
|
-
const [o, s] = Et(
|
|
1931
|
+
const [o, s] = Et(oa, {
|
|
1923
1932
|
isLoading: !0,
|
|
1924
1933
|
isAuthenticated: !1,
|
|
1925
1934
|
authenticationType: null,
|
|
1926
1935
|
user: void 0,
|
|
1927
1936
|
logoutReason: "",
|
|
1928
1937
|
debug: a
|
|
1929
|
-
}), i =
|
|
1938
|
+
}), i = na(a), p = F(!1), m = F(""), [u, g, , l] = pe({
|
|
1930
1939
|
key: `${be}::${r}::@@user@@`
|
|
1931
|
-
}), [
|
|
1940
|
+
}), [d, h, , y] = pe({
|
|
1932
1941
|
key: `${be}::${r}::@@access@@`
|
|
1933
|
-
}), [
|
|
1942
|
+
}), [w, T, , x] = pe(
|
|
1934
1943
|
{
|
|
1935
1944
|
key: `${be}::${r}::@@refresh@@`
|
|
1936
1945
|
}
|
|
1937
|
-
), [
|
|
1946
|
+
), [P, B, , z] = pe({
|
|
1938
1947
|
key: `${be}::${r}::@@nonce@@`
|
|
1939
|
-
}),
|
|
1940
|
-
(
|
|
1941
|
-
|
|
1942
|
-
},
|
|
1943
|
-
[a]
|
|
1944
|
-
), x = new ra(c, b), D = te(
|
|
1945
|
-
(y) => {
|
|
1946
|
-
v(
|
|
1948
|
+
}), C = new ra(d, w), D = te(
|
|
1949
|
+
(b) => {
|
|
1950
|
+
i(
|
|
1947
1951
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1948
|
-
|
|
1952
|
+
b
|
|
1949
1953
|
), s({
|
|
1950
1954
|
type: jt,
|
|
1951
1955
|
payload: {
|
|
1952
|
-
logoutReason:
|
|
1956
|
+
logoutReason: b || fe
|
|
1953
1957
|
}
|
|
1954
|
-
}),
|
|
1958
|
+
}), l(), y(), x(), z(), s({ type: oe, payload: { isLoading: !1 } });
|
|
1955
1959
|
},
|
|
1956
|
-
[
|
|
1957
|
-
),
|
|
1958
|
-
async (
|
|
1959
|
-
|
|
1960
|
-
const { user:
|
|
1961
|
-
E ||
|
|
1960
|
+
[y, l, z, x, i]
|
|
1961
|
+
), S = te(
|
|
1962
|
+
async (b) => {
|
|
1963
|
+
i("invalidateAndLogout: invalidating and logging out");
|
|
1964
|
+
const { user: I } = o, E = (I == null ? void 0 : I.userId) || Xn(u);
|
|
1965
|
+
E || i(
|
|
1962
1966
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1963
1967
|
), await Zn({
|
|
1964
1968
|
userId: E,
|
|
1965
|
-
idToken:
|
|
1966
|
-
accessToken:
|
|
1967
|
-
refreshToken:
|
|
1969
|
+
idToken: u,
|
|
1970
|
+
accessToken: d,
|
|
1971
|
+
refreshToken: w,
|
|
1968
1972
|
clientId: r,
|
|
1969
1973
|
domain: n
|
|
1970
|
-
}), D(
|
|
1974
|
+
}), D(b || fe);
|
|
1971
1975
|
},
|
|
1972
1976
|
[
|
|
1973
|
-
|
|
1977
|
+
d,
|
|
1974
1978
|
o,
|
|
1975
1979
|
r,
|
|
1976
1980
|
n,
|
|
1977
|
-
|
|
1978
|
-
|
|
1981
|
+
u,
|
|
1982
|
+
w,
|
|
1979
1983
|
D,
|
|
1980
|
-
|
|
1984
|
+
i
|
|
1981
1985
|
]
|
|
1982
1986
|
);
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
}), []),
|
|
1986
|
-
if (!
|
|
1987
|
-
return o.isLoading &&
|
|
1987
|
+
j(() => ((async () => (i("useEffect: setting the fingerprint"), m.current = await zt()))(), () => {
|
|
1988
|
+
i("useEffect: cleaning up the fingerprint"), m.current = "";
|
|
1989
|
+
}), []), j(() => {
|
|
1990
|
+
if (!p.current)
|
|
1991
|
+
return o.isLoading && u !== null ? (async () => {
|
|
1988
1992
|
try {
|
|
1989
|
-
const
|
|
1990
|
-
|
|
1993
|
+
const b = await ce(u);
|
|
1994
|
+
b && b.payload[N.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1991
1995
|
type: se,
|
|
1992
1996
|
payload: {
|
|
1993
|
-
authenticationType:
|
|
1997
|
+
authenticationType: b.payload[N.AUTH_TYPE_KEY],
|
|
1994
1998
|
user: {
|
|
1995
|
-
userId:
|
|
1996
|
-
username:
|
|
1999
|
+
userId: b.payload[N.USER_ID_KEY],
|
|
2000
|
+
username: b.payload[N.USERNAME_KEY]
|
|
1997
2001
|
}
|
|
1998
2002
|
}
|
|
1999
|
-
})) : (
|
|
2003
|
+
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await S(fe));
|
|
2000
2004
|
} catch {
|
|
2001
|
-
|
|
2005
|
+
i(
|
|
2002
2006
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
2003
|
-
), await
|
|
2007
|
+
), await S(fe);
|
|
2004
2008
|
}
|
|
2005
|
-
})() : (
|
|
2006
|
-
|
|
2009
|
+
})() : (i("useEffect: setting the loading state to false"), s({ type: oe, payload: { isLoading: !1 } })), () => {
|
|
2010
|
+
p.current = !0;
|
|
2007
2011
|
};
|
|
2008
|
-
}, [o.isLoading,
|
|
2009
|
-
const Pe = async (
|
|
2010
|
-
const
|
|
2011
|
-
if (
|
|
2012
|
+
}, [o.isLoading, u, S, i]);
|
|
2013
|
+
const Pe = async (b, I, E) => {
|
|
2014
|
+
const U = Ve();
|
|
2015
|
+
if (B(U), s({ type: oe, payload: { isLoading: !0 } }), l(), y(), x(), i("login: Logging in with type: ", E), E === re.CODE) {
|
|
2012
2016
|
const { code_verifier: lr, code_challenge: dr } = await yn(), tt = await ea({
|
|
2013
|
-
nonce:
|
|
2017
|
+
nonce: U,
|
|
2014
2018
|
clientId: r,
|
|
2015
2019
|
code_challenge: dr
|
|
2016
2020
|
});
|
|
2017
2021
|
if (tt.status) {
|
|
2018
2022
|
const ae = await gt({
|
|
2019
|
-
username:
|
|
2020
|
-
password:
|
|
2023
|
+
username: b,
|
|
2024
|
+
password: I,
|
|
2021
2025
|
clientId: r,
|
|
2022
2026
|
sessionExpiration: t,
|
|
2023
|
-
nonce:
|
|
2027
|
+
nonce: U,
|
|
2024
2028
|
type: E,
|
|
2025
2029
|
code: tt.code,
|
|
2026
2030
|
code_verifier: lr,
|
|
2027
2031
|
domain: n,
|
|
2028
2032
|
fingerprint: m.current
|
|
2029
2033
|
});
|
|
2030
|
-
return ae.status ? (
|
|
2034
|
+
return ae.status ? (g(ae.idToken), h(ae.accessToken), T(ae.refreshToken), s({
|
|
2031
2035
|
type: se,
|
|
2032
2036
|
payload: {
|
|
2033
2037
|
authenticationType: E,
|
|
2034
2038
|
user: {
|
|
2035
2039
|
userId: ae.userId,
|
|
2036
|
-
username:
|
|
2040
|
+
username: b
|
|
2037
2041
|
}
|
|
2038
2042
|
}
|
|
2039
2043
|
}), !0) : (D(ye), !1);
|
|
@@ -2041,125 +2045,125 @@ const Z = () => {
|
|
|
2041
2045
|
return !1;
|
|
2042
2046
|
}
|
|
2043
2047
|
const ne = await gt({
|
|
2044
|
-
username:
|
|
2045
|
-
password:
|
|
2048
|
+
username: b,
|
|
2049
|
+
password: I,
|
|
2046
2050
|
clientId: r,
|
|
2047
2051
|
sessionExpiration: t,
|
|
2048
|
-
nonce:
|
|
2052
|
+
nonce: U,
|
|
2049
2053
|
type: E,
|
|
2050
2054
|
domain: n,
|
|
2051
2055
|
fingerprint: m.current
|
|
2052
2056
|
});
|
|
2053
|
-
return ne.status ? (
|
|
2057
|
+
return ne.status ? (g(ne.idToken), h(ne.accessToken), T(ne.refreshToken), s({
|
|
2054
2058
|
type: se,
|
|
2055
2059
|
payload: {
|
|
2056
2060
|
authenticationType: E,
|
|
2057
2061
|
user: {
|
|
2058
2062
|
userId: ne.userId,
|
|
2059
|
-
username:
|
|
2063
|
+
username: b
|
|
2060
2064
|
}
|
|
2061
2065
|
}
|
|
2062
2066
|
}), !0) : (D(ye), !1);
|
|
2063
|
-
}, De = async (
|
|
2064
|
-
|
|
2067
|
+
}, De = async (b) => {
|
|
2068
|
+
b == null || b.preventDefault(), await S(zn);
|
|
2065
2069
|
}, $e = async () => {
|
|
2066
|
-
const { isAuthenticated:
|
|
2070
|
+
const { isAuthenticated: b, user: I } = o;
|
|
2067
2071
|
try {
|
|
2068
|
-
if (
|
|
2069
|
-
if (
|
|
2070
|
-
|
|
2071
|
-
const
|
|
2072
|
-
if (
|
|
2073
|
-
return
|
|
2072
|
+
if (b && I && I.userId) {
|
|
2073
|
+
if (d) {
|
|
2074
|
+
i("getAccessToken");
|
|
2075
|
+
const U = await ce(d);
|
|
2076
|
+
if (U && U.payload[N.USER_ID_KEY] !== "")
|
|
2077
|
+
return d;
|
|
2074
2078
|
}
|
|
2075
|
-
|
|
2076
|
-
const E = await
|
|
2079
|
+
i("getAccessToken: invalid access token, refreshing it");
|
|
2080
|
+
const E = await C.refreshtoken({
|
|
2077
2081
|
clientId: r,
|
|
2078
|
-
userId:
|
|
2079
|
-
nonce:
|
|
2082
|
+
userId: I.userId,
|
|
2083
|
+
nonce: P,
|
|
2080
2084
|
domain: n
|
|
2081
2085
|
});
|
|
2082
|
-
return E.status && E.status === "success" ? (
|
|
2086
|
+
return E.status && E.status === "success" ? (h(E.newAccessToken), T(E.newRefreshToken), E.newAccessToken) : (i("getAccessToken: invalid refresh token, re-authenticating user"), await S(Fe), "");
|
|
2083
2087
|
}
|
|
2084
|
-
return
|
|
2088
|
+
return i(
|
|
2085
2089
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
2086
|
-
), await
|
|
2090
|
+
), await S(Fe), "";
|
|
2087
2091
|
} catch {
|
|
2088
|
-
return
|
|
2092
|
+
return i(
|
|
2089
2093
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
2090
|
-
), await
|
|
2094
|
+
), await S(Fe), "";
|
|
2091
2095
|
}
|
|
2092
2096
|
}, O = () => {
|
|
2093
|
-
if (o.isAuthenticated &&
|
|
2094
|
-
return
|
|
2095
|
-
},
|
|
2096
|
-
const { user:
|
|
2097
|
-
let
|
|
2098
|
-
accessToken:
|
|
2097
|
+
if (o.isAuthenticated && u)
|
|
2098
|
+
return u;
|
|
2099
|
+
}, L = async () => {
|
|
2100
|
+
const { user: b } = o;
|
|
2101
|
+
let I = await X({
|
|
2102
|
+
accessToken: d,
|
|
2099
2103
|
clientId: r,
|
|
2100
2104
|
type: Q.GET_REGISTRATION_OPTIONS,
|
|
2101
2105
|
params: {
|
|
2102
2106
|
clientId: r,
|
|
2103
|
-
id:
|
|
2104
|
-
username:
|
|
2107
|
+
id: b == null ? void 0 : b.userId,
|
|
2108
|
+
username: b == null ? void 0 : b.username
|
|
2105
2109
|
}
|
|
2106
2110
|
});
|
|
2107
|
-
if (
|
|
2111
|
+
if (I.status)
|
|
2108
2112
|
try {
|
|
2109
|
-
const E = await Er(
|
|
2110
|
-
|
|
2111
|
-
accessToken:
|
|
2113
|
+
const E = await Er(I.data);
|
|
2114
|
+
I = await X({
|
|
2115
|
+
accessToken: d,
|
|
2112
2116
|
clientId: r,
|
|
2113
2117
|
type: Q.VERIFY_REGISTRATION,
|
|
2114
2118
|
params: {
|
|
2115
2119
|
clientId: r,
|
|
2116
|
-
id:
|
|
2117
|
-
username:
|
|
2120
|
+
id: b == null ? void 0 : b.userId,
|
|
2121
|
+
username: b == null ? void 0 : b.username,
|
|
2118
2122
|
registration: E
|
|
2119
2123
|
}
|
|
2120
2124
|
});
|
|
2121
2125
|
} catch {
|
|
2122
2126
|
return await X({
|
|
2123
|
-
accessToken:
|
|
2127
|
+
accessToken: d,
|
|
2124
2128
|
clientId: r,
|
|
2125
2129
|
type: Q.VERIFY_REGISTRATION,
|
|
2126
2130
|
params: {
|
|
2127
2131
|
clientId: r,
|
|
2128
|
-
id:
|
|
2129
|
-
username:
|
|
2132
|
+
id: b == null ? void 0 : b.userId,
|
|
2133
|
+
username: b == null ? void 0 : b.username,
|
|
2130
2134
|
registration: {}
|
|
2131
2135
|
}
|
|
2132
2136
|
}), !1;
|
|
2133
2137
|
}
|
|
2134
2138
|
}, Me = async () => {
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
const
|
|
2139
|
+
const b = Ve();
|
|
2140
|
+
B(b), s({ type: oe, payload: { isLoading: !0 } }), l(), y(), x(), i("loginWithPasskey");
|
|
2141
|
+
const I = Ve();
|
|
2138
2142
|
let E = await X({
|
|
2139
|
-
accessToken:
|
|
2143
|
+
accessToken: d,
|
|
2140
2144
|
clientId: r,
|
|
2141
2145
|
type: Q.GET_AUTHENTICATION_OPTIONS,
|
|
2142
2146
|
params: {
|
|
2143
|
-
id:
|
|
2147
|
+
id: I,
|
|
2144
2148
|
clientId: r
|
|
2145
2149
|
}
|
|
2146
2150
|
});
|
|
2147
2151
|
if (E.status)
|
|
2148
2152
|
try {
|
|
2149
|
-
const
|
|
2153
|
+
const U = await Sr(E.data);
|
|
2150
2154
|
return E = await X({
|
|
2151
|
-
accessToken:
|
|
2155
|
+
accessToken: d,
|
|
2152
2156
|
clientId: r,
|
|
2153
2157
|
type: Q.VERIFY_AUTHENTICATION,
|
|
2154
2158
|
params: {
|
|
2155
2159
|
clientId: r,
|
|
2156
|
-
id:
|
|
2157
|
-
authentication:
|
|
2158
|
-
nonce:
|
|
2160
|
+
id: I,
|
|
2161
|
+
authentication: U,
|
|
2162
|
+
nonce: b,
|
|
2159
2163
|
domain: n,
|
|
2160
2164
|
fingerprint: m.current
|
|
2161
2165
|
}
|
|
2162
|
-
}), E.data.status === "success" ? (
|
|
2166
|
+
}), E.data.status === "success" ? (g(E.data.idToken), h(E.data.accessToken), T(E.data.refreshToken), s({
|
|
2163
2167
|
type: se,
|
|
2164
2168
|
payload: {
|
|
2165
2169
|
authenticationType: re.PASSKEY,
|
|
@@ -2171,20 +2175,20 @@ const Z = () => {
|
|
|
2171
2175
|
}), !0) : (D(ye), !1);
|
|
2172
2176
|
} catch {
|
|
2173
2177
|
return await X({
|
|
2174
|
-
accessToken:
|
|
2178
|
+
accessToken: d,
|
|
2175
2179
|
clientId: r,
|
|
2176
2180
|
type: Q.VERIFY_AUTHENTICATION,
|
|
2177
2181
|
params: {
|
|
2178
2182
|
clientId: r,
|
|
2179
|
-
id:
|
|
2183
|
+
id: I,
|
|
2180
2184
|
authentication: {},
|
|
2181
|
-
nonce:
|
|
2185
|
+
nonce: b,
|
|
2182
2186
|
domain: n
|
|
2183
2187
|
}
|
|
2184
2188
|
}), D(ye), !1;
|
|
2185
2189
|
}
|
|
2186
2190
|
};
|
|
2187
|
-
return /* @__PURE__ */
|
|
2191
|
+
return /* @__PURE__ */ c(aa.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ c(
|
|
2188
2192
|
qt.Provider,
|
|
2189
2193
|
{
|
|
2190
2194
|
value: {
|
|
@@ -2193,14 +2197,14 @@ const Z = () => {
|
|
|
2193
2197
|
logout: De,
|
|
2194
2198
|
getAccessToken: $e,
|
|
2195
2199
|
getIdToken: O,
|
|
2196
|
-
registeringForPasskey:
|
|
2200
|
+
registeringForPasskey: L,
|
|
2197
2201
|
loginWithPasskey: Me
|
|
2198
2202
|
},
|
|
2199
2203
|
children: e
|
|
2200
2204
|
}
|
|
2201
2205
|
) });
|
|
2202
|
-
}, Qe = (e = qt) => vt(e), Co = "user",
|
|
2203
|
-
function
|
|
2206
|
+
}, Qe = (e = qt) => vt(e), Co = "user", Oo = "assistant", Po = "system", Do = "internal", $o = "hidden", Mo = "I'm having trouble right now. Please try again later.", Lo = "gpt-4", Uo = 128e3, Ho = "action-message", Ko = "action-reset", Go = "action-model", Bo = "action-restore", Wo = "action-location", Vo = "action-streaming", Fo = "action-search", Jo = "action-sort", jo = "sassy-saint-", Yo = "details", zo = "search", qo = "sort", Qo = "location", Xo = "==stats==", ia = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", ft = (e) => Number.isFinite(e) ? e : 0;
|
|
2207
|
+
function ca(e) {
|
|
2204
2208
|
return {
|
|
2205
2209
|
days: Math.trunc(e / 864e5),
|
|
2206
2210
|
hours: Math.trunc(e / 36e5 % 24),
|
|
@@ -2211,7 +2215,7 @@ function ia(e) {
|
|
|
2211
2215
|
nanoseconds: Math.trunc(ft(e * 1e6) % 1e3)
|
|
2212
2216
|
};
|
|
2213
2217
|
}
|
|
2214
|
-
function
|
|
2218
|
+
function la(e) {
|
|
2215
2219
|
return {
|
|
2216
2220
|
days: e / 86400000n,
|
|
2217
2221
|
hours: e / 3600000n % 24n,
|
|
@@ -2222,44 +2226,44 @@ function ca(e) {
|
|
|
2222
2226
|
nanoseconds: 0n
|
|
2223
2227
|
};
|
|
2224
2228
|
}
|
|
2225
|
-
function
|
|
2229
|
+
function da(e) {
|
|
2226
2230
|
switch (typeof e) {
|
|
2227
2231
|
case "number": {
|
|
2228
2232
|
if (Number.isFinite(e))
|
|
2229
|
-
return
|
|
2233
|
+
return ca(e);
|
|
2230
2234
|
break;
|
|
2231
2235
|
}
|
|
2232
2236
|
case "bigint":
|
|
2233
|
-
return
|
|
2237
|
+
return la(e);
|
|
2234
2238
|
}
|
|
2235
2239
|
throw new TypeError("Expected a finite number or bigint");
|
|
2236
2240
|
}
|
|
2237
|
-
const
|
|
2238
|
-
function
|
|
2241
|
+
const ua = (e) => e === 0 || e === 0n, ma = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ha = 1e-7, pa = 24n * 60n * 60n * 1000n;
|
|
2242
|
+
function ga(e, t) {
|
|
2239
2243
|
const r = typeof e == "bigint";
|
|
2240
2244
|
if (!r && !Number.isFinite(e))
|
|
2241
2245
|
throw new TypeError("Expected a finite number or bigint");
|
|
2242
2246
|
t = { ...t }, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
2243
2247
|
let n = [];
|
|
2244
|
-
const a = (
|
|
2245
|
-
const g = Math.floor(
|
|
2246
|
-
return (Math.round(g) / 10 **
|
|
2247
|
-
}, o = (
|
|
2248
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
2249
|
-
if (
|
|
2250
|
-
const
|
|
2251
|
-
|
|
2248
|
+
const a = (m, u) => {
|
|
2249
|
+
const g = Math.floor(m * 10 ** u + ha);
|
|
2250
|
+
return (Math.round(g) / 10 ** u).toFixed(u);
|
|
2251
|
+
}, o = (m, u, g, l) => {
|
|
2252
|
+
if (!((n.length === 0 || !t.colonNotation) && ua(m) && !(t.colonNotation && g === "m"))) {
|
|
2253
|
+
if (l = l ?? String(m), t.colonNotation) {
|
|
2254
|
+
const d = l.includes(".") ? l.split(".")[0].length : l.length, h = n.length > 0 ? 2 : 1;
|
|
2255
|
+
l = "0".repeat(Math.max(0, h - d)) + l;
|
|
2252
2256
|
} else
|
|
2253
|
-
|
|
2254
|
-
n.push(
|
|
2257
|
+
l += t.verbose ? " " + ma(u, m) : g;
|
|
2258
|
+
n.push(l);
|
|
2255
2259
|
}
|
|
2256
|
-
}, s =
|
|
2260
|
+
}, s = da(e), i = BigInt(s.days);
|
|
2257
2261
|
if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
2258
|
-
const
|
|
2259
|
-
if (o(
|
|
2260
|
-
o(
|
|
2262
|
+
const m = Number(s.seconds), u = Number(s.milliseconds), g = Number(s.microseconds), l = Number(s.nanoseconds);
|
|
2263
|
+
if (o(m, "second", "s"), t.formatSubMilliseconds)
|
|
2264
|
+
o(u, "millisecond", "ms"), o(g, "microsecond", "µs"), o(l, "nanosecond", "ns");
|
|
2261
2265
|
else {
|
|
2262
|
-
const
|
|
2266
|
+
const d = u + g / 1e3 + l / 1e6, h = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, y = d >= 1 ? Math.round(d) : Math.ceil(d), w = h ? d.toFixed(h) : y;
|
|
2263
2267
|
o(
|
|
2264
2268
|
Number.parseFloat(w),
|
|
2265
2269
|
"millisecond",
|
|
@@ -2268,15 +2272,15 @@ function pa(e, t) {
|
|
|
2268
2272
|
);
|
|
2269
2273
|
}
|
|
2270
2274
|
} else {
|
|
2271
|
-
const
|
|
2272
|
-
o(Number.parseFloat(
|
|
2275
|
+
const m = (r ? Number(e % pa) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, g = a(m, u), l = t.keepDecimalsOnWholeSeconds ? g : g.replace(/\.0+$/, "");
|
|
2276
|
+
o(Number.parseFloat(l), "second", "s", l);
|
|
2273
2277
|
}
|
|
2274
2278
|
if (n.length === 0)
|
|
2275
2279
|
return "0" + (t.verbose ? " milliseconds" : "ms");
|
|
2276
|
-
const
|
|
2277
|
-
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), n.join(
|
|
2280
|
+
const p = t.colonNotation ? ":" : " ";
|
|
2281
|
+
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), n.join(p);
|
|
2278
2282
|
}
|
|
2279
|
-
const
|
|
2283
|
+
const fa = process.env.NODE_ENV === "production", Xe = !fa, ya = Xe ? "gizmette.local.com" : "gizmette.com", Zo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Qt = (e, t) => {
|
|
2280
2284
|
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", n = 0 | Math.abs(e), a = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
|
|
2281
2285
|
return {
|
|
2282
2286
|
dir: r,
|
|
@@ -2284,17 +2288,17 @@ const ga = process.env.NODE_ENV === "production", Xe = !ga, fa = Xe ? "gizmette.
|
|
|
2284
2288
|
min: a,
|
|
2285
2289
|
sec: o
|
|
2286
2290
|
};
|
|
2287
|
-
},
|
|
2291
|
+
}, es = (e) => {
|
|
2288
2292
|
if (!e && e !== 0)
|
|
2289
2293
|
return "N/A";
|
|
2290
2294
|
const t = Qt(e, !1);
|
|
2291
2295
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2292
|
-
},
|
|
2296
|
+
}, ts = (e) => {
|
|
2293
2297
|
if (!e && e !== 0)
|
|
2294
2298
|
return "N/A";
|
|
2295
2299
|
const t = Qt(e, !0);
|
|
2296
2300
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2297
|
-
},
|
|
2301
|
+
}, rs = async () => {
|
|
2298
2302
|
const e = {
|
|
2299
2303
|
/**
|
|
2300
2304
|
* A boolean value that indicates the application would
|
|
@@ -2343,11 +2347,11 @@ const ga = process.env.NODE_ENV === "production", Xe = !ga, fa = Xe ? "gizmette.
|
|
|
2343
2347
|
e
|
|
2344
2348
|
);
|
|
2345
2349
|
});
|
|
2346
|
-
},
|
|
2347
|
-
/* @__PURE__ */
|
|
2348
|
-
/* @__PURE__ */
|
|
2350
|
+
}, ns = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ v("div", { className: "flex items-center justify-between", children: [
|
|
2351
|
+
/* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2352
|
+
/* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
|
|
2349
2353
|
] }) }, `${e}-${r}`)) : null;
|
|
2350
|
-
function
|
|
2354
|
+
function as({
|
|
2351
2355
|
data: e,
|
|
2352
2356
|
formatter: t = (r) => r
|
|
2353
2357
|
}) {
|
|
@@ -2359,18 +2363,18 @@ function ns({
|
|
|
2359
2363
|
);
|
|
2360
2364
|
return t(n ? n / r.length : 0);
|
|
2361
2365
|
}
|
|
2362
|
-
const
|
|
2366
|
+
const os = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, ss = new Intl.NumberFormat("en", {
|
|
2363
2367
|
style: "decimal",
|
|
2364
2368
|
signDisplay: "never",
|
|
2365
2369
|
minimumFractionDigits: 0,
|
|
2366
2370
|
maximumFractionDigits: 0
|
|
2367
|
-
}),
|
|
2371
|
+
}), is = (e) => ga(e, {
|
|
2368
2372
|
secondsDecimalDigits: 2,
|
|
2369
2373
|
unitCount: 2
|
|
2370
|
-
}),
|
|
2374
|
+
}), ba = (e) => f(
|
|
2371
2375
|
"flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2372
2376
|
e || Xe ? "pt-4" : "pt-10"
|
|
2373
|
-
),
|
|
2377
|
+
), cs = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
|
|
2374
2378
|
let t = "";
|
|
2375
2379
|
if (typeof e == "number" || typeof e == "string")
|
|
2376
2380
|
t = "m-" + e;
|
|
@@ -2379,7 +2383,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2379
2383
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2380
2384
|
}
|
|
2381
2385
|
return t;
|
|
2382
|
-
},
|
|
2386
|
+
}, ls = "av-bubble", yt = "av-button", Te = "av-card", wa = "av-footer", Ea = "av-main", ds = "av-messagebox", us = "av-panel", ms = "av-spinner", Xt = "icon", Zt = "button", va = "link", Ta = ({
|
|
2383
2387
|
type: e,
|
|
2384
2388
|
size: t,
|
|
2385
2389
|
labelRight: r,
|
|
@@ -2394,7 +2398,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2394
2398
|
[s]: t === "medium",
|
|
2395
2399
|
[i]: t === "large"
|
|
2396
2400
|
});
|
|
2397
|
-
case
|
|
2401
|
+
case va:
|
|
2398
2402
|
return f("px-4 text-center", {
|
|
2399
2403
|
[o]: t === "small",
|
|
2400
2404
|
[s]: t === "medium",
|
|
@@ -2413,7 +2417,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2413
2417
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || n)
|
|
2414
2418
|
});
|
|
2415
2419
|
}
|
|
2416
|
-
},
|
|
2420
|
+
}, Sa = ({
|
|
2417
2421
|
mode: e,
|
|
2418
2422
|
noBackground: t,
|
|
2419
2423
|
noTruncate: r,
|
|
@@ -2445,7 +2449,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2445
2449
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2446
2450
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2447
2451
|
});
|
|
2448
|
-
},
|
|
2452
|
+
}, Ia = ({
|
|
2449
2453
|
mode: e,
|
|
2450
2454
|
disabled: t,
|
|
2451
2455
|
variant: r
|
|
@@ -2473,7 +2477,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2473
2477
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2474
2478
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2475
2479
|
});
|
|
2476
|
-
},
|
|
2480
|
+
}, Aa = ({
|
|
2477
2481
|
mode: e,
|
|
2478
2482
|
disabled: t,
|
|
2479
2483
|
variant: r
|
|
@@ -2501,7 +2505,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2501
2505
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2502
2506
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2503
2507
|
});
|
|
2504
|
-
},
|
|
2508
|
+
}, ka = ({
|
|
2505
2509
|
mode: e,
|
|
2506
2510
|
noBorder: t,
|
|
2507
2511
|
variant: r
|
|
@@ -2529,7 +2533,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2529
2533
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2530
2534
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2531
2535
|
});
|
|
2532
|
-
},
|
|
2536
|
+
}, _a = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2533
2537
|
"focus:outline-focus-dark": e === "dark",
|
|
2534
2538
|
"focus:outline-focus-light": e === "light",
|
|
2535
2539
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -2543,40 +2547,40 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2543
2547
|
disabled: o,
|
|
2544
2548
|
fullWidth: s,
|
|
2545
2549
|
size: i,
|
|
2546
|
-
noBorder:
|
|
2547
|
-
labelRight:
|
|
2548
|
-
labelLeft:
|
|
2550
|
+
noBorder: p,
|
|
2551
|
+
labelRight: m,
|
|
2552
|
+
labelLeft: u,
|
|
2549
2553
|
spacing: g,
|
|
2550
|
-
noBackground:
|
|
2551
|
-
variant:
|
|
2552
|
-
noTruncate:
|
|
2553
|
-
align:
|
|
2554
|
-
}) => (
|
|
2554
|
+
noBackground: l,
|
|
2555
|
+
variant: d,
|
|
2556
|
+
noTruncate: h,
|
|
2557
|
+
align: y
|
|
2558
|
+
}) => (d || (d = "primary"), r ? f(yt, t) : f(
|
|
2555
2559
|
yt,
|
|
2556
2560
|
t,
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2561
|
+
Ce(g),
|
|
2562
|
+
Sa({ mode: n, variant: d, noBackground: l, noTruncate: h }),
|
|
2563
|
+
Ta({ type: e, size: i, labelRight: m, labelLeft: u, align: y }),
|
|
2564
|
+
ka({ mode: n, variant: d, noBorder: p }),
|
|
2565
|
+
_a({ focusMode: a }),
|
|
2566
|
+
Ia({ mode: n, variant: d, disabled: o }),
|
|
2567
|
+
Aa({ mode: n, variant: d, disabled: o }),
|
|
2564
2568
|
{
|
|
2565
2569
|
"w-full": s,
|
|
2566
2570
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2567
2571
|
}
|
|
2568
|
-
)),
|
|
2572
|
+
)), Ra = (e, t, r) => {
|
|
2569
2573
|
var n;
|
|
2570
2574
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2571
|
-
}, Ze =
|
|
2575
|
+
}, Ze = G.forwardRef(
|
|
2572
2576
|
(e, t) => {
|
|
2573
2577
|
const { onClick: r, noInternalClick: n = !1, ...a } = e;
|
|
2574
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ c(
|
|
2575
2579
|
"button",
|
|
2576
2580
|
{
|
|
2577
2581
|
ref: t,
|
|
2578
2582
|
onClick: (o) => {
|
|
2579
|
-
|
|
2583
|
+
Ra(o, n, r);
|
|
2580
2584
|
},
|
|
2581
2585
|
...a
|
|
2582
2586
|
}
|
|
@@ -2584,7 +2588,7 @@ const as = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2584
2588
|
}
|
|
2585
2589
|
);
|
|
2586
2590
|
Ze.displayName = "BaseButton";
|
|
2587
|
-
const
|
|
2591
|
+
const Ye = G.forwardRef(
|
|
2588
2592
|
({
|
|
2589
2593
|
children: e,
|
|
2590
2594
|
disabled: t = !1,
|
|
@@ -2594,17 +2598,17 @@ const ze = B.forwardRef(
|
|
|
2594
2598
|
className: o,
|
|
2595
2599
|
type: s = "button",
|
|
2596
2600
|
raw: i = !1,
|
|
2597
|
-
noBorder:
|
|
2598
|
-
"aria-label":
|
|
2599
|
-
label:
|
|
2601
|
+
noBorder: p = !1,
|
|
2602
|
+
"aria-label": m,
|
|
2603
|
+
label: u,
|
|
2600
2604
|
size: g = "medium",
|
|
2601
|
-
labelRight:
|
|
2602
|
-
labelLeft:
|
|
2603
|
-
spacing:
|
|
2604
|
-
noBackground:
|
|
2605
|
+
labelRight: l,
|
|
2606
|
+
labelLeft: d,
|
|
2607
|
+
spacing: h,
|
|
2608
|
+
noBackground: y = !1,
|
|
2605
2609
|
align: w = "center",
|
|
2606
|
-
...
|
|
2607
|
-
},
|
|
2610
|
+
...T
|
|
2611
|
+
}, x) => {
|
|
2608
2612
|
const P = er({
|
|
2609
2613
|
type: Xt,
|
|
2610
2614
|
mode: r,
|
|
@@ -2613,39 +2617,39 @@ const ze = B.forwardRef(
|
|
|
2613
2617
|
disabled: t,
|
|
2614
2618
|
raw: i,
|
|
2615
2619
|
className: o,
|
|
2616
|
-
noBorder:
|
|
2620
|
+
noBorder: p,
|
|
2617
2621
|
size: g,
|
|
2618
|
-
labelRight:
|
|
2619
|
-
labelLeft:
|
|
2620
|
-
spacing:
|
|
2621
|
-
noBackground:
|
|
2622
|
+
labelRight: l,
|
|
2623
|
+
labelLeft: d,
|
|
2624
|
+
spacing: h,
|
|
2625
|
+
noBackground: y,
|
|
2622
2626
|
align: w
|
|
2623
|
-
}),
|
|
2627
|
+
}), B = f({
|
|
2624
2628
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2625
2629
|
"text-copy-light": r === "dark" && !i,
|
|
2626
2630
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2627
2631
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2628
2632
|
});
|
|
2629
|
-
return /* @__PURE__ */
|
|
2633
|
+
return /* @__PURE__ */ v(
|
|
2630
2634
|
Ze,
|
|
2631
2635
|
{
|
|
2632
|
-
ref:
|
|
2636
|
+
ref: x,
|
|
2633
2637
|
className: P,
|
|
2634
2638
|
disabled: t,
|
|
2635
2639
|
type: s,
|
|
2636
|
-
"aria-label":
|
|
2637
|
-
...
|
|
2640
|
+
"aria-label": m || u,
|
|
2641
|
+
...T,
|
|
2638
2642
|
children: [
|
|
2639
|
-
|
|
2640
|
-
/* @__PURE__ */
|
|
2641
|
-
|
|
2643
|
+
d && /* @__PURE__ */ c("span", { className: "pr-2", children: d }),
|
|
2644
|
+
/* @__PURE__ */ c("div", { className: B, children: e }),
|
|
2645
|
+
l && /* @__PURE__ */ c("span", { className: "pl-2", children: l })
|
|
2642
2646
|
]
|
|
2643
2647
|
}
|
|
2644
2648
|
);
|
|
2645
2649
|
}
|
|
2646
2650
|
);
|
|
2647
|
-
|
|
2648
|
-
const tr =
|
|
2651
|
+
Ye.displayName = "ButtonIcon";
|
|
2652
|
+
const tr = G.forwardRef(
|
|
2649
2653
|
({
|
|
2650
2654
|
children: e,
|
|
2651
2655
|
disabled: t = !1,
|
|
@@ -2655,13 +2659,13 @@ const tr = B.forwardRef(
|
|
|
2655
2659
|
className: o,
|
|
2656
2660
|
size: s = "medium",
|
|
2657
2661
|
raw: i = !1,
|
|
2658
|
-
noBorder:
|
|
2659
|
-
spacing:
|
|
2660
|
-
variant:
|
|
2662
|
+
noBorder: p = !1,
|
|
2663
|
+
spacing: m,
|
|
2664
|
+
variant: u = "primary",
|
|
2661
2665
|
noTruncate: g = !1,
|
|
2662
|
-
...
|
|
2663
|
-
},
|
|
2664
|
-
const
|
|
2666
|
+
...l
|
|
2667
|
+
}, d) => {
|
|
2668
|
+
const h = er({
|
|
2665
2669
|
type: Zt,
|
|
2666
2670
|
mode: r,
|
|
2667
2671
|
focusMode: n,
|
|
@@ -2670,29 +2674,29 @@ const tr = B.forwardRef(
|
|
|
2670
2674
|
raw: i,
|
|
2671
2675
|
className: o,
|
|
2672
2676
|
size: s,
|
|
2673
|
-
noBorder:
|
|
2674
|
-
spacing:
|
|
2675
|
-
variant:
|
|
2677
|
+
noBorder: p,
|
|
2678
|
+
spacing: m,
|
|
2679
|
+
variant: u,
|
|
2676
2680
|
noTruncate: g
|
|
2677
2681
|
});
|
|
2678
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ c(
|
|
2679
2683
|
Ze,
|
|
2680
2684
|
{
|
|
2681
|
-
ref:
|
|
2682
|
-
className:
|
|
2685
|
+
ref: d,
|
|
2686
|
+
className: h,
|
|
2683
2687
|
disabled: t,
|
|
2684
|
-
...
|
|
2688
|
+
...l,
|
|
2685
2689
|
children: e
|
|
2686
2690
|
}
|
|
2687
2691
|
);
|
|
2688
2692
|
}
|
|
2689
2693
|
);
|
|
2690
2694
|
tr.displayName = "Button";
|
|
2691
|
-
function
|
|
2695
|
+
function Na(e) {
|
|
2692
2696
|
const t = Tt();
|
|
2693
2697
|
return `${e}${t}`;
|
|
2694
2698
|
}
|
|
2695
|
-
const
|
|
2699
|
+
const xa = ({
|
|
2696
2700
|
className: e,
|
|
2697
2701
|
headerClassName: t,
|
|
2698
2702
|
bodyClassName: r,
|
|
@@ -2702,11 +2706,11 @@ const Na = ({
|
|
|
2702
2706
|
compact: s,
|
|
2703
2707
|
noBorder: i
|
|
2704
2708
|
}) => {
|
|
2705
|
-
const
|
|
2709
|
+
const p = f(
|
|
2706
2710
|
Te,
|
|
2707
2711
|
e,
|
|
2708
2712
|
"rounded-md",
|
|
2709
|
-
|
|
2713
|
+
Ce(a),
|
|
2710
2714
|
{
|
|
2711
2715
|
"border-none": i,
|
|
2712
2716
|
"border-2": !i,
|
|
@@ -2718,7 +2722,7 @@ const Na = ({
|
|
|
2718
2722
|
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": o === "system",
|
|
2719
2723
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": o === "alt-system"
|
|
2720
2724
|
}
|
|
2721
|
-
),
|
|
2725
|
+
), m = t || f(`${Te}__header mt-0 border-b-2`, {
|
|
2722
2726
|
"text-copy-light border-border-accent": o === "darker",
|
|
2723
2727
|
"border-border-accent": o === "dark",
|
|
2724
2728
|
"border-border-medium": o === "light",
|
|
@@ -2726,11 +2730,11 @@ const Na = ({
|
|
|
2726
2730
|
"border-border-accent dark:border-border-medium": o === "alt-system",
|
|
2727
2731
|
"mb-4": !s,
|
|
2728
2732
|
"mb-2": s
|
|
2729
|
-
}),
|
|
2733
|
+
}), u = f(r), g = n || f(`${Te}__footer pt-2`);
|
|
2730
2734
|
return {
|
|
2731
|
-
wrapper:
|
|
2732
|
-
header:
|
|
2733
|
-
body:
|
|
2735
|
+
wrapper: p,
|
|
2736
|
+
header: m,
|
|
2737
|
+
body: u,
|
|
2734
2738
|
footer: g
|
|
2735
2739
|
};
|
|
2736
2740
|
};
|
|
@@ -2740,9 +2744,9 @@ function Ca({
|
|
|
2740
2744
|
userAriaLabelledby: r,
|
|
2741
2745
|
className: n
|
|
2742
2746
|
}) {
|
|
2743
|
-
return typeof t == "string" ? /* @__PURE__ */
|
|
2747
|
+
return typeof t == "string" ? /* @__PURE__ */ c("h2", { id: e, className: n, children: t }) : r ? /* @__PURE__ */ c("div", { className: n, children: t }) : t ? /* @__PURE__ */ c("div", { className: n, id: e, children: t }) : null;
|
|
2744
2748
|
}
|
|
2745
|
-
const
|
|
2749
|
+
const Oa = ({
|
|
2746
2750
|
header: e,
|
|
2747
2751
|
headerClassName: t,
|
|
2748
2752
|
footer: r,
|
|
@@ -2751,47 +2755,47 @@ const xa = ({
|
|
|
2751
2755
|
className: o,
|
|
2752
2756
|
bodyClassName: s,
|
|
2753
2757
|
"aria-labelledby": i,
|
|
2754
|
-
spacing:
|
|
2755
|
-
mode:
|
|
2756
|
-
compact:
|
|
2758
|
+
spacing: p,
|
|
2759
|
+
mode: m = "system",
|
|
2760
|
+
compact: u = !1,
|
|
2757
2761
|
noBorder: g = !1,
|
|
2758
|
-
...
|
|
2762
|
+
...l
|
|
2759
2763
|
}) => {
|
|
2760
|
-
let
|
|
2761
|
-
const
|
|
2764
|
+
let d = null, h = null;
|
|
2765
|
+
const y = typeof e == "string", w = Na(Te), T = xa({
|
|
2762
2766
|
className: o,
|
|
2763
2767
|
headerClassName: t,
|
|
2764
2768
|
bodyClassName: s,
|
|
2765
2769
|
footerClassName: n,
|
|
2766
|
-
spacing:
|
|
2767
|
-
mode:
|
|
2768
|
-
compact:
|
|
2770
|
+
spacing: p,
|
|
2771
|
+
mode: m,
|
|
2772
|
+
compact: u,
|
|
2769
2773
|
noBorder: g
|
|
2770
2774
|
});
|
|
2771
|
-
return
|
|
2775
|
+
return y ? (d = w, h = d) : !y && e && i ? (d = null, h = i) : !y && e && !i ? (d = w, h = d) : (d = null, h = i || null), /* @__PURE__ */ c("div", { className: T.wrapper, children: /* @__PURE__ */ v(
|
|
2772
2776
|
"section",
|
|
2773
2777
|
{
|
|
2774
|
-
...
|
|
2775
|
-
"aria-labelledby":
|
|
2778
|
+
...h && {
|
|
2779
|
+
"aria-labelledby": h
|
|
2776
2780
|
},
|
|
2777
|
-
className:
|
|
2778
|
-
...
|
|
2781
|
+
className: T.body,
|
|
2782
|
+
...l,
|
|
2779
2783
|
children: [
|
|
2780
|
-
/* @__PURE__ */
|
|
2784
|
+
/* @__PURE__ */ c(
|
|
2781
2785
|
Ca,
|
|
2782
2786
|
{
|
|
2783
|
-
...
|
|
2787
|
+
...d && { id: d },
|
|
2784
2788
|
content: e,
|
|
2785
|
-
className:
|
|
2789
|
+
className: T.header,
|
|
2786
2790
|
userAriaLabelledby: i
|
|
2787
2791
|
}
|
|
2788
2792
|
),
|
|
2789
|
-
/* @__PURE__ */
|
|
2790
|
-
r ? /* @__PURE__ */
|
|
2793
|
+
/* @__PURE__ */ c("div", { children: a }),
|
|
2794
|
+
r ? /* @__PURE__ */ c("div", { className: T.footer, children: r }) : null
|
|
2791
2795
|
]
|
|
2792
2796
|
}
|
|
2793
2797
|
) });
|
|
2794
|
-
},
|
|
2798
|
+
}, Pa = ({
|
|
2795
2799
|
className: e,
|
|
2796
2800
|
mode: t = "system",
|
|
2797
2801
|
row1: r,
|
|
@@ -2800,7 +2804,7 @@ const xa = ({
|
|
|
2800
2804
|
spacing: o,
|
|
2801
2805
|
raw: s = !1
|
|
2802
2806
|
}) => {
|
|
2803
|
-
const i = f(
|
|
2807
|
+
const i = f(wa, e, Ce(o), {
|
|
2804
2808
|
"text-copy-dark": !s && t === "dark",
|
|
2805
2809
|
"text-copy-lighter": !s && t === "light",
|
|
2806
2810
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -2808,35 +2812,35 @@ const xa = ({
|
|
|
2808
2812
|
"mb-[100px]": !a && !s,
|
|
2809
2813
|
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
|
|
2810
2814
|
});
|
|
2811
|
-
return /* @__PURE__ */
|
|
2812
|
-
r && /* @__PURE__ */
|
|
2813
|
-
n && /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ v("footer", { className: i, children: [
|
|
2816
|
+
r && /* @__PURE__ */ c("div", { children: r }),
|
|
2817
|
+
n && /* @__PURE__ */ c("div", { children: n })
|
|
2814
2818
|
] });
|
|
2815
|
-
},
|
|
2819
|
+
}, Da = ({
|
|
2816
2820
|
children: e,
|
|
2817
2821
|
className: t,
|
|
2818
2822
|
raw: r = !1,
|
|
2819
2823
|
spacing: n
|
|
2820
2824
|
}) => {
|
|
2821
|
-
const a = f(t,
|
|
2825
|
+
const a = f(t, Ea, Ce(n), {
|
|
2822
2826
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2823
2827
|
});
|
|
2824
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ c("main", { className: a, children: e });
|
|
2825
2829
|
};
|
|
2826
2830
|
/*!
|
|
2827
|
-
@versini/ui-components v5.
|
|
2831
|
+
@versini/ui-components v5.21.0
|
|
2828
2832
|
© 2024 gizmette.com
|
|
2829
2833
|
*/
|
|
2830
2834
|
try {
|
|
2831
2835
|
window.__VERSINI_UI_GLOBAL__ || (window.__VERSINI_UI_GLOBAL__ = {
|
|
2832
|
-
version: "5.
|
|
2833
|
-
buildTime: "07/
|
|
2836
|
+
version: "5.21.0",
|
|
2837
|
+
buildTime: "07/19/2024 08:17 PM EDT",
|
|
2834
2838
|
homepage: "https://github.com/aversini/ui-components",
|
|
2835
2839
|
license: "MIT"
|
|
2836
2840
|
});
|
|
2837
2841
|
} catch {
|
|
2838
2842
|
}
|
|
2839
|
-
function
|
|
2843
|
+
function $a(e) {
|
|
2840
2844
|
return hr(() => e.every((t) => t == null) ? () => {
|
|
2841
2845
|
} : (t) => {
|
|
2842
2846
|
e.forEach((r) => {
|
|
@@ -2844,7 +2848,7 @@ function Da(e) {
|
|
|
2844
2848
|
});
|
|
2845
2849
|
}, e);
|
|
2846
2850
|
}
|
|
2847
|
-
function
|
|
2851
|
+
function Ma(e) {
|
|
2848
2852
|
const t = Tt();
|
|
2849
2853
|
if (!e)
|
|
2850
2854
|
return t;
|
|
@@ -2855,7 +2859,7 @@ function $a(e) {
|
|
|
2855
2859
|
return typeof r == "number" || typeof r == "string" ? `${n}${r}` : `${n}${t}`;
|
|
2856
2860
|
}
|
|
2857
2861
|
}
|
|
2858
|
-
const rr = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT",
|
|
2862
|
+
const rr = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", La = {
|
|
2859
2863
|
alert: null,
|
|
2860
2864
|
alertdialog: null,
|
|
2861
2865
|
log: "polite",
|
|
@@ -2863,7 +2867,7 @@ const rr = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Ma = {
|
|
|
2863
2867
|
progressbar: null,
|
|
2864
2868
|
status: "polite",
|
|
2865
2869
|
timer: "assertive"
|
|
2866
|
-
},
|
|
2870
|
+
}, Ua = (e, t) => {
|
|
2867
2871
|
switch (t == null ? void 0 : t.type) {
|
|
2868
2872
|
case rr:
|
|
2869
2873
|
return {
|
|
@@ -2878,7 +2882,7 @@ const rr = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Ma = {
|
|
|
2878
2882
|
default:
|
|
2879
2883
|
return e;
|
|
2880
2884
|
}
|
|
2881
|
-
},
|
|
2885
|
+
}, Ha = ({
|
|
2882
2886
|
onAnnouncementClear: e,
|
|
2883
2887
|
dispatch: t
|
|
2884
2888
|
}) => {
|
|
@@ -2896,13 +2900,13 @@ const rr = "SET_ANNOUNCEMENT", nr = "CLEAR_ANNOUNCEMENT", Ma = {
|
|
|
2896
2900
|
type: rr,
|
|
2897
2901
|
payload: e
|
|
2898
2902
|
}), t && (r.current = setTimeout(
|
|
2899
|
-
() =>
|
|
2903
|
+
() => Ha({
|
|
2900
2904
|
onAnnouncementClear: n,
|
|
2901
2905
|
dispatch: a
|
|
2902
2906
|
}),
|
|
2903
2907
|
t
|
|
2904
2908
|
));
|
|
2905
|
-
},
|
|
2909
|
+
}, Ka = ({
|
|
2906
2910
|
children: e,
|
|
2907
2911
|
announcementTimeoutRef: t,
|
|
2908
2912
|
announcementDelay: r,
|
|
@@ -2934,21 +2938,21 @@ function ar({
|
|
|
2934
2938
|
clearAnnouncementDelay: o,
|
|
2935
2939
|
onAnnouncementClear: s,
|
|
2936
2940
|
visible: i,
|
|
2937
|
-
...
|
|
2941
|
+
...p
|
|
2938
2942
|
}) {
|
|
2939
|
-
const
|
|
2943
|
+
const m = F(), u = F(), [g, l] = Et(Ua, {
|
|
2940
2944
|
announcement: null
|
|
2941
2945
|
});
|
|
2942
|
-
let
|
|
2943
|
-
typeof
|
|
2944
|
-
|
|
2945
|
-
announcementTimeoutRef:
|
|
2946
|
+
let d = r;
|
|
2947
|
+
typeof d > "u" && (d = n ? La[n] : "assertive"), j(() => {
|
|
2948
|
+
Ka({
|
|
2949
|
+
announcementTimeoutRef: m,
|
|
2946
2950
|
announcementDelay: a,
|
|
2947
2951
|
children: e,
|
|
2948
2952
|
clearAnnouncementDelay: o,
|
|
2949
|
-
clearAnnouncementTimeoutRef:
|
|
2953
|
+
clearAnnouncementTimeoutRef: u,
|
|
2950
2954
|
onAnnouncementClear: s,
|
|
2951
|
-
dispatch:
|
|
2955
|
+
dispatch: l
|
|
2952
2956
|
});
|
|
2953
2957
|
}, [
|
|
2954
2958
|
e,
|
|
@@ -2956,16 +2960,16 @@ function ar({
|
|
|
2956
2960
|
o,
|
|
2957
2961
|
s
|
|
2958
2962
|
]);
|
|
2959
|
-
const
|
|
2963
|
+
const h = f(t, {
|
|
2960
2964
|
"sr-only": !i
|
|
2961
2965
|
});
|
|
2962
|
-
return /* @__PURE__ */
|
|
2966
|
+
return /* @__PURE__ */ c(
|
|
2963
2967
|
"div",
|
|
2964
2968
|
{
|
|
2965
|
-
"aria-live":
|
|
2969
|
+
"aria-live": d,
|
|
2966
2970
|
...n && { role: n },
|
|
2967
|
-
className:
|
|
2968
|
-
...
|
|
2971
|
+
className: h,
|
|
2972
|
+
...p,
|
|
2969
2973
|
children: g.announcement
|
|
2970
2974
|
}
|
|
2971
2975
|
);
|
|
@@ -2983,7 +2987,7 @@ try {
|
|
|
2983
2987
|
});
|
|
2984
2988
|
} catch {
|
|
2985
2989
|
}
|
|
2986
|
-
const
|
|
2990
|
+
const Ga = (e) => {
|
|
2987
2991
|
let t = "";
|
|
2988
2992
|
if (typeof e == "number" || typeof e == "string")
|
|
2989
2993
|
t = "m-" + e;
|
|
@@ -2992,21 +2996,21 @@ const Ka = (e) => {
|
|
|
2992
2996
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2993
2997
|
}
|
|
2994
2998
|
return t;
|
|
2995
|
-
}, or = "av-text-input",
|
|
2999
|
+
}, or = "av-text-input", Ba = "av-text-input-wrapper", Je = "av-text-input-helper-text", hs = "av-text-area", ps = "av-text-area-wrapper", gs = "av-text-area-helper-text", fs = "av-text-area__control--right", ys = "av-toggle", Wa = ({
|
|
2996
3000
|
mode: e
|
|
2997
3001
|
}) => f({
|
|
2998
3002
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
2999
3003
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3000
3004
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3001
3005
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3002
|
-
}),
|
|
3006
|
+
}), Va = ({
|
|
3003
3007
|
focusMode: e
|
|
3004
3008
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3005
3009
|
"focus:outline-focus-dark": e === "dark",
|
|
3006
3010
|
"focus:outline-focus-light": e === "light",
|
|
3007
3011
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3008
3012
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3009
|
-
}),
|
|
3013
|
+
}), Fa = ({
|
|
3010
3014
|
noBorder: e,
|
|
3011
3015
|
error: t
|
|
3012
3016
|
}) => f("border-2", {
|
|
@@ -3014,7 +3018,7 @@ const Ka = (e) => {
|
|
|
3014
3018
|
"focus:border-border-dark": !e && t,
|
|
3015
3019
|
"border-border-error-dark": !e && t,
|
|
3016
3020
|
"border-transparent": e
|
|
3017
|
-
}),
|
|
3021
|
+
}), Ja = ({
|
|
3018
3022
|
disabled: e,
|
|
3019
3023
|
raw: t,
|
|
3020
3024
|
error: r,
|
|
@@ -3038,7 +3042,7 @@ const Ka = (e) => {
|
|
|
3038
3042
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": n === "system",
|
|
3039
3043
|
"text-copy-lighter dark:text-copy-error-dark": n === "alt-system"
|
|
3040
3044
|
});
|
|
3041
|
-
},
|
|
3045
|
+
}, ja = ({
|
|
3042
3046
|
error: e,
|
|
3043
3047
|
raw: t,
|
|
3044
3048
|
mode: r,
|
|
@@ -3065,7 +3069,7 @@ const Ka = (e) => {
|
|
|
3065
3069
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3066
3070
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3067
3071
|
});
|
|
3068
|
-
},
|
|
3072
|
+
}, Ya = ({
|
|
3069
3073
|
className: e,
|
|
3070
3074
|
inputClassName: t,
|
|
3071
3075
|
raw: r,
|
|
@@ -3074,43 +3078,43 @@ const Ka = (e) => {
|
|
|
3074
3078
|
error: o,
|
|
3075
3079
|
spacing: s,
|
|
3076
3080
|
mode: i,
|
|
3077
|
-
focusMode:
|
|
3081
|
+
focusMode: p
|
|
3078
3082
|
}) => {
|
|
3079
|
-
const
|
|
3083
|
+
const m = r ? e : f(
|
|
3080
3084
|
"relative flex w-full flex-col justify-center",
|
|
3081
|
-
|
|
3085
|
+
Ba,
|
|
3082
3086
|
e,
|
|
3083
|
-
|
|
3084
|
-
),
|
|
3087
|
+
Ga(s)
|
|
3088
|
+
), u = r ? f(t) : f(
|
|
3085
3089
|
or,
|
|
3086
3090
|
t,
|
|
3087
3091
|
"h-12 rounded-md px-4 text-base",
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3092
|
+
Wa({ mode: i }),
|
|
3093
|
+
Va({ focusMode: p }),
|
|
3094
|
+
Fa({ noBorder: a, error: o }),
|
|
3091
3095
|
{
|
|
3092
3096
|
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
3093
3097
|
}
|
|
3094
|
-
), g = r ? void 0 : "sr-only",
|
|
3098
|
+
), g = r ? void 0 : "sr-only", l = Ja({
|
|
3095
3099
|
disabled: n,
|
|
3096
3100
|
raw: r,
|
|
3097
3101
|
error: o,
|
|
3098
3102
|
mode: i
|
|
3099
|
-
}),
|
|
3103
|
+
}), d = ja({
|
|
3100
3104
|
error: o,
|
|
3101
3105
|
raw: r,
|
|
3102
3106
|
mode: i,
|
|
3103
3107
|
disabled: n
|
|
3104
3108
|
});
|
|
3105
3109
|
return {
|
|
3106
|
-
wrapper:
|
|
3107
|
-
input:
|
|
3110
|
+
wrapper: m,
|
|
3111
|
+
input: u,
|
|
3108
3112
|
accessibleLabel: g,
|
|
3109
|
-
visibleLabel:
|
|
3110
|
-
helperText:
|
|
3113
|
+
visibleLabel: l,
|
|
3114
|
+
helperText: d,
|
|
3111
3115
|
rightElement: r ? void 0 : "absolute right-3"
|
|
3112
3116
|
};
|
|
3113
|
-
}, et =
|
|
3117
|
+
}, et = G.forwardRef(
|
|
3114
3118
|
({
|
|
3115
3119
|
id: e,
|
|
3116
3120
|
name: t,
|
|
@@ -3120,87 +3124,87 @@ const Ka = (e) => {
|
|
|
3120
3124
|
className: o,
|
|
3121
3125
|
inputClassName: s,
|
|
3122
3126
|
mode: i = "system",
|
|
3123
|
-
focusMode:
|
|
3124
|
-
disabled:
|
|
3125
|
-
noBorder:
|
|
3127
|
+
focusMode: p = "system",
|
|
3128
|
+
disabled: m = !1,
|
|
3129
|
+
noBorder: u = !1,
|
|
3126
3130
|
labelId: g,
|
|
3127
|
-
labelHidden:
|
|
3128
|
-
type:
|
|
3129
|
-
helperText:
|
|
3130
|
-
rightElement:
|
|
3131
|
+
labelHidden: l = !1,
|
|
3132
|
+
type: d = "text",
|
|
3133
|
+
helperText: h = "",
|
|
3134
|
+
rightElement: y,
|
|
3131
3135
|
spacing: w,
|
|
3132
|
-
...
|
|
3133
|
-
},
|
|
3134
|
-
const P =
|
|
3136
|
+
...T
|
|
3137
|
+
}, x) => {
|
|
3138
|
+
const P = F(null), [B, z] = J(0), C = Ma({ id: e, prefix: `${or}-` }), D = `${t} error, ${h}`, S = Ya({
|
|
3135
3139
|
className: o,
|
|
3136
3140
|
inputClassName: s,
|
|
3137
3141
|
error: n,
|
|
3138
3142
|
raw: a,
|
|
3139
|
-
focusMode:
|
|
3140
|
-
disabled:
|
|
3141
|
-
noBorder:
|
|
3143
|
+
focusMode: p,
|
|
3144
|
+
disabled: m,
|
|
3145
|
+
noBorder: u,
|
|
3142
3146
|
spacing: w,
|
|
3143
3147
|
mode: i
|
|
3144
3148
|
});
|
|
3145
3149
|
return pr(() => {
|
|
3146
|
-
P.current &&
|
|
3147
|
-
}, []), /* @__PURE__ */
|
|
3148
|
-
/* @__PURE__ */
|
|
3150
|
+
P.current && z(P.current.offsetWidth + 18 + 10);
|
|
3151
|
+
}, []), /* @__PURE__ */ v("div", { className: S.wrapper, children: [
|
|
3152
|
+
/* @__PURE__ */ c(
|
|
3149
3153
|
"label",
|
|
3150
3154
|
{
|
|
3151
|
-
htmlFor:
|
|
3155
|
+
htmlFor: C,
|
|
3152
3156
|
id: g,
|
|
3153
|
-
className:
|
|
3157
|
+
className: S.accessibleLabel,
|
|
3154
3158
|
children: r
|
|
3155
3159
|
}
|
|
3156
3160
|
),
|
|
3157
|
-
/* @__PURE__ */
|
|
3161
|
+
/* @__PURE__ */ c(
|
|
3158
3162
|
"input",
|
|
3159
3163
|
{
|
|
3160
|
-
ref:
|
|
3161
|
-
id:
|
|
3164
|
+
ref: x,
|
|
3165
|
+
id: C,
|
|
3162
3166
|
name: t,
|
|
3163
|
-
type:
|
|
3164
|
-
disabled:
|
|
3167
|
+
type: d,
|
|
3168
|
+
disabled: m,
|
|
3165
3169
|
placeholder: a ? void 0 : " ",
|
|
3166
|
-
className:
|
|
3167
|
-
...
|
|
3170
|
+
className: S.input,
|
|
3171
|
+
...h && { "aria-describedby": `${C}-helper` },
|
|
3168
3172
|
...n && { "aria-invalid": "true" },
|
|
3169
|
-
...
|
|
3170
|
-
...
|
|
3173
|
+
...y && !a && { style: { paddingRight: B } },
|
|
3174
|
+
...T
|
|
3171
3175
|
}
|
|
3172
3176
|
),
|
|
3173
|
-
!a && !
|
|
3177
|
+
!a && !l && /* @__PURE__ */ c(
|
|
3174
3178
|
"label",
|
|
3175
3179
|
{
|
|
3176
3180
|
"aria-hidden": !0,
|
|
3177
|
-
htmlFor:
|
|
3178
|
-
className:
|
|
3181
|
+
htmlFor: C,
|
|
3182
|
+
className: S.visibleLabel,
|
|
3179
3183
|
children: r
|
|
3180
3184
|
}
|
|
3181
3185
|
),
|
|
3182
|
-
|
|
3186
|
+
h && /* @__PURE__ */ c(
|
|
3183
3187
|
"div",
|
|
3184
3188
|
{
|
|
3185
|
-
id: `${
|
|
3186
|
-
className:
|
|
3187
|
-
children:
|
|
3189
|
+
id: `${C}-helper`,
|
|
3190
|
+
className: S.helperText,
|
|
3191
|
+
children: h
|
|
3188
3192
|
}
|
|
3189
3193
|
),
|
|
3190
|
-
|
|
3194
|
+
y && /* @__PURE__ */ c(
|
|
3191
3195
|
"div",
|
|
3192
3196
|
{
|
|
3193
3197
|
ref: P,
|
|
3194
|
-
className:
|
|
3195
|
-
children:
|
|
3198
|
+
className: S.rightElement,
|
|
3199
|
+
children: y
|
|
3196
3200
|
}
|
|
3197
3201
|
),
|
|
3198
|
-
n &&
|
|
3202
|
+
n && h && /* @__PURE__ */ c(ar, { politeness: "polite", clearAnnouncementDelay: 500, children: D })
|
|
3199
3203
|
] });
|
|
3200
3204
|
}
|
|
3201
3205
|
);
|
|
3202
3206
|
et.displayName = "TextInput";
|
|
3203
|
-
const za = 500,
|
|
3207
|
+
const za = 500, qa = 5e3, Qa = 2e4, sr = G.forwardRef(
|
|
3204
3208
|
({
|
|
3205
3209
|
name: e,
|
|
3206
3210
|
disabled: t,
|
|
@@ -3210,74 +3214,74 @@ const za = 500, Ya = 5e3, qa = 2e4, sr = B.forwardRef(
|
|
|
3210
3214
|
onChange: o,
|
|
3211
3215
|
onBlur: s,
|
|
3212
3216
|
onFocus: i,
|
|
3213
|
-
onTextInputMaskBlur:
|
|
3214
|
-
rightElement:
|
|
3215
|
-
spacing:
|
|
3217
|
+
onTextInputMaskBlur: p,
|
|
3218
|
+
rightElement: m,
|
|
3219
|
+
spacing: u,
|
|
3216
3220
|
...g
|
|
3217
|
-
},
|
|
3218
|
-
const [
|
|
3221
|
+
}, l) => {
|
|
3222
|
+
const [d, h] = J(!0), [y, w] = J({
|
|
3219
3223
|
message: null,
|
|
3220
3224
|
politeness: null
|
|
3221
|
-
}),
|
|
3222
|
-
clearTimeout(
|
|
3223
|
-
|
|
3224
|
-
announcementTimeout:
|
|
3225
|
+
}), T = F(!0), x = F(), P = F(null), B = $a([l, P]), z = d ? "Show" : "Hide", C = () => {
|
|
3226
|
+
clearTimeout(x.current), T.current || (x.current = window.setTimeout(() => {
|
|
3227
|
+
T.current = !0, h(!0), w({
|
|
3228
|
+
announcementTimeout: qa,
|
|
3225
3229
|
politeness: "polite",
|
|
3226
3230
|
message: `${r} hiding characters`
|
|
3227
3231
|
}), a && a(!0);
|
|
3228
|
-
},
|
|
3232
|
+
}, Qa));
|
|
3229
3233
|
}, D = (O) => {
|
|
3230
3234
|
O.preventDefault();
|
|
3231
|
-
const
|
|
3232
|
-
|
|
3235
|
+
const L = !T.current;
|
|
3236
|
+
T.current = L, C(), h(L), w({
|
|
3233
3237
|
announcementTimeout: za,
|
|
3234
3238
|
politeness: "assertive",
|
|
3235
|
-
message:
|
|
3236
|
-
}), a && a(
|
|
3237
|
-
},
|
|
3238
|
-
var
|
|
3239
|
-
const { relatedTarget: Me } = O,
|
|
3240
|
-
|
|
3239
|
+
message: L ? "Characters hidden" : "Characters showing"
|
|
3240
|
+
}), a && a(L);
|
|
3241
|
+
}, S = (O) => {
|
|
3242
|
+
var L;
|
|
3243
|
+
const { relatedTarget: Me } = O, b = (L = P.current) == null ? void 0 : L.parentElement;
|
|
3244
|
+
b != null && b.contains(Me) || p && p();
|
|
3241
3245
|
}, Pe = (O) => {
|
|
3242
|
-
|
|
3246
|
+
C(), s && s(O), S(O);
|
|
3243
3247
|
}, De = (O) => {
|
|
3244
|
-
|
|
3248
|
+
C(), i && i(O);
|
|
3245
3249
|
}, $e = (O) => {
|
|
3246
|
-
|
|
3250
|
+
C(), o && o(O);
|
|
3247
3251
|
};
|
|
3248
|
-
return
|
|
3249
|
-
clearTimeout(
|
|
3250
|
-
}, []), /* @__PURE__ */
|
|
3251
|
-
/* @__PURE__ */
|
|
3252
|
+
return j(() => () => {
|
|
3253
|
+
clearTimeout(x.current);
|
|
3254
|
+
}, []), /* @__PURE__ */ v(le, { children: [
|
|
3255
|
+
/* @__PURE__ */ c(
|
|
3252
3256
|
et,
|
|
3253
3257
|
{
|
|
3254
|
-
ref:
|
|
3258
|
+
ref: B,
|
|
3255
3259
|
name: e,
|
|
3256
3260
|
label: r,
|
|
3257
3261
|
labelHidden: n,
|
|
3258
|
-
type:
|
|
3262
|
+
type: d ? "password" : "text",
|
|
3259
3263
|
disabled: t,
|
|
3260
|
-
spacing:
|
|
3264
|
+
spacing: u,
|
|
3261
3265
|
onBlur: Pe,
|
|
3262
3266
|
onFocus: De,
|
|
3263
3267
|
onChange: $e,
|
|
3264
|
-
rightElement:
|
|
3265
|
-
ref:
|
|
3266
|
-
label:
|
|
3268
|
+
rightElement: G.cloneElement(m, {
|
|
3269
|
+
ref: l,
|
|
3270
|
+
label: z,
|
|
3267
3271
|
onClick: D,
|
|
3268
|
-
onBlur:
|
|
3272
|
+
onBlur: S,
|
|
3269
3273
|
disabled: t
|
|
3270
3274
|
}),
|
|
3271
3275
|
...g
|
|
3272
3276
|
}
|
|
3273
3277
|
),
|
|
3274
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ c(
|
|
3275
3279
|
ar,
|
|
3276
3280
|
{
|
|
3277
3281
|
role: "status",
|
|
3278
|
-
politeness:
|
|
3279
|
-
clearAnnouncementDelay:
|
|
3280
|
-
children:
|
|
3282
|
+
politeness: y.politeness,
|
|
3283
|
+
clearAnnouncementDelay: y.announcementTimeout,
|
|
3284
|
+
children: y.message
|
|
3281
3285
|
}
|
|
3282
3286
|
)
|
|
3283
3287
|
] });
|
|
@@ -3297,7 +3301,7 @@ try {
|
|
|
3297
3301
|
});
|
|
3298
3302
|
} catch {
|
|
3299
3303
|
}
|
|
3300
|
-
const
|
|
3304
|
+
const Xa = (e) => {
|
|
3301
3305
|
let t = "";
|
|
3302
3306
|
if (typeof e == "number" || typeof e == "string")
|
|
3303
3307
|
t = "m-" + e;
|
|
@@ -3315,15 +3319,15 @@ const Qa = (e) => {
|
|
|
3315
3319
|
defaultClassName: o,
|
|
3316
3320
|
spacing: s,
|
|
3317
3321
|
title: i,
|
|
3318
|
-
semantic:
|
|
3319
|
-
...
|
|
3322
|
+
semantic: p = !1,
|
|
3323
|
+
...m
|
|
3320
3324
|
}) => {
|
|
3321
|
-
const
|
|
3322
|
-
|
|
3325
|
+
const u = Xa(s), g = f(
|
|
3326
|
+
u,
|
|
3323
3327
|
n || o
|
|
3324
3328
|
);
|
|
3325
|
-
return /* @__PURE__ */
|
|
3326
|
-
/* @__PURE__ */
|
|
3329
|
+
return /* @__PURE__ */ v(le, { children: [
|
|
3330
|
+
/* @__PURE__ */ c(
|
|
3327
3331
|
"svg",
|
|
3328
3332
|
{
|
|
3329
3333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3331,13 +3335,13 @@ const Qa = (e) => {
|
|
|
3331
3335
|
viewBox: r || a,
|
|
3332
3336
|
fill: t || "currentColor",
|
|
3333
3337
|
role: "img",
|
|
3334
|
-
"aria-hidden": !
|
|
3338
|
+
"aria-hidden": !p,
|
|
3335
3339
|
focusable: !1,
|
|
3336
|
-
...
|
|
3340
|
+
...m,
|
|
3337
3341
|
children: e
|
|
3338
3342
|
}
|
|
3339
3343
|
),
|
|
3340
|
-
i &&
|
|
3344
|
+
i && p && /* @__PURE__ */ c("span", { className: "sr-only", children: i })
|
|
3341
3345
|
] });
|
|
3342
3346
|
};
|
|
3343
3347
|
/*!
|
|
@@ -3353,12 +3357,12 @@ try {
|
|
|
3353
3357
|
});
|
|
3354
3358
|
} catch {
|
|
3355
3359
|
}
|
|
3356
|
-
const
|
|
3360
|
+
const Za = ({
|
|
3357
3361
|
className: e,
|
|
3358
3362
|
viewBox: t,
|
|
3359
3363
|
spacing: r,
|
|
3360
3364
|
...n
|
|
3361
|
-
}) => /* @__PURE__ */
|
|
3365
|
+
}) => /* @__PURE__ */ c(
|
|
3362
3366
|
Oe,
|
|
3363
3367
|
{
|
|
3364
3368
|
defaultViewBox: "0 0 1200 500",
|
|
@@ -3368,7 +3372,7 @@ const Xa = ({
|
|
|
3368
3372
|
spacing: r,
|
|
3369
3373
|
title: "Sassy Dog",
|
|
3370
3374
|
...n,
|
|
3371
|
-
children: /* @__PURE__ */
|
|
3375
|
+
children: /* @__PURE__ */ c("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ c(
|
|
3372
3376
|
"path",
|
|
3373
3377
|
{
|
|
3374
3378
|
vectorEffect: "non-scaling-stroke",
|
|
@@ -3378,14 +3382,14 @@ const Xa = ({
|
|
|
3378
3382
|
}
|
|
3379
3383
|
) })
|
|
3380
3384
|
}
|
|
3381
|
-
),
|
|
3385
|
+
), eo = ({
|
|
3382
3386
|
className: e,
|
|
3383
3387
|
viewBox: t,
|
|
3384
3388
|
spacing: r,
|
|
3385
3389
|
title: n,
|
|
3386
3390
|
monotone: a,
|
|
3387
3391
|
...o
|
|
3388
|
-
}) => /* @__PURE__ */
|
|
3392
|
+
}) => /* @__PURE__ */ v(
|
|
3389
3393
|
Oe,
|
|
3390
3394
|
{
|
|
3391
3395
|
defaultViewBox: "0 0 640 512",
|
|
@@ -3396,24 +3400,24 @@ const Xa = ({
|
|
|
3396
3400
|
title: n || "Hide",
|
|
3397
3401
|
...o,
|
|
3398
3402
|
children: [
|
|
3399
|
-
/* @__PURE__ */
|
|
3403
|
+
/* @__PURE__ */ c(
|
|
3400
3404
|
"path",
|
|
3401
3405
|
{
|
|
3402
3406
|
opacity: a ? "1" : "0.4",
|
|
3403
3407
|
d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
|
|
3404
3408
|
}
|
|
3405
3409
|
),
|
|
3406
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
|
|
3407
3411
|
]
|
|
3408
3412
|
}
|
|
3409
|
-
),
|
|
3413
|
+
), to = ({
|
|
3410
3414
|
className: e,
|
|
3411
3415
|
viewBox: t,
|
|
3412
3416
|
spacing: r,
|
|
3413
3417
|
title: n,
|
|
3414
3418
|
monotone: a,
|
|
3415
3419
|
...o
|
|
3416
|
-
}) => /* @__PURE__ */
|
|
3420
|
+
}) => /* @__PURE__ */ v(
|
|
3417
3421
|
Oe,
|
|
3418
3422
|
{
|
|
3419
3423
|
defaultViewBox: "0 0 512 512",
|
|
@@ -3424,7 +3428,7 @@ const Xa = ({
|
|
|
3424
3428
|
title: n || "Key",
|
|
3425
3429
|
...o,
|
|
3426
3430
|
children: [
|
|
3427
|
-
/* @__PURE__ */
|
|
3431
|
+
/* @__PURE__ */ c(
|
|
3428
3432
|
"path",
|
|
3429
3433
|
{
|
|
3430
3434
|
className: "fa-secondary",
|
|
@@ -3432,7 +3436,7 @@ const Xa = ({
|
|
|
3432
3436
|
d: "M168.3 229.7L282.3 343.7l0 0s0 0 0 0L249 377c-4.5 4.5-10.6 7-17 7H192v40c0 13.3-10.7 24-24 24H128v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V408c0-6.4 2.5-12.5 7-17L168.3 229.7s0 0 0 0l0 0z"
|
|
3433
3437
|
}
|
|
3434
3438
|
),
|
|
3435
|
-
/* @__PURE__ */
|
|
3439
|
+
/* @__PURE__ */ c(
|
|
3436
3440
|
"path",
|
|
3437
3441
|
{
|
|
3438
3442
|
className: "fa-primary",
|
|
@@ -3441,14 +3445,14 @@ const Xa = ({
|
|
|
3441
3445
|
)
|
|
3442
3446
|
]
|
|
3443
3447
|
}
|
|
3444
|
-
),
|
|
3448
|
+
), ro = ({
|
|
3445
3449
|
className: e,
|
|
3446
3450
|
viewBox: t,
|
|
3447
3451
|
spacing: r,
|
|
3448
3452
|
title: n,
|
|
3449
3453
|
monotone: a,
|
|
3450
3454
|
...o
|
|
3451
|
-
}) => /* @__PURE__ */
|
|
3455
|
+
}) => /* @__PURE__ */ v(
|
|
3452
3456
|
Oe,
|
|
3453
3457
|
{
|
|
3454
3458
|
defaultViewBox: "0 0 576 512",
|
|
@@ -3459,14 +3463,14 @@ const Xa = ({
|
|
|
3459
3463
|
title: n || "Show",
|
|
3460
3464
|
...o,
|
|
3461
3465
|
children: [
|
|
3462
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ c(
|
|
3463
3467
|
"path",
|
|
3464
3468
|
{
|
|
3465
3469
|
opacity: a ? "1" : "0.4",
|
|
3466
3470
|
d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
|
|
3467
3471
|
}
|
|
3468
3472
|
),
|
|
3469
|
-
/* @__PURE__ */
|
|
3473
|
+
/* @__PURE__ */ c("path", { d: "M224 256c35.3 0 64-28.7 64-64c0-7.1-1.2-13.9-3.3-20.3c-1.8-5.5 1.6-11.9 7.4-11.7c40.8 1.7 77.5 29.6 88.6 71.1c13.7 51.2-16.7 103.9-67.9 117.6s-103.9-16.7-117.6-67.9c-1.9-6.9-2.9-13.9-3.2-20.7c-.3-5.8 6.1-9.2 11.7-7.4c6.4 2.1 13.2 3.3 20.3 3.3z" })
|
|
3470
3474
|
]
|
|
3471
3475
|
}
|
|
3472
3476
|
);
|
|
@@ -3483,7 +3487,7 @@ try {
|
|
|
3483
3487
|
});
|
|
3484
3488
|
} catch {
|
|
3485
3489
|
}
|
|
3486
|
-
const
|
|
3490
|
+
const no = (e) => {
|
|
3487
3491
|
let t = "";
|
|
3488
3492
|
if (typeof e == "number" || typeof e == "string")
|
|
3489
3493
|
t = "m-" + e;
|
|
@@ -3492,7 +3496,7 @@ const ro = (e) => {
|
|
|
3492
3496
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3493
3497
|
}
|
|
3494
3498
|
return t;
|
|
3495
|
-
},
|
|
3499
|
+
}, ao = "av-flexgrid", Ee = "av-flexgrid-item", _e = 0.25, ir = G.createContext({
|
|
3496
3500
|
columnGap: 0,
|
|
3497
3501
|
rowGap: 0
|
|
3498
3502
|
}), wt = ({
|
|
@@ -3504,14 +3508,14 @@ const ro = (e) => {
|
|
|
3504
3508
|
width: o = "auto",
|
|
3505
3509
|
direction: s = "row",
|
|
3506
3510
|
alignHorizontal: i = "normal",
|
|
3507
|
-
alignVertical:
|
|
3508
|
-
spacing:
|
|
3509
|
-
...
|
|
3511
|
+
alignVertical: p = "normal",
|
|
3512
|
+
spacing: m,
|
|
3513
|
+
...u
|
|
3510
3514
|
}) => {
|
|
3511
3515
|
const g = {
|
|
3512
3516
|
flexDirection: s,
|
|
3513
3517
|
justifyContent: i,
|
|
3514
|
-
alignItems:
|
|
3518
|
+
alignItems: p,
|
|
3515
3519
|
height: a,
|
|
3516
3520
|
width: o,
|
|
3517
3521
|
/**
|
|
@@ -3521,12 +3525,12 @@ const ro = (e) => {
|
|
|
3521
3525
|
*/
|
|
3522
3526
|
marginLeft: r * -1 * _e + "rem",
|
|
3523
3527
|
marginTop: n * -1 * _e + "rem"
|
|
3524
|
-
},
|
|
3525
|
-
|
|
3528
|
+
}, l = f(
|
|
3529
|
+
ao,
|
|
3526
3530
|
t,
|
|
3527
3531
|
"box-border flex flex-wrap"
|
|
3528
|
-
),
|
|
3529
|
-
return /* @__PURE__ */
|
|
3532
|
+
), d = { columnGap: r, rowGap: n }, h = m ? "div" : G.Fragment;
|
|
3533
|
+
return /* @__PURE__ */ c(h, { ...m ? { className: no(m) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: g, ...u, children: /* @__PURE__ */ c(ir.Provider, { value: d, children: e }) }) });
|
|
3530
3534
|
}, je = (e, t) => f({
|
|
3531
3535
|
"basis-1/12": e === 1 && !t,
|
|
3532
3536
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -3600,7 +3604,7 @@ const ro = (e) => {
|
|
|
3600
3604
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3601
3605
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3602
3606
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3603
|
-
}),
|
|
3607
|
+
}), oo = ({
|
|
3604
3608
|
className: e,
|
|
3605
3609
|
span: t
|
|
3606
3610
|
}) => {
|
|
@@ -3632,11 +3636,11 @@ const ro = (e) => {
|
|
|
3632
3636
|
const { columnGap: a, rowGap: o } = vt(ir), s = {
|
|
3633
3637
|
paddingLeft: a * _e + "rem",
|
|
3634
3638
|
paddingTop: o * _e + "rem"
|
|
3635
|
-
}, i =
|
|
3639
|
+
}, i = oo({
|
|
3636
3640
|
className: t,
|
|
3637
3641
|
span: r
|
|
3638
3642
|
});
|
|
3639
|
-
return /* @__PURE__ */
|
|
3643
|
+
return /* @__PURE__ */ c("div", { className: i, style: s, ...n, children: e });
|
|
3640
3644
|
};
|
|
3641
3645
|
/*!
|
|
3642
3646
|
@versini/ui-system v1.4.2
|
|
@@ -3651,7 +3655,7 @@ try {
|
|
|
3651
3655
|
});
|
|
3652
3656
|
} catch {
|
|
3653
3657
|
}
|
|
3654
|
-
const
|
|
3658
|
+
const so = "ASK! ME! ANYTHING!", cr = "Sassy Saint", io = "gizmette.com", co = "Log in", lo = "Sign in with a Passkey", bs = "Log out", uo = "Password", mo = "Powered by OpenAI", ws = "Send", Es = "Profile", vs = "Statistics", Ts = "Chat history", Ss = "About", Is = "Type your question here", As = "Clear chat", ks = "Cancel chat", _s = "N/A", Rs = {
|
|
3655
3659
|
PREFERENCES: {
|
|
3656
3660
|
TITLE: "User preferences",
|
|
3657
3661
|
NAME: "Name",
|
|
@@ -3683,65 +3687,65 @@ const oo = "ASK! ME! ANYTHING!", cr = "Sassy Saint", so = "gizmette.com", io = "
|
|
|
3683
3687
|
ENGINE: "OpenAI model",
|
|
3684
3688
|
PLUGIN: "Plugin"
|
|
3685
3689
|
}
|
|
3686
|
-
},
|
|
3690
|
+
}, ho = ({
|
|
3687
3691
|
serverStats: e
|
|
3688
|
-
}) => /* @__PURE__ */
|
|
3689
|
-
|
|
3692
|
+
}) => /* @__PURE__ */ c(
|
|
3693
|
+
Pa,
|
|
3690
3694
|
{
|
|
3691
3695
|
mode: "light",
|
|
3692
|
-
row1: /* @__PURE__ */
|
|
3696
|
+
row1: /* @__PURE__ */ v("div", { children: [
|
|
3693
3697
|
cr,
|
|
3694
3698
|
" v",
|
|
3695
|
-
"3.4.
|
|
3699
|
+
"3.4.3",
|
|
3696
3700
|
" - ",
|
|
3697
|
-
|
|
3701
|
+
mo,
|
|
3698
3702
|
Xe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3699
3703
|
] }),
|
|
3700
|
-
row2: /* @__PURE__ */
|
|
3704
|
+
row2: /* @__PURE__ */ v("div", { children: [
|
|
3701
3705
|
"© ",
|
|
3702
3706
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3703
3707
|
" ",
|
|
3704
|
-
|
|
3708
|
+
io
|
|
3705
3709
|
] })
|
|
3706
3710
|
}
|
|
3707
|
-
),
|
|
3711
|
+
), po = St(() => import("./LazyHeader.p9mJYmhc.js")), go = () => {
|
|
3708
3712
|
const { isAuthenticated: e } = Qe();
|
|
3709
|
-
return /* @__PURE__ */
|
|
3710
|
-
e && /* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3712
|
-
/* @__PURE__ */
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3715
|
-
/* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ v(le, { children: [
|
|
3714
|
+
e && /* @__PURE__ */ c(It, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(po, {}) }),
|
|
3715
|
+
/* @__PURE__ */ v("div", { className: "flex items-center justify-center", children: [
|
|
3716
|
+
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(Za, {}) }),
|
|
3717
|
+
/* @__PURE__ */ v("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3718
|
+
/* @__PURE__ */ c("h1", { children: cr }),
|
|
3719
|
+
/* @__PURE__ */ c("h2", { children: so })
|
|
3716
3720
|
] })
|
|
3717
3721
|
] })
|
|
3718
3722
|
] });
|
|
3719
|
-
},
|
|
3720
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = Qe(), [n, a] =
|
|
3723
|
+
}, fo = () => {
|
|
3724
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = Qe(), [n, a] = J(""), [o, s] = J(""), [i, p] = J(!0), [m, u] = J({
|
|
3721
3725
|
username: "",
|
|
3722
3726
|
password: ""
|
|
3723
|
-
}), g = async (
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
+
}), g = async (l) => {
|
|
3728
|
+
l.preventDefault(), await e(
|
|
3729
|
+
m.username,
|
|
3730
|
+
m.password,
|
|
3727
3731
|
re.CODE
|
|
3728
3732
|
) || (s(""), a("Invalid username or password"));
|
|
3729
3733
|
};
|
|
3730
|
-
return
|
|
3731
|
-
var
|
|
3732
|
-
(
|
|
3733
|
-
var
|
|
3734
|
-
(
|
|
3734
|
+
return j(() => {
|
|
3735
|
+
var l;
|
|
3736
|
+
(l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
|
|
3737
|
+
var d;
|
|
3738
|
+
(d = document.getElementById("root")) == null || d.classList.replace("app-hidden", "fadeIn");
|
|
3735
3739
|
}, 500);
|
|
3736
|
-
}),
|
|
3740
|
+
}), j(() => {
|
|
3737
3741
|
t && s(t);
|
|
3738
|
-
}, [t]), /* @__PURE__ */
|
|
3739
|
-
/* @__PURE__ */
|
|
3740
|
-
/* @__PURE__ */
|
|
3741
|
-
/* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3743
|
-
/* @__PURE__ */
|
|
3744
|
-
/* @__PURE__ */
|
|
3742
|
+
}, [t]), /* @__PURE__ */ v(le, { children: [
|
|
3743
|
+
/* @__PURE__ */ v(Da, { children: [
|
|
3744
|
+
/* @__PURE__ */ c("div", { className: ba(), children: /* @__PURE__ */ c(go, {}) }),
|
|
3745
|
+
/* @__PURE__ */ v("form", { className: "mt-5", onSubmit: g, children: [
|
|
3746
|
+
/* @__PURE__ */ c(wt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(ee, { span: 6, children: /* @__PURE__ */ v(Oa, { mode: "dark", children: [
|
|
3747
|
+
/* @__PURE__ */ c(ee, { span: 12, children: o && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3748
|
+
/* @__PURE__ */ c(ee, { span: 12, children: /* @__PURE__ */ c(
|
|
3745
3749
|
et,
|
|
3746
3750
|
{
|
|
3747
3751
|
required: !0,
|
|
@@ -3752,16 +3756,16 @@ const oo = "ASK! ME! ANYTHING!", cr = "Sassy Saint", so = "gizmette.com", io = "
|
|
|
3752
3756
|
focusMode: "light",
|
|
3753
3757
|
name: "username",
|
|
3754
3758
|
label: "Username",
|
|
3755
|
-
onChange: (
|
|
3756
|
-
|
|
3757
|
-
...
|
|
3758
|
-
username:
|
|
3759
|
+
onChange: (l) => {
|
|
3760
|
+
u({
|
|
3761
|
+
...m,
|
|
3762
|
+
username: l.target.value
|
|
3759
3763
|
}), a("");
|
|
3760
3764
|
},
|
|
3761
3765
|
error: n !== ""
|
|
3762
3766
|
}
|
|
3763
3767
|
) }),
|
|
3764
|
-
/* @__PURE__ */
|
|
3768
|
+
/* @__PURE__ */ c(ee, { span: 12, children: /* @__PURE__ */ c(
|
|
3765
3769
|
sr,
|
|
3766
3770
|
{
|
|
3767
3771
|
required: !0,
|
|
@@ -3771,20 +3775,20 @@ const oo = "ASK! ME! ANYTHING!", cr = "Sassy Saint", so = "gizmette.com", io = "
|
|
|
3771
3775
|
mode: "dark",
|
|
3772
3776
|
focusMode: "light",
|
|
3773
3777
|
name: "password",
|
|
3774
|
-
label:
|
|
3775
|
-
rightElement: /* @__PURE__ */
|
|
3776
|
-
onMaskChange:
|
|
3777
|
-
onChange: (
|
|
3778
|
-
|
|
3779
|
-
...
|
|
3780
|
-
password:
|
|
3778
|
+
label: uo,
|
|
3779
|
+
rightElement: /* @__PURE__ */ c(Ye, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(ro, {}) : /* @__PURE__ */ c(eo, {}) }),
|
|
3780
|
+
onMaskChange: p,
|
|
3781
|
+
onChange: (l) => {
|
|
3782
|
+
u({
|
|
3783
|
+
...m,
|
|
3784
|
+
password: l.target.value
|
|
3781
3785
|
}), a("");
|
|
3782
3786
|
},
|
|
3783
3787
|
error: n !== "",
|
|
3784
3788
|
helperText: n
|
|
3785
3789
|
}
|
|
3786
3790
|
) }),
|
|
3787
|
-
/* @__PURE__ */
|
|
3791
|
+
/* @__PURE__ */ c(ee, { span: 12, children: /* @__PURE__ */ c(
|
|
3788
3792
|
tr,
|
|
3789
3793
|
{
|
|
3790
3794
|
mode: "light",
|
|
@@ -3793,110 +3797,110 @@ const oo = "ASK! ME! ANYTHING!", cr = "Sassy Saint", so = "gizmette.com", io = "
|
|
|
3793
3797
|
noBorder: !0,
|
|
3794
3798
|
type: "submit",
|
|
3795
3799
|
className: "mb-4 mt-6",
|
|
3796
|
-
children:
|
|
3800
|
+
children: co
|
|
3797
3801
|
}
|
|
3798
3802
|
) })
|
|
3799
3803
|
] }) }) }),
|
|
3800
|
-
/* @__PURE__ */
|
|
3801
|
-
/* @__PURE__ */
|
|
3802
|
-
|
|
3804
|
+
/* @__PURE__ */ c("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3805
|
+
/* @__PURE__ */ c(wt, { alignHorizontal: "center", children: /* @__PURE__ */ c(ee, { span: 6, children: /* @__PURE__ */ c(
|
|
3806
|
+
Ye,
|
|
3803
3807
|
{
|
|
3804
3808
|
mode: "dark",
|
|
3805
3809
|
focusMode: "light",
|
|
3806
3810
|
fullWidth: !0,
|
|
3807
3811
|
noBorder: !0,
|
|
3808
3812
|
className: "mb-4 mt-1",
|
|
3809
|
-
labelRight:
|
|
3813
|
+
labelRight: lo,
|
|
3810
3814
|
onClick: r,
|
|
3811
|
-
children: /* @__PURE__ */
|
|
3815
|
+
children: /* @__PURE__ */ c(to, { className: "size-4" })
|
|
3812
3816
|
}
|
|
3813
3817
|
) }) })
|
|
3814
3818
|
] })
|
|
3815
3819
|
] }),
|
|
3816
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ c(ho, {})
|
|
3817
3821
|
] });
|
|
3818
|
-
},
|
|
3822
|
+
}, yo = new URL(document.location.href).searchParams, bo = !!yo.get("debug") || !1, wo = St(() => import("./App.C6D9sIPY.js").then((e) => e.App)), Eo = ({ isComponent: e }) => {
|
|
3819
3823
|
const { isAuthenticated: t } = Qe();
|
|
3820
|
-
return t ? /* @__PURE__ */
|
|
3821
|
-
},
|
|
3824
|
+
return t ? /* @__PURE__ */ c(It, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(wo, { isComponent: e }) }) : /* @__PURE__ */ c(fo, {});
|
|
3825
|
+
}, vo = ({
|
|
3822
3826
|
isComponent: e = !1,
|
|
3823
|
-
domain: t =
|
|
3824
|
-
}) => /* @__PURE__ */
|
|
3825
|
-
|
|
3827
|
+
domain: t = ya
|
|
3828
|
+
}) => /* @__PURE__ */ c(le, { children: /* @__PURE__ */ c(sa, { clientId: ia, domain: t, debug: bo, children: /* @__PURE__ */ c(Eo, { isComponent: e }) }) }), To = ({ domain: e }) => /* @__PURE__ */ c(vo, { isComponent: !0, domain: e });
|
|
3829
|
+
To.displayName = "SassySaint-3.4.3";
|
|
3826
3830
|
export {
|
|
3827
3831
|
er as A,
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
$o as ERROR_MESSAGE,
|
|
3832
|
+
Ss as ABOUT_TITLE,
|
|
3833
|
+
Wo as ACTION_LOCATION,
|
|
3834
|
+
Ho as ACTION_MESSAGE,
|
|
3835
|
+
Go as ACTION_MODEL,
|
|
3836
|
+
Ko as ACTION_RESET,
|
|
3837
|
+
Bo as ACTION_RESTORE,
|
|
3838
|
+
Fo as ACTION_SEARCH,
|
|
3839
|
+
Jo as ACTION_SORT,
|
|
3840
|
+
Vo as ACTION_STREAMING,
|
|
3841
|
+
ho as AppFooter,
|
|
3842
|
+
ks as CANCEL,
|
|
3843
|
+
Rs as CARDS,
|
|
3844
|
+
As as CLEAR,
|
|
3845
|
+
Mo as ERROR_MESSAGE,
|
|
3843
3846
|
et as G,
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3847
|
+
Uo as GPT4_MAX_TOKENS,
|
|
3848
|
+
Ts as HISTORY_TITLE,
|
|
3849
|
+
Yo as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3850
|
+
Qo as LOCAL_STORAGE_LOCATION,
|
|
3851
|
+
jo as LOCAL_STORAGE_PREFIX,
|
|
3849
3852
|
zo as LOCAL_STORAGE_SEARCH,
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3853
|
+
qo as LOCAL_STORAGE_SORT,
|
|
3854
|
+
bs as LOG_OUT,
|
|
3855
|
+
Ma as M,
|
|
3856
|
+
Lo as MODEL_GPT4,
|
|
3857
|
+
go as MessagesContainerHeader,
|
|
3858
|
+
ds as N,
|
|
3859
|
+
Oa as N$1,
|
|
3860
|
+
_s as NA,
|
|
3861
|
+
Qe as Nr,
|
|
3862
|
+
Ye as O,
|
|
3863
|
+
Es as PROFILE_TITLE,
|
|
3864
|
+
Oo as ROLE_ASSISTANT,
|
|
3865
|
+
$o as ROLE_HIDDEN,
|
|
3866
|
+
Do as ROLE_INTERNAL,
|
|
3867
|
+
Po as ROLE_SYSTEM,
|
|
3864
3868
|
Co as ROLE_USER,
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3869
|
+
Ce as S,
|
|
3870
|
+
ws as SEND,
|
|
3871
|
+
vs as STATS,
|
|
3872
|
+
Xo as STATS_SEPARATOR,
|
|
3873
|
+
To as SassySaint,
|
|
3874
|
+
Is as TYPE_QUESTION,
|
|
3871
3875
|
ar as U,
|
|
3872
|
-
|
|
3876
|
+
gs as a,
|
|
3873
3877
|
wt as b,
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3878
|
+
Da as c,
|
|
3879
|
+
ms as c$1,
|
|
3880
|
+
es as convertLatitudeToDMS,
|
|
3881
|
+
ts as convertLongitudeToDMS,
|
|
3882
|
+
is as durationFormatter,
|
|
3883
|
+
as as extractAverage,
|
|
3880
3884
|
Xt as f,
|
|
3881
|
-
|
|
3882
|
-
|
|
3885
|
+
$a as f$1,
|
|
3886
|
+
to as f$2,
|
|
3883
3887
|
Oe as g,
|
|
3884
|
-
|
|
3885
|
-
|
|
3888
|
+
rs as getCurrentGeoLocation,
|
|
3889
|
+
ba as getMessageContaintWrapperClass,
|
|
3886
3890
|
Ze as i,
|
|
3887
|
-
|
|
3888
|
-
|
|
3891
|
+
us as i$1,
|
|
3892
|
+
os as isLastMessageFromRole,
|
|
3889
3893
|
ee as j,
|
|
3890
3894
|
re as j$1,
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3895
|
+
fs as l,
|
|
3896
|
+
hs as n,
|
|
3897
|
+
ss as numberFormatter,
|
|
3898
|
+
Ga as o,
|
|
3899
|
+
ys as p,
|
|
3900
|
+
cs as pluralize,
|
|
3901
|
+
ps as r,
|
|
3902
|
+
ns as renderDataAsList,
|
|
3903
|
+
ls as s,
|
|
3904
|
+
Zo as truncate,
|
|
3901
3905
|
tr as x
|
|
3902
3906
|
};
|