@versini/sassysaint 6.3.1 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.DzCna0NY.js → App.BP43Jj_A.js} +2143 -1847
- package/dist/chunks/{MarkdownWithExtra.DlBwW8pF.js → MarkdownWithExtra.BibVSqvz.js} +2 -2
- package/dist/chunks/{MessageAssistant.DgBEj1fa.js → MessageAssistant.DFb8HD5S.js} +6 -6
- package/dist/chunks/{index.DBdWZP64.js → index.D5qg19Ov.js} +187 -187
- package/dist/chunks/{index.BB_tYz2G.js → index.Qmbvv1pV.js} +994 -961
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
var
|
|
1
|
+
import { jsx as l, jsxs as $, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import X, { createContext as or, useReducer as Tt, useRef as x, useCallback as q, useEffect as V, useContext as It, useSyncExternalStore as sr, useLayoutEffect as Re, useMemo as De, useState as z, useId as St, lazy as ir, Suspense as cr } from "react";
|
|
3
|
+
import p from "clsx";
|
|
4
|
+
var lr = Object.defineProperty, dr = (e, t, r) => t in e ? lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, He = (e, t, r) => dr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v7.4.0
|
|
7
7
|
© 2024 gizmette.com
|
|
@@ -22,75 +22,75 @@ function J(e) {
|
|
|
22
22
|
r += String.fromCharCode(a);
|
|
23
23
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ne(e) {
|
|
26
26
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
|
|
27
27
|
for (let i = 0; i < n.length; i++)
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function tt() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
34
|
function _t(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
38
|
-
id:
|
|
38
|
+
id: Ne(t),
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
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 v = class extends Error {
|
|
46
46
|
constructor({ message: t, code: r, cause: a, name: n }) {
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function ur({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
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 v({
|
|
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 (((a = r.authenticatorSelection) == null ? void 0 : a.requireResidentKey) === !0)
|
|
64
|
-
return new
|
|
64
|
+
return new v({
|
|
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 = r.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
-
return new
|
|
70
|
+
return new v({
|
|
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 v({
|
|
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 v({
|
|
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 r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new
|
|
89
|
+
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new v({
|
|
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 v({
|
|
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 dr({ error: e, options: t }) {
|
|
|
99
99
|
const o = window.location.hostname;
|
|
100
100
|
if (kt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
|
-
return new
|
|
102
|
+
return new v({
|
|
103
103
|
message: `The RP ID "${r.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 v({
|
|
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 (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
|
|
114
|
-
return new
|
|
114
|
+
return new v({
|
|
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 v({
|
|
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
|
|
@@ -125,7 +125,7 @@ function dr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class mr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,21 +141,21 @@ class ur {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const At = new
|
|
144
|
+
const At = new mr(), hr = ["cross-platform", "platform"];
|
|
145
145
|
function Rt(e) {
|
|
146
|
-
if (e && !(
|
|
146
|
+
if (e && !(hr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function pr(e) {
|
|
150
150
|
var u;
|
|
151
|
-
if (!
|
|
151
|
+
if (!tt())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const t = { publicKey: {
|
|
154
154
|
...e,
|
|
155
|
-
challenge:
|
|
155
|
+
challenge: Ne(e.challenge),
|
|
156
156
|
user: {
|
|
157
157
|
...e.user,
|
|
158
|
-
id:
|
|
158
|
+
id: Ne(e.user.id)
|
|
159
159
|
},
|
|
160
160
|
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(_t)
|
|
161
161
|
} };
|
|
@@ -164,7 +164,7 @@ async function hr(e) {
|
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (c) {
|
|
167
|
-
throw
|
|
167
|
+
throw ur({ error: c, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -176,7 +176,7 @@ async function hr(e) {
|
|
|
176
176
|
try {
|
|
177
177
|
d = o.getPublicKeyAlgorithm();
|
|
178
178
|
} catch (c) {
|
|
179
|
-
|
|
179
|
+
We("getPublicKeyAlgorithm()", c);
|
|
180
180
|
}
|
|
181
181
|
let h;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
@@ -184,14 +184,14 @@ async function hr(e) {
|
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
185
|
c !== null && (h = J(c));
|
|
186
186
|
} catch (c) {
|
|
187
|
-
|
|
187
|
+
We("getPublicKey()", c);
|
|
188
188
|
}
|
|
189
|
-
let
|
|
189
|
+
let f;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
|
|
192
|
+
f = J(o.getAuthenticatorData());
|
|
193
193
|
} catch (c) {
|
|
194
|
-
|
|
194
|
+
We("getAuthenticatorData()", c);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
@@ -202,37 +202,37 @@ async function hr(e) {
|
|
|
202
202
|
transports: i,
|
|
203
203
|
publicKeyAlgorithm: d,
|
|
204
204
|
publicKey: h,
|
|
205
|
-
authenticatorData:
|
|
205
|
+
authenticatorData: f
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
209
|
authenticatorAttachment: Rt(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function We(e, t) {
|
|
213
213
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
if (!
|
|
216
|
+
function fr() {
|
|
217
|
+
if (!tt())
|
|
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();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function gr({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
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 v({
|
|
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 v({
|
|
236
236
|
message: e.message,
|
|
237
237
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
238
|
cause: e
|
|
@@ -241,18 +241,18 @@ function fr({ error: e, options: t }) {
|
|
|
241
241
|
const a = window.location.hostname;
|
|
242
242
|
if (kt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
|
-
return new
|
|
244
|
+
return new v({
|
|
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 v({
|
|
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 v({
|
|
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
|
|
@@ -260,19 +260,19 @@ function fr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function yr(e, t = !1) {
|
|
264
264
|
var u, c;
|
|
265
|
-
if (!
|
|
265
|
+
if (!tt())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
268
|
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(_t));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
|
-
challenge:
|
|
271
|
+
challenge: Ne(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await fr())
|
|
276
276
|
throw Error("Browser does not support WebAuthn autofill");
|
|
277
277
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
278
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
@@ -283,20 +283,20 @@ async function gr(e, t = !1) {
|
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
285
|
} catch (m) {
|
|
286
|
-
throw
|
|
286
|
+
throw gr({ error: m, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
290
|
const { id: s, rawId: i, response: d, type: h } = o;
|
|
291
|
-
let
|
|
292
|
-
return d.userHandle && (
|
|
291
|
+
let f;
|
|
292
|
+
return d.userHandle && (f = J(d.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
294
|
rawId: J(i),
|
|
295
295
|
response: {
|
|
296
296
|
authenticatorData: J(d.authenticatorData),
|
|
297
297
|
clientDataJSON: J(d.clientDataJSON),
|
|
298
298
|
signature: J(d.signature),
|
|
299
|
-
userHandle:
|
|
299
|
+
userHandle: f
|
|
300
300
|
},
|
|
301
301
|
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
@@ -316,7 +316,7 @@ try {
|
|
|
316
316
|
});
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const me = {
|
|
320
320
|
ID_TOKEN: "id_token",
|
|
321
321
|
ACCESS_TOKEN: "token",
|
|
322
322
|
ID_AND_ACCESS_TOKEN: "id_token token",
|
|
@@ -325,7 +325,7 @@ const ue = {
|
|
|
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
|
USERNAME_KEY: "username",
|
|
@@ -338,7 +338,7 @@ const ue = {
|
|
|
338
338
|
SCOPES_KEY: "scopes",
|
|
339
339
|
CLIENT_ID_KEY: "aud",
|
|
340
340
|
ISSUER: "gizmette.com"
|
|
341
|
-
},
|
|
341
|
+
}, br = `-----BEGIN PUBLIC KEY-----
|
|
342
342
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
343
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
344
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -346,134 +346,134 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
|
346
346
|
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
347
347
|
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
348
348
|
awIDAQAB
|
|
349
|
-
-----END PUBLIC KEY-----`,
|
|
349
|
+
-----END PUBLIC KEY-----`, Le = {
|
|
350
350
|
CODE: "code",
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
},
|
|
355
|
-
function
|
|
354
|
+
}, $e = crypto, vt = (e) => e instanceof CryptoKey, Ee = new TextEncoder(), ye = new TextDecoder();
|
|
355
|
+
function Er(...e) {
|
|
356
356
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
357
|
let a = 0;
|
|
358
358
|
for (const n of e)
|
|
359
359
|
r.set(n, a), a += n.length;
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const wr = (e) => {
|
|
363
363
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
364
|
for (let a = 0; a < t.length; a++)
|
|
365
365
|
r[a] = t.charCodeAt(a);
|
|
366
366
|
return r;
|
|
367
|
-
},
|
|
367
|
+
}, te = (e) => {
|
|
368
368
|
let t = e;
|
|
369
369
|
t instanceof Uint8Array && (t = ye.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return wr(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
|
-
let
|
|
376
|
+
let P = class extends Error {
|
|
377
377
|
constructor(t, r) {
|
|
378
378
|
var a;
|
|
379
379
|
super(t, r), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (a = Error.captureStackTrace) == null || a.call(Error, this, this.constructor);
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
|
-
|
|
383
|
-
let
|
|
382
|
+
P.code = "ERR_JOSE_GENERIC";
|
|
383
|
+
let K = class extends P {
|
|
384
384
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
385
385
|
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
class
|
|
388
|
+
K.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
389
|
+
class qe extends P {
|
|
390
390
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
391
391
|
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
|
|
395
|
-
class xt extends
|
|
394
|
+
qe.code = "ERR_JWT_EXPIRED";
|
|
395
|
+
class xt extends P {
|
|
396
396
|
constructor() {
|
|
397
397
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
xt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
|
-
let
|
|
401
|
+
let H = class extends P {
|
|
402
402
|
constructor() {
|
|
403
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
|
-
|
|
407
|
-
class
|
|
406
|
+
H.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
+
class Tr extends P {
|
|
408
408
|
constructor(t = "decryption operation failed", r) {
|
|
409
409
|
super(t, r), this.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
class
|
|
412
|
+
Tr.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
+
class Ir extends P {
|
|
414
414
|
constructor() {
|
|
415
415
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
|
|
419
|
-
let
|
|
418
|
+
Ir.code = "ERR_JWE_INVALID";
|
|
419
|
+
let _ = class extends P {
|
|
420
420
|
constructor() {
|
|
421
421
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
|
-
|
|
425
|
-
let G = class extends
|
|
424
|
+
_.code = "ERR_JWS_INVALID";
|
|
425
|
+
let G = class extends P {
|
|
426
426
|
constructor() {
|
|
427
427
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
430
|
G.code = "ERR_JWT_INVALID";
|
|
431
|
-
class
|
|
431
|
+
class Sr extends P {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
class
|
|
436
|
+
Sr.code = "ERR_JWK_INVALID";
|
|
437
|
+
class _r extends P {
|
|
438
438
|
constructor() {
|
|
439
439
|
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
class
|
|
442
|
+
_r.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class kr extends P {
|
|
444
444
|
constructor(t = "no applicable key found in the JSON Web Key Set", r) {
|
|
445
445
|
super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
|
|
449
|
-
class
|
|
448
|
+
kr.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
+
class Ar extends P {
|
|
450
450
|
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
|
451
451
|
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
|
|
455
|
-
class
|
|
454
|
+
Ar.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class Rr extends P {
|
|
456
456
|
constructor(t = "request timed out", r) {
|
|
457
457
|
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
|
|
461
|
-
class Ct extends
|
|
460
|
+
Rr.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
+
class Ct extends P {
|
|
462
462
|
constructor(t = "signature verification failed", r) {
|
|
463
463
|
super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
Ct.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
|
-
function
|
|
467
|
+
function j(e, t = "algorithm.name") {
|
|
468
468
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
469
469
|
}
|
|
470
470
|
function we(e, t) {
|
|
471
471
|
return e.name === t;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Be(e) {
|
|
474
474
|
return parseInt(e.name.slice(4), 10);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Nr(e) {
|
|
477
477
|
switch (e) {
|
|
478
478
|
case "ES256":
|
|
479
479
|
return "P-256";
|
|
@@ -485,7 +485,7 @@ function Rr(e) {
|
|
|
485
485
|
throw new Error("unreachable");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function vr(e, t) {
|
|
489
489
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
490
490
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
491
491
|
if (t.length > 2) {
|
|
@@ -495,57 +495,57 @@ function Nr(e, t) {
|
|
|
495
495
|
throw new TypeError(r);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function xr(e, t, ...r) {
|
|
499
499
|
switch (t) {
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
502
502
|
case "HS512": {
|
|
503
503
|
if (!we(e.algorithm, "HMAC"))
|
|
504
|
-
throw
|
|
504
|
+
throw j("HMAC");
|
|
505
505
|
const a = parseInt(t.slice(2), 10);
|
|
506
|
-
if (
|
|
507
|
-
throw
|
|
506
|
+
if (Be(e.algorithm.hash) !== a)
|
|
507
|
+
throw j(`SHA-${a}`, "algorithm.hash");
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
case "RS256":
|
|
511
511
|
case "RS384":
|
|
512
512
|
case "RS512": {
|
|
513
513
|
if (!we(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
514
|
-
throw
|
|
514
|
+
throw j("RSASSA-PKCS1-v1_5");
|
|
515
515
|
const a = parseInt(t.slice(2), 10);
|
|
516
|
-
if (
|
|
517
|
-
throw
|
|
516
|
+
if (Be(e.algorithm.hash) !== a)
|
|
517
|
+
throw j(`SHA-${a}`, "algorithm.hash");
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
case "PS256":
|
|
521
521
|
case "PS384":
|
|
522
522
|
case "PS512": {
|
|
523
523
|
if (!we(e.algorithm, "RSA-PSS"))
|
|
524
|
-
throw
|
|
524
|
+
throw j("RSA-PSS");
|
|
525
525
|
const a = parseInt(t.slice(2), 10);
|
|
526
|
-
if (
|
|
527
|
-
throw
|
|
526
|
+
if (Be(e.algorithm.hash) !== a)
|
|
527
|
+
throw j(`SHA-${a}`, "algorithm.hash");
|
|
528
528
|
break;
|
|
529
529
|
}
|
|
530
530
|
case "EdDSA": {
|
|
531
531
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
532
|
-
throw
|
|
532
|
+
throw j("Ed25519 or Ed448");
|
|
533
533
|
break;
|
|
534
534
|
}
|
|
535
535
|
case "ES256":
|
|
536
536
|
case "ES384":
|
|
537
537
|
case "ES512": {
|
|
538
538
|
if (!we(e.algorithm, "ECDSA"))
|
|
539
|
-
throw
|
|
540
|
-
const a =
|
|
539
|
+
throw j("ECDSA");
|
|
540
|
+
const a = Nr(t);
|
|
541
541
|
if (e.algorithm.namedCurve !== a)
|
|
542
|
-
throw
|
|
542
|
+
throw j(a, "algorithm.namedCurve");
|
|
543
543
|
break;
|
|
544
544
|
}
|
|
545
545
|
default:
|
|
546
546
|
throw new TypeError("CryptoKey does not support this operation");
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
vr(e, r);
|
|
549
549
|
}
|
|
550
550
|
function Ot(e, t, ...r) {
|
|
551
551
|
var a;
|
|
@@ -555,11 +555,11 @@ function Ot(e, t, ...r) {
|
|
|
555
555
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
556
556
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
557
557
|
}
|
|
558
|
-
const
|
|
558
|
+
const it = (e, ...t) => Ot("Key must be ", e, ...t);
|
|
559
559
|
function Pt(e, t, ...r) {
|
|
560
560
|
return Ot(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
562
|
+
const Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ve = ["CryptoKey"], Cr = (...e) => {
|
|
563
563
|
const t = e.filter(Boolean);
|
|
564
564
|
if (t.length === 0 || t.length === 1)
|
|
565
565
|
return !0;
|
|
@@ -578,11 +578,11 @@ const Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
578
578
|
}
|
|
579
579
|
return !0;
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function Or(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
if (!
|
|
584
|
+
function he(e) {
|
|
585
|
+
if (!Or(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
588
588
|
return !0;
|
|
@@ -591,24 +591,24 @@ function me(e) {
|
|
|
591
591
|
t = Object.getPrototypeOf(t);
|
|
592
592
|
return Object.getPrototypeOf(e) === t;
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Pr = (e, t) => {
|
|
595
595
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
596
596
|
const { modulusLength: r } = t.algorithm;
|
|
597
597
|
if (typeof r != "number" || r < 2048)
|
|
598
598
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function pe(e) {
|
|
602
|
+
return he(e) && typeof e.kty == "string";
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Dr(e) {
|
|
605
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Lr(e) {
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function $r(e) {
|
|
611
|
+
return pe(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
613
|
function Mr(e) {
|
|
614
614
|
let t, r;
|
|
@@ -635,7 +635,7 @@ function Mr(e) {
|
|
|
635
635
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
636
636
|
break;
|
|
637
637
|
default:
|
|
638
|
-
throw new
|
|
638
|
+
throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
639
639
|
}
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
@@ -657,7 +657,7 @@ function Mr(e) {
|
|
|
657
657
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
658
658
|
break;
|
|
659
659
|
default:
|
|
660
|
-
throw new
|
|
660
|
+
throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
661
661
|
}
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
@@ -673,12 +673,12 @@ function Mr(e) {
|
|
|
673
673
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
674
674
|
break;
|
|
675
675
|
default:
|
|
676
|
-
throw new
|
|
676
|
+
throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
677
677
|
}
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
default:
|
|
681
|
-
throw new
|
|
681
|
+
throw new H('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
682
682
|
}
|
|
683
683
|
return { algorithm: t, keyUsages: r };
|
|
684
684
|
}
|
|
@@ -690,54 +690,54 @@ const Lt = async (e) => {
|
|
|
690
690
|
e.ext ?? !1,
|
|
691
691
|
e.key_ops ?? r
|
|
692
692
|
], n = { ...e };
|
|
693
|
-
return delete n.alg, delete n.use,
|
|
694
|
-
},
|
|
695
|
-
let
|
|
696
|
-
const
|
|
693
|
+
return delete n.alg, delete n.use, $e.subtle.importKey("jwk", n, ...a);
|
|
694
|
+
}, $t = (e) => te(e);
|
|
695
|
+
let oe, se;
|
|
696
|
+
const Mt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = async (e, t, r, a, n = !1) => {
|
|
697
697
|
let o = e.get(t);
|
|
698
698
|
if (o != null && o[a])
|
|
699
699
|
return o[a];
|
|
700
700
|
const s = await Lt({ ...r, alg: a });
|
|
701
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
|
-
},
|
|
703
|
-
if (
|
|
702
|
+
}, Ur = (e, t) => {
|
|
703
|
+
if (Mt(e)) {
|
|
704
704
|
let r = e.export({ format: "jwk" });
|
|
705
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
705
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? $t(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), xe(se, e, r, t));
|
|
706
706
|
}
|
|
707
|
-
return
|
|
708
|
-
},
|
|
709
|
-
if (
|
|
707
|
+
return pe(e) ? e.k ? te(e.k) : (se || (se = /* @__PURE__ */ new WeakMap()), xe(se, e, e, t, !0)) : e;
|
|
708
|
+
}, Kr = (e, t) => {
|
|
709
|
+
if (Mt(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ?
|
|
711
|
+
return r.k ? $t(r.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), xe(oe, e, r, t));
|
|
712
712
|
}
|
|
713
|
-
return
|
|
714
|
-
},
|
|
713
|
+
return pe(e) ? e.k ? te(e.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), xe(oe, e, e, t, !0)) : e;
|
|
714
|
+
}, Hr = { normalizePublicKey: Ur, normalizePrivateKey: Kr }, ee = (e, t, r = 0) => {
|
|
715
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
716
|
const a = e.indexOf(t[0], r);
|
|
717
717
|
if (a === -1)
|
|
718
718
|
return !1;
|
|
719
719
|
const n = e.subarray(a, a + t.length);
|
|
720
|
-
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) ||
|
|
721
|
-
},
|
|
720
|
+
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || ee(e, t, a + 1);
|
|
721
|
+
}, ct = (e) => {
|
|
722
722
|
switch (!0) {
|
|
723
|
-
case
|
|
723
|
+
case ee(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
724
724
|
return "P-256";
|
|
725
|
-
case
|
|
725
|
+
case ee(e, [43, 129, 4, 0, 34]):
|
|
726
726
|
return "P-384";
|
|
727
|
-
case
|
|
727
|
+
case ee(e, [43, 129, 4, 0, 35]):
|
|
728
728
|
return "P-521";
|
|
729
|
-
case
|
|
729
|
+
case ee(e, [43, 101, 110]):
|
|
730
730
|
return "X25519";
|
|
731
|
-
case
|
|
731
|
+
case ee(e, [43, 101, 111]):
|
|
732
732
|
return "X448";
|
|
733
|
-
case
|
|
733
|
+
case ee(e, [43, 101, 112]):
|
|
734
734
|
return "Ed25519";
|
|
735
|
-
case
|
|
735
|
+
case ee(e, [43, 101, 113]):
|
|
736
736
|
return "Ed448";
|
|
737
737
|
default:
|
|
738
|
-
throw new
|
|
738
|
+
throw new H("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, Wr = async (e, t, r, a, n) => {
|
|
741
741
|
let o, s;
|
|
742
742
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((d) => d.charCodeAt(0)));
|
|
743
743
|
switch (a) {
|
|
@@ -773,42 +773,42 @@ const $t = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
773
773
|
case "ECDH-ES+A128KW":
|
|
774
774
|
case "ECDH-ES+A192KW":
|
|
775
775
|
case "ECDH-ES+A256KW": {
|
|
776
|
-
const d =
|
|
776
|
+
const d = ct(i);
|
|
777
777
|
o = d.startsWith("P-") ? { name: "ECDH", namedCurve: d } : { name: d }, s = [];
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
780
|
case "EdDSA":
|
|
781
|
-
o = { name:
|
|
781
|
+
o = { name: ct(i) }, s = ["verify"];
|
|
782
782
|
break;
|
|
783
783
|
default:
|
|
784
|
-
throw new
|
|
784
|
+
throw new H('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
|
-
return
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
786
|
+
return $e.subtle.importKey(t, i, o, !1, s);
|
|
787
|
+
}, Br = (e, t, r) => Wr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
788
|
+
async function Gr(e, t, r) {
|
|
789
789
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
790
790
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
791
|
-
return
|
|
791
|
+
return Br(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
794
|
-
if (!
|
|
793
|
+
async function Jr(e, t) {
|
|
794
|
+
if (!he(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
797
797
|
case "oct":
|
|
798
798
|
if (typeof e.k != "string" || !e.k)
|
|
799
799
|
throw new TypeError('missing "k" (Key Value) Parameter value');
|
|
800
|
-
return
|
|
800
|
+
return te(e.k);
|
|
801
801
|
case "RSA":
|
|
802
802
|
if (e.oth !== void 0)
|
|
803
|
-
throw new
|
|
803
|
+
throw new H('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
804
804
|
case "EC":
|
|
805
805
|
case "OKP":
|
|
806
806
|
return Lt({ ...e, alg: t });
|
|
807
807
|
default:
|
|
808
|
-
throw new
|
|
808
|
+
throw new H('Unsupported "kty" (Key Type) Parameter value');
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
const
|
|
811
|
+
const ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Xe = (e, t, r) => {
|
|
812
812
|
var a, n;
|
|
813
813
|
if (t.use !== void 0 && t.use !== "sig")
|
|
814
814
|
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
@@ -817,49 +817,49 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
817
817
|
if (t.alg !== void 0 && t.alg !== e)
|
|
818
818
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
819
819
|
return !0;
|
|
820
|
-
},
|
|
820
|
+
}, Vr = (e, t, r, a) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
|
-
if (a &&
|
|
823
|
-
if (
|
|
822
|
+
if (a && pe(t)) {
|
|
823
|
+
if ($r(t) && Xe(e, t, r))
|
|
824
824
|
return;
|
|
825
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
826
826
|
}
|
|
827
827
|
if (!Dt(t))
|
|
828
|
-
throw new TypeError(Pt(e, t, ...
|
|
828
|
+
throw new TypeError(Pt(e, t, ...ve, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
|
-
throw new TypeError(`${
|
|
830
|
+
throw new TypeError(`${ue(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
|
-
},
|
|
833
|
-
if (a &&
|
|
832
|
+
}, Yr = (e, t, r, a) => {
|
|
833
|
+
if (a && pe(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
|
-
if (
|
|
836
|
+
if (Dr(t) && Xe(e, t, r))
|
|
837
837
|
return;
|
|
838
838
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
839
839
|
case "verify":
|
|
840
|
-
if (
|
|
840
|
+
if (Lr(t) && Xe(e, t, r))
|
|
841
841
|
return;
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
843
|
}
|
|
844
844
|
if (!Dt(t))
|
|
845
|
-
throw new TypeError(Pt(e, t, ...
|
|
845
|
+
throw new TypeError(Pt(e, t, ...ve, a ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
|
-
throw new TypeError(`${
|
|
847
|
+
throw new TypeError(`${ue(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
849
|
-
throw new TypeError(`${
|
|
849
|
+
throw new TypeError(`${ue(t)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
850
850
|
if (r === "decrypt" && t.type === "public")
|
|
851
|
-
throw new TypeError(`${
|
|
851
|
+
throw new TypeError(`${ue(t)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
852
852
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
853
|
-
throw new TypeError(`${
|
|
853
|
+
throw new TypeError(`${ue(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
854
854
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
855
|
-
throw new TypeError(`${
|
|
855
|
+
throw new TypeError(`${ue(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
856
|
};
|
|
857
857
|
function Ut(e, t, r, a) {
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Vr(t, r, a, e) : Yr(t, r, a, e);
|
|
859
859
|
}
|
|
860
860
|
Ut.bind(void 0, !1);
|
|
861
|
-
const
|
|
862
|
-
function
|
|
861
|
+
const lt = Ut.bind(void 0, !0);
|
|
862
|
+
function Fr(e, t, r, a, n) {
|
|
863
863
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
864
864
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
865
865
|
if (!a || a.crit === void 0)
|
|
@@ -870,7 +870,7 @@ function Yr(e, t, r, a, n) {
|
|
|
870
870
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
871
871
|
for (const s of a.crit) {
|
|
872
872
|
if (!o.has(s))
|
|
873
|
-
throw new
|
|
873
|
+
throw new H(`Extension Header Parameter "${s}" is not recognized`);
|
|
874
874
|
if (n[s] === void 0)
|
|
875
875
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
876
876
|
if (o.get(s) && a[s] === void 0)
|
|
@@ -878,13 +878,13 @@ function Yr(e, t, r, a, n) {
|
|
|
878
878
|
}
|
|
879
879
|
return new Set(a.crit);
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const jr = (e, t) => {
|
|
882
882
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
883
883
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
884
884
|
if (t)
|
|
885
885
|
return new Set(t);
|
|
886
886
|
};
|
|
887
|
-
function
|
|
887
|
+
function zr(e, t) {
|
|
888
888
|
const r = `SHA-${e.slice(-3)}`;
|
|
889
889
|
switch (e) {
|
|
890
890
|
case "HS256":
|
|
@@ -906,103 +906,103 @@ function jr(e, t) {
|
|
|
906
906
|
case "EdDSA":
|
|
907
907
|
return { name: t.name };
|
|
908
908
|
default:
|
|
909
|
-
throw new
|
|
909
|
+
throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
async function
|
|
913
|
-
if (t = await
|
|
914
|
-
return
|
|
912
|
+
async function qr(e, t, r) {
|
|
913
|
+
if (t = await Hr.normalizePublicKey(t, e), vt(t))
|
|
914
|
+
return xr(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
|
-
throw new TypeError(
|
|
918
|
-
return
|
|
917
|
+
throw new TypeError(it(t, ...ve));
|
|
918
|
+
return $e.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
919
|
}
|
|
920
|
-
throw new TypeError(
|
|
920
|
+
throw new TypeError(it(t, ...ve, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
const n = await
|
|
924
|
-
|
|
925
|
-
const o =
|
|
922
|
+
const Xr = async (e, t, r, a) => {
|
|
923
|
+
const n = await qr(e, t, "verify");
|
|
924
|
+
Pr(e, n);
|
|
925
|
+
const o = zr(e, n.algorithm);
|
|
926
926
|
try {
|
|
927
|
-
return await
|
|
927
|
+
return await $e.subtle.verify(o, n, r, a);
|
|
928
928
|
} catch {
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
|
-
async function
|
|
933
|
-
if (!
|
|
934
|
-
throw new
|
|
932
|
+
async function Qr(e, t, r) {
|
|
933
|
+
if (!he(e))
|
|
934
|
+
throw new _("Flattened JWS must be an object");
|
|
935
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
936
|
-
throw new
|
|
936
|
+
throw new _('Flattened JWS must have either of the "protected" or "header" members');
|
|
937
937
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
938
|
-
throw new
|
|
938
|
+
throw new _("JWS Protected Header incorrect type");
|
|
939
939
|
if (e.payload === void 0)
|
|
940
|
-
throw new
|
|
940
|
+
throw new _("JWS Payload missing");
|
|
941
941
|
if (typeof e.signature != "string")
|
|
942
|
-
throw new
|
|
943
|
-
if (e.header !== void 0 && !
|
|
944
|
-
throw new
|
|
942
|
+
throw new _("JWS Signature missing or incorrect type");
|
|
943
|
+
if (e.header !== void 0 && !he(e.header))
|
|
944
|
+
throw new _("JWS Unprotected Header incorrect type");
|
|
945
945
|
let a = {};
|
|
946
946
|
if (e.protected)
|
|
947
947
|
try {
|
|
948
|
-
const y =
|
|
948
|
+
const y = te(e.protected);
|
|
949
949
|
a = JSON.parse(ye.decode(y));
|
|
950
950
|
} catch {
|
|
951
|
-
throw new
|
|
951
|
+
throw new _("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
|
-
if (!
|
|
954
|
-
throw new
|
|
953
|
+
if (!Cr(a, e.header))
|
|
954
|
+
throw new _("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
955
955
|
const n = {
|
|
956
956
|
...a,
|
|
957
957
|
...e.header
|
|
958
|
-
}, o =
|
|
958
|
+
}, o = Fr(_, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
959
959
|
let s = !0;
|
|
960
960
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
961
|
-
throw new
|
|
961
|
+
throw new _('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
962
962
|
const { alg: i } = n;
|
|
963
963
|
if (typeof i != "string" || !i)
|
|
964
|
-
throw new
|
|
965
|
-
const d =
|
|
964
|
+
throw new _('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
+
const d = jr("algorithms", r.algorithms);
|
|
966
966
|
if (d && !d.has(i))
|
|
967
967
|
throw new xt('"alg" (Algorithm) Header Parameter value not allowed');
|
|
968
968
|
if (s) {
|
|
969
969
|
if (typeof e.payload != "string")
|
|
970
|
-
throw new
|
|
970
|
+
throw new _("JWS Payload must be a string");
|
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
|
-
throw new
|
|
972
|
+
throw new _("JWS Payload must be a string or an Uint8Array instance");
|
|
973
973
|
let h = !1;
|
|
974
|
-
typeof t == "function" ? (t = await t(a, e), h = !0,
|
|
975
|
-
const
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), h = !0, lt(i, t, "verify"), pe(t) && (t = await Jr(t, i))) : lt(i, t, "verify");
|
|
975
|
+
const f = Er(Ee.encode(e.protected ?? ""), Ee.encode("."), typeof e.payload == "string" ? Ee.encode(e.payload) : e.payload);
|
|
976
976
|
let u;
|
|
977
977
|
try {
|
|
978
|
-
u =
|
|
978
|
+
u = te(e.signature);
|
|
979
979
|
} catch {
|
|
980
|
-
throw new
|
|
980
|
+
throw new _("Failed to base64url decode the signature");
|
|
981
981
|
}
|
|
982
|
-
if (!await
|
|
982
|
+
if (!await Xr(i, t, u, f))
|
|
983
983
|
throw new Ct();
|
|
984
984
|
let c;
|
|
985
985
|
if (s)
|
|
986
986
|
try {
|
|
987
|
-
c =
|
|
987
|
+
c = te(e.payload);
|
|
988
988
|
} catch {
|
|
989
|
-
throw new
|
|
989
|
+
throw new _("Failed to base64url decode the payload");
|
|
990
990
|
}
|
|
991
991
|
else typeof e.payload == "string" ? c = Ee.encode(e.payload) : c = e.payload;
|
|
992
992
|
const m = { payload: c };
|
|
993
993
|
return e.protected !== void 0 && (m.protectedHeader = a), e.header !== void 0 && (m.unprotectedHeader = e.header), h ? { ...m, key: t } : m;
|
|
994
994
|
}
|
|
995
|
-
async function
|
|
995
|
+
async function Zr(e, t, r) {
|
|
996
996
|
if (e instanceof Uint8Array && (e = ye.decode(e)), typeof e != "string")
|
|
997
|
-
throw new
|
|
997
|
+
throw new _("Compact JWS must be a string or Uint8Array");
|
|
998
998
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
999
999
|
if (s !== 3)
|
|
1000
|
-
throw new
|
|
1001
|
-
const i = await
|
|
1000
|
+
throw new _("Invalid Compact JWS");
|
|
1001
|
+
const i = await Qr({ payload: n, protected: a, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
1002
1002
|
return typeof t == "function" ? { ...d, key: i.key } : d;
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
const t =
|
|
1004
|
+
const ea = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, rt = Ht * 24, ta = rt * 7, ra = rt * 365.25, aa = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dt = (e) => {
|
|
1005
|
+
const t = aa.exec(e);
|
|
1006
1006
|
if (!t || t[4] && t[1])
|
|
1007
1007
|
throw new TypeError("Invalid time period format");
|
|
1008
1008
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -1032,44 +1032,44 @@ const Zr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht
|
|
|
1032
1032
|
case "day":
|
|
1033
1033
|
case "days":
|
|
1034
1034
|
case "d":
|
|
1035
|
-
n = Math.round(r *
|
|
1035
|
+
n = Math.round(r * rt);
|
|
1036
1036
|
break;
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
1039
1039
|
case "w":
|
|
1040
|
-
n = Math.round(r *
|
|
1040
|
+
n = Math.round(r * ta);
|
|
1041
1041
|
break;
|
|
1042
1042
|
default:
|
|
1043
|
-
n = Math.round(r *
|
|
1043
|
+
n = Math.round(r * ra);
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1047
|
-
},
|
|
1047
|
+
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""), na = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, oa = (e, t, r = {}) => {
|
|
1048
1048
|
let a;
|
|
1049
1049
|
try {
|
|
1050
1050
|
a = JSON.parse(ye.decode(t));
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
}
|
|
1053
|
-
if (!
|
|
1053
|
+
if (!he(a))
|
|
1054
1054
|
throw new G("JWT Claims Set must be a top-level JSON object");
|
|
1055
1055
|
const { typ: n } = r;
|
|
1056
|
-
if (n && (typeof e.typ != "string" ||
|
|
1057
|
-
throw new
|
|
1058
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: h } = r,
|
|
1059
|
-
h !== void 0 &&
|
|
1060
|
-
for (const y of new Set(
|
|
1056
|
+
if (n && (typeof e.typ != "string" || ut(e.typ) !== ut(n)))
|
|
1057
|
+
throw new K('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1058
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: h } = r, f = [...o];
|
|
1059
|
+
h !== void 0 && f.push("iat"), d !== void 0 && f.push("aud"), i !== void 0 && f.push("sub"), s !== void 0 && f.push("iss");
|
|
1060
|
+
for (const y of new Set(f.reverse()))
|
|
1061
1061
|
if (!(y in a))
|
|
1062
|
-
throw new
|
|
1062
|
+
throw new K(`missing required "${y}" claim`, a, y, "missing");
|
|
1063
1063
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1064
|
-
throw new
|
|
1064
|
+
throw new K('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1065
1065
|
if (i && a.sub !== i)
|
|
1066
|
-
throw new
|
|
1067
|
-
if (d && !
|
|
1068
|
-
throw new
|
|
1066
|
+
throw new K('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
+
if (d && !na(a.aud, typeof d == "string" ? [d] : d))
|
|
1068
|
+
throw new K('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1069
1069
|
let u;
|
|
1070
1070
|
switch (typeof r.clockTolerance) {
|
|
1071
1071
|
case "string":
|
|
1072
|
-
u =
|
|
1072
|
+
u = dt(r.clockTolerance);
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "number":
|
|
1075
1075
|
u = r.clockTolerance;
|
|
@@ -1080,40 +1080,40 @@ const Zr = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, et = Ht
|
|
|
1080
1080
|
default:
|
|
1081
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
1082
|
}
|
|
1083
|
-
const { currentDate: c } = r, m =
|
|
1083
|
+
const { currentDate: c } = r, m = ea(c || /* @__PURE__ */ new Date());
|
|
1084
1084
|
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
1085
|
-
throw new
|
|
1085
|
+
throw new K('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
1086
|
if (a.nbf !== void 0) {
|
|
1087
1087
|
if (typeof a.nbf != "number")
|
|
1088
|
-
throw new
|
|
1088
|
+
throw new K('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1089
1089
|
if (a.nbf > m + u)
|
|
1090
|
-
throw new
|
|
1090
|
+
throw new K('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1091
1091
|
}
|
|
1092
1092
|
if (a.exp !== void 0) {
|
|
1093
1093
|
if (typeof a.exp != "number")
|
|
1094
|
-
throw new
|
|
1094
|
+
throw new K('"exp" claim must be a number', a, "exp", "invalid");
|
|
1095
1095
|
if (a.exp <= m - u)
|
|
1096
|
-
throw new
|
|
1096
|
+
throw new qe('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
1097
|
}
|
|
1098
1098
|
if (h) {
|
|
1099
|
-
const y = m - a.iat,
|
|
1100
|
-
if (y - u >
|
|
1101
|
-
throw new
|
|
1099
|
+
const y = m - a.iat, w = typeof h == "number" ? h : dt(h);
|
|
1100
|
+
if (y - u > w)
|
|
1101
|
+
throw new qe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1102
1102
|
if (y < 0 - u)
|
|
1103
|
-
throw new
|
|
1103
|
+
throw new K('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1104
1104
|
}
|
|
1105
1105
|
return a;
|
|
1106
1106
|
};
|
|
1107
|
-
async function
|
|
1107
|
+
async function sa(e, t, r) {
|
|
1108
1108
|
var a;
|
|
1109
|
-
const n = await
|
|
1109
|
+
const n = await Zr(e, t, r);
|
|
1110
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
1111
|
throw new G("JWTs MUST NOT use unencoded payload");
|
|
1112
|
-
const o = { payload:
|
|
1112
|
+
const o = { payload: oa(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1113
1113
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
function
|
|
1115
|
+
const ia = te;
|
|
1116
|
+
function ca(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
1118
|
throw new G("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1119
1119
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -1125,7 +1125,7 @@ function ia(e) {
|
|
|
1125
1125
|
throw new G("JWTs must contain a payload");
|
|
1126
1126
|
let a;
|
|
1127
1127
|
try {
|
|
1128
|
-
a =
|
|
1128
|
+
a = ia(t);
|
|
1129
1129
|
} catch {
|
|
1130
1130
|
throw new G("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
@@ -1135,62 +1135,62 @@ function ia(e) {
|
|
|
1135
1135
|
} catch {
|
|
1136
1136
|
throw new G("Failed to parse the decoded payload as JSON");
|
|
1137
1137
|
}
|
|
1138
|
-
if (!
|
|
1138
|
+
if (!he(n))
|
|
1139
1139
|
throw new G("Invalid JWT Claims Set");
|
|
1140
1140
|
return n;
|
|
1141
1141
|
}
|
|
1142
1142
|
const ge = async (e) => {
|
|
1143
1143
|
try {
|
|
1144
|
-
const t =
|
|
1145
|
-
return await
|
|
1146
|
-
issuer:
|
|
1144
|
+
const t = N.ALG, r = await Gr(br, t);
|
|
1145
|
+
return await sa(e, r, {
|
|
1146
|
+
issuer: N.ISSUER
|
|
1147
1147
|
});
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, la = (e) => {
|
|
1152
1152
|
try {
|
|
1153
|
-
return
|
|
1153
|
+
return ca(e);
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
|
-
},
|
|
1157
|
+
}, A = [];
|
|
1158
1158
|
for (let e = 0; e < 256; ++e)
|
|
1159
|
-
|
|
1160
|
-
function
|
|
1161
|
-
return (
|
|
1162
|
-
}
|
|
1163
|
-
let
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1166
|
-
if (!
|
|
1159
|
+
A.push((e + 256).toString(16).slice(1));
|
|
1160
|
+
function da(e, t = 0) {
|
|
1161
|
+
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();
|
|
1162
|
+
}
|
|
1163
|
+
let Ge;
|
|
1164
|
+
const ua = new Uint8Array(16);
|
|
1165
|
+
function ma() {
|
|
1166
|
+
if (!Ge) {
|
|
1167
1167
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
1168
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
|
-
|
|
1169
|
+
Ge = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return
|
|
1171
|
+
return Ge(ua);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1174
|
-
function
|
|
1175
|
-
if (
|
|
1176
|
-
return
|
|
1173
|
+
const ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: ha };
|
|
1174
|
+
function ht(e, t, r) {
|
|
1175
|
+
if (mt.randomUUID && !e)
|
|
1176
|
+
return mt.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
|
-
const a = e.random || (e.rng ||
|
|
1179
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1178
|
+
const a = e.random || (e.rng || ma)();
|
|
1179
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, da(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
1181
|
+
const pt = globalThis.crypto, pa = (e) => `${ht()}${ht()}`.slice(0, e), fa = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
|
-
async function
|
|
1185
|
-
if (!
|
|
1184
|
+
async function ga(e) {
|
|
1185
|
+
if (!pt.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1190
|
-
return
|
|
1189
|
+
const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
|
|
1190
|
+
return fa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
|
-
async function
|
|
1193
|
-
const t =
|
|
1192
|
+
async function ya(e) {
|
|
1193
|
+
const t = pa(43), r = await ga(t);
|
|
1194
1194
|
return {
|
|
1195
1195
|
code_verifier: t,
|
|
1196
1196
|
code_challenge: r
|
|
@@ -1199,23 +1199,23 @@ async function ga(e) {
|
|
|
1199
1199
|
function Wt(e, t) {
|
|
1200
1200
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1201
1201
|
}
|
|
1202
|
-
const
|
|
1202
|
+
const ft = (e, t) => {
|
|
1203
1203
|
const r = JSON.stringify(
|
|
1204
1204
|
typeof t == "function" ? t() : t
|
|
1205
1205
|
);
|
|
1206
1206
|
window.localStorage.setItem(e, r), Wt(e, r);
|
|
1207
|
-
},
|
|
1207
|
+
}, ba = (e) => {
|
|
1208
1208
|
window.localStorage.removeItem(e), Wt(e, null);
|
|
1209
|
-
},
|
|
1209
|
+
}, gt = (e) => window.localStorage.getItem(e), Ea = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
1210
|
function Te({
|
|
1211
1211
|
key: e,
|
|
1212
1212
|
initialValue: t
|
|
1213
1213
|
}) {
|
|
1214
|
-
const r =
|
|
1214
|
+
const r = sr(Ea, () => gt(e)), a = q(
|
|
1215
1215
|
(s) => {
|
|
1216
1216
|
try {
|
|
1217
1217
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1218
|
-
i == null ?
|
|
1218
|
+
i == null ? ba(e) : ft(e, i);
|
|
1219
1219
|
} catch (i) {
|
|
1220
1220
|
console.warn(i);
|
|
1221
1221
|
}
|
|
@@ -1226,42 +1226,42 @@ function Te({
|
|
|
1226
1226
|
}, [t, a]), o = q(() => {
|
|
1227
1227
|
a(null);
|
|
1228
1228
|
}, [a]);
|
|
1229
|
-
return
|
|
1229
|
+
return V(() => {
|
|
1230
1230
|
try {
|
|
1231
|
-
|
|
1231
|
+
gt(e) === null && typeof t < "u" && ft(e, t);
|
|
1232
1232
|
} catch (s) {
|
|
1233
1233
|
console.warn(s);
|
|
1234
1234
|
}
|
|
1235
1235
|
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
1236
1236
|
}
|
|
1237
|
-
const
|
|
1237
|
+
const R = [];
|
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
|
1239
|
-
|
|
1240
|
-
function
|
|
1241
|
-
return (
|
|
1242
|
-
}
|
|
1243
|
-
let
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1246
|
-
if (!
|
|
1239
|
+
R.push((e + 256).toString(16).slice(1));
|
|
1240
|
+
function wa(e, t = 0) {
|
|
1241
|
+
return (R[e[t + 0]] + R[e[t + 1]] + R[e[t + 2]] + R[e[t + 3]] + "-" + R[e[t + 4]] + R[e[t + 5]] + "-" + R[e[t + 6]] + R[e[t + 7]] + "-" + R[e[t + 8]] + R[e[t + 9]] + "-" + R[e[t + 10]] + R[e[t + 11]] + R[e[t + 12]] + R[e[t + 13]] + R[e[t + 14]] + R[e[t + 15]]).toLowerCase();
|
|
1242
|
+
}
|
|
1243
|
+
let Je;
|
|
1244
|
+
const Ta = new Uint8Array(16);
|
|
1245
|
+
function Ia() {
|
|
1246
|
+
if (!Je) {
|
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
|
-
|
|
1249
|
+
Je = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return
|
|
1251
|
+
return Je(Ta);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1254
|
-
function
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1253
|
+
const Sa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Sa };
|
|
1254
|
+
function Ve(e, t, r) {
|
|
1255
|
+
if (yt.randomUUID && !e)
|
|
1256
|
+
return yt.randomUUID();
|
|
1257
1257
|
e = e || {};
|
|
1258
|
-
const a = e.random || (e.rng ||
|
|
1259
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1258
|
+
const a = e.random || (e.rng || Ia)();
|
|
1259
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, wa(a);
|
|
1260
1260
|
}
|
|
1261
|
-
const
|
|
1261
|
+
const ie = "Your session has expired. For your security, please log in again to continue.", _a = "Your session has been successfully terminated.", Ye = "Login failed. Please try again.", ka = "Error getting access token, please re-authenticate.", Aa = "You forgot to wrap your component in <AuthProvider>.", Ce = {
|
|
1262
1262
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1263
1263
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1264
|
-
}, Ie = "@@auth@@", fe = "LOADING", ke = "LOGIN", Bt = "LOGOUT", be = "success",
|
|
1264
|
+
}, Ie = "@@auth@@", fe = "LOADING", ke = "LOGIN", Bt = "LOGOUT", be = "success", Y = "failure", Gt = "include", Jt = "POST", Vt = "application/json", Se = {
|
|
1265
1265
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1266
1266
|
$clientId: String!,
|
|
1267
1267
|
$username: String!,
|
|
@@ -1342,7 +1342,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1342
1342
|
email
|
|
1343
1343
|
}
|
|
1344
1344
|
}`
|
|
1345
|
-
},
|
|
1345
|
+
}, ce = {
|
|
1346
1346
|
GET_REGISTRATION_OPTIONS: {
|
|
1347
1347
|
schema: Se.GET_REGISTRATION_OPTIONS,
|
|
1348
1348
|
method: "getPasskeyRegistrationOptions"
|
|
@@ -1359,7 +1359,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1359
1359
|
schema: Se.VERIFY_AUTHENTICATION,
|
|
1360
1360
|
method: "verifyPasskeyAuthentication"
|
|
1361
1361
|
}
|
|
1362
|
-
},
|
|
1362
|
+
}, le = async ({
|
|
1363
1363
|
accessToken: e,
|
|
1364
1364
|
type: t,
|
|
1365
1365
|
clientId: r,
|
|
@@ -1367,7 +1367,7 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1367
1367
|
}) => {
|
|
1368
1368
|
try {
|
|
1369
1369
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1370
|
-
Yt ? `${
|
|
1370
|
+
Yt ? `${Ce.dev}/graphql` : `${Ce.prod}/graphql`,
|
|
1371
1371
|
{
|
|
1372
1372
|
credentials: Gt,
|
|
1373
1373
|
method: Jt,
|
|
@@ -1383,23 +1383,23 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1383
1383
|
}
|
|
1384
1384
|
);
|
|
1385
1385
|
if (o.status !== 200)
|
|
1386
|
-
return { status:
|
|
1386
|
+
return { status: Y, data: [] };
|
|
1387
1387
|
const { data: s } = await o.json();
|
|
1388
1388
|
return {
|
|
1389
1389
|
status: be,
|
|
1390
1390
|
data: s[t.method]
|
|
1391
1391
|
};
|
|
1392
1392
|
} catch (n) {
|
|
1393
|
-
return console.error(n), { status:
|
|
1393
|
+
return console.error(n), { status: Y, data: [] };
|
|
1394
1394
|
}
|
|
1395
|
-
},
|
|
1395
|
+
}, Me = async ({
|
|
1396
1396
|
type: e,
|
|
1397
1397
|
clientId: t,
|
|
1398
1398
|
params: r = {}
|
|
1399
1399
|
}) => {
|
|
1400
1400
|
try {
|
|
1401
1401
|
const a = await fetch(
|
|
1402
|
-
Yt ? `${
|
|
1402
|
+
Yt ? `${Ce.dev}/${e}` : `${Ce.prod}/${e}`,
|
|
1403
1403
|
{
|
|
1404
1404
|
credentials: Gt,
|
|
1405
1405
|
method: Jt,
|
|
@@ -1411,30 +1411,30 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1411
1411
|
}
|
|
1412
1412
|
);
|
|
1413
1413
|
if (a.status !== 200)
|
|
1414
|
-
return { status:
|
|
1414
|
+
return { status: Y, data: [] };
|
|
1415
1415
|
const { data: n } = await a.json();
|
|
1416
1416
|
return {
|
|
1417
1417
|
status: be,
|
|
1418
1418
|
data: n || []
|
|
1419
1419
|
};
|
|
1420
1420
|
} catch (a) {
|
|
1421
|
-
return console.error(a), { status:
|
|
1421
|
+
return console.error(a), { status: Y, data: [] };
|
|
1422
1422
|
}
|
|
1423
|
-
},
|
|
1423
|
+
}, Ra = process.env.NODE_ENV === "production", Yt = !Ra, Ft = {
|
|
1424
1424
|
isLoading: !0,
|
|
1425
1425
|
isAuthenticated: !1,
|
|
1426
1426
|
user: void 0,
|
|
1427
1427
|
logoutReason: "",
|
|
1428
1428
|
debug: !1,
|
|
1429
1429
|
authenticationType: ""
|
|
1430
|
-
},
|
|
1430
|
+
}, Na = (e) => {
|
|
1431
1431
|
try {
|
|
1432
|
-
const t =
|
|
1433
|
-
return t ? t[
|
|
1432
|
+
const t = la(e);
|
|
1433
|
+
return t ? t[N.USER_ID_KEY] : "";
|
|
1434
1434
|
} catch {
|
|
1435
1435
|
return "";
|
|
1436
1436
|
}
|
|
1437
|
-
},
|
|
1437
|
+
}, va = async ({
|
|
1438
1438
|
userId: e,
|
|
1439
1439
|
clientId: t,
|
|
1440
1440
|
domain: r,
|
|
@@ -1443,22 +1443,22 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1443
1443
|
var n;
|
|
1444
1444
|
try {
|
|
1445
1445
|
return {
|
|
1446
|
-
status: ((n = await
|
|
1447
|
-
type:
|
|
1446
|
+
status: ((n = await Me({
|
|
1447
|
+
type: Le.LOGOUT,
|
|
1448
1448
|
clientId: t,
|
|
1449
1449
|
params: {
|
|
1450
1450
|
userId: e,
|
|
1451
1451
|
domain: r,
|
|
1452
1452
|
idToken: a
|
|
1453
1453
|
}
|
|
1454
|
-
})) == null ? void 0 : n.status) ||
|
|
1454
|
+
})) == null ? void 0 : n.status) || Y
|
|
1455
1455
|
};
|
|
1456
1456
|
} catch {
|
|
1457
1457
|
return {
|
|
1458
|
-
status:
|
|
1458
|
+
status: Y
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
},
|
|
1461
|
+
}, xa = async ({
|
|
1462
1462
|
username: e,
|
|
1463
1463
|
password: t,
|
|
1464
1464
|
clientId: r,
|
|
@@ -1470,13 +1470,13 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1470
1470
|
domain: d,
|
|
1471
1471
|
ua: h
|
|
1472
1472
|
}) => {
|
|
1473
|
-
var
|
|
1473
|
+
var f;
|
|
1474
1474
|
try {
|
|
1475
|
-
const u = await
|
|
1476
|
-
type:
|
|
1475
|
+
const u = await Me({
|
|
1476
|
+
type: Le.LOGIN,
|
|
1477
1477
|
clientId: r,
|
|
1478
1478
|
params: {
|
|
1479
|
-
type: n ||
|
|
1479
|
+
type: n || me.ID_AND_ACCESS_TOKEN,
|
|
1480
1480
|
username: e,
|
|
1481
1481
|
password: t,
|
|
1482
1482
|
sessionExpiration: o,
|
|
@@ -1486,13 +1486,13 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1486
1486
|
domain: d,
|
|
1487
1487
|
ua: h
|
|
1488
1488
|
}
|
|
1489
|
-
}), c = await ge((
|
|
1490
|
-
return c && c.payload[
|
|
1489
|
+
}), c = await ge((f = u == null ? void 0 : u.data) == null ? void 0 : f.idToken);
|
|
1490
|
+
return c && c.payload[N.USER_ID_KEY] !== "" && c.payload[N.NONCE_KEY] === a ? {
|
|
1491
1491
|
idToken: u.data.idToken,
|
|
1492
1492
|
accessToken: u.data.accessToken,
|
|
1493
1493
|
refreshToken: u.data.refreshToken,
|
|
1494
|
-
userId: c.payload[
|
|
1495
|
-
email: c.payload[
|
|
1494
|
+
userId: c.payload[N.USER_ID_KEY],
|
|
1495
|
+
email: c.payload[N.EMAIL_KEY],
|
|
1496
1496
|
status: !0
|
|
1497
1497
|
} : {
|
|
1498
1498
|
status: !1
|
|
@@ -1502,18 +1502,18 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1502
1502
|
status: !1
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1505
|
+
}, Ca = async ({
|
|
1506
1506
|
nonce: e,
|
|
1507
1507
|
clientId: t,
|
|
1508
1508
|
code_challenge: r
|
|
1509
1509
|
}) => {
|
|
1510
1510
|
var a;
|
|
1511
1511
|
try {
|
|
1512
|
-
const n = await
|
|
1513
|
-
type:
|
|
1512
|
+
const n = await Me({
|
|
1513
|
+
type: Le.CODE,
|
|
1514
1514
|
clientId: t,
|
|
1515
1515
|
params: {
|
|
1516
|
-
type:
|
|
1516
|
+
type: me.CODE,
|
|
1517
1517
|
nonce: e,
|
|
1518
1518
|
code_challenge: r
|
|
1519
1519
|
}
|
|
@@ -1522,16 +1522,16 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1522
1522
|
status: be,
|
|
1523
1523
|
data: n.data.code
|
|
1524
1524
|
} : {
|
|
1525
|
-
status:
|
|
1525
|
+
status: Y,
|
|
1526
1526
|
data: ""
|
|
1527
1527
|
};
|
|
1528
1528
|
} catch {
|
|
1529
1529
|
return {
|
|
1530
|
-
status:
|
|
1530
|
+
status: Y,
|
|
1531
1531
|
data: ""
|
|
1532
1532
|
};
|
|
1533
1533
|
}
|
|
1534
|
-
},
|
|
1534
|
+
}, Oa = async ({
|
|
1535
1535
|
clientId: e,
|
|
1536
1536
|
userId: t,
|
|
1537
1537
|
nonce: r,
|
|
@@ -1541,11 +1541,11 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1541
1541
|
}) => {
|
|
1542
1542
|
var s;
|
|
1543
1543
|
try {
|
|
1544
|
-
const i = await
|
|
1545
|
-
type:
|
|
1544
|
+
const i = await Me({
|
|
1545
|
+
type: Le.REFRESH,
|
|
1546
1546
|
clientId: e,
|
|
1547
1547
|
params: {
|
|
1548
|
-
type:
|
|
1548
|
+
type: me.REFRESH_TOKEN,
|
|
1549
1549
|
userId: t,
|
|
1550
1550
|
nonce: r,
|
|
1551
1551
|
refreshToken: a,
|
|
@@ -1553,10 +1553,10 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1553
1553
|
domain: o
|
|
1554
1554
|
}
|
|
1555
1555
|
}), d = await ge((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
|
|
1556
|
-
return d && d.payload[
|
|
1556
|
+
return d && d.payload[N.USER_ID_KEY] !== "" && d.payload[N.NONCE_KEY] === r ? {
|
|
1557
1557
|
accessToken: i.data.accessToken,
|
|
1558
1558
|
refreshToken: i.data.refreshToken,
|
|
1559
|
-
userId: d.payload[
|
|
1559
|
+
userId: d.payload[N.USER_ID_KEY],
|
|
1560
1560
|
status: !0
|
|
1561
1561
|
} : {
|
|
1562
1562
|
status: !1
|
|
@@ -1567,9 +1567,9 @@ const se = "Your session has expired. For your security, please log in again to
|
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
1569
1569
|
};
|
|
1570
|
-
class
|
|
1570
|
+
class Pa {
|
|
1571
1571
|
constructor(t = null, r = null) {
|
|
1572
|
-
|
|
1572
|
+
He(this, "refreshTokenPromise", null), He(this, "accessToken"), He(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1573
1573
|
}
|
|
1574
1574
|
async refreshtoken({
|
|
1575
1575
|
clientId: t,
|
|
@@ -1596,8 +1596,8 @@ class Oa {
|
|
|
1596
1596
|
domain: n
|
|
1597
1597
|
}) {
|
|
1598
1598
|
const o = await ge(this.refreshToken);
|
|
1599
|
-
if (o && o.payload[
|
|
1600
|
-
const s = await
|
|
1599
|
+
if (o && o.payload[N.USER_ID_KEY] !== "") {
|
|
1600
|
+
const s = await Oa({
|
|
1601
1601
|
clientId: t,
|
|
1602
1602
|
userId: r,
|
|
1603
1603
|
nonce: a,
|
|
@@ -1610,37 +1610,37 @@ class Oa {
|
|
|
1610
1610
|
newAccessToken: s.accessToken,
|
|
1611
1611
|
newRefreshToken: s.refreshToken
|
|
1612
1612
|
}) : {
|
|
1613
|
-
status:
|
|
1613
|
+
status: Y
|
|
1614
1614
|
};
|
|
1615
1615
|
} else
|
|
1616
1616
|
return {
|
|
1617
|
-
status:
|
|
1617
|
+
status: Y
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
|
-
const
|
|
1621
|
+
const Da = (e) => q(
|
|
1622
1622
|
(...t) => {
|
|
1623
1623
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1624
1624
|
},
|
|
1625
1625
|
[e]
|
|
1626
|
-
),
|
|
1627
|
-
throw new Error(
|
|
1628
|
-
}, jt =
|
|
1626
|
+
), de = () => {
|
|
1627
|
+
throw new Error(Aa);
|
|
1628
|
+
}, jt = or({
|
|
1629
1629
|
isAuthenticated: !1,
|
|
1630
1630
|
isLoading: !1,
|
|
1631
|
-
login:
|
|
1632
|
-
logout:
|
|
1633
|
-
getAccessToken:
|
|
1634
|
-
getIdToken:
|
|
1635
|
-
registeringForPasskey:
|
|
1636
|
-
loginWithPasskey:
|
|
1631
|
+
login: de,
|
|
1632
|
+
logout: de,
|
|
1633
|
+
getAccessToken: de,
|
|
1634
|
+
getIdToken: de,
|
|
1635
|
+
registeringForPasskey: de,
|
|
1636
|
+
loginWithPasskey: de,
|
|
1637
1637
|
logoutReason: "",
|
|
1638
1638
|
authenticationType: ""
|
|
1639
|
-
}),
|
|
1639
|
+
}), La = X.createContext({
|
|
1640
1640
|
state: Ft,
|
|
1641
1641
|
dispatch: () => {
|
|
1642
1642
|
}
|
|
1643
|
-
}),
|
|
1643
|
+
}), $a = (e, t) => (t == null ? void 0 : t.type) === fe ? {
|
|
1644
1644
|
...e,
|
|
1645
1645
|
isLoading: t.payload.isLoading
|
|
1646
1646
|
} : (t == null ? void 0 : t.type) === ke ? {
|
|
@@ -1664,28 +1664,28 @@ const Pa = (e) => q(
|
|
|
1664
1664
|
domain: a = "",
|
|
1665
1665
|
debug: n = !1
|
|
1666
1666
|
}) => {
|
|
1667
|
-
const [o, s] =
|
|
1667
|
+
const [o, s] = Tt($a, {
|
|
1668
1668
|
...Ft,
|
|
1669
1669
|
debug: n
|
|
1670
|
-
}), i =
|
|
1670
|
+
}), i = Da(n), d = x(!1), [h, f, , u] = Te({
|
|
1671
1671
|
key: `${Ie}::${r}::@@user@@`
|
|
1672
1672
|
}), [c, m, , y] = Te({
|
|
1673
1673
|
key: `${Ie}::${r}::@@access@@`
|
|
1674
|
-
}), [
|
|
1674
|
+
}), [w, T, , k] = Te(
|
|
1675
1675
|
{
|
|
1676
1676
|
key: `${Ie}::${r}::@@refresh@@`
|
|
1677
1677
|
}
|
|
1678
|
-
), [
|
|
1678
|
+
), [Q, F, , Z] = Te({
|
|
1679
1679
|
key: `${Ie}::${r}::@@nonce@@`
|
|
1680
|
-
}),
|
|
1681
|
-
i("removeLocalStorage: removing local storage"), u(), y(),
|
|
1680
|
+
}), D = new Pa(c, w), W = q(() => {
|
|
1681
|
+
i("removeLocalStorage: removing local storage"), u(), y(), k(), Z();
|
|
1682
1682
|
}, [
|
|
1683
1683
|
y,
|
|
1684
1684
|
u,
|
|
1685
|
-
|
|
1686
|
-
|
|
1685
|
+
Z,
|
|
1686
|
+
k,
|
|
1687
1687
|
i
|
|
1688
|
-
]),
|
|
1688
|
+
]), M = q(
|
|
1689
1689
|
(g) => {
|
|
1690
1690
|
i(
|
|
1691
1691
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
@@ -1693,148 +1693,148 @@ const Pa = (e) => q(
|
|
|
1693
1693
|
), s({
|
|
1694
1694
|
type: Bt,
|
|
1695
1695
|
payload: {
|
|
1696
|
-
logoutReason: g ||
|
|
1696
|
+
logoutReason: g || ie
|
|
1697
1697
|
}
|
|
1698
|
-
}),
|
|
1698
|
+
}), W(), s({ type: fe, payload: { isLoading: !1 } });
|
|
1699
1699
|
},
|
|
1700
|
-
[
|
|
1701
|
-
),
|
|
1700
|
+
[W, i]
|
|
1701
|
+
), S = q(
|
|
1702
1702
|
async (g) => {
|
|
1703
1703
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1704
|
-
const { user:
|
|
1704
|
+
const { user: E } = o, b = (E == null ? void 0 : E.userId) || Na(h);
|
|
1705
1705
|
b || i(
|
|
1706
1706
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1707
|
-
), await
|
|
1707
|
+
), await va({
|
|
1708
1708
|
userId: b,
|
|
1709
1709
|
clientId: r,
|
|
1710
1710
|
domain: a,
|
|
1711
1711
|
idToken: h
|
|
1712
|
-
}),
|
|
1712
|
+
}), M(g || ie);
|
|
1713
1713
|
},
|
|
1714
|
-
[h, o, r, a,
|
|
1714
|
+
[h, o, r, a, M, i]
|
|
1715
1715
|
);
|
|
1716
|
-
|
|
1716
|
+
V(() => {
|
|
1717
1717
|
if (!d.current)
|
|
1718
1718
|
return o.isLoading && h !== null ? (async () => {
|
|
1719
1719
|
try {
|
|
1720
1720
|
const g = await ge(h);
|
|
1721
|
-
g && g.payload[
|
|
1721
|
+
g && g.payload[N.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1722
1722
|
type: ke,
|
|
1723
1723
|
payload: {
|
|
1724
|
-
authenticationType: g.payload[
|
|
1724
|
+
authenticationType: g.payload[N.AUTH_TYPE_KEY],
|
|
1725
1725
|
user: {
|
|
1726
|
-
userId: g.payload[
|
|
1727
|
-
username: g.payload[
|
|
1728
|
-
email: g.payload[
|
|
1726
|
+
userId: g.payload[N.USER_ID_KEY],
|
|
1727
|
+
username: g.payload[N.USERNAME_KEY],
|
|
1728
|
+
email: g.payload[N.EMAIL_KEY]
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await
|
|
1731
|
+
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await S(ie));
|
|
1732
1732
|
} catch {
|
|
1733
1733
|
i(
|
|
1734
1734
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1735
|
-
), await
|
|
1735
|
+
), await S(ie);
|
|
1736
1736
|
}
|
|
1737
1737
|
})() : (i("useEffect: setting the loading state to false"), s({ type: fe, payload: { isLoading: !1 } })), () => {
|
|
1738
1738
|
d.current = !0;
|
|
1739
1739
|
};
|
|
1740
|
-
}, [o.isLoading, h,
|
|
1741
|
-
const
|
|
1742
|
-
s({ type: fe, payload: { isLoading: !0 } }),
|
|
1743
|
-
const b =
|
|
1744
|
-
|
|
1745
|
-
const { code_verifier:
|
|
1740
|
+
}, [o.isLoading, h, S, i]);
|
|
1741
|
+
const L = async (g, E) => {
|
|
1742
|
+
s({ type: fe, payload: { isLoading: !0 } }), W();
|
|
1743
|
+
const b = Ve();
|
|
1744
|
+
F(b), i("login: Logging in with password");
|
|
1745
|
+
const { code_verifier: ae, code_challenge: nr } = await ya(), st = await Ca({
|
|
1746
1746
|
nonce: b,
|
|
1747
1747
|
clientId: r,
|
|
1748
|
-
code_challenge:
|
|
1748
|
+
code_challenge: nr
|
|
1749
1749
|
});
|
|
1750
|
-
if (
|
|
1751
|
-
const
|
|
1750
|
+
if (st.status) {
|
|
1751
|
+
const ne = await xa({
|
|
1752
1752
|
username: g,
|
|
1753
|
-
password:
|
|
1753
|
+
password: E,
|
|
1754
1754
|
clientId: r,
|
|
1755
1755
|
sessionExpiration: t,
|
|
1756
1756
|
nonce: b,
|
|
1757
|
-
type:
|
|
1758
|
-
code:
|
|
1759
|
-
code_verifier:
|
|
1757
|
+
type: me.CODE,
|
|
1758
|
+
code: st.data,
|
|
1759
|
+
code_verifier: ae,
|
|
1760
1760
|
domain: a,
|
|
1761
1761
|
ua: navigator.userAgent
|
|
1762
1762
|
});
|
|
1763
|
-
return
|
|
1763
|
+
return ne.status ? (f(ne.idToken), m(ne.accessToken), T(ne.refreshToken), s({
|
|
1764
1764
|
type: ke,
|
|
1765
1765
|
payload: {
|
|
1766
|
-
authenticationType:
|
|
1766
|
+
authenticationType: me.CODE,
|
|
1767
1767
|
user: {
|
|
1768
|
-
userId:
|
|
1768
|
+
userId: ne.userId,
|
|
1769
1769
|
username: g,
|
|
1770
|
-
email:
|
|
1770
|
+
email: ne.email
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
|
-
}), !0) : (
|
|
1773
|
+
}), !0) : (M(Ye), !1);
|
|
1774
1774
|
}
|
|
1775
1775
|
return !1;
|
|
1776
|
-
},
|
|
1777
|
-
g == null || g.preventDefault(), await
|
|
1778
|
-
},
|
|
1779
|
-
const { isAuthenticated: g, user:
|
|
1776
|
+
}, U = async (g) => {
|
|
1777
|
+
g == null || g.preventDefault(), await S(_a);
|
|
1778
|
+
}, I = async () => {
|
|
1779
|
+
const { isAuthenticated: g, user: E } = o;
|
|
1780
1780
|
try {
|
|
1781
|
-
if (g &&
|
|
1781
|
+
if (g && E && E.userId) {
|
|
1782
1782
|
if (c) {
|
|
1783
1783
|
i("getAccessToken");
|
|
1784
|
-
const
|
|
1785
|
-
if (
|
|
1784
|
+
const ae = await ge(c);
|
|
1785
|
+
if (ae && ae.payload[N.USER_ID_KEY] !== "")
|
|
1786
1786
|
return c;
|
|
1787
1787
|
}
|
|
1788
1788
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
1789
|
-
const b = await
|
|
1789
|
+
const b = await D.refreshtoken({
|
|
1790
1790
|
clientId: r,
|
|
1791
|
-
userId:
|
|
1792
|
-
nonce:
|
|
1791
|
+
userId: E.userId,
|
|
1792
|
+
nonce: Q,
|
|
1793
1793
|
domain: a
|
|
1794
1794
|
});
|
|
1795
|
-
return b.status && b.status === "success" && b.newAccessToken ? (m(b.newAccessToken),
|
|
1795
|
+
return b.status && b.status === "success" && b.newAccessToken ? (m(b.newAccessToken), T(b.newRefreshToken), b.newAccessToken) : (i(
|
|
1796
1796
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1797
|
-
), await
|
|
1797
|
+
), await S(ie), "");
|
|
1798
1798
|
}
|
|
1799
1799
|
return i(
|
|
1800
1800
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1801
|
-
), await
|
|
1801
|
+
), await S(ie), "";
|
|
1802
1802
|
} catch {
|
|
1803
1803
|
return i(
|
|
1804
1804
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1805
|
-
), await
|
|
1805
|
+
), await S(ka), "";
|
|
1806
1806
|
}
|
|
1807
|
-
},
|
|
1807
|
+
}, C = () => o.isAuthenticated && h ? h : "", O = async () => {
|
|
1808
1808
|
const { user: g } = o;
|
|
1809
|
-
let
|
|
1809
|
+
let E = await le({
|
|
1810
1810
|
accessToken: c,
|
|
1811
1811
|
clientId: r,
|
|
1812
|
-
type:
|
|
1812
|
+
type: ce.GET_REGISTRATION_OPTIONS,
|
|
1813
1813
|
params: {
|
|
1814
1814
|
clientId: r,
|
|
1815
1815
|
id: g == null ? void 0 : g.userId,
|
|
1816
1816
|
username: g == null ? void 0 : g.username
|
|
1817
1817
|
}
|
|
1818
1818
|
});
|
|
1819
|
-
if (
|
|
1819
|
+
if (E.status)
|
|
1820
1820
|
try {
|
|
1821
|
-
const b = await
|
|
1822
|
-
return
|
|
1821
|
+
const b = await pr(E.data);
|
|
1822
|
+
return E = await le({
|
|
1823
1823
|
accessToken: c,
|
|
1824
1824
|
clientId: r,
|
|
1825
|
-
type:
|
|
1825
|
+
type: ce.VERIFY_REGISTRATION,
|
|
1826
1826
|
params: {
|
|
1827
1827
|
clientId: r,
|
|
1828
1828
|
id: g == null ? void 0 : g.userId,
|
|
1829
1829
|
username: g == null ? void 0 : g.username,
|
|
1830
1830
|
registration: b
|
|
1831
1831
|
}
|
|
1832
|
-
}), !!(
|
|
1832
|
+
}), !!(E.status && E.data.length > 0);
|
|
1833
1833
|
} catch {
|
|
1834
|
-
return await
|
|
1834
|
+
return await le({
|
|
1835
1835
|
accessToken: c,
|
|
1836
1836
|
clientId: r,
|
|
1837
|
-
type:
|
|
1837
|
+
type: ce.VERIFY_REGISTRATION,
|
|
1838
1838
|
params: {
|
|
1839
1839
|
clientId: r,
|
|
1840
1840
|
id: g == null ? void 0 : g.userId,
|
|
@@ -1844,92 +1844,92 @@ const Pa = (e) => q(
|
|
|
1844
1844
|
}), !1;
|
|
1845
1845
|
}
|
|
1846
1846
|
return !1;
|
|
1847
|
-
},
|
|
1848
|
-
s({ type: fe, payload: { isLoading: !0 } }),
|
|
1849
|
-
const g =
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
let b = await
|
|
1847
|
+
}, B = async () => {
|
|
1848
|
+
s({ type: fe, payload: { isLoading: !0 } }), W();
|
|
1849
|
+
const g = Ve();
|
|
1850
|
+
F(g), i("loginWithPasskey");
|
|
1851
|
+
const E = Ve();
|
|
1852
|
+
let b = await le({
|
|
1853
1853
|
accessToken: c,
|
|
1854
1854
|
clientId: r,
|
|
1855
|
-
type:
|
|
1855
|
+
type: ce.GET_AUTHENTICATION_OPTIONS,
|
|
1856
1856
|
params: {
|
|
1857
|
-
id:
|
|
1857
|
+
id: E,
|
|
1858
1858
|
clientId: r
|
|
1859
1859
|
}
|
|
1860
1860
|
});
|
|
1861
1861
|
if (b.status)
|
|
1862
1862
|
try {
|
|
1863
|
-
const
|
|
1864
|
-
return b = await
|
|
1863
|
+
const ae = await yr(b.data);
|
|
1864
|
+
return b = await le({
|
|
1865
1865
|
accessToken: c,
|
|
1866
1866
|
clientId: r,
|
|
1867
|
-
type:
|
|
1867
|
+
type: ce.VERIFY_AUTHENTICATION,
|
|
1868
1868
|
params: {
|
|
1869
1869
|
clientId: r,
|
|
1870
|
-
id:
|
|
1871
|
-
authentication:
|
|
1870
|
+
id: E,
|
|
1871
|
+
authentication: ae,
|
|
1872
1872
|
nonce: g,
|
|
1873
1873
|
domain: a,
|
|
1874
1874
|
sessionExpiration: t,
|
|
1875
1875
|
ua: navigator.userAgent
|
|
1876
1876
|
}
|
|
1877
|
-
}), b.data.status === be ? (
|
|
1877
|
+
}), b.data.status === be ? (f(b.data.idToken), m(b.data.accessToken), T(b.data.refreshToken), s({
|
|
1878
1878
|
type: ke,
|
|
1879
1879
|
payload: {
|
|
1880
|
-
authenticationType:
|
|
1880
|
+
authenticationType: me.PASSKEY,
|
|
1881
1881
|
user: {
|
|
1882
1882
|
userId: b.data.userId,
|
|
1883
1883
|
username: b.data.username,
|
|
1884
1884
|
email: b.data.email
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
}), !0) : (
|
|
1887
|
+
}), !0) : (M(Ye), !1);
|
|
1888
1888
|
} catch {
|
|
1889
|
-
return await
|
|
1889
|
+
return await le({
|
|
1890
1890
|
accessToken: c,
|
|
1891
1891
|
clientId: r,
|
|
1892
|
-
type:
|
|
1892
|
+
type: ce.VERIFY_AUTHENTICATION,
|
|
1893
1893
|
params: {
|
|
1894
1894
|
clientId: r,
|
|
1895
|
-
id:
|
|
1895
|
+
id: E,
|
|
1896
1896
|
authentication: {},
|
|
1897
1897
|
nonce: g,
|
|
1898
1898
|
domain: a,
|
|
1899
1899
|
sessionExpiration: t
|
|
1900
1900
|
}
|
|
1901
|
-
}),
|
|
1901
|
+
}), M(Ye), !1;
|
|
1902
1902
|
}
|
|
1903
1903
|
return !1;
|
|
1904
1904
|
};
|
|
1905
|
-
return /* @__PURE__ */ l(
|
|
1905
|
+
return /* @__PURE__ */ l(La.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1906
1906
|
jt.Provider,
|
|
1907
1907
|
{
|
|
1908
1908
|
value: {
|
|
1909
1909
|
...o,
|
|
1910
|
-
login:
|
|
1911
|
-
logout:
|
|
1912
|
-
getAccessToken:
|
|
1913
|
-
getIdToken:
|
|
1914
|
-
registeringForPasskey:
|
|
1915
|
-
loginWithPasskey:
|
|
1910
|
+
login: L,
|
|
1911
|
+
logout: U,
|
|
1912
|
+
getAccessToken: I,
|
|
1913
|
+
getIdToken: C,
|
|
1914
|
+
registeringForPasskey: O,
|
|
1915
|
+
loginWithPasskey: B
|
|
1916
1916
|
},
|
|
1917
1917
|
children: e
|
|
1918
1918
|
}
|
|
1919
1919
|
) });
|
|
1920
|
-
}, zt = (e = jt) =>
|
|
1921
|
-
function
|
|
1920
|
+
}, zt = (e = jt) => It(e), yo = "user", bo = "assistant", Eo = "system", wo = "internal", To = "hidden", Io = "I'm having trouble right now. Please try again later.", So = "OpenAI", _o = "OpenAI", ko = "Anthropic", Ao = "action-message", Ro = "action-reset", No = "action-model", vo = "action-restore", xo = "action-streaming", Co = "action-search", Oo = "action-sort", Po = "action-toggle-prompt", Do = "action-reset-prompt", Lo = "sassy-saint-", $o = "details", Mo = "search", Uo = "sort", Ko = "private-disclosure", Ho = "==stats==", Ua = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Wo = 10, Bo = 30, Go = "av-prompt", Jo = "av-prompt-editable", Vo = "size-4", bt = (e) => Number.isFinite(e) ? e : 0;
|
|
1921
|
+
function Ka(e) {
|
|
1922
1922
|
return {
|
|
1923
1923
|
days: Math.trunc(e / 864e5),
|
|
1924
1924
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1925
1925
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1926
1926
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1927
1927
|
milliseconds: Math.trunc(e % 1e3),
|
|
1928
|
-
microseconds: Math.trunc(
|
|
1929
|
-
nanoseconds: Math.trunc(
|
|
1928
|
+
microseconds: Math.trunc(bt(e * 1e3) % 1e3),
|
|
1929
|
+
nanoseconds: Math.trunc(bt(e * 1e6) % 1e3)
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Ha(e) {
|
|
1933
1933
|
return {
|
|
1934
1934
|
days: e / 86400000n,
|
|
1935
1935
|
hours: e / 3600000n % 24n,
|
|
@@ -1940,20 +1940,20 @@ function Ka(e) {
|
|
|
1940
1940
|
nanoseconds: 0n
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Wa(e) {
|
|
1944
1944
|
switch (typeof e) {
|
|
1945
1945
|
case "number": {
|
|
1946
1946
|
if (Number.isFinite(e))
|
|
1947
|
-
return
|
|
1947
|
+
return Ka(e);
|
|
1948
1948
|
break;
|
|
1949
1949
|
}
|
|
1950
1950
|
case "bigint":
|
|
1951
|
-
return
|
|
1951
|
+
return Ha(e);
|
|
1952
1952
|
}
|
|
1953
1953
|
throw new TypeError("Expected a finite number or bigint");
|
|
1954
1954
|
}
|
|
1955
|
-
const
|
|
1956
|
-
function
|
|
1955
|
+
const Ba = (e) => e === 0 || e === 0n, Ga = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ja = 1e-7, Va = 24n * 60n * 60n * 1000n;
|
|
1956
|
+
function Ya(e, t) {
|
|
1957
1957
|
const r = typeof e == "bigint";
|
|
1958
1958
|
if (!r && !Number.isFinite(e))
|
|
1959
1959
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1961,35 +1961,35 @@ function Va(e, t) {
|
|
|
1961
1961
|
const a = e < 0 ? "-" : "";
|
|
1962
1962
|
e = e < 0 ? -e : e, 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);
|
|
1963
1963
|
let n = [];
|
|
1964
|
-
const o = (
|
|
1965
|
-
const c = Math.floor(
|
|
1964
|
+
const o = (f, u) => {
|
|
1965
|
+
const c = Math.floor(f * 10 ** u + Ja);
|
|
1966
1966
|
return (Math.round(c) / 10 ** u).toFixed(u);
|
|
1967
|
-
}, s = (
|
|
1968
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1969
|
-
if (m ?? (m = String(
|
|
1970
|
-
const y = m.includes(".") ? m.split(".")[0].length : m.length,
|
|
1971
|
-
m = "0".repeat(Math.max(0,
|
|
1967
|
+
}, s = (f, u, c, m) => {
|
|
1968
|
+
if (!((n.length === 0 || !t.colonNotation) && Ba(f) && !(t.colonNotation && c === "m"))) {
|
|
1969
|
+
if (m ?? (m = String(f)), t.colonNotation) {
|
|
1970
|
+
const y = m.includes(".") ? m.split(".")[0].length : m.length, w = n.length > 0 ? 2 : 1;
|
|
1971
|
+
m = "0".repeat(Math.max(0, w - y)) + m;
|
|
1972
1972
|
} else
|
|
1973
|
-
m += t.verbose ? " " +
|
|
1973
|
+
m += t.verbose ? " " + Ga(u, f) : c;
|
|
1974
1974
|
n.push(m);
|
|
1975
1975
|
}
|
|
1976
|
-
}, i =
|
|
1976
|
+
}, i = Wa(e), d = BigInt(i.days);
|
|
1977
1977
|
if (t.hideYearAndDays ? s(BigInt(d) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(d, "day", "d") : (s(d / 365n, "year", "y"), s(d % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1978
1978
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1979
|
-
const
|
|
1980
|
-
if (s(
|
|
1979
|
+
const f = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), m = Number(i.nanoseconds);
|
|
1980
|
+
if (s(f, "second", "s"), t.formatSubMilliseconds)
|
|
1981
1981
|
s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(m, "nanosecond", "ns");
|
|
1982
1982
|
else {
|
|
1983
|
-
const y = u + c / 1e3 + m / 1e6,
|
|
1983
|
+
const y = u + c / 1e3 + m / 1e6, w = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, T = y >= 1 ? Math.round(y) : Math.ceil(y), k = w ? y.toFixed(w) : T;
|
|
1984
1984
|
s(
|
|
1985
|
-
Number.parseFloat(
|
|
1985
|
+
Number.parseFloat(k),
|
|
1986
1986
|
"millisecond",
|
|
1987
1987
|
"ms",
|
|
1988
|
-
|
|
1988
|
+
k
|
|
1989
1989
|
);
|
|
1990
1990
|
}
|
|
1991
1991
|
} else {
|
|
1992
|
-
const
|
|
1992
|
+
const f = (r ? Number(e % Va) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(f, u), m = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1993
1993
|
s(Number.parseFloat(m), "second", "s", m);
|
|
1994
1994
|
}
|
|
1995
1995
|
if (n.length === 0)
|
|
@@ -1997,7 +1997,7 @@ function Va(e, t) {
|
|
|
1997
1997
|
const h = t.colonNotation ? ":" : " ";
|
|
1998
1998
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
1999
1999
|
}
|
|
2000
|
-
const
|
|
2000
|
+
const Fa = process.env.NODE_ENV === "production", ja = !Fa, za = ja ? "gizmette.local.com" : "gizmette.com", Yo = async () => {
|
|
2001
2001
|
const e = {
|
|
2002
2002
|
/**
|
|
2003
2003
|
* A boolean value that indicates the application would
|
|
@@ -2046,27 +2046,27 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2046
2046
|
e
|
|
2047
2047
|
);
|
|
2048
2048
|
});
|
|
2049
|
-
},
|
|
2049
|
+
}, Fo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ $("div", { className: "flex items-center justify-between", children: [
|
|
2050
2050
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2051
2051
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2052
|
-
] }) }, `${e}-${r}`)) : null,
|
|
2052
|
+
] }) }, `${e}-${r}`)) : null, jo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, zo = (e) => e > 0 ? Ya(e, {
|
|
2053
2053
|
secondsDecimalDigits: 2,
|
|
2054
2054
|
unitCount: 2
|
|
2055
|
-
}) : "N/A",
|
|
2055
|
+
}) : "N/A", qa = ({
|
|
2056
2056
|
isAuthenticated: e,
|
|
2057
2057
|
extraClass: t
|
|
2058
|
-
}) =>
|
|
2058
|
+
}) => p(
|
|
2059
2059
|
"flex-1 overflow-y-auto bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2060
2060
|
e ? "pt-0" : "pt-10",
|
|
2061
2061
|
t
|
|
2062
|
-
),
|
|
2062
|
+
), Xa = ({
|
|
2063
2063
|
extraClass: e
|
|
2064
|
-
}) =>
|
|
2064
|
+
}) => p("px-2 sm:px-0", e), qo = (e, t) => t === 1 ? e : `${e}s`, Xo = (e, t) => {
|
|
2065
2065
|
let r;
|
|
2066
2066
|
return (...a) => {
|
|
2067
2067
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2068
2068
|
};
|
|
2069
|
-
},
|
|
2069
|
+
}, Et = "av-button", Ue = "icon", at = "button", Qe = "link", Qa = ({
|
|
2070
2070
|
type: e,
|
|
2071
2071
|
size: t,
|
|
2072
2072
|
labelRight: r,
|
|
@@ -2075,27 +2075,27 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2075
2075
|
}) => {
|
|
2076
2076
|
const o = "max-h-8 py-0 px-2", s = "max-h-9 h-8 px-3", i = "max-h-12 py-2 px-4";
|
|
2077
2077
|
switch (e) {
|
|
2078
|
-
case
|
|
2079
|
-
case
|
|
2080
|
-
return
|
|
2078
|
+
case at:
|
|
2079
|
+
case Qe:
|
|
2080
|
+
return p({
|
|
2081
2081
|
[o]: t === "small",
|
|
2082
2082
|
[s]: t === "medium",
|
|
2083
2083
|
[i]: t === "large"
|
|
2084
2084
|
});
|
|
2085
|
-
case
|
|
2086
|
-
return
|
|
2085
|
+
case Ue:
|
|
2086
|
+
return p("inline-flex items-center", {
|
|
2087
2087
|
"justify-center": n === "center",
|
|
2088
2088
|
"justify-start": n === "left",
|
|
2089
2089
|
"justify-end": n === "right",
|
|
2090
|
-
"h-6
|
|
2091
|
-
"h-6
|
|
2092
|
-
"h-8
|
|
2093
|
-
"h-8
|
|
2094
|
-
"h-12
|
|
2095
|
-
"h-12
|
|
2090
|
+
"h-6 py-0": t === "small" && !(r || a),
|
|
2091
|
+
"h-6": t === "small" && (r || a),
|
|
2092
|
+
"h-8 py-1": t === "medium" && !(r || a),
|
|
2093
|
+
"h-8": t === "medium" && (r || a),
|
|
2094
|
+
"h-12 py-2": t === "large" && !(r || a),
|
|
2095
|
+
"h-12": t === "large" && (r || a)
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
2098
|
-
},
|
|
2098
|
+
}, Za = ({
|
|
2099
2099
|
type: e,
|
|
2100
2100
|
size: t,
|
|
2101
2101
|
labelRight: r,
|
|
@@ -2103,22 +2103,22 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2103
2103
|
}) => {
|
|
2104
2104
|
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
2105
2105
|
switch (e) {
|
|
2106
|
-
case
|
|
2107
|
-
case
|
|
2108
|
-
return
|
|
2109
|
-
"text-center": e ===
|
|
2106
|
+
case at:
|
|
2107
|
+
case Qe:
|
|
2108
|
+
return p({
|
|
2109
|
+
"text-center": e === Qe,
|
|
2110
2110
|
[n]: t === "small",
|
|
2111
2111
|
[o]: t === "medium",
|
|
2112
2112
|
[s]: t === "large"
|
|
2113
2113
|
});
|
|
2114
|
-
case
|
|
2115
|
-
return
|
|
2114
|
+
case Ue:
|
|
2115
|
+
return p({
|
|
2116
2116
|
[n]: t === "small" && (r || a),
|
|
2117
2117
|
[o]: t === "medium" && (r || a),
|
|
2118
2118
|
[s]: t === "large" && (r || a)
|
|
2119
2119
|
});
|
|
2120
2120
|
}
|
|
2121
|
-
},
|
|
2121
|
+
}, en = ({
|
|
2122
2122
|
mode: e,
|
|
2123
2123
|
noBackground: t,
|
|
2124
2124
|
noTruncate: r,
|
|
@@ -2127,7 +2127,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2127
2127
|
if (t)
|
|
2128
2128
|
return "not-prose";
|
|
2129
2129
|
if (a === "primary")
|
|
2130
|
-
return
|
|
2130
|
+
return p("not-prose", {
|
|
2131
2131
|
truncate: !r,
|
|
2132
2132
|
"text-copy-light": e === "dark" || e === "system",
|
|
2133
2133
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -2135,7 +2135,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2135
2135
|
"dark:text-copy-light": e === "alt-system"
|
|
2136
2136
|
});
|
|
2137
2137
|
if (a === "secondary")
|
|
2138
|
-
return
|
|
2138
|
+
return p("not-prose", {
|
|
2139
2139
|
truncate: !r,
|
|
2140
2140
|
"text-copy-light": e === "light" || e === "system",
|
|
2141
2141
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
@@ -2143,7 +2143,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2143
2143
|
"dark:text-copy-light": e === "system"
|
|
2144
2144
|
});
|
|
2145
2145
|
if (a === "danger")
|
|
2146
|
-
return
|
|
2146
|
+
return p("not-prose", {
|
|
2147
2147
|
truncate: !r,
|
|
2148
2148
|
"text-copy-light": e === "dark" || e === "system",
|
|
2149
2149
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
@@ -2151,31 +2151,31 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2151
2151
|
"dark:text-copy-light": e === "alt-system"
|
|
2152
2152
|
});
|
|
2153
2153
|
if (a === "selected")
|
|
2154
|
-
return
|
|
2154
|
+
return p("not-prose text-copy-lighter", {
|
|
2155
2155
|
truncate: !r
|
|
2156
2156
|
});
|
|
2157
|
-
},
|
|
2157
|
+
}, tn = ({
|
|
2158
2158
|
mode: e,
|
|
2159
2159
|
noBackground: t,
|
|
2160
2160
|
variant: r
|
|
2161
2161
|
}) => {
|
|
2162
2162
|
if (!t) {
|
|
2163
2163
|
if (r === "primary")
|
|
2164
|
-
return
|
|
2164
|
+
return p({
|
|
2165
2165
|
"bg-action-dark": e === "dark",
|
|
2166
2166
|
"bg-action-light": e === "light",
|
|
2167
2167
|
"bg-action-dark dark:bg-action-light": e === "system",
|
|
2168
2168
|
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
2169
2169
|
});
|
|
2170
2170
|
if (r === "secondary")
|
|
2171
|
-
return
|
|
2171
|
+
return p({
|
|
2172
2172
|
"bg-action-dark": e === "light",
|
|
2173
2173
|
"bg-action-light": e === "dark",
|
|
2174
2174
|
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
2175
2175
|
"bg-action-light dark:bg-action-dark": e === "system"
|
|
2176
2176
|
});
|
|
2177
2177
|
if (r === "danger")
|
|
2178
|
-
return
|
|
2178
|
+
return p({
|
|
2179
2179
|
"bg-action-danger-dark": e === "dark",
|
|
2180
2180
|
"bg-action-danger-light": e === "light",
|
|
2181
2181
|
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
@@ -2184,13 +2184,13 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2184
2184
|
if (r === "selected")
|
|
2185
2185
|
return "bg-action-selected-dark";
|
|
2186
2186
|
}
|
|
2187
|
-
},
|
|
2187
|
+
}, rn = ({
|
|
2188
2188
|
radius: e
|
|
2189
|
-
}) =>
|
|
2189
|
+
}) => p({
|
|
2190
2190
|
"rounded-full": e === "large",
|
|
2191
2191
|
"rounded-md": e === "medium",
|
|
2192
2192
|
"rounded-sm": e === "small"
|
|
2193
|
-
}),
|
|
2193
|
+
}), an = ({
|
|
2194
2194
|
mode: e,
|
|
2195
2195
|
disabled: t,
|
|
2196
2196
|
variant: r
|
|
@@ -2198,21 +2198,21 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2198
2198
|
if (t)
|
|
2199
2199
|
return "";
|
|
2200
2200
|
if (r === "primary")
|
|
2201
|
-
return
|
|
2201
|
+
return p("hover:text-copy-light-hover", {
|
|
2202
2202
|
"hover:bg-action-dark-hover": e === "dark",
|
|
2203
2203
|
"hover:bg-action-light-hover": e === "light",
|
|
2204
2204
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
2205
2205
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
2206
2206
|
});
|
|
2207
2207
|
if (r === "secondary")
|
|
2208
|
-
return
|
|
2208
|
+
return p("hover:text-copy-light-hover", {
|
|
2209
2209
|
"hover:bg-action-dark-hover": e === "light",
|
|
2210
2210
|
"hover:bg-action-light-hover": e === "dark",
|
|
2211
2211
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
2212
2212
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
2213
2213
|
});
|
|
2214
2214
|
if (r === "danger")
|
|
2215
|
-
return
|
|
2215
|
+
return p("hover:text-copy-light-hover", {
|
|
2216
2216
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
2217
2217
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
2218
2218
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
@@ -2220,7 +2220,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2220
2220
|
});
|
|
2221
2221
|
if (r === "selected")
|
|
2222
2222
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
2223
|
-
},
|
|
2223
|
+
}, nn = ({
|
|
2224
2224
|
mode: e,
|
|
2225
2225
|
disabled: t,
|
|
2226
2226
|
variant: r
|
|
@@ -2228,21 +2228,21 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2228
2228
|
if (t)
|
|
2229
2229
|
return "";
|
|
2230
2230
|
if (r === "primary")
|
|
2231
|
-
return
|
|
2231
|
+
return p("active:text-copy-light-active", {
|
|
2232
2232
|
"active:bg-action-dark-active": e === "dark",
|
|
2233
2233
|
"active:bg-action-light-active": e === "light",
|
|
2234
2234
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
2235
2235
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
2236
2236
|
});
|
|
2237
2237
|
if (r === "secondary")
|
|
2238
|
-
return
|
|
2238
|
+
return p("active:text-copy-light-active", {
|
|
2239
2239
|
"active:bg-action-dark-active": e === "light",
|
|
2240
2240
|
"active:bg-action-light-active": e === "dark",
|
|
2241
2241
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
2242
2242
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
2243
2243
|
});
|
|
2244
2244
|
if (r === "danger")
|
|
2245
|
-
return
|
|
2245
|
+
return p("active:text-copy-lighter-active", {
|
|
2246
2246
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
2247
2247
|
"active:bg-action-danger-light-active": e === "light",
|
|
2248
2248
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
@@ -2250,7 +2250,7 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2250
2250
|
});
|
|
2251
2251
|
if (r === "selected")
|
|
2252
2252
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
2253
|
-
},
|
|
2253
|
+
}, on = ({
|
|
2254
2254
|
mode: e,
|
|
2255
2255
|
noBorder: t,
|
|
2256
2256
|
variant: r
|
|
@@ -2258,21 +2258,21 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2258
2258
|
if (t)
|
|
2259
2259
|
return "border border-transparent";
|
|
2260
2260
|
if (r === "primary")
|
|
2261
|
-
return
|
|
2261
|
+
return p("border", {
|
|
2262
2262
|
"border-border-dark": e === "dark",
|
|
2263
2263
|
"border-border-accent": e === "light",
|
|
2264
2264
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
2265
2265
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
2266
2266
|
});
|
|
2267
2267
|
if (r === "secondary")
|
|
2268
|
-
return
|
|
2268
|
+
return p("border", {
|
|
2269
2269
|
"border-border-dark": e === "light",
|
|
2270
2270
|
"border-border-accent": e === "dark",
|
|
2271
2271
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
2272
2272
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
2273
2273
|
});
|
|
2274
2274
|
if (r === "danger")
|
|
2275
|
-
return
|
|
2275
|
+
return p("border", {
|
|
2276
2276
|
"border-border-danger-dark": e === "dark",
|
|
2277
2277
|
"border-border-danger-medium": e === "light",
|
|
2278
2278
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
@@ -2280,18 +2280,18 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2280
2280
|
});
|
|
2281
2281
|
if (r === "selected")
|
|
2282
2282
|
return "border border-border-selected-dark";
|
|
2283
|
-
},
|
|
2283
|
+
}, sn = ({
|
|
2284
2284
|
focusMode: e
|
|
2285
|
-
}) =>
|
|
2285
|
+
}) => p("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2286
2286
|
"focus:outline-focus-dark": e === "dark",
|
|
2287
2287
|
"focus:outline-focus-light": e === "light",
|
|
2288
2288
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2289
2289
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2290
|
-
}),
|
|
2290
|
+
}), cn = ({
|
|
2291
2291
|
mode: e,
|
|
2292
2292
|
raw: t,
|
|
2293
2293
|
iconClassName: r
|
|
2294
|
-
}) => t ? "" :
|
|
2294
|
+
}) => t ? "" : p(
|
|
2295
2295
|
{
|
|
2296
2296
|
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
2297
2297
|
"text-copy-light": e === "dark" || e === "system",
|
|
@@ -2299,7 +2299,11 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2299
2299
|
"dark:text-copy-accent-dark": e === "system"
|
|
2300
2300
|
},
|
|
2301
2301
|
r
|
|
2302
|
-
),
|
|
2302
|
+
), ln = ({
|
|
2303
|
+
animated: e
|
|
2304
|
+
}) => p({
|
|
2305
|
+
"transition-opacity duration-300 ease-in": e
|
|
2306
|
+
}), qt = ({
|
|
2303
2307
|
type: e,
|
|
2304
2308
|
className: t,
|
|
2305
2309
|
raw: r,
|
|
@@ -2310,57 +2314,61 @@ const Ya = process.env.NODE_ENV === "production", Fa = !Ya, ja = Fa ? "gizmette.
|
|
|
2310
2314
|
size: i,
|
|
2311
2315
|
noBorder: d,
|
|
2312
2316
|
labelRight: h,
|
|
2313
|
-
labelLeft:
|
|
2317
|
+
labelLeft: f,
|
|
2314
2318
|
noBackground: u,
|
|
2315
2319
|
variant: c,
|
|
2316
2320
|
noTruncate: m,
|
|
2317
2321
|
align: y,
|
|
2318
|
-
radius:
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
+
radius: w,
|
|
2323
|
+
animated: T
|
|
2324
|
+
}) => (c || (c = "primary"), r ? p(Et, t) : p(
|
|
2325
|
+
Et,
|
|
2326
|
+
en({
|
|
2322
2327
|
mode: a,
|
|
2323
2328
|
variant: c,
|
|
2324
2329
|
noBackground: u,
|
|
2325
2330
|
noTruncate: m
|
|
2326
2331
|
}),
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2332
|
+
tn({ mode: a, noBackground: u, variant: c }),
|
|
2333
|
+
rn({ radius: w }),
|
|
2334
|
+
Qa({
|
|
2330
2335
|
type: e,
|
|
2331
2336
|
size: i,
|
|
2332
2337
|
labelRight: h,
|
|
2333
|
-
labelLeft:
|
|
2338
|
+
labelLeft: f,
|
|
2334
2339
|
align: y
|
|
2335
2340
|
}),
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
rn({ mode: a, variant: c, disabled: o }),
|
|
2341
|
+
Za({ type: e, size: i, labelRight: h, labelLeft: f }),
|
|
2342
|
+
on({ mode: a, variant: c, noBorder: d }),
|
|
2343
|
+
sn({ focusMode: n }),
|
|
2340
2344
|
an({ mode: a, variant: c, disabled: o }),
|
|
2345
|
+
nn({ mode: a, variant: c, disabled: o }),
|
|
2341
2346
|
{
|
|
2342
2347
|
"w-full": s,
|
|
2343
2348
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2344
2349
|
},
|
|
2350
|
+
p({
|
|
2351
|
+
"transition-[width] duration-300 ease-in-out": e === Ue && T
|
|
2352
|
+
}),
|
|
2345
2353
|
t
|
|
2346
|
-
)),
|
|
2354
|
+
)), dn = (e, t, r) => {
|
|
2347
2355
|
var a;
|
|
2348
2356
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2349
|
-
},
|
|
2357
|
+
}, nt = X.forwardRef((e, t) => {
|
|
2350
2358
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2351
2359
|
return /* @__PURE__ */ l(
|
|
2352
2360
|
"button",
|
|
2353
2361
|
{
|
|
2354
2362
|
ref: t,
|
|
2355
2363
|
onClick: (o) => {
|
|
2356
|
-
|
|
2364
|
+
dn(o, a, r);
|
|
2357
2365
|
},
|
|
2358
2366
|
...n
|
|
2359
2367
|
}
|
|
2360
2368
|
);
|
|
2361
2369
|
});
|
|
2362
|
-
|
|
2363
|
-
const
|
|
2370
|
+
nt.displayName = "BaseButton";
|
|
2371
|
+
const Xt = X.forwardRef(
|
|
2364
2372
|
({
|
|
2365
2373
|
children: e,
|
|
2366
2374
|
disabled: t = !1,
|
|
@@ -2372,12 +2380,12 @@ const qt = F.forwardRef(
|
|
|
2372
2380
|
raw: i = !1,
|
|
2373
2381
|
noBorder: d = !1,
|
|
2374
2382
|
variant: h = "primary",
|
|
2375
|
-
noTruncate:
|
|
2383
|
+
noTruncate: f = !1,
|
|
2376
2384
|
radius: u = "large",
|
|
2377
2385
|
...c
|
|
2378
2386
|
}, m) => {
|
|
2379
|
-
const y =
|
|
2380
|
-
type:
|
|
2387
|
+
const y = qt({
|
|
2388
|
+
type: at,
|
|
2381
2389
|
mode: r,
|
|
2382
2390
|
focusMode: a,
|
|
2383
2391
|
fullWidth: n,
|
|
@@ -2387,11 +2395,11 @@ const qt = F.forwardRef(
|
|
|
2387
2395
|
size: s,
|
|
2388
2396
|
noBorder: d,
|
|
2389
2397
|
variant: h,
|
|
2390
|
-
noTruncate:
|
|
2398
|
+
noTruncate: f,
|
|
2391
2399
|
radius: u
|
|
2392
2400
|
});
|
|
2393
2401
|
return /* @__PURE__ */ l(
|
|
2394
|
-
|
|
2402
|
+
nt,
|
|
2395
2403
|
{
|
|
2396
2404
|
ref: m,
|
|
2397
2405
|
className: y,
|
|
@@ -2402,8 +2410,57 @@ const qt = F.forwardRef(
|
|
|
2402
2410
|
);
|
|
2403
2411
|
}
|
|
2404
2412
|
);
|
|
2405
|
-
|
|
2406
|
-
|
|
2413
|
+
Xt.displayName = "Button";
|
|
2414
|
+
function un() {
|
|
2415
|
+
const e = x(!1);
|
|
2416
|
+
return V(() => (e.current = !0, () => {
|
|
2417
|
+
e.current = !1;
|
|
2418
|
+
}), []), q(() => e.current, []);
|
|
2419
|
+
}
|
|
2420
|
+
function mn(e) {
|
|
2421
|
+
return De(() => e.every((t) => t == null) ? () => {
|
|
2422
|
+
} : (t) => {
|
|
2423
|
+
e.forEach((r) => {
|
|
2424
|
+
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
2425
|
+
});
|
|
2426
|
+
}, e);
|
|
2427
|
+
}
|
|
2428
|
+
const hn = {
|
|
2429
|
+
x: 0,
|
|
2430
|
+
y: 0,
|
|
2431
|
+
width: 0,
|
|
2432
|
+
height: 0,
|
|
2433
|
+
top: 0,
|
|
2434
|
+
left: 0,
|
|
2435
|
+
bottom: 0,
|
|
2436
|
+
right: 0
|
|
2437
|
+
};
|
|
2438
|
+
function Fe(e) {
|
|
2439
|
+
const t = un(), r = x(0), a = x(null), [n, o] = z(hn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
2440
|
+
const d = i[0];
|
|
2441
|
+
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2442
|
+
a.current && t() && o(d.contentRect);
|
|
2443
|
+
}));
|
|
2444
|
+
}), [t]);
|
|
2445
|
+
return V(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2446
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2447
|
+
}), [s, e]), [a, n];
|
|
2448
|
+
}
|
|
2449
|
+
const pn = {
|
|
2450
|
+
small: 24,
|
|
2451
|
+
// w-6
|
|
2452
|
+
medium: 32,
|
|
2453
|
+
// w-8
|
|
2454
|
+
large: 48
|
|
2455
|
+
// w-12
|
|
2456
|
+
}, fn = {
|
|
2457
|
+
small: 8 * 2,
|
|
2458
|
+
// px-2 x 2
|
|
2459
|
+
medium: 12 * 2,
|
|
2460
|
+
// px-3 x 2
|
|
2461
|
+
large: 16 * 2
|
|
2462
|
+
// px-4 x 2
|
|
2463
|
+
}, gn = 2, Oe = X.forwardRef(
|
|
2407
2464
|
({
|
|
2408
2465
|
children: e,
|
|
2409
2466
|
disabled: t = !1,
|
|
@@ -2415,19 +2472,20 @@ const qe = F.forwardRef(
|
|
|
2415
2472
|
raw: i = !1,
|
|
2416
2473
|
noBorder: d = !1,
|
|
2417
2474
|
"aria-label": h,
|
|
2418
|
-
label:
|
|
2475
|
+
label: f,
|
|
2419
2476
|
size: u = "medium",
|
|
2420
2477
|
labelRight: c,
|
|
2421
2478
|
labelLeft: m,
|
|
2422
2479
|
noBackground: y = !1,
|
|
2423
|
-
align:
|
|
2424
|
-
radius:
|
|
2425
|
-
variant:
|
|
2426
|
-
iconClassName:
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2480
|
+
align: w = "center",
|
|
2481
|
+
radius: T = "large",
|
|
2482
|
+
variant: k = "primary",
|
|
2483
|
+
iconClassName: Q,
|
|
2484
|
+
animated: F = !1,
|
|
2485
|
+
...Z
|
|
2486
|
+
}, D) => {
|
|
2487
|
+
const W = qt({
|
|
2488
|
+
type: Ue,
|
|
2431
2489
|
mode: r,
|
|
2432
2490
|
focusMode: a,
|
|
2433
2491
|
fullWidth: n,
|
|
@@ -2439,85 +2497,64 @@ const qe = F.forwardRef(
|
|
|
2439
2497
|
labelRight: c,
|
|
2440
2498
|
labelLeft: m,
|
|
2441
2499
|
noBackground: y,
|
|
2442
|
-
align:
|
|
2443
|
-
radius:
|
|
2444
|
-
variant:
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2500
|
+
align: w,
|
|
2501
|
+
radius: T,
|
|
2502
|
+
variant: k,
|
|
2503
|
+
animated: F
|
|
2504
|
+
}), M = cn({ mode: r, raw: i, iconClassName: Q }), S = ln({ animated: F }), [L, U] = Fe(), [I, C] = Fe(), [O, B] = Fe(), g = x(0), E = x(null), b = mn([D, E]);
|
|
2505
|
+
return Re(() => {
|
|
2506
|
+
O && O.current && (g.current = B.width + fn[u] + (d ? 0 : gn));
|
|
2507
|
+
}, [B, O, u, d]), Re(() => {
|
|
2508
|
+
E && E.current && (c && L && U.width > 0 ? (L.current && (L.current.style.opacity = "100"), E.current.style.width = `${U.width + g.current}px`) : m && C.width > 0 ? (I.current && (I.current.style.opacity = "100"), E.current.style.width = `${C.width + g.current}px`) : (L.current && (L.current.style.opacity = "0"), I.current && (I.current.style.opacity = "0"), E.current.style.width = `${pn[u]}px`));
|
|
2509
|
+
}, [
|
|
2510
|
+
U,
|
|
2511
|
+
c,
|
|
2512
|
+
L,
|
|
2513
|
+
C,
|
|
2514
|
+
m,
|
|
2515
|
+
I,
|
|
2516
|
+
u
|
|
2517
|
+
]), /* @__PURE__ */ $(
|
|
2518
|
+
nt,
|
|
2448
2519
|
{
|
|
2449
|
-
ref:
|
|
2450
|
-
className:
|
|
2520
|
+
ref: b,
|
|
2521
|
+
className: W,
|
|
2451
2522
|
disabled: t,
|
|
2452
2523
|
type: s,
|
|
2453
|
-
"aria-label": h ||
|
|
2454
|
-
...
|
|
2524
|
+
"aria-label": h || f,
|
|
2525
|
+
...Z,
|
|
2455
2526
|
children: [
|
|
2456
|
-
m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }),
|
|
2457
|
-
/* @__PURE__ */ l("span", { className:
|
|
2458
|
-
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2527
|
+
/* @__PURE__ */ l("span", { ref: I, className: S, children: m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }) }),
|
|
2528
|
+
/* @__PURE__ */ l("span", { ref: O, className: M, children: e }),
|
|
2529
|
+
/* @__PURE__ */ l("span", { ref: L, className: S, children: c && /* @__PURE__ */ l("span", { className: "pl-2", children: c }) })
|
|
2459
2530
|
]
|
|
2460
2531
|
}
|
|
2461
2532
|
);
|
|
2462
2533
|
}
|
|
2463
2534
|
);
|
|
2464
|
-
|
|
2535
|
+
Oe.displayName = "ButtonIcon";
|
|
2465
2536
|
/*!
|
|
2466
|
-
@versini/ui-button v4.
|
|
2537
|
+
@versini/ui-button v4.2.0
|
|
2467
2538
|
© 2025 gizmette.com
|
|
2468
2539
|
*/
|
|
2469
2540
|
try {
|
|
2470
2541
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
2471
|
-
version: "4.
|
|
2472
|
-
buildTime: "01/
|
|
2542
|
+
version: "4.2.0",
|
|
2543
|
+
buildTime: "01/25/2025 10:54 PM EST",
|
|
2473
2544
|
homepage: "https://github.com/aversini/ui-components",
|
|
2474
2545
|
license: "MIT"
|
|
2475
2546
|
});
|
|
2476
2547
|
} catch {
|
|
2477
2548
|
}
|
|
2478
|
-
const
|
|
2549
|
+
const yn = X.forwardRef(
|
|
2479
2550
|
({
|
|
2480
2551
|
children: e,
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
raw: i = !1,
|
|
2488
|
-
noBorder: d = !1,
|
|
2489
|
-
"aria-label": h,
|
|
2490
|
-
label: p,
|
|
2491
|
-
size: u = "medium",
|
|
2492
|
-
labelRight: c,
|
|
2493
|
-
labelLeft: m,
|
|
2494
|
-
noBackground: y = !1,
|
|
2495
|
-
align: E = "center",
|
|
2496
|
-
active: w = !1,
|
|
2497
|
-
radius: I = "large",
|
|
2498
|
-
...U
|
|
2499
|
-
}, K) => {
|
|
2500
|
-
const H = rt({
|
|
2501
|
-
type: Le,
|
|
2502
|
-
mode: r,
|
|
2503
|
-
focusMode: a,
|
|
2504
|
-
fullWidth: n,
|
|
2505
|
-
disabled: t,
|
|
2506
|
-
raw: i,
|
|
2507
|
-
className: o,
|
|
2508
|
-
noBorder: d,
|
|
2509
|
-
size: u,
|
|
2510
|
-
labelRight: c,
|
|
2511
|
-
labelLeft: m,
|
|
2512
|
-
noBackground: y,
|
|
2513
|
-
align: E,
|
|
2514
|
-
radius: I
|
|
2515
|
-
}), v = f({
|
|
2516
|
-
"text-copy-accent-dark": r === "light" && !i,
|
|
2517
|
-
"text-copy-light": r === "dark" && !i,
|
|
2518
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2519
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2520
|
-
}), P = w ? f(
|
|
2552
|
+
mode: t = "system",
|
|
2553
|
+
className: r,
|
|
2554
|
+
active: a = !1,
|
|
2555
|
+
...n
|
|
2556
|
+
}, o) => {
|
|
2557
|
+
const s = a ? p(
|
|
2521
2558
|
"relative",
|
|
2522
2559
|
"focus-within:static",
|
|
2523
2560
|
"focus-within:after:border-transparent",
|
|
@@ -2528,50 +2565,45 @@ const ln = F.forwardRef(
|
|
|
2528
2565
|
"after:left-0",
|
|
2529
2566
|
"after:right-0",
|
|
2530
2567
|
{
|
|
2531
|
-
"after:border-table-dark":
|
|
2532
|
-
"after:border-table-light":
|
|
2533
|
-
"after:border-table-dark dark:after:border-table-light":
|
|
2534
|
-
"after:border-table-light dark:after:border-table-dark":
|
|
2568
|
+
"after:border-table-dark": t === "dark",
|
|
2569
|
+
"after:border-table-light": t === "light",
|
|
2570
|
+
"after:border-table-dark dark:after:border-table-light": t === "system",
|
|
2571
|
+
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
2535
2572
|
}
|
|
2536
2573
|
) : "";
|
|
2537
|
-
return /* @__PURE__ */ l("div", { className:
|
|
2538
|
-
|
|
2574
|
+
return /* @__PURE__ */ l("div", { className: s, children: /* @__PURE__ */ l(
|
|
2575
|
+
Oe,
|
|
2539
2576
|
{
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
children: [
|
|
2547
|
-
m && /* @__PURE__ */ l("span", { className: "pr-2", children: m }),
|
|
2548
|
-
/* @__PURE__ */ l("div", { className: v, children: e }),
|
|
2549
|
-
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2550
|
-
]
|
|
2577
|
+
className: p("justify-center", r),
|
|
2578
|
+
ref: o,
|
|
2579
|
+
mode: t,
|
|
2580
|
+
radius: "small",
|
|
2581
|
+
...n,
|
|
2582
|
+
children: e
|
|
2551
2583
|
}
|
|
2552
2584
|
) });
|
|
2553
2585
|
}
|
|
2554
2586
|
);
|
|
2555
|
-
|
|
2587
|
+
yn.displayName = "ButtonSort";
|
|
2556
2588
|
/*!
|
|
2557
|
-
@versini/ui-card v3.0.
|
|
2589
|
+
@versini/ui-card v3.0.13
|
|
2558
2590
|
© 2025 gizmette.com
|
|
2559
2591
|
*/
|
|
2560
2592
|
try {
|
|
2561
2593
|
window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
|
|
2562
|
-
version: "3.0.
|
|
2563
|
-
buildTime: "01/
|
|
2594
|
+
version: "3.0.13",
|
|
2595
|
+
buildTime: "01/25/2025 10:54 PM EST",
|
|
2564
2596
|
homepage: "https://github.com/aversini/ui-components",
|
|
2565
2597
|
license: "MIT"
|
|
2566
2598
|
});
|
|
2567
2599
|
} catch {
|
|
2568
2600
|
}
|
|
2569
2601
|
const Ae = "av-card";
|
|
2570
|
-
function
|
|
2571
|
-
const t =
|
|
2602
|
+
function bn(e) {
|
|
2603
|
+
const t = St();
|
|
2572
2604
|
return `${e}${t}`;
|
|
2573
2605
|
}
|
|
2574
|
-
const
|
|
2606
|
+
const En = ({
|
|
2575
2607
|
className: e,
|
|
2576
2608
|
headerClassName: t,
|
|
2577
2609
|
bodyClassName: r,
|
|
@@ -2580,7 +2612,7 @@ const un = ({
|
|
|
2580
2612
|
compact: o,
|
|
2581
2613
|
noBorder: s
|
|
2582
2614
|
}) => {
|
|
2583
|
-
const i =
|
|
2615
|
+
const i = p(
|
|
2584
2616
|
Ae,
|
|
2585
2617
|
"rounded-md",
|
|
2586
2618
|
{
|
|
@@ -2595,7 +2627,7 @@ const un = ({
|
|
|
2595
2627
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": n === "alt-system"
|
|
2596
2628
|
},
|
|
2597
2629
|
e
|
|
2598
|
-
), d = t ||
|
|
2630
|
+
), d = t || p(`${Ae}__header mt-0 border-b-2`, {
|
|
2599
2631
|
"text-copy-light border-border-accent": n === "darker",
|
|
2600
2632
|
"border-border-accent": n === "dark",
|
|
2601
2633
|
"border-border-medium": n === "light",
|
|
@@ -2603,15 +2635,15 @@ const un = ({
|
|
|
2603
2635
|
"border-border-accent dark:border-border-medium": n === "alt-system",
|
|
2604
2636
|
"mb-4": !o,
|
|
2605
2637
|
"mb-2": o
|
|
2606
|
-
}), h =
|
|
2638
|
+
}), h = p(r), f = a || p(`${Ae}__footer pt-2`);
|
|
2607
2639
|
return {
|
|
2608
2640
|
wrapper: i,
|
|
2609
2641
|
header: d,
|
|
2610
2642
|
body: h,
|
|
2611
|
-
footer:
|
|
2643
|
+
footer: f
|
|
2612
2644
|
};
|
|
2613
2645
|
};
|
|
2614
|
-
function
|
|
2646
|
+
function wn({
|
|
2615
2647
|
id: e,
|
|
2616
2648
|
content: t,
|
|
2617
2649
|
userAriaLabelledby: r,
|
|
@@ -2619,7 +2651,7 @@ function mn({
|
|
|
2619
2651
|
}) {
|
|
2620
2652
|
return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ l("div", { className: a, children: t }) : t ? /* @__PURE__ */ l("div", { className: a, id: e, children: t }) : null;
|
|
2621
2653
|
}
|
|
2622
|
-
const
|
|
2654
|
+
const Tn = ({
|
|
2623
2655
|
header: e,
|
|
2624
2656
|
headerClassName: t,
|
|
2625
2657
|
footer: r,
|
|
@@ -2630,43 +2662,43 @@ const hn = ({
|
|
|
2630
2662
|
"aria-labelledby": i,
|
|
2631
2663
|
mode: d = "system",
|
|
2632
2664
|
compact: h = !1,
|
|
2633
|
-
noBorder:
|
|
2665
|
+
noBorder: f = !1,
|
|
2634
2666
|
...u
|
|
2635
2667
|
}) => {
|
|
2636
2668
|
let c = null, m = null;
|
|
2637
|
-
const y = typeof e == "string",
|
|
2669
|
+
const y = typeof e == "string", w = bn(Ae), T = En({
|
|
2638
2670
|
className: o,
|
|
2639
2671
|
headerClassName: t,
|
|
2640
2672
|
bodyClassName: s,
|
|
2641
2673
|
footerClassName: a,
|
|
2642
2674
|
mode: d,
|
|
2643
2675
|
compact: h,
|
|
2644
|
-
noBorder:
|
|
2676
|
+
noBorder: f
|
|
2645
2677
|
});
|
|
2646
|
-
return y ? (c =
|
|
2678
|
+
return y ? (c = w, m = c) : !y && e && i ? (c = null, m = i) : !y && e && !i ? (c = w, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: T.wrapper, children: /* @__PURE__ */ $(
|
|
2647
2679
|
"section",
|
|
2648
2680
|
{
|
|
2649
2681
|
...m && {
|
|
2650
2682
|
"aria-labelledby": m
|
|
2651
2683
|
},
|
|
2652
|
-
className:
|
|
2684
|
+
className: T.body,
|
|
2653
2685
|
...u,
|
|
2654
2686
|
children: [
|
|
2655
2687
|
/* @__PURE__ */ l(
|
|
2656
|
-
|
|
2688
|
+
wn,
|
|
2657
2689
|
{
|
|
2658
2690
|
...c && { id: c },
|
|
2659
2691
|
content: e,
|
|
2660
|
-
className:
|
|
2692
|
+
className: T.header,
|
|
2661
2693
|
userAriaLabelledby: i
|
|
2662
2694
|
}
|
|
2663
2695
|
),
|
|
2664
2696
|
/* @__PURE__ */ l("div", { children: n }),
|
|
2665
|
-
r ? /* @__PURE__ */ l("div", { className:
|
|
2697
|
+
r ? /* @__PURE__ */ l("div", { className: T.footer, children: r }) : null
|
|
2666
2698
|
]
|
|
2667
2699
|
}
|
|
2668
2700
|
) });
|
|
2669
|
-
},
|
|
2701
|
+
}, Ke = ({
|
|
2670
2702
|
children: e,
|
|
2671
2703
|
fill: t,
|
|
2672
2704
|
viewBox: r,
|
|
@@ -2677,8 +2709,8 @@ const hn = ({
|
|
|
2677
2709
|
semantic: i = !1,
|
|
2678
2710
|
...d
|
|
2679
2711
|
}) => {
|
|
2680
|
-
const h =
|
|
2681
|
-
return /* @__PURE__ */
|
|
2712
|
+
const h = p(o, a);
|
|
2713
|
+
return /* @__PURE__ */ $(et, { children: [
|
|
2682
2714
|
/* @__PURE__ */ l(
|
|
2683
2715
|
"svg",
|
|
2684
2716
|
{
|
|
@@ -2709,14 +2741,14 @@ try {
|
|
|
2709
2741
|
});
|
|
2710
2742
|
} catch {
|
|
2711
2743
|
}
|
|
2712
|
-
const
|
|
2744
|
+
const In = ({
|
|
2713
2745
|
className: e,
|
|
2714
2746
|
viewBox: t,
|
|
2715
2747
|
title: r,
|
|
2716
2748
|
monotone: a,
|
|
2717
2749
|
...n
|
|
2718
2750
|
}) => /* @__PURE__ */ l(
|
|
2719
|
-
|
|
2751
|
+
Ke,
|
|
2720
2752
|
{
|
|
2721
2753
|
defaultViewBox: "0 0 1200 500",
|
|
2722
2754
|
size: "w-full",
|
|
@@ -2726,14 +2758,14 @@ const pn = ({
|
|
|
2726
2758
|
...n,
|
|
2727
2759
|
children: /* @__PURE__ */ l("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
|
|
2728
2760
|
}
|
|
2729
|
-
),
|
|
2761
|
+
), Sn = ({
|
|
2730
2762
|
className: e,
|
|
2731
2763
|
viewBox: t,
|
|
2732
2764
|
title: r,
|
|
2733
2765
|
monotone: a,
|
|
2734
2766
|
...n
|
|
2735
|
-
}) => /* @__PURE__ */
|
|
2736
|
-
|
|
2767
|
+
}) => /* @__PURE__ */ $(
|
|
2768
|
+
Ke,
|
|
2737
2769
|
{
|
|
2738
2770
|
defaultViewBox: "0 0 640 512",
|
|
2739
2771
|
size: "size-5",
|
|
@@ -2752,7 +2784,7 @@ const pn = ({
|
|
|
2752
2784
|
/* @__PURE__ */ l("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.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
|
|
2753
2785
|
]
|
|
2754
2786
|
}
|
|
2755
|
-
),
|
|
2787
|
+
), _n = ({
|
|
2756
2788
|
className: e,
|
|
2757
2789
|
viewBox: t,
|
|
2758
2790
|
title: r,
|
|
@@ -2760,8 +2792,8 @@ const pn = ({
|
|
|
2760
2792
|
...n
|
|
2761
2793
|
}) => {
|
|
2762
2794
|
const o = a ? "1" : "0.4";
|
|
2763
|
-
return /* @__PURE__ */
|
|
2764
|
-
|
|
2795
|
+
return /* @__PURE__ */ $(
|
|
2796
|
+
Ke,
|
|
2765
2797
|
{
|
|
2766
2798
|
defaultViewBox: "0 0 190 190",
|
|
2767
2799
|
size: "size-5",
|
|
@@ -2788,14 +2820,14 @@ const pn = ({
|
|
|
2788
2820
|
]
|
|
2789
2821
|
}
|
|
2790
2822
|
);
|
|
2791
|
-
},
|
|
2823
|
+
}, kn = ({
|
|
2792
2824
|
className: e,
|
|
2793
2825
|
viewBox: t,
|
|
2794
2826
|
title: r,
|
|
2795
2827
|
monotone: a,
|
|
2796
2828
|
...n
|
|
2797
|
-
}) => /* @__PURE__ */
|
|
2798
|
-
|
|
2829
|
+
}) => /* @__PURE__ */ $(
|
|
2830
|
+
Ke,
|
|
2799
2831
|
{
|
|
2800
2832
|
defaultViewBox: "0 0 576 512",
|
|
2801
2833
|
size: "size-5",
|
|
@@ -2829,27 +2861,27 @@ try {
|
|
|
2829
2861
|
} catch {
|
|
2830
2862
|
}
|
|
2831
2863
|
/*!
|
|
2832
|
-
@versini/ui-main v3.0.
|
|
2864
|
+
@versini/ui-main v3.0.9
|
|
2833
2865
|
© 2025 gizmette.com
|
|
2834
2866
|
*/
|
|
2835
2867
|
try {
|
|
2836
2868
|
window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
|
|
2837
|
-
version: "3.0.
|
|
2838
|
-
buildTime: "01/
|
|
2869
|
+
version: "3.0.9",
|
|
2870
|
+
buildTime: "01/25/2025 10:54 PM EST",
|
|
2839
2871
|
homepage: "https://github.com/aversini/ui-components",
|
|
2840
2872
|
license: "MIT"
|
|
2841
2873
|
});
|
|
2842
2874
|
} catch {
|
|
2843
2875
|
}
|
|
2844
|
-
const
|
|
2876
|
+
const An = "av-main", Rn = ({
|
|
2845
2877
|
children: e,
|
|
2846
2878
|
className: t,
|
|
2847
2879
|
raw: r = !1,
|
|
2848
2880
|
noMargin: a = !1,
|
|
2849
2881
|
noPadding: n = !1
|
|
2850
2882
|
}) => {
|
|
2851
|
-
const o =
|
|
2852
|
-
|
|
2883
|
+
const o = p(
|
|
2884
|
+
An,
|
|
2853
2885
|
{
|
|
2854
2886
|
"mt-2 sm:mt-3": !r && !a,
|
|
2855
2887
|
"p-2": !r && !n,
|
|
@@ -2858,10 +2890,10 @@ const bn = "av-main", En = ({
|
|
|
2858
2890
|
t
|
|
2859
2891
|
);
|
|
2860
2892
|
return /* @__PURE__ */ l("main", { className: o, children: e });
|
|
2861
|
-
},
|
|
2893
|
+
}, Nn = "av-flexgrid", _e = "av-flexgrid-item", Pe = 0.25, Ze = X.createContext({
|
|
2862
2894
|
columnGap: 0,
|
|
2863
2895
|
rowGap: 0
|
|
2864
|
-
}),
|
|
2896
|
+
}), vn = ({
|
|
2865
2897
|
children: e,
|
|
2866
2898
|
className: t,
|
|
2867
2899
|
columnGap: r = 1,
|
|
@@ -2873,7 +2905,7 @@ const bn = "av-main", En = ({
|
|
|
2873
2905
|
alignVertical: d = "normal",
|
|
2874
2906
|
...h
|
|
2875
2907
|
}) => {
|
|
2876
|
-
const
|
|
2908
|
+
const f = {
|
|
2877
2909
|
flexDirection: s,
|
|
2878
2910
|
justifyContent: i,
|
|
2879
2911
|
alignItems: d,
|
|
@@ -2884,14 +2916,14 @@ const bn = "av-main", En = ({
|
|
|
2884
2916
|
* by the columnGap and rowGap that will be applied
|
|
2885
2917
|
* to all FlexgridItems (see context and paddings).
|
|
2886
2918
|
*/
|
|
2887
|
-
marginLeft: r * -1 *
|
|
2888
|
-
marginTop: a * -1 *
|
|
2889
|
-
}, u =
|
|
2890
|
-
|
|
2919
|
+
marginLeft: r * -1 * Pe + "rem",
|
|
2920
|
+
marginTop: a * -1 * Pe + "rem"
|
|
2921
|
+
}, u = p(
|
|
2922
|
+
Nn,
|
|
2891
2923
|
"box-border flex flex-wrap"
|
|
2892
2924
|
), c = { columnGap: r, rowGap: a };
|
|
2893
|
-
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style:
|
|
2894
|
-
},
|
|
2925
|
+
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(Ze.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(Ze.Provider, { value: c, children: e }) });
|
|
2926
|
+
}, je = (e, t) => p({
|
|
2895
2927
|
"basis-1/12": e === 1 && !t,
|
|
2896
2928
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2897
2929
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -2964,65 +2996,65 @@ const bn = "av-main", En = ({
|
|
|
2964
2996
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2965
2997
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2966
2998
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2967
|
-
}),
|
|
2999
|
+
}), xn = ({
|
|
2968
3000
|
className: e,
|
|
2969
3001
|
span: t
|
|
2970
3002
|
}) => {
|
|
2971
3003
|
if (!t)
|
|
2972
|
-
return
|
|
3004
|
+
return p(e, _e, "box-border basis-auto");
|
|
2973
3005
|
if (typeof t == "number")
|
|
2974
|
-
return
|
|
2975
|
-
[`${
|
|
3006
|
+
return p(e, _e, "box-border max-w-full", {
|
|
3007
|
+
[`${je(t)}`]: !0
|
|
2976
3008
|
});
|
|
2977
3009
|
if (typeof t == "string")
|
|
2978
|
-
return
|
|
3010
|
+
return p(e, _e, "box-border basis-auto", {
|
|
2979
3011
|
"max-w-full grow": t === "auto"
|
|
2980
3012
|
});
|
|
2981
3013
|
if (typeof t == "object") {
|
|
2982
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ?
|
|
2983
|
-
return
|
|
3014
|
+
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? je(n) : je(n, a));
|
|
3015
|
+
return p(
|
|
2984
3016
|
e,
|
|
2985
3017
|
_e,
|
|
2986
3018
|
"box-border",
|
|
2987
3019
|
r
|
|
2988
3020
|
);
|
|
2989
3021
|
}
|
|
2990
|
-
},
|
|
3022
|
+
}, re = ({
|
|
2991
3023
|
children: e,
|
|
2992
3024
|
className: t,
|
|
2993
3025
|
span: r,
|
|
2994
3026
|
...a
|
|
2995
3027
|
}) => {
|
|
2996
|
-
const { columnGap: n, rowGap: o } =
|
|
2997
|
-
paddingLeft: n *
|
|
2998
|
-
paddingTop: o *
|
|
2999
|
-
}, i =
|
|
3028
|
+
const { columnGap: n, rowGap: o } = It(Ze), s = {
|
|
3029
|
+
paddingLeft: n * Pe + "rem",
|
|
3030
|
+
paddingTop: o * Pe + "rem"
|
|
3031
|
+
}, i = xn({
|
|
3000
3032
|
className: t,
|
|
3001
3033
|
span: r
|
|
3002
3034
|
});
|
|
3003
3035
|
return /* @__PURE__ */ l("div", { className: i, style: s, ...a, children: e });
|
|
3004
3036
|
};
|
|
3005
3037
|
/*!
|
|
3006
|
-
@versini/ui-system v3.0.
|
|
3038
|
+
@versini/ui-system v3.0.8
|
|
3007
3039
|
© 2025 gizmette.com
|
|
3008
3040
|
*/
|
|
3009
3041
|
try {
|
|
3010
3042
|
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
3011
|
-
version: "3.0.
|
|
3012
|
-
buildTime: "01/
|
|
3043
|
+
version: "3.0.8",
|
|
3044
|
+
buildTime: "01/25/2025 10:54 PM EST",
|
|
3013
3045
|
homepage: "https://github.com/aversini/ui-components",
|
|
3014
3046
|
license: "MIT"
|
|
3015
3047
|
});
|
|
3016
3048
|
} catch {
|
|
3017
3049
|
}
|
|
3018
|
-
const
|
|
3019
|
-
function
|
|
3020
|
-
const e =
|
|
3021
|
-
return
|
|
3050
|
+
const Qt = "av-text-input", Cn = "av-text-input-wrapper", ze = "av-text-input-helper-text";
|
|
3051
|
+
function On() {
|
|
3052
|
+
const e = x(!1);
|
|
3053
|
+
return V(() => (e.current = !0, () => {
|
|
3022
3054
|
e.current = !1;
|
|
3023
3055
|
}), []), q(() => e.current, []);
|
|
3024
3056
|
}
|
|
3025
|
-
const
|
|
3057
|
+
const Pn = {
|
|
3026
3058
|
x: 0,
|
|
3027
3059
|
y: 0,
|
|
3028
3060
|
width: 0,
|
|
@@ -3032,19 +3064,19 @@ const kn = {
|
|
|
3032
3064
|
bottom: 0,
|
|
3033
3065
|
right: 0
|
|
3034
3066
|
};
|
|
3035
|
-
function
|
|
3036
|
-
const t =
|
|
3067
|
+
function Dn(e) {
|
|
3068
|
+
const t = On(), r = x(0), a = x(null), [n, o] = z(Pn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3037
3069
|
const d = i[0];
|
|
3038
3070
|
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3039
3071
|
a.current && t() && o(d.contentRect);
|
|
3040
3072
|
}));
|
|
3041
3073
|
}), [t]);
|
|
3042
|
-
return
|
|
3074
|
+
return V(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
3043
3075
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3044
3076
|
}), [s, e]), [a, n];
|
|
3045
3077
|
}
|
|
3046
|
-
function
|
|
3047
|
-
const t =
|
|
3078
|
+
function Ln(e) {
|
|
3079
|
+
const t = St();
|
|
3048
3080
|
if (!e)
|
|
3049
3081
|
return t;
|
|
3050
3082
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3054,7 +3086,7 @@ function Rn(e) {
|
|
|
3054
3086
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3055
3087
|
}
|
|
3056
3088
|
}
|
|
3057
|
-
const
|
|
3089
|
+
const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", $n = {
|
|
3058
3090
|
alert: null,
|
|
3059
3091
|
alertdialog: null,
|
|
3060
3092
|
log: "polite",
|
|
@@ -3062,14 +3094,14 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
|
|
|
3062
3094
|
progressbar: null,
|
|
3063
3095
|
status: "polite",
|
|
3064
3096
|
timer: "assertive"
|
|
3065
|
-
},
|
|
3097
|
+
}, Mn = (e, t) => {
|
|
3066
3098
|
switch (t == null ? void 0 : t.type) {
|
|
3067
|
-
case
|
|
3099
|
+
case Zt:
|
|
3068
3100
|
return {
|
|
3069
3101
|
...e,
|
|
3070
3102
|
announcement: t.payload
|
|
3071
3103
|
};
|
|
3072
|
-
case
|
|
3104
|
+
case er:
|
|
3073
3105
|
return {
|
|
3074
3106
|
...e,
|
|
3075
3107
|
announcement: null
|
|
@@ -3077,14 +3109,14 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
|
|
|
3077
3109
|
default:
|
|
3078
3110
|
return e;
|
|
3079
3111
|
}
|
|
3080
|
-
},
|
|
3112
|
+
}, Un = ({
|
|
3081
3113
|
onAnnouncementClear: e,
|
|
3082
3114
|
dispatch: t
|
|
3083
3115
|
}) => {
|
|
3084
3116
|
t({
|
|
3085
|
-
type:
|
|
3117
|
+
type: er
|
|
3086
3118
|
}), typeof e == "function" && e();
|
|
3087
|
-
},
|
|
3119
|
+
}, wt = ({
|
|
3088
3120
|
children: e,
|
|
3089
3121
|
clearAnnouncementDelay: t,
|
|
3090
3122
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3092,16 +3124,16 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
|
|
|
3092
3124
|
dispatch: n
|
|
3093
3125
|
}) => {
|
|
3094
3126
|
clearTimeout(r.current), e !== null && n({
|
|
3095
|
-
type:
|
|
3127
|
+
type: Zt,
|
|
3096
3128
|
payload: e
|
|
3097
3129
|
}), t && (r.current = setTimeout(
|
|
3098
|
-
() =>
|
|
3130
|
+
() => Un({
|
|
3099
3131
|
onAnnouncementClear: a,
|
|
3100
3132
|
dispatch: n
|
|
3101
3133
|
}),
|
|
3102
3134
|
t
|
|
3103
3135
|
));
|
|
3104
|
-
},
|
|
3136
|
+
}, Kn = ({
|
|
3105
3137
|
children: e,
|
|
3106
3138
|
announcementTimeoutRef: t,
|
|
3107
3139
|
announcementDelay: r,
|
|
@@ -3110,13 +3142,13 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
|
|
|
3110
3142
|
onAnnouncementClear: o,
|
|
3111
3143
|
dispatch: s
|
|
3112
3144
|
}) => {
|
|
3113
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3145
|
+
clearTimeout(t.current), r ? t.current = setTimeout(wt, r, {
|
|
3114
3146
|
children: e,
|
|
3115
3147
|
clearAnnouncementDelay: a,
|
|
3116
3148
|
clearAnnouncementTimeoutRef: n,
|
|
3117
3149
|
onAnnouncementClear: o,
|
|
3118
3150
|
dispatch: s
|
|
3119
|
-
}) :
|
|
3151
|
+
}) : wt({
|
|
3120
3152
|
children: e,
|
|
3121
3153
|
clearAnnouncementDelay: a,
|
|
3122
3154
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3124,7 +3156,7 @@ const Qt = "SET_ANNOUNCEMENT", Zt = "CLEAR_ANNOUNCEMENT", Nn = {
|
|
|
3124
3156
|
dispatch: s
|
|
3125
3157
|
});
|
|
3126
3158
|
};
|
|
3127
|
-
function
|
|
3159
|
+
function tr({
|
|
3128
3160
|
children: e,
|
|
3129
3161
|
className: t,
|
|
3130
3162
|
politeness: r,
|
|
@@ -3135,17 +3167,17 @@ function er({
|
|
|
3135
3167
|
visible: i,
|
|
3136
3168
|
...d
|
|
3137
3169
|
}) {
|
|
3138
|
-
const h =
|
|
3170
|
+
const h = x(null), f = x(null), [u, c] = Tt(Mn, {
|
|
3139
3171
|
announcement: null
|
|
3140
3172
|
});
|
|
3141
3173
|
let m = r;
|
|
3142
|
-
typeof m > "u" && (m = a ?
|
|
3143
|
-
|
|
3174
|
+
typeof m > "u" && (m = a ? $n[a] : "assertive"), V(() => {
|
|
3175
|
+
Kn({
|
|
3144
3176
|
announcementTimeoutRef: h,
|
|
3145
3177
|
announcementDelay: n,
|
|
3146
3178
|
children: e,
|
|
3147
3179
|
clearAnnouncementDelay: o,
|
|
3148
|
-
clearAnnouncementTimeoutRef:
|
|
3180
|
+
clearAnnouncementTimeoutRef: f,
|
|
3149
3181
|
onAnnouncementClear: s,
|
|
3150
3182
|
dispatch: c
|
|
3151
3183
|
});
|
|
@@ -3155,7 +3187,7 @@ function er({
|
|
|
3155
3187
|
o,
|
|
3156
3188
|
s
|
|
3157
3189
|
]);
|
|
3158
|
-
const y =
|
|
3190
|
+
const y = p(t, {
|
|
3159
3191
|
"sr-only": !i
|
|
3160
3192
|
});
|
|
3161
3193
|
return /* @__PURE__ */ l(
|
|
@@ -3170,41 +3202,41 @@ function er({
|
|
|
3170
3202
|
);
|
|
3171
3203
|
}
|
|
3172
3204
|
/*!
|
|
3173
|
-
@versini/ui-liveregion v1.3.
|
|
3205
|
+
@versini/ui-liveregion v1.3.8
|
|
3174
3206
|
© 2025 gizmette.com
|
|
3175
3207
|
*/
|
|
3176
3208
|
try {
|
|
3177
3209
|
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
3178
|
-
version: "1.3.
|
|
3179
|
-
buildTime: "01/
|
|
3210
|
+
version: "1.3.8",
|
|
3211
|
+
buildTime: "01/25/2025 10:54 PM EST",
|
|
3180
3212
|
homepage: "https://github.com/aversini/ui-components",
|
|
3181
3213
|
license: "MIT"
|
|
3182
3214
|
});
|
|
3183
3215
|
} catch {
|
|
3184
3216
|
}
|
|
3185
|
-
const
|
|
3217
|
+
const Hn = ({
|
|
3186
3218
|
mode: e
|
|
3187
|
-
}) =>
|
|
3219
|
+
}) => p({
|
|
3188
3220
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3189
3221
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3190
3222
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3191
3223
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3192
|
-
}),
|
|
3224
|
+
}), Wn = ({
|
|
3193
3225
|
focusMode: e
|
|
3194
|
-
}) =>
|
|
3226
|
+
}) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3195
3227
|
"focus:outline-focus-dark": e === "dark",
|
|
3196
3228
|
"focus:outline-focus-light": e === "light",
|
|
3197
3229
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3198
3230
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3199
|
-
}),
|
|
3231
|
+
}), Bn = ({
|
|
3200
3232
|
noBorder: e,
|
|
3201
3233
|
error: t
|
|
3202
|
-
}) =>
|
|
3234
|
+
}) => p("border-2", {
|
|
3203
3235
|
"border-border-dark": !e && !t,
|
|
3204
3236
|
"focus:border-border-dark": !e && t,
|
|
3205
3237
|
"border-border-error-dark": !e && t,
|
|
3206
3238
|
"border-transparent": e
|
|
3207
|
-
}),
|
|
3239
|
+
}), Gn = ({
|
|
3208
3240
|
disabled: e,
|
|
3209
3241
|
raw: t,
|
|
3210
3242
|
error: r,
|
|
@@ -3213,22 +3245,22 @@ const On = ({
|
|
|
3213
3245
|
if (t)
|
|
3214
3246
|
return "";
|
|
3215
3247
|
if (e)
|
|
3216
|
-
return
|
|
3248
|
+
return p("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
3217
3249
|
if (!r)
|
|
3218
|
-
return
|
|
3250
|
+
return p("absolute px-2 cursor-text font-medium", {
|
|
3219
3251
|
"text-copy-lighter": a === "dark",
|
|
3220
3252
|
"text-copy-dark": a === "light",
|
|
3221
3253
|
"text-copy-dark dark:text-copy-lighter": a === "system",
|
|
3222
3254
|
"text-copy-lighter dark:text-copy-dark": a === "alt-system"
|
|
3223
3255
|
});
|
|
3224
3256
|
if (r)
|
|
3225
|
-
return
|
|
3257
|
+
return p("absolute px-2 cursor-text font-medium", {
|
|
3226
3258
|
"text-copy-lighter": a === "dark",
|
|
3227
3259
|
"text-copy-error-dark": a === "light",
|
|
3228
3260
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3229
3261
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3230
3262
|
});
|
|
3231
|
-
},
|
|
3263
|
+
}, Jn = ({
|
|
3232
3264
|
error: e,
|
|
3233
3265
|
raw: t,
|
|
3234
3266
|
mode: r,
|
|
@@ -3237,25 +3269,25 @@ const On = ({
|
|
|
3237
3269
|
if (t)
|
|
3238
3270
|
return "";
|
|
3239
3271
|
if (a)
|
|
3240
|
-
return
|
|
3241
|
-
|
|
3272
|
+
return p(
|
|
3273
|
+
ze,
|
|
3242
3274
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3243
3275
|
);
|
|
3244
3276
|
if (!e)
|
|
3245
|
-
return
|
|
3277
|
+
return p(ze, "absolute px-2 font-medium", {
|
|
3246
3278
|
"text-copy-lighter": r === "dark",
|
|
3247
3279
|
"text-copy-dark": r === "light",
|
|
3248
3280
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3249
3281
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3250
3282
|
});
|
|
3251
3283
|
if (e)
|
|
3252
|
-
return
|
|
3284
|
+
return p(ze, "absolute px-2 font-medium", {
|
|
3253
3285
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3254
3286
|
"text-copy-error-dark": r === "light",
|
|
3255
3287
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3256
3288
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3257
3289
|
});
|
|
3258
|
-
},
|
|
3290
|
+
}, Vn = ({
|
|
3259
3291
|
className: e,
|
|
3260
3292
|
inputClassName: t,
|
|
3261
3293
|
raw: r,
|
|
@@ -3267,9 +3299,9 @@ const On = ({
|
|
|
3267
3299
|
size: d,
|
|
3268
3300
|
rightElementClassName: h
|
|
3269
3301
|
}) => {
|
|
3270
|
-
const
|
|
3302
|
+
const f = r ? e : p(
|
|
3271
3303
|
"relative flex w-full flex-col justify-center",
|
|
3272
|
-
|
|
3304
|
+
Cn,
|
|
3273
3305
|
e
|
|
3274
3306
|
);
|
|
3275
3307
|
let u = "";
|
|
@@ -3290,37 +3322,37 @@ const On = ({
|
|
|
3290
3322
|
u = "h-12";
|
|
3291
3323
|
break;
|
|
3292
3324
|
}
|
|
3293
|
-
const c = r ?
|
|
3294
|
-
|
|
3325
|
+
const c = r ? p(t) : p(
|
|
3326
|
+
Qt,
|
|
3295
3327
|
u,
|
|
3296
3328
|
"rounded-md text-base px-4",
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3329
|
+
Hn({ mode: s }),
|
|
3330
|
+
Wn({ focusMode: i }),
|
|
3331
|
+
Bn({ noBorder: n, error: o }),
|
|
3300
3332
|
{
|
|
3301
3333
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3302
3334
|
},
|
|
3303
3335
|
t
|
|
3304
|
-
), m = r ? void 0 : "sr-only", y =
|
|
3336
|
+
), m = r ? void 0 : "sr-only", y = Gn({
|
|
3305
3337
|
disabled: a,
|
|
3306
3338
|
raw: r,
|
|
3307
3339
|
error: o,
|
|
3308
3340
|
mode: s
|
|
3309
|
-
}),
|
|
3341
|
+
}), w = Jn({
|
|
3310
3342
|
error: o,
|
|
3311
3343
|
raw: r,
|
|
3312
3344
|
mode: s,
|
|
3313
3345
|
disabled: a
|
|
3314
|
-
}),
|
|
3346
|
+
}), T = r ? void 0 : p("absolute right-3", h);
|
|
3315
3347
|
return {
|
|
3316
|
-
wrapper:
|
|
3348
|
+
wrapper: f,
|
|
3317
3349
|
input: c,
|
|
3318
3350
|
accessibleLabel: m,
|
|
3319
3351
|
visibleLabel: y,
|
|
3320
|
-
helperText:
|
|
3321
|
-
rightElement:
|
|
3352
|
+
helperText: w,
|
|
3353
|
+
rightElement: T
|
|
3322
3354
|
};
|
|
3323
|
-
},
|
|
3355
|
+
}, ot = X.forwardRef(
|
|
3324
3356
|
({
|
|
3325
3357
|
id: e,
|
|
3326
3358
|
name: t,
|
|
@@ -3332,110 +3364,110 @@ const On = ({
|
|
|
3332
3364
|
mode: i = "system",
|
|
3333
3365
|
focusMode: d = "system",
|
|
3334
3366
|
disabled: h = !1,
|
|
3335
|
-
noBorder:
|
|
3367
|
+
noBorder: f = !1,
|
|
3336
3368
|
labelId: u,
|
|
3337
3369
|
labelHidden: c = !1,
|
|
3338
3370
|
type: m = "text",
|
|
3339
3371
|
helperText: y = "",
|
|
3340
|
-
rightElement:
|
|
3341
|
-
rightElementClassName:
|
|
3342
|
-
size:
|
|
3343
|
-
...
|
|
3344
|
-
},
|
|
3345
|
-
const [
|
|
3372
|
+
rightElement: w,
|
|
3373
|
+
rightElementClassName: T,
|
|
3374
|
+
size: k = "md",
|
|
3375
|
+
...Q
|
|
3376
|
+
}, F) => {
|
|
3377
|
+
const [Z, D] = Dn(), [W, M] = z(0), S = Ln({ id: e, prefix: `${Qt}-` }), L = `${t} error, ${y}`, U = x(null), I = x(null), C = {
|
|
3346
3378
|
xs: { label: "-25px", helperText: "30px" },
|
|
3347
3379
|
sm: { label: "-29px", helperText: "34px" },
|
|
3348
3380
|
md: { label: "-33px", helperText: "38px" },
|
|
3349
3381
|
lg: { label: "-15px", helperText: "22px" },
|
|
3350
3382
|
xl: { label: "-19px", helperText: "25px" }
|
|
3351
|
-
},
|
|
3383
|
+
}, O = Vn({
|
|
3352
3384
|
className: o,
|
|
3353
3385
|
inputClassName: s,
|
|
3354
3386
|
error: a,
|
|
3355
3387
|
raw: n,
|
|
3356
3388
|
focusMode: d,
|
|
3357
3389
|
disabled: h,
|
|
3358
|
-
noBorder:
|
|
3390
|
+
noBorder: f,
|
|
3359
3391
|
mode: i,
|
|
3360
|
-
size:
|
|
3361
|
-
rightElementClassName:
|
|
3392
|
+
size: k,
|
|
3393
|
+
rightElementClassName: T
|
|
3362
3394
|
});
|
|
3363
|
-
return
|
|
3364
|
-
|
|
3365
|
-
}, [
|
|
3366
|
-
var
|
|
3367
|
-
const { label:
|
|
3368
|
-
(
|
|
3395
|
+
return Re(() => {
|
|
3396
|
+
D && D.width && M(D.width + 18 + 10);
|
|
3397
|
+
}, [D]), Re(() => {
|
|
3398
|
+
var B, g;
|
|
3399
|
+
const { label: E, helperText: b } = C[k];
|
|
3400
|
+
(B = U == null ? void 0 : U.current) == null || B.style.setProperty("--av-text-input-label", E), (g = I == null ? void 0 : I.current) == null || g.style.setProperty(
|
|
3369
3401
|
"--av-text-input-helper-text",
|
|
3370
3402
|
b
|
|
3371
3403
|
);
|
|
3372
|
-
}, [
|
|
3404
|
+
}, [k]), /* @__PURE__ */ $("div", { className: O.wrapper, children: [
|
|
3373
3405
|
/* @__PURE__ */ l(
|
|
3374
3406
|
"label",
|
|
3375
3407
|
{
|
|
3376
|
-
htmlFor:
|
|
3408
|
+
htmlFor: S,
|
|
3377
3409
|
id: u,
|
|
3378
|
-
className:
|
|
3410
|
+
className: O.accessibleLabel,
|
|
3379
3411
|
children: r
|
|
3380
3412
|
}
|
|
3381
3413
|
),
|
|
3382
3414
|
/* @__PURE__ */ l(
|
|
3383
3415
|
"input",
|
|
3384
3416
|
{
|
|
3385
|
-
ref:
|
|
3386
|
-
id:
|
|
3417
|
+
ref: F,
|
|
3418
|
+
id: S,
|
|
3387
3419
|
name: t,
|
|
3388
3420
|
type: m,
|
|
3389
3421
|
disabled: h,
|
|
3390
3422
|
placeholder: n ? void 0 : " ",
|
|
3391
|
-
className:
|
|
3392
|
-
...y && { "aria-describedby": `${
|
|
3423
|
+
className: O.input,
|
|
3424
|
+
...y && { "aria-describedby": `${S}-helper` },
|
|
3393
3425
|
...a && { "aria-invalid": "true" },
|
|
3394
|
-
...
|
|
3395
|
-
...
|
|
3426
|
+
...w && !n && { style: { paddingRight: W } },
|
|
3427
|
+
...Q
|
|
3396
3428
|
}
|
|
3397
3429
|
),
|
|
3398
3430
|
!n && !c && /* @__PURE__ */ l(
|
|
3399
3431
|
"label",
|
|
3400
3432
|
{
|
|
3401
|
-
ref:
|
|
3433
|
+
ref: U,
|
|
3402
3434
|
"aria-hidden": !0,
|
|
3403
|
-
htmlFor:
|
|
3404
|
-
className:
|
|
3435
|
+
htmlFor: S,
|
|
3436
|
+
className: O.visibleLabel,
|
|
3405
3437
|
children: r
|
|
3406
3438
|
}
|
|
3407
3439
|
),
|
|
3408
3440
|
y && /* @__PURE__ */ l(
|
|
3409
3441
|
"div",
|
|
3410
3442
|
{
|
|
3411
|
-
ref:
|
|
3412
|
-
id: `${
|
|
3413
|
-
className:
|
|
3443
|
+
ref: I,
|
|
3444
|
+
id: `${S}-helper`,
|
|
3445
|
+
className: O.helperText,
|
|
3414
3446
|
children: y
|
|
3415
3447
|
}
|
|
3416
3448
|
),
|
|
3417
|
-
|
|
3449
|
+
w && /* @__PURE__ */ l(
|
|
3418
3450
|
"div",
|
|
3419
3451
|
{
|
|
3420
|
-
ref:
|
|
3421
|
-
className:
|
|
3422
|
-
children:
|
|
3452
|
+
ref: Z,
|
|
3453
|
+
className: O.rightElement,
|
|
3454
|
+
children: w
|
|
3423
3455
|
}
|
|
3424
3456
|
),
|
|
3425
|
-
a && y && /* @__PURE__ */ l(
|
|
3457
|
+
a && y && /* @__PURE__ */ l(tr, { politeness: "polite", clearAnnouncementDelay: 500, children: L })
|
|
3426
3458
|
] });
|
|
3427
3459
|
}
|
|
3428
3460
|
);
|
|
3429
|
-
|
|
3430
|
-
function
|
|
3431
|
-
return
|
|
3461
|
+
ot.displayName = "TextInput";
|
|
3462
|
+
function Yn(e) {
|
|
3463
|
+
return De(() => e.every((t) => t == null) ? () => {
|
|
3432
3464
|
} : (t) => {
|
|
3433
3465
|
e.forEach((r) => {
|
|
3434
3466
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3435
3467
|
});
|
|
3436
3468
|
}, e);
|
|
3437
3469
|
}
|
|
3438
|
-
const
|
|
3470
|
+
const Fn = 500, jn = 5e3, zn = 2e4, rr = X.forwardRef(
|
|
3439
3471
|
({
|
|
3440
3472
|
name: e,
|
|
3441
3473
|
disabled: t,
|
|
@@ -3447,65 +3479,65 @@ const Kn = 500, Hn = 5e3, Wn = 2e4, tr = F.forwardRef(
|
|
|
3447
3479
|
onFocus: i,
|
|
3448
3480
|
onTextInputMaskBlur: d,
|
|
3449
3481
|
rightElement: h,
|
|
3450
|
-
...
|
|
3482
|
+
...f
|
|
3451
3483
|
}, u) => {
|
|
3452
|
-
const [c, m] = z(!0), [y,
|
|
3484
|
+
const [c, m] = z(!0), [y, w] = z({
|
|
3453
3485
|
message: null,
|
|
3454
3486
|
politeness: null
|
|
3455
|
-
}),
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
announcementTimeout:
|
|
3487
|
+
}), T = x(!0), k = x(null), Q = x(null), F = Yn([u, Q]), Z = c ? "Show" : "Hide", D = () => {
|
|
3488
|
+
k.current && clearTimeout(k.current), T.current || (k.current = setTimeout(() => {
|
|
3489
|
+
T.current = !0, m(!0), w({
|
|
3490
|
+
announcementTimeout: jn,
|
|
3459
3491
|
politeness: "polite",
|
|
3460
3492
|
message: `${r} hiding characters`
|
|
3461
3493
|
}), n && n(!0);
|
|
3462
|
-
},
|
|
3463
|
-
},
|
|
3464
|
-
|
|
3465
|
-
const
|
|
3466
|
-
|
|
3467
|
-
announcementTimeout:
|
|
3494
|
+
}, zn));
|
|
3495
|
+
}, W = (I) => {
|
|
3496
|
+
I.preventDefault();
|
|
3497
|
+
const C = !T.current;
|
|
3498
|
+
T.current = C, D(), m(C), w({
|
|
3499
|
+
announcementTimeout: Fn,
|
|
3468
3500
|
politeness: "assertive",
|
|
3469
|
-
message:
|
|
3470
|
-
}), n && n(
|
|
3471
|
-
},
|
|
3472
|
-
var
|
|
3473
|
-
const { relatedTarget:
|
|
3474
|
-
|
|
3475
|
-
},
|
|
3476
|
-
|
|
3477
|
-
},
|
|
3478
|
-
|
|
3479
|
-
},
|
|
3480
|
-
|
|
3501
|
+
message: C ? "Characters hidden" : "Characters showing"
|
|
3502
|
+
}), n && n(C);
|
|
3503
|
+
}, M = (I) => {
|
|
3504
|
+
var C;
|
|
3505
|
+
const { relatedTarget: O } = I, B = (C = Q.current) == null ? void 0 : C.parentElement;
|
|
3506
|
+
B != null && B.contains(O) || d && d();
|
|
3507
|
+
}, S = (I) => {
|
|
3508
|
+
D(), s && s(I), M(I);
|
|
3509
|
+
}, L = (I) => {
|
|
3510
|
+
D(), i && i(I);
|
|
3511
|
+
}, U = (I) => {
|
|
3512
|
+
D(), o && o(I);
|
|
3481
3513
|
};
|
|
3482
|
-
return
|
|
3483
|
-
|
|
3484
|
-
}, []), /* @__PURE__ */
|
|
3514
|
+
return V(() => () => {
|
|
3515
|
+
k.current && clearTimeout(k.current);
|
|
3516
|
+
}, []), /* @__PURE__ */ $(et, { children: [
|
|
3485
3517
|
/* @__PURE__ */ l(
|
|
3486
|
-
|
|
3518
|
+
ot,
|
|
3487
3519
|
{
|
|
3488
|
-
ref:
|
|
3520
|
+
ref: F,
|
|
3489
3521
|
name: e,
|
|
3490
3522
|
label: r,
|
|
3491
3523
|
labelHidden: a,
|
|
3492
3524
|
type: c ? "password" : "text",
|
|
3493
3525
|
disabled: t,
|
|
3494
|
-
onBlur:
|
|
3495
|
-
onFocus:
|
|
3496
|
-
onChange:
|
|
3497
|
-
rightElement:
|
|
3526
|
+
onBlur: S,
|
|
3527
|
+
onFocus: L,
|
|
3528
|
+
onChange: U,
|
|
3529
|
+
rightElement: X.cloneElement(h, {
|
|
3498
3530
|
ref: u,
|
|
3499
|
-
label:
|
|
3500
|
-
onClick:
|
|
3501
|
-
onBlur:
|
|
3531
|
+
label: Z,
|
|
3532
|
+
onClick: W,
|
|
3533
|
+
onBlur: M,
|
|
3502
3534
|
disabled: t
|
|
3503
3535
|
}),
|
|
3504
|
-
...
|
|
3536
|
+
...f
|
|
3505
3537
|
}
|
|
3506
3538
|
),
|
|
3507
3539
|
/* @__PURE__ */ l(
|
|
3508
|
-
|
|
3540
|
+
tr,
|
|
3509
3541
|
{
|
|
3510
3542
|
role: "status",
|
|
3511
3543
|
politeness: y.politeness,
|
|
@@ -3516,21 +3548,21 @@ const Kn = 500, Hn = 5e3, Wn = 2e4, tr = F.forwardRef(
|
|
|
3516
3548
|
] });
|
|
3517
3549
|
}
|
|
3518
3550
|
);
|
|
3519
|
-
|
|
3551
|
+
rr.displayName = "TextInputMask";
|
|
3520
3552
|
/*!
|
|
3521
|
-
@versini/ui-textinput v3.0.
|
|
3553
|
+
@versini/ui-textinput v3.0.13
|
|
3522
3554
|
© 2025 gizmette.com
|
|
3523
3555
|
*/
|
|
3524
3556
|
try {
|
|
3525
3557
|
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
3526
|
-
version: "3.0.
|
|
3527
|
-
buildTime: "01/
|
|
3558
|
+
version: "3.0.13",
|
|
3559
|
+
buildTime: "01/25/2025 10:54 PM EST",
|
|
3528
3560
|
homepage: "https://github.com/aversini/ui-components",
|
|
3529
3561
|
license: "MIT"
|
|
3530
3562
|
});
|
|
3531
3563
|
} catch {
|
|
3532
3564
|
}
|
|
3533
|
-
const
|
|
3565
|
+
const qn = "ASK! ME! ANYTHING!", ar = "Callisto", Xn = "Log in", Qn = "Sign in with a Passkey", Qo = "Log out", Zn = "Password", Zo = "Profile", es = "Settings", ts = "Chat history", rs = "About", as = "Type your question here", ns = "{{clipboard}}", os = `Sometimes, ${ar} hallucinates. Review important details.`, ss = "Prompts are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed. You can use the special placeholder {{clipboard}} to automatically insert the content of your clipboard.", is = {
|
|
3534
3566
|
PREFERENCES: {
|
|
3535
3567
|
TITLE: "User profile",
|
|
3536
3568
|
NAME: "Name",
|
|
@@ -3567,31 +3599,31 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3567
3599
|
SETTINGS_ENGINE: {
|
|
3568
3600
|
TITLE: "AI Engine"
|
|
3569
3601
|
}
|
|
3570
|
-
},
|
|
3571
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3572
|
-
/* @__PURE__ */
|
|
3573
|
-
/* @__PURE__ */ l("h1", { children:
|
|
3574
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3602
|
+
}, eo = () => /* @__PURE__ */ $("div", { className: "flex items-center justify-center", children: [
|
|
3603
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(In, {}) }),
|
|
3604
|
+
/* @__PURE__ */ $("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3605
|
+
/* @__PURE__ */ l("h1", { children: ar }),
|
|
3606
|
+
/* @__PURE__ */ l("h2", { children: qn })
|
|
3575
3607
|
] })
|
|
3576
|
-
] }),
|
|
3577
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = zt(), [a, n] = z(""), [o, s] = z(""), [i, d] = z(!0), [h,
|
|
3608
|
+
] }), to = () => {
|
|
3609
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = zt(), [a, n] = z(""), [o, s] = z(""), [i, d] = z(!0), [h, f] = z({
|
|
3578
3610
|
username: "",
|
|
3579
3611
|
password: ""
|
|
3580
3612
|
}), u = async (c) => {
|
|
3581
3613
|
c.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
|
|
3582
3614
|
};
|
|
3583
|
-
return
|
|
3615
|
+
return V(() => {
|
|
3584
3616
|
var c;
|
|
3585
3617
|
(c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
|
|
3586
3618
|
var m;
|
|
3587
3619
|
(m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
|
|
3588
3620
|
}, 500);
|
|
3589
|
-
}),
|
|
3621
|
+
}), V(() => {
|
|
3590
3622
|
t && s(t);
|
|
3591
|
-
}, [t]), /* @__PURE__ */ l(
|
|
3592
|
-
|
|
3623
|
+
}, [t]), /* @__PURE__ */ l(et, { children: /* @__PURE__ */ $(
|
|
3624
|
+
Rn,
|
|
3593
3625
|
{
|
|
3594
|
-
className:
|
|
3626
|
+
className: Xa({
|
|
3595
3627
|
extraClass: "mt-5"
|
|
3596
3628
|
}),
|
|
3597
3629
|
noMargin: !0,
|
|
@@ -3600,16 +3632,16 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3600
3632
|
/* @__PURE__ */ l(
|
|
3601
3633
|
"div",
|
|
3602
3634
|
{
|
|
3603
|
-
className:
|
|
3635
|
+
className: qa({
|
|
3604
3636
|
extraClass: "rounded-md"
|
|
3605
3637
|
}),
|
|
3606
|
-
children: /* @__PURE__ */ l(
|
|
3638
|
+
children: /* @__PURE__ */ l(eo, {})
|
|
3607
3639
|
}
|
|
3608
3640
|
),
|
|
3609
|
-
/* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(
|
|
3610
|
-
/* @__PURE__ */ l(
|
|
3611
|
-
/* @__PURE__ */ l(
|
|
3612
|
-
|
|
3641
|
+
/* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(vn, { alignHorizontal: "center", children: /* @__PURE__ */ l(re, { span: 6, children: /* @__PURE__ */ $(Tn, { mode: "dark", children: [
|
|
3642
|
+
/* @__PURE__ */ l(re, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3643
|
+
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3644
|
+
ot,
|
|
3613
3645
|
{
|
|
3614
3646
|
className: "mt-7",
|
|
3615
3647
|
required: !0,
|
|
@@ -3621,7 +3653,7 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3621
3653
|
name: "username",
|
|
3622
3654
|
label: "Username",
|
|
3623
3655
|
onChange: (c) => {
|
|
3624
|
-
|
|
3656
|
+
f({
|
|
3625
3657
|
...h,
|
|
3626
3658
|
username: c.target.value
|
|
3627
3659
|
}), n("");
|
|
@@ -3629,8 +3661,8 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3629
3661
|
error: a !== ""
|
|
3630
3662
|
}
|
|
3631
3663
|
) }),
|
|
3632
|
-
/* @__PURE__ */ l(
|
|
3633
|
-
|
|
3664
|
+
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3665
|
+
rr,
|
|
3634
3666
|
{
|
|
3635
3667
|
className: "mt-7",
|
|
3636
3668
|
required: !0,
|
|
@@ -3640,19 +3672,19 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3640
3672
|
mode: "dark",
|
|
3641
3673
|
focusMode: "light",
|
|
3642
3674
|
name: "password",
|
|
3643
|
-
label:
|
|
3675
|
+
label: Zn,
|
|
3644
3676
|
rightElement: /* @__PURE__ */ l(
|
|
3645
|
-
|
|
3677
|
+
Oe,
|
|
3646
3678
|
{
|
|
3647
3679
|
focusMode: "light",
|
|
3648
3680
|
mode: "dark",
|
|
3649
3681
|
label: i ? "Show" : "Hide",
|
|
3650
|
-
children: i ? /* @__PURE__ */ l(
|
|
3682
|
+
children: i ? /* @__PURE__ */ l(kn, {}) : /* @__PURE__ */ l(Sn, {})
|
|
3651
3683
|
}
|
|
3652
3684
|
),
|
|
3653
3685
|
onMaskChange: d,
|
|
3654
3686
|
onChange: (c) => {
|
|
3655
|
-
|
|
3687
|
+
f({
|
|
3656
3688
|
...h,
|
|
3657
3689
|
password: c.target.value
|
|
3658
3690
|
}), n("");
|
|
@@ -3661,8 +3693,8 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3661
3693
|
helperText: a
|
|
3662
3694
|
}
|
|
3663
3695
|
) }),
|
|
3664
|
-
/* @__PURE__ */ l(
|
|
3665
|
-
|
|
3696
|
+
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3697
|
+
Xt,
|
|
3666
3698
|
{
|
|
3667
3699
|
mode: "light",
|
|
3668
3700
|
focusMode: "light",
|
|
@@ -3670,96 +3702,97 @@ const Bn = "ASK! ME! ANYTHING!", rr = "Callisto", Gn = "Log in", Jn = "Sign in w
|
|
|
3670
3702
|
noBorder: !0,
|
|
3671
3703
|
type: "submit",
|
|
3672
3704
|
className: "mt-7",
|
|
3673
|
-
children:
|
|
3705
|
+
children: Xn
|
|
3674
3706
|
}
|
|
3675
3707
|
) }),
|
|
3676
|
-
/* @__PURE__ */ l(
|
|
3677
|
-
/* @__PURE__ */ l(
|
|
3678
|
-
|
|
3708
|
+
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
3709
|
+
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3710
|
+
Oe,
|
|
3679
3711
|
{
|
|
3680
3712
|
variant: "selected",
|
|
3681
3713
|
mode: "dark",
|
|
3682
3714
|
focusMode: "light",
|
|
3683
3715
|
fullWidth: !0,
|
|
3684
3716
|
className: "mb-4",
|
|
3685
|
-
labelRight:
|
|
3717
|
+
labelRight: Qn,
|
|
3686
3718
|
onClick: r,
|
|
3687
|
-
children: /* @__PURE__ */ l(
|
|
3719
|
+
children: /* @__PURE__ */ l(_n, { size: "size-7" })
|
|
3688
3720
|
}
|
|
3689
3721
|
) })
|
|
3690
3722
|
] }) }) }) })
|
|
3691
3723
|
]
|
|
3692
3724
|
}
|
|
3693
3725
|
) });
|
|
3694
|
-
},
|
|
3726
|
+
}, ro = new URL(document.location.href).searchParams, ao = !!ro.get("debug") || !1, no = ir(() => import(
|
|
3695
3727
|
/* webpackChunkName: "LazyApp" */
|
|
3696
|
-
"./App.
|
|
3697
|
-
).then((e) => e.App)),
|
|
3728
|
+
"./App.BP43Jj_A.js"
|
|
3729
|
+
).then((e) => e.App)), oo = ({ isComponent: e }) => {
|
|
3698
3730
|
const { isAuthenticated: t } = zt();
|
|
3699
|
-
return t ? /* @__PURE__ */ l(
|
|
3700
|
-
},
|
|
3731
|
+
return t ? /* @__PURE__ */ l(cr, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(no, { isComponent: e }) }) : /* @__PURE__ */ l(to, {});
|
|
3732
|
+
}, so = ({
|
|
3701
3733
|
isComponent: e = !1,
|
|
3702
|
-
domain: t =
|
|
3703
|
-
}) => /* @__PURE__ */ l(Ma, { clientId:
|
|
3734
|
+
domain: t = za
|
|
3735
|
+
}) => /* @__PURE__ */ l(Ma, { clientId: Ua, domain: t, debug: ao, children: /* @__PURE__ */ l(oo, { isComponent: e }) }), cs = ({ domain: e }) => /* @__PURE__ */ l(so, { isComponent: !0, domain: e });
|
|
3704
3736
|
export {
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3737
|
+
rs as ABOUT_TITLE,
|
|
3738
|
+
Ao as ACTION_MESSAGE,
|
|
3739
|
+
No as ACTION_MODEL,
|
|
3740
|
+
Ro as ACTION_RESET,
|
|
3741
|
+
Do as ACTION_RESET_PROMPT,
|
|
3742
|
+
vo as ACTION_RESTORE,
|
|
3743
|
+
Co as ACTION_SEARCH,
|
|
3744
|
+
Oo as ACTION_SORT,
|
|
3745
|
+
xo as ACTION_STREAMING,
|
|
3746
|
+
Po as ACTION_TOGGLE_PROMPT,
|
|
3747
|
+
ar as APP_NAME,
|
|
3748
|
+
Xt as C,
|
|
3749
|
+
is as CARDS,
|
|
3750
|
+
ns as CLIPBOARD_PROMPT,
|
|
3751
|
+
So as DEFAULT_AI_ENGINE,
|
|
3752
|
+
Vo as DEFAULT_ICON_ACTION_SIZE,
|
|
3753
|
+
ko as ENGINE_ANTHROPIC,
|
|
3754
|
+
_o as ENGINE_OPENAI,
|
|
3755
|
+
Io as ERROR_MESSAGE,
|
|
3756
|
+
os as FOOTER_DISCLAIMER,
|
|
3757
|
+
ts as HISTORY_TITLE,
|
|
3758
|
+
Bo as INFINITE_SCROLL_LIMIT,
|
|
3759
|
+
Wo as INFINITE_SCROLL_THRESHOLD,
|
|
3760
|
+
vn as L,
|
|
3761
|
+
$o as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3762
|
+
Lo as LOCAL_STORAGE_PREFIX,
|
|
3763
|
+
Ko as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
3764
|
+
Mo as LOCAL_STORAGE_SEARCH,
|
|
3765
|
+
Uo as LOCAL_STORAGE_SORT,
|
|
3766
|
+
Qo as LOG_OUT,
|
|
3767
|
+
eo as Logo,
|
|
3768
|
+
me as M,
|
|
3769
|
+
Zo as PROFILE_TITLE,
|
|
3770
|
+
ss as PROMPTS_DESCRIPTION,
|
|
3771
|
+
Go as PROMPT_CLASSNAME,
|
|
3772
|
+
Jo as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
3773
|
+
Tn as R,
|
|
3774
|
+
bo as ROLE_ASSISTANT,
|
|
3775
|
+
To as ROLE_HIDDEN,
|
|
3776
|
+
wo as ROLE_INTERNAL,
|
|
3777
|
+
Eo as ROLE_SYSTEM,
|
|
3778
|
+
yo as ROLE_USER,
|
|
3779
|
+
es as SETTINGS_TITLE,
|
|
3780
|
+
Ho as STATS_SEPARATOR,
|
|
3781
|
+
cs as SassySaint,
|
|
3782
|
+
as as TYPE_QUESTION,
|
|
3783
|
+
Xo as debounce,
|
|
3784
|
+
zo as durationFormatter,
|
|
3785
|
+
Ke as f,
|
|
3786
|
+
ot as fe,
|
|
3787
|
+
Yo as getCurrentGeoLocation,
|
|
3788
|
+
Xa as getMainPaddingClass,
|
|
3789
|
+
qa as getMessageContaintWrapperClass,
|
|
3790
|
+
jo as isLastMessageFromRole,
|
|
3791
|
+
re as j,
|
|
3792
|
+
_n as l,
|
|
3793
|
+
qo as pluralize,
|
|
3794
|
+
Rn as r,
|
|
3795
|
+
Fo as renderDataAsList,
|
|
3796
|
+
Oe as te,
|
|
3797
|
+
zt as un
|
|
3765
3798
|
};
|