@versini/sassysaint 7.1.4 → 7.1.5
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.Bfnlm12i.js → App.Cc0p_pSJ.js} +3 -3
- package/dist/chunks/{ChatBubbleAssistant.CdEM0sYe.js → ChatBubbleAssistant.BVWvPevO.js} +3 -3
- package/dist/chunks/{HeaderEntry.B9Nkz9EK.js → HeaderEntry.D8k-CVJ5.js} +4 -4
- package/dist/chunks/{MarkdownWithExtra.DmZcGXro.js → MarkdownWithExtra.B--K8Hs_.js} +2 -2
- package/dist/chunks/{index.C18A8kDY.js → index.Cnd32U9a.js} +418 -420
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as l, jsxs as D, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
-
import X, { createContext as
|
|
2
|
+
import X, { createContext as sr, useReducer as It, useRef as x, useCallback as q, useEffect as Y, useContext as St, useSyncExternalStore as ir, useLayoutEffect as Ne, useMemo as Le, useState as z, useId as _t, lazy as cr, Suspense as lr } from "react";
|
|
3
3
|
import p from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var dr = Object.defineProperty, ur = (e, t, r) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, We = (e, t, r) => ur(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
|
-
@versini/auth-provider v7.4.
|
|
6
|
+
@versini/auth-provider v7.4.2
|
|
7
7
|
© 2025 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "7.4.
|
|
12
|
-
buildTime: "02/09/2025
|
|
11
|
+
version: "7.4.2",
|
|
12
|
+
buildTime: "02/09/2025 06:14 PM EST",
|
|
13
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
@@ -31,7 +31,7 @@ function ve(e) {
|
|
|
31
31
|
function tt() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function kt(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
@@ -39,7 +39,7 @@ function At(e) {
|
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function At(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
45
|
let v = class extends Error {
|
|
@@ -47,7 +47,7 @@ let v = class extends Error {
|
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function mr({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
@@ -97,7 +97,7 @@ function hr({ error: e, options: t }) {
|
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (At(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
102
|
return new v({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -125,7 +125,7 @@ function hr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class hr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,12 +141,12 @@ class pr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const Rt = new hr(), pr = ["cross-platform", "platform"];
|
|
145
|
+
function Nt(e) {
|
|
146
|
+
if (e && !(pr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function fr(e) {
|
|
150
150
|
var u;
|
|
151
151
|
if (!tt())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
@@ -157,14 +157,14 @@ async function gr(e) {
|
|
|
157
157
|
...e.user,
|
|
158
158
|
id: ve(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(
|
|
160
|
+
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(kt)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = Rt.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (c) {
|
|
167
|
-
throw
|
|
167
|
+
throw mr({ error: c, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -206,20 +206,20 @@ async function gr(e) {
|
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: Nt(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function Be(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
|
|
216
|
+
function gr() {
|
|
217
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 yr({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
@@ -239,7 +239,7 @@ function br({ error: e, options: t }) {
|
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
241
|
const a = window.location.hostname;
|
|
242
|
-
if (
|
|
242
|
+
if (At(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
244
|
return new v({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -260,30 +260,30 @@ function br({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function br(e, t = !1) {
|
|
264
264
|
var u, c;
|
|
265
265
|
if (!tt())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
|
-
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(
|
|
268
|
+
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(kt));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
271
|
challenge: ve(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await gr())
|
|
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');
|
|
279
279
|
n.mediation = "conditional", a.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
n.publicKey = a, n.signal =
|
|
281
|
+
n.publicKey = a, n.signal = Rt.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
285
|
} catch (m) {
|
|
286
|
-
throw
|
|
286
|
+
throw yr({ error: m, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
@@ -300,7 +300,7 @@ async function Er(e, t = !1) {
|
|
|
300
300
|
},
|
|
301
301
|
type: h,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Nt(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
@@ -310,7 +310,7 @@ async function Er(e, t = !1) {
|
|
|
310
310
|
try {
|
|
311
311
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
312
|
version: "4.2.0",
|
|
313
|
-
buildTime: "02/09/2025
|
|
313
|
+
buildTime: "02/09/2025 06:14 PM EST",
|
|
314
314
|
homepage: "https://github.com/aversini/auth-client",
|
|
315
315
|
license: "MIT"
|
|
316
316
|
});
|
|
@@ -323,7 +323,7 @@ const me = {
|
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, vt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
328
|
}, N = {
|
|
329
329
|
ALG: "RS256",
|
|
@@ -338,7 +338,7 @@ const me = {
|
|
|
338
338
|
SCOPES_KEY: "scopes",
|
|
339
339
|
CLIENT_ID_KEY: "aud",
|
|
340
340
|
ISSUER: "gizmette.com"
|
|
341
|
-
},
|
|
341
|
+
}, Er = `-----BEGIN PUBLIC KEY-----
|
|
342
342
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
343
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
344
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -351,15 +351,15 @@ awIDAQAB
|
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
}, Me = crypto,
|
|
355
|
-
function
|
|
354
|
+
}, Me = crypto, xt = (e) => e instanceof CryptoKey, Ee = new TextEncoder(), ye = new TextDecoder();
|
|
355
|
+
function wr(...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 Tr = (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);
|
|
@@ -368,7 +368,7 @@ const Ir = (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 Tr(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
@@ -392,30 +392,30 @@ class Xe extends P {
|
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
Xe.code = "ERR_JWT_EXPIRED";
|
|
395
|
-
class
|
|
395
|
+
class Ct extends P {
|
|
396
396
|
constructor() {
|
|
397
397
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
|
|
400
|
+
Ct.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
401
|
let W = class extends P {
|
|
402
402
|
constructor() {
|
|
403
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
W.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
-
class
|
|
407
|
+
class Ir 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
|
+
Ir.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
+
class Sr extends P {
|
|
414
414
|
constructor() {
|
|
415
415
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
|
|
418
|
+
Sr.code = "ERR_JWE_INVALID";
|
|
419
419
|
let _ = class extends P {
|
|
420
420
|
constructor() {
|
|
421
421
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
@@ -428,42 +428,42 @@ let J = class extends P {
|
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
430
|
J.code = "ERR_JWT_INVALID";
|
|
431
|
-
class
|
|
431
|
+
class _r extends P {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
class
|
|
436
|
+
_r.code = "ERR_JWK_INVALID";
|
|
437
|
+
class kr extends P {
|
|
438
438
|
constructor() {
|
|
439
439
|
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
class
|
|
442
|
+
kr.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class Ar 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
|
+
Ar.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
+
class Rr 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
|
+
Rr.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class Nr 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
|
|
460
|
+
Nr.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
+
class Ot 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
|
+
Ot.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
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
|
}
|
|
@@ -473,7 +473,7 @@ function we(e, t) {
|
|
|
473
473
|
function Ve(e) {
|
|
474
474
|
return parseInt(e.name.slice(4), 10);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function vr(e) {
|
|
477
477
|
switch (e) {
|
|
478
478
|
case "ES256":
|
|
479
479
|
return "P-256";
|
|
@@ -485,7 +485,7 @@ function xr(e) {
|
|
|
485
485
|
throw new Error("unreachable");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function xr(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,7 +495,7 @@ function Cr(e, t) {
|
|
|
495
495
|
throw new TypeError(r);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Cr(e, t, ...r) {
|
|
499
499
|
switch (t) {
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
@@ -537,7 +537,7 @@ function Or(e, t, ...r) {
|
|
|
537
537
|
case "ES512": {
|
|
538
538
|
if (!we(e.algorithm, "ECDSA"))
|
|
539
539
|
throw j("ECDSA");
|
|
540
|
-
const a =
|
|
540
|
+
const a = vr(t);
|
|
541
541
|
if (e.algorithm.namedCurve !== a)
|
|
542
542
|
throw j(a, "algorithm.namedCurve");
|
|
543
543
|
break;
|
|
@@ -545,9 +545,9 @@ function Or(e, t, ...r) {
|
|
|
545
545
|
default:
|
|
546
546
|
throw new TypeError("CryptoKey does not support this operation");
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
xr(e, r);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Pt(e, t, ...r) {
|
|
551
551
|
var a;
|
|
552
552
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
553
553
|
const n = r.pop();
|
|
@@ -555,11 +555,11 @@ function Dt(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 it = (e, ...t) =>
|
|
559
|
-
function
|
|
560
|
-
return
|
|
558
|
+
const it = (e, ...t) => Pt("Key must be ", e, ...t);
|
|
559
|
+
function Dt(e, t, ...r) {
|
|
560
|
+
return Pt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const
|
|
562
|
+
const Lt = (e) => xt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = ["CryptoKey"], Or = (...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 $t = (e) => Ct(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
578
578
|
}
|
|
579
579
|
return !0;
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function Pr(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
584
|
function he(e) {
|
|
585
|
-
if (!
|
|
585
|
+
if (!Pr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
588
588
|
return !0;
|
|
@@ -591,7 +591,7 @@ function he(e) {
|
|
|
591
591
|
t = Object.getPrototypeOf(t);
|
|
592
592
|
return Object.getPrototypeOf(e) === t;
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Dr = (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)
|
|
@@ -601,16 +601,16 @@ const Lr = (e, t) => {
|
|
|
601
601
|
function pe(e) {
|
|
602
602
|
return he(e) && typeof e.kty == "string";
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Lr(e) {
|
|
605
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function $r(e) {
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Mr(e) {
|
|
611
611
|
return pe(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Ur(e) {
|
|
614
614
|
let t, r;
|
|
615
615
|
switch (e.kty) {
|
|
616
616
|
case "RSA": {
|
|
@@ -682,36 +682,36 @@ function Kr(e) {
|
|
|
682
682
|
}
|
|
683
683
|
return { algorithm: t, keyUsages: r };
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const $t = async (e) => {
|
|
686
686
|
if (!e.alg)
|
|
687
687
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
688
|
-
const { algorithm: t, keyUsages: r } =
|
|
688
|
+
const { algorithm: t, keyUsages: r } = Ur(e), a = [
|
|
689
689
|
t,
|
|
690
690
|
e.ext ?? !1,
|
|
691
691
|
e.key_ops ?? r
|
|
692
692
|
], n = { ...e };
|
|
693
693
|
return delete n.alg, delete n.use, Me.subtle.importKey("jwk", n, ...a);
|
|
694
|
-
},
|
|
694
|
+
}, Mt = (e) => te(e);
|
|
695
695
|
let oe, se;
|
|
696
|
-
const
|
|
696
|
+
const Ut = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = 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
|
-
const s = await
|
|
700
|
+
const s = await $t({ ...r, alg: a });
|
|
701
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
|
-
},
|
|
703
|
-
if (
|
|
702
|
+
}, Kr = (e, t) => {
|
|
703
|
+
if (Ut(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 ? Mt(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Ce(se, e, r, t));
|
|
706
706
|
}
|
|
707
707
|
return pe(e) ? e.k ? te(e.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Ce(se, e, e, t, !0)) : e;
|
|
708
|
-
},
|
|
709
|
-
if (
|
|
708
|
+
}, Hr = (e, t) => {
|
|
709
|
+
if (Ut(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ?
|
|
711
|
+
return r.k ? Mt(r.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), Ce(oe, e, r, t));
|
|
712
712
|
}
|
|
713
713
|
return pe(e) ? e.k ? te(e.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), Ce(oe, e, e, t, !0)) : e;
|
|
714
|
-
},
|
|
714
|
+
}, Wr = { normalizePublicKey: Kr, normalizePrivateKey: Hr }, 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)
|
|
@@ -737,7 +737,7 @@ const Kt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
737
737
|
default:
|
|
738
738
|
throw new W("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, Br = 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) {
|
|
@@ -784,13 +784,13 @@ const Kt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
784
784
|
throw new W('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
786
|
return Me.subtle.importKey(t, i, o, !1, s);
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
787
|
+
}, Vr = (e, t, r) => Br(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
788
|
+
async function Jr(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 Vr(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
793
|
+
async function Gr(e, t) {
|
|
794
794
|
if (!he(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
@@ -803,7 +803,7 @@ async function Yr(e, t) {
|
|
|
803
803
|
throw new W('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
804
804
|
case "EC":
|
|
805
805
|
case "OKP":
|
|
806
|
-
return
|
|
806
|
+
return $t({ ...e, alg: t });
|
|
807
807
|
default:
|
|
808
808
|
throw new W('Unsupported "kty" (Key Type) Parameter value');
|
|
809
809
|
}
|
|
@@ -817,32 +817,32 @@ const ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Qe = (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
|
+
}, Yr = (e, t, r, a) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
822
|
if (a && pe(t)) {
|
|
823
|
-
if (
|
|
823
|
+
if (Mr(t) && Qe(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
|
-
if (
|
|
828
|
-
throw new TypeError(
|
|
827
|
+
if (!Lt(t))
|
|
828
|
+
throw new TypeError(Dt(e, t, ...xe, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
830
|
throw new TypeError(`${ue(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
|
-
},
|
|
832
|
+
}, Fr = (e, t, r, a) => {
|
|
833
833
|
if (a && pe(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
|
-
if (
|
|
836
|
+
if (Lr(t) && Qe(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 ($r(t) && Qe(e, t, r))
|
|
841
841
|
return;
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
843
|
}
|
|
844
|
-
if (
|
|
845
|
-
throw new TypeError(
|
|
844
|
+
if (!Lt(t))
|
|
845
|
+
throw new TypeError(Dt(e, t, ...xe, a ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
847
|
throw new TypeError(`${ue(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
@@ -854,12 +854,12 @@ const ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Qe = (e, t, r) =>
|
|
|
854
854
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
855
855
|
throw new TypeError(`${ue(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
856
|
};
|
|
857
|
-
function
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
857
|
+
function Kt(e, t, r, a) {
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Yr(t, r, a, e) : Fr(t, r, a, e);
|
|
859
859
|
}
|
|
860
|
-
|
|
861
|
-
const lt =
|
|
862
|
-
function
|
|
860
|
+
Kt.bind(void 0, !1);
|
|
861
|
+
const lt = Kt.bind(void 0, !0);
|
|
862
|
+
function jr(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)
|
|
@@ -878,13 +878,13 @@ function zr(e, t, r, a, n) {
|
|
|
878
878
|
}
|
|
879
879
|
return new Set(a.crit);
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const zr = (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 qr(e, t) {
|
|
888
888
|
const r = `SHA-${e.slice(-3)}`;
|
|
889
889
|
switch (e) {
|
|
890
890
|
case "HS256":
|
|
@@ -909,9 +909,9 @@ function Xr(e, t) {
|
|
|
909
909
|
throw new W(`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 Xr(e, t, r) {
|
|
913
|
+
if (t = await Wr.normalizePublicKey(t, e), xt(t))
|
|
914
|
+
return Cr(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
917
|
throw new TypeError(it(t, ...xe));
|
|
@@ -919,17 +919,17 @@ async function Qr(e, t, r) {
|
|
|
919
919
|
}
|
|
920
920
|
throw new TypeError(it(t, ...xe, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
const n = await
|
|
924
|
-
|
|
925
|
-
const o =
|
|
922
|
+
const Qr = async (e, t, r, a) => {
|
|
923
|
+
const n = await Xr(e, t, "verify");
|
|
924
|
+
Dr(e, n);
|
|
925
|
+
const o = qr(e, n.algorithm);
|
|
926
926
|
try {
|
|
927
927
|
return await Me.subtle.verify(o, n, r, a);
|
|
928
928
|
} catch {
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
|
-
async function
|
|
932
|
+
async function Zr(e, t, r) {
|
|
933
933
|
if (!he(e))
|
|
934
934
|
throw new _("Flattened JWS must be an object");
|
|
935
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -950,37 +950,37 @@ async function ea(e, t, r) {
|
|
|
950
950
|
} catch {
|
|
951
951
|
throw new _("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
|
-
if (!
|
|
953
|
+
if (!Or(a, e.header))
|
|
954
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 = jr(_, /* @__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
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
964
|
throw new _('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
-
const d =
|
|
965
|
+
const d = zr("algorithms", r.algorithms);
|
|
966
966
|
if (d && !d.has(i))
|
|
967
|
-
throw new
|
|
967
|
+
throw new Ct('"alg" (Algorithm) Header Parameter value not allowed');
|
|
968
968
|
if (s) {
|
|
969
969
|
if (typeof e.payload != "string")
|
|
970
970
|
throw new _("JWS Payload must be a string");
|
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
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, lt(i, t, "verify"), pe(t) && (t = await
|
|
975
|
-
const f =
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), h = !0, lt(i, t, "verify"), pe(t) && (t = await Gr(t, i))) : lt(i, t, "verify");
|
|
975
|
+
const f = wr(Ee.encode(e.protected ?? ""), Ee.encode("."), typeof e.payload == "string" ? Ee.encode(e.payload) : e.payload);
|
|
976
976
|
let u;
|
|
977
977
|
try {
|
|
978
978
|
u = te(e.signature);
|
|
979
979
|
} catch {
|
|
980
980
|
throw new _("Failed to base64url decode the signature");
|
|
981
981
|
}
|
|
982
|
-
if (!await
|
|
983
|
-
throw new
|
|
982
|
+
if (!await Qr(i, t, u, f))
|
|
983
|
+
throw new Ot();
|
|
984
984
|
let c;
|
|
985
985
|
if (s)
|
|
986
986
|
try {
|
|
@@ -992,17 +992,17 @@ async function ea(e, t, r) {
|
|
|
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 ea(e, t, r) {
|
|
996
996
|
if (e instanceof Uint8Array && (e = ye.decode(e)), typeof e != "string")
|
|
997
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
1000
|
throw new _("Invalid Compact JWS");
|
|
1001
|
-
const i = await
|
|
1001
|
+
const i = await Zr({ 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 ta = (e) => Math.floor(e.getTime() / 1e3), Ht = 60, Wt = Ht * 60, rt = Wt * 24, ra = rt * 7, aa = rt * 365.25, na = /^(\+|\-)? ?(\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 = na.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();
|
|
@@ -1020,14 +1020,14 @@ const ra = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Bt = Wt * 60, rt = Bt
|
|
|
1020
1020
|
case "min":
|
|
1021
1021
|
case "mins":
|
|
1022
1022
|
case "m":
|
|
1023
|
-
n = Math.round(r *
|
|
1023
|
+
n = Math.round(r * Ht);
|
|
1024
1024
|
break;
|
|
1025
1025
|
case "hour":
|
|
1026
1026
|
case "hours":
|
|
1027
1027
|
case "hr":
|
|
1028
1028
|
case "hrs":
|
|
1029
1029
|
case "h":
|
|
1030
|
-
n = Math.round(r *
|
|
1030
|
+
n = Math.round(r * Wt);
|
|
1031
1031
|
break;
|
|
1032
1032
|
case "day":
|
|
1033
1033
|
case "days":
|
|
@@ -1037,14 +1037,14 @@ const ra = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Bt = Wt * 60, rt = Bt
|
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
1039
1039
|
case "w":
|
|
1040
|
-
n = Math.round(r *
|
|
1040
|
+
n = Math.round(r * ra);
|
|
1041
1041
|
break;
|
|
1042
1042
|
default:
|
|
1043
|
-
n = Math.round(r *
|
|
1043
|
+
n = Math.round(r * aa);
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1047
|
-
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
1047
|
+
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""), oa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, sa = (e, t, r = {}) => {
|
|
1048
1048
|
let a;
|
|
1049
1049
|
try {
|
|
1050
1050
|
a = JSON.parse(ye.decode(t));
|
|
@@ -1064,7 +1064,7 @@ const ra = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Bt = Wt * 60, rt = Bt
|
|
|
1064
1064
|
throw new H('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1065
1065
|
if (i && a.sub !== i)
|
|
1066
1066
|
throw new H('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
-
if (d && !
|
|
1067
|
+
if (d && !oa(a.aud, typeof d == "string" ? [d] : d))
|
|
1068
1068
|
throw new H('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1069
1069
|
let u;
|
|
1070
1070
|
switch (typeof r.clockTolerance) {
|
|
@@ -1080,7 +1080,7 @@ const ra = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Bt = Wt * 60, rt = Bt
|
|
|
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 = ta(c || /* @__PURE__ */ new Date());
|
|
1084
1084
|
if ((a.iat !== void 0 || h) && typeof a.iat != "number")
|
|
1085
1085
|
throw new H('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
1086
|
if (a.nbf !== void 0) {
|
|
@@ -1104,16 +1104,16 @@ const ra = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Bt = Wt * 60, rt = Bt
|
|
|
1104
1104
|
}
|
|
1105
1105
|
return a;
|
|
1106
1106
|
};
|
|
1107
|
-
async function
|
|
1107
|
+
async function ia(e, t, r) {
|
|
1108
1108
|
var a;
|
|
1109
|
-
const n = await
|
|
1109
|
+
const n = await ea(e, t, r);
|
|
1110
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
1111
|
throw new J("JWTs MUST NOT use unencoded payload");
|
|
1112
|
-
const o = { payload:
|
|
1112
|
+
const o = { payload: sa(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 ca = te;
|
|
1116
|
+
function la(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
1118
|
throw new J("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 da(e) {
|
|
|
1125
1125
|
throw new J("JWTs must contain a payload");
|
|
1126
1126
|
let a;
|
|
1127
1127
|
try {
|
|
1128
|
-
a =
|
|
1128
|
+
a = ca(t);
|
|
1129
1129
|
} catch {
|
|
1130
1130
|
throw new J("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
@@ -1141,81 +1141,81 @@ function da(e) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
const ge = async (e) => {
|
|
1143
1143
|
try {
|
|
1144
|
-
const t = N.ALG, r = await
|
|
1145
|
-
return await
|
|
1144
|
+
const t = N.ALG, r = await Jr(Er, t);
|
|
1145
|
+
return await ia(e, r, {
|
|
1146
1146
|
issuer: N.ISSUER
|
|
1147
1147
|
});
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, da = (e) => {
|
|
1152
1152
|
try {
|
|
1153
|
-
return
|
|
1153
|
+
return la(e);
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
}, A = [];
|
|
1158
1158
|
for (let e = 0; e < 256; ++e)
|
|
1159
1159
|
A.push((e + 256).toString(16).slice(1));
|
|
1160
|
-
function
|
|
1160
|
+
function ua(e, t = 0) {
|
|
1161
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
1162
|
}
|
|
1163
1163
|
let Je;
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1164
|
+
const ma = new Uint8Array(16);
|
|
1165
|
+
function ha() {
|
|
1166
1166
|
if (!Je) {
|
|
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
|
Je = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return Je(
|
|
1171
|
+
return Je(ma);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1173
|
+
const pa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: pa };
|
|
1174
1174
|
function ht(e, t, r) {
|
|
1175
1175
|
if (mt.randomUUID && !e)
|
|
1176
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 || ha)();
|
|
1179
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ua(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const pt = globalThis.crypto,
|
|
1181
|
+
const pt = globalThis.crypto, fa = (e) => `${ht()}${ht()}`.slice(0, e), ga = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
|
-
async function
|
|
1184
|
+
async function ya(e) {
|
|
1185
1185
|
if (!pt.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
1189
|
const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
|
|
1190
|
-
return
|
|
1190
|
+
return ga(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
|
-
async function
|
|
1193
|
-
const t =
|
|
1192
|
+
async function ba(e) {
|
|
1193
|
+
const t = fa(43), r = await ya(t);
|
|
1194
1194
|
return {
|
|
1195
1195
|
code_verifier: t,
|
|
1196
1196
|
code_challenge: r
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Bt(e, t) {
|
|
1200
1200
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1201
1201
|
}
|
|
1202
1202
|
const ft = (e, t) => {
|
|
1203
1203
|
const r = JSON.stringify(
|
|
1204
1204
|
typeof t == "function" ? t() : t
|
|
1205
1205
|
);
|
|
1206
|
-
window.localStorage.setItem(e, r),
|
|
1207
|
-
},
|
|
1208
|
-
window.localStorage.removeItem(e),
|
|
1209
|
-
}, gt = (e) => window.localStorage.getItem(e),
|
|
1206
|
+
window.localStorage.setItem(e, r), Bt(e, r);
|
|
1207
|
+
}, Ea = (e) => {
|
|
1208
|
+
window.localStorage.removeItem(e), Bt(e, null);
|
|
1209
|
+
}, gt = (e) => window.localStorage.getItem(e), wa = (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 = ir(wa, () => 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 ? Ea(e) : ft(e, i);
|
|
1219
1219
|
} catch (i) {
|
|
1220
1220
|
console.warn(i);
|
|
1221
1221
|
}
|
|
@@ -1237,33 +1237,28 @@ function Te({
|
|
|
1237
1237
|
const R = [];
|
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
|
1239
1239
|
R.push((e + 256).toString(16).slice(1));
|
|
1240
|
-
function
|
|
1240
|
+
function Ta(e, t = 0) {
|
|
1241
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
1242
|
}
|
|
1243
1243
|
let Ge;
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1244
|
+
const Ia = new Uint8Array(16);
|
|
1245
|
+
function Sa() {
|
|
1246
1246
|
if (!Ge) {
|
|
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
|
Ge = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return Ge(
|
|
1251
|
+
return Ge(Ia);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1253
|
+
const _a = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: _a };
|
|
1254
1254
|
function Ye(e, t, r) {
|
|
1255
1255
|
if (yt.randomUUID && !e)
|
|
1256
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 || Sa)();
|
|
1259
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ta(a);
|
|
1260
1260
|
}
|
|
1261
|
-
const ie = "Your session has expired. For your security, please log in again to continue.",
|
|
1262
|
-
var It;
|
|
1263
|
-
const Oe = {
|
|
1264
|
-
dev: ((It = process == null ? void 0 : process.env) == null ? void 0 : It.PUBLIC_AUTH_SERVER_URL) || "https://auth.gizmette.local.com:3003",
|
|
1265
|
-
prod: "https://mylogin.gizmette.com/auth"
|
|
1266
|
-
}, Ie = "@@auth@@", fe = "LOADING", ke = "LOGIN", Jt = "LOGOUT", be = "success", F = "failure", Gt = "include", Yt = "POST", Ft = "application/json", Se = {
|
|
1261
|
+
const ie = "Your session has expired. For your security, please log in again to continue.", ka = "Your session has been successfully terminated.", Fe = "Login failed. Please try again.", Aa = "Error getting access token, please re-authenticate.", Ra = "You forgot to wrap your component in <AuthProvider>.", Ie = "@@auth@@", fe = "LOADING", ke = "LOGIN", Vt = "LOGOUT", be = "success", F = "failure", Jt = "include", Gt = "POST", Yt = "application/json", Se = {
|
|
1267
1262
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1268
1263
|
$clientId: String!,
|
|
1269
1264
|
$username: String!,
|
|
@@ -1369,14 +1364,14 @@ const Oe = {
|
|
|
1369
1364
|
}) => {
|
|
1370
1365
|
try {
|
|
1371
1366
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1372
|
-
|
|
1367
|
+
Ft ? `${Oe.dev}/graphql` : `${Oe.prod}/graphql`,
|
|
1373
1368
|
{
|
|
1374
|
-
credentials:
|
|
1375
|
-
method:
|
|
1369
|
+
credentials: Jt,
|
|
1370
|
+
method: Gt,
|
|
1376
1371
|
headers: {
|
|
1377
1372
|
authorization: n,
|
|
1378
|
-
"Content-Type":
|
|
1379
|
-
[
|
|
1373
|
+
"Content-Type": Yt,
|
|
1374
|
+
[vt.CLIENT_ID]: `${r}`
|
|
1380
1375
|
},
|
|
1381
1376
|
body: JSON.stringify({
|
|
1382
1377
|
query: t.schema,
|
|
@@ -1401,13 +1396,13 @@ const Oe = {
|
|
|
1401
1396
|
}) => {
|
|
1402
1397
|
try {
|
|
1403
1398
|
const a = await fetch(
|
|
1404
|
-
|
|
1399
|
+
Ft ? `${Oe.dev}/${e}` : `${Oe.prod}/${e}`,
|
|
1405
1400
|
{
|
|
1406
|
-
credentials:
|
|
1407
|
-
method:
|
|
1401
|
+
credentials: Jt,
|
|
1402
|
+
method: Gt,
|
|
1408
1403
|
headers: {
|
|
1409
|
-
"Content-Type":
|
|
1410
|
-
[
|
|
1404
|
+
"Content-Type": Yt,
|
|
1405
|
+
[vt.CLIENT_ID]: `${t}`
|
|
1411
1406
|
},
|
|
1412
1407
|
body: JSON.stringify(r)
|
|
1413
1408
|
}
|
|
@@ -1422,21 +1417,24 @@ const Oe = {
|
|
|
1422
1417
|
} catch (a) {
|
|
1423
1418
|
return console.error(a), { status: F, data: [] };
|
|
1424
1419
|
}
|
|
1425
|
-
},
|
|
1420
|
+
}, Na = process.env.NODE_ENV === "production", Ft = !Na, Oe = {
|
|
1421
|
+
dev: process.env.PUBLIC_AUTH_SERVER_URL || "https://auth.gizmette.local.com:3003",
|
|
1422
|
+
prod: "https://mylogin.gizmette.com/auth"
|
|
1423
|
+
}, jt = {
|
|
1426
1424
|
isLoading: !0,
|
|
1427
1425
|
isAuthenticated: !1,
|
|
1428
1426
|
user: void 0,
|
|
1429
1427
|
logoutReason: "",
|
|
1430
1428
|
debug: !1,
|
|
1431
1429
|
authenticationType: ""
|
|
1432
|
-
},
|
|
1430
|
+
}, va = (e) => {
|
|
1433
1431
|
try {
|
|
1434
|
-
const t =
|
|
1432
|
+
const t = da(e);
|
|
1435
1433
|
return t ? t[N.USER_ID_KEY] : "";
|
|
1436
1434
|
} catch {
|
|
1437
1435
|
return "";
|
|
1438
1436
|
}
|
|
1439
|
-
},
|
|
1437
|
+
}, xa = async ({
|
|
1440
1438
|
userId: e,
|
|
1441
1439
|
clientId: t,
|
|
1442
1440
|
domain: r,
|
|
@@ -1460,7 +1458,7 @@ const Oe = {
|
|
|
1460
1458
|
status: F
|
|
1461
1459
|
};
|
|
1462
1460
|
}
|
|
1463
|
-
},
|
|
1461
|
+
}, Ca = async ({
|
|
1464
1462
|
username: e,
|
|
1465
1463
|
password: t,
|
|
1466
1464
|
clientId: r,
|
|
@@ -1504,7 +1502,7 @@ const Oe = {
|
|
|
1504
1502
|
status: !1
|
|
1505
1503
|
};
|
|
1506
1504
|
}
|
|
1507
|
-
},
|
|
1505
|
+
}, Oa = async ({
|
|
1508
1506
|
nonce: e,
|
|
1509
1507
|
clientId: t,
|
|
1510
1508
|
code_challenge: r
|
|
@@ -1533,7 +1531,7 @@ const Oe = {
|
|
|
1533
1531
|
data: ""
|
|
1534
1532
|
};
|
|
1535
1533
|
}
|
|
1536
|
-
},
|
|
1534
|
+
}, Pa = async ({
|
|
1537
1535
|
clientId: e,
|
|
1538
1536
|
userId: t,
|
|
1539
1537
|
nonce: r,
|
|
@@ -1569,7 +1567,7 @@ const Oe = {
|
|
|
1569
1567
|
};
|
|
1570
1568
|
}
|
|
1571
1569
|
};
|
|
1572
|
-
class
|
|
1570
|
+
class Da {
|
|
1573
1571
|
constructor(t = null, r = null) {
|
|
1574
1572
|
We(this, "refreshTokenPromise", null), We(this, "accessToken"), We(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1575
1573
|
}
|
|
@@ -1599,7 +1597,7 @@ class La {
|
|
|
1599
1597
|
}) {
|
|
1600
1598
|
const o = await ge(this.refreshToken);
|
|
1601
1599
|
if (o && o.payload[N.USER_ID_KEY] !== "") {
|
|
1602
|
-
const s = await
|
|
1600
|
+
const s = await Pa({
|
|
1603
1601
|
clientId: t,
|
|
1604
1602
|
userId: r,
|
|
1605
1603
|
nonce: a,
|
|
@@ -1620,14 +1618,14 @@ class La {
|
|
|
1620
1618
|
};
|
|
1621
1619
|
}
|
|
1622
1620
|
}
|
|
1623
|
-
const
|
|
1621
|
+
const La = (e) => q(
|
|
1624
1622
|
(...t) => {
|
|
1625
1623
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1626
1624
|
},
|
|
1627
1625
|
[e]
|
|
1628
1626
|
), de = () => {
|
|
1629
|
-
throw new Error(
|
|
1630
|
-
},
|
|
1627
|
+
throw new Error(Ra);
|
|
1628
|
+
}, zt = sr({
|
|
1631
1629
|
isAuthenticated: !1,
|
|
1632
1630
|
isLoading: !1,
|
|
1633
1631
|
login: de,
|
|
@@ -1638,11 +1636,11 @@ const $a = (e) => q(
|
|
|
1638
1636
|
loginWithPasskey: de,
|
|
1639
1637
|
logoutReason: "",
|
|
1640
1638
|
authenticationType: ""
|
|
1641
|
-
}),
|
|
1642
|
-
state:
|
|
1639
|
+
}), $a = X.createContext({
|
|
1640
|
+
state: jt,
|
|
1643
1641
|
dispatch: () => {
|
|
1644
1642
|
}
|
|
1645
|
-
}),
|
|
1643
|
+
}), Ma = (e, t) => (t == null ? void 0 : t.type) === fe ? {
|
|
1646
1644
|
...e,
|
|
1647
1645
|
isLoading: t.payload.isLoading
|
|
1648
1646
|
} : (t == null ? void 0 : t.type) === ke ? {
|
|
@@ -1652,24 +1650,24 @@ const $a = (e) => q(
|
|
|
1652
1650
|
user: t.payload.user,
|
|
1653
1651
|
authenticationType: t.payload.authenticationType,
|
|
1654
1652
|
logoutReason: ""
|
|
1655
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1653
|
+
} : (t == null ? void 0 : t.type) === Vt ? {
|
|
1656
1654
|
...e,
|
|
1657
1655
|
isLoading: !1,
|
|
1658
1656
|
isAuthenticated: !1,
|
|
1659
1657
|
user: void 0,
|
|
1660
1658
|
authenticationType: "",
|
|
1661
1659
|
logoutReason: t.payload.logoutReason
|
|
1662
|
-
} : e,
|
|
1660
|
+
} : e, Ua = ({
|
|
1663
1661
|
children: e,
|
|
1664
1662
|
sessionExpiration: t,
|
|
1665
1663
|
clientId: r,
|
|
1666
1664
|
domain: a = "",
|
|
1667
1665
|
debug: n = !1
|
|
1668
1666
|
}) => {
|
|
1669
|
-
const [o, s] =
|
|
1670
|
-
...
|
|
1667
|
+
const [o, s] = It(Ma, {
|
|
1668
|
+
...jt,
|
|
1671
1669
|
debug: n
|
|
1672
|
-
}), i =
|
|
1670
|
+
}), i = La(n), d = x(!1), [h, f, , u] = Te({
|
|
1673
1671
|
key: `${Ie}::${r}::@@user@@`
|
|
1674
1672
|
}), [c, m, , y] = Te({
|
|
1675
1673
|
key: `${Ie}::${r}::@@access@@`
|
|
@@ -1679,7 +1677,7 @@ const $a = (e) => q(
|
|
|
1679
1677
|
}
|
|
1680
1678
|
), [Q, L, , Z] = Te({
|
|
1681
1679
|
key: `${Ie}::${r}::@@nonce@@`
|
|
1682
|
-
}), $ = new
|
|
1680
|
+
}), $ = new Da(c, w), B = q(() => {
|
|
1683
1681
|
i("removeLocalStorage: removing local storage"), u(), y(), k(), Z();
|
|
1684
1682
|
}, [
|
|
1685
1683
|
y,
|
|
@@ -1693,7 +1691,7 @@ const $a = (e) => q(
|
|
|
1693
1691
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1694
1692
|
g
|
|
1695
1693
|
), s({
|
|
1696
|
-
type:
|
|
1694
|
+
type: Vt,
|
|
1697
1695
|
payload: {
|
|
1698
1696
|
logoutReason: g || ie
|
|
1699
1697
|
}
|
|
@@ -1703,10 +1701,10 @@ const $a = (e) => q(
|
|
|
1703
1701
|
), S = q(
|
|
1704
1702
|
async (g) => {
|
|
1705
1703
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1706
|
-
const { user: E } = o, b = (E == null ? void 0 : E.userId) ||
|
|
1704
|
+
const { user: E } = o, b = (E == null ? void 0 : E.userId) || va(h);
|
|
1707
1705
|
b || i(
|
|
1708
1706
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1709
|
-
), await
|
|
1707
|
+
), await xa({
|
|
1710
1708
|
userId: b,
|
|
1711
1709
|
clientId: r,
|
|
1712
1710
|
domain: a,
|
|
@@ -1744,13 +1742,13 @@ const $a = (e) => q(
|
|
|
1744
1742
|
s({ type: fe, payload: { isLoading: !0 } }), B();
|
|
1745
1743
|
const b = Ye();
|
|
1746
1744
|
L(b), i("login: Logging in with password");
|
|
1747
|
-
const { code_verifier: ae, code_challenge:
|
|
1745
|
+
const { code_verifier: ae, code_challenge: or } = await ba(), st = await Oa({
|
|
1748
1746
|
nonce: b,
|
|
1749
1747
|
clientId: r,
|
|
1750
|
-
code_challenge:
|
|
1748
|
+
code_challenge: or
|
|
1751
1749
|
});
|
|
1752
1750
|
if (st.status) {
|
|
1753
|
-
const ne = await
|
|
1751
|
+
const ne = await Ca({
|
|
1754
1752
|
username: g,
|
|
1755
1753
|
password: E,
|
|
1756
1754
|
clientId: r,
|
|
@@ -1776,7 +1774,7 @@ const $a = (e) => q(
|
|
|
1776
1774
|
}
|
|
1777
1775
|
return !1;
|
|
1778
1776
|
}, K = async (g) => {
|
|
1779
|
-
g == null || g.preventDefault(), await S(
|
|
1777
|
+
g == null || g.preventDefault(), await S(ka);
|
|
1780
1778
|
}, I = async () => {
|
|
1781
1779
|
const { isAuthenticated: g, user: E } = o;
|
|
1782
1780
|
try {
|
|
@@ -1804,7 +1802,7 @@ const $a = (e) => q(
|
|
|
1804
1802
|
} catch {
|
|
1805
1803
|
return i(
|
|
1806
1804
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1807
|
-
), await S(
|
|
1805
|
+
), await S(Aa), "";
|
|
1808
1806
|
}
|
|
1809
1807
|
}, C = () => o.isAuthenticated && h ? h : "", O = async () => {
|
|
1810
1808
|
const { user: g } = o;
|
|
@@ -1820,7 +1818,7 @@ const $a = (e) => q(
|
|
|
1820
1818
|
});
|
|
1821
1819
|
if (E.status)
|
|
1822
1820
|
try {
|
|
1823
|
-
const b = await
|
|
1821
|
+
const b = await fr(E.data);
|
|
1824
1822
|
return E = await le({
|
|
1825
1823
|
accessToken: c,
|
|
1826
1824
|
clientId: r,
|
|
@@ -1862,7 +1860,7 @@ const $a = (e) => q(
|
|
|
1862
1860
|
});
|
|
1863
1861
|
if (b.status)
|
|
1864
1862
|
try {
|
|
1865
|
-
const ae = await
|
|
1863
|
+
const ae = await br(b.data);
|
|
1866
1864
|
return b = await le({
|
|
1867
1865
|
accessToken: c,
|
|
1868
1866
|
clientId: r,
|
|
@@ -1904,8 +1902,8 @@ const $a = (e) => q(
|
|
|
1904
1902
|
}
|
|
1905
1903
|
return !1;
|
|
1906
1904
|
};
|
|
1907
|
-
return /* @__PURE__ */ l(
|
|
1908
|
-
|
|
1905
|
+
return /* @__PURE__ */ l($a.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1906
|
+
zt.Provider,
|
|
1909
1907
|
{
|
|
1910
1908
|
value: {
|
|
1911
1909
|
...o,
|
|
@@ -1919,8 +1917,8 @@ const $a = (e) => q(
|
|
|
1919
1917
|
children: e
|
|
1920
1918
|
}
|
|
1921
1919
|
) });
|
|
1922
|
-
},
|
|
1923
|
-
function
|
|
1920
|
+
}, qt = (e = zt) => St(e), wo = "user", To = "assistant", Io = "system", So = "internal", _o = "hidden", ko = "I'm having trouble right now. Please try again later.", Ao = "OpenAI", Ro = "OpenAI", No = "Anthropic", vo = "action-search", xo = "action-sort", Co = "action-toggle-prompt", Oo = "action-reset-prompt", Po = "sassy-saint-", Do = "details", Lo = "search", $o = "sort", Mo = "private-disclosure", Uo = "==stats==", Ka = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ko = 10, Ho = 30, Wo = "av-prompt", Bo = "av-prompt-editable", Vo = "size-5 sm:size-4", bt = (e) => Number.isFinite(e) ? e : 0;
|
|
1921
|
+
function Ha(e) {
|
|
1924
1922
|
return {
|
|
1925
1923
|
days: Math.trunc(e / 864e5),
|
|
1926
1924
|
hours: Math.trunc(e / 36e5 % 24),
|
|
@@ -1931,7 +1929,7 @@ function Wa(e) {
|
|
|
1931
1929
|
nanoseconds: Math.trunc(bt(e * 1e6) % 1e3)
|
|
1932
1930
|
};
|
|
1933
1931
|
}
|
|
1934
|
-
function
|
|
1932
|
+
function Wa(e) {
|
|
1935
1933
|
return {
|
|
1936
1934
|
days: e / 86400000n,
|
|
1937
1935
|
hours: e / 3600000n % 24n,
|
|
@@ -1942,20 +1940,20 @@ function Ba(e) {
|
|
|
1942
1940
|
nanoseconds: 0n
|
|
1943
1941
|
};
|
|
1944
1942
|
}
|
|
1945
|
-
function
|
|
1943
|
+
function Ba(e) {
|
|
1946
1944
|
switch (typeof e) {
|
|
1947
1945
|
case "number": {
|
|
1948
1946
|
if (Number.isFinite(e))
|
|
1949
|
-
return
|
|
1947
|
+
return Ha(e);
|
|
1950
1948
|
break;
|
|
1951
1949
|
}
|
|
1952
1950
|
case "bigint":
|
|
1953
|
-
return
|
|
1951
|
+
return Wa(e);
|
|
1954
1952
|
}
|
|
1955
1953
|
throw new TypeError("Expected a finite number or bigint");
|
|
1956
1954
|
}
|
|
1957
|
-
const
|
|
1958
|
-
function
|
|
1955
|
+
const Va = (e) => e === 0 || e === 0n, Ja = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ga = 1e-7, Ya = 24n * 60n * 60n * 1000n;
|
|
1956
|
+
function Fa(e, t) {
|
|
1959
1957
|
const r = typeof e == "bigint";
|
|
1960
1958
|
if (!r && !Number.isFinite(e))
|
|
1961
1959
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1964,18 +1962,18 @@ function ja(e, t) {
|
|
|
1964
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);
|
|
1965
1963
|
let n = [];
|
|
1966
1964
|
const o = (f, u) => {
|
|
1967
|
-
const c = Math.floor(f * 10 ** u +
|
|
1965
|
+
const c = Math.floor(f * 10 ** u + Ga);
|
|
1968
1966
|
return (Math.round(c) / 10 ** u).toFixed(u);
|
|
1969
1967
|
}, s = (f, u, c, m) => {
|
|
1970
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1968
|
+
if (!((n.length === 0 || !t.colonNotation) && Va(f) && !(t.colonNotation && c === "m"))) {
|
|
1971
1969
|
if (m ?? (m = String(f)), t.colonNotation) {
|
|
1972
1970
|
const y = m.includes(".") ? m.split(".")[0].length : m.length, w = n.length > 0 ? 2 : 1;
|
|
1973
1971
|
m = "0".repeat(Math.max(0, w - y)) + m;
|
|
1974
1972
|
} else
|
|
1975
|
-
m += t.verbose ? " " +
|
|
1973
|
+
m += t.verbose ? " " + Ja(u, f) : c;
|
|
1976
1974
|
n.push(m);
|
|
1977
1975
|
}
|
|
1978
|
-
}, i =
|
|
1976
|
+
}, i = Ba(e), d = BigInt(i.days);
|
|
1979
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)
|
|
1980
1978
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1981
1979
|
const f = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), m = Number(i.nanoseconds);
|
|
@@ -1991,7 +1989,7 @@ function ja(e, t) {
|
|
|
1991
1989
|
);
|
|
1992
1990
|
}
|
|
1993
1991
|
} else {
|
|
1994
|
-
const f = (r ? Number(e %
|
|
1992
|
+
const f = (r ? Number(e % Ya) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(f, u), m = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1995
1993
|
s(Number.parseFloat(m), "second", "s", m);
|
|
1996
1994
|
}
|
|
1997
1995
|
if (n.length === 0)
|
|
@@ -1999,7 +1997,7 @@ function ja(e, t) {
|
|
|
1999
1997
|
const h = t.colonNotation ? ":" : " ";
|
|
2000
1998
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
|
|
2001
1999
|
}
|
|
2002
|
-
const
|
|
2000
|
+
const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.local.com" : "gizmette.com", Jo = async () => {
|
|
2003
2001
|
const e = {
|
|
2004
2002
|
/**
|
|
2005
2003
|
* A boolean value that indicates the application would
|
|
@@ -2048,35 +2046,35 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2048
2046
|
e
|
|
2049
2047
|
);
|
|
2050
2048
|
});
|
|
2051
|
-
},
|
|
2049
|
+
}, Go = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ D("div", { className: "flex items-center justify-between", children: [
|
|
2052
2050
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2053
2051
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2054
|
-
] }) }, `${e}-${r}`)) : null,
|
|
2052
|
+
] }) }, `${e}-${r}`)) : null, Yo = new Intl.NumberFormat("en", {
|
|
2055
2053
|
style: "decimal",
|
|
2056
2054
|
signDisplay: "never",
|
|
2057
2055
|
minimumFractionDigits: 0,
|
|
2058
2056
|
maximumFractionDigits: 0
|
|
2059
|
-
}),
|
|
2057
|
+
}), Fo = (e) => e > 0 ? Fa(e, {
|
|
2060
2058
|
secondsDecimalDigits: 2,
|
|
2061
2059
|
unitCount: 2
|
|
2062
|
-
}) : "N/A",
|
|
2060
|
+
}) : "N/A", Xa = ({
|
|
2063
2061
|
isAuthenticated: e,
|
|
2064
2062
|
extraClass: t
|
|
2065
2063
|
}) => p(
|
|
2066
2064
|
"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",
|
|
2067
2065
|
e ? "pt-0" : "pt-10",
|
|
2068
2066
|
t
|
|
2069
|
-
),
|
|
2067
|
+
), Qa = ({
|
|
2070
2068
|
extraClass: e
|
|
2071
|
-
}) => p("px-2 sm:px-0", e),
|
|
2069
|
+
}) => p("px-2 sm:px-0", e), jo = (e, t) => t === 1 ? e : `${e}s`, zo = (e, t) => {
|
|
2072
2070
|
let r;
|
|
2073
2071
|
return (...a) => {
|
|
2074
2072
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2075
2073
|
};
|
|
2076
|
-
},
|
|
2077
|
-
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r =
|
|
2074
|
+
}, Za = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), en = () => window.innerWidth < 403, qo = () => {
|
|
2075
|
+
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = en(), a = navigator.maxTouchPoints > 1;
|
|
2078
2076
|
return e && t && r && a;
|
|
2079
|
-
}, Et = "av-button", Ke = "icon", at = "button", Ze = "link",
|
|
2077
|
+
}, Et = "av-button", Ke = "icon", at = "button", Ze = "link", tn = ({
|
|
2080
2078
|
type: e,
|
|
2081
2079
|
size: t,
|
|
2082
2080
|
labelRight: r,
|
|
@@ -2112,7 +2110,7 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2112
2110
|
"h-12": t === "large" && o && (r || a)
|
|
2113
2111
|
});
|
|
2114
2112
|
}
|
|
2115
|
-
},
|
|
2113
|
+
}, rn = ({
|
|
2116
2114
|
type: e,
|
|
2117
2115
|
size: t,
|
|
2118
2116
|
labelRight: r,
|
|
@@ -2135,7 +2133,7 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2135
2133
|
[s]: t === "large" && (r || a)
|
|
2136
2134
|
});
|
|
2137
2135
|
}
|
|
2138
|
-
},
|
|
2136
|
+
}, an = ({
|
|
2139
2137
|
mode: e,
|
|
2140
2138
|
noBackground: t,
|
|
2141
2139
|
noTruncate: r,
|
|
@@ -2171,7 +2169,7 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2171
2169
|
return p("not-prose text-copy-lighter", {
|
|
2172
2170
|
truncate: !r
|
|
2173
2171
|
});
|
|
2174
|
-
},
|
|
2172
|
+
}, nn = ({
|
|
2175
2173
|
mode: e,
|
|
2176
2174
|
noBackground: t,
|
|
2177
2175
|
variant: r
|
|
@@ -2201,13 +2199,13 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2201
2199
|
if (r === "selected")
|
|
2202
2200
|
return "bg-action-selected-dark";
|
|
2203
2201
|
}
|
|
2204
|
-
},
|
|
2202
|
+
}, on = ({
|
|
2205
2203
|
radius: e
|
|
2206
2204
|
}) => p({
|
|
2207
2205
|
"rounded-full": e === "large",
|
|
2208
2206
|
"rounded-md": e === "medium",
|
|
2209
2207
|
"rounded-sm": e === "small"
|
|
2210
|
-
}),
|
|
2208
|
+
}), sn = ({
|
|
2211
2209
|
mode: e,
|
|
2212
2210
|
disabled: t,
|
|
2213
2211
|
variant: r
|
|
@@ -2237,7 +2235,7 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2237
2235
|
});
|
|
2238
2236
|
if (r === "selected")
|
|
2239
2237
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
2240
|
-
},
|
|
2238
|
+
}, cn = ({
|
|
2241
2239
|
mode: e,
|
|
2242
2240
|
disabled: t,
|
|
2243
2241
|
variant: r
|
|
@@ -2267,7 +2265,7 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2267
2265
|
});
|
|
2268
2266
|
if (r === "selected")
|
|
2269
2267
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
2270
|
-
},
|
|
2268
|
+
}, ln = ({
|
|
2271
2269
|
mode: e,
|
|
2272
2270
|
noBorder: t,
|
|
2273
2271
|
variant: r
|
|
@@ -2297,14 +2295,14 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2297
2295
|
});
|
|
2298
2296
|
if (r === "selected")
|
|
2299
2297
|
return "border border-border-selected-dark";
|
|
2300
|
-
},
|
|
2298
|
+
}, dn = ({
|
|
2301
2299
|
focusMode: e
|
|
2302
2300
|
}) => p("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2303
2301
|
"focus:outline-focus-dark": e === "dark",
|
|
2304
2302
|
"focus:outline-focus-light": e === "light",
|
|
2305
2303
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2306
2304
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2307
|
-
}),
|
|
2305
|
+
}), un = ({
|
|
2308
2306
|
mode: e,
|
|
2309
2307
|
raw: t,
|
|
2310
2308
|
iconClassName: r
|
|
@@ -2316,11 +2314,11 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2316
2314
|
"dark:text-copy-accent-dark": e === "system"
|
|
2317
2315
|
},
|
|
2318
2316
|
r
|
|
2319
|
-
),
|
|
2317
|
+
), mn = ({
|
|
2320
2318
|
animated: e
|
|
2321
2319
|
}) => p({
|
|
2322
2320
|
"transition-opacity duration-300 ease-in": e
|
|
2323
|
-
}),
|
|
2321
|
+
}), Xt = ({
|
|
2324
2322
|
type: e,
|
|
2325
2323
|
className: t,
|
|
2326
2324
|
raw: r,
|
|
@@ -2340,15 +2338,15 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2340
2338
|
animated: T
|
|
2341
2339
|
}) => (c || (c = "primary"), r ? p(Et, t) : p(
|
|
2342
2340
|
Et,
|
|
2343
|
-
|
|
2341
|
+
an({
|
|
2344
2342
|
mode: a,
|
|
2345
2343
|
variant: c,
|
|
2346
2344
|
noBackground: u,
|
|
2347
2345
|
noTruncate: m
|
|
2348
2346
|
}),
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2347
|
+
nn({ mode: a, noBackground: u, variant: c }),
|
|
2348
|
+
on({ radius: w }),
|
|
2349
|
+
tn({
|
|
2352
2350
|
type: e,
|
|
2353
2351
|
size: i,
|
|
2354
2352
|
labelRight: h,
|
|
@@ -2356,11 +2354,11 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2356
2354
|
align: y,
|
|
2357
2355
|
animated: T
|
|
2358
2356
|
}),
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2357
|
+
rn({ type: e, size: i, labelRight: h, labelLeft: f }),
|
|
2358
|
+
ln({ mode: a, variant: c, noBorder: d }),
|
|
2359
|
+
dn({ focusMode: n }),
|
|
2360
|
+
sn({ mode: a, variant: c, disabled: o }),
|
|
2362
2361
|
cn({ mode: a, variant: c, disabled: o }),
|
|
2363
|
-
ln({ mode: a, variant: c, disabled: o }),
|
|
2364
2362
|
{
|
|
2365
2363
|
"w-full": s,
|
|
2366
2364
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
@@ -2369,7 +2367,7 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2369
2367
|
"transition-[width] duration-300 ease-in-out": e === Ke && T
|
|
2370
2368
|
}),
|
|
2371
2369
|
t
|
|
2372
|
-
)),
|
|
2370
|
+
)), hn = (e, t, r) => {
|
|
2373
2371
|
var a;
|
|
2374
2372
|
!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);
|
|
2375
2373
|
}, nt = X.forwardRef((e, t) => {
|
|
@@ -2379,14 +2377,14 @@ const za = process.env.NODE_ENV === "production", qa = !za, Xa = qa ? "gizmette.
|
|
|
2379
2377
|
{
|
|
2380
2378
|
ref: t,
|
|
2381
2379
|
onClick: (o) => {
|
|
2382
|
-
|
|
2380
|
+
hn(o, a, r);
|
|
2383
2381
|
},
|
|
2384
2382
|
...n
|
|
2385
2383
|
}
|
|
2386
2384
|
);
|
|
2387
2385
|
});
|
|
2388
2386
|
nt.displayName = "BaseButton";
|
|
2389
|
-
const
|
|
2387
|
+
const Qt = X.forwardRef(
|
|
2390
2388
|
({
|
|
2391
2389
|
children: e,
|
|
2392
2390
|
disabled: t = !1,
|
|
@@ -2402,7 +2400,7 @@ const Zt = X.forwardRef(
|
|
|
2402
2400
|
radius: u = "large",
|
|
2403
2401
|
...c
|
|
2404
2402
|
}, m) => {
|
|
2405
|
-
const y =
|
|
2403
|
+
const y = Xt({
|
|
2406
2404
|
type: at,
|
|
2407
2405
|
mode: r,
|
|
2408
2406
|
focusMode: a,
|
|
@@ -2428,14 +2426,14 @@ const Zt = X.forwardRef(
|
|
|
2428
2426
|
);
|
|
2429
2427
|
}
|
|
2430
2428
|
);
|
|
2431
|
-
|
|
2432
|
-
function
|
|
2429
|
+
Qt.displayName = "Button";
|
|
2430
|
+
function pn() {
|
|
2433
2431
|
const e = x(!1);
|
|
2434
2432
|
return Y(() => (e.current = !0, () => {
|
|
2435
2433
|
e.current = !1;
|
|
2436
2434
|
}), []), q(() => e.current, []);
|
|
2437
2435
|
}
|
|
2438
|
-
function
|
|
2436
|
+
function fn(e) {
|
|
2439
2437
|
return Le(() => e.every((t) => t == null) ? () => {
|
|
2440
2438
|
} : (t) => {
|
|
2441
2439
|
e.forEach((r) => {
|
|
@@ -2443,7 +2441,7 @@ function gn(e) {
|
|
|
2443
2441
|
});
|
|
2444
2442
|
}, e);
|
|
2445
2443
|
}
|
|
2446
|
-
const
|
|
2444
|
+
const gn = {
|
|
2447
2445
|
x: 0,
|
|
2448
2446
|
y: 0,
|
|
2449
2447
|
width: 0,
|
|
@@ -2454,7 +2452,7 @@ const yn = {
|
|
|
2454
2452
|
right: 0
|
|
2455
2453
|
};
|
|
2456
2454
|
function je(e) {
|
|
2457
|
-
const t =
|
|
2455
|
+
const t = pn(), r = x(0), a = x(null), [n, o] = z(gn), s = Le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
2458
2456
|
const d = i[0];
|
|
2459
2457
|
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2460
2458
|
a.current && t() && o(d.contentRect);
|
|
@@ -2464,21 +2462,21 @@ function je(e) {
|
|
|
2464
2462
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2465
2463
|
}), [s, e]), [a, n];
|
|
2466
2464
|
}
|
|
2467
|
-
const
|
|
2465
|
+
const yn = {
|
|
2468
2466
|
small: 24,
|
|
2469
2467
|
// w-6
|
|
2470
2468
|
medium: 32,
|
|
2471
2469
|
// w-8
|
|
2472
2470
|
large: 48
|
|
2473
2471
|
// w-12
|
|
2474
|
-
},
|
|
2472
|
+
}, bn = {
|
|
2475
2473
|
small: 8 * 2,
|
|
2476
2474
|
// px-2 x 2
|
|
2477
2475
|
medium: 12 * 2,
|
|
2478
2476
|
// px-3 x 2
|
|
2479
2477
|
large: 16 * 2
|
|
2480
2478
|
// px-4 x 2
|
|
2481
|
-
},
|
|
2479
|
+
}, En = 2, Pe = X.forwardRef(
|
|
2482
2480
|
({
|
|
2483
2481
|
children: e,
|
|
2484
2482
|
disabled: t = !1,
|
|
@@ -2502,7 +2500,7 @@ const bn = {
|
|
|
2502
2500
|
animated: L = !1,
|
|
2503
2501
|
...Z
|
|
2504
2502
|
}, $) => {
|
|
2505
|
-
const B =
|
|
2503
|
+
const B = Xt({
|
|
2506
2504
|
type: Ke,
|
|
2507
2505
|
mode: r,
|
|
2508
2506
|
focusMode: a,
|
|
@@ -2519,11 +2517,11 @@ const bn = {
|
|
|
2519
2517
|
radius: T,
|
|
2520
2518
|
variant: k,
|
|
2521
2519
|
animated: L
|
|
2522
|
-
}), U =
|
|
2520
|
+
}), U = un({ mode: r, raw: i, iconClassName: Q }), S = mn({ animated: L }), [M, K] = je(), [I, C] = je(), [O, V] = je(), g = x(0), E = x(null), b = fn([$, E]);
|
|
2523
2521
|
return Ne(() => {
|
|
2524
|
-
O && O.current && L && (g.current = V.width +
|
|
2522
|
+
O && O.current && L && (g.current = V.width + bn[u] + (d ? 0 : En));
|
|
2525
2523
|
}, [V, O, u, d, L]), Ne(() => {
|
|
2526
|
-
E && E.current && L && (c && M && K.width > 0 ? (M.current && (M.current.style.opacity = "100"), E.current.style.width = `${K.width + g.current}px`) : m && C.width > 0 ? (I.current && (I.current.style.opacity = "100"), E.current.style.width = `${C.width + g.current}px`) : (M.current && (M.current.style.opacity = "0"), I.current && (I.current.style.opacity = "0"), E.current.style.width = `${
|
|
2524
|
+
E && E.current && L && (c && M && K.width > 0 ? (M.current && (M.current.style.opacity = "100"), E.current.style.width = `${K.width + g.current}px`) : m && C.width > 0 ? (I.current && (I.current.style.opacity = "100"), E.current.style.width = `${C.width + g.current}px`) : (M.current && (M.current.style.opacity = "0"), I.current && (I.current.style.opacity = "0"), E.current.style.width = `${yn[u]}px`));
|
|
2527
2525
|
}, [
|
|
2528
2526
|
K,
|
|
2529
2527
|
c,
|
|
@@ -2586,7 +2584,7 @@ try {
|
|
|
2586
2584
|
});
|
|
2587
2585
|
} catch {
|
|
2588
2586
|
}
|
|
2589
|
-
const
|
|
2587
|
+
const wn = X.forwardRef(
|
|
2590
2588
|
({
|
|
2591
2589
|
children: e,
|
|
2592
2590
|
mode: t = "system",
|
|
@@ -2624,7 +2622,7 @@ const Tn = X.forwardRef(
|
|
|
2624
2622
|
) });
|
|
2625
2623
|
}
|
|
2626
2624
|
);
|
|
2627
|
-
|
|
2625
|
+
wn.displayName = "ButtonSort";
|
|
2628
2626
|
/*!
|
|
2629
2627
|
@versini/ui-card v3.0.13
|
|
2630
2628
|
© 2025 gizmette.com
|
|
@@ -2639,11 +2637,11 @@ try {
|
|
|
2639
2637
|
} catch {
|
|
2640
2638
|
}
|
|
2641
2639
|
const Ae = "av-card";
|
|
2642
|
-
function
|
|
2643
|
-
const t =
|
|
2640
|
+
function Tn(e) {
|
|
2641
|
+
const t = _t();
|
|
2644
2642
|
return `${e}${t}`;
|
|
2645
2643
|
}
|
|
2646
|
-
const
|
|
2644
|
+
const In = ({
|
|
2647
2645
|
className: e,
|
|
2648
2646
|
headerClassName: t,
|
|
2649
2647
|
bodyClassName: r,
|
|
@@ -2683,7 +2681,7 @@ const Sn = ({
|
|
|
2683
2681
|
footer: f
|
|
2684
2682
|
};
|
|
2685
2683
|
};
|
|
2686
|
-
function
|
|
2684
|
+
function Sn({
|
|
2687
2685
|
id: e,
|
|
2688
2686
|
content: t,
|
|
2689
2687
|
userAriaLabelledby: r,
|
|
@@ -2691,7 +2689,7 @@ function _n({
|
|
|
2691
2689
|
}) {
|
|
2692
2690
|
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;
|
|
2693
2691
|
}
|
|
2694
|
-
const
|
|
2692
|
+
const _n = ({
|
|
2695
2693
|
header: e,
|
|
2696
2694
|
headerClassName: t,
|
|
2697
2695
|
footer: r,
|
|
@@ -2706,7 +2704,7 @@ const kn = ({
|
|
|
2706
2704
|
...u
|
|
2707
2705
|
}) => {
|
|
2708
2706
|
let c = null, m = null;
|
|
2709
|
-
const y = typeof e == "string", w =
|
|
2707
|
+
const y = typeof e == "string", w = Tn(Ae), T = In({
|
|
2710
2708
|
className: o,
|
|
2711
2709
|
headerClassName: t,
|
|
2712
2710
|
bodyClassName: s,
|
|
@@ -2725,7 +2723,7 @@ const kn = ({
|
|
|
2725
2723
|
...u,
|
|
2726
2724
|
children: [
|
|
2727
2725
|
/* @__PURE__ */ l(
|
|
2728
|
-
|
|
2726
|
+
Sn,
|
|
2729
2727
|
{
|
|
2730
2728
|
...c && { id: c },
|
|
2731
2729
|
content: e,
|
|
@@ -2781,7 +2779,7 @@ try {
|
|
|
2781
2779
|
});
|
|
2782
2780
|
} catch {
|
|
2783
2781
|
}
|
|
2784
|
-
const
|
|
2782
|
+
const kn = ({
|
|
2785
2783
|
className: e,
|
|
2786
2784
|
viewBox: t,
|
|
2787
2785
|
title: r,
|
|
@@ -2798,7 +2796,7 @@ const An = ({
|
|
|
2798
2796
|
...n,
|
|
2799
2797
|
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" })
|
|
2800
2798
|
}
|
|
2801
|
-
),
|
|
2799
|
+
), An = ({
|
|
2802
2800
|
className: e,
|
|
2803
2801
|
viewBox: t,
|
|
2804
2802
|
title: r,
|
|
@@ -2824,7 +2822,7 @@ const An = ({
|
|
|
2824
2822
|
/* @__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" })
|
|
2825
2823
|
]
|
|
2826
2824
|
}
|
|
2827
|
-
),
|
|
2825
|
+
), Rn = ({
|
|
2828
2826
|
className: e,
|
|
2829
2827
|
viewBox: t,
|
|
2830
2828
|
title: r,
|
|
@@ -2860,7 +2858,7 @@ const An = ({
|
|
|
2860
2858
|
]
|
|
2861
2859
|
}
|
|
2862
2860
|
);
|
|
2863
|
-
},
|
|
2861
|
+
}, Nn = ({
|
|
2864
2862
|
className: e,
|
|
2865
2863
|
viewBox: t,
|
|
2866
2864
|
title: r,
|
|
@@ -2913,7 +2911,7 @@ try {
|
|
|
2913
2911
|
});
|
|
2914
2912
|
} catch {
|
|
2915
2913
|
}
|
|
2916
|
-
const
|
|
2914
|
+
const vn = "av-main", xn = ({
|
|
2917
2915
|
children: e,
|
|
2918
2916
|
className: t,
|
|
2919
2917
|
raw: r = !1,
|
|
@@ -2921,7 +2919,7 @@ const xn = "av-main", Cn = ({
|
|
|
2921
2919
|
noPadding: n = !1
|
|
2922
2920
|
}) => {
|
|
2923
2921
|
const o = p(
|
|
2924
|
-
|
|
2922
|
+
vn,
|
|
2925
2923
|
{
|
|
2926
2924
|
"mt-2 sm:mt-3": !r && !a,
|
|
2927
2925
|
"p-2": !r && !n,
|
|
@@ -2930,10 +2928,10 @@ const xn = "av-main", Cn = ({
|
|
|
2930
2928
|
t
|
|
2931
2929
|
);
|
|
2932
2930
|
return /* @__PURE__ */ l("main", { className: o, children: e });
|
|
2933
|
-
},
|
|
2931
|
+
}, Cn = "av-flexgrid", _e = "av-flexgrid-item", De = 0.25, et = X.createContext({
|
|
2934
2932
|
columnGap: 0,
|
|
2935
2933
|
rowGap: 0
|
|
2936
|
-
}),
|
|
2934
|
+
}), On = ({
|
|
2937
2935
|
children: e,
|
|
2938
2936
|
className: t,
|
|
2939
2937
|
columnGap: r = 1,
|
|
@@ -2959,7 +2957,7 @@ const xn = "av-main", Cn = ({
|
|
|
2959
2957
|
marginLeft: r * -1 * De + "rem",
|
|
2960
2958
|
marginTop: a * -1 * De + "rem"
|
|
2961
2959
|
}, u = p(
|
|
2962
|
-
|
|
2960
|
+
Cn,
|
|
2963
2961
|
"box-border flex flex-wrap"
|
|
2964
2962
|
), c = { columnGap: r, rowGap: a };
|
|
2965
2963
|
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(et.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(et.Provider, { value: c, children: e }) });
|
|
@@ -3036,7 +3034,7 @@ const xn = "av-main", Cn = ({
|
|
|
3036
3034
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3037
3035
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3038
3036
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3039
|
-
}),
|
|
3037
|
+
}), Pn = ({
|
|
3040
3038
|
className: e,
|
|
3041
3039
|
span: t
|
|
3042
3040
|
}) => {
|
|
@@ -3065,10 +3063,10 @@ const xn = "av-main", Cn = ({
|
|
|
3065
3063
|
span: r,
|
|
3066
3064
|
...a
|
|
3067
3065
|
}) => {
|
|
3068
|
-
const { columnGap: n, rowGap: o } =
|
|
3066
|
+
const { columnGap: n, rowGap: o } = St(et), s = {
|
|
3069
3067
|
paddingLeft: n * De + "rem",
|
|
3070
3068
|
paddingTop: o * De + "rem"
|
|
3071
|
-
}, i =
|
|
3069
|
+
}, i = Pn({
|
|
3072
3070
|
className: t,
|
|
3073
3071
|
span: r
|
|
3074
3072
|
});
|
|
@@ -3087,14 +3085,14 @@ try {
|
|
|
3087
3085
|
});
|
|
3088
3086
|
} catch {
|
|
3089
3087
|
}
|
|
3090
|
-
const
|
|
3091
|
-
function
|
|
3088
|
+
const Zt = "av-text-input", Dn = "av-text-input-wrapper", qe = "av-text-input-helper-text";
|
|
3089
|
+
function Ln() {
|
|
3092
3090
|
const e = x(!1);
|
|
3093
3091
|
return Y(() => (e.current = !0, () => {
|
|
3094
3092
|
e.current = !1;
|
|
3095
3093
|
}), []), q(() => e.current, []);
|
|
3096
3094
|
}
|
|
3097
|
-
const
|
|
3095
|
+
const $n = {
|
|
3098
3096
|
x: 0,
|
|
3099
3097
|
y: 0,
|
|
3100
3098
|
width: 0,
|
|
@@ -3104,8 +3102,8 @@ const Mn = {
|
|
|
3104
3102
|
bottom: 0,
|
|
3105
3103
|
right: 0
|
|
3106
3104
|
};
|
|
3107
|
-
function
|
|
3108
|
-
const t =
|
|
3105
|
+
function Mn(e) {
|
|
3106
|
+
const t = Ln(), r = x(0), a = x(null), [n, o] = z($n), s = Le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3109
3107
|
const d = i[0];
|
|
3110
3108
|
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3111
3109
|
a.current && t() && o(d.contentRect);
|
|
@@ -3115,8 +3113,8 @@ function Un(e) {
|
|
|
3115
3113
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3116
3114
|
}), [s, e]), [a, n];
|
|
3117
3115
|
}
|
|
3118
|
-
function
|
|
3119
|
-
const t =
|
|
3116
|
+
function Un(e) {
|
|
3117
|
+
const t = _t();
|
|
3120
3118
|
if (!e)
|
|
3121
3119
|
return t;
|
|
3122
3120
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3126,7 +3124,7 @@ function Kn(e) {
|
|
|
3126
3124
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3127
3125
|
}
|
|
3128
3126
|
}
|
|
3129
|
-
const
|
|
3127
|
+
const er = "SET_ANNOUNCEMENT", tr = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
3130
3128
|
alert: null,
|
|
3131
3129
|
alertdialog: null,
|
|
3132
3130
|
log: "polite",
|
|
@@ -3134,14 +3132,14 @@ const tr = "SET_ANNOUNCEMENT", rr = "CLEAR_ANNOUNCEMENT", Hn = {
|
|
|
3134
3132
|
progressbar: null,
|
|
3135
3133
|
status: "polite",
|
|
3136
3134
|
timer: "assertive"
|
|
3137
|
-
},
|
|
3135
|
+
}, Hn = (e, t) => {
|
|
3138
3136
|
switch (t == null ? void 0 : t.type) {
|
|
3139
|
-
case
|
|
3137
|
+
case er:
|
|
3140
3138
|
return {
|
|
3141
3139
|
...e,
|
|
3142
3140
|
announcement: t.payload
|
|
3143
3141
|
};
|
|
3144
|
-
case
|
|
3142
|
+
case tr:
|
|
3145
3143
|
return {
|
|
3146
3144
|
...e,
|
|
3147
3145
|
announcement: null
|
|
@@ -3149,12 +3147,12 @@ const tr = "SET_ANNOUNCEMENT", rr = "CLEAR_ANNOUNCEMENT", Hn = {
|
|
|
3149
3147
|
default:
|
|
3150
3148
|
return e;
|
|
3151
3149
|
}
|
|
3152
|
-
},
|
|
3150
|
+
}, Wn = ({
|
|
3153
3151
|
onAnnouncementClear: e,
|
|
3154
3152
|
dispatch: t
|
|
3155
3153
|
}) => {
|
|
3156
3154
|
t({
|
|
3157
|
-
type:
|
|
3155
|
+
type: tr
|
|
3158
3156
|
}), typeof e == "function" && e();
|
|
3159
3157
|
}, Tt = ({
|
|
3160
3158
|
children: e,
|
|
@@ -3164,16 +3162,16 @@ const tr = "SET_ANNOUNCEMENT", rr = "CLEAR_ANNOUNCEMENT", Hn = {
|
|
|
3164
3162
|
dispatch: n
|
|
3165
3163
|
}) => {
|
|
3166
3164
|
clearTimeout(r.current), e !== null && n({
|
|
3167
|
-
type:
|
|
3165
|
+
type: er,
|
|
3168
3166
|
payload: e
|
|
3169
3167
|
}), t && (r.current = setTimeout(
|
|
3170
|
-
() =>
|
|
3168
|
+
() => Wn({
|
|
3171
3169
|
onAnnouncementClear: a,
|
|
3172
3170
|
dispatch: n
|
|
3173
3171
|
}),
|
|
3174
3172
|
t
|
|
3175
3173
|
));
|
|
3176
|
-
},
|
|
3174
|
+
}, Bn = ({
|
|
3177
3175
|
children: e,
|
|
3178
3176
|
announcementTimeoutRef: t,
|
|
3179
3177
|
announcementDelay: r,
|
|
@@ -3196,7 +3194,7 @@ const tr = "SET_ANNOUNCEMENT", rr = "CLEAR_ANNOUNCEMENT", Hn = {
|
|
|
3196
3194
|
dispatch: s
|
|
3197
3195
|
});
|
|
3198
3196
|
};
|
|
3199
|
-
function
|
|
3197
|
+
function rr({
|
|
3200
3198
|
children: e,
|
|
3201
3199
|
className: t,
|
|
3202
3200
|
politeness: r,
|
|
@@ -3207,12 +3205,12 @@ function ar({
|
|
|
3207
3205
|
visible: i,
|
|
3208
3206
|
...d
|
|
3209
3207
|
}) {
|
|
3210
|
-
const h = x(null), f = x(null), [u, c] =
|
|
3208
|
+
const h = x(null), f = x(null), [u, c] = It(Hn, {
|
|
3211
3209
|
announcement: null
|
|
3212
3210
|
});
|
|
3213
3211
|
let m = r;
|
|
3214
|
-
typeof m > "u" && (m = a ?
|
|
3215
|
-
|
|
3212
|
+
typeof m > "u" && (m = a ? Kn[a] : "assertive"), Y(() => {
|
|
3213
|
+
Bn({
|
|
3216
3214
|
announcementTimeoutRef: h,
|
|
3217
3215
|
announcementDelay: n,
|
|
3218
3216
|
children: e,
|
|
@@ -3254,21 +3252,21 @@ try {
|
|
|
3254
3252
|
});
|
|
3255
3253
|
} catch {
|
|
3256
3254
|
}
|
|
3257
|
-
const
|
|
3255
|
+
const Vn = ({
|
|
3258
3256
|
mode: e
|
|
3259
3257
|
}) => p({
|
|
3260
3258
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3261
3259
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3262
3260
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3263
3261
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3264
|
-
}),
|
|
3262
|
+
}), Jn = ({
|
|
3265
3263
|
focusMode: e
|
|
3266
3264
|
}) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3267
3265
|
"focus:outline-focus-dark": e === "dark",
|
|
3268
3266
|
"focus:outline-focus-light": e === "light",
|
|
3269
3267
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3270
3268
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3271
|
-
}),
|
|
3269
|
+
}), Gn = ({
|
|
3272
3270
|
noBorder: e,
|
|
3273
3271
|
error: t
|
|
3274
3272
|
}) => p("border-2", {
|
|
@@ -3276,7 +3274,7 @@ const Jn = ({
|
|
|
3276
3274
|
"focus:border-border-dark": !e && t,
|
|
3277
3275
|
"border-border-error-dark": !e && t,
|
|
3278
3276
|
"border-transparent": e
|
|
3279
|
-
}),
|
|
3277
|
+
}), Yn = ({
|
|
3280
3278
|
disabled: e,
|
|
3281
3279
|
raw: t,
|
|
3282
3280
|
error: r,
|
|
@@ -3300,7 +3298,7 @@ const Jn = ({
|
|
|
3300
3298
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3301
3299
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3302
3300
|
});
|
|
3303
|
-
},
|
|
3301
|
+
}, Fn = ({
|
|
3304
3302
|
error: e,
|
|
3305
3303
|
raw: t,
|
|
3306
3304
|
mode: r,
|
|
@@ -3327,7 +3325,7 @@ const Jn = ({
|
|
|
3327
3325
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3328
3326
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3329
3327
|
});
|
|
3330
|
-
},
|
|
3328
|
+
}, jn = ({
|
|
3331
3329
|
className: e,
|
|
3332
3330
|
inputClassName: t,
|
|
3333
3331
|
raw: r,
|
|
@@ -3341,7 +3339,7 @@ const Jn = ({
|
|
|
3341
3339
|
}) => {
|
|
3342
3340
|
const f = r ? e : p(
|
|
3343
3341
|
"relative flex w-full flex-col justify-center",
|
|
3344
|
-
|
|
3342
|
+
Dn,
|
|
3345
3343
|
e
|
|
3346
3344
|
);
|
|
3347
3345
|
let u = "";
|
|
@@ -3363,22 +3361,22 @@ const Jn = ({
|
|
|
3363
3361
|
break;
|
|
3364
3362
|
}
|
|
3365
3363
|
const c = r ? p(t) : p(
|
|
3366
|
-
|
|
3364
|
+
Zt,
|
|
3367
3365
|
u,
|
|
3368
3366
|
"rounded-md text-base px-4",
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3367
|
+
Vn({ mode: s }),
|
|
3368
|
+
Jn({ focusMode: i }),
|
|
3369
|
+
Gn({ noBorder: n, error: o }),
|
|
3372
3370
|
{
|
|
3373
3371
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3374
3372
|
},
|
|
3375
3373
|
t
|
|
3376
|
-
), m = r ? void 0 : "sr-only", y =
|
|
3374
|
+
), m = r ? void 0 : "sr-only", y = Yn({
|
|
3377
3375
|
disabled: a,
|
|
3378
3376
|
raw: r,
|
|
3379
3377
|
error: o,
|
|
3380
3378
|
mode: s
|
|
3381
|
-
}), w =
|
|
3379
|
+
}), w = Fn({
|
|
3382
3380
|
error: o,
|
|
3383
3381
|
raw: r,
|
|
3384
3382
|
mode: s,
|
|
@@ -3414,13 +3412,13 @@ const Jn = ({
|
|
|
3414
3412
|
size: k = "md",
|
|
3415
3413
|
...Q
|
|
3416
3414
|
}, L) => {
|
|
3417
|
-
const [Z, $] =
|
|
3415
|
+
const [Z, $] = Mn(), [B, U] = z(0), S = Un({ id: e, prefix: `${Zt}-` }), M = `${t} error, ${y}`, K = x(null), I = x(null), C = {
|
|
3418
3416
|
xs: { label: "-25px", helperText: "30px" },
|
|
3419
3417
|
sm: { label: "-29px", helperText: "34px" },
|
|
3420
3418
|
md: { label: "-33px", helperText: "38px" },
|
|
3421
3419
|
lg: { label: "-15px", helperText: "22px" },
|
|
3422
3420
|
xl: { label: "-19px", helperText: "25px" }
|
|
3423
|
-
}, O =
|
|
3421
|
+
}, O = jn({
|
|
3424
3422
|
className: o,
|
|
3425
3423
|
inputClassName: s,
|
|
3426
3424
|
error: a,
|
|
@@ -3494,12 +3492,12 @@ const Jn = ({
|
|
|
3494
3492
|
children: w
|
|
3495
3493
|
}
|
|
3496
3494
|
),
|
|
3497
|
-
a && y && /* @__PURE__ */ l(
|
|
3495
|
+
a && y && /* @__PURE__ */ l(rr, { politeness: "polite", clearAnnouncementDelay: 500, children: M })
|
|
3498
3496
|
] });
|
|
3499
3497
|
}
|
|
3500
3498
|
);
|
|
3501
3499
|
ot.displayName = "TextInput";
|
|
3502
|
-
function
|
|
3500
|
+
function zn(e) {
|
|
3503
3501
|
return Le(() => e.every((t) => t == null) ? () => {
|
|
3504
3502
|
} : (t) => {
|
|
3505
3503
|
e.forEach((r) => {
|
|
@@ -3507,7 +3505,7 @@ function qn(e) {
|
|
|
3507
3505
|
});
|
|
3508
3506
|
}, e);
|
|
3509
3507
|
}
|
|
3510
|
-
const
|
|
3508
|
+
const qn = 500, Xn = 5e3, Qn = 2e4, ar = X.forwardRef(
|
|
3511
3509
|
({
|
|
3512
3510
|
name: e,
|
|
3513
3511
|
disabled: t,
|
|
@@ -3524,19 +3522,19 @@ const Xn = 500, Qn = 5e3, Zn = 2e4, nr = X.forwardRef(
|
|
|
3524
3522
|
const [c, m] = z(!0), [y, w] = z({
|
|
3525
3523
|
message: null,
|
|
3526
3524
|
politeness: null
|
|
3527
|
-
}), T = x(!0), k = x(null), Q = x(null), L =
|
|
3525
|
+
}), T = x(!0), k = x(null), Q = x(null), L = zn([u, Q]), Z = c ? "Show" : "Hide", $ = () => {
|
|
3528
3526
|
k.current && clearTimeout(k.current), T.current || (k.current = setTimeout(() => {
|
|
3529
3527
|
T.current = !0, m(!0), w({
|
|
3530
|
-
announcementTimeout:
|
|
3528
|
+
announcementTimeout: Xn,
|
|
3531
3529
|
politeness: "polite",
|
|
3532
3530
|
message: `${r} hiding characters`
|
|
3533
3531
|
}), n && n(!0);
|
|
3534
|
-
},
|
|
3532
|
+
}, Qn));
|
|
3535
3533
|
}, B = (I) => {
|
|
3536
3534
|
I.preventDefault();
|
|
3537
3535
|
const C = !T.current;
|
|
3538
3536
|
T.current = C, $(), m(C), w({
|
|
3539
|
-
announcementTimeout:
|
|
3537
|
+
announcementTimeout: qn,
|
|
3540
3538
|
politeness: "assertive",
|
|
3541
3539
|
message: C ? "Characters hidden" : "Characters showing"
|
|
3542
3540
|
}), n && n(C);
|
|
@@ -3577,7 +3575,7 @@ const Xn = 500, Qn = 5e3, Zn = 2e4, nr = X.forwardRef(
|
|
|
3577
3575
|
}
|
|
3578
3576
|
),
|
|
3579
3577
|
/* @__PURE__ */ l(
|
|
3580
|
-
|
|
3578
|
+
rr,
|
|
3581
3579
|
{
|
|
3582
3580
|
role: "status",
|
|
3583
3581
|
politeness: y.politeness,
|
|
@@ -3588,7 +3586,7 @@ const Xn = 500, Qn = 5e3, Zn = 2e4, nr = X.forwardRef(
|
|
|
3588
3586
|
] });
|
|
3589
3587
|
}
|
|
3590
3588
|
);
|
|
3591
|
-
|
|
3589
|
+
ar.displayName = "TextInputMask";
|
|
3592
3590
|
/*!
|
|
3593
3591
|
@versini/ui-textinput v3.0.13
|
|
3594
3592
|
© 2025 gizmette.com
|
|
@@ -3602,7 +3600,7 @@ try {
|
|
|
3602
3600
|
});
|
|
3603
3601
|
} catch {
|
|
3604
3602
|
}
|
|
3605
|
-
const
|
|
3603
|
+
const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in with a Passkey", Xo = "Log out", ro = "Password", Qo = "Profile", Zo = "Settings", es = "Chat history", ts = "About", rs = "Type your question here", as = "{{clipboard}}", ns = `Sometimes, ${nr} hallucinates. Review important details.`, os = "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.", ss = {
|
|
3606
3604
|
PREFERENCES: {
|
|
3607
3605
|
TITLE: "User profile",
|
|
3608
3606
|
NAME: "Name",
|
|
@@ -3642,14 +3640,14 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3642
3640
|
TITLE: "Chat Details",
|
|
3643
3641
|
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more."
|
|
3644
3642
|
}
|
|
3645
|
-
},
|
|
3646
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3643
|
+
}, ao = () => /* @__PURE__ */ D("div", { className: "flex items-center justify-center", children: [
|
|
3644
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(kn, {}) }),
|
|
3647
3645
|
/* @__PURE__ */ D("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3648
|
-
/* @__PURE__ */ l("h1", { children:
|
|
3649
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3646
|
+
/* @__PURE__ */ l("h1", { children: nr }),
|
|
3647
|
+
/* @__PURE__ */ l("h2", { children: Zn })
|
|
3650
3648
|
] })
|
|
3651
|
-
] }),
|
|
3652
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3649
|
+
] }), no = () => {
|
|
3650
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = qt(), [a, n] = z(""), [o, s] = z(""), [i, d] = z(!0), [h, f] = z({
|
|
3653
3651
|
username: "",
|
|
3654
3652
|
password: ""
|
|
3655
3653
|
}), u = async (c) => {
|
|
@@ -3664,9 +3662,9 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3664
3662
|
}), Y(() => {
|
|
3665
3663
|
t && s(t);
|
|
3666
3664
|
}, [t]), /* @__PURE__ */ l(Re, { children: /* @__PURE__ */ D(
|
|
3667
|
-
|
|
3665
|
+
xn,
|
|
3668
3666
|
{
|
|
3669
|
-
className:
|
|
3667
|
+
className: Qa({
|
|
3670
3668
|
extraClass: "mt-5"
|
|
3671
3669
|
}),
|
|
3672
3670
|
noMargin: !0,
|
|
@@ -3675,13 +3673,13 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3675
3673
|
/* @__PURE__ */ l(
|
|
3676
3674
|
"div",
|
|
3677
3675
|
{
|
|
3678
|
-
className:
|
|
3676
|
+
className: Xa({
|
|
3679
3677
|
extraClass: "rounded-md"
|
|
3680
3678
|
}),
|
|
3681
|
-
children: /* @__PURE__ */ l(
|
|
3679
|
+
children: /* @__PURE__ */ l(ao, {})
|
|
3682
3680
|
}
|
|
3683
3681
|
),
|
|
3684
|
-
/* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(
|
|
3682
|
+
/* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(On, { alignHorizontal: "center", children: /* @__PURE__ */ l(re, { span: 6, children: /* @__PURE__ */ D(_n, { mode: "dark", children: [
|
|
3685
3683
|
/* @__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 }) }),
|
|
3686
3684
|
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3687
3685
|
ot,
|
|
@@ -3705,7 +3703,7 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3705
3703
|
}
|
|
3706
3704
|
) }),
|
|
3707
3705
|
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3708
|
-
|
|
3706
|
+
ar,
|
|
3709
3707
|
{
|
|
3710
3708
|
className: "mt-7",
|
|
3711
3709
|
required: !0,
|
|
@@ -3715,14 +3713,14 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3715
3713
|
mode: "dark",
|
|
3716
3714
|
focusMode: "light",
|
|
3717
3715
|
name: "password",
|
|
3718
|
-
label:
|
|
3716
|
+
label: ro,
|
|
3719
3717
|
rightElement: /* @__PURE__ */ l(
|
|
3720
3718
|
Pe,
|
|
3721
3719
|
{
|
|
3722
3720
|
focusMode: "light",
|
|
3723
3721
|
mode: "dark",
|
|
3724
3722
|
label: i ? "Show" : "Hide",
|
|
3725
|
-
children: i ? /* @__PURE__ */ l(
|
|
3723
|
+
children: i ? /* @__PURE__ */ l(Nn, {}) : /* @__PURE__ */ l(An, {})
|
|
3726
3724
|
}
|
|
3727
3725
|
),
|
|
3728
3726
|
onMaskChange: d,
|
|
@@ -3737,7 +3735,7 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3737
3735
|
}
|
|
3738
3736
|
) }),
|
|
3739
3737
|
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3740
|
-
|
|
3738
|
+
Qt,
|
|
3741
3739
|
{
|
|
3742
3740
|
mode: "light",
|
|
3743
3741
|
focusMode: "light",
|
|
@@ -3745,10 +3743,10 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3745
3743
|
noBorder: !0,
|
|
3746
3744
|
type: "submit",
|
|
3747
3745
|
className: "mt-7",
|
|
3748
|
-
children:
|
|
3746
|
+
children: eo
|
|
3749
3747
|
}
|
|
3750
3748
|
) }),
|
|
3751
|
-
!
|
|
3749
|
+
!Za() && /* @__PURE__ */ D(Re, { children: [
|
|
3752
3750
|
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
3753
3751
|
/* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
|
|
3754
3752
|
Pe,
|
|
@@ -3758,9 +3756,9 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3758
3756
|
focusMode: "light",
|
|
3759
3757
|
fullWidth: !0,
|
|
3760
3758
|
className: "mb-4",
|
|
3761
|
-
labelRight:
|
|
3759
|
+
labelRight: to,
|
|
3762
3760
|
onClick: r,
|
|
3763
|
-
children: /* @__PURE__ */ l(
|
|
3761
|
+
children: /* @__PURE__ */ l(Rn, { size: "size-7" })
|
|
3764
3762
|
}
|
|
3765
3763
|
) })
|
|
3766
3764
|
] })
|
|
@@ -3768,74 +3766,74 @@ const eo = "ASK! ME! ANYTHING!", or = "Callisto", to = "Log in", ro = "Sign in w
|
|
|
3768
3766
|
]
|
|
3769
3767
|
}
|
|
3770
3768
|
) });
|
|
3771
|
-
},
|
|
3769
|
+
}, oo = new URL(document.location.href).searchParams, so = !!oo.get("debug") || !1, io = cr(() => import(
|
|
3772
3770
|
/* webpackChunkName: "LazyApp" */
|
|
3773
|
-
"./App.
|
|
3774
|
-
).then((e) => e.App)),
|
|
3775
|
-
const { isAuthenticated: t } =
|
|
3776
|
-
return t ? /* @__PURE__ */ l(
|
|
3777
|
-
},
|
|
3771
|
+
"./App.Cc0p_pSJ.js"
|
|
3772
|
+
).then((e) => e.App)), co = ({ isComponent: e }) => {
|
|
3773
|
+
const { isAuthenticated: t } = qt();
|
|
3774
|
+
return t ? /* @__PURE__ */ l(lr, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(io, { isComponent: e }) }) : /* @__PURE__ */ l(no, {});
|
|
3775
|
+
}, lo = ({
|
|
3778
3776
|
isComponent: e = !1,
|
|
3779
|
-
domain: t =
|
|
3780
|
-
}) => /* @__PURE__ */ l(
|
|
3777
|
+
domain: t = qa
|
|
3778
|
+
}) => /* @__PURE__ */ l(Ua, { clientId: Ka, domain: t, debug: so, children: /* @__PURE__ */ l(co, { isComponent: e }) }), is = ({ domain: e }) => /* @__PURE__ */ l(lo, { isComponent: !0, domain: e });
|
|
3781
3779
|
export {
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3780
|
+
ts as ABOUT_TITLE,
|
|
3781
|
+
Oo as ACTION_RESET_PROMPT,
|
|
3782
|
+
vo as ACTION_SEARCH,
|
|
3783
|
+
xo as ACTION_SORT,
|
|
3784
|
+
Co as ACTION_TOGGLE_PROMPT,
|
|
3785
|
+
nr as APP_NAME,
|
|
3786
|
+
Qt as C,
|
|
3787
|
+
ss as CARDS,
|
|
3788
|
+
as as CLIPBOARD_PROMPT,
|
|
3789
|
+
Ao as DEFAULT_AI_PROVIDER,
|
|
3790
|
+
Vo as DEFAULT_ICON_ACTION_SIZE,
|
|
3791
|
+
ko as ERROR_MESSAGE,
|
|
3792
|
+
ns as FOOTER_DISCLAIMER,
|
|
3793
|
+
es as HISTORY_TITLE,
|
|
3794
|
+
Ho as INFINITE_SCROLL_LIMIT,
|
|
3795
|
+
Ko as INFINITE_SCROLL_THRESHOLD,
|
|
3796
|
+
On as L,
|
|
3797
|
+
Do as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3798
|
+
Po as LOCAL_STORAGE_PREFIX,
|
|
3799
|
+
Mo as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
3800
|
+
Lo as LOCAL_STORAGE_SEARCH,
|
|
3801
|
+
$o as LOCAL_STORAGE_SORT,
|
|
3802
|
+
Xo as LOG_OUT,
|
|
3803
|
+
ao as Logo,
|
|
3806
3804
|
me as M,
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3805
|
+
Qo as PROFILE_TITLE,
|
|
3806
|
+
os as PROMPTS_DESCRIPTION,
|
|
3807
|
+
Wo as PROMPT_CLASSNAME,
|
|
3808
|
+
Bo as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
3809
|
+
No as PROVIDER_ANTHROPIC,
|
|
3810
|
+
Ro as PROVIDER_OPENAI,
|
|
3811
|
+
_n as R,
|
|
3812
|
+
To as ROLE_ASSISTANT,
|
|
3813
|
+
_o as ROLE_HIDDEN,
|
|
3814
|
+
So as ROLE_INTERNAL,
|
|
3815
|
+
Io as ROLE_SYSTEM,
|
|
3816
|
+
wo as ROLE_USER,
|
|
3817
|
+
Zo as SETTINGS_TITLE,
|
|
3818
|
+
Uo as STATS_SEPARATOR,
|
|
3819
|
+
is as SassySaint,
|
|
3820
|
+
rs as TYPE_QUESTION,
|
|
3821
|
+
zo as debounce,
|
|
3822
|
+
Fo as durationFormatter,
|
|
3825
3823
|
He as f,
|
|
3826
3824
|
ot as fe,
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3825
|
+
Jo as getCurrentGeoLocation,
|
|
3826
|
+
Qa as getMainPaddingClass,
|
|
3827
|
+
Xa as getMessageContaintWrapperClass,
|
|
3828
|
+
Za as isElectron,
|
|
3829
|
+
en as isProbablyMobile,
|
|
3830
|
+
qo as isProbablyiPhone,
|
|
3833
3831
|
re as j,
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3832
|
+
Rn as l,
|
|
3833
|
+
Yo as numberFormatter,
|
|
3834
|
+
jo as pluralize,
|
|
3835
|
+
xn as r,
|
|
3838
3836
|
Pe as re,
|
|
3839
|
-
|
|
3840
|
-
|
|
3837
|
+
Go as renderDataAsList,
|
|
3838
|
+
qt as un
|
|
3841
3839
|
};
|